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

```c
#include <stdio.h>
#include <math.h>

#define sq(x) ((x) * (x))
int color[8][3] ={ {0,0,0},
		   {0,0,255},
		   {0,255,0},
		   {0,255,255},
		   {255,0,0},
		   {255,0,255},
		   {255,255,0},
		   {255,255,255} };

int convert(char a, char b){
  int x, y;
  if(a >= 'a' && a <= 'f') x = (a - 'a' + 10) * 16;
  else x = (a - '0') * 16;
  if(b >= 'a' && a <= 'f') y = b - 'a' + 10;
  else y = b - '0';
  return x + y;
}

int main(){
  int n, i, j, c[3], dmin, dk;
  char rgb[16], s;

  while(scanf("%c", &s) && s != '0'){
    scanf("%s", rgb);
    getchar();
    c[0] = c[1] = c[2] = 0;
    for(i = 0, j = 0; i < 6; i += 2, j++)
      c[j] = convert(rgb[i], rgb[i + 1]);
    
    dmin = -1;
    int res;
    for(i = 0; i < 8; ++i){
      dk = sq(c[0] - color[i][0]) + sq(c[1] - color[i][1]) + sq(c[2] - color[i][2]);
      if(dmin > dk || dmin == -1){
	dmin = dk;
	res = i;
      }
    }

    switch(res){
    case 0: puts("black"); break;
    case 1: puts("blue"); break;
    case 2: puts("lime"); break;
    case 3: puts("aqua"); break;
    case 4: puts("red"); break;
    case 5: puts("fuchsia"); break;
    case 6: puts("yellow"); break;
    case 7: puts("white"); break;
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	color
	.data
	.align 32
	.type	color, @object
	.size	color, 96
color:
	.long	0
	.long	0
	.long	0
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	0
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.text
	.globl	convert
	.type	convert, @function
convert:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %edx
	movl	%esi, %eax
	movb	%dl, -20(%rbp)
	movb	%al, -24(%rbp)
	cmpb	$96, -20(%rbp)
	jle	.L2
	cmpb	$102, -20(%rbp)
	jg	.L2
	movsbl	-20(%rbp), %eax
	subl	$87, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L2:
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
.L3:
	cmpb	$96, -24(%rbp)
	jle	.L4
	cmpb	$102, -20(%rbp)
	jg	.L4
	movsbl	-24(%rbp), %eax
	subl	$87, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L4:
	movsbl	-24(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L5:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	convert, .-convert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"black"
.LC2:
	.string	"blue"
.LC3:
	.string	"lime"
.LC4:
	.string	"aqua"
.LC5:
	.string	"red"
.LC6:
	.string	"fuchsia"
.LC7:
	.string	"yellow"
.LC8:
	.string	"white"
.LC9:
	.string	"%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	nop
	jmp	.L15
.L26:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	movl	$0, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-64(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %edx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	convert
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -44(%rbp,%rdx,4)
	addl	$2, -64(%rbp)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$5, -64(%rbp)
	jle	.L10
	movl	$-1, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L11
.L14:
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%eax, %edi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -48(%rbp)
	movl	-56(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jg	.L12
	cmpl	$-1, -56(%rbp)
	jne	.L13
.L12:
	movl	-48(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -52(%rbp)
.L13:
	addl	$1, -64(%rbp)
.L11:
	cmpl	$7, -64(%rbp)
	jle	.L14
	cmpl	$7, -52(%rbp)
	ja	.L15
	movl	-52(%rbp), %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L17(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L17(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L17:
	.long	.L24-.L17
	.long	.L23-.L17
	.long	.L22-.L17
	.long	.L21-.L17
	.long	.L20-.L17
	.long	.L19-.L17
	.long	.L18-.L17
	.long	.L16-.L17
	.text
.L24:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L23:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L22:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L21:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L19:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L16:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L15:
	leaq	-65(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L25
	movzbl	-65(%rbp), %eax
	cmpb	$48, %al
	jne	.L26
.L25:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	convert
	.type	convert, @function
convert:
.LFB23:
	.cfi_startproc
	endbr64
	leal	-97(%rdi), %eax
	cmpb	$5, %al
	ja	.L2
	leal	-87(%rdi), %eax
	movsbl	%al, %eax
	sall	$4, %eax
.L3:
	cmpb	$96, %sil
	jle	.L4
	cmpb	$102, %dil
	jg	.L4
	subl	$87, %esi
	movsbl	%sil, %esi
	addl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	%sil, %esi
	subl	$48, %esi
	addl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movsbl	%dil, %eax
	subl	$48, %eax
	sall	$4, %eax
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	convert, .-convert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"white"
.LC2:
	.string	"black"
.LC3:
	.string	"blue"
.LC4:
	.string	"lime"
.LC5:
	.string	"aqua"
.LC6:
	.string	"red"
.LC7:
	.string	"fuchsia"
.LC8:
	.string	"yellow"
.LC9:
	.string	"%c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC8(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC9(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	15(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L45
	cmpb	$48, 15(%rsp)
	je	.L45
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movsbl	16(%rsp), %eax
	movsbl	17(%rsp), %esi
	leal	-97(%rax), %edi
	movl	%esi, %ecx
	movl	%eax, %edx
	cmpb	$5, %dil
	jbe	.L15
	subl	$48, %eax
	sall	$4, %eax
.L16:
	cmpb	$96, %cl
	jle	.L51
	cmpb	$102, %dl
	leal	-87(%rsi), %edx
	setle	%cl
	testb	%cl, %cl
	je	.L51
.L19:
	movsbl	18(%rsp), %r8d
	movsbl	19(%rsp), %esi
	addl	%edx, %eax
	leal	-97(%r8), %edi
	movl	%esi, %ecx
	movl	%r8d, %edx
	cmpb	$5, %dil
	jbe	.L20
	subl	$48, %r8d
	sall	$4, %r8d
.L21:
	cmpb	$96, %cl
	jle	.L52
	cmpb	$102, %dl
	leal	-87(%rsi), %edx
	setle	%cl
	testb	%cl, %cl
	je	.L52
.L24:
	addl	%edx, %r8d
	movsbl	20(%rsp), %edx
	movsbl	21(%rsp), %edi
	leal	-97(%rdx), %r9d
	movl	%edi, %esi
	movl	%edx, %ecx
	cmpb	$5, %r9b
	jbe	.L25
	subl	$48, %edx
	sall	$4, %edx
.L26:
	cmpb	$96, %sil
	jle	.L53
	cmpb	$102, %cl
	leal	-87(%rdi), %ecx
	setle	%sil
	testb	%sil, %sil
	je	.L53
.L29:
	addl	%ecx, %edx
	movl	%r8d, %edi
	movl	%eax, %ecx
	subl	4+color(%rip), %edi
	subl	color(%rip), %ecx
	imull	%edi, %edi
	movl	%edx, %esi
	movl	%r8d, %r9d
	imull	%ecx, %ecx
	subl	8+color(%rip), %esi
	subl	16+color(%rip), %r9d
	imull	%esi, %esi
	imull	%r9d, %r9d
	addl	%edi, %ecx
	movl	%edx, %edi
	subl	20+color(%rip), %edi
	addl	%esi, %ecx
	imull	%edi, %edi
	movl	%eax, %esi
	subl	12+color(%rip), %esi
	imull	%esi, %esi
	addl	%r9d, %esi
	addl	%edi, %esi
	xorl	%edi, %edi
	cmpl	%esi, %ecx
	jle	.L30
	movl	%esi, %ecx
	movl	$1, %edi
.L30:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	24+color(%rip), %esi
	movl	%edx, %r9d
	subl	28+color(%rip), %r10d
	imull	%esi, %esi
	subl	32+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L31
	movl	%esi, %ecx
	movl	$2, %edi
.L31:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	36+color(%rip), %esi
	movl	%edx, %r9d
	subl	40+color(%rip), %r10d
	imull	%esi, %esi
	subl	44+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L32
	movl	%esi, %ecx
	movl	$3, %edi
.L32:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	48+color(%rip), %esi
	movl	%edx, %r9d
	subl	52+color(%rip), %r10d
	imull	%esi, %esi
	subl	56+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L33
	movl	%esi, %ecx
	movl	$4, %edi
.L33:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	60+color(%rip), %esi
	movl	%edx, %r9d
	subl	64+color(%rip), %r10d
	imull	%esi, %esi
	subl	68+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L34
	movl	%esi, %ecx
	movl	$5, %edi
.L34:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	72+color(%rip), %esi
	movl	%edx, %r9d
	subl	76+color(%rip), %r10d
	imull	%esi, %esi
	subl	80+color(%rip), %r9d
	imull	%r10d, %r10d
	subl	84+color(%rip), %eax
	subl	92+color(%rip), %edx
	subl	88+color(%rip), %r8d
	imull	%r9d, %r9d
	imull	%eax, %eax
	imull	%r8d, %r8d
	addl	%r10d, %esi
	imull	%edx, %edx
	addl	%r9d, %esi
	addl	%r8d, %eax
	addl	%edx, %eax
	cmpl	%esi, %ecx
	jg	.L35
	cmpl	%eax, %ecx
	jg	.L47
	cmpl	$5, %edi
	ja	.L38
	leaq	.L40(%rip), %rdx
	movslq	(%rdx,%rdi,4), %rax
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L40:
	.long	.L38-.L40
	.long	.L44-.L40
	.long	.L43-.L40
	.long	.L42-.L40
	.long	.L41-.L40
	.long	.L39-.L40
	.section	.text.startup
.L39:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L41:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L42:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L43:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L44:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L35:
	cmpl	%eax, %esi
	jle	.L69
.L47:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L14
.L69:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L53:
	leal	-48(%rdi), %ecx
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L25:
	subl	$87, %edx
	sall	$4, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L52:
	leal	-48(%rsi), %edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L20:
	subl	$87, %r8d
	sall	$4, %r8d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	leal	-48(%rsi), %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	subl	$87, %eax
	sall	$4, %eax
	jmp	.L16
.L38:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L14
.L45:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	addq	$56, %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
.L70:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	color
	.data
	.align 32
	.type	color, @object
	.size	color, 96
color:
	.long	0
	.long	0
	.long	0
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	0
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.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	convert
	.type	convert, @function
convert:
.LFB23:
	.cfi_startproc
	endbr64
	leal	-97(%rdi), %eax
	cmpb	$5, %al
	ja	.L2
	leal	-87(%rdi), %eax
	movsbl	%al, %eax
	sall	$4, %eax
.L3:
	cmpb	$96, %sil
	jle	.L4
	cmpb	$102, %dil
	jg	.L4
	subl	$87, %esi
	movsbl	%sil, %esi
	addl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	%sil, %esi
	subl	$48, %esi
	addl	%esi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movsbl	%dil, %eax
	subl	$48, %eax
	sall	$4, %eax
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	convert, .-convert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"white"
.LC2:
	.string	"black"
.LC3:
	.string	"blue"
.LC4:
	.string	"lime"
.LC5:
	.string	"aqua"
.LC6:
	.string	"red"
.LC7:
	.string	"fuchsia"
.LC8:
	.string	"yellow"
.LC9:
	.string	"%c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC8(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC2(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC9(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	15(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L45
	cmpb	$48, 15(%rsp)
	je	.L45
	leaq	16(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movsbl	16(%rsp), %eax
	movsbl	17(%rsp), %esi
	leal	-97(%rax), %edi
	movl	%esi, %ecx
	movl	%eax, %edx
	cmpb	$5, %dil
	jbe	.L15
	subl	$48, %eax
	sall	$4, %eax
.L16:
	cmpb	$96, %cl
	jle	.L51
	cmpb	$102, %dl
	leal	-87(%rsi), %edx
	setle	%cl
	testb	%cl, %cl
	je	.L51
.L19:
	movsbl	18(%rsp), %r8d
	movsbl	19(%rsp), %esi
	addl	%edx, %eax
	leal	-97(%r8), %edi
	movl	%esi, %ecx
	movl	%r8d, %edx
	cmpb	$5, %dil
	jbe	.L20
	subl	$48, %r8d
	sall	$4, %r8d
.L21:
	cmpb	$96, %cl
	jle	.L52
	cmpb	$102, %dl
	leal	-87(%rsi), %edx
	setle	%cl
	testb	%cl, %cl
	je	.L52
.L24:
	addl	%edx, %r8d
	movsbl	20(%rsp), %edx
	movsbl	21(%rsp), %edi
	leal	-97(%rdx), %r9d
	movl	%edi, %esi
	movl	%edx, %ecx
	cmpb	$5, %r9b
	jbe	.L25
	subl	$48, %edx
	sall	$4, %edx
.L26:
	cmpb	$96, %sil
	jle	.L53
	cmpb	$102, %cl
	leal	-87(%rdi), %ecx
	setle	%sil
	testb	%sil, %sil
	je	.L53
.L29:
	addl	%ecx, %edx
	movl	%r8d, %edi
	movl	%eax, %ecx
	subl	4+color(%rip), %edi
	subl	color(%rip), %ecx
	imull	%edi, %edi
	movl	%edx, %esi
	movl	%r8d, %r9d
	imull	%ecx, %ecx
	subl	8+color(%rip), %esi
	subl	16+color(%rip), %r9d
	imull	%esi, %esi
	imull	%r9d, %r9d
	addl	%edi, %ecx
	movl	%edx, %edi
	subl	20+color(%rip), %edi
	addl	%esi, %ecx
	imull	%edi, %edi
	movl	%eax, %esi
	subl	12+color(%rip), %esi
	imull	%esi, %esi
	addl	%r9d, %esi
	addl	%edi, %esi
	xorl	%edi, %edi
	cmpl	%esi, %ecx
	jle	.L30
	movl	%esi, %ecx
	movl	$1, %edi
.L30:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	24+color(%rip), %esi
	movl	%edx, %r9d
	subl	28+color(%rip), %r10d
	imull	%esi, %esi
	subl	32+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L31
	movl	%esi, %ecx
	movl	$2, %edi
.L31:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	36+color(%rip), %esi
	movl	%edx, %r9d
	subl	40+color(%rip), %r10d
	imull	%esi, %esi
	subl	44+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L32
	movl	%esi, %ecx
	movl	$3, %edi
.L32:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	48+color(%rip), %esi
	movl	%edx, %r9d
	subl	52+color(%rip), %r10d
	imull	%esi, %esi
	subl	56+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L33
	movl	%esi, %ecx
	movl	$4, %edi
.L33:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	60+color(%rip), %esi
	movl	%edx, %r9d
	subl	64+color(%rip), %r10d
	imull	%esi, %esi
	subl	68+color(%rip), %r9d
	imull	%r10d, %r10d
	imull	%r9d, %r9d
	addl	%r10d, %esi
	addl	%r9d, %esi
	cmpl	%esi, %ecx
	jle	.L34
	movl	%esi, %ecx
	movl	$5, %edi
.L34:
	movl	%eax, %esi
	movl	%r8d, %r10d
	subl	72+color(%rip), %esi
	movl	%edx, %r9d
	subl	76+color(%rip), %r10d
	imull	%esi, %esi
	subl	80+color(%rip), %r9d
	imull	%r10d, %r10d
	subl	84+color(%rip), %eax
	subl	92+color(%rip), %edx
	subl	88+color(%rip), %r8d
	imull	%r9d, %r9d
	imull	%eax, %eax
	imull	%r8d, %r8d
	addl	%r10d, %esi
	imull	%edx, %edx
	addl	%r9d, %esi
	addl	%r8d, %eax
	addl	%edx, %eax
	cmpl	%esi, %ecx
	jg	.L35
	cmpl	%eax, %ecx
	jg	.L47
	cmpl	$5, %edi
	ja	.L38
	leaq	.L40(%rip), %rdx
	movslq	(%rdx,%rdi,4), %rax
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L40:
	.long	.L38-.L40
	.long	.L44-.L40
	.long	.L43-.L40
	.long	.L42-.L40
	.long	.L41-.L40
	.long	.L39-.L40
	.section	.text.startup
.L39:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L41:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L42:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L43:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L44:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L35:
	cmpl	%eax, %esi
	jle	.L69
.L47:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L14
.L69:
	movq	%r15, %rdi
	call	puts@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L53:
	leal	-48(%rdi), %ecx
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L25:
	subl	$87, %edx
	sall	$4, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L52:
	leal	-48(%rsi), %edx
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L20:
	subl	$87, %r8d
	sall	$4, %r8d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L51:
	leal	-48(%rsi), %edx
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	subl	$87, %eax
	sall	$4, %eax
	jmp	.L16
.L38:
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L14
.L45:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	addq	$56, %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
.L70:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	color
	.data
	.align 32
	.type	color, @object
	.size	color, 96
color:
	.long	0
	.long	0
	.long	0
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	0
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.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:

#include <stdio.h>
#include <math.h>

#define sq(x) ((x) * (x))
int color[8][3] ={ {0,0,0},
		   {0,0,255},
		   {0,255,0},
		   {0,255,255},
		   {255,0,0},
		   {255,0,255},
		   {255,255,0},
		   {255,255,255} };

int convert(char a, char b){
  int x, y;
  if(a >= 'a' && a <= 'f') x = (a - 'a' + 10) * 16;
  else x = (a - '0') * 16;
  if(b >= 'a' && a <= 'f') y = b - 'a' + 10;
  else y = b - '0';
  return x + y;
}

int main(){
  int n, i, j, c[3], dmin, dk;
  char rgb[16], s;

  while(scanf("%c", &s) && s != '0'){
    scanf("%s", rgb);
    getchar();
    c[0] = c[1] = c[2] = 0;
    for(i = 0, j = 0; i < 6; i += 2, j++)
      c[j] = convert(rgb[i], rgb[i + 1]);
    
    dmin = -1;
    int res;
    for(i = 0; i < 8; ++i){
      dk = sq(c[0] - color[i][0]) + sq(c[1] - color[i][1]) + sq(c[2] - color[i][2]);
      if(dmin > dk || dmin == -1){
	dmin = dk;
	res = i;
      }
    }

    switch(res){
    case 0: puts("black"); break;
    case 1: puts("blue"); break;
    case 2: puts("lime"); break;
    case 3: puts("aqua"); break;
    case 4: puts("red"); break;
    case 5: puts("fuchsia"); break;
    case 6: puts("yellow"); break;
    case 7: puts("white"); break;
    }
  }
  return 0;
}
ffe085
787878
dfcade
ff55ff
0
 #ffe085
#787878
"decade
#ff55ff
0
 8fe0f5
976991
debade
ff55ff
0
 8fe0f5
1006397
debade
ff55ff
0
 #ffe075
#787878
#decade
#ff55ff
0
 ffe085
1502551
dfcaed
ff55ff
0
 ff80e5
787878
dfcade
ff5f5f
0
 8fe0f5
1830286
bedade
ff55ff
0
 ffe085
935354
dfaced
f5f5ff
0
 580eff
310329
debade
gf55ff
0

red
yellow
white
fuchsia
 white
black
white
fuchsia
 red
lime
white
fuchsia
 red
blue
white
fuchsia
 yellow
black
white
fuchsia
 red
black
white
fuchsia
 red
yellow
white
white
 red
fuchsia
white
fuchsia
 red
black
white
blue
 white
black
white
fuchsia

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

```c
#include <stdio.h>
#include <math.h>

