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()                                                                      
{   int a[100005]={0};                                                          
	int n;                                                                         
	scanf("%d",&n);                                                                
	for(int i=1;i<=n;i++)                                                          
	{                                                                              
		scanf("%d",&a[i]);                                                            
	}                                                                              
	int sum=0;                                                                     
	if(a[1]==1)                                                                    
	{                                                                              
		int t=a[2];                                                                   
		a[2]=a[1];                                                                    
		a[1]=t;                                                                       
		sum=sum+1;                                                                    
	}                                                                              
	for(int i=2;i<n;i++)                                                           
	{                                                                              
		if(a[i]==i)                                                                   
		{                                                                             
			int p=a[i+1];                                                                  
			a[i+1]=a[i];                                                                 
			a[i]=p;                                                                 
			sum++;                                                                       
		}                                                                             
	}                                                                              
	  if(a[n]==n)                                                                  
	 {
 		int n=a[1];
 		a[1]=a[n];
 		a[n]=n;
 		sum++;
 	}                                                                              
	printf("%d\n",sum);                                                            
	                                                                               
}                                                                               
                                                                                
                                                                                
                                                                                ```

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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L3
.L2:
	movl	20(%rsp), %edi
	xorl	%r8d, %r8d
	cmpl	$1, %edi
	jne	.L4
	movl	24(%rsp), %edi
	movl	$1, 24(%rsp)
	movl	$1, %r8d
	movl	%edi, 20(%rsp)
.L4:
	movslq	%ecx, %rsi
	cmpl	$2, %ecx
	jle	.L5
	leaq	24(%rsp), %rdx
	movslq	%ecx, %rsi
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%eax, (%rdx)
	jne	.L6
	movd	4(%rdx), %xmm0
	movd	%eax, %xmm1
	addl	$1, %r8d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
.L6:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.L7
.L5:
	cmpl	%ecx, 16(%rsp,%rsi,4)
	jne	.L8
	movslq	%edi, %rax
	addl	$1, %r8d
	movl	16(%rsp,%rax,4), %edx
	movl	%edx, 20(%rsp)
	movl	%edi, 16(%rsp,%rax,4)
.L8:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L3
.L2:
	movl	20(%rsp), %edi
	xorl	%r8d, %r8d
	cmpl	$1, %edi
	jne	.L4
	movl	24(%rsp), %edi
	movl	$1, 24(%rsp)
	movl	$1, %r8d
	movl	%edi, 20(%rsp)
.L4:
	movslq	%ecx, %rsi
	cmpl	$2, %ecx
	jle	.L5
	leaq	24(%rsp), %rdx
	movslq	%ecx, %rsi
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%eax, (%rdx)
	jne	.L6
	movd	4(%rdx), %xmm0
	movd	%eax, %xmm1
	addl	$1, %r8d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
.L6:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.L7
.L5:
	cmpl	%ecx, 16(%rsp,%rsi,4)
	jne	.L8
	movslq	%edi, %rax
	addl	$1, %r8d
	movl	16(%rsp,%rax,4), %edx
	movl	%edx, 20(%rsp)
	movl	%edi, 16(%rsp,%rax,4)
.L8:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L3
.L2:
	movl	20(%rsp), %edi
	xorl	%r8d, %r8d
	cmpl	$1, %edi
	jne	.L4
	movl	24(%rsp), %edi
	movl	$1, 24(%rsp)
	movl	$1, %r8d
	movl	%edi, 20(%rsp)
.L4:
	movslq	%ecx, %rsi
	cmpl	$2, %ecx
	jle	.L5
	leaq	24(%rsp), %rdx
	movslq	%ecx, %rsi
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%eax, (%rdx)
	jne	.L6
	movd	4(%rdx), %xmm0
	movd	%eax, %xmm1
	addl	$1, %r8d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
.L6:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.L7
.L5:
	cmpl	%ecx, 16(%rsp,%rsi,4)
	jne	.L8
	movslq	%edi, %rax
	addl	$1, %r8d
	movl	16(%rsp,%rax,4), %edx
	movl	%edx, 20(%rsp)
	movl	%edi, 16(%rsp,%rax,4)
.L8:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.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()                                                                      
{   int a[100005]={0};                                                          
	int n;                                                                         
	scanf("%d",&n);                                                                
	for(int i=1;i<=n;i++)                                                          
	{                                                                              
		scanf("%d",&a[i]);                                                            
	}                                                                              
	int sum=0;                                                                     
	if(a[1]==1)                                                                    
	{                                                                              
		int t=a[2];                                                                   
		a[2]=a[1];                                                                    
		a[1]=t;                                                                       
		sum=sum+1;                                                                    
	}                                                                              
	for(int i=2;i<n;i++)                                                           
	{                                                                              
		if(a[i]==i)                                                                   
		{                                                                             
			int p=a[i+1];                                                                  
			a[i+1]=a[i];                                                                 
			a[i]=p;                                                                 
			sum++;                                                                       
		}                                                                             
	}                                                                              
	  if(a[n]==n)                                                                  
	 {
 		int n=a[1];
 		a[1]=a[n];
 		a[n]=n;
 		sum++;
 	}                                                                              
	printf("%d\n",sum);                                                            
	                                                                               
}                                                                               
                                                                                
                                                                                
                                                                                ```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>                                                               
