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 k,n,i;
  int a[200001] = {0};
  int distance = 0;
  int near = 100000000;
  
  do {
    scanf("%d ",&k);
  }while(k < 2 || k > 1000000);
  
  do {
    scanf("%d",&n);
  }while(n < 2 || n > 200000);
  
  
  for (i=1; i<n+1; i++) {
    do {
      scanf("%d ",&a[i]);
    }while(a[i] < a[i-1]);
  }
  
  for (i=1; i<n+1; i++) {
    if (i==1)
      distance = k - (k-a[n]+a[1]);
    else
      distance = k - (a[i]-a[i-1]);
    if (near > distance)
      near = distance;
  }
  
  printf("%d",near);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d "
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rbx
	movq	%r12, %rdi
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	subl	$2, %eax
	cmpl	$999998, %eax
	ja	.L2
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$2, %eax
	cmpl	$199998, %eax
	ja	.L3
	leaq	20(%rsp), %rbx
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jl	.L4
	movl	12(%rsp), %edx
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, %edx
	jge	.L4
	testl	%edx, %edx
	jle	.L10
	movl	8(%rsp), %r9d
	movl	20(%rsp), %r10d
	movq	%r12, %rax
	leal	1(%rdx), %edi
	movl	$100000000, %r8d
	movl	$1, %ecx
	movslq	%edx, %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r9d, %edx
	subl	4(%rax), %edx
	addl	(%rax), %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %ecx
	addq	$4, %rax
	cmpl	%ecx, %edi
	je	.L6
.L8:
	cmpl	$1, %ecx
	jne	.L7
	movl	16(%rsp,%rsi,4), %edx
	subl	%r10d, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addq	$4, %rax
	cmpl	$2, %edi
	je	.L6
	movl	$2, %ecx
	jmp	.L7
.L10:
	movl	$100000000, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800032, %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
.L21:
	.cfi_restore_state
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rbx
	movq	%r12, %rdi
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	subl	$2, %eax
	cmpl	$999998, %eax
	ja	.L2
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$2, %eax
	cmpl	$199998, %eax
	ja	.L3
	leaq	20(%rsp), %rbx
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jl	.L4
	movl	12(%rsp), %edx
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, %edx
	jge	.L4
	testl	%edx, %edx
	jle	.L10
	movl	8(%rsp), %r9d
	movl	20(%rsp), %r10d
	movq	%r12, %rax
	leal	1(%rdx), %edi
	movl	$100000000, %r8d
	movl	$1, %ecx
	movslq	%edx, %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r9d, %edx
	subl	4(%rax), %edx
	addl	(%rax), %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %ecx
	addq	$4, %rax
	cmpl	%ecx, %edi
	je	.L6
.L8:
	cmpl	$1, %ecx
	jne	.L7
	movl	16(%rsp,%rsi,4), %edx
	subl	%r10d, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addq	$4, %rax
	cmpl	$2, %edi
	je	.L6
	movl	$2, %ecx
	jmp	.L7
.L10:
	movl	$100000000, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800032, %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
.L21:
	.cfi_restore_state
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rbx
	movq	%r12, %rdi
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	subl	$2, %eax
	cmpl	$999998, %eax
	ja	.L2
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$2, %eax
	cmpl	$199998, %eax
	ja	.L3
	leaq	20(%rsp), %rbx
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jl	.L4
	movl	12(%rsp), %edx
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, %edx
	jge	.L4
	testl	%edx, %edx
	jle	.L10
	movl	8(%rsp), %r9d
	movl	20(%rsp), %r10d
	movq	%r12, %rax
	leal	1(%rdx), %edi
	movl	$100000000, %r8d
	movl	$1, %ecx
	movslq	%edx, %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r9d, %edx
	subl	4(%rax), %edx
	addl	(%rax), %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %ecx
	addq	$4, %rax
	cmpl	%ecx, %edi
	je	.L6
.L8:
	cmpl	$1, %ecx
	jne	.L7
	movl	16(%rsp,%rsi,4), %edx
	subl	%r10d, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addq	$4, %rax
	cmpl	$2, %edi
	je	.L6
	movl	$2, %ecx
	jmp	.L7
.L10:
	movl	$100000000, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800032, %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
