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 w, h, n;
	int bex, bey, mapx, mapy,x;
	int sum = 0;
	
	scanf("%d %d %d", &w, &h, &n);
	
	for (x = 0; x < n; x++) {
		scanf("%d %d", &mapx, &mapy);
		if (x != 0) {
			while (1) {
				if (mapx == bex && mapy == bey) {
					break;
				}
				if (mapx > bex && mapy > bey) {
					bex++;
					bey++;
				}
				else if (mapx < bex && mapy < bey) {
					bex--;
					bey--;
				}
				else if (mapx > bex) {
					bex++;
				}
				else if (mapx < bex) {
					bex--;
				}
				else if (mapy > bey) {
					bey++;
				}
				else if (mapy < bey) {
					bey--;
				}
				sum++;
			}
		}
		bex = mapx;
		bey = mapy;
	}
	printf("%d\n", sum);
	
	return (0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	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	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %ebx
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, 12(%rsp)
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r15d, %edx
	movl	%r14d, %eax
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	jle	.L7
	xorl	%ecx, %ecx
	addl	$1, %edx
	cmpl	%eax, %r14d
	setg	%cl
	addl	%ecx, %eax
.L8:
	addl	$1, %r12d
.L12:
	cmpl	%edx, %r15d
	jne	.L4
	cmpl	%eax, %r14d
	je	.L5
.L6:
	cmpl	%eax, %r14d
	jle	.L9
	addl	$1, %eax
.L10:
	addl	$1, %r12d
	cmpl	%edx, %r15d
	jne	.L12
	cmpl	%eax, %r14d
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L16
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	jge	.L6
	xorl	%ecx, %ecx
	subl	$1, %edx
	cmpl	%eax, %r14d
	setl	%cl
	subl	%ecx, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	jge	.L10
	subl	$1, %eax
	jmp	.L10
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L13:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	jge	.L14
	subl	$1, %eax
.L14:
	addl	$1, %r12d
	cmpl	%eax, %r14d
	je	.L5
.L15:
	cmpl	%eax, %r14d
	jle	.L13
	addl	$1, %eax
	jmp	.L14
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	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	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %ebx
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, 12(%rsp)
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r15d, %edx
	movl	%r14d, %eax
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	jle	.L7
	xorl	%ecx, %ecx
	addl	$1, %edx
	cmpl	%eax, %r14d
	setg	%cl
	addl	%ecx, %eax
.L8:
	addl	$1, %r12d
.L12:
	cmpl	%edx, %r15d
	jne	.L4
	cmpl	%eax, %r14d
	je	.L5
.L6:
	cmpl	%eax, %r14d
	jle	.L9
	addl	$1, %eax
.L10:
	addl	$1, %r12d
	cmpl	%edx, %r15d
	jne	.L12
	cmpl	%eax, %r14d
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L16
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	jge	.L6
	xorl	%ecx, %ecx
	subl	$1, %edx
	cmpl	%eax, %r14d
	setl	%cl
	subl	%ecx, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	jge	.L10
	subl	$1, %eax
	jmp	.L10
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L13:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	jge	.L14
	subl	$1, %eax
.L14:
	addl	$1, %r12d
	cmpl	%eax, %r14d
	je	.L5
.L15:
	cmpl	%eax, %r14d
	jle	.L13
	addl	$1, %eax
	jmp	.L14
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	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	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %ebx
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, 12(%rsp)
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r15d, %edx
	movl	%r14d, %eax
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	jle	.L7
	xorl	%ecx, %ecx
	addl	$1, %edx
	cmpl	%eax, %r14d
	setg	%cl
	addl	%ecx, %eax
.L8:
	addl	$1, %r12d
.L12:
	cmpl	%edx, %r15d
	jne	.L4
	cmpl	%eax, %r14d
	je	.L5
.L6:
	cmpl	%eax, %r14d
	jle	.L9
	addl	$1, %eax
.L10:
	addl	$1, %r12d
	cmpl	%edx, %r15d
	jne	.L12
	cmpl	%eax, %r14d
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L16
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	jge	.L6
	xorl	%ecx, %ecx
	subl	$1, %edx
	cmpl	%eax, %r14d
	setl	%cl
	subl	%ecx, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	jge	.L10
	subl	$1, %eax
	jmp	.L10
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L13:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	jge	.L14
	subl	$1, %eax
.L14:
	addl	$1, %r12d
	cmpl	%eax, %r14d
	je	.L5
.L15:
	cmpl	%eax, %r14d
	jle	.L13
	addl	$1, %eax
	jmp	.L14
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 w, h, n;
	int bex, bey, mapx, mapy,x;
	int sum = 0;
	
	scanf("%d %d %d", &w, &h, &n);
	
	for (x = 0; x < n; x++) {
		scanf("%d %d", &mapx, &mapy);
		if (x != 0) {
			while (1) {
				if (mapx == bex && mapy == bey) {
					break;
				}
				if (mapx > bex && mapy > bey) {
					bex++;
					bey++;
				}
				else if (mapx < bex && mapy < bey) {
					bex--;
					bey--;
				}
				else if (mapx > bex) {
					bex++;
				}
				else if (mapx < bex) {
					bex--;
				}
				else if (mapy > bey) {
					bey++;
				}
				else if (mapy < bey) {
					bey--;
				}
				sum++;
			}
		}
		bex = mapx;
		bey = mapy;
	}
	printf("%d\n", sum);
	
	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 w, h, n;
	int bex, bey, mapx, mapy,x;
	int sum = 0;
	
	scanf("%d %d %d", &w, &h, &n);
	
	for (x = 0; x < n; x++) {
		scanf("%d %d", &mapx, &mapy);
		if (x != 0) {
			while (1) {
				if (mapx == bex && mapy == bey) {
					break;
				}
				if (mapx > bex && mapy > bey) {
					bex++;
					bey++;
				}
				else if (mapx < bex && mapy < bey) {
					bex--;
					bey--;
				}
				else if (mapx > bex) {
					bex++;
				}
				else if (mapx < bex) {
					bex--;
				}
				else if (mapy > bey) {
					bey++;
				}
				else if (mapy < bey) {
					bey--;
				}
				sum++;
			}
		}
		bex = mapx;
		bey = mapy;
	}
	printf("%d\n", sum);
	
	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:

4 3 3
1 1
3 3
4 1

5

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 w, h, n;
	int bex, bey, mapx, mapy,x;
	int sum = 0;
	
	scanf("%d %d %d", &w, &h, &n);
	
	for (x = 0; x < n; x++) {
		scanf("%d %d", &mapx, &mapy);
		if (x != 0) {
			while (1) {
				if (mapx == bex && mapy == bey) {
					break;
				}
				if (mapx > bex && mapy > bey) {
					bex++;
					bey++;
				}
				else if (mapx < bex && mapy < bey) {
					bex--;
					bey--;
				}
				else if (mapx > bex) {
					bex++;
				}
				else if (mapx < bex) {
					bex--;
				}
				else if (mapy > bey) {
					bey++;
				}
				else if (mapy < bey) {
					bey--;
				}
				sum++;
			}
		}
		bex = mapx;
		bey = mapy;
	}
	printf("%d\n", sum);
	
	return (0);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	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	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %ebx
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, 12(%rsp)
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r15d, %edx
	movl	%r14d, %eax
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	jle	.L7
	xorl	%ecx, %ecx
	addl	$1, %edx
	cmpl	%eax, %r14d
	setg	%cl
	addl	%ecx, %eax
.L8:
	addl	$1, %r12d
.L12:
	cmpl	%edx, %r15d
	jne	.L4
	cmpl	%eax, %r14d
	je	.L5
.L6:
	cmpl	%eax, %r14d
	jle	.L9
	addl	$1, %eax
.L10:
	addl	$1, %r12d
	cmpl	%edx, %r15d
	jne	.L12
	cmpl	%eax, %r14d
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L16
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	jge	.L6
	xorl	%ecx, %ecx
	subl	$1, %edx
	cmpl	%eax, %r14d
	setl	%cl
	subl	%ecx, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	jge	.L10
	subl	$1, %eax
	jmp	.L10
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L13:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	jge	.L14
	subl	$1, %eax
.L14:
	addl	$1, %r12d
	cmpl	%eax, %r14d
	je	.L5
.L15:
	cmpl	%eax, %r14d
	jle	.L13
	addl	$1, %eax
	jmp	.L14
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	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	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	20(%rsp), %r13
	leaq	16(%rsp), %rbp
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, %rdx
	movq	%rbp, %rsi
	movl	$1, %ebx
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, 12(%rsp)
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jle	.L3
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rdx
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r15d, %edx
	movl	%r14d, %eax
	movl	16(%rsp), %r15d
	movl	20(%rsp), %r14d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	jle	.L7
	xorl	%ecx, %ecx
	addl	$1, %edx
	cmpl	%eax, %r14d
	setg	%cl
	addl	%ecx, %eax
.L8:
	addl	$1, %r12d
.L12:
	cmpl	%edx, %r15d
	jne	.L4
	cmpl	%eax, %r14d
	je	.L5
.L6:
	cmpl	%eax, %r14d
	jle	.L9
	addl	$1, %eax
.L10:
	addl	$1, %r12d
	cmpl	%edx, %r15d
	jne	.L12
	cmpl	%eax, %r14d
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L16
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	jge	.L6
	xorl	%ecx, %ecx
	subl	$1, %edx
	cmpl	%eax, %r14d
	setl	%cl
	subl	%ecx, %eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	jge	.L10
	subl	$1, %eax
	jmp	.L10
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB23:
.L13:
	.cfi_def_cfa_offset 96
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	jge	.L14
	subl	$1, %eax
.L14:
	addl	$1, %r12d
	cmpl	%eax, %r14d
	je	.L5
.L15:
	cmpl	%eax, %r14d
	jle	.L13
	addl	$1, %eax
	jmp	.L14
	.cfi_endproc
.LFE23:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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:
```