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>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#define _USE_MATH_DEFINES

int main()
{
    int n=0,best_n=0,T=0,A=0,height_i[1001]={0},temp_average=0,temp_diff_from_a=0,new_temp_diff_from_a=0;
    scanf("%d",&n);
    scanf("%d %d",&T,&A);
    for(int i=0;i<n;i++)
	scanf("%d",&height_i[i]);


    for(int i=0;i<n;i++){
	temp_average=1000*T-height_i[i]*6;
	new_temp_diff_from_a=abs(1000*A-temp_average);

	if(i==0 || new_temp_diff_from_a<temp_diff_from_a){
	    temp_diff_from_a=new_temp_diff_from_a;
	    best_n=i;
	}

    }
    printf("%d",best_n+1);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$500, %ecx
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	movl	$0, 8(%rsp)
	movq	%rbx, %r12
	movl	$0, 12(%rsp)
	rep stosq
	movl	$0, (%rdi)
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L6
	movl	16(%rsp), %edx
	imull	$1000, 12(%rsp), %edi
	movslq	%eax, %r9
	imull	$1000, 8(%rsp), %r8d
	leal	0(,%rdx,4), %ecx
	subl	%ecx, %edx
	leal	(%r8,%rdx,2), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovs	%edx, %esi
	movl	$1, %edx
	xorl	%r10d, %r10d
	cmpl	$1, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %eax
	leal	0(,%rax,4), %ecx
	subl	%ecx, %eax
	movl	%edi, %ecx
	leal	(%r8,%rax,2), %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	cmpl	%eax, %esi
	jle	.L7
	movl	%eax, %esi
	movl	%edx, %r10d
.L7:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L8
.L3:
	xorl	%eax, %eax
	leal	1(%r10), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$4040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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 %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$500, %ecx
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	movl	$0, 8(%rsp)
	movq	%rbx, %r12
	movl	$0, 12(%rsp)
	rep stosq
	movl	$0, (%rdi)
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L6
	movl	16(%rsp), %edx
	imull	$1000, 12(%rsp), %edi
	movslq	%eax, %r9
	imull	$1000, 8(%rsp), %r8d
	leal	0(,%rdx,4), %ecx
	subl	%ecx, %edx
	leal	(%r8,%rdx,2), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovs	%edx, %esi
	movl	$1, %edx
	xorl	%r10d, %r10d
	cmpl	$1, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %eax
	leal	0(,%rax,4), %ecx
	subl	%ecx, %eax
	movl	%edi, %ecx
	leal	(%r8,%rax,2), %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	cmpl	%eax, %esi
	jle	.L7
	movl	%eax, %esi
	movl	%edx, %r10d
.L7:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L8
.L3:
	xorl	%eax, %eax
	leal	1(%r10), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$4040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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 %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$500, %ecx
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	movl	$0, 8(%rsp)
	movq	%rbx, %r12
	movl	$0, 12(%rsp)
	rep stosq
	movl	$0, (%rdi)
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L6
	movl	16(%rsp), %edx
	imull	$1000, 12(%rsp), %edi
	movslq	%eax, %r9
	imull	$1000, 8(%rsp), %r8d
	leal	0(,%rdx,4), %ecx
	subl	%ecx, %edx
	leal	(%r8,%rdx,2), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovs	%edx, %esi
	movl	$1, %edx
	xorl	%r10d, %r10d
	cmpl	$1, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %eax
	leal	0(,%rax,4), %ecx
	subl	%ecx, %eax
	movl	%edi, %ecx
	leal	(%r8,%rax,2), %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	cmpl	%eax, %esi
	jle	.L7
	movl	%eax, %esi
	movl	%edx, %r10d
.L7:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L8
.L3:
	xorl	%eax, %eax
	leal	1(%r10), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$4040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#define _USE_MATH_DEFINES

int main()
{
    int n=0,best_n=0,T=0,A=0,height_i[1001]={0},temp_average=0,temp_diff_from_a=0,new_temp_diff_from_a=0;
    scanf("%d",&n);
    scanf("%d %d",&T,&A);
    for(int i=0;i<n;i++)
	scanf("%d",&height_i[i]);


    for(int i=0;i<n;i++){
	temp_average=1000*T-height_i[i]*6;
	new_temp_diff_from_a=abs(1000*A-temp_average);

	if(i==0 || new_temp_diff_from_a<temp_diff_from_a){
	    temp_diff_from_a=new_temp_diff_from_a;
	    best_n=i;
	}

    }
    printf("%d",best_n+1);
    return 0;
}

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

```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#define _USE_MATH_DEFINES

int main()
{
    int n=0,best_n=0,T=0,A=0,height_i[1001]={0},temp_average=0,temp_diff_from_a=0,new_temp_diff_from_a=0;
    scanf("%d",&n);
    scanf("%d %d",&T,&A);
    for(int i=0;i<n;i++)
	scanf("%d",&height_i[i]);


    for(int i=0;i<n;i++){
	temp_average=1000*T-height_i[i]*6;
	new_temp_diff_from_a=abs(1000*A-temp_average);

	if(i==0 || new_temp_diff_from_a<temp_diff_from_a){
	    temp_diff_from_a=new_temp_diff_from_a;
	    best_n=i;
	}

    }
    printf("%d",best_n+1);
    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:

2
12 5
1000 2000

1
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>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#define _USE_MATH_DEFINES

int main()
{
    int n=0,best_n=0,T=0,A=0,height_i[1001]={0},temp_average=0,temp_diff_from_a=0,new_temp_diff_from_a=0;
    scanf("%d",&n);
    scanf("%d %d",&T,&A);
    for(int i=0;i<n;i++)
	scanf("%d",&height_i[i]);


    for(int i=0;i<n;i++){
	temp_average=1000*T-height_i[i]*6;
	new_temp_diff_from_a=abs(1000*A-temp_average);

	if(i==0 || new_temp_diff_from_a<temp_diff_from_a){
	    temp_diff_from_a=new_temp_diff_from_a;
	    best_n=i;
	}

    }
    printf("%d",best_n+1);
    return 0;
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$500, %ecx
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	movl	$0, 8(%rsp)
	movq	%rbx, %r12
	movl	$0, 12(%rsp)
	rep stosq
	movl	$0, (%rdi)
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L6
	movl	16(%rsp), %edx
	imull	$1000, 12(%rsp), %edi
	movslq	%eax, %r9
	imull	$1000, 8(%rsp), %r8d
	leal	0(,%rdx,4), %ecx
	subl	%ecx, %edx
	leal	(%r8,%rdx,2), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovs	%edx, %esi
	movl	$1, %edx
	xorl	%r10d, %r10d
	cmpl	$1, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %eax
	leal	0(,%rax,4), %ecx
	subl	%ecx, %eax
	movl	%edi, %ecx
	leal	(%r8,%rax,2), %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	cmpl	%eax, %esi
	jle	.L7
	movl	%eax, %esi
	movl	%edx, %r10d
.L7:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L8
.L3:
	xorl	%eax, %eax
	leal	1(%r10), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$4040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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 %d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$500, %ecx
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$4040, %rsp
	.cfi_def_cfa_offset 4080
	movq	%fs:40, %rax
	movq	%rax, 4024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	4(%rsp), %rsi
	movl	$0, 4(%rsp)
	movq	%rbx, %rdi
	movl	$0, 8(%rsp)
	movq	%rbx, %r12
	movl	$0, 12(%rsp)
	rep stosq
	movl	$0, (%rdi)
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebp, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L6
	movl	16(%rsp), %edx
	imull	$1000, 12(%rsp), %edi
	movslq	%eax, %r9
	imull	$1000, 8(%rsp), %r8d
	leal	0(,%rdx,4), %ecx
	subl	%ecx, %edx
	leal	(%r8,%rdx,2), %ecx
	movl	%edi, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovs	%edx, %esi
	movl	$1, %edx
	xorl	%r10d, %r10d
	cmpl	$1, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx,%rdx,4), %eax
	leal	0(,%rax,4), %ecx
	subl	%ecx, %eax
	movl	%edi, %ecx
	leal	(%r8,%rax,2), %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	negl	%eax
	cmovs	%ecx, %eax
	cmpl	%eax, %esi
	jle	.L7
	movl	%eax, %esi
	movl	%edx, %r10d
.L7:
	addq	$1, %rdx
	cmpq	%rdx, %r9
	jne	.L8
.L3:
	xorl	%eax, %eax
	leal	1(%r10), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$4040, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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:
```