Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 2188
  Title:Unit Converter
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char buf[1061];
char num[1001];
char unit[60];
int n;
int sig_dig;
int point_pos;
struct prefix_exponent_st
{
  char prefix[7];
  int  exponent;
}
prefix_table[20]={
  {"yotta",24},
  {"zetta",21},
  {"exa",  18},
  {"peta", 15},
  {"tera", 12},
  {"giga",  9},
  {"mega",  6},
  {"kilo",  3},
  {"hecto", 2},
  {"deca",  1},
  {"deci", -1}, 
  {"centi",-2},
  {"milli",-3},
  {"micro",-6},
  {"nano", -9},
  {"pico", -12},
  {"femto",-15},
  {"ato",  -18},
  {"zepto",-21},
  {"yocto",-24}
};

int prefix2exponent(char *s)
{
  int i;
  for(i=0;i<20;i++)
    if(0==strcmp(prefix_table[i].prefix,s))
      return(prefix_table[i].exponent);
  return(0);
}
void output(char *num,int expo,char *unit)
{
  int c,len,i;
  char *p;

  if(*num=='0')
    {
      p=num;
      p+=2;c=1;
      while(*p=='0')
	{
	  c++;      
	  p++;
	}
      if(*(p+1))
	printf("%c.%s * 10^%d %s",*p,p+1,expo-c,unit);
      else
	printf("%c * 10^%d %s",*p,expo-c,unit);
    }
  else
    {
      c=strlen(num);
      for(i=0;i<strlen(num);i++)
	if(num[i]=='.')
	  c=i;
	else if(i==0)
	  printf("%c.",num[i]);
	else
	  printf("%c",num[i]);
      printf(" * 10^%d %s",expo+c-1,unit);
    }
}

