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

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

int main(void)
{
	int i,j,n;
	scanf("%d",&n);
	int k;
	
	int num;
    int n_test;
    int person, honest;
    int sum=0;
    int max=0;

	num = (int)pow(2,n);
	
	int a[num][n];
    int judge[num];

    for(i=0;i<num;i++)
        judge[i]=1;

	for(i=0;i<num;i++){
        for(j=0;j<n;j++){
          	if(i%(int)pow(2,j+1)>=pow(2,j))
	        	a[i][n-1-j]=1;
          	else
              	a[i][n-1-j]=0;
		}
	}

for(i=0;i<n;i++){
    scanf("%d",&n_test);

    for(j=0;j<n_test;j++){
        scanf("%d%d",&person,&honest);

        for(k=0;k<num;k++){
            if(a[k][i]==1){
                if(a[k][person-1]!=honest)
                    judge[k]=0;
            }
        }
    }
}

for(i=0;i<num;i++){
    if(judge[i]==1){
        for(j=0;j<n;j++)
            sum+=a[i][j];
        if(sum>max)
            max = sum;
            sum =0;
    }
}

printf("%d",max);

	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC2:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -232(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	-136(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -100(%rbp)
	movl	-136(%rbp), %esi
	movl	-100(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -120(%rbp)
.L8:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L16:
	movl	$0, -116(%rbp)
	jmp	.L11
.L15:
	movl	-116(%rbp), %eax
	addl	$1, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %ecx
	movl	-120(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -160(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-116(%rbp), %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-160(%rbp), %xmm2
	comisd	%xmm0, %xmm2
	jb	.L33
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L14
.L33:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
.L14:
	addl	$1, -116(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	addl	$1, -120(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L16
	movl	$0, -120(%rbp)
	jmp	.L17
.L23:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L18
.L22:
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
.L20:
	addl	$1, -112(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L21
	addl	$1, -116(%rbp)
.L18:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	addl	$1, -120(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, -120(%rbp)
	jmp	.L24
.L29:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L25
	movl	$0, -116(%rbp)
	jmp	.L26
.L27:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L26:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L27
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jle	.L28
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
.L28:
	movl	$0, -108(%rbp)
.L25:
	addl	$1, -120(%rbp)
.L24:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L29
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-232(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-72(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %r15
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r15d, %xmm1
	movq	%rax, %xmm0
	movl	%r15d, -88(%rbp)
	call	pow@PLT
	leaq	0(,%r15,4), %rax
	movq	%rsp, %rcx
	cvttsd2sil	%xmm0, %esi
	movq	%rax, -120(%rbp)
	movslq	%esi, %rbx
	movl	%esi, -92(%rbp)
	imulq	%rbx, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L58
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L59
.L4:
	leaq	15(,%rbx,4), %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r14
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L60
.L7:
	movl	-92(%rbp), %edi
	movq	%rsp, %rsi
	movq	%rsi, -112(%rbp)
	testl	%edi, %edi
	je	.L8
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L36
	shrl	$2, %edi
	movdqa	.LC2(%rip), %xmm0
	movq	%rsi, %rax
	movl	%edi, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsi,%rdx), %rdx
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	movl	-92(%rbp), %esi
	movl	%esi, %eax
	andl	$-4, %eax
	andl	$3, %esi
	je	.L11
.L9:
	movq	-112(%rbp), %rsi
	movslq	%eax, %rdx
	movl	-92(%rbp), %edi
	leaq	(%rsi,%rdx,4), %rdx
	leal	1(%rax), %esi
	movl	$1, (%rdx)
	cmpl	%esi, %edi
	jle	.L11
	addl	$2, %eax
	movl	$1, 4(%rdx)
	cmpl	%eax, %edi
	jle	.L11
	movl	$1, 8(%rdx)
.L11:
	movq	-120(%rbp), %rax
	movl	-88(%rbp), %edi
	movq	%rax, %r12
	shrq	$2, %r12
	testl	%edi, %edi
	jle	.L12
	addq	%r14, %rax
	movq	%r14, -136(%rbp)
	movq	%rax, -104(%rbp)
	xorl	%eax, %eax
	movq	%r12, -128(%rbp)
	movl	%edi, %r12d
	movq	%rbx, -144(%rbp)
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-104(%rbp), %r14
	xorl	%r15d, %r15d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L61:
	movl	$0, -4(%r14)
	subq	$4, %r14
	cmpl	%r13d, %r12d
	je	.L16
.L15:
	movl	%r13d, %r15d
.L18:
	leal	1(%r15), %r13d
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r13d, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r15d, %xmm1
	movsd	%xmm0, -88(%rbp)
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-88(%rbp), %xmm2
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	cltd
	cvttsd2sil	%xmm2, %edi
	idivl	%edi
	cvtsi2sdl	%edx, %xmm1
	comisd	%xmm0, %xmm1
	jb	.L61
	movl	$1, -4(%r14)
	subq	$4, %r14
	cmpl	%r13d, %r12d
	jne	.L15
.L16:
	movq	-120(%rbp), %rdi
	addl	$1, %ebx
	addq	%rdi, -104(%rbp)
	cmpl	%ebx, -92(%rbp)
	jne	.L13
	movq	-128(%rbp), %r12
	movq	-136(%rbp), %r14
	movq	-144(%rbp), %rbx
.L17:
	leaq	-68(%rbp), %rax
	movl	$0, -120(%rbp)
	movq	%rax, -128(%rbp)
	.p2align 4,,10
	.p2align 3
.L20:
	movq	-128(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %r10d
	testl	%r10d, %r10d
	jle	.L23
	movslq	-120(%rbp), %r15
	leaq	-60(%rbp), %rax
	xorl	%r13d, %r13d
	movq	%rax, -104(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	%r15, %rax
	movq	%r12, %r15
	movq	%rbx, %r12
	movl	%r13d, %ebx
	movq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L19:
	movq	-104(%rbp), %rdx
	movq	-88(%rbp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %r9d
	testl	%r9d, %r9d
	je	.L26
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %edi
	xorl	%edx, %edx
	movq	-112(%rbp), %r8
	leal	-1(%rax), %esi
	movslq	%esi, %rsi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rdx
	cmpq	%r12, %rdx
	je	.L26
.L25:
	movslq	%edx, %rax
	imulq	%r15, %rax
	leaq	0(%r13,%rax), %rcx
	cmpl	$1, (%r14,%rcx,4)
	jne	.L24
	addq	%rsi, %rax
	cmpl	%edi, (%r14,%rax,4)
	je	.L24
	movl	$0, (%r8,%rdx,4)
	addq	$1, %rdx
	cmpq	%r12, %rdx
	jne	.L25
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebx
	cmpl	%ebx, -68(%rbp)
	jg	.L19
	movq	%r12, %rbx
	movq	%r15, %r12
.L23:
	addl	$1, -120(%rbp)
	movl	-72(%rbp), %eax
	movl	-120(%rbp), %esi
	cmpl	%esi, %eax
	jg	.L20
	movl	-92(%rbp), %r8d
	movl	%eax, -88(%rbp)
	testl	%r8d, %r8d
	je	.L34
.L12:
	movl	-88(%rbp), %ebx
	movq	%r12, -104(%rbp)
	movq	%r14, %rsi
	xorl	%r11d, %r11d
	movl	-92(%rbp), %r10d
	leaq	0(,%r12,4), %r9
	movl	%ebx, %eax
	leal	-1(%rbx), %r15d
	andl	$-4, %ebx
	shrl	$2, %eax
	movl	%ebx, %r8d
	movq	-112(%rbp), %rbx
	leal	-1(%rax), %edx
	xorl	%eax, %eax
	addq	$1, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rax
	addq	%r9, %rsi
	cmpl	%eax, %r10d
	jle	.L27
.L33:
	cmpl	$1, (%rbx,%rax,4)
	movslq	%eax, %rdx
	jne	.L28
	movl	-88(%rbp), %edi
	testl	%edi, %edi
	jle	.L38
	cmpl	$2, %r15d
	jbe	.L39
	leaq	(%rcx,%rsi), %r13
	movq	%rsi, %rdi
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L31:
	movdqu	(%rdi), %xmm3
	addq	$16, %rdi
	paddd	%xmm3, %xmm0
	cmpq	%rdi, %r13
	jne	.L31
	movdqa	%xmm0, %xmm1
	movl	%r8d, %r12d
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edi
	cmpl	-88(%rbp), %r8d
	je	.L29
.L30:
	imulq	-104(%rbp), %rdx
	movq	%rdx, %r13
	movslq	%r12d, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
	leal	1(%r12), %edx
	cmpl	%edx, -88(%rbp)
	jle	.L29
	movslq	%edx, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
	leal	2(%r12), %edx
	cmpl	%edx, -88(%rbp)
	jle	.L29
	movslq	%edx, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
.L29:
	cmpl	%edi, %r11d
	cmovl	%edi, %r11d
	addq	$1, %rax
	addq	%r9, %rsi
	cmpl	%eax, %r10d
	jg	.L33
.L27:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L34:
	.cfi_restore_state
	xorl	%r11d, %r11d
	jmp	.L27
.L39:
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	jmp	.L30
.L38:
	xorl	%edi, %edi
	jmp	.L29
.L8:
	cmpl	$0, -88(%rbp)
	jle	.L34
	movq	-120(%rbp), %r12
	shrq	$2, %r12
	jmp	.L17
.L36:
	xorl	%eax, %eax
	jmp	.L9
.L60:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC3:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-72(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-72(%rbp), %r15
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r15d, %xmm1
	movq	%rax, %xmm0
	movl	%r15d, -88(%rbp)
	call	pow@PLT
	leaq	0(,%r15,4), %rax
	movq	%rsp, %rcx
	cvttsd2sil	%xmm0, %esi
	movq	%rax, -120(%rbp)
	movslq	%esi, %rbx
	movl	%esi, -92(%rbp)
	imulq	%rbx, %rax
	addq	$15, %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rcx
	andq	$-16, %rdx
	cmpq	%rcx, %rsp
	je	.L3
.L58:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rcx, %rsp
	jne	.L58
.L3:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L59
.L4:
	leaq	15(,%rbx,4), %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r14
	movq	%rdx, %rax
	andq	$-4096, %rdx
	andq	$-16, %rax
	subq	%rdx, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L59:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L6:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L60
.L7:
	movl	-92(%rbp), %edi
	movq	%rsp, %rsi
	movq	%rsi, -112(%rbp)
	testl	%edi, %edi
	je	.L8
	leal	-1(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L36
	shrl	$2, %edi
	movdqa	.LC2(%rip), %xmm0
	movq	%rsi, %rax
	movl	%edi, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%rsi,%rdx), %rdx
.L10:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L10
	movl	-92(%rbp), %esi
	movl	%esi, %eax
	andl	$-4, %eax
	andl	$3, %esi
	je	.L11
.L9:
	movq	-112(%rbp), %rsi
	movslq	%eax, %rdx
	movl	-92(%rbp), %edi
	leaq	(%rsi,%rdx,4), %rdx
	leal	1(%rax), %esi
	movl	$1, (%rdx)
	cmpl	%esi, %edi
	jle	.L11
	addl	$2, %eax
	movl	$1, 4(%rdx)
	cmpl	%eax, %edi
	jle	.L11
	movl	$1, 8(%rdx)
.L11:
	movq	-120(%rbp), %rax
	movl	-88(%rbp), %edi
	movq	%rax, %r12
	shrq	$2, %r12
	testl	%edi, %edi
	jle	.L12
	addq	%r14, %rax
	movq	%r14, -136(%rbp)
	movq	%rax, -104(%rbp)
	xorl	%eax, %eax
	movq	%r12, -128(%rbp)
	movl	%edi, %r12d
	movq	%rbx, -144(%rbp)
	movl	%eax, %ebx
	.p2align 4,,10
	.p2align 3
.L13:
	movq	-104(%rbp), %r14
	xorl	%r15d, %r15d
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L61:
	movl	$0, -4(%r14)
	subq	$4, %r14
	cmpl	%r13d, %r12d
	je	.L16
.L15:
	movl	%r13d, %r15d
.L18:
	leal	1(%r15), %r13d
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r13d, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	pxor	%xmm1, %xmm1
	movq	.LC1(%rip), %rax
	cvtsi2sdl	%r15d, %xmm1
	movsd	%xmm0, -88(%rbp)
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-88(%rbp), %xmm2
	movl	%ebx, %eax
	pxor	%xmm1, %xmm1
	cltd
	cvttsd2sil	%xmm2, %edi
	idivl	%edi
	cvtsi2sdl	%edx, %xmm1
	comisd	%xmm0, %xmm1
	jb	.L61
	movl	$1, -4(%r14)
	subq	$4, %r14
	cmpl	%r13d, %r12d
	jne	.L15
.L16:
	movq	-120(%rbp), %rdi
	addl	$1, %ebx
	addq	%rdi, -104(%rbp)
	cmpl	%ebx, -92(%rbp)
	jne	.L13
	movq	-128(%rbp), %r12
	movq	-136(%rbp), %r14
	movq	-144(%rbp), %rbx
.L17:
	leaq	-68(%rbp), %rax
	movl	$0, -120(%rbp)
	movq	%rax, -128(%rbp)
	.p2align 4,,10
	.p2align 3
.L20:
	movq	-128(%rbp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-68(%rbp), %r10d
	testl	%r10d, %r10d
	jle	.L23
	movslq	-120(%rbp), %r15
	leaq	-60(%rbp), %rax
	xorl	%r13d, %r13d
	movq	%rax, -104(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	%r15, %rax
	movq	%r12, %r15
	movq	%rbx, %r12
	movl	%r13d, %ebx
	movq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L19:
	movq	-104(%rbp), %rdx
	movq	-88(%rbp), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-92(%rbp), %r9d
	testl	%r9d, %r9d
	je	.L26
	movl	-64(%rbp), %eax
	movl	-60(%rbp), %edi
	xorl	%edx, %edx
	movq	-112(%rbp), %r8
	leal	-1(%rax), %esi
	movslq	%esi, %rsi
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$1, %rdx
	cmpq	%r12, %rdx
	je	.L26
.L25:
	movslq	%edx, %rax
	imulq	%r15, %rax
	leaq	0(%r13,%rax), %rcx
	cmpl	$1, (%r14,%rcx,4)
	jne	.L24
	addq	%rsi, %rax
	cmpl	%edi, (%r14,%rax,4)
	je	.L24
	movl	$0, (%r8,%rdx,4)
	addq	$1, %rdx
	cmpq	%r12, %rdx
	jne	.L25
	.p2align 4,,10
	.p2align 3
.L26:
	addl	$1, %ebx
	cmpl	%ebx, -68(%rbp)
	jg	.L19
	movq	%r12, %rbx
	movq	%r15, %r12
.L23:
	addl	$1, -120(%rbp)
	movl	-72(%rbp), %eax
	movl	-120(%rbp), %esi
	cmpl	%esi, %eax
	jg	.L20
	movl	-92(%rbp), %r8d
	movl	%eax, -88(%rbp)
	testl	%r8d, %r8d
	je	.L34
.L12:
	movl	-88(%rbp), %ebx
	movq	%r12, -104(%rbp)
	movq	%r14, %rsi
	xorl	%r11d, %r11d
	movl	-92(%rbp), %r10d
	leaq	0(,%r12,4), %r9
	movl	%ebx, %eax
	leal	-1(%rbx), %r15d
	andl	$-4, %ebx
	shrl	$2, %eax
	movl	%ebx, %r8d
	movq	-112(%rbp), %rbx
	leal	-1(%rax), %edx
	xorl	%eax, %eax
	addq	$1, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rax
	addq	%r9, %rsi
	cmpl	%eax, %r10d
	jle	.L27
.L33:
	cmpl	$1, (%rbx,%rax,4)
	movslq	%eax, %rdx
	jne	.L28
	movl	-88(%rbp), %edi
	testl	%edi, %edi
	jle	.L38
	cmpl	$2, %r15d
	jbe	.L39
	leaq	(%rcx,%rsi), %r13
	movq	%rsi, %rdi
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L31:
	movdqu	(%rdi), %xmm3
	addq	$16, %rdi
	paddd	%xmm3, %xmm0
	cmpq	%rdi, %r13
	jne	.L31
	movdqa	%xmm0, %xmm1
	movl	%r8d, %r12d
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edi
	cmpl	-88(%rbp), %r8d
	je	.L29
.L30:
	imulq	-104(%rbp), %rdx
	movq	%rdx, %r13
	movslq	%r12d, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
	leal	1(%r12), %edx
	cmpl	%edx, -88(%rbp)
	jle	.L29
	movslq	%edx, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
	leal	2(%r12), %edx
	cmpl	%edx, -88(%rbp)
	jle	.L29
	movslq	%edx, %rdx
	addq	%r13, %rdx
	addl	(%r14,%rdx,4), %edi
.L29:
	cmpl	%edi, %r11d
	cmovl	%edi, %r11d
	addq	$1, %rax
	addq	%r9, %rsi
	cmpl	%eax, %r10d
	jg	.L33
.L27:
	xorl	%eax, %eax
	movl	%r11d, %edx
	movl	$1, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L34:
	.cfi_restore_state
	xorl	%r11d, %r11d
	jmp	.L27
.L39:
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	jmp	.L30
.L38:
	xorl	%edi, %edi
	jmp	.L29
.L8:
	cmpl	$0, -88(%rbp)
	jle	.L34
	movq	-120(%rbp), %r12
	shrq	$2, %r12
	jmp	.L17
.L36:
	xorl	%eax, %eax
	jmp	.L9
.L60:
	orq	$0, -8(%rsp,%rax)
	jmp	.L7
.L62:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.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>
#include<math.h>

int main(void)
{
	int i,j,n;
	scanf("%d",&n);
	int k;
	
	int num;
    int n_test;
    int person, honest;
    int sum=0;
    int max=0;

	num = (int)pow(2,n);
	
	int a[num][n];
    int judge[num];

    for(i=0;i<num;i++)
        judge[i]=1;

	for(i=0;i<num;i++){
        for(j=0;j<n;j++){
          	if(i%(int)pow(2,j+1)>=pow(2,j))
	        	a[i][n-1-j]=1;
          	else
              	a[i][n-1-j]=0;
		}
	}

for(i=0;i<n;i++){
    scanf("%d",&n_test);

    for(j=0;j<n_test;j++){
        scanf("%d%d",&person,&honest);

        for(k=0;k<num;k++){
            if(a[k][i]==1){
                if(a[k][person-1]!=honest)
                    judge[k]=0;
            }
        }
    }
}

for(i=0;i<num;i++){
    if(judge[i]==1){
        for(j=0;j<n;j++)
            sum+=a[i][j];
        if(sum>max)
            max = sum;
            sum =0;
    }
}

printf("%d",max);

	
	return 0;
}
3
2
2 1
3 0
2
3 1
1 0
2
1 1
2 -1
 2
1
2 0
1
1 1
 3
1
3 1
1
1 1
1
2 0
 3
1
3 1
1
1 1
0
2 0
 3
2
2 1
3 0
2
3 1
1 0
2
1 0
2 0
 3
1
1 1
1
1 1
0
2 0
 3
2
2 0
3 0
2
3 1
1 0
2
1 1
2 0
 3
1
2 1
1
2 1
1
2 0
 3
2
2 0
3 0
2
3 1
1 0
2
1 1
2 -1
 3
1
3 0
1
1 1
1
2 0

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

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

int main(void)
{
	int i,j,n;
	scanf("%d",&n);
	int k;
	
	int num;
    int n_test;
    int person, honest;
    int sum=0;
    int max=0;

	num = (int)pow(2,n);
	
	int a[num][n];
    int judge[num];

    for(i=0;i<num;i++)
        judge[i]=1;

	for(i=0;i<num;i++){
        for(j=0;j<n;j++){
          	if(i%(int)pow(2,j+1)>=pow(2,j))
	        	a[i][n-1-j]=1;
          	else
              	a[i][n-1-j]=0;
		}
	}

for(i=0;i<n;i++){
    scanf("%d",&n_test);

    for(j=0;j<n_test;j++){
        scanf("%d%d",&person,&honest);

        for(k=0;k<num;k++){
            if(a[k][i]==1){
                if(a[k][person-1]!=honest)
                    judge[k]=0;
            }
        }
    }
}

for(i=0;i<num;i++){
    if(judge[i]==1){
        for(j=0;j<n;j++)
            sum+=a[i][j];
        if(sum>max)
            max = sum;
            sum =0;
    }
}

printf("%d",max);

	
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC2:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -232(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	-136(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -100(%rbp)
	movl	-136(%rbp), %esi
	movl	-100(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -120(%rbp)
.L8:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L16:
	movl	$0, -116(%rbp)
	jmp	.L11
.L15:
	movl	-116(%rbp), %eax
	addl	$1, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %ecx
	movl	-120(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -160(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-116(%rbp), %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-160(%rbp), %xmm2
	comisd	%xmm0, %xmm2
	jb	.L33
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L14
.L33:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
.L14:
	addl	$1, -116(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	addl	$1, -120(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L16
	movl	$0, -120(%rbp)
	jmp	.L17
.L23:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L18
.L22:
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
.L20:
	addl	$1, -112(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L21
	addl	$1, -116(%rbp)
.L18:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	addl	$1, -120(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, -120(%rbp)
	jmp	.L24
.L29:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L25
	movl	$0, -116(%rbp)
	jmp	.L26
.L27:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L26:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L27
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jle	.L28
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
.L28:
	movl	$0, -108(%rbp)
.L25:
	addl	$1, -120(%rbp)
.L24:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L29
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-232(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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"
.LC2:
	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -232(%rbp)
	leaq	-136(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	-136(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -100(%rbp)
	movl	-136(%rbp), %esi
	movl	-100(%rbp), %edi
	movslq	%esi, %rax
	subq	$1, %rax
	movq	%rax, -96(%rbp)
	movslq	%esi, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movslq	%esi, %rax
	leaq	0(,%rax,4), %rbx
	movslq	%edi, %rax
	subq	$1, %rax
	movq	%rax, -88(%rbp)
	movslq	%esi, %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	movslq	%edi, %rax
	movq	%rax, -176(%rbp)
	movq	$0, -168(%rbp)
	movq	-160(%rbp), %r8
	movq	-152(%rbp), %r9
	movq	%r9, %rdx
	movq	-176(%rbp), %r10
	movq	-168(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movslq	%edi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rcx
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rcx
	movq	%rcx, %rdx
	movslq	%esi, %rdx
	movslq	%edi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -208(%rbp)
	movq	$0, -200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -224(%rbp)
	movq	$0, -216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L8
.L9:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	$1, (%rax,%rdx,4)
	addl	$1, -120(%rbp)
.L8:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L9
	movl	$0, -120(%rbp)
	jmp	.L10
.L16:
	movl	$0, -116(%rbp)
	jmp	.L11
.L15:
	movl	-116(%rbp), %eax
	addl	$1, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	cvttsd2sil	%xmm0, %ecx
	movl	-120(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -160(%rbp)
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-116(%rbp), %xmm0
	movq	.LC1(%rip), %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	-160(%rbp), %xmm2
	comisd	%xmm0, %xmm2
	jb	.L33
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$1, (%rax,%rdx,4)
	jmp	.L14
.L33:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	subl	-116(%rbp), %eax
	movl	%eax, %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	$0, (%rax,%rdx,4)
.L14:
	addl	$1, -116(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
	addl	$1, -120(%rbp)
.L10:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L16
	movl	$0, -120(%rbp)
	jmp	.L17
.L23:
	leaq	-132(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -116(%rbp)
	jmp	.L18
.L22:
	leaq	-124(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L19
.L21:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L20
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movslq	%edx, %rsi
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	movq	-64(%rbp), %rax
	movl	-112(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
.L20:
	addl	$1, -112(%rbp)
.L19:
	movl	-112(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L21
	addl	$1, -116(%rbp)
.L18:
	movl	-132(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L22
	addl	$1, -120(%rbp)
.L17:
	movl	-136(%rbp), %eax
	cmpl	%eax, -120(%rbp)
	jl	.L23
	movl	$0, -120(%rbp)
	jmp	.L24
.L29:
	movq	-64(%rbp), %rax
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	$1, %eax
	jne	.L25
	movl	$0, -116(%rbp)
	jmp	.L26
.L27:
	movq	%rbx, %rcx
	shrq	$2, %rcx
	movq	-80(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rsi
	movl	-120(%rbp), %edx
	movslq	%edx, %rdx
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movl	(%rax,%rdx,4), %eax
	addl	%eax, -108(%rbp)
	addl	$1, -116(%rbp)
.L26:
	movl	-136(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L27
	movl	-108(%rbp), %eax
	cmpl	-104(%rbp), %eax
	jle	.L28
	movl	-108(%rbp), %eax
	movl	%eax, -104(%rbp)
.L28:
	movl	$0, -108(%rbp)
.L25:
	addl	$1, -120(%rbp)
.L24:
	movl	-120(%rbp), %eax
	cmpl	-100(%rbp), %eax
	jl	.L29
	movl	-104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-232(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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:
