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 ans = -1000000000, data1[100][15], data2[100][15], data[15], n;

void calc_score(void){
    int index = 0, score = 0, cnt = 0;
    for(int i = 0; i < 10; i++){
        if(data[i] == 0){
            cnt ++;
        }
    }
    if(cnt == 10){
        return ;
    }
    for(int i = 0; i < n; i++){
        index = 0;
        for(int j = 0; j < 10; j++){
            if(data1[i][j] ==1 && data[j] == 1){
                index += 1;
            }
        }
        score += data2[i][index];
    }

    if(score > ans){
        ans = score;
    }
}

void set_data(int pos){
    if(pos == 10){
        calc_score();
        return ;
    }
    if(pos != 10){
        data[pos] = 0;
        set_data(pos + 1);
        data[pos] = 1;
        set_data(pos + 1);
    }
}

int main(void){
    scanf("%d", &n);
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 10; j++){
            scanf("%d", &data1[i][j]);
        }
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 11; j++){
            scanf("%d", &data2[i][j]);
        }
    }
    set_data(0);
    printf("%d\n", ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ans
	.data
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.long	-1000000000
	.globl	data1
	.bss
	.align 32
	.type	data1, @object
	.size	data1, 6000
data1:
	.zero	6000
	.globl	data2
	.align 32
	.type	data2, @object
	.size	data2, 6000
data2:
	.zero	6000
	.globl	data
	.align 32
	.type	data, @object
	.size	data, 60
data:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	calc_score
	.type	calc_score, @function
calc_score:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	addl	$1, -16(%rbp)
.L3:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L4
	cmpl	$10, -16(%rbp)
	je	.L12
	movl	$0, -8(%rbp)
	jmp	.L7
.L11:
	movl	$0, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -24(%rbp)
.L9:
	addl	$1, -4(%rbp)
.L8:
	cmpl	$9, -4(%rbp)
	jle	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L11
	movl	ans(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L1
	movl	-20(%rbp), %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc_score, .-calc_score
	.globl	set_data
	.type	set_data, @function
set_data:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$10, -4(%rbp)
	jne	.L14
	call	calc_score
	jmp	.L13
.L14:
	cmpl	$10, -4(%rbp)
	je	.L13
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	set_data, .-set_data
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	cmpl	$9, -12(%rbp)
	jle	.L19
	addl	$1, -16(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	movl	$0, -8(%rbp)
	jmp	.L21
.L24:
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L22:
	cmpl	$10, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %edi
	call	set_data
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	calc_score
	.type	calc_score, @function
calc_score:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movdqa	%xmm1, %xmm0
	pcmpeqd	16+data(%rip), %xmm1
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pcmpeqd	data(%rip), %xmm0
	pand	.LC0(%rip), %xmm0
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	36+data(%rip), %r12d
	psubd	%xmm1, %xmm0
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	32+data(%rip), %ebp
	movdqa	%xmm0, %xmm1
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	psrldq	$8, %xmm1
	cmpl	$1, %ebp
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	adcl	$0, %eax
	cmpl	$1, %r12d
	adcl	$0, %eax
	cmpl	$10, %eax
	je	.L1
	movl	n(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L19
	movl	16+data(%rip), %eax
	xorl	%ebx, %ebx
	movl	4+data(%rip), %r15d
	leaq	data2(%rip), %r11
	cmpl	$1, data(%rip)
	movl	8+data(%rip), %r14d
	movl	%eax, -24(%rsp)
	movl	20+data(%rip), %eax
	sete	%bl
	xorl	%r8d, %r8d
	movl	12+data(%rip), %r13d
	xorl	%esi, %esi
	xorl	%r10d, %r10d
	movl	%eax, -20(%rsp)
	movl	24+data(%rip), %eax
	movl	%eax, -16(%rsp)
	movl	28+data(%rip), %eax
	movl	%eax, -12(%rsp)
	leaq	data1(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$1, (%rax)
	movl	%r10d, %edx
	cmove	%ebx, %edx
	cmpl	$1, 4(%rax)
	jne	.L9
	xorl	%ecx, %ecx
	cmpl	$1, %r15d
	sete	%cl
	addl	%ecx, %edx
.L9:
	cmpl	$1, 8(%rax)
	jne	.L10
	xorl	%ecx, %ecx
	cmpl	$1, %r14d
	sete	%cl
	addl	%ecx, %edx
.L10:
	cmpl	$1, 12(%rax)
	jne	.L11
	xorl	%ecx, %ecx
	cmpl	$1, %r13d
	sete	%cl
	addl	%ecx, %edx
.L11:
	cmpl	$1, 16(%rax)
	jne	.L12
	xorl	%ecx, %ecx
	cmpl	$1, -24(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L12:
	cmpl	$1, 20(%rax)
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	$1, -20(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L13:
	cmpl	$1, 24(%rax)
	jne	.L14
	xorl	%ecx, %ecx
	cmpl	$1, -16(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L14:
	cmpl	$1, 28(%rax)
	jne	.L15
	xorl	%ecx, %ecx
	cmpl	$1, -12(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L15:
	cmpl	$1, 32(%rax)
	jne	.L16
	xorl	%ecx, %ecx
	cmpl	$1, %ebp
	sete	%cl
	addl	%ecx, %edx
.L16:
	cmpl	$1, 36(%rax)
	jne	.L17
	xorl	%ecx, %ecx
	cmpl	$1, %r12d
	sete	%cl
	addl	%ecx, %edx
.L17:
	movslq	%esi, %rdi
	movslq	%edx, %rdx
	addl	$1, %esi
	addq	$60, %rax
	movq	%rdi, %rcx
	salq	$4, %rcx
	subq	%rdi, %rcx
	addq	%rdx, %rcx
	addl	(%r11,%rcx,4), %r8d
	cmpl	%esi, %r9d
	jne	.L18
.L7:
	cmpl	ans(%rip), %r8d
	jle	.L1
	movl	%r8d, ans(%rip)
.L1:
	popq	%rbx
	.cfi_remember_state
	.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
.L19:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	calc_score, .-calc_score
	.p2align 4
	.globl	set_data
	.type	set_data, @function
set_data:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$10, %edi
	je	.L74
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %eax
	movslq	%edi, %rdx
	leaq	data(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	1(%rax), %ecx
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	$0, (%rdi,%rdx,4)
	cmpl	$9, %eax
	je	.L29
	movslq	%ecx, %rax
	movq	%rax, 24(%rsp)
	leaq	(%rdi,%rdx,4), %rax
	movq	%rax, 56(%rsp)
.L40:
	movq	56(%rsp), %rax
	movq	24(%rsp), %rcx
	movl	$0, 4(%rax)
	leal	1(%rcx), %eax
	cmpl	$9, %ecx
	je	.L30
	cltq
	leaq	data(%rip), %rcx
	movq	%rax, 16(%rsp)
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 48(%rsp)
.L41:
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	movl	$0, (%rsi)
	leal	1(%rdx), %eax
	cmpl	$9, %edx
	je	.L31
	cltq
	movq	%rsi, 40(%rsp)
	movq	%rax, 8(%rsp)
.L42:
	movq	40(%rsp), %rax
	movl	$0, 4(%rax)
	movq	8(%rsp), %rax
	leal	1(%rax), %r13d
	cmpl	$9, %eax
	je	.L32
	movslq	%r13d, %rax
	leaq	data(%rip), %rcx
	movq	%rax, (%rsp)
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 32(%rsp)
.L43:
	movq	32(%rsp), %r12
	movq	(%rsp), %rax
	movl	$0, (%r12)
	leal	1(%rax), %ebp
	cmpl	$9, %eax
	je	.L33
	movslq	%ebp, %rbp
.L44:
	movl	$0, 4(%r12)
	leal	1(%rbp), %ebx
	cmpl	$9, %ebp
	je	.L34
	movslq	%ebx, %rbx
	leaq	data(%rip), %rax
	leaq	(%rax,%rbx,4), %r13
.L45:
	movl	$0, 0(%r13)
	leal	1(%rbx), %r14d
	cmpl	$9, %ebx
	je	.L35
	movq	%rbx, 64(%rsp)
	movq	%r13, %r15
	movslq	%r14d, %r14
	movq	%r12, %rax
	movq	%r13, 72(%rsp)
	movq	%r15, %r12
	movq	%r14, %r13
	movq	%rax, %r15
	movq	%rbp, %r14
.L47:
	movl	$0, 4(%r12)
	leal	1(%r13), %ebp
	cmpl	$9, %r13d
	je	.L36
	movslq	%ebp, %rcx
	leaq	data(%rip), %rax
	leaq	(%rax,%rcx,4), %rbx
.L46:
	movq	%rbx, %rdx
	movl	%ebp, %eax
.L38:
	movl	$0, (%rdx)
	addl	$1, %eax
	movl	%eax, %edi
	movq	%rdx, 88(%rsp)
	movl	%eax, 84(%rsp)
	call	set_data
	movq	88(%rsp), %rdx
	movl	84(%rsp), %eax
	movl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	$10, %eax
	jne	.L38
	call	calc_score
	addl	$1, %ebp
	addq	$4, %rbx
	movl	$1, -8(%rbx)
	movl	$0, -4(%rbx)
	cmpl	$10, %ebp
	jne	.L46
.L36:
	call	calc_score
	addq	$1, %r13
	addq	$4, %r12
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$0, (%r12)
	movl	$1, -4(%r12)
	cmpl	$10, %r13d
	jne	.L47
	movq	64(%rsp), %rbx
	movq	72(%rsp), %r13
	movq	%r14, %rbp
	movq	%r15, %r12
.L35:
	call	calc_score
	addq	$1, %rbx
	addq	$4, %r13
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$1, -8(%r13)
	movl	$0, -4(%r13)
	cmpl	$10, %ebx
	jne	.L45
.L34:
	call	calc_score
	addq	$1, %rbp
	addq	$4, %r12
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$0, (%r12)
	movl	$1, -4(%r12)
	cmpl	$10, %ebp
	jne	.L44
.L33:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	32(%rsp), %rax
	addq	$1, (%rsp)
	movq	(%rsp), %rsi
	movl	$1, -4(%rax)
	addq	$4, %rax
	movl	$0, -4(%rax)
	movq	%rax, 32(%rsp)
	cmpl	$10, %esi
	jne	.L43
.L32:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	40(%rsp), %rax
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rdi
	movl	$1, (%rax)
	addq	$4, %rax
	movl	$0, (%rax)
	movq	%rax, 40(%rsp)
	cmpl	$10, %edi
	jne	.L42
.L31:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	48(%rsp), %rax
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rcx
	movl	$1, -4(%rax)
	addq	$4, %rax
	movl	$0, -4(%rax)
	movq	%rax, 48(%rsp)
	cmpl	$10, %ecx
	jne	.L41
.L30:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	56(%rsp), %rax
	addq	$1, 24(%rsp)
	movq	24(%rsp), %rsi
	movl	$1, (%rax)
	addq	$4, %rax
	movl	$0, (%rax)
	movq	%rax, 56(%rsp)
	cmpl	$10, %esi
	jne	.L40
.L29:
	call	calc_score
	movl	$1, 36+data(%rip)
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	calc_score
.L74:
	jmp	calc_score
	.cfi_endproc
.LFE24:
	.size	set_data, .-set_data
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L77
	leaq	40+data1(%rip), %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	-40(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L78
	movl	n(%rip), %eax
	addq	$1, %r13
	leaq	60(%rbx), %r12
	cmpl	%r13d, %eax
	jg	.L79
	testl	%eax, %eax
	jle	.L77
	leaq	44+data2(%rip), %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	-44(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L80
	addq	$1, %r13
	addq	$60, %r12
	cmpl	%r13d, n(%rip)
	jg	.L81
.L77:
	movl	$1, %ebx
	leaq	-4+data(%rip), %rbp
.L83:
	movl	$0, 0(%rbp,%rbx,4)
	movl	%ebx, %edi
	call	set_data
	movl	$1, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L83
	call	calc_score
	movl	ans(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	data
	.align 32
	.type	data, @object
	.size	data, 60
data:
	.zero	60
	.globl	data2
	.align 32
	.type	data2, @object
	.size	data2, 6000
data2:
	.zero	6000
	.globl	data1
	.align 32
	.type	data1, @object
	.size	data1, 6000
data1:
	.zero	6000
	.globl	ans
	.data
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.long	-1000000000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	calc_score
	.type	calc_score, @function
calc_score:
.LFB23:
	.cfi_startproc
	endbr64
	pxor	%xmm1, %xmm1
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movdqa	%xmm1, %xmm0
	pcmpeqd	16+data(%rip), %xmm1
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pcmpeqd	data(%rip), %xmm0
	pand	.LC0(%rip), %xmm0
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	36+data(%rip), %r12d
	psubd	%xmm1, %xmm0
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	32+data(%rip), %ebp
	movdqa	%xmm0, %xmm1
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	psrldq	$8, %xmm1
	cmpl	$1, %ebp
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	adcl	$0, %eax
	cmpl	$1, %r12d
	adcl	$0, %eax
	cmpl	$10, %eax
	je	.L1
	movl	n(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L19
	movl	16+data(%rip), %eax
	xorl	%ebx, %ebx
	movl	4+data(%rip), %r15d
	leaq	data2(%rip), %r11
	cmpl	$1, data(%rip)
	movl	8+data(%rip), %r14d
	movl	%eax, -24(%rsp)
	movl	20+data(%rip), %eax
	sete	%bl
	xorl	%r8d, %r8d
	movl	12+data(%rip), %r13d
	xorl	%esi, %esi
	xorl	%r10d, %r10d
	movl	%eax, -20(%rsp)
	movl	24+data(%rip), %eax
	movl	%eax, -16(%rsp)
	movl	28+data(%rip), %eax
	movl	%eax, -12(%rsp)
	leaq	data1(%rip), %rax
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	$1, (%rax)
	movl	%r10d, %edx
	cmove	%ebx, %edx
	cmpl	$1, 4(%rax)
	jne	.L9
	xorl	%ecx, %ecx
	cmpl	$1, %r15d
	sete	%cl
	addl	%ecx, %edx
.L9:
	cmpl	$1, 8(%rax)
	jne	.L10
	xorl	%ecx, %ecx
	cmpl	$1, %r14d
	sete	%cl
	addl	%ecx, %edx
.L10:
	cmpl	$1, 12(%rax)
	jne	.L11
	xorl	%ecx, %ecx
	cmpl	$1, %r13d
	sete	%cl
	addl	%ecx, %edx
.L11:
	cmpl	$1, 16(%rax)
	jne	.L12
	xorl	%ecx, %ecx
	cmpl	$1, -24(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L12:
	cmpl	$1, 20(%rax)
	jne	.L13
	xorl	%ecx, %ecx
	cmpl	$1, -20(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L13:
	cmpl	$1, 24(%rax)
	jne	.L14
	xorl	%ecx, %ecx
	cmpl	$1, -16(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L14:
	cmpl	$1, 28(%rax)
	jne	.L15
	xorl	%ecx, %ecx
	cmpl	$1, -12(%rsp)
	sete	%cl
	addl	%ecx, %edx
.L15:
	cmpl	$1, 32(%rax)
	jne	.L16
	xorl	%ecx, %ecx
	cmpl	$1, %ebp
	sete	%cl
	addl	%ecx, %edx
.L16:
	cmpl	$1, 36(%rax)
	jne	.L17
	xorl	%ecx, %ecx
	cmpl	$1, %r12d
	sete	%cl
	addl	%ecx, %edx
.L17:
	movslq	%esi, %rdi
	movslq	%edx, %rdx
	addl	$1, %esi
	addq	$60, %rax
	movq	%rdi, %rcx
	salq	$4, %rcx
	subq	%rdi, %rcx
	addq	%rdx, %rcx
	addl	(%r11,%rcx,4), %r8d
	cmpl	%esi, %r9d
	jne	.L18
.L7:
	cmpl	ans(%rip), %r8d
	jle	.L1
	movl	%r8d, ans(%rip)
.L1:
	popq	%rbx
	.cfi_remember_state
	.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
.L19:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
	.cfi_endproc
.LFE23:
	.size	calc_score, .-calc_score
	.p2align 4
	.globl	set_data
	.type	set_data, @function
set_data:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$10, %edi
	je	.L74
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edi, %eax
	movslq	%edi, %rdx
	leaq	data(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leal	1(%rax), %ecx
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	$0, (%rdi,%rdx,4)
	cmpl	$9, %eax
	je	.L29
	movslq	%ecx, %rax
	movq	%rax, 24(%rsp)
	leaq	(%rdi,%rdx,4), %rax
	movq	%rax, 56(%rsp)
.L40:
	movq	56(%rsp), %rax
	movq	24(%rsp), %rcx
	movl	$0, 4(%rax)
	leal	1(%rcx), %eax
	cmpl	$9, %ecx
	je	.L30
	cltq
	leaq	data(%rip), %rcx
	movq	%rax, 16(%rsp)
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 48(%rsp)
.L41:
	movq	48(%rsp), %rsi
	movq	16(%rsp), %rdx
	movl	$0, (%rsi)
	leal	1(%rdx), %eax
	cmpl	$9, %edx
	je	.L31
	cltq
	movq	%rsi, 40(%rsp)
	movq	%rax, 8(%rsp)
.L42:
	movq	40(%rsp), %rax
	movl	$0, 4(%rax)
	movq	8(%rsp), %rax
	leal	1(%rax), %r13d
	cmpl	$9, %eax
	je	.L32
	movslq	%r13d, %rax
	leaq	data(%rip), %rcx
	movq	%rax, (%rsp)
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 32(%rsp)
.L43:
	movq	32(%rsp), %r12
	movq	(%rsp), %rax
	movl	$0, (%r12)
	leal	1(%rax), %ebp
	cmpl	$9, %eax
	je	.L33
	movslq	%ebp, %rbp
.L44:
	movl	$0, 4(%r12)
	leal	1(%rbp), %ebx
	cmpl	$9, %ebp
	je	.L34
	movslq	%ebx, %rbx
	leaq	data(%rip), %rax
	leaq	(%rax,%rbx,4), %r13
.L45:
	movl	$0, 0(%r13)
	leal	1(%rbx), %r14d
	cmpl	$9, %ebx
	je	.L35
	movq	%rbx, 64(%rsp)
	movq	%r13, %r15
	movslq	%r14d, %r14
	movq	%r12, %rax
	movq	%r13, 72(%rsp)
	movq	%r15, %r12
	movq	%r14, %r13
	movq	%rax, %r15
	movq	%rbp, %r14
.L47:
	movl	$0, 4(%r12)
	leal	1(%r13), %ebp
	cmpl	$9, %r13d
	je	.L36
	movslq	%ebp, %rcx
	leaq	data(%rip), %rax
	leaq	(%rax,%rcx,4), %rbx
.L46:
	movq	%rbx, %rdx
	movl	%ebp, %eax
.L38:
	movl	$0, (%rdx)
	addl	$1, %eax
	movl	%eax, %edi
	movq	%rdx, 88(%rsp)
	movl	%eax, 84(%rsp)
	call	set_data
	movq	88(%rsp), %rdx
	movl	84(%rsp), %eax
	movl	$1, (%rdx)
	addq	$4, %rdx
	cmpl	$10, %eax
	jne	.L38
	call	calc_score
	addl	$1, %ebp
	addq	$4, %rbx
	movl	$1, -8(%rbx)
	movl	$0, -4(%rbx)
	cmpl	$10, %ebp
	jne	.L46
.L36:
	call	calc_score
	addq	$1, %r13
	addq	$4, %r12
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$0, (%r12)
	movl	$1, -4(%r12)
	cmpl	$10, %r13d
	jne	.L47
	movq	64(%rsp), %rbx
	movq	72(%rsp), %r13
	movq	%r14, %rbp
	movq	%r15, %r12
.L35:
	call	calc_score
	addq	$1, %rbx
	addq	$4, %r13
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$1, -8(%r13)
	movl	$0, -4(%r13)
	cmpl	$10, %ebx
	jne	.L45
.L34:
	call	calc_score
	addq	$1, %rbp
	addq	$4, %r12
	movl	$1, 36+data(%rip)
	call	calc_score
	movl	$0, (%r12)
	movl	$1, -4(%r12)
	cmpl	$10, %ebp
	jne	.L44
.L33:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	32(%rsp), %rax
	addq	$1, (%rsp)
	movq	(%rsp), %rsi
	movl	$1, -4(%rax)
	addq	$4, %rax
	movl	$0, -4(%rax)
	movq	%rax, 32(%rsp)
	cmpl	$10, %esi
	jne	.L43
.L32:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	40(%rsp), %rax
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rdi
	movl	$1, (%rax)
	addq	$4, %rax
	movl	$0, (%rax)
	movq	%rax, 40(%rsp)
	cmpl	$10, %edi
	jne	.L42
.L31:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	48(%rsp), %rax
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rcx
	movl	$1, -4(%rax)
	addq	$4, %rax
	movl	$0, -4(%rax)
	movq	%rax, 48(%rsp)
	cmpl	$10, %ecx
	jne	.L41
.L30:
	call	calc_score
	movl	$1, 36+data(%rip)
	call	calc_score
	movq	56(%rsp), %rax
	addq	$1, 24(%rsp)
	movq	24(%rsp), %rsi
	movl	$1, (%rax)
	addq	$4, %rax
	movl	$0, (%rax)
	movq	%rax, 56(%rsp)
	cmpl	$10, %esi
	jne	.L40
.L29:
	call	calc_score
	movl	$1, 36+data(%rip)
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	calc_score
.L74:
	jmp	calc_score
	.cfi_endproc
.LFE24:
	.size	set_data, .-set_data
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rbp, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L77
	leaq	40+data1(%rip), %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	-40(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L78:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L78
	movl	n(%rip), %eax
	addq	$1, %r13
	leaq	60(%rbx), %r12
	cmpl	%r13d, %eax
	jg	.L79
	testl	%eax, %eax
	jle	.L77
	leaq	44+data2(%rip), %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	-44(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L80
	addq	$1, %r13
	addq	$60, %r12
	cmpl	%r13d, n(%rip)
	jg	.L81
.L77:
	movl	$1, %ebx
	leaq	-4+data(%rip), %rbp
.L83:
	movl	$0, 0(%rbp,%rbx,4)
	movl	%ebx, %edi
	call	set_data
	movl	$1, 0(%rbp,%rbx,4)
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L83
	call	calc_score
	movl	ans(%rip), %edx
	leaq	.LC2(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	data
	.align 32
	.type	data, @object
	.size	data, 60
data:
	.zero	60
	.globl	data2
	.align 32
	.type	data2, @object
	.size	data2, 6000
data2:
	.zero	6000
	.globl	data1
	.align 32
	.type	data1, @object
	.size	data1, 6000
data1:
	.zero	6000
	.globl	ans
	.data
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.long	-1000000000
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 ans = -1000000000, data1[100][15], data2[100][15], data[15], n;

void calc_score(void){
    int index = 0, score = 0, cnt = 0;
    for(int i = 0; i < 10; i++){
        if(data[i] == 0){
            cnt ++;
        }
    }
    if(cnt == 10){
        return ;
    }
    for(int i = 0; i < n; i++){
        index = 0;
        for(int j = 0; j < 10; j++){
            if(data1[i][j] ==1 && data[j] == 1){
                index += 1;
            }
        }
        score += data2[i][index];
    }

    if(score > ans){
        ans = score;
    }
}

void set_data(int pos){
    if(pos == 10){
        calc_score();
        return ;
    }
    if(pos != 10){
        data[pos] = 0;
        set_data(pos + 1);
        data[pos] = 1;
        set_data(pos + 1);
    }
}

int main(void){
    scanf("%d", &n);
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 10; j++){
            scanf("%d", &data1[i][j]);
        }
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 11; j++){
            scanf("%d", &data2[i][j]);
        }
    }
    set_data(0);
    printf("%d\n", ans);
    return 0;
}
2
1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1
0 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1
0 -2 -2 -2 -1 -2 -1 -1 -1 -1 -1
 1
1 1 0 1 0 0 0 1 0 1
3 4 5 6 7 8 9 -4 -3 4 -2
 2
1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1
0 -2 -2 -2 -4 -2 -1 -1 -1 -1 -1
0 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1
 2
1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1
0 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1
0 0 -2 -2 -1 -2 -1 -1 -1 -1 -1
 1
1 1 0 1 0 1 0 1 0 1
3 4 5 6 7 8 10 -4 -3 4 -2
 1
1 1 0 1 0 0 0 1 0 1
3 4 5 11 7 8 9 -2 -3 4 -2
 3
1 1 1 1 1 1 0 0 1 0
0 1 0 1 1 1 1 0 1 0
1 0 1 1 0 1 0 1 0 1
-8 6 -2 -8 -8 4 8 7 -6 2 2
-9 2 0 1 7 -5 0 -2 -6 5 5
6 -6 7 -9 6 -5 8 0 -9 -7 -7
 2
1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1
1 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1
0 0 -2 -2 -1 -2 -1 -1 -1 -1 -1
 1
1 1 0 1 0 0 0 1 0 0
3 1 5 6 7 8 9 -7 -3 4 -2
 1
1 1 0 1 1 0 0 1 0 1
4 4 5 12 7 8 10 -4 -3 4 -2

-1
 8
 -2
 0
 10
 11
 23
 1
 7
 12

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 ans = -1000000000, data1[100][15], data2[100][15], data[15], n;

void calc_score(void){
    int index = 0, score = 0, cnt = 0;
    for(int i = 0; i < 10; i++){
        if(data[i] == 0){
            cnt ++;
        }
    }
    if(cnt == 10){
        return ;
    }
    for(int i = 0; i < n; i++){
        index = 0;
        for(int j = 0; j < 10; j++){
            if(data1[i][j] ==1 && data[j] == 1){
                index += 1;
            }
        }
        score += data2[i][index];
    }

    if(score > ans){
        ans = score;
    }
}

void set_data(int pos){
    if(pos == 10){
        calc_score();
        return ;
    }
    if(pos != 10){
        data[pos] = 0;
        set_data(pos + 1);
        data[pos] = 1;
        set_data(pos + 1);
    }
}

int main(void){
    scanf("%d", &n);
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 10; j++){
            scanf("%d", &data1[i][j]);
        }
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < 11; j++){
            scanf("%d", &data2[i][j]);
        }
    }
    set_data(0);
    printf("%d\n", ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	ans
	.data
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.long	-1000000000
	.globl	data1
	.bss
	.align 32
	.type	data1, @object
	.size	data1, 6000
data1:
	.zero	6000
	.globl	data2
	.align 32
	.type	data2, @object
	.size	data2, 6000
data2:
	.zero	6000
	.globl	data
	.align 32
	.type	data, @object
	.size	data, 60
data:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	calc_score
	.type	calc_score, @function
calc_score:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	addl	$1, -16(%rbp)
.L3:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L4
	cmpl	$10, -16(%rbp)
	je	.L12
	movl	$0, -8(%rbp)
	jmp	.L7
.L11:
	movl	$0, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -24(%rbp)
.L9:
	addl	$1, -4(%rbp)
.L8:
	cmpl	$9, -4(%rbp)
	jle	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L11
	movl	ans(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L1
	movl	-20(%rbp), %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc_score, .-calc_score
	.globl	set_data
	.type	set_data, @function
set_data:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$10, -4(%rbp)
	jne	.L14
	call	calc_score
	jmp	.L13
.L14:
	cmpl	$10, -4(%rbp)
	je	.L13
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	set_data, .-set_data
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	cmpl	$9, -12(%rbp)
	jle	.L19
	addl	$1, -16(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	movl	$0, -8(%rbp)
	jmp	.L21
.L24:
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L22:
	cmpl	$10, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %edi
	call	set_data
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	ans
	.data
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.long	-1000000000
	.globl	data1
	.bss
	.align 32
	.type	data1, @object
	.size	data1, 6000
data1:
	.zero	6000
	.globl	data2
	.align 32
	.type	data2, @object
	.size	data2, 6000
data2:
	.zero	6000
	.globl	data
	.align 32
	.type	data, @object
	.size	data, 60
data:
	.zero	60
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	calc_score
	.type	calc_score, @function
calc_score:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L2
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L3
	addl	$1, -16(%rbp)
.L3:
	addl	$1, -12(%rbp)
.L2:
	cmpl	$9, -12(%rbp)
	jle	.L4
	cmpl	$10, -16(%rbp)
	je	.L12
	movl	$0, -8(%rbp)
	jmp	.L7
.L11:
	movl	$0, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -24(%rbp)
.L9:
	addl	$1, -4(%rbp)
.L8:
	cmpl	$9, -4(%rbp)
	jle	.L10
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -8(%rbp)
.L7:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L11
	movl	ans(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L1
	movl	-20(%rbp), %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calc_score, .-calc_score
	.globl	set_data
	.type	set_data, @function
set_data:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	cmpl	$10, -4(%rbp)
	jne	.L14
	call	calc_score
	jmp	.L13
.L14:
	cmpl	$10, -4(%rbp)
	je	.L13
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	data(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	set_data
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	set_data, .-set_data
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L17
.L20:
	movl	$0, -12(%rbp)
	jmp	.L18
.L19:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data1(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -12(%rbp)
.L18:
	cmpl	$9, -12(%rbp)
	jle	.L19
	addl	$1, -16(%rbp)
.L17:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L20
	movl	$0, -8(%rbp)
	jmp	.L21
.L24:
	movl	$0, -4(%rbp)
	jmp	.L22
.L23:
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	data2(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L22:
	cmpl	$10, -4(%rbp)
	jle	.L23
	addl	$1, -8(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L24
	movl	$0, %edi
	call	set_data
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