#define sq(x) ((x) * (x))
int color[8][3] ={ {0,0,0},
		   {0,0,255},
		   {0,255,0},
		   {0,255,255},
		   {255,0,0},
		   {255,0,255},
		   {255,255,0},
		   {255,255,255} };

int convert(char a, char b){
  int x, y;
  if(a >= 'a' && a <= 'f') x = (a - 'a' + 10) * 16;
  else x = (a - '0') * 16;
  if(b >= 'a' && a <= 'f') y = b - 'a' + 10;
  else y = b - '0';
  return x + y;
}

int main(){
  int n, i, j, c[3], dmin, dk;
  char rgb[16], s;

  while(scanf("%c", &s) && s != '0'){
    scanf("%s", rgb);
    getchar();
    c[0] = c[1] = c[2] = 0;
    for(i = 0, j = 0; i < 6; i += 2, j++)
      c[j] = convert(rgb[i], rgb[i + 1]);
    
    dmin = -1;
    int res;
    for(i = 0; i < 8; ++i){
      dk = sq(c[0] - color[i][0]) + sq(c[1] - color[i][1]) + sq(c[2] - color[i][2]);
      if(dmin > dk || dmin == -1){
	dmin = dk;
	res = i;
      }
    }

    switch(res){
    case 0: puts("black"); break;
    case 1: puts("blue"); break;
    case 2: puts("lime"); break;
    case 3: puts("aqua"); break;
    case 4: puts("red"); break;
    case 5: puts("fuchsia"); break;
    case 6: puts("yellow"); break;
    case 7: puts("white"); break;
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	color
	.data
	.align 32
	.type	color, @object
	.size	color, 96
color:
	.long	0
	.long	0
	.long	0
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	0
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.text
	.globl	convert
	.type	convert, @function
convert:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %edx
	movl	%esi, %eax
	movb	%dl, -20(%rbp)
	movb	%al, -24(%rbp)
	cmpb	$96, -20(%rbp)
	jle	.L2
	cmpb	$102, -20(%rbp)
	jg	.L2
	movsbl	-20(%rbp), %eax
	subl	$87, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L2:
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
.L3:
	cmpb	$96, -24(%rbp)
	jle	.L4
	cmpb	$102, -20(%rbp)
	jg	.L4
	movsbl	-24(%rbp), %eax
	subl	$87, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L4:
	movsbl	-24(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L5:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	convert, .-convert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"black"
.LC2:
	.string	"blue"
.LC3:
	.string	"lime"
.LC4:
	.string	"aqua"
.LC5:
	.string	"red"
.LC6:
	.string	"fuchsia"
.LC7:
	.string	"yellow"
.LC8:
	.string	"white"
.LC9:
	.string	"%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	nop
	jmp	.L15
.L26:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	movl	$0, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-64(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %edx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	convert
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -44(%rbp,%rdx,4)
	addl	$2, -64(%rbp)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$5, -64(%rbp)
	jle	.L10
	movl	$-1, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L11
.L14:
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%eax, %edi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -48(%rbp)
	movl	-56(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jg	.L12
	cmpl	$-1, -56(%rbp)
	jne	.L13
.L12:
	movl	-48(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -52(%rbp)
.L13:
	addl	$1, -64(%rbp)
.L11:
	cmpl	$7, -64(%rbp)
	jle	.L14
	cmpl	$7, -52(%rbp)
	ja	.L15
	movl	-52(%rbp), %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L17(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L17(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L17:
	.long	.L24-.L17
	.long	.L23-.L17
	.long	.L22-.L17
	.long	.L21-.L17
	.long	.L20-.L17
	.long	.L19-.L17
	.long	.L18-.L17
	.long	.L16-.L17
	.text
.L24:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L23:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L22:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L21:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L19:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L16:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L15:
	leaq	-65(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L25
	movzbl	-65(%rbp), %eax
	cmpb	$48, %al
	jne	.L26
.L25:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	color
	.data
	.align 32
	.type	color, @object
	.size	color, 96
color:
	.long	0
	.long	0
	.long	0
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	0
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	0
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.long	0
	.long	255
	.long	255
	.long	255
	.text
	.globl	convert
	.type	convert, @function
convert:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %edx
	movl	%esi, %eax
	movb	%dl, -20(%rbp)
	movb	%al, -24(%rbp)
	cmpb	$96, -20(%rbp)
	jle	.L2
	cmpb	$102, -20(%rbp)
	jg	.L2
	movsbl	-20(%rbp), %eax
	subl	$87, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L2:
	movsbl	-20(%rbp), %eax
	subl	$48, %eax
	sall	$4, %eax
	movl	%eax, -8(%rbp)
.L3:
	cmpb	$96, -24(%rbp)
	jle	.L4
	cmpb	$102, -20(%rbp)
	jg	.L4
	movsbl	-24(%rbp), %eax
	subl	$87, %eax
	movl	%eax, -4(%rbp)
	jmp	.L5
.L4:
	movsbl	-24(%rbp), %eax
	subl	$48, %eax
	movl	%eax, -4(%rbp)
.L5:
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	convert, .-convert
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"black"
.LC2:
	.string	"blue"
.LC3:
	.string	"lime"
.LC4:
	.string	"aqua"
.LC5:
	.string	"red"
.LC6:
	.string	"fuchsia"
.LC7:
	.string	"yellow"
.LC8:
	.string	"white"
.LC9:
	.string	"%c"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	nop
	jmp	.L15
.L26:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	movl	$0, -36(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-64(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %edx
	movl	-64(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	convert
	movl	-60(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -44(%rbp,%rdx,4)
	addl	$2, -64(%rbp)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$5, -64(%rbp)
	jle	.L10
	movl	$-1, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L11
.L14:
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	movl	-44(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-40(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%eax, %edi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %esi
	movl	-36(%rbp), %ecx
	movl	-64(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+color(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -48(%rbp)
	movl	-56(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jg	.L12
	cmpl	$-1, -56(%rbp)
	jne	.L13
.L12:
	movl	-48(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -52(%rbp)
.L13:
	addl	$1, -64(%rbp)
.L11:
	cmpl	$7, -64(%rbp)
	jle	.L14
	cmpl	$7, -52(%rbp)
	ja	.L15
	movl	-52(%rbp), %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L17(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L17(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L17:
	.long	.L24-.L17
	.long	.L23-.L17
	.long	.L22-.L17
	.long	.L21-.L17
	.long	.L20-.L17
	.long	.L19-.L17
	.long	.L18-.L17
	.long	.L16-.L17
	.text
.L24:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L23:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L22:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L21:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L19:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L18:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L15
.L16:
	leaq	.LC8(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
.L15:
	leaq	-65(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC9(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L25
	movzbl	-65(%rbp), %eax
	cmpb	$48, %al
	jne	.L26
.L25:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
