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 <limits.h>
#define H 200000
int v[H+1];
int main(void){
    int h, w, n, x, y;
    scanf("%d %d %d\n", &h, &w, &n);
    for(int i=1; i<h+1; i++){ v[i] = i+1; }
    for(int i=0; i<n; i++){
        scanf("%d %d\n", &x, &y);
        v[x] = y<v[x] ? y : v[x];
    }
    int right = 1;
    for(int x=1; x<h; x++){
        if(v[x+1]<right+1){
            printf("%d\n", x);
            return 0;
        }else if(v[x+1]>right+1){
            right++;
        }
    }
    printf("%d\n", h);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d %d\n"
.LC4:
	.string	"%d %d\n"
.LC5:
	.string	"%d\n"
	.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
	leaq	.LC1(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%r8d, %edx
	leaq	4+v(%rip), %rax
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC2(%rip), %xmm3
	shrl	$2, %edx
	leaq	16(%rax), %rcx
	movdqa	.LC3(%rip), %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm1, %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L2
.L3:
	leal	1(%rax), %edx
	leaq	v(%rip), %r14
	movslq	%eax, %rcx
	movl	%edx, (%r14,%rcx,4)
	cmpl	%r8d, %edx
	jg	.L2
	leal	2(%rax), %ecx
	movslq	%edx, %rdx
	movl	%ecx, (%r14,%rdx,4)
	cmpl	%ecx, %r8d
	jl	.L2
	movslq	%ecx, %rcx
	addl	$3, %eax
	movl	%eax, (%r14,%rcx,4)
.L2:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	v(%rip), %r14
	leaq	16(%rsp), %r12
	leaq	.LC4(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	20(%rsp), %ecx
	movl	(%r14,%rdx,4), %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	addl	$1, %ebx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	movl	4(%rsp), %r8d
.L6:
	cmpl	$1, %r8d
	jle	.L8
	movslq	%r8d, %r10
	movl	$1, %eax
	movl	$1, %edx
	leaq	4+v(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rdx), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %edx
	addq	$1, %rax
	cmpq	%rax, %r10
	je	.L8
.L12:
	movl	(%rdi,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L9
	movl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L8:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$32, %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
.L14:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 800004
v:
	.zero	800004
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.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 %d\n"
.LC4:
	.string	"%d %d\n"
.LC5:
	.string	"%d\n"
	.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
	leaq	.LC1(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%r8d, %edx
	leaq	4+v(%rip), %rax
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC2(%rip), %xmm3
	shrl	$2, %edx
	leaq	16(%rax), %rcx
	movdqa	.LC3(%rip), %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm1, %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L2
.L3:
	leal	1(%rax), %edx
	leaq	v(%rip), %r14
	movslq	%eax, %rcx
	movl	%edx, (%r14,%rcx,4)
	cmpl	%r8d, %edx
	jg	.L2
	leal	2(%rax), %ecx
	movslq	%edx, %rdx
	movl	%ecx, (%r14,%rdx,4)
	cmpl	%ecx, %r8d
	jl	.L2
	movslq	%ecx, %rcx
	addl	$3, %eax
	movl	%eax, (%r14,%rcx,4)
.L2:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	v(%rip), %r14
	leaq	16(%rsp), %r12
	leaq	.LC4(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	20(%rsp), %ecx
	movl	(%r14,%rdx,4), %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	addl	$1, %ebx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	movl	4(%rsp), %r8d
.L6:
	cmpl	$1, %r8d
	jle	.L8
	movslq	%r8d, %r10
	movl	$1, %eax
	movl	$1, %edx
	leaq	4+v(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rdx), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %edx
	addq	$1, %rax
	cmpq	%rax, %r10
	je	.L8
.L12:
	movl	(%rdi,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L9
	movl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L8:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$32, %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
.L14:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 800004
v:
	.zero	800004
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.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 %d\n"
.LC4:
	.string	"%d %d\n"
.LC5:
	.string	"%d\n"
	.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
	leaq	.LC1(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%r8d, %edx
	leaq	4+v(%rip), %rax
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC2(%rip), %xmm3
	shrl	$2, %edx
	leaq	16(%rax), %rcx
	movdqa	.LC3(%rip), %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm1, %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L2
.L3:
	leal	1(%rax), %edx
	leaq	v(%rip), %r14
	movslq	%eax, %rcx
	movl	%edx, (%r14,%rcx,4)
	cmpl	%r8d, %edx
	jg	.L2
	leal	2(%rax), %ecx
	movslq	%edx, %rdx
	movl	%ecx, (%r14,%rdx,4)
	cmpl	%ecx, %r8d
	jl	.L2
	movslq	%ecx, %rcx
	addl	$3, %eax
	movl	%eax, (%r14,%rcx,4)
.L2:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	v(%rip), %r14
	leaq	16(%rsp), %r12
	leaq	.LC4(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	20(%rsp), %ecx
	movl	(%r14,%rdx,4), %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	addl	$1, %ebx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	movl	4(%rsp), %r8d
.L6:
	cmpl	$1, %r8d
	jle	.L8
	movslq	%r8d, %r10
	movl	$1, %eax
	movl	$1, %edx
	leaq	4+v(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rdx), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %edx
	addq	$1, %rax
	cmpq	%rax, %r10
	je	.L8
.L12:
	movl	(%rdi,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L9
	movl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L8:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$32, %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
.L14:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 800004
v:
	.zero	800004
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.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>
#include <limits.h>
#define H 200000
int v[H+1];
int main(void){
    int h, w, n, x, y;
    scanf("%d %d %d\n", &h, &w, &n);
    for(int i=1; i<h+1; i++){ v[i] = i+1; }
    for(int i=0; i<n; i++){
        scanf("%d %d\n", &x, &y);
        v[x] = y<v[x] ? y : v[x];
    }
    int right = 1;
    for(int x=1; x<h; x++){
        if(v[x+1]<right+1){
            printf("%d\n", x);
            return 0;
        }else if(v[x+1]>right+1){
            right++;
        }
    }
    printf("%d\n", h);
    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 <limits.h>
#define H 200000
int v[H+1];
int main(void){
    int h, w, n, x, y;
    scanf("%d %d %d\n", &h, &w, &n);
    for(int i=1; i<h+1; i++){ v[i] = i+1; }
    for(int i=0; i<n; i++){
        scanf("%d %d\n", &x, &y);
        v[x] = y<v[x] ? y : v[x];
    }
    int right = 1;
    for(int x=1; x<h; x++){
        if(v[x+1]<right+1){
            printf("%d\n", x);
            return 0;
        }else if(v[x+1]>right+1){
            right++;
        }
    }
    printf("%d\n", h);
    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:

3 6 1
3 2
 100001 100000 0
 10 10 14
4 3
2 2
7 3
9 10
7 9
8 1
10 10
5 4
3 4
2 8
6 4
4 4
5 8
9 2
 100101 100000 0
 10 10 14
4 3
2 1
7 3
9 10
7 9
8 1
10 10
5 4
3 4
2 8
6 4
4 4
5 8
9 2
 110101 100000 0
 110111 100000 0
 010101 111001 0
 110100 100000 0
 100111 100000 0

2
 100001
 6
 100101
 1
 110101
 110111
 10101
 110100
 100111

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 <limits.h>
#define H 200000
int v[H+1];
int main(void){
    int h, w, n, x, y;
    scanf("%d %d %d\n", &h, &w, &n);
    for(int i=1; i<h+1; i++){ v[i] = i+1; }
    for(int i=0; i<n; i++){
        scanf("%d %d\n", &x, &y);
        v[x] = y<v[x] ? y : v[x];
    }
    int right = 1;
    for(int x=1; x<h; x++){
        if(v[x+1]<right+1){
            printf("%d\n", x);
            return 0;
        }else if(v[x+1]>right+1){
            right++;
        }
    }
    printf("%d\n", h);
    return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d %d\n"
.LC4:
	.string	"%d %d\n"
.LC5:
	.string	"%d\n"
	.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
	leaq	.LC1(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%r8d, %edx
	leaq	4+v(%rip), %rax
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC2(%rip), %xmm3
	shrl	$2, %edx
	leaq	16(%rax), %rcx
	movdqa	.LC3(%rip), %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm1, %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L2
.L3:
	leal	1(%rax), %edx
	leaq	v(%rip), %r14
	movslq	%eax, %rcx
	movl	%edx, (%r14,%rcx,4)
	cmpl	%r8d, %edx
	jg	.L2
	leal	2(%rax), %ecx
	movslq	%edx, %rdx
	movl	%ecx, (%r14,%rdx,4)
	cmpl	%ecx, %r8d
	jl	.L2
	movslq	%ecx, %rcx
	addl	$3, %eax
	movl	%eax, (%r14,%rcx,4)
.L2:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	v(%rip), %r14
	leaq	16(%rsp), %r12
	leaq	.LC4(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	20(%rsp), %ecx
	movl	(%r14,%rdx,4), %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	addl	$1, %ebx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	movl	4(%rsp), %r8d
.L6:
	cmpl	$1, %r8d
	jle	.L8
	movslq	%r8d, %r10
	movl	$1, %eax
	movl	$1, %edx
	leaq	4+v(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rdx), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %edx
	addq	$1, %rax
	cmpq	%rax, %r10
	je	.L8
.L12:
	movl	(%rdi,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L9
	movl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L8:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$32, %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
.L14:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 800004
v:
	.zero	800004
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.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 %d\n"
.LC4:
	.string	"%d %d\n"
.LC5:
	.string	"%d\n"
	.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
	leaq	.LC1(%rip), %rdi
	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
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rcx
	leaq	8(%rsp), %rdx
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L2
	leal	-1(%r8), %eax
	cmpl	$2, %eax
	jbe	.L14
	movl	%r8d, %edx
	leaq	4+v(%rip), %rax
	movdqa	.LC0(%rip), %xmm1
	movdqa	.LC2(%rip), %xmm3
	shrl	$2, %edx
	leaq	16(%rax), %rcx
	movdqa	.LC3(%rip), %xmm2
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L4:
	movdqa	%xmm1, %xmm0
	addq	$16, %rax
	paddd	%xmm3, %xmm1
	paddd	%xmm2, %xmm0
	movups	%xmm0, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L4
	movl	%r8d, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%edx, %r8d
	je	.L2
.L3:
	leal	1(%rax), %edx
	leaq	v(%rip), %r14
	movslq	%eax, %rcx
	movl	%edx, (%r14,%rcx,4)
	cmpl	%r8d, %edx
	jg	.L2
	leal	2(%rax), %ecx
	movslq	%edx, %rdx
	movl	%ecx, (%r14,%rdx,4)
	cmpl	%ecx, %r8d
	jl	.L2
	movslq	%ecx, %rcx
	addl	$3, %eax
	movl	%eax, (%r14,%rcx,4)
.L2:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L6
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r13
	leaq	v(%rip), %r14
	leaq	16(%rsp), %r12
	leaq	.LC4(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %rdx
	movl	20(%rsp), %ecx
	movl	(%r14,%rdx,4), %eax
	cmpl	%ecx, %eax
	cmovg	%ecx, %eax
	addl	$1, %ebx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%ebx, 12(%rsp)
	jg	.L7
	movl	4(%rsp), %r8d
.L6:
	cmpl	$1, %r8d
	jle	.L8
	movslq	%r8d, %r10
	movl	$1, %eax
	movl	$1, %edx
	leaq	4+v(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	leal	1(%rdx), %esi
	cmpl	%esi, %ecx
	cmovg	%esi, %edx
	addq	$1, %rax
	cmpq	%rax, %r10
	je	.L8
.L12:
	movl	(%rdi,%rax,4), %ecx
	cmpl	%edx, %ecx
	jg	.L9
	movl	%eax, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L8:
	movl	%r8d, %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$32, %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
.L14:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L3
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 800004
v:
	.zero	800004
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.align 16
.LC3:
	.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:
```