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 n,m;
  int i,j,k;
  int tmp[200001];
  int req[100001],fin[200001];
  scanf("%d %d",&n,&m);
  for(i=0;i<m;i++){
    scanf("%d",&req[i]);
  }
 
  for(i=0;i<n;i++){
    tmp[i]=i+1;
  }

  // putchar('\n');

     for(k=0;k<m;k++){
       if(tmp[req[m-k-1]-1] && (m-k-1)>=0){
	 fin[k]=req[m-k-1];
	 printf("%d\n",fin[k]);
	 tmp[fin[k]-1]=0;
       }
     }

  for(k=0;k<n;k++){
    if(tmp[k]){
      printf("%d\n",tmp[k]);
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC5:
	.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	-1196032(%rsp), %r11
	.cfi_def_cfa 11, 1196064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4016, %rsp
	.cfi_def_cfa_offset 1200080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1200040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.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), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L4
.L18:
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jbe	.L20
	movl	%ecx, %esi
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm3
	leaq	400032(%rsp), %rdx
	shrl	$2, %esi
	movdqa	.LC4(%rip), %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	leaq	400048(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm1, %xmm0
	addq	$16, %rdx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L6
	movl	%ecx, %edx
	andl	$-4, %edx
	testb	$3, %cl
	je	.L7
.L5:
	leal	1(%rdx), %esi
	movslq	%edx, %rdi
	movl	%esi, 400032(%rsp,%rdi,4)
	cmpl	%esi, %ecx
	jle	.L7
	leal	2(%rdx), %edi
	movslq	%esi, %rsi
	movl	%edi, 400032(%rsp,%rsi,4)
	cmpl	%edi, %ecx
	jle	.L7
	movslq	%edi, %rdi
	addl	$3, %edx
	movl	%edx, 400032(%rsp,%rdi,4)
.L7:
	testl	%eax, %eax
	jle	.L12
.L17:
	xorl	%ebp, %ebp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	400032(%rsp,%rbx,4), %esi
	testl	%esi, %esi
	je	.L8
	testl	%ecx, %ecx
	jg	.L32
.L8:
	addl	$1, %ebp
	cmpl	%eax, %ebp
	jl	.L11
.L10:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
.L12:
	xorl	%ebx, %ebx
	leaq	400032(%rsp), %rbp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%rbp,%rbx,4), %edx
	testl	%edx, %edx
	jne	.L33
	addq	$1, %rbx
	cmpl	%ebx, 8(%rsp)
	jg	.L16
.L15:
	movq	1200040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$1200048, %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
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	movl	$0, 400032(%rsp,%rbx,4)
	cmpl	%eax, %ebp
	jl	.L11
	jmp	.L10
.L2:
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L15
.L4:
	testl	%eax, %eax
	jg	.L17
	jmp	.L15
.L20:
	xorl	%edx, %edx
	jmp	.L5
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC5:
	.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	-1196032(%rsp), %r11
	.cfi_def_cfa 11, 1196064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4016, %rsp
	.cfi_def_cfa_offset 1200080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1200040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.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), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L4
.L18:
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jbe	.L20
	movl	%ecx, %esi
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm3
	leaq	400032(%rsp), %rdx
	shrl	$2, %esi
	movdqa	.LC4(%rip), %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	leaq	400048(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm1, %xmm0
	addq	$16, %rdx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L6
	movl	%ecx, %edx
	andl	$-4, %edx
	testb	$3, %cl
	je	.L7
.L5:
	leal	1(%rdx), %esi
	movslq	%edx, %rdi
	movl	%esi, 400032(%rsp,%rdi,4)
	cmpl	%esi, %ecx
	jle	.L7
	leal	2(%rdx), %edi
	movslq	%esi, %rsi
	movl	%edi, 400032(%rsp,%rsi,4)
	cmpl	%edi, %ecx
	jle	.L7
	movslq	%edi, %rdi
	addl	$3, %edx
	movl	%edx, 400032(%rsp,%rdi,4)
.L7:
	testl	%eax, %eax
	jle	.L12
.L17:
	xorl	%ebp, %ebp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	400032(%rsp,%rbx,4), %esi
	testl	%esi, %esi
	je	.L8
	testl	%ecx, %ecx
	jg	.L32
.L8:
	addl	$1, %ebp
	cmpl	%eax, %ebp
	jl	.L11
.L10:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
.L12:
	xorl	%ebx, %ebx
	leaq	400032(%rsp), %rbp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%rbp,%rbx,4), %edx
	testl	%edx, %edx
	jne	.L33
	addq	$1, %rbx
	cmpl	%ebx, 8(%rsp)
	jg	.L16
.L15:
	movq	1200040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$1200048, %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
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	movl	$0, 400032(%rsp,%rbx,4)
	cmpl	%eax, %ebp
	jl	.L11
	jmp	.L10
.L2:
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L15
.L4:
	testl	%eax, %eax
	jg	.L17
	jmp	.L15
.L20:
	xorl	%edx, %edx
	jmp	.L5
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC5:
	.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	-1196032(%rsp), %r11
	.cfi_def_cfa 11, 1196064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4016, %rsp
	.cfi_def_cfa_offset 1200080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1200040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.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), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L4
.L18:
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jbe	.L20
	movl	%ecx, %esi
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm3
	leaq	400032(%rsp), %rdx
	shrl	$2, %esi
	movdqa	.LC4(%rip), %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	leaq	400048(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm1, %xmm0
	addq	$16, %rdx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L6
	movl	%ecx, %edx
	andl	$-4, %edx
	testb	$3, %cl
	je	.L7
.L5:
	leal	1(%rdx), %esi
	movslq	%edx, %rdi
	movl	%esi, 400032(%rsp,%rdi,4)
	cmpl	%esi, %ecx
	jle	.L7
	leal	2(%rdx), %edi
	movslq	%esi, %rsi
	movl	%edi, 400032(%rsp,%rsi,4)
	cmpl	%edi, %ecx
	jle	.L7
	movslq	%edi, %rdi
	addl	$3, %edx
	movl	%edx, 400032(%rsp,%rdi,4)
.L7:
	testl	%eax, %eax
	jle	.L12
.L17:
	xorl	%ebp, %ebp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	400032(%rsp,%rbx,4), %esi
	testl	%esi, %esi
	je	.L8
	testl	%ecx, %ecx
	jg	.L32
.L8:
	addl	$1, %ebp
	cmpl	%eax, %ebp
	jl	.L11
.L10:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
.L12:
	xorl	%ebx, %ebx
	leaq	400032(%rsp), %rbp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%rbp,%rbx,4), %edx
	testl	%edx, %edx
	jne	.L33
	addq	$1, %rbx
	cmpl	%ebx, 8(%rsp)
	jg	.L16
.L15:
	movq	1200040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$1200048, %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
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	movl	$0, 400032(%rsp,%rbx,4)
	cmpl	%eax, %ebp
	jl	.L11
	jmp	.L10
.L2:
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L15
.L4:
	testl	%eax, %eax
	jg	.L17
	jmp	.L15
.L20:
	xorl	%edx, %edx
	jmp	.L5
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 n,m;
  int i,j,k;
  int tmp[200001];
  int req[100001],fin[200001];
  scanf("%d %d",&n,&m);
  for(i=0;i<m;i++){
    scanf("%d",&req[i]);
  }
 
  for(i=0;i<n;i++){
    tmp[i]=i+1;
  }

  // putchar('\n');

     for(k=0;k<m;k++){
       if(tmp[req[m-k-1]-1] && (m-k-1)>=0){
	 fin[k]=req[m-k-1];
	 printf("%d\n",fin[k]);
	 tmp[fin[k]-1]=0;
       }
     }

  for(k=0;k<n;k++){
    if(tmp[k]){
      printf("%d\n",tmp[k]);
    }
  }
  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 n,m;
  int i,j,k;
  int tmp[200001];
  int req[100001],fin[200001];
  scanf("%d %d",&n,&m);
  for(i=0;i<m;i++){
    scanf("%d",&req[i]);
  }
 
  for(i=0;i<n;i++){
    tmp[i]=i+1;
  }

  // putchar('\n');

     for(k=0;k<m;k++){
       if(tmp[req[m-k-1]-1] && (m-k-1)>=0){
	 fin[k]=req[m-k-1];
	 printf("%d\n",fin[k]);
	 tmp[fin[k]-1]=0;
       }
     }

  for(k=0;k<n;k++){
    if(tmp[k]){
      printf("%d\n",tmp[k]);
    }
  }
  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 0
4
2
5
 2 0
4
2
6
 5 3
5
2
5
 3 0
4
0
6
 7 0
3
0
6
 9 0
3
0
6
 9 1
4
0
6
 1 0
10
0
0
 10 1
4
0
6
 10 1
8
0
6

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

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 n,m;
  int i,j,k;
  int tmp[200001];
  int req[100001],fin[200001];
  scanf("%d %d",&n,&m);
  for(i=0;i<m;i++){
    scanf("%d",&req[i]);
  }
 
  for(i=0;i<n;i++){
    tmp[i]=i+1;
  }

  // putchar('\n');

     for(k=0;k<m;k++){
       if(tmp[req[m-k-1]-1] && (m-k-1)>=0){
	 fin[k]=req[m-k-1];
	 printf("%d\n",fin[k]);
	 tmp[fin[k]-1]=0;
       }
     }

  for(k=0;k<n;k++){
    if(tmp[k]){
      printf("%d\n",tmp[k]);
    }
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC5:
	.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	-1196032(%rsp), %r11
	.cfi_def_cfa 11, 1196064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4016, %rsp
	.cfi_def_cfa_offset 1200080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1200040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.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), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L4
.L18:
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jbe	.L20
	movl	%ecx, %esi
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm3
	leaq	400032(%rsp), %rdx
	shrl	$2, %esi
	movdqa	.LC4(%rip), %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	leaq	400048(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm1, %xmm0
	addq	$16, %rdx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L6
	movl	%ecx, %edx
	andl	$-4, %edx
	testb	$3, %cl
	je	.L7
.L5:
	leal	1(%rdx), %esi
	movslq	%edx, %rdi
	movl	%esi, 400032(%rsp,%rdi,4)
	cmpl	%esi, %ecx
	jle	.L7
	leal	2(%rdx), %edi
	movslq	%esi, %rsi
	movl	%edi, 400032(%rsp,%rsi,4)
	cmpl	%edi, %ecx
	jle	.L7
	movslq	%edi, %rdi
	addl	$3, %edx
	movl	%edx, 400032(%rsp,%rdi,4)
.L7:
	testl	%eax, %eax
	jle	.L12
.L17:
	xorl	%ebp, %ebp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	400032(%rsp,%rbx,4), %esi
	testl	%esi, %esi
	je	.L8
	testl	%ecx, %ecx
	jg	.L32
.L8:
	addl	$1, %ebp
	cmpl	%eax, %ebp
	jl	.L11
.L10:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
.L12:
	xorl	%ebx, %ebx
	leaq	400032(%rsp), %rbp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%rbp,%rbx,4), %edx
	testl	%edx, %edx
	jne	.L33
	addq	$1, %rbx
	cmpl	%ebx, 8(%rsp)
	jg	.L16
.L15:
	movq	1200040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$1200048, %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
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	movl	$0, 400032(%rsp,%rbx,4)
	cmpl	%eax, %ebp
	jl	.L11
	jmp	.L10
.L2:
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L15
.L4:
	testl	%eax, %eax
	jg	.L17
	jmp	.L15
.L20:
	xorl	%edx, %edx
	jmp	.L5
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC5:
	.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	-1196032(%rsp), %r11
	.cfi_def_cfa 11, 1196064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$4016, %rsp
	.cfi_def_cfa_offset 1200080
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1200040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.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), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jg	.L3
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L4
.L18:
	leal	-1(%rcx), %edx
	cmpl	$2, %edx
	jbe	.L20
	movl	%ecx, %esi
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC3(%rip), %xmm3
	leaq	400032(%rsp), %rdx
	shrl	$2, %esi
	movdqa	.LC4(%rip), %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	leaq	400048(%rsp,%rsi), %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqa	%xmm1, %xmm0
	addq	$16, %rdx
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L6
	movl	%ecx, %edx
	andl	$-4, %edx
	testb	$3, %cl
	je	.L7
.L5:
	leal	1(%rdx), %esi
	movslq	%edx, %rdi
	movl	%esi, 400032(%rsp,%rdi,4)
	cmpl	%esi, %ecx
	jle	.L7
	leal	2(%rdx), %edi
	movslq	%esi, %rsi
	movl	%edi, 400032(%rsp,%rsi,4)
	cmpl	%edi, %ecx
	jle	.L7
	movslq	%edi, %rdi
	addl	$3, %edx
	movl	%edx, 400032(%rsp,%rdi,4)
.L7:
	testl	%eax, %eax
	jle	.L12
.L17:
	xorl	%ebp, %ebp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%eax, %ecx
	subl	%ebp, %ecx
	leal	-1(%rcx), %edx
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	leal	-1(%rdx), %ebx
	movslq	%ebx, %rbx
	movl	400032(%rsp,%rbx,4), %esi
	testl	%esi, %esi
	je	.L8
	testl	%ecx, %ecx
	jg	.L32
.L8:
	addl	$1, %ebp
	cmpl	%eax, %ebp
	jl	.L11
.L10:
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L15
.L12:
	xorl	%ebx, %ebx
	leaq	400032(%rsp), %rbp
	leaq	.LC5(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movl	0(%rbp,%rbx,4), %edx
	testl	%edx, %edx
	jne	.L33
	addq	$1, %rbx
	cmpl	%ebx, 8(%rsp)
	jg	.L16
.L15:
	movq	1200040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$1200048, %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
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L16
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__printf_chk@PLT
	movl	12(%rsp), %eax
	movl	$0, 400032(%rsp,%rbx,4)
	cmpl	%eax, %ebp
	jl	.L11
	jmp	.L10
.L2:
	movl	8(%rsp), %ecx
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L15
.L4:
	testl	%eax, %eax
	jg	.L17
	jmp	.L15
.L20:
	xorl	%edx, %edx
	jmp	.L5
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
```