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 <stdlib.h>
#include <string.h>
#include <ctype.h>

#define DEBUG printf

int main() {
  long* box;
  box = (long*)calloc(100001, sizeof(long));
  long* duplicated_box = (long*)calloc(100000, sizeof(long));
  long duplicated_num = 0;
  long duplicated_sum = 0;
  long i,N, a;
  scanf("%ld%*c", &N);
  for (i = 0; i < N; i++) {
    scanf("%ld%*c", &a);
    box[a] += 1;
  }
  for (i = 1; i < 100001; i++) {
    if (box[i] > 1) {
      duplicated_box[duplicated_num++] = box[i] -1;
      duplicated_sum += box[i] -1;
    }
  }
  if (duplicated_sum % 2 == 0)
    printf("%ld\n", N - duplicated_sum);
  else
    printf("%ld\n", N - 1 - duplicated_sum);
  /* if (duplicated_num == 0) { */
  /*   printf("%ld\n", N); */
  /* } else if (duplicated_num == 1) { */
  /*   printf("%ld\n", N - duplicated_box[0] -1); */
  /* } else if (duplicated_num % 2 == 0) { */
  /*   for (i = 0; i < duplicated_num; i++) { */
  /*     N -= duplicated_box[i]; */
  /*   } */
  /*   printf("%ld\n", N); */
  /* } else { */
  /* } */
  free(box);
  free(duplicated_box);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%*c"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$8, %esi
	movl	$100001, %edi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$8, %esi
	movl	$100000, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L3:
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addq	$1, %rdx
	movq	%rdx, (%rax)
	addq	$1, -32(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L3
	movq	$1, -32(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	$1, %rax
	jle	.L5
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -48(%rbp)
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	subq	$1, %rax
	addq	%rax, -40(%rbp)
.L5:
	addq	$1, -32(%rbp)
.L4:
	cmpq	$100000, -32(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-64(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%*c"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$8, %esi
	movl	$100001, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	movl	$8, %esi
	movl	$100000, %edi
	movq	%rax, %r12
	call	calloc@PLT
	leaq	8(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbp
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	testq	%rdx, %rdx
	jle	.L2
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	8(%rsp), %rdx
	addq	$1, (%r12,%rax,8)
	cmpq	%rbx, %rdx
	jg	.L3
.L2:
	leaq	8(%r12), %rcx
	leaq	800008(%r12), %r8
	xorl	%edi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rcx), %rax
	cmpq	$1, %rax
	jle	.L4
	subq	$1, %rax
	movq	%rax, 0(%rbp,%rsi,8)
	addq	%rax, %rdi
	addq	$1, %rsi
.L4:
	addq	$8, %rcx
	cmpq	%rcx, %r8
	jne	.L5
	testb	$1, %dil
	je	.L12
	subq	$1, %rdx
.L12:
	subq	%rdi, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld%*c"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$8, %esi
	movl	$100001, %edi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	calloc@PLT
	movl	$8, %esi
	movl	$100000, %edi
	movq	%rax, %r12
	call	calloc@PLT
	leaq	8(%rsp), %rsi
	movq	%r13, %rdi
	movq	%rax, %rbp
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rdx
	testq	%rdx, %rdx
	jle	.L2
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	movq	8(%rsp), %rdx
	addq	$1, (%r12,%rax,8)
	cmpq	%rbx, %rdx
	jg	.L3
.L2:
	leaq	8(%r12), %rcx
	leaq	800008(%r12), %r8
	xorl	%edi, %edi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	(%rcx), %rax
	cmpq	$1, %rax
	jle	.L4
	subq	$1, %rax
	movq	%rax, 0(%rbp,%rsi,8)
	addq	%rax, %rdi
	addq	$1, %rsi
.L4:
	addq	$8, %rcx
	cmpq	%rcx, %r8
	jne	.L5
	testb	$1, %dil
	je	.L12
	subq	$1, %rdx
.L12:
	subq	%rdi, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

#define DEBUG printf

int main() {
  long* box;
  box = (long*)calloc(100001, sizeof(long));
  long* duplicated_box = (long*)calloc(100000, sizeof(long));
  long duplicated_num = 0;
  long duplicated_sum = 0;
  long i,N, a;
  scanf("%ld%*c", &N);
  for (i = 0; i < N; i++) {
    scanf("%ld%*c", &a);
    box[a] += 1;
  }
  for (i = 1; i < 100001; i++) {
    if (box[i] > 1) {
      duplicated_box[duplicated_num++] = box[i] -1;
      duplicated_sum += box[i] -1;
    }
  }
  if (duplicated_sum % 2 == 0)
    printf("%ld\n", N - duplicated_sum);
  else
    printf("%ld\n", N - 1 - duplicated_sum);
  /* if (duplicated_num == 0) { */
  /*   printf("%ld\n", N); */
  /* } else if (duplicated_num == 1) { */
  /*   printf("%ld\n", N - duplicated_box[0] -1); */
  /* } else if (duplicated_num % 2 == 0) { */
  /*   for (i = 0; i < duplicated_num; i++) { */
  /*     N -= duplicated_box[i]; */
  /*   } */
  /*   printf("%ld\n", N); */
  /* } else { */
  /* } */
  free(box);
  free(duplicated_box);
  return 0;
}


5
1 2 0 3 7
 15
1 3 5 2 1 3 2 0 8 6 2 6 11 1 1
 5
2 2 -1 9 16
 15
1 12 6 0 1 2 2 0 8 6 4 6 21 1 3

5
 7
 3
 9

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 <stdlib.h>
#include <string.h>
#include <ctype.h>

#define DEBUG printf

int main() {
  long* box;
  box = (long*)calloc(100001, sizeof(long));
  long* duplicated_box = (long*)calloc(100000, sizeof(long));
  long duplicated_num = 0;
  long duplicated_sum = 0;
  long i,N, a;
  scanf("%ld%*c", &N);
  for (i = 0; i < N; i++) {
    scanf("%ld%*c", &a);
    box[a] += 1;
  }
  for (i = 1; i < 100001; i++) {
    if (box[i] > 1) {
      duplicated_box[duplicated_num++] = box[i] -1;
      duplicated_sum += box[i] -1;
    }
  }
  if (duplicated_sum % 2 == 0)
    printf("%ld\n", N - duplicated_sum);
  else
    printf("%ld\n", N - 1 - duplicated_sum);
  /* if (duplicated_num == 0) { */
  /*   printf("%ld\n", N); */
  /* } else if (duplicated_num == 1) { */
  /*   printf("%ld\n", N - duplicated_box[0] -1); */
  /* } else if (duplicated_num % 2 == 0) { */
  /*   for (i = 0; i < duplicated_num; i++) { */
  /*     N -= duplicated_box[i]; */
  /*   } */
  /*   printf("%ld\n", N); */
  /* } else { */
  /* } */
  free(box);
  free(duplicated_box);
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%*c"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$8, %esi
	movl	$100001, %edi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$8, %esi
	movl	$100000, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L3:
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addq	$1, %rdx
	movq	%rdx, (%rax)
	addq	$1, -32(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L3
	movq	$1, -32(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	$1, %rax
	jle	.L5
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -48(%rbp)
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	subq	$1, %rax
	addq	%rax, -40(%rbp)
.L5:
	addq	$1, -32(%rbp)
.L4:
	cmpq	$100000, -32(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-64(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld%*c"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$8, %esi
	movl	$100001, %edi
	call	calloc@PLT
	movq	%rax, -24(%rbp)
	movl	$8, %esi
	movl	$100000, %edi
	call	calloc@PLT
	movq	%rax, -16(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	jmp	.L2
.L3:
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	addq	$1, %rdx
	movq	%rdx, (%rax)
	addq	$1, -32(%rbp)
.L2:
	movq	-64(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L3
	movq	$1, -32(%rbp)
	jmp	.L4
.L6:
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	$1, %rax
	jle	.L5
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rcx
	movq	-48(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -48(%rbp)
	leaq	0(,%rax,8), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rcx), %rdx
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	subq	$1, %rax
	addq	%rax, -40(%rbp)
.L5:
	addq	$1, -32(%rbp)
.L4:
	cmpq	$100000, -32(%rbp)
	jle	.L6
	movq	-40(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	jne	.L7
	movq	-64(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	movq	-64(%rbp), %rax
	subq	$1, %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