int main()                                                                      
{   int a[100005]={0};                                                          
	int n;                                                                         
	scanf("%d",&n);                                                                
	for(int i=1;i<=n;i++)                                                          
	{                                                                              
		scanf("%d",&a[i]);                                                            
	}                                                                              
	int sum=0;                                                                     
	if(a[1]==1)                                                                    
	{                                                                              
		int t=a[2];                                                                   
		a[2]=a[1];                                                                    
		a[1]=t;                                                                       
		sum=sum+1;                                                                    
	}                                                                              
	for(int i=2;i<n;i++)                                                           
	{                                                                              
		if(a[i]==i)                                                                   
		{                                                                             
			int p=a[i+1];                                                                  
			a[i+1]=a[i];                                                                 
			a[i]=p;                                                                 
			sum++;                                                                       
		}                                                                             
	}                                                                              
	  if(a[n]==n)                                                                  
	 {
 		int n=a[1];
 		a[1]=a[n];
 		a[n]=n;
 		sum++;
 	}                                                                              
	printf("%d\n",sum);                                                            
	                                                                               
}                                                                               
                                                                                
                                                                                
                                                                                ```

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
1 4 3 5 2

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>                                                               
int main()                                                                      
{   int a[100005]={0};                                                          
	int n;                                                                         
	scanf("%d",&n);                                                                
	for(int i=1;i<=n;i++)                                                          
	{                                                                              
		scanf("%d",&a[i]);                                                            
	}                                                                              
	int sum=0;                                                                     
	if(a[1]==1)                                                                    
	{                                                                              
		int t=a[2];                                                                   
		a[2]=a[1];                                                                    
		a[1]=t;                                                                       
		sum=sum+1;                                                                    
	}                                                                              
	for(int i=2;i<n;i++)                                                           
	{                                                                              
		if(a[i]==i)                                                                   
		{                                                                             
			int p=a[i+1];                                                                  
			a[i+1]=a[i];                                                                 
			a[i]=p;                                                                 
			sum++;                                                                       
		}                                                                             
	}                                                                              
	  if(a[n]==n)                                                                  
	 {
 		int n=a[1];
 		a[1]=a[n];
 		a[n]=n;
 		sum++;
 	}                                                                              
	printf("%d\n",sum);                                                            
	                                                                               
}                                                                               
                                                                                
                                                                                
                                                                                ```

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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L3
.L2:
	movl	20(%rsp), %edi
	xorl	%r8d, %r8d
	cmpl	$1, %edi
	jne	.L4
	movl	24(%rsp), %edi
	movl	$1, 24(%rsp)
	movl	$1, %r8d
	movl	%edi, 20(%rsp)
.L4:
	movslq	%ecx, %rsi
	cmpl	$2, %ecx
	jle	.L5
	leaq	24(%rsp), %rdx
	movslq	%ecx, %rsi
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%eax, (%rdx)
	jne	.L6
	movd	4(%rdx), %xmm0
	movd	%eax, %xmm1
	addl	$1, %r8d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
.L6:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.L7
.L5:
	cmpl	%ecx, 16(%rsp,%rsi,4)
	jne	.L8
	movslq	%edi, %rax
	addl	$1, %r8d
	movl	16(%rsp,%rax,4), %edx
	movl	%edx, 20(%rsp)
	movl	%edi, 16(%rsp,%rax,4)
.L8:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397344
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2736, %rsp
	.cfi_def_cfa_offset 400080
	movl	$400020, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	call	memset@PLT
	leaq	12(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jge	.L3
.L2:
	movl	20(%rsp), %edi
	xorl	%r8d, %r8d
	cmpl	$1, %edi
	jne	.L4
	movl	24(%rsp), %edi
	movl	$1, 24(%rsp)
	movl	$1, %r8d
	movl	%edi, 20(%rsp)
.L4:
	movslq	%ecx, %rsi
	cmpl	$2, %ecx
	jle	.L5
	leaq	24(%rsp), %rdx
	movslq	%ecx, %rsi
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L7:
	cmpl	%eax, (%rdx)
	jne	.L6
	movd	4(%rdx), %xmm0
	movd	%eax, %xmm1
	addl	$1, %r8d
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, (%rdx)
.L6:
	addq	$1, %rax
	addq	$4, %rdx
	cmpq	%rax, %rsi
	jne	.L7
.L5:
	cmpl	%ecx, 16(%rsp,%rsi,4)
	jne	.L8
	movslq	%edi, %rax
	addl	$1, %r8d
	movl	16(%rsp,%rax,4), %edx
	movl	%edx, 20(%rsp)
	movl	%edi, 16(%rsp,%rax,4)
.L8:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	400040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L17:
	.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:
```