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>
int main(){
  int n,i,j,k,l,ny,nx;
  char s,e,f;
  double p=1;
  int X[]={0,1,0,-1};
  int Y[]={1,0,-1,0};
  while(scanf("%d",&n),n){
    int c[3][3]={0};
    scanf(" %c %c %c",&s,&e,&f);
    c[(s-'A')/3][(s-'A')%3]=p=1;
    while(n--){
      p*=4;
      int d[3][3]={0};
      for(i=0;i<3;i++){
	for(j=0;j<3;j++){
	  for(k=0;k<4;k++){
	    ny=i+Y[k];
	    nx=j+X[k];
	    if((f-'A')/3==ny&&(f-'A')%3==nx||nx<0||nx==3||ny<0||ny==3){
	     nx-=X[k];
	     ny-=Y[k];
	    }
	    d[ny][nx]+=c[i][j];
	  }
	}
     }
     for(i=0;i<9;i++)c[i/3][i%3]=d[i/3][i%3];
     //for(i=0;i<9;i++)printf("%d ",d[i/3][i%3]);printf("\n");
    }
    printf("%f\n",c[(e-'A')/3][(e-'A')%3]/p);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	" %c %c %c"
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movl	$0, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$0, -108(%rbp)
	movl	$-1, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L2
.L16:
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$0, -64(%rbp)
	leaq	-161(%rbp), %rcx
	leaq	-162(%rbp), %rdx
	leaq	-163(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -96(%rbp,%rax,4)
	jmp	.L3
.L15:
	movsd	-136(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -136(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L4
.L12:
	movl	$0, -152(%rbp)
	jmp	.L5
.L11:
	movl	$0, -148(%rbp)
	jmp	.L6
.L10:
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-156(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -140(%rbp)
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -144(%rbp)
	jne	.L7
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -140(%rbp)
	je	.L8
.L7:
	cmpl	$0, -140(%rbp)
	js	.L8
	cmpl	$3, -140(%rbp)
	je	.L8
	cmpl	$0, -144(%rbp)
	js	.L8
	cmpl	$3, -144(%rbp)
	jne	.L9
.L8:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, -140(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	subl	%eax, -144(%rbp)
.L9:
	movl	-140(%rbp), %eax
	movslq	%eax, %rcx
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-48(%rbp,%rax,4), %ecx
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -48(%rbp,%rax,4)
	addl	$1, -148(%rbp)
.L6:
	cmpl	$3, -148(%rbp)
	jle	.L10
	addl	$1, -152(%rbp)
.L5:
	cmpl	$2, -152(%rbp)
	jle	.L11
	addl	$1, -156(%rbp)
.L4:
	cmpl	$2, -156(%rbp)
	jle	.L12
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %r8d
	subl	%eax, %r8d
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, %ecx
	addl	%ecx, %ecx
	addl	%edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-156(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1431655766, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$31, %eax
	movl	%ecx, %edi
	subl	%eax, %edi
	movl	-156(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %esi
	addl	%esi, %esi
	addl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	movslq	%edx, %rsi
	movslq	%r8d, %rcx
	movq	%rcx, %rdx
	addq	%rdx, %rdx
	addq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	movslq	%eax, %rsi
	movslq	%edi, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L13:
	cmpl	$8, -156(%rbp)
	jle	.L14
.L3:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	testl	%eax, %eax
	jne	.L15
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	divsd	-136(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L2:
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1074790400
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	" %c %c %c"
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L87
	pxor	%xmm0, %xmm0
	leaq	27(%rsp), %rcx
	leaq	26(%rsp), %rdx
	xorl	%eax, %eax
	leaq	25(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movaps	%xmm0, 32(%rsp)
	movl	$0, 64(%rsp)
	movaps	%xmm0, 48(%rsp)
	call	__isoc99_scanf@PLT
	movsbl	25(%rsp), %edx
	subl	$65, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	cltq
	subl	%ecx, %edx
	leaq	(%rax,%rax,2), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 32(%rsp,%rax,4)
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	testl	%eax, %eax
	movq	.LC2(%rip), %rax
	movl	%edx, 28(%rsp)
	movq	%rax, %xmm2
	je	.L56
	movsbl	27(%rsp), %ebx
	movl	32(%rsp), %r11d
	leaq	32(%rsp), %r14
	leaq	80(%rsp), %r13
	movl	36(%rsp), %r9d
	movl	40(%rsp), %r10d
	subl	$65, %ebx
	movsd	.LC0(%rip), %xmm1
	movslq	%ebx, %rdx
	movl	%ebx, %eax
	imulq	$1431655766, %rdx, %rdx
	sarl	$31, %eax
	shrq	$32, %rdx
	subl	%eax, %edx
	leal	(%rdx,%rdx,2), %eax
	subl	%eax, %ebx
	movslq	%edx, %rax
	leaq	(%rax,%rax,2), %rax
	leaq	128(%rsp,%rax,4), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L36:
	xorl	%esi, %esi
	pxor	%xmm0, %xmm0
	movq	%r14, %r8
	movq	%r13, %rax
	leal	1(%rsi), %ecx
	mulsd	%xmm2, %xmm1
	movaps	%xmm0, 80(%rsp)
	leal	-1(%rdx), %r12d
	movl	$0, 112(%rsp)
	movl	$2, %ebp
	movaps	%xmm0, 96(%rsp)
	cmpl	%edx, %ecx
	je	.L4
.L7:
	cmpl	$3, %ecx
	movl	%ebp, %edi
	movl	(%r8), %r15d
	cmovne	%ecx, %edi
	movslq	%edi, %rdi
	leaq	(%rdi,%rdi,2), %rdi
	addl	%r15d, 80(%rsp,%rdi,4)
	cmpl	%esi, %edx
	je	.L88
.L8:
	leal	-1(%rsi), %edi
	addl	%r11d, 4(%rax)
	cmpl	%edx, %edi
	je	.L89
.L12:
	cmpl	$-1, %edi
	movl	%esi, %r15d
	cmovne	%edi, %r15d
	movslq	%r15d, %r15
	leaq	(%r15,%r15,2), %r15
	addl	%r11d, 80(%rsp,%r15,4)
	addl	%r11d, (%rax)
	cmpl	%edx, %ecx
	je	.L90
.L16:
	cmpl	$3, %ecx
	movl	%ebp, %r11d
	movl	4(%r8), %r15d
	cmovne	%ecx, %r11d
	movslq	%r11d, %r11
	leaq	(%r11,%r11,2), %r11
	addl	%r15d, 84(%rsp,%r11,4)
	cmpl	%esi, %edx
	je	.L91
.L17:
	addl	%r9d, 8(%rax)
	cmpl	%edi, %edx
	je	.L92
.L21:
	cmpl	$-1, %edi
	movl	%esi, %r11d
	cmovne	%edi, %r11d
.L19:
	movslq	%r11d, %r11
	leaq	(%r11,%r11,2), %r11
	addl	%r9d, 84(%rsp,%r11,4)
	cmpl	%esi, %edx
	je	.L93
.L22:
	addl	%r9d, (%rax)
	cmpl	%edx, %ecx
	je	.L94
.L27:
	cmpl	$3, %ecx
	jne	.L25
	addl	%r10d, 112(%rsp)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edi, %edx
	je	.L42
	movslq	%edi, %r15
	movslq	%esi, %r11
	leaq	(%r15,%r15,2), %rdi
	movl	88(%rsp,%rdi,4), %r9d
.L29:
	leaq	(%r15,%r15,2), %rdi
	addl	%r10d, %r9d
	movl	%r9d, 88(%rsp,%rdi,4)
	cmpl	%esi, %edx
	je	.L95
.L33:
	movl	$1, %edi
.L38:
	leaq	(%r11,%r11,2), %rsi
	addq	$12, %r8
	addq	$12, %rax
	addq	%rdi, %rsi
	addl	%r10d, 80(%rsp,%rsi,4)
	cmpl	$3, %ecx
	je	.L34
.L52:
	movslq	%ecx, %rsi
	movl	8(%r8), %r10d
	movl	(%r8), %r11d
	leal	1(%rsi), %ecx
	movl	4(%r8), %r9d
	cmpl	%edx, %ecx
	jne	.L7
.L4:
	testl	%ebx, %ebx
	jne	.L7
	movl	(%r8), %edi
	addl	%edi, (%rax)
	leal	-1(%rsi), %edi
	addl	%r11d, 4(%rax)
	cmpl	%edi, %edx
	jne	.L12
	addl	%r11d, %r11d
	movl	%edx, %edi
	addl	%r11d, (%rax)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%ecx, %r9
	leaq	(%r9,%r9,2), %r9
	addl	%r10d, 88(%rsp,%r9,4)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edx, %edi
	je	.L28
.L85:
	movslq	%esi, %r11
.L32:
	movslq	%esi, %r15
	cmpl	$-1, %edi
	je	.L29
	movslq	%edi, %r15
	leaq	(%r15,%r15,2), %rdi
	movl	88(%rsp,%rdi,4), %r9d
	leaq	(%r15,%r15,2), %rdi
	addl	%r10d, %r9d
	movl	%r9d, 88(%rsp,%rdi,4)
	cmpl	%esi, %edx
	jne	.L33
	.p2align 4,,10
	.p2align 3
.L95:
	cmpl	$1, %ebx
	jne	.L33
	movl	$2, %edi
	jmp	.L38
.L42:
	cmpl	$2, %ebx
	jne	.L85
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	leaq	(%rsi,%rsi,2), %rax
	addl	%r10d, 84(%rsp,%rax,4)
	.p2align 4,,10
	.p2align 3
.L34:
	movl	112(%rsp), %eax
	movdqa	80(%rsp), %xmm3
	movdqa	96(%rsp), %xmm4
	movl	80(%rsp), %r11d
	movl	84(%rsp), %r9d
	movl	88(%rsp), %r10d
	movl	%eax, 64(%rsp)
	movl	28(%rsp), %eax
	movaps	%xmm3, 32(%rsp)
	movaps	%xmm4, 48(%rsp)
	leal	-1(%rax), %ecx
	movl	%ecx, 28(%rsp)
	testl	%eax, %eax
	jne	.L36
.L3:
	movsbl	26(%rsp), %edx
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	subl	$65, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	cltq
	subl	%ecx, %edx
	leaq	(%rax,%rax,2), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	cvtsi2sdl	32(%rsp,%rax,4), %xmm0
	movl	$1, %eax
	divsd	%xmm1, %xmm0
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L91:
	cmpl	$2, %ebx
	jne	.L17
	addl	%r15d, 4(%rax)
	movl	%edi, %r11d
	cmpl	$-1, %edi
	jne	.L19
	movq	(%rsp), %r15
	addl	%r9d, -44(%r15)
	addl	%r9d, (%rax)
	cmpl	%edx, %ecx
	jne	.L27
.L26:
	movslq	%esi, %r11
	leaq	(%r11,%r11,2), %r9
	addl	%r10d, 88(%rsp,%r9,4)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edx, %edi
	jne	.L32
	addl	%r10d, %r9d
	movl	$1, %edi
	movl	%r9d, 8(%rax)
	cmpl	%esi, %edx
	jne	.L33
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L90:
	cmpl	$1, %ebx
	jne	.L16
	movl	4(%r8), %r11d
	addl	%r11d, 4(%rax)
	cmpl	%esi, %ecx
	je	.L96
	addl	%r9d, 8(%rax)
	cmpl	%edi, %ecx
	jne	.L21
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
.L97:
	addl	%r9d, (%rax)
	cmpl	$3, %ecx
	jne	.L25
	addl	%r10d, 112(%rsp)
	movl	8(%rax), %r9d
	movslq	%edi, %r11
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L88:
	cmpl	$1, %ebx
	jne	.L8
	addl	%r15d, (%rax)
	movl	%r12d, %edi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L94:
	cmpl	$2, %ebx
	jne	.L27
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L89:
	testl	%ebx, %ebx
	jne	.L12
	addl	%r11d, %r11d
	movl	%edx, %edi
	addl	%r11d, (%rax)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L92:
	cmpl	$1, %ebx
	jne	.L21
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
	jmp	.L97
	.p2align 4,,10
	.p2align 3
.L93:
	testl	%ebx, %ebx
	jne	.L22
	addl	%r9d, 4(%rax)
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	cmpl	$2, %ebx
	jne	.L85
	addl	%r10d, %r9d
	movslq	%esi, %r11
	movl	%r9d, 8(%rax)
	cmpl	%esi, %edx
	jne	.L33
	movq	(%rsp), %rsi
	addq	$12, %r8
	addq	$12, %rax
	addl	%r10d, -44(%rsi)
	jmp	.L52
.L96:
	addl	%r9d, 8(%rax)
	cmpl	%edi, %ecx
	jne	.L21
	movl	$1, %edi
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
	jmp	.L97
.L56:
	movsd	.LC0(%rip), %xmm1
	jmp	.L3
.L87:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L98
	addq	$136, %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
.L98:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1074790400
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	" %c %c %c"
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L2:
	movq	8(%rsp), %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L87
	pxor	%xmm0, %xmm0
	leaq	27(%rsp), %rcx
	leaq	26(%rsp), %rdx
	xorl	%eax, %eax
	leaq	25(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movaps	%xmm0, 32(%rsp)
	movl	$0, 64(%rsp)
	movaps	%xmm0, 48(%rsp)
	call	__isoc99_scanf@PLT
	movsbl	25(%rsp), %edx
	subl	$65, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	cltq
	subl	%ecx, %edx
	leaq	(%rax,%rax,2), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	$1, 32(%rsp,%rax,4)
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	testl	%eax, %eax
	movq	.LC2(%rip), %rax
	movl	%edx, 28(%rsp)
	movq	%rax, %xmm2
	je	.L56
	movsbl	27(%rsp), %ebx
	movl	32(%rsp), %r11d
	leaq	32(%rsp), %r14
	leaq	80(%rsp), %r13
	movl	36(%rsp), %r9d
	movl	40(%rsp), %r10d
	subl	$65, %ebx
	movsd	.LC0(%rip), %xmm1
	movslq	%ebx, %rdx
	movl	%ebx, %eax
	imulq	$1431655766, %rdx, %rdx
	sarl	$31, %eax
	shrq	$32, %rdx
	subl	%eax, %edx
	leal	(%rdx,%rdx,2), %eax
	subl	%eax, %ebx
	movslq	%edx, %rax
	leaq	(%rax,%rax,2), %rax
	leaq	128(%rsp,%rax,4), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L36:
	xorl	%esi, %esi
	pxor	%xmm0, %xmm0
	movq	%r14, %r8
	movq	%r13, %rax
	leal	1(%rsi), %ecx
	mulsd	%xmm2, %xmm1
	movaps	%xmm0, 80(%rsp)
	leal	-1(%rdx), %r12d
	movl	$0, 112(%rsp)
	movl	$2, %ebp
	movaps	%xmm0, 96(%rsp)
	cmpl	%edx, %ecx
	je	.L4
.L7:
	cmpl	$3, %ecx
	movl	%ebp, %edi
	movl	(%r8), %r15d
	cmovne	%ecx, %edi
	movslq	%edi, %rdi
	leaq	(%rdi,%rdi,2), %rdi
	addl	%r15d, 80(%rsp,%rdi,4)
	cmpl	%esi, %edx
	je	.L88
.L8:
	leal	-1(%rsi), %edi
	addl	%r11d, 4(%rax)
	cmpl	%edx, %edi
	je	.L89
.L12:
	cmpl	$-1, %edi
	movl	%esi, %r15d
	cmovne	%edi, %r15d
	movslq	%r15d, %r15
	leaq	(%r15,%r15,2), %r15
	addl	%r11d, 80(%rsp,%r15,4)
	addl	%r11d, (%rax)
	cmpl	%edx, %ecx
	je	.L90
.L16:
	cmpl	$3, %ecx
	movl	%ebp, %r11d
	movl	4(%r8), %r15d
	cmovne	%ecx, %r11d
	movslq	%r11d, %r11
	leaq	(%r11,%r11,2), %r11
	addl	%r15d, 84(%rsp,%r11,4)
	cmpl	%esi, %edx
	je	.L91
.L17:
	addl	%r9d, 8(%rax)
	cmpl	%edi, %edx
	je	.L92
.L21:
	cmpl	$-1, %edi
	movl	%esi, %r11d
	cmovne	%edi, %r11d
.L19:
	movslq	%r11d, %r11
	leaq	(%r11,%r11,2), %r11
	addl	%r9d, 84(%rsp,%r11,4)
	cmpl	%esi, %edx
	je	.L93
.L22:
	addl	%r9d, (%rax)
	cmpl	%edx, %ecx
	je	.L94
.L27:
	cmpl	$3, %ecx
	jne	.L25
	addl	%r10d, 112(%rsp)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edi, %edx
	je	.L42
	movslq	%edi, %r15
	movslq	%esi, %r11
	leaq	(%r15,%r15,2), %rdi
	movl	88(%rsp,%rdi,4), %r9d
.L29:
	leaq	(%r15,%r15,2), %rdi
	addl	%r10d, %r9d
	movl	%r9d, 88(%rsp,%rdi,4)
	cmpl	%esi, %edx
	je	.L95
.L33:
	movl	$1, %edi
.L38:
	leaq	(%r11,%r11,2), %rsi
	addq	$12, %r8
	addq	$12, %rax
	addq	%rdi, %rsi
	addl	%r10d, 80(%rsp,%rsi,4)
	cmpl	$3, %ecx
	je	.L34
.L52:
	movslq	%ecx, %rsi
	movl	8(%r8), %r10d
	movl	(%r8), %r11d
	leal	1(%rsi), %ecx
	movl	4(%r8), %r9d
	cmpl	%edx, %ecx
	jne	.L7
.L4:
	testl	%ebx, %ebx
	jne	.L7
	movl	(%r8), %edi
	addl	%edi, (%rax)
	leal	-1(%rsi), %edi
	addl	%r11d, 4(%rax)
	cmpl	%edi, %edx
	jne	.L12
	addl	%r11d, %r11d
	movl	%edx, %edi
	addl	%r11d, (%rax)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L25:
	movslq	%ecx, %r9
	leaq	(%r9,%r9,2), %r9
	addl	%r10d, 88(%rsp,%r9,4)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edx, %edi
	je	.L28
.L85:
	movslq	%esi, %r11
.L32:
	movslq	%esi, %r15
	cmpl	$-1, %edi
	je	.L29
	movslq	%edi, %r15
	leaq	(%r15,%r15,2), %rdi
	movl	88(%rsp,%rdi,4), %r9d
	leaq	(%r15,%r15,2), %rdi
	addl	%r10d, %r9d
	movl	%r9d, 88(%rsp,%rdi,4)
	cmpl	%esi, %edx
	jne	.L33
	.p2align 4,,10
	.p2align 3
.L95:
	cmpl	$1, %ebx
	jne	.L33
	movl	$2, %edi
	jmp	.L38
.L42:
	cmpl	$2, %ebx
	jne	.L85
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	leaq	(%rsi,%rsi,2), %rax
	addl	%r10d, 84(%rsp,%rax,4)
	.p2align 4,,10
	.p2align 3
.L34:
	movl	112(%rsp), %eax
	movdqa	80(%rsp), %xmm3
	movdqa	96(%rsp), %xmm4
	movl	80(%rsp), %r11d
	movl	84(%rsp), %r9d
	movl	88(%rsp), %r10d
	movl	%eax, 64(%rsp)
	movl	28(%rsp), %eax
	movaps	%xmm3, 32(%rsp)
	movaps	%xmm4, 48(%rsp)
	leal	-1(%rax), %ecx
	movl	%ecx, 28(%rsp)
	testl	%eax, %eax
	jne	.L36
.L3:
	movsbl	26(%rsp), %edx
	pxor	%xmm0, %xmm0
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	subl	$65, %edx
	movslq	%edx, %rax
	movl	%edx, %ecx
	imulq	$1431655766, %rax, %rax
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	cltq
	subl	%ecx, %edx
	leaq	(%rax,%rax,2), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	cvtsi2sdl	32(%rsp,%rax,4), %xmm0
	movl	$1, %eax
	divsd	%xmm1, %xmm0
	call	__printf_chk@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L91:
	cmpl	$2, %ebx
	jne	.L17
	addl	%r15d, 4(%rax)
	movl	%edi, %r11d
	cmpl	$-1, %edi
	jne	.L19
	movq	(%rsp), %r15
	addl	%r9d, -44(%r15)
	addl	%r9d, (%rax)
	cmpl	%edx, %ecx
	jne	.L27
.L26:
	movslq	%esi, %r11
	leaq	(%r11,%r11,2), %r9
	addl	%r10d, 88(%rsp,%r9,4)
	movl	8(%rax), %r9d
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	cmpl	%edx, %edi
	jne	.L32
	addl	%r10d, %r9d
	movl	$1, %edi
	movl	%r9d, 8(%rax)
	cmpl	%esi, %edx
	jne	.L33
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L90:
	cmpl	$1, %ebx
	jne	.L16
	movl	4(%r8), %r11d
	addl	%r11d, 4(%rax)
	cmpl	%esi, %ecx
	je	.L96
	addl	%r9d, 8(%rax)
	cmpl	%edi, %ecx
	jne	.L21
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
.L97:
	addl	%r9d, (%rax)
	cmpl	$3, %ecx
	jne	.L25
	addl	%r10d, 112(%rsp)
	movl	8(%rax), %r9d
	movslq	%edi, %r11
	addl	%r10d, %r9d
	movl	%r9d, 8(%rax)
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L88:
	cmpl	$1, %ebx
	jne	.L8
	addl	%r15d, (%rax)
	movl	%r12d, %edi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L94:
	cmpl	$2, %ebx
	jne	.L27
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L89:
	testl	%ebx, %ebx
	jne	.L12
	addl	%r11d, %r11d
	movl	%edx, %edi
	addl	%r11d, (%rax)
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L92:
	cmpl	$1, %ebx
	jne	.L21
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
	jmp	.L97
	.p2align 4,,10
	.p2align 3
.L93:
	testl	%ebx, %ebx
	jne	.L22
	addl	%r9d, 4(%rax)
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	cmpl	$2, %ebx
	jne	.L85
	addl	%r10d, %r9d
	movslq	%esi, %r11
	movl	%r9d, 8(%rax)
	cmpl	%esi, %edx
	jne	.L33
	movq	(%rsp), %rsi
	addq	$12, %r8
	addq	$12, %rax
	addl	%r10d, -44(%rsi)
	jmp	.L52
.L96:
	addl	%r9d, 8(%rax)
	cmpl	%edi, %ecx
	jne	.L21
	movl	$1, %edi
	addl	%r9d, 4(%rax)
	cmpl	%esi, %edi
	jne	.L22
	jmp	.L97
.L56:
	movsd	.LC0(%rip), %xmm1
	jmp	.L3
.L87:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L98
	addq	$136, %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
.L98:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1074790400
	.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>
int main(){
  int n,i,j,k,l,ny,nx;
  char s,e,f;
  double p=1;
  int X[]={0,1,0,-1};
  int Y[]={1,0,-1,0};
  while(scanf("%d",&n),n){
    int c[3][3]={0};
    scanf(" %c %c %c",&s,&e,&f);
    c[(s-'A')/3][(s-'A')%3]=p=1;
    while(n--){
      p*=4;
      int d[3][3]={0};
      for(i=0;i<3;i++){
	for(j=0;j<3;j++){
	  for(k=0;k<4;k++){
	    ny=i+Y[k];
	    nx=j+X[k];
	    if((f-'A')/3==ny&&(f-'A')%3==nx||nx<0||nx==3||ny<0||ny==3){
	     nx-=X[k];
	     ny-=Y[k];
	    }
	    d[ny][nx]+=c[i][j];
	  }
	}
     }
     for(i=0;i<9;i++)c[i/3][i%3]=d[i/3][i%3];
     //for(i=0;i<9;i++)printf("%d ",d[i/3][i%3]);printf("\n");
    }
    printf("%f\n",c[(e-'A')/3][(e-'A')%3]/p);
  }
  return 0;
}
1
D A C
1
E B C
2
E A B
0
 1
D A C
1
E B C
2
F A B
0
 1
D A C
0
E B C
2
F A B
0
 1
C A C
0
E B C
2
F A B
0
 1
E A B
1
E B C
2
E A B
0
 1
D A C
1
E A D
2
F A B
0
 1
C A D
1
D B C
2
F A B
0
 1
D A C
1
E A D
3
F A B
0
 1
D A C
1
E A D
4
F A B
0
 1
C A C
1
D A C
0
F B B
0

0.250000
0.250000
0.062500
 0.250000
0.250000
0.000000
 0.250000
 0.000000
 0.000000
0.250000
0.062500
 0.250000
0.000000
0.000000
 0.000000
0.000000
0.000000
 0.250000
0.000000
0.015625
 0.250000
0.000000
0.023438
 0.000000
0.250000

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>
int main(){
  int n,i,j,k,l,ny,nx;
  char s,e,f;
  double p=1;
  int X[]={0,1,0,-1};
  int Y[]={1,0,-1,0};
  while(scanf("%d",&n),n){
    int c[3][3]={0};
    scanf(" %c %c %c",&s,&e,&f);
    c[(s-'A')/3][(s-'A')%3]=p=1;
    while(n--){
      p*=4;
      int d[3][3]={0};
      for(i=0;i<3;i++){
	for(j=0;j<3;j++){
	  for(k=0;k<4;k++){
	    ny=i+Y[k];
	    nx=j+X[k];
	    if((f-'A')/3==ny&&(f-'A')%3==nx||nx<0||nx==3||ny<0||ny==3){
	     nx-=X[k];
	     ny-=Y[k];
	    }
	    d[ny][nx]+=c[i][j];
	  }
	}
     }
     for(i=0;i<9;i++)c[i/3][i%3]=d[i/3][i%3];
     //for(i=0;i<9;i++)printf("%d ",d[i/3][i%3]);printf("\n");
    }
    printf("%f\n",c[(e-'A')/3][(e-'A')%3]/p);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC1:
	.string	" %c %c %c"
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movl	$0, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$0, -108(%rbp)
	movl	$-1, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L2
.L16:
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$0, -64(%rbp)
	leaq	-161(%rbp), %rcx
	leaq	-162(%rbp), %rdx
	leaq	-163(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -96(%rbp,%rax,4)
	jmp	.L3
.L15:
	movsd	-136(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -136(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L4
.L12:
	movl	$0, -152(%rbp)
	jmp	.L5
.L11:
	movl	$0, -148(%rbp)
	jmp	.L6
.L10:
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-156(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -140(%rbp)
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -144(%rbp)
	jne	.L7
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -140(%rbp)
	je	.L8
.L7:
	cmpl	$0, -140(%rbp)
	js	.L8
	cmpl	$3, -140(%rbp)
	je	.L8
	cmpl	$0, -144(%rbp)
	js	.L8
	cmpl	$3, -144(%rbp)
	jne	.L9
.L8:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, -140(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	subl	%eax, -144(%rbp)
.L9:
	movl	-140(%rbp), %eax
	movslq	%eax, %rcx
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-48(%rbp,%rax,4), %ecx
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -48(%rbp,%rax,4)
	addl	$1, -148(%rbp)
.L6:
	cmpl	$3, -148(%rbp)
	jle	.L10
	addl	$1, -152(%rbp)
.L5:
	cmpl	$2, -152(%rbp)
	jle	.L11
	addl	$1, -156(%rbp)
.L4:
	cmpl	$2, -156(%rbp)
	jle	.L12
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %r8d
	subl	%eax, %r8d
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, %ecx
	addl	%ecx, %ecx
	addl	%edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-156(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1431655766, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$31, %eax
	movl	%ecx, %edi
	subl	%eax, %edi
	movl	-156(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %esi
	addl	%esi, %esi
	addl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	movslq	%edx, %rsi
	movslq	%r8d, %rcx
	movq	%rcx, %rdx
	addq	%rdx, %rdx
	addq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	movslq	%eax, %rsi
	movslq	%edi, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L13:
	cmpl	$8, -156(%rbp)
	jle	.L14
.L3:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	testl	%eax, %eax
	jne	.L15
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	divsd	-136(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L2:
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1074790400
	.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
	.section	.rodata
.LC1:
	.string	" %c %c %c"
.LC3:
	.string	"%f\n"
.LC4:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movl	$0, -128(%rbp)
	movl	$1, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$-1, -116(%rbp)
	movl	$1, -112(%rbp)
	movl	$0, -108(%rbp)
	movl	$-1, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L2
.L16:
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$0, -64(%rbp)
	leaq	-161(%rbp), %rcx
	leaq	-162(%rbp), %rdx
	leaq	-163(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movsd	.LC0(%rip), %xmm0
	movsd	%xmm0, -136(%rbp)
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-163(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -96(%rbp,%rax,4)
	jmp	.L3
.L15:
	movsd	-136(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, -136(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L4
.L12:
	movl	$0, -152(%rbp)
	jmp	.L5
.L11:
	movl	$0, -148(%rbp)
	jmp	.L6
.L10:
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-156(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -144(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -140(%rbp)
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -144(%rbp)
	jne	.L7
	movzbl	-161(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -140(%rbp)
	je	.L8
.L7:
	cmpl	$0, -140(%rbp)
	js	.L8
	cmpl	$3, -140(%rbp)
	je	.L8
	cmpl	$0, -144(%rbp)
	js	.L8
	cmpl	$3, -144(%rbp)
	jne	.L9
.L8:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, -140(%rbp)
	movl	-148(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	subl	%eax, -144(%rbp)
.L9:
	movl	-140(%rbp), %eax
	movslq	%eax, %rcx
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-48(%rbp,%rax,4), %ecx
	movl	-152(%rbp), %eax
	movslq	%eax, %rsi
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	addl	%eax, %ecx
	movl	-140(%rbp), %eax
	movslq	%eax, %rsi
	movl	-144(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	%ecx, -48(%rbp,%rax,4)
	addl	$1, -148(%rbp)
.L6:
	cmpl	$3, -148(%rbp)
	jle	.L10
	addl	$1, -152(%rbp)
.L5:
	cmpl	$2, -152(%rbp)
	jle	.L11
	addl	$1, -156(%rbp)
.L4:
	cmpl	$2, -156(%rbp)
	jle	.L12
	movl	$0, -156(%rbp)
	jmp	.L13
.L14:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %r8d
	subl	%eax, %r8d
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, %ecx
	addl	%ecx, %ecx
	addl	%edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-156(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1431655766, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$31, %eax
	movl	%ecx, %edi
	subl	%eax, %edi
	movl	-156(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %esi
	addl	%esi, %esi
	addl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	movslq	%edx, %rsi
	movslq	%r8d, %rcx
	movq	%rcx, %rdx
	addq	%rdx, %rdx
	addq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	movslq	%eax, %rsi
	movslq	%edi, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
	addl	$1, -156(%rbp)
.L13:
	cmpl	$8, -156(%rbp)
	jle	.L14
.L3:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	testl	%eax, %eax
	jne	.L15
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	subl	$65, %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%edx, %esi
	subl	%eax, %esi
	movzbl	-162(%rbp), %eax
	movsbl	%al, %eax
	leal	-65(%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%esi, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	divsd	-136(%rbp), %xmm0
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
.L2:
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-160(%rbp), %eax
	testl	%eax, %eax
	jne	.L16
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC2:
	.long	0
	.long	1074790400
	.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:
