Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
int main()
{
  int W,H,N;
  int x[100],y[100],a[100];
  int XU,XL=0,YU,YL=0,X,Y;
  
  scanf("%d %d %d",&W,&H,&N);
  XU=W;
  YU=H;
  for(int i=0;i<N;i++)
    scanf("%d %d %d",&x[i],&y[i],&a[i]);
  
  for(int i=0;i<N;i++){
    switch(a[i]){
      case 1:
        if(x[i]<XL) continue;
        XL=x[i];
        break;
      case 2:
        if(x[i]>XU) continue;
        XU=x[i];
        break;
      case 3:  
        if(y[i]<YL) continue;
        YL=y[i];
        break;
      case 4:
        if(y[i]>YU) continue;
        YU=y[i];
        break;
      default:
        continue;
    }
  }
  X=XU-XL;
  Y=YU-YL;
  if(X<0) X=0;
  if(Y<0) Y=0;
  printf("%d",X*Y);
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1264, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1244(%rbp)
	movl	$0, -1236(%rbp)
	leaq	-1252(%rbp), %rcx
	leaq	-1256(%rbp), %rdx
	leaq	-1260(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1260(%rbp), %eax
	movl	%eax, -1248(%rbp)
	movl	-1256(%rbp), %eax
	movl	%eax, -1240(%rbp)
	movl	$0, -1224(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1224(%rbp)
.L2:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L3
	movl	$0, -1220(%rbp)
	jmp	.L4
.L15:
	movl	-1220(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$4, %eax
	je	.L5
	cmpl	$4, %eax
	jg	.L20
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L20
	cmpl	$1, %eax
	je	.L8
	cmpl	$2, %eax
	je	.L9
	jmp	.L20
.L8:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1244(%rbp)
	jg	.L21
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1244(%rbp)
	jmp	.L11
.L9:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1248(%rbp)
	jl	.L22
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1248(%rbp)
	jmp	.L11
.L7:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1236(%rbp)
	jg	.L23
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1236(%rbp)
	jmp	.L11
.L5:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1240(%rbp)
	jl	.L24
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1240(%rbp)
	jmp	.L11
.L20:
	nop
	jmp	.L11
.L21:
	nop
	jmp	.L11
.L22:
	nop
	jmp	.L11
.L23:
	nop
	jmp	.L11
.L24:
	nop
.L11:
	addl	$1, -1220(%rbp)
.L4:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L15
	movl	-1248(%rbp), %eax
	subl	-1244(%rbp), %eax
	movl	%eax, -1232(%rbp)
	movl	-1240(%rbp), %eax
	subl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	cmpl	$0, -1232(%rbp)
	jns	.L16
	movl	$0, -1232(%rbp)
.L16:
	cmpl	$0, -1228(%rbp)
	jns	.L17
	movl	$0, -1228(%rbp)
.L17:
	movl	-1232(%rbp), %eax
	imull	-1228(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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.
user
	.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:
.LFB39:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rcx
	leaq	40(%rsp), %rdx
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	movl	%eax, 24(%rsp)
	movl	40(%rsp), %eax
	movl	%eax, 28(%rsp)
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	leaq	848(%rsp), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	leaq	448(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %r13
	movq	16(%rsp), %rbp
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	(%rsp), %rbx
	addl	$1, %r14d
	leaq	0(%r13,%r15), %rcx
	leaq	0(%rbp,%r15), %rdx
	leaq	(%rbx,%r15), %rsi
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L3
	movq	%r13, %rdi
	movq	%rbp, %r13
	movq	%rbx, %rbp
	movq	%rdi, %rbx
	testl	%eax, %eax
	jle	.L13
	subl	$1, %eax
	movl	24(%rsp), %edi
	movl	28(%rsp), %r8d
	xorl	%ecx, %ecx
	leaq	852(%rsp,%rax,4), %rdx
	xorl	%esi, %esi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %eax
	jne	.L8
	movl	0(%rbp), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$4, %rbx
	addq	$4, %r13
	addq	$4, %rbp
	cmpq	%rbx, %rdx
	je	.L18
.L10:
	movl	(%rbx), %eax
	cmpl	$3, %eax
	je	.L4
	jg	.L5
	cmpl	$1, %eax
	jne	.L19
	movl	0(%rbp), %eax
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	$4, %eax
	jne	.L8
	movl	0(%r13), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	0(%r13), %eax
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%edi, 24(%rsp)
	movl	%edi, %ebp
	movl	%r8d, 28(%rsp)
.L2:
	subl	%esi, %ebp
	movl	$0, %eax
	movl	$0, %edx
	movl	$1, %edi
	cmovs	%eax, %ebp
	movl	28(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	subl	%ecx, %eax
	cmovs	%edx, %eax
	movl	%ebp, %edx
	imull	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1272, %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
.L13:
	.cfi_restore_state
	movl	24(%rsp), %ebp
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
	.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:
.LFB39:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1272, %rsp
	.cfi_def_cfa_offset 1328
	movq	%fs:40, %rax
	movq	%rax, 1256(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rcx
	leaq	40(%rsp), %rdx
	leaq	36(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %eax
	movl	%eax, 24(%rsp)
	movl	40(%rsp), %eax
	movl	%eax, 28(%rsp)
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L13
	leaq	848(%rsp), %rax
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%rax, 8(%rsp)
	leaq	448(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L3:
	movq	8(%rsp), %r13
	movq	16(%rsp), %rbp
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	(%rsp), %rbx
	addl	$1, %r14d
	leaq	0(%r13,%r15), %rcx
	leaq	0(%rbp,%r15), %rdx
	leaq	(%rbx,%r15), %rsi
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	cmpl	%r14d, %eax
	jg	.L3
	movq	%r13, %rdi
	movq	%rbp, %r13
	movq	%rbx, %rbp
	movq	%rdi, %rbx
	testl	%eax, %eax
	jle	.L13
	subl	$1, %eax
	movl	24(%rsp), %edi
	movl	28(%rsp), %r8d
	xorl	%ecx, %ecx
	leaq	852(%rsp,%rax,4), %rdx
	xorl	%esi, %esi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L19:
	cmpl	$2, %eax
	jne	.L8
	movl	0(%rbp), %eax
	cmpl	%eax, %edi
	cmovg	%eax, %edi
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$4, %rbx
	addq	$4, %r13
	addq	$4, %rbp
	cmpq	%rbx, %rdx
	je	.L18
.L10:
	movl	(%rbx), %eax
	cmpl	$3, %eax
	je	.L4
	jg	.L5
	cmpl	$1, %eax
	jne	.L19
	movl	0(%rbp), %eax
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	$4, %eax
	jne	.L8
	movl	0(%r13), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L4:
	movl	0(%r13), %eax
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%edi, 24(%rsp)
	movl	%edi, %ebp
	movl	%r8d, 28(%rsp)
.L2:
	subl	%esi, %ebp
	movl	$0, %eax
	movl	$0, %edx
	movl	$1, %edi
	cmovs	%eax, %ebp
	movl	28(%rsp), %eax
	leaq	.LC1(%rip), %rsi
	subl	%ecx, %eax
	cmovs	%edx, %eax
	movl	%ebp, %edx
	imull	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	1256(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$1272, %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
.L13:
	.cfi_restore_state
	movl	24(%rsp), %ebp
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L2
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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:

#include<stdio.h>
#include<stdlib.h>
int main()
{
  int W,H,N;
  int x[100],y[100],a[100];
  int XU,XL=0,YU,YL=0,X,Y;
  
  scanf("%d %d %d",&W,&H,&N);
  XU=W;
  YU=H;
  for(int i=0;i<N;i++)
    scanf("%d %d %d",&x[i],&y[i],&a[i]);
  
  for(int i=0;i<N;i++){
    switch(a[i]){
      case 1:
        if(x[i]<XL) continue;
        XL=x[i];
        break;
      case 2:
        if(x[i]>XU) continue;
        XU=x[i];
        break;
      case 3:  
        if(y[i]<YL) continue;
        YL=y[i];
        break;
      case 4:
        if(y[i]>YU) continue;
        YU=y[i];
        break;
      default:
        continue;
    }
  }
  X=XU-XL;
  Y=YU-YL;
  if(X<0) X=0;
  if(Y<0) Y=0;
  printf("%d",X*Y);
  
  return 0;
}
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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
int main()
{
  int W,H,N;
  int x[100],y[100],a[100];
  int XU,XL=0,YU,YL=0,X,Y;
  
  scanf("%d %d %d",&W,&H,&N);
  XU=W;
  YU=H;
  for(int i=0;i<N;i++)
    scanf("%d %d %d",&x[i],&y[i],&a[i]);
  
  for(int i=0;i<N;i++){
    switch(a[i]){
      case 1:
        if(x[i]<XL) continue;
        XL=x[i];
        break;
      case 2:
        if(x[i]>XU) continue;
        XU=x[i];
        break;
      case 3:  
        if(y[i]<YL) continue;
        YL=y[i];
        break;
      case 4:
        if(y[i]>YU) continue;
        YU=y[i];
        break;
      default:
        continue;
    }
  }
  X=XU-XL;
  Y=YU-YL;
  if(X<0) X=0;
  if(Y<0) Y=0;
  printf("%d",X*Y);
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1264, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1244(%rbp)
	movl	$0, -1236(%rbp)
	leaq	-1252(%rbp), %rcx
	leaq	-1256(%rbp), %rdx
	leaq	-1260(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1260(%rbp), %eax
	movl	%eax, -1248(%rbp)
	movl	-1256(%rbp), %eax
	movl	%eax, -1240(%rbp)
	movl	$0, -1224(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1224(%rbp)
.L2:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L3
	movl	$0, -1220(%rbp)
	jmp	.L4
.L15:
	movl	-1220(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$4, %eax
	je	.L5
	cmpl	$4, %eax
	jg	.L20
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L20
	cmpl	$1, %eax
	je	.L8
	cmpl	$2, %eax
	je	.L9
	jmp	.L20
.L8:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1244(%rbp)
	jg	.L21
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1244(%rbp)
	jmp	.L11
.L9:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1248(%rbp)
	jl	.L22
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1248(%rbp)
	jmp	.L11
.L7:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1236(%rbp)
	jg	.L23
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1236(%rbp)
	jmp	.L11
.L5:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1240(%rbp)
	jl	.L24
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1240(%rbp)
	jmp	.L11
.L20:
	nop
	jmp	.L11
.L21:
	nop
	jmp	.L11
.L22:
	nop
	jmp	.L11
.L23:
	nop
	jmp	.L11
.L24:
	nop
.L11:
	addl	$1, -1220(%rbp)
.L4:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L15
	movl	-1248(%rbp), %eax
	subl	-1244(%rbp), %eax
	movl	%eax, -1232(%rbp)
	movl	-1240(%rbp), %eax
	subl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	cmpl	$0, -1232(%rbp)
	jns	.L16
	movl	$0, -1232(%rbp)
.L16:
	cmpl	$0, -1228(%rbp)
	jns	.L17
	movl	$0, -1228(%rbp)
.L17:
	movl	-1232(%rbp), %eax
	imull	-1228(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1264, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1244(%rbp)
	movl	$0, -1236(%rbp)
	leaq	-1252(%rbp), %rcx
	leaq	-1256(%rbp), %rdx
	leaq	-1260(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1260(%rbp), %eax
	movl	%eax, -1248(%rbp)
	movl	-1256(%rbp), %eax
	movl	%eax, -1240(%rbp)
	movl	$0, -1224(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	leaq	(%rdx,%rax), %rcx
	leaq	-816(%rbp), %rdx
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-1216(%rbp), %rsi
	movl	-1224(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1224(%rbp)
.L2:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1224(%rbp)
	jl	.L3
	movl	$0, -1220(%rbp)
	jmp	.L4
.L15:
	movl	-1220(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	$4, %eax
	je	.L5
	cmpl	$4, %eax
	jg	.L20
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L20
	cmpl	$1, %eax
	je	.L8
	cmpl	$2, %eax
	je	.L9
	jmp	.L20
.L8:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1244(%rbp)
	jg	.L21
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1244(%rbp)
	jmp	.L11
.L9:
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	cmpl	%eax, -1248(%rbp)
	jl	.L22
	movl	-1220(%rbp), %eax
	cltq
	movl	-1216(%rbp,%rax,4), %eax
	movl	%eax, -1248(%rbp)
	jmp	.L11
.L7:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1236(%rbp)
	jg	.L23
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1236(%rbp)
	jmp	.L11
.L5:
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	cmpl	%eax, -1240(%rbp)
	jl	.L24
	movl	-1220(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	movl	%eax, -1240(%rbp)
	jmp	.L11
.L20:
	nop
	jmp	.L11
.L21:
	nop
	jmp	.L11
.L22:
	nop
	jmp	.L11
.L23:
	nop
	jmp	.L11
.L24:
	nop
.L11:
	addl	$1, -1220(%rbp)
.L4:
	movl	-1252(%rbp), %eax
	cmpl	%eax, -1220(%rbp)
	jl	.L15
	movl	-1248(%rbp), %eax
	subl	-1244(%rbp), %eax
	movl	%eax, -1232(%rbp)
	movl	-1240(%rbp), %eax
	subl	-1236(%rbp), %eax
	movl	%eax, -1228(%rbp)
	cmpl	$0, -1232(%rbp)
	jns	.L16
	movl	$0, -1232(%rbp)
.L16:
	cmpl	$0, -1228(%rbp)
	jns	.L17
	movl	$0, -1228(%rbp)
.L17:
	movl	-1232(%rbp), %eax
	imull	-1228(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
