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

```c
#include<stdio.h>

int main(void){
        int n;
        scanf("%d", &n);
        int hole[n], isIn[110], size=0, i;
        for(i=0; i<n; i++) hole[i]=0;
        for(i=0; i<110; i++) isIn[i]=0;

        for(i=0; i<n; i++){
                int c;
                scanf("%d", &c);
                if(c>0){
                        if(isIn[c-1]){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size] = c;
                        size++;
                        isIn[c-1] = 1;
                }else{
                        if(size==0 || !isIn[-c-1] || hole[size-1]!=-c){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size-1] = 0;
                        size--;
                        isIn[-c-1] = 0;
                }
        }
        puts("OK");
        return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"OK"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-504(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$472, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-504(%rbp), %rdx
	movq	%rsp, %rdi
	leaq	15(,%rdx,4), %rax
	movq	%rdx, %rsi
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L5
	salq	$2, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	call	memset@PLT
	movl	$55, %ecx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	-496(%rbp), %rdx
	leaq	-500(%rbp), %r13
	movq	%rdx, %rdi
	rep stosq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L10
	movslq	%r14d, %rcx
	addl	$1, %r15d
	addl	$1, %r14d
	movl	$1, -496(%rbp,%rdx,4)
	movl	%eax, (%rbx,%rcx,4)
	cmpl	%r15d, -504(%rbp)
	jle	.L5
.L12:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-500(%rbp), %eax
	testl	%eax, %eax
	jg	.L26
	testl	%r14d, %r14d
	je	.L10
	movl	%eax, %edx
	notl	%edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %ecx
	testl	%ecx, %ecx
	je	.L10
	subl	$1, %r14d
	movslq	%r14d, %rcx
	addl	(%rbx,%rcx,4), %eax
	jne	.L10
	movl	$0, (%rbx,%rcx,4)
	addl	$1, %r15d
	movl	$0, -496(%rbp,%rdx,4)
	cmpl	%r15d, -504(%rbp)
	jg	.L12
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
.L10:
	leal	1(%r15), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L25:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L27:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"OK"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-504(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$472, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-504(%rbp), %rdx
	movq	%rsp, %rdi
	leaq	15(,%rdx,4), %rax
	movq	%rdx, %rsi
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L5
	salq	$2, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	call	memset@PLT
	movl	$55, %ecx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	-496(%rbp), %rdx
	leaq	-500(%rbp), %r13
	movq	%rdx, %rdi
	rep stosq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L10
	movslq	%r14d, %rcx
	addl	$1, %r15d
	addl	$1, %r14d
	movl	$1, -496(%rbp,%rdx,4)
	movl	%eax, (%rbx,%rcx,4)
	cmpl	%r15d, -504(%rbp)
	jle	.L5
.L12:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-500(%rbp), %eax
	testl	%eax, %eax
	jg	.L26
	testl	%r14d, %r14d
	je	.L10
	movl	%eax, %edx
	notl	%edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %ecx
	testl	%ecx, %ecx
	je	.L10
	subl	$1, %r14d
	movslq	%r14d, %rcx
	addl	(%rbx,%rcx,4), %eax
	jne	.L10
	movl	$0, (%rbx,%rcx,4)
	addl	$1, %r15d
	movl	$0, -496(%rbp,%rdx,4)
	cmpl	%r15d, -504(%rbp)
	jg	.L12
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
.L10:
	leal	1(%r15), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L25:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L27:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"OK"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-504(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$472, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-504(%rbp), %rdx
	movq	%rsp, %rdi
	leaq	15(,%rdx,4), %rax
	movq	%rdx, %rsi
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L5
	salq	$2, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	call	memset@PLT
	movl	$55, %ecx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	-496(%rbp), %rdx
	leaq	-500(%rbp), %r13
	movq	%rdx, %rdi
	rep stosq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L10
	movslq	%r14d, %rcx
	addl	$1, %r15d
	addl	$1, %r14d
	movl	$1, -496(%rbp,%rdx,4)
	movl	%eax, (%rbx,%rcx,4)
	cmpl	%r15d, -504(%rbp)
	jle	.L5
.L12:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-500(%rbp), %eax
	testl	%eax, %eax
	jg	.L26
	testl	%r14d, %r14d
	je	.L10
	movl	%eax, %edx
	notl	%edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %ecx
	testl	%ecx, %ecx
	je	.L10
	subl	$1, %r14d
	movslq	%r14d, %rcx
	addl	(%rbx,%rcx,4), %eax
	jne	.L10
	movl	$0, (%rbx,%rcx,4)
	addl	$1, %r15d
	movl	$0, -496(%rbp,%rdx,4)
	cmpl	%r15d, -504(%rbp)
	jg	.L12
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
.L10:
	leal	1(%r15), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L25:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L27:
	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:
```
```c
#include<stdio.h>

int main(void){
        int n;
        scanf("%d", &n);
        int hole[n], isIn[110], size=0, i;
        for(i=0; i<n; i++) hole[i]=0;
        for(i=0; i<110; i++) isIn[i]=0;

        for(i=0; i<n; i++){
                int c;
                scanf("%d", &c);
                if(c>0){
                        if(isIn[c-1]){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size] = c;
                        size++;
                        isIn[c-1] = 1;
                }else{
                        if(size==0 || !isIn[-c-1] || hole[size-1]!=-c){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size-1] = 0;
                        size--;
                        isIn[-c-1] = 0;
                }
        }
        puts("OK");
        return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(void){
        int n;
        scanf("%d", &n);
        int hole[n], isIn[110], size=0, i;
        for(i=0; i<n; i++) hole[i]=0;
        for(i=0; i<110; i++) isIn[i]=0;

        for(i=0; i<n; i++){
                int c;
                scanf("%d", &c);
                if(c>0){
                        if(isIn[c-1]){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size] = c;
                        size++;
                        isIn[c-1] = 1;
                }else{
                        if(size==0 || !isIn[-c-1] || hole[size-1]!=-c){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size-1] = 0;
                        size--;
                        isIn[-c-1] = 0;
                }
        }
        puts("OK");
        return 0;
}
```

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.
Optimized Assembly Code:

4
1 2 -3 -1

3

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

```c
#include<stdio.h>

int main(void){
        int n;
        scanf("%d", &n);
        int hole[n], isIn[110], size=0, i;
        for(i=0; i<n; i++) hole[i]=0;
        for(i=0; i<110; i++) isIn[i]=0;

        for(i=0; i<n; i++){
                int c;
                scanf("%d", &c);
                if(c>0){
                        if(isIn[c-1]){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size] = c;
                        size++;
                        isIn[c-1] = 1;
                }else{
                        if(size==0 || !isIn[-c-1] || hole[size-1]!=-c){
                                printf("%d\n", i+1);
                                return 0;
                        }
                        hole[size-1] = 0;
                        size--;
                        isIn[-c-1] = 0;
                }
        }
        puts("OK");
        return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"OK"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-504(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$472, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-504(%rbp), %rdx
	movq	%rsp, %rdi
	leaq	15(,%rdx,4), %rax
	movq	%rdx, %rsi
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L5
	salq	$2, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	call	memset@PLT
	movl	$55, %ecx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	-496(%rbp), %rdx
	leaq	-500(%rbp), %r13
	movq	%rdx, %rdi
	rep stosq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L10
	movslq	%r14d, %rcx
	addl	$1, %r15d
	addl	$1, %r14d
	movl	$1, -496(%rbp,%rdx,4)
	movl	%eax, (%rbx,%rcx,4)
	cmpl	%r15d, -504(%rbp)
	jle	.L5
.L12:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-500(%rbp), %eax
	testl	%eax, %eax
	jg	.L26
	testl	%r14d, %r14d
	je	.L10
	movl	%eax, %edx
	notl	%edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %ecx
	testl	%ecx, %ecx
	je	.L10
	subl	$1, %r14d
	movslq	%r14d, %rcx
	addl	(%rbx,%rcx,4), %eax
	jne	.L10
	movl	$0, (%rbx,%rcx,4)
	addl	$1, %r15d
	movl	$0, -496(%rbp,%rdx,4)
	cmpl	%r15d, -504(%rbp)
	jg	.L12
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
.L10:
	leal	1(%r15), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L25:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L27:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"OK"
	.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
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-504(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	leaq	.LC0(%rip), %r12
	pushq	%rbx
	movq	%r12, %rdi
	subq	$472, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-504(%rbp), %rdx
	movq	%rsp, %rdi
	leaq	15(,%rdx,4), %rax
	movq	%rdx, %rsi
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rdi
	andq	$-16, %rcx
	cmpq	%rdi, %rsp
	je	.L3
.L24:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L24
.L3:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L25
.L4:
	movq	%rsp, %rbx
	testl	%esi, %esi
	jle	.L5
	salq	$2, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	call	memset@PLT
	movl	$55, %ecx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	-496(%rbp), %rdx
	leaq	-500(%rbp), %r13
	movq	%rdx, %rdi
	rep stosq
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L26:
	leal	-1(%rax), %edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %esi
	testl	%esi, %esi
	jne	.L10
	movslq	%r14d, %rcx
	addl	$1, %r15d
	addl	$1, %r14d
	movl	$1, -496(%rbp,%rdx,4)
	movl	%eax, (%rbx,%rcx,4)
	cmpl	%r15d, -504(%rbp)
	jle	.L5
.L12:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-500(%rbp), %eax
	testl	%eax, %eax
	jg	.L26
	testl	%r14d, %r14d
	je	.L10
	movl	%eax, %edx
	notl	%edx
	movslq	%edx, %rdx
	movl	-496(%rbp,%rdx,4), %ecx
	testl	%ecx, %ecx
	je	.L10
	subl	$1, %r14d
	movslq	%r14d, %rcx
	addl	(%rbx,%rcx,4), %eax
	jne	.L10
	movl	$0, (%rbx,%rcx,4)
	addl	$1, %r15d
	movl	$0, -496(%rbp,%rdx,4)
	cmpl	%r15d, -504(%rbp)
	jg	.L12
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L13
.L10:
	leal	1(%r15), %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L13:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
.L25:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rcx)
	jmp	.L4
.L27:
	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:
```