main()
{
  int i,expon;
  char *p;
  scanf("%d ",&n);
  for(i=0;i<n;i++)
    {
      fgets(buf,1061,stdin);

      p=strtok(buf," ");
      strcpy(num,p);
      //printf("p=%s\n",num);

      p=strtok(NULL," ");
      if(0 != (expon=prefix2exponent(p)))
	p=strtok(NULL," ");
      strcpy(unit,p);

      output(num,expon,unit);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 1061
buf:
	.zero	1061
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 1001
num:
	.zero	1001
	.globl	unit
	.align 32
	.type	unit, @object
	.size	unit, 60
unit:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	sig_dig
	.align 4
	.type	sig_dig, @object
	.size	sig_dig, 4
sig_dig:
	.zero	4
	.globl	point_pos
	.align 4
	.type	point_pos, @object
	.size	point_pos, 4
point_pos:
	.zero	4
	.globl	prefix_table
	.data
	.align 32
	.type	prefix_table, @object
	.size	prefix_table, 240
prefix_table:
	.string	"yotta"
	.zero	1
	.zero	1
	.long	24
	.string	"zetta"
	.zero	1
	.zero	1
	.long	21
	.string	"exa"
	.zero	3
	.zero	1
	.long	18
	.string	"peta"
	.zero	2
	.zero	1
	.long	15
	.string	"tera"
	.zero	2
	.zero	1
	.long	12
	.string	"giga"
	.zero	2
	.zero	1
	.long	9
	.string	"mega"
	.zero	2
	.zero	1
	.long	6
	.string	"kilo"
	.zero	2
	.zero	1
	.long	3
	.string	"hecto"
	.zero	1
	.zero	1
	.long	2
	.string	"deca"
	.zero	2
	.zero	1
	.long	1
	.string	"deci"
	.zero	2
	.zero	1
	.long	-1
	.string	"centi"
	.zero	1
	.zero	1
	.long	-2
	.string	"milli"
	.zero	1
	.zero	1
	.long	-3
	.string	"micro"
	.zero	1
	.zero	1
	.long	-6
	.string	"nano"
	.zero	2
	.zero	1
	.long	-9
	.string	"pico"
	.zero	2
	.zero	1
	.long	-12
	.string	"femto"
	.zero	1
	.zero	1
	.long	-15
	.string	"ato"
	.zero	3
	.zero	1
	.long	-18
	.string	"zepto"
	.zero	1
	.zero	1
	.long	-21
	.string	"yocto"
	.zero	1
	.zero	1
	.long	-24
	.text
	.globl	prefix2exponent
	.type	prefix2exponent, @function
prefix2exponent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	prefix_table(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+prefix_table(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$19, -4(%rbp)
	jle	.L5
	movl	$0, %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prefix2exponent, .-prefix2exponent
	.section	.rodata
.LC0:
	.string	"%c.%s * 10^%d %s"
.LC1:
	.string	"%c * 10^%d %s"
.LC2:
	.string	"%c."
.LC3:
	.string	" * 10^%d %s"
	.text
	.globl	output
	.type	output, @function
output:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L7
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$2, -24(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L8
.L9:
	addl	$1, -32(%rbp)
	addq	$1, -24(%rbp)
.L8:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L9
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L10
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rsi
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movq	%rcx, %r8
	movl	%edx, %ecx
	movq	%rsi, %rdx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L10:
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L12
.L16:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L13
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	cmpl	$0, -28(%rbp)
	jne	.L15
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L15:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L14:
	addl	$1, -28(%rbp)
.L12:
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L16
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	output, .-output
	.section	.rodata
.LC4:
	.string	"%d "
.LC5:
	.string	" "
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L19
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$1061, %esi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	prefix2exponent
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L20
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	unit(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-12(%rbp), %eax
	leaq	unit(%rip), %rdx
	movl	%eax, %esi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	output
	addl	$1, -16(%rbp)
.L19:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L21
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	prefix2exponent
	.type	prefix2exponent, @function
prefix2exponent:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	prefix_table(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rbx
	cmpq	$20, %rbx
	je	.L8
.L4:
	leaq	(%rbx,%rbx,2), %rax
	movq	%rbp, %rsi
	movslq	%ebx, %r12
	leaq	0(%r13,%rax,4), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L2
	leaq	(%r12,%r12,2), %rax
	movl	8(%r13,%rax,4), %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	prefix2exponent, .-prefix2exponent
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%c.%s * 10^%d %s"
.LC1:
	.string	"%c * 10^%d %s"
.LC2:
	.string	"%c."
.LC3:
	.string	" * 10^%d %s"
	.text
	.p2align 4
	.globl	output
	.type	output, @function
output:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpb	$48, (%rdi)
	je	.L25
	call	strlen@PLT
	movl	%eax, %r14d
	testq	%rax, %rax
	je	.L19
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r15
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L26:
	testq	%rbx, %rbx
	jne	.L16
	movl	$1, %edi
	movq	%r15, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
.L15:
	addq	$1, %rbx
	cmpq	%rax, %rbx
	jnb	.L14
.L17:
	movsbl	0(%rbp,%rbx), %edx
	cmpb	$46, %dl
	jne	.L26
	movl	%ebx, %r14d
	addq	$1, %rbx
	cmpq	%rax, %rbx
	jb	.L17
.L14:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leal	-1(%r14,%r12), %edx
	movq	%r13, %rcx
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC3(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	$1, %edi
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movsbl	%dl, %edi
	call	putchar@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movsbl	2(%rdi), %edx
	leaq	2(%rdi), %rax
	cmpb	$48, %dl
	jne	.L18
	movl	$2, %ecx
	subl	%eax, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rcx,%rax), %esi
	movsbl	1(%rax), %edx
	addq	$1, %rax
	cmpb	$48, %dl
	je	.L12
.L11:
	subl	%esi, %r12d
	cmpb	$0, 1(%rax)
	je	.L13
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	1(%rax), %rcx
	movq	%r13, %r9
	movl	%r12d, %r8d
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	$1, %edi
	popq	%r12
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r13, %r8
	movl	%r12d, %ecx
	movl	$1, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC1(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	xorl	%r14d, %r14d
	jmp	.L14
.L18:
	movl	$1, %esi
	jmp	.L11
	.cfi_endproc
.LFE36:
	.size	output, .-output
	.section	.rodata.str1.1
.LC4:
	.string	"%d "
.LC5:
	.string	" "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L28
	movl	$0, 12(%rsp)
	leaq	buf(%rip), %r15
	leaq	.LC5(%rip), %r12
	leaq	prefix_table(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L33:
	movq	stdin(%rip), %rdx
	movl	$1061, %esi
	movq	%r15, %rdi
	xorl	%r14d, %r14d
	call	fgets@PLT
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strtok@PLT
	movl	$1001, %edx
	leaq	num(%rip), %rdi
	movq	%rax, %rsi
	call	__strcpy_chk@PLT
	movq	%r12, %rsi
	xorl	%edi, %edi
	call	strtok@PLT
	movq	%rax, %r13
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$1, %r14
	cmpq	$20, %r14
	je	.L37
.L32:
	leaq	(%r14,%r14,2), %rax
	movq	%r13, %rsi
	movslq	%r14d, %rbx
	leaq	0(%rbp,%rax,4), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	leaq	(%rbx,%rbx,2), %rax
	movl	8(%rbp,%rax,4), %ebx
	testl	%ebx, %ebx
	je	.L31
	movq	%r12, %rsi
	xorl	%edi, %edi
	call	strtok@PLT
	movq	%rax, %r13
.L31:
	movl	$60, %edx
	movq	%r13, %rsi
	leaq	unit(%rip), %rdi
	call	__strcpy_chk@PLT
	leaq	unit(%rip), %rdx
	movl	%ebx, %esi
	leaq	num(%rip), %rdi
	call	output
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	cmpl	%eax, n(%rip)
	jg	.L33
.L28:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L31
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	prefix_table
	.data
	.align 32
	.type	prefix_table, @object
	.size	prefix_table, 240
prefix_table:
	.string	"yotta"
	.zero	1
	.zero	1
	.long	24
	.string	"zetta"
	.zero	1
	.zero	1
	.long	21
	.string	"exa"
	.zero	3
	.zero	1
	.long	18
	.string	"peta"
	.zero	2
	.zero	1
	.long	15
	.string	"tera"
	.zero	2
	.zero	1
	.long	12
	.string	"giga"
	.zero	2
	.zero	1
	.long	9
	.string	"mega"
	.zero	2
	.zero	1
	.long	6
	.string	"kilo"
	.zero	2
	.zero	1
	.long	3
	.string	"hecto"
	.zero	1
	.zero	1
	.long	2
	.string	"deca"
	.zero	2
	.zero	1
	.long	1
	.string	"deci"
	.zero	2
	.zero	1
	.long	-1
	.string	"centi"
	.zero	1
	.zero	1
	.long	-2
	.string	"milli"
	.zero	1
	.zero	1
	.long	-3
	.string	"micro"
	.zero	1
	.zero	1
	.long	-6
	.string	"nano"
	.zero	2
	.zero	1
	.long	-9
	.string	"pico"
	.zero	2
	.zero	1
	.long	-12
	.string	"femto"
	.zero	1
	.zero	1
	.long	-15
	.string	"ato"
	.zero	3
	.zero	1
	.long	-18
	.string	"zepto"
	.zero	1
	.zero	1
	.long	-21
	.string	"yocto"
	.zero	1
	.zero	1
	.long	-24
	.globl	point_pos
	.bss
	.align 4
	.type	point_pos, @object
	.size	point_pos, 4
point_pos:
	.zero	4
	.globl	sig_dig
	.align 4
	.type	sig_dig, @object
	.size	sig_dig, 4
sig_dig:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	unit
	.align 32
	.type	unit, @object
	.size	unit, 60
unit:
	.zero	60
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 1001
num:
	.zero	1001
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1061
buf:
	.zero	1061
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	prefix2exponent
	.type	prefix2exponent, @function
prefix2exponent:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	prefix_table(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xorl	%ebx, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rbx
	cmpq	$20, %rbx
	je	.L8
.L4:
	leaq	(%rbx,%rbx,2), %rax
	movq	%rbp, %rsi
	movslq	%ebx, %r12
	leaq	0(%r13,%rax,4), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L2
	leaq	(%r12,%r12,2), %rax
	movl	8(%r13,%rax,4), %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE35:
	.size	prefix2exponent, .-prefix2exponent
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%c.%s * 10^%d %s"
.LC1:
	.string	"%c * 10^%d %s"
.LC2:
	.string	"%c."
.LC3:
	.string	" * 10^%d %s"
	.text
	.p2align 4
	.globl	output
	.type	output, @function
output:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	cmpb	$48, (%rdi)
	je	.L25
	call	strlen@PLT
	movl	%eax, %r14d
	testq	%rax, %rax
	je	.L19
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r15
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L26:
	testq	%rbx, %rbx
	jne	.L16
	movl	$1, %edi
	movq	%r15, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
.L15:
	addq	$1, %rbx
	cmpq	%rax, %rbx
	jnb	.L14
.L17:
	movsbl	0(%rbp,%rbx), %edx
	cmpb	$46, %dl
	jne	.L26
	movl	%ebx, %r14d
	addq	$1, %rbx
	cmpq	%rax, %rbx
	jb	.L17
.L14:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leal	-1(%r14,%r12), %edx
	movq	%r13, %rcx
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC3(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	$1, %edi
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	movsbl	%dl, %edi
	call	putchar@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movsbl	2(%rdi), %edx
	leaq	2(%rdi), %rax
	cmpb	$48, %dl
	jne	.L18
	movl	$2, %ecx
	subl	%eax, %ecx
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rcx,%rax), %esi
	movsbl	1(%rax), %edx
	addq	$1, %rax
	cmpb	$48, %dl
	je	.L12
.L11:
	subl	%esi, %r12d
	cmpb	$0, 1(%rax)
	je	.L13
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	leaq	1(%rax), %rcx
	movq	%r13, %r9
	movl	%r12d, %r8d
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	$1, %edi
	popq	%r12
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movq	%r13, %r8
	movl	%r12d, %ecx
	movl	$1, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC1(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	xorl	%r14d, %r14d
	jmp	.L14
.L18:
	movl	$1, %esi
	jmp	.L11
	.cfi_endproc
.LFE36:
	.size	output, .-output
	.section	.rodata.str1.1
.LC4:
	.string	"%d "
.LC5:
	.string	" "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L28
	movl	$0, 12(%rsp)
	leaq	buf(%rip), %r15
	leaq	.LC5(%rip), %r12
	leaq	prefix_table(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L33:
	movq	stdin(%rip), %rdx
	movl	$1061, %esi
	movq	%r15, %rdi
	xorl	%r14d, %r14d
	call	fgets@PLT
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	strtok@PLT
	movl	$1001, %edx
	leaq	num(%rip), %rdi
	movq	%rax, %rsi
	call	__strcpy_chk@PLT
	movq	%r12, %rsi
	xorl	%edi, %edi
	call	strtok@PLT
	movq	%rax, %r13
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	addq	$1, %r14
	cmpq	$20, %r14
	je	.L37
.L32:
	leaq	(%r14,%r14,2), %rax
	movq	%r13, %rsi
	movslq	%r14d, %rbx
	leaq	0(%rbp,%rax,4), %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L29
	leaq	(%rbx,%rbx,2), %rax
	movl	8(%rbp,%rax,4), %ebx
	testl	%ebx, %ebx
	je	.L31
	movq	%r12, %rsi
	xorl	%edi, %edi
	call	strtok@PLT
	movq	%rax, %r13
.L31:
	movl	$60, %edx
	movq	%r13, %rsi
	leaq	unit(%rip), %rdi
	call	__strcpy_chk@PLT
	leaq	unit(%rip), %rdx
	movl	%ebx, %esi
	leaq	num(%rip), %rdi
	call	output
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	cmpl	%eax, n(%rip)
	jg	.L33
.L28:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	xorl	%ebx, %ebx
	jmp	.L31
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	prefix_table
	.data
	.align 32
	.type	prefix_table, @object
	.size	prefix_table, 240
prefix_table:
	.string	"yotta"
	.zero	1
	.zero	1
	.long	24
	.string	"zetta"
	.zero	1
	.zero	1
	.long	21
	.string	"exa"
	.zero	3
	.zero	1
	.long	18
	.string	"peta"
	.zero	2
	.zero	1
	.long	15
	.string	"tera"
	.zero	2
	.zero	1
	.long	12
	.string	"giga"
	.zero	2
	.zero	1
	.long	9
	.string	"mega"
	.zero	2
	.zero	1
	.long	6
	.string	"kilo"
	.zero	2
	.zero	1
	.long	3
	.string	"hecto"
	.zero	1
	.zero	1
	.long	2
	.string	"deca"
	.zero	2
	.zero	1
	.long	1
	.string	"deci"
	.zero	2
	.zero	1
	.long	-1
	.string	"centi"
	.zero	1
	.zero	1
	.long	-2
	.string	"milli"
	.zero	1
	.zero	1
	.long	-3
	.string	"micro"
	.zero	1
	.zero	1
	.long	-6
	.string	"nano"
	.zero	2
	.zero	1
	.long	-9
	.string	"pico"
	.zero	2
	.zero	1
	.long	-12
	.string	"femto"
	.zero	1
	.zero	1
	.long	-15
	.string	"ato"
	.zero	3
	.zero	1
	.long	-18
	.string	"zepto"
	.zero	1
	.zero	1
	.long	-21
	.string	"yocto"
	.zero	1
	.zero	1
	.long	-24
	.globl	point_pos
	.bss
	.align 4
	.type	point_pos, @object
	.size	point_pos, 4
point_pos:
	.zero	4
	.globl	sig_dig
	.align 4
	.type	sig_dig, @object
	.size	sig_dig, 4
sig_dig:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	unit
	.align 32
	.type	unit, @object
	.size	unit, 60
unit:
	.zero	60
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 1001
num:
	.zero	1001
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1061
buf:
	.zero	1061
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

/*
  AOJ 2188
  Title:Unit Converter
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char buf[1061];
char num[1001];
char unit[60];
int n;
int sig_dig;
int point_pos;
struct prefix_exponent_st
{
  char prefix[7];
  int  exponent;
}
prefix_table[20]={
  {"yotta",24},
  {"zetta",21},
  {"exa",  18},
  {"peta", 15},
  {"tera", 12},
  {"giga",  9},
  {"mega",  6},
  {"kilo",  3},
  {"hecto", 2},
  {"deca",  1},
  {"deci", -1}, 
  {"centi",-2},
  {"milli",-3},
  {"micro",-6},
  {"nano", -9},
  {"pico", -12},
  {"femto",-15},
  {"ato",  -18},
  {"zepto",-21},
  {"yocto",-24}
};

int prefix2exponent(char *s)
{
  int i;
  for(i=0;i<20;i++)
    if(0==strcmp(prefix_table[i].prefix,s))
      return(prefix_table[i].exponent);
  return(0);
}
void output(char *num,int expo,char *unit)
{
  int c,len,i;
  char *p;

  if(*num=='0')
    {
      p=num;
      p+=2;c=1;
      while(*p=='0')
	{
	  c++;      
	  p++;
	}
      if(*(p+1))
	printf("%c.%s * 10^%d %s",*p,p+1,expo-c,unit);
      else
	printf("%c * 10^%d %s",*p,expo-c,unit);
    }
  else
    {
      c=strlen(num);
      for(i=0;i<strlen(num);i++)
	if(num[i]=='.')
	  c=i;
	else if(i==0)
	  printf("%c.",num[i]);
	else
	  printf("%c",num[i]);
      printf(" * 10^%d %s",expo+c-1,unit);
    }
}

main()
{
  int i,expon;
  char *p;
  scanf("%d ",&n);
  for(i=0;i<n;i++)
    {
      fgets(buf,1061,stdin);

      p=strtok(buf," ");
      strcpy(num,p);
      //printf("p=%s\n",num);

      p=strtok(NULL," ");
      if(0 != (expon=prefix2exponent(p)))
	p=strtok(NULL," ");
      strcpy(unit,p);

      output(num,expon,unit);
    }
  return(0);
}
7
12.3 kilo meters
0.45 mega watts
0.000000000000000000000001 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.5868394692236264 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.6843066209821149 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.000000000000000000000001 yotta grams
1000000000000000010000000 yocto seconds
42 amperes
0.42 joules
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.000000000000000000000001 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1234.56789012345678901234567890 hecto pascalr
 7
12.3 kilo meters
0.45 mega watts
0.5868394692236264 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1235.0324885234443 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.6843066209821149 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 seluoj
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.000000000000000000000001 yotta grams
1000000000000000010000000 yocto seconds
42 amperes
0.42 seluoj
1234.56789012345678901234567890 hecto pascals
 7
12.3 kilo meters
0.45 mega wauts
0.5868394692236264 yotta grams
1000000000000000000000000 yocto seconds
42 amperes
0.951642419825234 joules
1235.0324885234443 hecto pascals
 7
12.3 kilo meters
0.45 mega watts
0.6843066209821149 yotta grams
1000000100000000000000000 yocto seconds
42 amperes
0.951642419825234 seluoj
1234.56789012345678901234567890 hecto pascals

1.23 * 10^4 meters
4.5 * 10^5 watts
1 * 10^0 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
5.868394692236264 * 10^23 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
6.843066209821149 * 10^23 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
1 * 10^0 grams
1.000000000000000010000000 * 10^0 seconds
4.2 * 10^1 amperes
4.2 * 10^-1 joules
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
1 * 10^0 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.23456789012345678901234567890 * 10^5 pascalr
 1.23 * 10^4 meters
4.5 * 10^5 watts
5.868394692236264 * 10^23 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.2350324885234443 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
6.843066209821149 * 10^23 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 seluoj
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
1 * 10^0 grams
1.000000000000000010000000 * 10^0 seconds
4.2 * 10^1 amperes
4.2 * 10^-1 seluoj
1.23456789012345678901234567890 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 wauts
5.868394692236264 * 10^23 grams
1.000000000000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 joules
1.2350324885234443 * 10^5 pascals
 1.23 * 10^4 meters
4.5 * 10^5 watts
6.843066209821149 * 10^23 grams
1.000000100000000000000000 * 10^0 seconds
4.2 * 10^1 amperes
9.51642419825234 * 10^-1 seluoj
1.23456789012345678901234567890 * 10^5 pascals

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 2188
  Title:Unit Converter
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char buf[1061];
char num[1001];
char unit[60];
int n;
int sig_dig;
int point_pos;
struct prefix_exponent_st
{
  char prefix[7];
  int  exponent;
}
prefix_table[20]={
  {"yotta",24},
  {"zetta",21},
  {"exa",  18},
  {"peta", 15},
  {"tera", 12},
  {"giga",  9},
  {"mega",  6},
  {"kilo",  3},
  {"hecto", 2},
  {"deca",  1},
  {"deci", -1}, 
  {"centi",-2},
  {"milli",-3},
  {"micro",-6},
  {"nano", -9},
  {"pico", -12},
  {"femto",-15},
  {"ato",  -18},
  {"zepto",-21},
  {"yocto",-24}
};

int prefix2exponent(char *s)
{
  int i;
  for(i=0;i<20;i++)
    if(0==strcmp(prefix_table[i].prefix,s))
      return(prefix_table[i].exponent);
  return(0);
}
void output(char *num,int expo,char *unit)
{
  int c,len,i;
  char *p;

  if(*num=='0')
    {
      p=num;
      p+=2;c=1;
      while(*p=='0')
	{
	  c++;      
	  p++;
	}
      if(*(p+1))
	printf("%c.%s * 10^%d %s",*p,p+1,expo-c,unit);
      else
	printf("%c * 10^%d %s",*p,expo-c,unit);
    }
  else
    {
      c=strlen(num);
      for(i=0;i<strlen(num);i++)
	if(num[i]=='.')
	  c=i;
	else if(i==0)
	  printf("%c.",num[i]);
	else
	  printf("%c",num[i]);
      printf(" * 10^%d %s",expo+c-1,unit);
    }
}

main()
{
  int i,expon;
  char *p;
  scanf("%d ",&n);
  for(i=0;i<n;i++)
    {
      fgets(buf,1061,stdin);

      p=strtok(buf," ");
      strcpy(num,p);
      //printf("p=%s\n",num);

      p=strtok(NULL," ");
      if(0 != (expon=prefix2exponent(p)))
	p=strtok(NULL," ");
      strcpy(unit,p);

      output(num,expon,unit);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 1061
buf:
	.zero	1061
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 1001
num:
	.zero	1001
	.globl	unit
	.align 32
	.type	unit, @object
	.size	unit, 60
unit:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	sig_dig
	.align 4
	.type	sig_dig, @object
	.size	sig_dig, 4
sig_dig:
	.zero	4
	.globl	point_pos
	.align 4
	.type	point_pos, @object
	.size	point_pos, 4
point_pos:
	.zero	4
	.globl	prefix_table
	.data
	.align 32
	.type	prefix_table, @object
	.size	prefix_table, 240
prefix_table:
	.string	"yotta"
	.zero	1
	.zero	1
	.long	24
	.string	"zetta"
	.zero	1
	.zero	1
	.long	21
	.string	"exa"
	.zero	3
	.zero	1
	.long	18
	.string	"peta"
	.zero	2
	.zero	1
	.long	15
	.string	"tera"
	.zero	2
	.zero	1
	.long	12
	.string	"giga"
	.zero	2
	.zero	1
	.long	9
	.string	"mega"
	.zero	2
	.zero	1
	.long	6
	.string	"kilo"
	.zero	2
	.zero	1
	.long	3
	.string	"hecto"
	.zero	1
	.zero	1
	.long	2
	.string	"deca"
	.zero	2
	.zero	1
	.long	1
	.string	"deci"
	.zero	2
	.zero	1
	.long	-1
	.string	"centi"
	.zero	1
	.zero	1
	.long	-2
	.string	"milli"
	.zero	1
	.zero	1
	.long	-3
	.string	"micro"
	.zero	1
	.zero	1
	.long	-6
	.string	"nano"
	.zero	2
	.zero	1
	.long	-9
	.string	"pico"
	.zero	2
	.zero	1
	.long	-12
	.string	"femto"
	.zero	1
	.zero	1
	.long	-15
	.string	"ato"
	.zero	3
	.zero	1
	.long	-18
	.string	"zepto"
	.zero	1
	.zero	1
	.long	-21
	.string	"yocto"
	.zero	1
	.zero	1
	.long	-24
	.text
	.globl	prefix2exponent
	.type	prefix2exponent, @function
prefix2exponent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	prefix_table(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+prefix_table(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$19, -4(%rbp)
	jle	.L5
	movl	$0, %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prefix2exponent, .-prefix2exponent
	.section	.rodata
.LC0:
	.string	"%c.%s * 10^%d %s"
.LC1:
	.string	"%c * 10^%d %s"
.LC2:
	.string	"%c."
.LC3:
	.string	" * 10^%d %s"
	.text
	.globl	output
	.type	output, @function
output:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L7
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$2, -24(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L8
.L9:
	addl	$1, -32(%rbp)
	addq	$1, -24(%rbp)
.L8:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L9
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L10
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rsi
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movq	%rcx, %r8
	movl	%edx, %ecx
	movq	%rsi, %rdx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L10:
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L12
.L16:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L13
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	cmpl	$0, -28(%rbp)
	jne	.L15
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L15:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L14:
	addl	$1, -28(%rbp)
.L12:
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L16
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	output, .-output
	.section	.rodata
.LC4:
	.string	"%d "
.LC5:
	.string	" "
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L19
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$1061, %esi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	prefix2exponent
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L20
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	unit(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-12(%rbp), %eax
	leaq	unit(%rip), %rdx
	movl	%eax, %esi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	output
	addl	$1, -16(%rbp)
.L19:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L21
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 1061
buf:
	.zero	1061
	.globl	num
	.align 32
	.type	num, @object
	.size	num, 1001
num:
	.zero	1001
	.globl	unit
	.align 32
	.type	unit, @object
	.size	unit, 60
unit:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	sig_dig
	.align 4
	.type	sig_dig, @object
	.size	sig_dig, 4
sig_dig:
	.zero	4
	.globl	point_pos
	.align 4
	.type	point_pos, @object
	.size	point_pos, 4
point_pos:
	.zero	4
	.globl	prefix_table
	.data
	.align 32
	.type	prefix_table, @object
	.size	prefix_table, 240
prefix_table:
	.string	"yotta"
	.zero	1
	.zero	1
	.long	24
	.string	"zetta"
	.zero	1
	.zero	1
	.long	21
	.string	"exa"
	.zero	3
	.zero	1
	.long	18
	.string	"peta"
	.zero	2
	.zero	1
	.long	15
	.string	"tera"
	.zero	2
	.zero	1
	.long	12
	.string	"giga"
	.zero	2
	.zero	1
	.long	9
	.string	"mega"
	.zero	2
	.zero	1
	.long	6
	.string	"kilo"
	.zero	2
	.zero	1
	.long	3
	.string	"hecto"
	.zero	1
	.zero	1
	.long	2
	.string	"deca"
	.zero	2
	.zero	1
	.long	1
	.string	"deci"
	.zero	2
	.zero	1
	.long	-1
	.string	"centi"
	.zero	1
	.zero	1
	.long	-2
	.string	"milli"
	.zero	1
	.zero	1
	.long	-3
	.string	"micro"
	.zero	1
	.zero	1
	.long	-6
	.string	"nano"
	.zero	2
	.zero	1
	.long	-9
	.string	"pico"
	.zero	2
	.zero	1
	.long	-12
	.string	"femto"
	.zero	1
	.zero	1
	.long	-15
	.string	"ato"
	.zero	3
	.zero	1
	.long	-18
	.string	"zepto"
	.zero	1
	.zero	1
	.long	-21
	.string	"yocto"
	.zero	1
	.zero	1
	.long	-24
	.text
	.globl	prefix2exponent
	.type	prefix2exponent, @function
prefix2exponent:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	prefix_table(%rip), %rdx
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+prefix_table(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L4
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$19, -4(%rbp)
	jle	.L5
	movl	$0, %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	prefix2exponent, .-prefix2exponent
	.section	.rodata
.LC0:
	.string	"%c.%s * 10^%d %s"
.LC1:
	.string	"%c * 10^%d %s"
.LC2:
	.string	"%c."
.LC3:
	.string	" * 10^%d %s"
	.text
	.globl	output
	.type	output, @function
output:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -40(%rbp)
	movl	%esi, -44(%rbp)
	movq	%rdx, -56(%rbp)
	movq	-40(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	jne	.L7
	movq	-40(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$2, -24(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L8
.L9:
	addl	$1, -32(%rbp)
	addq	$1, -24(%rbp)
.L8:
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$48, %al
	je	.L9
	movq	-24(%rbp), %rax
	addq	$1, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	je	.L10
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rsi
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movq	%rcx, %r8
	movl	%edx, %ecx
	movq	%rsi, %rdx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L10:
	movl	-44(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	movq	-24(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movq	-56(%rbp), %rcx
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L17
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -32(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L12
.L16:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L13
	movl	-28(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	cmpl	$0, -28(%rbp)
	jne	.L15
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L15:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
.L14:
	addl	$1, -28(%rbp)
.L12:
	movl	-28(%rbp), %eax
	movslq	%eax, %rbx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L16
	movl	-44(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	leal	-1(%rax), %ecx
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	nop
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	output, .-output
	.section	.rodata
.LC4:
	.string	"%d "
.LC5:
	.string	" "
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L19
.L21:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$1061, %esi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	prefix2exponent
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L20
	leaq	.LC5(%rip), %rax
	movq	%rax, %rsi
	movl	$0, %edi
	call	strtok@PLT
	movq	%rax, -8(%rbp)
.L20:
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	unit(%rip), %rax
	movq	%rax, %rdi
	call	strcpy@PLT
	movl	-12(%rbp), %eax
	leaq	unit(%rip), %rdx
	movl	%eax, %esi
	leaq	num(%rip), %rax
	movq	%rax, %rdi
	call	output
	addl	$1, -16(%rbp)
.L19:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L21
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
