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;
	
	scanf("%d %d %d", &W, &H, &N);
	
	int x, y, a, i;
	int x_1 = 0, x_2 = W, y_1 = 0, y_2 = H;
	
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &x, &y, &a);
		if(a == 1 && x_1 < x) {
			x_1 = x;
		}
		else if(a == 2 && x_2 > x) {
			x_2 = x;
		}
		else if(a == 3 && y_1 < y) {
			y_1 = y;
		}
		else if(a == 4 && y_2 > y) {
			y_2 = y;
		}
	}
	
	int w = x_2 - x_1, h = y_2 - y_1;
	printf("%d", w > 0 && h > 0 ? w * h : 0);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	movl	$0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	$0, 8(%rsp)
	movl	%eax, 4(%rsp)
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	leaq	28(%rsp), %r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$2, %eax
	je	.L21
	cmpl	$3, %eax
	jne	.L6
	movl	8(%rsp), %ecx
	movl	32(%rsp), %eax
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 8(%rsp)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L2
.L7:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	cmpl	$1, %eax
	jne	.L3
	movl	28(%rsp), %eax
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jg	.L7
.L2:
	movl	4(%rsp), %ebx
	movl	12(%rsp), %eax
	subl	8(%rsp), %eax
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L11
	testl	%eax, %eax
	jle	.L11
	imull	%eax, %ebx
	movl	%ebx, %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
