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

```c
#include <stdio.h>
int main(){
  int n,m,a,h,hmax,p,q,i,j,c;
  int x[1001][101];

  while(1){
    for(i=1;i<=1000;i++){
      for(j=1;j<=100;j++){
	x[i][j]=0;
      }
    }
    hmax=0;
    c=1;
    scanf("%d %d %d",&n,&m,&a);
    if(n==0&&m==0&&a==0)break;
    if(m!=0){
      for(i=0;i<m;i++){
	scanf("%d %d %d",&h,&p,&q);
	if(h>hmax)hmax=h;
	x[h][p]=c;
	x[h][q]=c;
	c++;
      }
    }
    for(i=hmax;i>0;i--){
      if(x[i][a]!=0){
	if(a==1&&x[i][a+1]==x[i][a])a++;
	else if(a==n&&x[i][a-1]==x[i][a])a--;
	else if(x[i][a-1]==x[i][a])a--;
	else if(x[i][a+1]==x[i][a])a++;
      }
    }
    printf("%d\n",a);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-401408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	movl	$1, -404428(%rbp)
	jmp	.L2
.L5:
	movl	$1, -404424(%rbp)
	jmp	.L3
.L4:
	movl	-404424(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -404416(%rbp,%rax,4)
	addl	$1, -404424(%rbp)
.L3:
	cmpl	$100, -404424(%rbp)
	jle	.L4
	addl	$1, -404428(%rbp)
.L2:
	cmpl	$1000, -404428(%rbp)
	jle	.L5
	movl	$0, -404432(%rbp)
	movl	$1, -404420(%rbp)
	leaq	-404448(%rbp), %rcx
	leaq	-404452(%rbp), %rdx
	leaq	-404456(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404456(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404448(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	$0, -404428(%rbp)
	jmp	.L9
.L11:
	leaq	-404436(%rbp), %rcx
	leaq	-404440(%rbp), %rdx
	leaq	-404444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404444(%rbp), %eax
	cmpl	%eax, -404432(%rbp)
	jge	.L10
	movl	-404444(%rbp), %eax
	movl	%eax, -404432(%rbp)
.L10:
	movl	-404444(%rbp), %eax
	movl	-404440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	movl	-404444(%rbp), %eax
	movl	-404436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	addl	$1, -404420(%rbp)
	addl	$1, -404428(%rbp)
.L9:
	movl	-404452(%rbp), %eax
	cmpl	%eax, -404428(%rbp)
	jl	.L11
.L8:
	movl	-404432(%rbp), %eax
	movl	%eax, -404428(%rbp)
	jmp	.L12
.L17:
	movl	-404448(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-404448(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L14:
	movl	-404448(%rbp), %edx
	movl	-404456(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L15:
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L16:
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L13
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
.L13:
	subl	$1, -404428(%rbp)
.L12:
	cmpl	$0, -404428(%rbp)
	jg	.L17
	movl	-404448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-401408(%rsp), %r11
	.cfi_def_cfa 11, 401464
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3096, %rsp
	.cfi_def_cfa_offset 404560
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 404488(%rsp)
	xorl	%eax, %eax
	leaq	488(%rsp), %rax
	leaq	404488(%rsp), %rbp
	movq	%rax, (%rsp)
	leaq	60(%rsp), %rax
	leaq	64(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 8(%rsp)
.L14:
	movq	(%rsp), %rdx
.L2:
	leaq	8(%rdx), %rdi
	movq	%rdx, %rcx
	movq	$0, (%rdx)
	movq	%rbx, %rax
	andq	$-8, %rdi
	addq	$404, %rdx
	movq	$0, -12(%rdx)
	subq	%rdi, %rcx
	addl	$400, %ecx
	shrl	$3, %ecx
	rep stosq
	cmpq	%rbp, %rdx
	jne	.L2
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	%r13, %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %edx
	movl	60(%rsp), %eax
	testl	%edx, %edx
	jne	.L3
	testl	%eax, %eax
	jne	.L4
	movl	64(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L35
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L3:
	testl	%eax, %eax
	jne	.L4
.L7:
	movl	64(%rsp), %r8d
	jmp	.L6
.L35:
	movq	404488(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$404504, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	testl	%eax, %eax
	jle	.L7
	leaq	72(%rsp), %rdx
	leaq	68(%rsp), %rsi
	movq	%r13, 24(%rsp)
	movl	$1, %r15d
	movq	%rbp, 32(%rsp)
	xorl	%r14d, %r14d
	leaq	76(%rsp), %rcx
	movq	%rdx, %r13
	movq	%rsi, %rbp
.L8:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	movq	%rcx, 40(%rsp)
	call	__isoc99_scanf@PLT
	movslq	68(%rsp), %rax
	movslq	72(%rsp), %rdx
	movq	40(%rsp), %rcx
	leaq	(%rax,%rax,4), %rsi
	cmpl	%eax, %r14d
	leaq	(%rsi,%rsi,4), %rsi
	cmovl	%eax, %r14d
	leaq	(%rax,%rsi,4), %rax
	addq	%rax, %rdx
	movl	%r15d, 80(%rsp,%rdx,4)
	movslq	76(%rsp), %rdx
	addq	%rdx, %rax
	movl	%r15d, 80(%rsp,%rax,4)
	movl	%r15d, %eax
	addl	$1, %r15d
	cmpl	%eax, 60(%rsp)
	jg	.L8
	movq	24(%rsp), %r13
	movq	32(%rsp), %rbp
	movl	64(%rsp), %r8d
	testl	%r14d, %r14d
	je	.L6
	movslq	%r14d, %rdx
	xorl	%ecx, %ecx
	imulq	$404, %rdx, %rax
	leaq	88(%rsp,%rax), %rdi
	movl	%r8d, %eax
	jmp	.L13
.L38:
	leaq	(%rdx,%rdx,4), %r15
	leal	1(%rax), %r9d
	leaq	(%r15,%r15,4), %r15
	movslq	%r9d, %r11
	leaq	(%rdx,%r15,4), %rdx
	addq	%r11, %rdx
	cmpl	80(%rsp,%rdx,4), %esi
	movl	$1, %esi
	cmove	%r9d, %eax
	cmove	%esi, %ecx
.L9:
	subq	$404, %rdi
	subl	$1, %r14d
	je	.L31
.L39:
	movslq	%r14d, %rdx
.L13:
	leaq	(%rdx,%rdx,4), %rsi
	movslq	%eax, %r9
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rdx,%rsi,4), %rsi
	addq	%r9, %rsi
	movl	80(%rsp,%rsi,4), %esi
	testl	%esi, %esi
	je	.L9
	cmpl	$1, %eax
	je	.L37
.L10:
	leaq	(%rdx,%rdx,4), %r11
	leal	-1(%rax), %r9d
	leaq	(%r11,%r11,4), %r11
	movslq	%r9d, %r15
	leaq	(%rdx,%r11,4), %r11
	addq	%r15, %r11
	movl	80(%rsp,%r11,4), %r11d
	cmpl	%r11d, %esi
	jne	.L38
	movl	%r9d, %eax
	movl	$1, %ecx
	subq	$404, %rdi
	subl	$1, %r14d
	jne	.L39
.L31:
	testb	%cl, %cl
	je	.L6
	movl	%eax, 64(%rsp)
	movl	%eax, %r8d
	jmp	.L6
.L37:
	cmpl	(%rdi), %esi
	jne	.L10
	movl	$1, %ecx
	movl	$2, %eax
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-401408(%rsp), %r11
	.cfi_def_cfa 11, 401464
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3096, %rsp
	.cfi_def_cfa_offset 404560
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, 404488(%rsp)
	xorl	%eax, %eax
	leaq	488(%rsp), %rax
	leaq	404488(%rsp), %rbp
	movq	%rax, (%rsp)
	leaq	60(%rsp), %rax
	leaq	64(%rsp), %r13
	movq	%rax, 16(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 8(%rsp)
.L14:
	movq	(%rsp), %rdx
.L2:
	leaq	8(%rdx), %rdi
	movq	%rdx, %rcx
	movq	$0, (%rdx)
	movq	%rbx, %rax
	andq	$-8, %rdi
	addq	$404, %rdx
	movq	$0, -12(%rdx)
	subq	%rdi, %rcx
	addl	$400, %ecx
	shrl	$3, %ecx
	rep stosq
	cmpq	%rbp, %rdx
	jne	.L2
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movq	%r13, %rcx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %edx
	movl	60(%rsp), %eax
	testl	%edx, %edx
	jne	.L3
	testl	%eax, %eax
	jne	.L4
	movl	64(%rsp), %r8d
	testl	%r8d, %r8d
	je	.L35
.L6:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L3:
	testl	%eax, %eax
	jne	.L4
.L7:
	movl	64(%rsp), %r8d
	jmp	.L6
.L35:
	movq	404488(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$404504, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	testl	%eax, %eax
	jle	.L7
	leaq	72(%rsp), %rdx
	leaq	68(%rsp), %rsi
	movq	%r13, 24(%rsp)
	movl	$1, %r15d
	movq	%rbp, 32(%rsp)
	xorl	%r14d, %r14d
	leaq	76(%rsp), %rcx
	movq	%rdx, %r13
	movq	%rsi, %rbp
.L8:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movq	%r12, %rdi
	movq	%rcx, 40(%rsp)
	call	__isoc99_scanf@PLT
	movslq	68(%rsp), %rax
	movslq	72(%rsp), %rdx
	movq	40(%rsp), %rcx
	leaq	(%rax,%rax,4), %rsi
	cmpl	%eax, %r14d
	leaq	(%rsi,%rsi,4), %rsi
	cmovl	%eax, %r14d
	leaq	(%rax,%rsi,4), %rax
	addq	%rax, %rdx
	movl	%r15d, 80(%rsp,%rdx,4)
	movslq	76(%rsp), %rdx
	addq	%rdx, %rax
	movl	%r15d, 80(%rsp,%rax,4)
	movl	%r15d, %eax
	addl	$1, %r15d
	cmpl	%eax, 60(%rsp)
	jg	.L8
	movq	24(%rsp), %r13
	movq	32(%rsp), %rbp
	movl	64(%rsp), %r8d
	testl	%r14d, %r14d
	je	.L6
	movslq	%r14d, %rdx
	xorl	%ecx, %ecx
	imulq	$404, %rdx, %rax
	leaq	88(%rsp,%rax), %rdi
	movl	%r8d, %eax
	jmp	.L13
.L38:
	leaq	(%rdx,%rdx,4), %r15
	leal	1(%rax), %r9d
	leaq	(%r15,%r15,4), %r15
	movslq	%r9d, %r11
	leaq	(%rdx,%r15,4), %rdx
	addq	%r11, %rdx
	cmpl	80(%rsp,%rdx,4), %esi
	movl	$1, %esi
	cmove	%r9d, %eax
	cmove	%esi, %ecx
.L9:
	subq	$404, %rdi
	subl	$1, %r14d
	je	.L31
.L39:
	movslq	%r14d, %rdx
.L13:
	leaq	(%rdx,%rdx,4), %rsi
	movslq	%eax, %r9
	leaq	(%rsi,%rsi,4), %rsi
	leaq	(%rdx,%rsi,4), %rsi
	addq	%r9, %rsi
	movl	80(%rsp,%rsi,4), %esi
	testl	%esi, %esi
	je	.L9
	cmpl	$1, %eax
	je	.L37
.L10:
	leaq	(%rdx,%rdx,4), %r11
	leal	-1(%rax), %r9d
	leaq	(%r11,%r11,4), %r11
	movslq	%r9d, %r15
	leaq	(%rdx,%r11,4), %r11
	addq	%r15, %r11
	movl	80(%rsp,%r11,4), %r11d
	cmpl	%r11d, %esi
	jne	.L38
	movl	%r9d, %eax
	movl	$1, %ecx
	subq	$404, %rdi
	subl	$1, %r14d
	jne	.L39
.L31:
	testb	%cl, %cl
	je	.L6
	movl	%eax, 64(%rsp)
	movl	%eax, %r8d
	jmp	.L6
.L37:
	cmpl	(%rdi), %esi
	jne	.L10
	movl	$1, %ecx
	movl	$2, %eax
	jmp	.L9
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
int main(){
  int n,m,a,h,hmax,p,q,i,j,c;
  int x[1001][101];

  while(1){
    for(i=1;i<=1000;i++){
      for(j=1;j<=100;j++){
	x[i][j]=0;
      }
    }
    hmax=0;
    c=1;
    scanf("%d %d %d",&n,&m,&a);
    if(n==0&&m==0&&a==0)break;
    if(m!=0){
      for(i=0;i<m;i++){
	scanf("%d %d %d",&h,&p,&q);
	if(h>hmax)hmax=h;
	x[h][p]=c;
	x[h][q]=c;
	c++;
      }
    }
    for(i=hmax;i>0;i--){
      if(x[i][a]!=0){
	if(a==1&&x[i][a+1]==x[i][a])a++;
	else if(a==n&&x[i][a-1]==x[i][a])a--;
	else if(x[i][a-1]==x[i][a])a--;
	else if(x[i][a+1]==x[i][a])a++;
      }
    }
    printf("%d\n",a);
  }
  return 0;
}
4 4 1
3 1 2
2 2 4
3 3 4
1 3 4
0 0 0
 4 4 1
3 1 2
2 2 3
4 3 4
1 3 4
0 0 0
 4 4 1
3 1 2
2 2 4
3 3 4
1 1 4
0 0 0
 4 4 1
0 1 2
2 2 3
3 3 4
0 3 4
0 0 0
 4 3 1
3 1 2
0 1 3
4 3 4
1 0 1
0 0 0
 4 3 1
3 1 1
0 1 3
4 3 4
1 0 1
0 0 0
 7 4 1
3 1 4
0 1 3
8 3 4
1 4 6
0 0 0
 6 4 1
3 0 2
2 2 3
0 5 1
0 2 0
0 0 0
 4 4 1
3 1 2
2 2 3
3 3 4
0 3 4
0 0 0
 4 4 1
3 1 2
2 2 3
4 3 4
1 0 4
0 0 0

2
 4
 2
 1
 2
1
 1
1
 1
 1
 3
 3

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

```c
#include <stdio.h>
int main(){
  int n,m,a,h,hmax,p,q,i,j,c;
  int x[1001][101];

  while(1){
    for(i=1;i<=1000;i++){
      for(j=1;j<=100;j++){
	x[i][j]=0;
      }
    }
    hmax=0;
    c=1;
    scanf("%d %d %d",&n,&m,&a);
    if(n==0&&m==0&&a==0)break;
    if(m!=0){
      for(i=0;i<m;i++){
	scanf("%d %d %d",&h,&p,&q);
	if(h>hmax)hmax=h;
	x[h][p]=c;
	x[h][q]=c;
	c++;
      }
    }
    for(i=hmax;i>0;i--){
      if(x[i][a]!=0){
	if(a==1&&x[i][a+1]==x[i][a])a++;
	else if(a==n&&x[i][a-1]==x[i][a])a--;
	else if(x[i][a-1]==x[i][a])a--;
	else if(x[i][a+1]==x[i][a])a++;
      }
    }
    printf("%d\n",a);
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-401408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	movl	$1, -404428(%rbp)
	jmp	.L2
.L5:
	movl	$1, -404424(%rbp)
	jmp	.L3
.L4:
	movl	-404424(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -404416(%rbp,%rax,4)
	addl	$1, -404424(%rbp)
.L3:
	cmpl	$100, -404424(%rbp)
	jle	.L4
	addl	$1, -404428(%rbp)
.L2:
	cmpl	$1000, -404428(%rbp)
	jle	.L5
	movl	$0, -404432(%rbp)
	movl	$1, -404420(%rbp)
	leaq	-404448(%rbp), %rcx
	leaq	-404452(%rbp), %rdx
	leaq	-404456(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404456(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404448(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	$0, -404428(%rbp)
	jmp	.L9
.L11:
	leaq	-404436(%rbp), %rcx
	leaq	-404440(%rbp), %rdx
	leaq	-404444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404444(%rbp), %eax
	cmpl	%eax, -404432(%rbp)
	jge	.L10
	movl	-404444(%rbp), %eax
	movl	%eax, -404432(%rbp)
.L10:
	movl	-404444(%rbp), %eax
	movl	-404440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	movl	-404444(%rbp), %eax
	movl	-404436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	addl	$1, -404420(%rbp)
	addl	$1, -404428(%rbp)
.L9:
	movl	-404452(%rbp), %eax
	cmpl	%eax, -404428(%rbp)
	jl	.L11
.L8:
	movl	-404432(%rbp), %eax
	movl	%eax, -404428(%rbp)
	jmp	.L12
.L17:
	movl	-404448(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-404448(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L14:
	movl	-404448(%rbp), %edx
	movl	-404456(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L15:
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L16:
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L13
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
.L13:
	subl	$1, -404428(%rbp)
.L12:
	cmpl	$0, -404428(%rbp)
	jg	.L17
	movl	-404448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-401408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3056, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	movl	$1, -404428(%rbp)
	jmp	.L2
.L5:
	movl	$1, -404424(%rbp)
	jmp	.L3
.L4:
	movl	-404424(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$0, -404416(%rbp,%rax,4)
	addl	$1, -404424(%rbp)
.L3:
	cmpl	$100, -404424(%rbp)
	jle	.L4
	addl	$1, -404428(%rbp)
.L2:
	cmpl	$1000, -404428(%rbp)
	jle	.L5
	movl	$0, -404432(%rbp)
	movl	$1, -404420(%rbp)
	leaq	-404448(%rbp), %rcx
	leaq	-404452(%rbp), %rdx
	leaq	-404456(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404456(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-404448(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	-404452(%rbp), %eax
	testl	%eax, %eax
	je	.L8
	movl	$0, -404428(%rbp)
	jmp	.L9
.L11:
	leaq	-404436(%rbp), %rcx
	leaq	-404440(%rbp), %rdx
	leaq	-404444(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-404444(%rbp), %eax
	cmpl	%eax, -404432(%rbp)
	jge	.L10
	movl	-404444(%rbp), %eax
	movl	%eax, -404432(%rbp)
.L10:
	movl	-404444(%rbp), %eax
	movl	-404440(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	movl	-404444(%rbp), %eax
	movl	-404436(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	movl	-404420(%rbp), %eax
	movl	%eax, -404416(%rbp,%rdx,4)
	addl	$1, -404420(%rbp)
	addl	$1, -404428(%rbp)
.L9:
	movl	-404452(%rbp), %eax
	cmpl	%eax, -404428(%rbp)
	jl	.L11
.L8:
	movl	-404432(%rbp), %eax
	movl	%eax, -404428(%rbp)
	jmp	.L12
.L17:
	movl	-404448(%rbp), %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	je	.L13
	movl	-404448(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L14
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L14:
	movl	-404448(%rbp), %edx
	movl	-404456(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L15
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L15:
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-404448(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -404448(%rbp)
	jmp	.L13
.L16:
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-404416(%rbp,%rax,4), %ecx
	movl	-404448(%rbp), %eax
	movslq	%eax, %rsi
	movl	-404428(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-404416(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L13
	movl	-404448(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -404448(%rbp)
.L13:
	subl	$1, -404428(%rbp)
.L12:
	cmpl	$0, -404428(%rbp)
	jg	.L17
	movl	-404448(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