.L21:
	.cfi_restore_state
	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 k,n,i;
  int a[200001] = {0};
  int distance = 0;
  int near = 100000000;
  
  do {
    scanf("%d ",&k);
  }while(k < 2 || k > 1000000);
  
  do {
    scanf("%d",&n);
  }while(n < 2 || n > 200000);
  
  
  for (i=1; i<n+1; i++) {
    do {
      scanf("%d ",&a[i]);
    }while(a[i] < a[i-1]);
  }
  
  for (i=1; i<n+1; i++) {
    if (i==1)
      distance = k - (k-a[n]+a[1]);
    else
      distance = k - (a[i]-a[i-1]);
    if (near > distance)
      near = distance;
  }
  
  printf("%d",near);
  
  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 k,n,i;
  int a[200001] = {0};
  int distance = 0;
  int near = 100000000;
  
  do {
    scanf("%d ",&k);
  }while(k < 2 || k > 1000000);
  
  do {
    scanf("%d",&n);
  }while(n < 2 || n > 200000);
  
  
  for (i=1; i<n+1; i++) {
    do {
      scanf("%d ",&a[i]);
    }while(a[i] < a[i-1]);
  }
  
  for (i=1; i<n+1; i++) {
    if (i==1)
      distance = k - (k-a[n]+a[1]);
    else
      distance = k - (a[i]-a[i-1]);
    if (near > distance)
      near = distance;
  }
  
  printf("%d",near);
  
  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:

20 3
5 11 15
 27 3
1 5 15
 20 3
2 11 15
 27 3
1 5 29
 20 3
3 11 15
 20 3
1 5 17
 19 3
0 5 15
 27 3
1 6 29
 20 3
3 11 29
 31 3
3 11 29

10 14 11 3 12 8 9 4 2 13
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 k,n,i;
  int a[200001] = {0};
  int distance = 0;
  int near = 100000000;
  
  do {
    scanf("%d ",&k);
  }while(k < 2 || k > 1000000);
  
  do {
    scanf("%d",&n);
  }while(n < 2 || n > 200000);
  
  
  for (i=1; i<n+1; i++) {
    do {
      scanf("%d ",&a[i]);
    }while(a[i] < a[i-1]);
  }
  
  for (i=1; i<n+1; i++) {
    if (i==1)
      distance = k - (k-a[n]+a[1]);
    else
      distance = k - (a[i]-a[i-1]);
    if (near > distance)
      near = distance;
  }
  
  printf("%d",near);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d "
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rbx
	movq	%r12, %rdi
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	subl	$2, %eax
	cmpl	$999998, %eax
	ja	.L2
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$2, %eax
	cmpl	$199998, %eax
	ja	.L3
	leaq	20(%rsp), %rbx
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jl	.L4
	movl	12(%rsp), %edx
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, %edx
	jge	.L4
	testl	%edx, %edx
	jle	.L10
	movl	8(%rsp), %r9d
	movl	20(%rsp), %r10d
	movq	%r12, %rax
	leal	1(%rdx), %edi
	movl	$100000000, %r8d
	movl	$1, %ecx
	movslq	%edx, %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r9d, %edx
	subl	4(%rax), %edx
	addl	(%rax), %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %ecx
	addq	$4, %rax
	cmpl	%ecx, %edi
	je	.L6
.L8:
	cmpl	$1, %ecx
	jne	.L7
	movl	16(%rsp,%rsi,4), %edx
	subl	%r10d, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addq	$4, %rax
	cmpl	$2, %edi
	je	.L6
	movl	$2, %ecx
	jmp	.L7
.L10:
	movl	$100000000, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800032, %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
.L21:
	.cfi_restore_state
	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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.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
	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
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1312, %rsp
	.cfi_def_cfa_offset 800080
	movl	$800004, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 800024(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %rbx
	movq	%r12, %rdi
	call	memset@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	subl	$2, %eax
	cmpl	$999998, %eax
	ja	.L2
	leaq	12(%rsp), %rbx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$2, %eax
	cmpl	$199998, %eax
	ja	.L3
	leaq	20(%rsp), %rbx
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	-4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jl	.L4
	movl	12(%rsp), %edx
	addl	$1, %r14d
	addq	$4, %rbx
	cmpl	%r14d, %edx
	jge	.L4
	testl	%edx, %edx
	jle	.L10
	movl	8(%rsp), %r9d
	movl	20(%rsp), %r10d
	movq	%r12, %rax
	leal	1(%rdx), %edi
	movl	$100000000, %r8d
	movl	$1, %ecx
	movslq	%edx, %rsi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r9d, %edx
	subl	4(%rax), %edx
	addl	(%rax), %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %ecx
	addq	$4, %rax
	cmpl	%ecx, %edi
	je	.L6
.L8:
	cmpl	$1, %ecx
	jne	.L7
	movl	16(%rsp,%rsi,4), %edx
	subl	%r10d, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addq	$4, %rax
	cmpl	$2, %edi
	je	.L6
	movl	$2, %ecx
	jmp	.L7
.L10:
	movl	$100000000, %r8d
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$800032, %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
.L21:
	.cfi_restore_state
	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:
```