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(void) {
	int dataset_num,cur_data;
	unsigned int chunks[9];
	int i,j;
	int key,sum;
	scanf("%d",&dataset_num);
	for(cur_data=0;cur_data<dataset_num;cur_data++) {
		for(i=0;i<9;i++)scanf("%x",&chunks[i]);
		key=0;
		for(i=0;i<32;i++) {
			for(sum=0,j=0;j<8;j++)sum+=chunks[j];
			if((sum & (1<<i))!=(chunks[8] & (1<<i)))key|=1<<i;
			for(j=0;j<9;j++)chunks[j]^=(key & 1<<i);
		}
		printf("%x\n",key);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%x"
.LC2:
	.string	"%x\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L2
.L12:
	movl	$0, -64(%rbp)
	jmp	.L3
.L4:
	leaq	-48(%rbp), %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -64(%rbp)
.L3:
	cmpl	$8, -64(%rbp)
	jle	.L4
	movl	$0, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L11:
	movl	$0, -52(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L6
.L7:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -52(%rbp)
	addl	$1, -60(%rbp)
.L6:
	cmpl	$7, -60(%rbp)
	jle	.L7
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	andl	-52(%rbp), %eax
	movl	%eax, %esi
	movl	-16(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	$1, %edi
	movl	%eax, %ecx
	sall	%cl, %edi
	movl	%edi, %eax
	andl	%edx, %eax
	cmpl	%eax, %esi
	je	.L8
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -56(%rbp)
.L8:
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-64(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	andl	-56(%rbp), %eax
	xorl	%eax, %edx
	movl	-60(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$8, -60(%rbp)
	jle	.L10
	addl	$1, -64(%rbp)
.L5:
	cmpl	$31, -64(%rbp)
	jle	.L11
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -68(%rbp)
.L2:
	movl	-72(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"%d"
.LC1:
	.string	"%x"
.LC2:
	.string	"%x\n"
	.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
	leaq	.LC0(%rip), %rdi
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	leaq	32(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	68(%rsp), %rbp
	movl	$1, %r15d
	movq	%rax, 8(%rsp)
	leaq	.LC1(%rip), %rbx
	leaq	.LC2(%rip), %r13
.L2:
	movq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbp
	jne	.L3
	movdqa	32(%rsp), %xmm3
	movl	64(%rsp), %esi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	movdqa	48(%rsp), %xmm2
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	orl	%edx, %r8d
.L5:
	movd	%edx, %xmm4
	addl	$1, %ecx
	xorl	%edx, %esi
	pshufd	$0, %xmm4, %xmm0
	pxor	%xmm0, %xmm3
	pxor	%xmm0, %xmm2
	cmpl	$32, %ecx
	je	.L16
.L6:
	movdqa	%xmm2, %xmm1
	movl	%r15d, %edx
	paddd	%xmm3, %xmm1
	sall	%cl, %edx
	movdqa	%xmm1, %xmm0
	punpckhdq	%xmm1, %xmm0
	movd	%xmm0, %eax
	pshufd	$255, %xmm1, %xmm0
	movd	%xmm0, %edi
	pshufd	$85, %xmm1, %xmm0
	addl	%edi, %eax
	movd	%xmm0, %edi
	addl	%edi, %eax
	movd	%xmm1, %edi
	addl	%edi, %eax
	xorl	%esi, %eax
	testl	%edx, %eax
	jne	.L17
	andl	%r8d, %edx
	jmp	.L5
.L16:
	movl	%esi, 64(%rsp)
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movaps	%xmm3, 32(%rsp)
	addl	$1, %r12d
	movaps	%xmm2, 48(%rsp)
	call	__printf_chk@PLT
	cmpl	%r12d, 28(%rsp)
	jg	.L2
.L7:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$88, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%x"
.LC2:
	.string	"%x\n"
	.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
	leaq	.LC0(%rip), %rdi
	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	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	leaq	32(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	68(%rsp), %rbp
	movl	$1, %r15d
	movq	%rax, 8(%rsp)
	leaq	.LC1(%rip), %rbx
	leaq	.LC2(%rip), %r13
.L2:
	movq	8(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbp
	jne	.L3
	movdqa	32(%rsp), %xmm3
	movl	64(%rsp), %esi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	movdqa	48(%rsp), %xmm2
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	orl	%edx, %r8d
.L5:
	movd	%edx, %xmm4
	addl	$1, %ecx
	xorl	%edx, %esi
	pshufd	$0, %xmm4, %xmm0
	pxor	%xmm0, %xmm3
	pxor	%xmm0, %xmm2
	cmpl	$32, %ecx
	je	.L16
.L6:
	movdqa	%xmm2, %xmm1
	movl	%r15d, %edx
	paddd	%xmm3, %xmm1
	sall	%cl, %edx
	movdqa	%xmm1, %xmm0
	punpckhdq	%xmm1, %xmm0
	movd	%xmm0, %eax
	pshufd	$255, %xmm1, %xmm0
	movd	%xmm0, %edi
	pshufd	$85, %xmm1, %xmm0
	addl	%edi, %eax
	movd	%xmm0, %edi
	addl	%edi, %eax
	movd	%xmm1, %edi
	addl	%edi, %eax
	xorl	%esi, %eax
	testl	%edx, %eax
	jne	.L17
	andl	%r8d, %edx
	jmp	.L5
.L16:
	movl	%esi, 64(%rsp)
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movaps	%xmm3, 32(%rsp)
	addl	$1, %r12d
	movaps	%xmm2, 48(%rsp)
	call	__printf_chk@PLT
	cmpl	%r12d, 28(%rsp)
	jg	.L2
.L7:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$88, %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
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void) {
	int dataset_num,cur_data;
	unsigned int chunks[9];
	int i,j;
	int key,sum;
	scanf("%d",&dataset_num);
	for(cur_data=0;cur_data<dataset_num;cur_data++) {
		for(i=0;i<9;i++)scanf("%x",&chunks[i]);
		key=0;
		for(i=0;i<32;i++) {
			for(sum=0,j=0;j<8;j++)sum+=chunks[j];
			if((sum & (1<<i))!=(chunks[8] & (1<<i)))key|=1<<i;
			for(j=0;j<9;j++)chunks[j]^=(key & 1<<i);
		}
		printf("%x\n",key);
	}
	return 0;
}
8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 3 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a6d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
22047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 3 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a6d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 3 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 eed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
8bf20206 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 f27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 fed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
8bf20206 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 e27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd14 6ac1 fed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
8bf20206 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 e27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd15 6ac1 fed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
8bf20206 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 8
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 e27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd15 6ac1 fed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401
 8
1 1 1 1 1 1 1 1 5
3 2 3 2 3 2 4 2 6
6 4 4 7 7 b a 2 2e
e1 13 ce 28 ca 6 ab 46 a5d
b08 49e2 6128 e27 8cf2 bc50 7380 7fe1 723b
4eba eb4 a352 fd15 6ac1 fed1 dd06 bb83 392bc
ef593c08 847e522f 74c02b9c 26f3a4e1 e2720a01 6fe66007
7a4e96ad 6ee5cef6 3853cd88
60202fb8 757d6d66 9c3a9525 fbcd7983 82b9571c ddc54bab 853e52da
12047c88 e5524401

0
2
3
1c6
4924afc7
ffff95c5
546991d
901c4a16
 0
2
3
1c6
4924afc7
ffff95c5
546991d
801c4a16
 0
2
3
fffffe56
4924afc7
ffff95c5
546991d
801c4a16
 0
92492491
3
fffffe56
4924afc7
ffff95c5
546991d
801c4a16
 0
92492491
3
fffffe56
4924afc7
ffff95c5
546991d
945994bc
 0
92492491
3
fffffe56
4924afc7
ffff25c5
546991d
945994bc
 0
92492491
3
fffffe56
b6db52c7
ffff25c5
546991d
945994bc
 0
92492491
3
fffffe56
b6db52c7
ffff25c4
546991d
945994bc
 0
92492491
3
fffffe56
b6db52c7
ffff25c4
546991d
801c4a16
 24924925
92492491
3
fffffe56
b6db52c7
ffff25c4
546991d
801c4a16

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(void) {
	int dataset_num,cur_data;
	unsigned int chunks[9];
	int i,j;
	int key,sum;
	scanf("%d",&dataset_num);
	for(cur_data=0;cur_data<dataset_num;cur_data++) {
		for(i=0;i<9;i++)scanf("%x",&chunks[i]);
		key=0;
		for(i=0;i<32;i++) {
			for(sum=0,j=0;j<8;j++)sum+=chunks[j];
			if((sum & (1<<i))!=(chunks[8] & (1<<i)))key|=1<<i;
			for(j=0;j<9;j++)chunks[j]^=(key & 1<<i);
		}
		printf("%x\n",key);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%x"
.LC2:
	.string	"%x\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L2
.L12:
	movl	$0, -64(%rbp)
	jmp	.L3
.L4:
	leaq	-48(%rbp), %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -64(%rbp)
.L3:
	cmpl	$8, -64(%rbp)
	jle	.L4
	movl	$0, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L11:
	movl	$0, -52(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L6
.L7:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -52(%rbp)
	addl	$1, -60(%rbp)
.L6:
	cmpl	$7, -60(%rbp)
	jle	.L7
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	andl	-52(%rbp), %eax
	movl	%eax, %esi
	movl	-16(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	$1, %edi
	movl	%eax, %ecx
	sall	%cl, %edi
	movl	%edi, %eax
	andl	%edx, %eax
	cmpl	%eax, %esi
	je	.L8
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -56(%rbp)
.L8:
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-64(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	andl	-56(%rbp), %eax
	xorl	%eax, %edx
	movl	-60(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$8, -60(%rbp)
	jle	.L10
	addl	$1, -64(%rbp)
.L5:
	cmpl	$31, -64(%rbp)
	jle	.L11
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -68(%rbp)
.L2:
	movl	-72(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%x"
.LC2:
	.string	"%x\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -68(%rbp)
	jmp	.L2
.L12:
	movl	$0, -64(%rbp)
	jmp	.L3
.L4:
	leaq	-48(%rbp), %rdx
	movl	-64(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -64(%rbp)
.L3:
	cmpl	$8, -64(%rbp)
	jle	.L4
	movl	$0, -56(%rbp)
	movl	$0, -64(%rbp)
	jmp	.L5
.L11:
	movl	$0, -52(%rbp)
	movl	$0, -60(%rbp)
	jmp	.L6
.L7:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -52(%rbp)
	addl	$1, -60(%rbp)
.L6:
	cmpl	$7, -60(%rbp)
	jle	.L7
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	andl	-52(%rbp), %eax
	movl	%eax, %esi
	movl	-16(%rbp), %edx
	movl	-64(%rbp), %eax
	movl	$1, %edi
	movl	%eax, %ecx
	sall	%cl, %edi
	movl	%edi, %eax
	andl	%edx, %eax
	cmpl	%eax, %esi
	je	.L8
	movl	-64(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	orl	%eax, -56(%rbp)
.L8:
	movl	$0, -60(%rbp)
	jmp	.L9
.L10:
	movl	-60(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-64(%rbp), %eax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	andl	-56(%rbp), %eax
	xorl	%eax, %edx
	movl	-60(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -60(%rbp)
.L9:
	cmpl	$8, -60(%rbp)
	jle	.L10
	addl	$1, -64(%rbp)
.L5:
	cmpl	$31, -64(%rbp)
	jle	.L11
	movl	-56(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -68(%rbp)
.L2:
	movl	-72(%rbp), %eax
	cmpl	%eax, -68(%rbp)
	jl	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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:
