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>

int main(){
  int d, w, h, n, r, i, j, temp, list[3];
  while(scanf("%d%d%d", &d, &w, &h), d+w+h){
    list[0] = d;
    list[1] = w;
    list[2] = h;
    for(i=0; i<3; i++){
      for(j=i+1; j<3; j++){
        if(list[i] > list[j]){
          temp = list[i];
          list[i] = list[j];
          list[j] = temp;
        }
      }
    }
    scanf("%d", &n);
    for(i=0; i<n; i++){
      scanf("%d", &r);
      if(list[0]*list[0] + list[1]*list[1] < 4*r*r){
        printf("OK\n");
      }else{
        printf("NA\n");
      }
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"OK"
.LC2:
	.string	"NA"
.LC3:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	-52(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L3
.L7:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L6:
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L5:
	addl	$1, -28(%rbp)
.L4:
	cmpl	$2, -28(%rbp)
	jle	.L6
	addl	$1, -32(%rbp)
.L3:
	cmpl	$2, -32(%rbp)
	jle	.L7
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L8
.L11:
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-36(%rbp), %edx
	movl	-36(%rbp), %eax
	imull	%edx, %eax
	sall	$2, %eax
	cmpl	%eax, %ecx
	jge	.L9
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	addl	$1, -32(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L11
.L2:
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%eax, %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
.LC1:
	.string	"OK"
.LC2:
	.string	"NA"
.LC3:
	.string	"%d%d%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
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	movq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	40(%rsp), %edx
	movl	44(%rsp), %esi
	leal	(%rcx,%rdx), %eax
	movd	%ecx, %xmm0
	movd	%edx, %xmm1
	addl	%esi, %eax
	punpckldq	%xmm1, %xmm0
	je	.L22
	movl	%esi, 64(%rsp)
	movl	$1, %edi
	xorl	%esi, %esi
	movl	$1, %eax
	movq	%xmm0, 56(%rsp)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$2, %eax
.L5:
	movslq	%esi, %rdx
	movl	56(%rsp,%rdx,4), %ecx
	movslq	%eax, %rdx
	movl	56(%rsp,%rdx,4), %edx
.L3:
	cmpl	%edx, %ecx
	jle	.L4
	movslq	%esi, %r8
	movl	%edx, 56(%rsp,%r8,4)
	movslq	%eax, %rdx
	movl	%ecx, 56(%rsp,%rdx,4)
.L4:
	cmpl	$2, %eax
	jne	.L15
	leal	1(%rdi), %eax
	cmpl	$2, %edi
	je	.L23
	movl	%edi, %esi
	movl	%eax, %edi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	leaq	48(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movl	56(%rsp), %ebp
	movl	60(%rsp), %eax
	xorl	%ebx, %ebx
	leaq	52(%rsp), %r13
	imull	%ebp, %ebp
	imull	%eax, %eax
	addl	%eax, %ebp
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	imull	%eax, %eax
	sall	$2, %eax
	cmpl	%ebp, %eax
	jle	.L7
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	48(%rsp), %ebx
	jl	.L10
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 48(%rsp)
	jg	.L10
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$88, %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
.L24:
	.cfi_restore_state
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"OK"
.LC2:
	.string	"NA"
.LC3:
	.string	"%d%d%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
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rcx
	movq	16(%rsp), %rdx
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	movq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	40(%rsp), %edx
	movl	44(%rsp), %esi
	leal	(%rcx,%rdx), %eax
	movd	%ecx, %xmm0
	movd	%edx, %xmm1
	addl	%esi, %eax
	punpckldq	%xmm1, %xmm0
	je	.L22
	movl	%esi, 64(%rsp)
	movl	$1, %edi
	xorl	%esi, %esi
	movl	$1, %eax
	movq	%xmm0, 56(%rsp)
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$2, %eax
.L5:
	movslq	%esi, %rdx
	movl	56(%rsp,%rdx,4), %ecx
	movslq	%eax, %rdx
	movl	56(%rsp,%rdx,4), %edx
.L3:
	cmpl	%edx, %ecx
	jle	.L4
	movslq	%esi, %r8
	movl	%edx, 56(%rsp,%r8,4)
	movslq	%eax, %rdx
	movl	%ecx, 56(%rsp,%rdx,4)
.L4:
	cmpl	$2, %eax
	jne	.L15
	leal	1(%rdi), %eax
	cmpl	$2, %edi
	je	.L23
	movl	%edi, %esi
	movl	%eax, %edi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	leaq	48(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	48(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	movl	56(%rsp), %ebp
	movl	60(%rsp), %eax
	xorl	%ebx, %ebx
	leaq	52(%rsp), %r13
	imull	%ebp, %ebp
	imull	%eax, %eax
	addl	%eax, %ebp
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	imull	%eax, %eax
	sall	$2, %eax
	cmpl	%ebp, %eax
	jle	.L7
	movq	%r14, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	48(%rsp), %ebx
	jl	.L10
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 48(%rsp)
	jg	.L10
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L22:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$88, %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
.L24:
	.cfi_restore_state
	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:

#include<stdio.h>

int main(){
  int d, w, h, n, r, i, j, temp, list[3];
  while(scanf("%d%d%d", &d, &w, &h), d+w+h){
    list[0] = d;
    list[1] = w;
    list[2] = h;
    for(i=0; i<3; i++){
      for(j=i+1; j<3; j++){
        if(list[i] > list[j]){
          temp = list[i];
          list[i] = list[j];
          list[j] = temp;
        }
      }
    }
    scanf("%d", &n);
    for(i=0; i<n; i++){
      scanf("%d", &r);
      if(list[0]*list[0] + list[1]*list[1] < 4*r*r){
        printf("OK\n");
      }else{
        printf("NA\n");
      }
    }
  }
  return 0;
}
10 6 8
5
4
1
6
2
5
0 0 0
 10 6 8
5
4
0
0
2
5
0 0 0
 10 6 8
5
4
0
0
2
7
0 0 0
 10 6 8
5
1
8
6
2
5
0 0 0
 10 6 4
5
4
0
-1
2
7
0 0 0
 10 6 4
5
4
0
-1
4
7
0 0 0
 10 3 8
5
4
0
6
2
5
0 0 0
 10 6 8
5
1
8
3
2
5
0 0 0
 10 2 8
5
1
8
11
2
5
0 0 0
 10 6 7
5
4
1
-2
8
7
0 0 0

NA
NA
OK
NA
NA
 NA
NA
NA
NA
NA
 NA
NA
NA
NA
OK
 NA
OK
OK
NA
NA
 OK
NA
NA
NA
OK
 OK
NA
NA
OK
OK
 NA
NA
OK
NA
OK
 NA
OK
NA
NA
NA
 NA
OK
OK
NA
OK
 NA
NA
NA
OK
OK

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>

int main(){
  int d, w, h, n, r, i, j, temp, list[3];
  while(scanf("%d%d%d", &d, &w, &h), d+w+h){
    list[0] = d;
    list[1] = w;
    list[2] = h;
    for(i=0; i<3; i++){
      for(j=i+1; j<3; j++){
        if(list[i] > list[j]){
          temp = list[i];
          list[i] = list[j];
          list[j] = temp;
        }
      }
    }
    scanf("%d", &n);
    for(i=0; i<n; i++){
      scanf("%d", &r);
      if(list[0]*list[0] + list[1]*list[1] < 4*r*r){
        printf("OK\n");
      }else{
        printf("NA\n");
      }
    }
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"OK"
.LC2:
	.string	"NA"
.LC3:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	-52(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L3
.L7:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L6:
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L5:
	addl	$1, -28(%rbp)
.L4:
	cmpl	$2, -28(%rbp)
	jle	.L6
	addl	$1, -32(%rbp)
.L3:
	cmpl	$2, -32(%rbp)
	jle	.L7
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L8
.L11:
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-36(%rbp), %edx
	movl	-36(%rbp), %eax
	imull	%edx, %eax
	sall	$2, %eax
	cmpl	%eax, %ecx
	jge	.L9
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	addl	$1, -32(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L11
.L2:
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%eax, %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
.LC1:
	.string	"OK"
.LC2:
	.string	"NA"
.LC3:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L12:
	movl	-52(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L3
.L7:
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -28(%rbp)
	jmp	.L4
.L6:
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-32(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-32(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L5:
	addl	$1, -28(%rbp)
.L4:
	cmpl	$2, -28(%rbp)
	jle	.L6
	addl	$1, -32(%rbp)
.L3:
	cmpl	$2, -32(%rbp)
	jle	.L7
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L8
.L11:
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-16(%rbp), %edx
	movl	-16(%rbp), %eax
	imull	%edx, %eax
	addl	%eax, %ecx
	movl	-36(%rbp), %edx
	movl	-36(%rbp), %eax
	imull	%edx, %eax
	sall	$2, %eax
	cmpl	%eax, %ecx
	jge	.L9
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L10
.L9:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L10:
	addl	$1, -32(%rbp)
.L8:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L11
.L2:
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %edx
	movl	-48(%rbp), %eax
	addl	%eax, %edx
	movl	-44(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L12
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
