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>
#define N 10001
#define M 100

int main()
{
  int i, j, n;
  int a[N];
  int sa[M][M];
  int temp;

  while(1)
    {
      
      scanf("%d",&n);

      if(n==0)
	return 0;
      else
	{
	  /*printf("n = %d\n",n);*/
	  
	  for(i=0;i<n;i++)
	    {
	      scanf("%d",&a[i]);
	      /*printf("%d = %d\n",i,a[i]);*/
	    }
	  
	  temp = 0;
	  
	  for(i=0;i<n;i++)
	    {
	      for(j=i+1;j<n;j++)
		{
		  sa[i][j] = a[i] - a[j];
		  if(sa[i][j]<0)
		    {
		      sa[i][j] = (-1)*sa[i][j];
		    }
		  if(j==1 || temp>sa[i][j])
		    {
		      temp = sa[i][j];
		    }
		}
	    }
	  printf("%d\n",temp);
	}
    }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	40016(%rsp), %r13
	movl	$0, %r14d
	movq	%r13, %r15
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r14d, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	20(%rsp), %r11
	movslq	%r9d, %r14
	movl	$1, %r10d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	-4(%r13,%r10,4), %edi
	movq	%r11, %rdx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%r13,%rax,4), %ecx
	movl	%edi, %esi
	subl	%ecx, %esi
	jns	.L24
	subl	%edi, %ecx
	movl	%ecx, %esi
.L24:
	movl	%esi, (%rdx)
	cmpl	$1, %eax
	je	.L12
	cmpl	%esi, %r8d
	jle	.L11
.L12:
	movl	(%rdx), %r8d
.L11:
	addq	$1, %rax
	addq	$4, %rdx
	cmpl	%eax, %r9d
	jg	.L13
	addq	$1, %r10
	addq	$404, %r11
	cmpq	%r10, %r14
	jne	.L14
.L15:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L4:
	xorl	%r8d, %r8d
	jmp	.L15
.L2:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$80040, %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
.L26:
	.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\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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	40016(%rsp), %r13
	movl	$0, %r14d
	movq	%r13, %r15
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r14d, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	20(%rsp), %r11
	movslq	%r9d, %r14
	movl	$1, %r10d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	-4(%r13,%r10,4), %edi
	movq	%r11, %rdx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%r13,%rax,4), %ecx
	movl	%edi, %esi
	subl	%ecx, %esi
	jns	.L24
	subl	%edi, %ecx
	movl	%ecx, %esi
.L24:
	movl	%esi, (%rdx)
	cmpl	$1, %eax
	je	.L12
	cmpl	%esi, %r8d
	jle	.L11
.L12:
	movl	(%rdx), %r8d
.L11:
	addq	$1, %rax
	addq	$4, %rdx
	cmpl	%eax, %r9d
	jg	.L13
	addq	$1, %r10
	addq	$404, %r11
	cmpq	%r10, %r14
	jne	.L14
.L15:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L4:
	xorl	%r8d, %r8d
	jmp	.L15
.L2:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$80040, %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
.L26:
	.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\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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	40016(%rsp), %r13
	movl	$0, %r14d
	movq	%r13, %r15
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r14d, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	20(%rsp), %r11
	movslq	%r9d, %r14
	movl	$1, %r10d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	-4(%r13,%r10,4), %edi
	movq	%r11, %rdx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%r13,%rax,4), %ecx
	movl	%edi, %esi
	subl	%ecx, %esi
	jns	.L24
	subl	%edi, %ecx
	movl	%ecx, %esi
.L24:
	movl	%esi, (%rdx)
	cmpl	$1, %eax
	je	.L12
	cmpl	%esi, %r8d
	jle	.L11
.L12:
	movl	(%rdx), %r8d
.L11:
	addq	$1, %rax
	addq	$4, %rdx
	cmpl	%eax, %r9d
	jg	.L13
	addq	$1, %r10
	addq	$404, %r11
	cmpq	%r10, %r14
	jne	.L14
.L15:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L4:
	xorl	%r8d, %r8d
	jmp	.L15
.L2:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$80040, %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
.L26:
	.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>
#define N 10001
#define M 100

