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<stdlib.h>

void run(void){
  int n;
  scanf("%d",&n);
  int *index=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++){
    int p;
    scanf("%d",&p);
    index[p-1]=i;
  }
  int max=0;
  i=0;
  while(i<n){
    int j=i+1;
    while(j<n && index[j]>index[j-1]) j++;
    if(max<j-i) max=j-i;
    i=j;
  }
  printf("%d\n",n-max);
}

int main(void){
  run();
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	testl	%r12d, %r12d
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %r12d
	movl	%ebp, -4(%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L2
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdx
	cltq
	movl	(%rbx,%rdx,4), %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rax), %ecx
	addq	$1, %rax
	cmpl	%eax, %r12d
	jle	.L17
.L6:
	movl	%edx, %ecx
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jg	.L7
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	cmpl	%eax, %r12d
	jle	.L18
	movl	%eax, %edi
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jg	.L4
.L16:
	movl	$1, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	subl	%edi, %ecx
.L5:
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
	subl	%r8d, %r12d
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L18:
	subl	%r8d, %r12d
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	testl	%r12d, %r12d
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %r12d
	movl	%ebp, -4(%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L2
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdx
	cltq
	movl	(%rbx,%rdx,4), %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rax), %ecx
	addq	$1, %rax
	cmpl	%eax, %r12d
	jle	.L17
.L6:
	movl	%edx, %ecx
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jg	.L7
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	cmpl	%eax, %r12d
	jle	.L18
	movl	%eax, %edi
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jg	.L4
.L16:
	movl	$1, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	subl	%edi, %ecx
.L5:
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
	subl	%r8d, %r12d
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L18:
	subl	%r8d, %r12d
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	testl	%r12d, %r12d
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %r12d
	movl	%ebp, -4(%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L2
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdx
	cltq
	movl	(%rbx,%rdx,4), %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rax), %ecx
	addq	$1, %rax
	cmpl	%eax, %r12d
	jle	.L17
.L6:
	movl	%edx, %ecx
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jg	.L7
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	cmpl	%eax, %r12d
	jle	.L18
	movl	%eax, %edi
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jg	.L4
.L16:
	movl	$1, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	subl	%edi, %ecx
.L5:
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
	subl	%r8d, %r12d
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L18:
	subl	%r8d, %r12d
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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<stdlib.h>

void run(void){
  int n;
  scanf("%d",&n);
  int *index=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++){
    int p;
    scanf("%d",&p);
    index[p-1]=i;
  }
  int max=0;
  i=0;
  while(i<n){
    int j=i+1;
    while(j<n && index[j]>index[j-1]) j++;
    if(max<j-i) max=j-i;
    i=j;
  }
  printf("%d\n",n-max);
}

int main(void){
  run();
  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<stdlib.h>

void run(void){
  int n;
  scanf("%d",&n);
  int *index=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++){
    int p;
    scanf("%d",&p);
    index[p-1]=i;
  }
  int max=0;
  i=0;
  while(i<n){
    int j=i+1;
    while(j<n && index[j]>index[j-1]) j++;
    if(max<j-i) max=j-i;
    i=j;
  }
  printf("%d\n",n-max);
}

int main(void){
  run();
  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:

6
2
3
5
1
4
6
 8
6
3
2
1
7
4
8
5
 4
1
4
2
3
 6
3
1
5
2
4
6
 4
3
1
2
4
 8
6
3
1
2
5
4
8
7
 4
2
4
1
3
 8
6
3
2
1
4
7
8
5
 6
2
5
3
1
4
6
 8
6
3
2
1
7
4
5
8

3
 5
 1
 4
 2
 6
 2
 5
 3
 5

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<stdlib.h>

void run(void){
  int n;
  scanf("%d",&n);
  int *index=(int *)calloc(n,sizeof(int));
  int i;
  for(i=0;i<n;i++){
    int p;
    scanf("%d",&p);
    index[p-1]=i;
  }
  int max=0;
  i=0;
  while(i<n){
    int j=i+1;
    while(j<n && index[j]>index[j-1]) j++;
    if(max<j-i) max=j-i;
    i=j;
  }
  printf("%d\n",n-max);
}

int main(void){
  run();
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	testl	%r12d, %r12d
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %r12d
	movl	%ebp, -4(%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L2
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdx
	cltq
	movl	(%rbx,%rdx,4), %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rax), %ecx
	addq	$1, %rax
	cmpl	%eax, %r12d
	jle	.L17
.L6:
	movl	%edx, %ecx
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jg	.L7
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	cmpl	%eax, %r12d
	jle	.L18
	movl	%eax, %edi
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jg	.L4
.L16:
	movl	$1, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	subl	%edi, %ecx
.L5:
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
	subl	%r8d, %r12d
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L18:
	subl	%r8d, %r12d
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movslq	(%rsp), %rdi
	movl	$4, %esi
	movq	%rdi, %r12
	call	calloc@PLT
	testl	%r12d, %r12d
	jle	.L2
	movq	%rax, %rbx
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %r12d
	movl	%ebp, -4(%rbx,%rax,4)
	addl	$1, %ebp
	cmpl	%ebp, %r12d
	jg	.L3
	testl	%r12d, %r12d
	jle	.L2
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jle	.L16
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdx
	cltq
	movl	(%rbx,%rdx,4), %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	leal	1(%rax), %ecx
	addq	$1, %rax
	cmpl	%eax, %r12d
	jle	.L17
.L6:
	movl	%edx, %ecx
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jg	.L7
	movl	%eax, %edx
	subl	%edi, %edx
	cmpl	%edx, %r8d
	cmovl	%edx, %r8d
	cmpl	%eax, %r12d
	jle	.L18
	movl	%eax, %edi
	leal	1(%rdi), %eax
	cmpl	%eax, %r12d
	jg	.L4
.L16:
	movl	$1, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	subl	%edi, %ecx
.L5:
	cmpl	%ecx, %r8d
	cmovl	%ecx, %r8d
	subl	%r8d, %r12d
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
.L19:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
.L18:
	subl	%r8d, %r12d
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.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:
```