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

```c
a[2][21];main(t,n,m,f,i,j,x){for(;scanf("%d%d",&n,&m),n;printf("Case %d: %d\n",t++,i)){
for(memset(a,f=0,sizeof(a)),a[f][i=0]=n;!a[f][m];f^=1,i++)for(j=0;j<m;j++){
	x=a[f][j];
	a[f^1][j+1]+=x/2;
	a[f^1][a[f][j]=0]+=x/2;
	a[f^1][j]+=x%2;
}
}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 168
a:
	.zero	168
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%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	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L7:
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	$168, %edx
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	movl	-8(%rbp), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L3
.L6:
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 16(%rbp)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%ecx, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	16(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	addl	%edx, %esi
	movslq	%ecx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	addl	%esi, %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	xorl	$1, -16(%rbp)
	addl	$1, -20(%rbp)
.L3:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	-20(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	a(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	24(%rsp), %rax
	movl	%edi, 4(%rsp)
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %rax
	movl	%esi, 28(%rsp)
	movl	%edx, 24(%rsp)
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L16
	movl	$21, %ecx
	xorl	%eax, %eax
	movq	%rbx, %rdi
	movslq	24(%rsp), %r14
	rep stosq
	movl	%edx, (%rbx)
	xorl	%r12d, %r12d
	movq	%r14, %r13
	leal	-1(%r14), %r15d
	movl	(%rbx,%r14,4), %ebp
	testl	%ebp, %ebp
	jne	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%ebp, %rax
	xorl	$1, %ebp
	movslq	%ebp, %r10
	testl	%r13d, %r13d
	jle	.L7
	leaq	(%r10,%r10,4), %rdx
	leaq	4+a(%rip), %rdi
	leaq	(%r10,%rdx,4), %rcx
	leaq	0(,%rcx,4), %r8
	addq	%r15, %rcx
	leaq	(%rdi,%rcx,4), %r9
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rbx,%r8), %rdx
	leaq	(%rax,%rcx,4), %rsi
	salq	$2, %rsi
	movq	%rdx, %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rdx, %r11
	subq	%r8, %r11
	movl	(%r11,%rsi), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	addl	%ecx, 4(%rdx)
	movl	$0, (%r11,%rsi)
	addl	%ecx, (%rdi)
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	addl	%eax, (%rdx)
	addq	$4, %rdx
	cmpq	%r9, %rdx
	jne	.L5
.L7:
	leaq	(%r10,%r10,4), %rax
	addl	$1, %r12d
	leaq	(%r10,%rax,4), %rax
	addq	%r14, %rax
	movl	(%rbx,%rax,4), %eax
	testl	%eax, %eax
	je	.L3
.L4:
	movl	4(%rsp), %esi
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	leal	1(%rsi), %ebp
	call	printf@PLT
	movl	%ebp, 4(%rsp)
	jmp	.L2
.L16:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 168
a:
	.zero	168
	.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
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	a(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	leaq	24(%rsp), %rax
	movl	%edi, 4(%rsp)
	movq	%rax, 8(%rsp)
	leaq	28(%rsp), %rax
	movl	%esi, 28(%rsp)
	movl	%edx, 24(%rsp)
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	je	.L16
	movl	$21, %ecx
	xorl	%eax, %eax
	movq	%rbx, %rdi
	movslq	24(%rsp), %r14
	rep stosq
	movl	%edx, (%rbx)
	xorl	%r12d, %r12d
	movq	%r14, %r13
	leal	-1(%r14), %r15d
	movl	(%rbx,%r14,4), %ebp
	testl	%ebp, %ebp
	jne	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	movslq	%ebp, %rax
	xorl	$1, %ebp
	movslq	%ebp, %r10
	testl	%r13d, %r13d
	jle	.L7
	leaq	(%r10,%r10,4), %rdx
	leaq	4+a(%rip), %rdi
	leaq	(%r10,%rdx,4), %rcx
	leaq	0(,%rcx,4), %r8
	addq	%r15, %rcx
	leaq	(%rdi,%rcx,4), %r9
	leaq	(%rax,%rax,4), %rcx
	leaq	(%rbx,%r8), %rdx
	leaq	(%rax,%rcx,4), %rsi
	salq	$2, %rsi
	movq	%rdx, %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rdx, %r11
	subq	%r8, %r11
	movl	(%r11,%rsi), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	addl	%ecx, 4(%rdx)
	movl	$0, (%r11,%rsi)
	addl	%ecx, (%rdi)
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	addl	%eax, (%rdx)
	addq	$4, %rdx
	cmpq	%r9, %rdx
	jne	.L5
.L7:
	leaq	(%r10,%r10,4), %rax
	addl	$1, %r12d
	leaq	(%r10,%rax,4), %rax
	addq	%r14, %rax
	movl	(%rbx,%rax,4), %eax
	testl	%eax, %eax
	je	.L3
.L4:
	movl	4(%rsp), %esi
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	leal	1(%rsi), %ebp
	call	printf@PLT
	movl	%ebp, 4(%rsp)
	jmp	.L2
.L16:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 168
a:
	.zero	168
	.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:

a[2][21];main(t,n,m,f,i,j,x){for(;scanf("%d%d",&n,&m),n;printf("Case %d: %d\n",t++,i)){
for(memset(a,f=0,sizeof(a)),a[f][i=0]=n;!a[f][m];f^=1,i++)for(j=0;j<m;j++){
	x=a[f][j];
	a[f^1][j+1]+=x/2;
	a[f^1][a[f][j]=0]+=x/2;
	a[f^1][j]+=x%2;
}
}exit(0);}
2 1
10 5
15 6
0 0
 2 1
10 5
15 2
0 0
 2 1
14 5
15 10
0 0
 2 1
10 2
15 6
0 0
 2 1
16 5
15 10
0 0
 3 1
16 10
15 10
0 0
 2 1
10 5
28 10
0 0
 2 1
16 5
14 10
0 0
 3 1
16 10
15 5
0 0
 2 1
10 5
28 1
0 0

Case 1: 1
Case 2: 11
Case 3: 14
 Case 1: 1
Case 2: 11
Case 3: 2
 Case 1: 1
Case 2: 8
Case 3: 210
 Case 1: 1
Case 2: 2
Case 3: 14
 Case 1: 1
Case 2: 7
Case 3: 210
 Case 1: 1
Case 2: 189
Case 3: 210
 Case 1: 1
Case 2: 11
Case 3: 95
 Case 1: 1
Case 2: 7
Case 3: 234
 Case 1: 1
Case 2: 189
Case 3: 8
 Case 1: 1
Case 2: 11
Case 3: 1

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

```c
a[2][21];main(t,n,m,f,i,j,x){for(;scanf("%d%d",&n,&m),n;printf("Case %d: %d\n",t++,i)){
for(memset(a,f=0,sizeof(a)),a[f][i=0]=n;!a[f][m];f^=1,i++)for(j=0;j<m;j++){
	x=a[f][j];
	a[f^1][j+1]+=x/2;
	a[f^1][a[f][j]=0]+=x/2;
	a[f^1][j]+=x%2;
}
}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 168
a:
	.zero	168
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%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	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L7:
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	$168, %edx
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	movl	-8(%rbp), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L3
.L6:
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 16(%rbp)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%ecx, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	16(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	addl	%edx, %esi
	movslq	%ecx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	addl	%esi, %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	xorl	$1, -16(%rbp)
	addl	$1, -20(%rbp)
.L3:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	-20(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 168
a:
	.zero	168
	.section	.rodata
.LC0:
	.string	"Case %d: %d\n"
.LC1:
	.string	"%d%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	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L7:
	movl	$0, -16(%rbp)
	movl	-16(%rbp), %eax
	movl	$168, %edx
	movl	%eax, %esi
	leaq	a(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	movl	-8(%rbp), %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L3
.L6:
	movl	$0, -24(%rbp)
	jmp	.L4
.L5:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 16(%rbp)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	$1, %eax
	addl	%esi, %ecx
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %esi
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movslq	%ecx, %rdi
	movslq	%esi, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	16(%rbp), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%esi, %eax
	sarl	%eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	addl	%edx, %esi
	movslq	%ecx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%esi, (%rdx,%rax)
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	16(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-16(%rbp), %eax
	xorl	$1, %eax
	movl	%eax, %edx
	addl	%esi, %ecx
	movl	-24(%rbp), %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -24(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L5
	xorl	$1, -16(%rbp)
	addl	$1, -20(%rbp)
.L3:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	-20(%rbp), %edx
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-8(%rbp), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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:
