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(){
  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;
}```

Assembly Code:

```assembly
	.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:
```

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"
.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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"
.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:
```