int main()
{
  int i, j, n;
  int a[N];
  int sa[M][M];
  int temp;

  while(1)
    {
      
      scanf("%d",&n);

      if(n==0)
	return 0;
      else
	{
	  /*printf("n = %d\n",n);*/
	  
	  for(i=0;i<n;i++)
	    {
	      scanf("%d",&a[i]);
	      /*printf("%d = %d\n",i,a[i]);*/
	    }
	  
	  temp = 0;
	  
	  for(i=0;i<n;i++)
	    {
	      for(j=i+1;j<n;j++)
		{
		  sa[i][j] = a[i] - a[j];
		  if(sa[i][j]<0)
		    {
		      sa[i][j] = (-1)*sa[i][j];
		    }
		  if(j==1 || temp>sa[i][j])
		    {
		      temp = sa[i][j];
		    }
		}
	    }
	  printf("%d\n",temp);
	}
    }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#define N 10001
#define M 100

int main()
{
  int i, j, n;
  int a[N];
  int sa[M][M];
  int temp;

  while(1)
    {
      
      scanf("%d",&n);

      if(n==0)
	return 0;
      else
	{
	  /*printf("n = %d\n",n);*/
	  
	  for(i=0;i<n;i++)
	    {
	      scanf("%d",&a[i]);
	      /*printf("%d = %d\n",i,a[i]);*/
	    }
	  
	  temp = 0;
	  
	  for(i=0;i<n;i++)
	    {
	      for(j=i+1;j<n;j++)
		{
		  sa[i][j] = a[i] - a[j];
		  if(sa[i][j]<0)
		    {
		      sa[i][j] = (-1)*sa[i][j];
		    }
		  if(j==1 || temp>sa[i][j])
		    {
		      temp = sa[i][j];
		    }
		}
	    }
	  printf("%d\n",temp);
	}
    }
  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:

5
10 10 1 10 10
5
1 5 8 9 11
7
11 34 83 47 59 29 70
0
 5
10 10 1 10 10
5
1 5 8 9 11
7
11 34 83 47 59 29 48
0
 5
10 10 1 10 10
5
1 5 8 5 11
7
11 34 83 47 59 29 48
0
 5
10 10 1 10 10
5
1 5 8 5 11
7
11 34 83 47 54 29 2
0
 5
10 10 10 10 10
5
1 5 8 9 11
7
11 34 83 47 44 29 70
0
 5
10 10 1 10 10
5
1 5 8 5 11
0
11 34 83 47 54 29 2
0
 5
10 10 1 10 10
5
1 5 8 9 8
7
11 34 83 48 59 29 48
0
 5
10 10 10 1 10
5
1 5 8 13 11
7
11 34 83 47 44 29 70
0
 5
10 -1 1 10 10
5
1 5 8 9 11
7
11 34 83 47 59 29 85
0
 5
10 10 10 1 10
5
1 5 8 13 11
0
11 34 83 47 44 50 70
0

0
1
5
 0
1
1
 0
0
1
 0
0
5
 0
1
3
 0
0
 0
0
0
 0
2
3
 0
1
2
 0
2

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>
#define N 10001
#define M 100

int main()
{
  int i, j, n;
  int a[N];
  int sa[M][M];
  int temp;

  while(1)
    {
      
      scanf("%d",&n);

      if(n==0)
	return 0;
      else
	{
	  /*printf("n = %d\n",n);*/
	  
	  for(i=0;i<n;i++)
	    {
	      scanf("%d",&a[i]);
	      /*printf("%d = %d\n",i,a[i]);*/
	    }
	  
	  temp = 0;
	  
	  for(i=0;i<n;i++)
	    {
	      for(j=i+1;j<n;j++)
		{
		  sa[i][j] = a[i] - a[j];
		  if(sa[i][j]<0)
		    {
		      sa[i][j] = (-1)*sa[i][j];
		    }
		  if(j==1 || temp>sa[i][j])
		    {
		      temp = sa[i][j];
		    }
		}
	    }
	  printf("%d\n",temp);
	}
    }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	40016(%rsp), %r13
	movl	$0, %r14d
	movq	%r13, %r15
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r14d, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	20(%rsp), %r11
	movslq	%r9d, %r14
	movl	$1, %r10d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	-4(%r13,%r10,4), %edi
	movq	%r11, %rdx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%r13,%rax,4), %ecx
	movl	%edi, %esi
	subl	%ecx, %esi
	jns	.L24
	subl	%edi, %ecx
	movl	%ecx, %esi
.L24:
	movl	%esi, (%rdx)
	cmpl	$1, %eax
	je	.L12
	cmpl	%esi, %r8d
	jle	.L11
.L12:
	movl	(%rdx), %r8d
.L11:
	addq	$1, %rax
	addq	$4, %rdx
	cmpl	%eax, %r9d
	jg	.L13
	addq	$1, %r10
	addq	$404, %r11
	cmpq	%r10, %r14
	jne	.L14
.L15:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L4:
	xorl	%r8d, %r8d
	jmp	.L15
.L2:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$80040, %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
.L26:
	.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\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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2216, %rsp
	.cfi_def_cfa_offset 80096
	leaq	.LC0(%rip), %rbx
	leaq	.LC1(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 80024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	leaq	40016(%rsp), %r13
	movl	$0, %r14d
	movq	%r13, %r15
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r15, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r9d
	addq	$4, %r15
	cmpl	%r14d, %r9d
	jg	.L5
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	20(%rsp), %r11
	movslq	%r9d, %r14
	movl	$1, %r10d
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	-4(%r13,%r10,4), %edi
	movq	%r11, %rdx
	movq	%r10, %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%r13,%rax,4), %ecx
	movl	%edi, %esi
	subl	%ecx, %esi
	jns	.L24
	subl	%edi, %ecx
	movl	%ecx, %esi
.L24:
	movl	%esi, (%rdx)
	cmpl	$1, %eax
	je	.L12
	cmpl	%esi, %r8d
	jle	.L11
.L12:
	movl	(%rdx), %r8d
.L11:
	addq	$1, %rax
	addq	$4, %rdx
	cmpl	%eax, %r9d
	jg	.L13
	addq	$1, %r10
	addq	$404, %r11
	cmpq	%r10, %r14
	jne	.L14
.L15:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L4:
	xorl	%r8d, %r8d
	jmp	.L15
.L2:
	movq	80024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$80040, %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
.L26:
	.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:
```