.L21:
	.cfi_restore_state
	movl	4(%rsp), %edi
	movl	28(%rsp), %eax
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	movl	%eax, 4(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$4, %eax
	jne	.L4
	movl	12(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 12(%rsp)
	jmp	.L4
.L11:
	xorl	%edx, %edx
	jmp	.L8
.L22:
	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 %d %d"
.LC1:
	.string	"%d"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	movl	$0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	$0, 8(%rsp)
	movl	%eax, 4(%rsp)
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	leaq	28(%rsp), %r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$2, %eax
	je	.L21
	cmpl	$3, %eax
	jne	.L6
	movl	8(%rsp), %ecx
	movl	32(%rsp), %eax
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 8(%rsp)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L2
.L7:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	cmpl	$1, %eax
	jne	.L3
	movl	28(%rsp), %eax
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jg	.L7
.L2:
	movl	4(%rsp), %ebx
	movl	12(%rsp), %eax
	subl	8(%rsp), %eax
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L11
	testl	%eax, %eax
	jle	.L11
	imull	%eax, %ebx
	movl	%ebx, %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
.L21:
	.cfi_restore_state
	movl	4(%rsp), %edi
	movl	28(%rsp), %eax
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	movl	%eax, 4(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$4, %eax
	jne	.L4
	movl	12(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 12(%rsp)
	jmp	.L4
.L11:
	xorl	%edx, %edx
	jmp	.L8
.L22:
	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 %d %d"
.LC1:
	.string	"%d"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	movl	$0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	$0, 8(%rsp)
	movl	%eax, 4(%rsp)
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	leaq	28(%rsp), %r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$2, %eax
	je	.L21
	cmpl	$3, %eax
	jne	.L6
	movl	8(%rsp), %ecx
	movl	32(%rsp), %eax
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 8(%rsp)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L2
.L7:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	cmpl	$1, %eax
	jne	.L3
	movl	28(%rsp), %eax
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jg	.L7
.L2:
	movl	4(%rsp), %ebx
	movl	12(%rsp), %eax
	subl	8(%rsp), %eax
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L11
	testl	%eax, %eax
	jle	.L11
	imull	%eax, %ebx
	movl	%ebx, %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
.L21:
	.cfi_restore_state
	movl	4(%rsp), %edi
	movl	28(%rsp), %eax
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	movl	%eax, 4(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$4, %eax
	jne	.L4
	movl	12(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 12(%rsp)
	jmp	.L4
.L11:
	xorl	%edx, %edx
	jmp	.L8
.L22:
	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(void)
{
	int W, H, N;
	
	scanf("%d %d %d", &W, &H, &N);
	
	int x, y, a, i;
	int x_1 = 0, x_2 = W, y_1 = 0, y_2 = H;
	
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &x, &y, &a);
		if(a == 1 && x_1 < x) {
			x_1 = x;
		}
		else if(a == 2 && x_2 > x) {
			x_2 = x;
		}
		else if(a == 3 && y_1 < y) {
			y_1 = y;
		}
		else if(a == 4 && y_2 > y) {
			y_2 = y;
		}
	}
	
	int w = x_2 - x_1, h = y_2 - y_1;
	printf("%d", w > 0 && h > 0 ? w * h : 0);
	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;
	
	scanf("%d %d %d", &W, &H, &N);
	
	int x, y, a, i;
	int x_1 = 0, x_2 = W, y_1 = 0, y_2 = H;
	
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &x, &y, &a);
		if(a == 1 && x_1 < x) {
			x_1 = x;
		}
		else if(a == 2 && x_2 > x) {
			x_2 = x;
		}
		else if(a == 3 && y_1 < y) {
			y_1 = y;
		}
		else if(a == 4 && y_2 > y) {
			y_2 = y;
		}
	}
	
	int w = x_2 - x_1, h = y_2 - y_1;
	printf("%d", w > 0 && h > 0 ? w * h : 0);
	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 4 3
2 1 1
3 6 4
1 4 2
 5 4 2
2 1 1
6 3 4
 5 4 2
2 1 2
6 3 4
 10 10 5
1 6 1
4 1 1
6 9 4
9 4 2
3 1 4
 5 4 1
2 1 2
6 3 4
 5 4 3
2 0 2
2 6 2
1 4 2
 10 10 5
1 14 1
4 1 1
6 4 4
9 0 2
3 2 4
 10 10 5
1 6 1
4 1 3
6 9 4
9 4 2
3 0 3
 5 1 3
2 0 2
2 11 2
2 4 2
 5 6 3
2 0 2
3 11 2
2 4 2

0 9 6 5 8 4 10 64 2 12
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;
	
	scanf("%d %d %d", &W, &H, &N);
	
	int x, y, a, i;
	int x_1 = 0, x_2 = W, y_1 = 0, y_2 = H;
	
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &x, &y, &a);
		if(a == 1 && x_1 < x) {
			x_1 = x;
		}
		else if(a == 2 && x_2 > x) {
			x_2 = x;
		}
		else if(a == 3 && y_1 < y) {
			y_1 = y;
		}
		else if(a == 4 && y_2 > y) {
			y_2 = y;
		}
	}
	
	int w = x_2 - x_1, h = y_2 - y_1;
	printf("%d", w > 0 && h > 0 ? w * h : 0);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	movl	$0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	$0, 8(%rsp)
	movl	%eax, 4(%rsp)
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	leaq	28(%rsp), %r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$2, %eax
	je	.L21
	cmpl	$3, %eax
	jne	.L6
	movl	8(%rsp), %ecx
	movl	32(%rsp), %eax
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 8(%rsp)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L2
.L7:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	cmpl	$1, %eax
	jne	.L3
	movl	28(%rsp), %eax
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jg	.L7
.L2:
	movl	4(%rsp), %ebx
	movl	12(%rsp), %eax
	subl	8(%rsp), %eax
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L11
	testl	%eax, %eax
	jle	.L11
	imull	%eax, %ebx
	movl	%ebx, %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
.L21:
	.cfi_restore_state
	movl	4(%rsp), %edi
	movl	28(%rsp), %eax
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	movl	%eax, 4(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$4, %eax
	jne	.L4
	movl	12(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 12(%rsp)
	jmp	.L4
.L11:
	xorl	%edx, %edx
	jmp	.L8
.L22:
	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 %d %d"
.LC1:
	.string	"%d"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	movl	$0, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rcx
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %eax
	movl	$0, 8(%rsp)
	movl	%eax, 4(%rsp)
	movl	20(%rsp), %eax
	movl	%eax, 12(%rsp)
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebx, %ebx
	leaq	36(%rsp), %r15
	leaq	32(%rsp), %r14
	leaq	28(%rsp), %r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$2, %eax
	je	.L21
	cmpl	$3, %eax
	jne	.L6
	movl	8(%rsp), %ecx
	movl	32(%rsp), %eax
	cmpl	%eax, %ecx
	cmovge	%ecx, %eax
	movl	%eax, 8(%rsp)
.L4:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L2
.L7:
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	cmpl	$1, %eax
	jne	.L3
	movl	28(%rsp), %eax
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jg	.L7
.L2:
	movl	4(%rsp), %ebx
	movl	12(%rsp), %eax
	subl	8(%rsp), %eax
	subl	%ebp, %ebx
	testl	%ebx, %ebx
	jle	.L11
	testl	%eax, %eax
	jle	.L11
	imull	%eax, %ebx
	movl	%ebx, %edx
.L8:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
.L21:
	.cfi_restore_state
	movl	4(%rsp), %edi
	movl	28(%rsp), %eax
	cmpl	%eax, %edi
	cmovle	%edi, %eax
	movl	%eax, 4(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmpl	$4, %eax
	jne	.L4
	movl	12(%rsp), %edx
	movl	32(%rsp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, 12(%rsp)
	jmp	.L4
.L11:
	xorl	%edx, %edx
	jmp	.L8
.L22:
	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:
```