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<math.h>

void judge(int*, int*, int*, int*);

int main(void) {
    int d, w, h, n, r;
    int i, j;
    
    while(1) {
        scanf("%d %d %d", &d, &w, &h);
        
        if(d==0&&w==0&&h==0) break;
        
        scanf("%d", &n);

        for(i=0; i<n; i++) {
            scanf("%d", &r);
            judge(&d, &w, &h, &r);
        }
    }
    
    return 0;
}

void judge(int *d, int *w, int *h, int *r) {
    if(pow(*d,2)+pow(*w,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*w,2)+pow(*h,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*h,2)+pow(*d,2) < pow(*r*2,2)) printf("OK\n");
    else printf("NA\n");
}```

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:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	je	.L10
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rsi
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	judge
	addl	$1, -12(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	jmp	.L6
.L10:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"OK"
.LC4:
	.string	"NA"
	.text
	.globl	judge
	.type	judge, @function
judge:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	%rcx, -32(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-40(%rbp), %xmm2
	movsd	%xmm2, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm6
	comisd	-40(%rbp), %xmm6
	jbe	.L22
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L22:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm3
	addsd	-40(%rbp), %xmm3
	movsd	%xmm3, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm2
	comisd	-40(%rbp), %xmm2
	jbe	.L23
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L23:
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm4
	addsd	-40(%rbp), %xmm4
	movsd	%xmm4, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm7
	comisd	-40(%rbp), %xmm7
	jbe	.L24
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L24:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	judge, .-judge
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.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"
.LC2:
	.string	"OK"
.LC3:
	.string	"NA"
	.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
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	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	20(%rsp), %rax
	leaq	28(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	orl	24(%rsp), %eax
	orl	28(%rsp), %eax
	je	.L2
	leaq	32(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	leaq	36(%rsp), %r12
	testl	%eax, %eax
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	pxor	%xmm3, %xmm3
	cvtsi2sdl	28(%rsp), %xmm3
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L8
	addsd	%xmm3, %xmm2
	comisd	%xmm2, %xmm1
	ja	.L8
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %ebx
	cmpl	%ebx, 32(%rsp)
	jle	.L4
.L3:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	movl	36(%rsp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	20(%rsp), %xmm0
	addl	%eax, %eax
	cvtsi2sdl	%eax, %xmm1
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	24(%rsp), %xmm0
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	movapd	%xmm2, %xmm3
	addsd	%xmm0, %xmm3
	comisd	%xmm3, %xmm1
	jbe	.L14
.L8:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	judge
	.type	judge, @function
judge:
.LFB24:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	movl	(%rcx), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	(%rdi), %xmm0
	addl	%eax, %eax
	cvtsi2sdl	%eax, %xmm2
	movapd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	(%rsi), %xmm0
	mulsd	%xmm2, %xmm2
	mulsd	%xmm0, %xmm0
	movapd	%xmm0, %xmm3
	addsd	%xmm1, %xmm3
	comisd	%xmm3, %xmm2
	ja	.L21
	pxor	%xmm3, %xmm3
	cvtsi2sdl	(%rdx), %xmm3
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	comisd	%xmm0, %xmm2
	jbe	.L23
.L21:
	leaq	.LC2(%rip), %rdi
	jmp	puts@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	addsd	%xmm3, %xmm1
	comisd	%xmm1, %xmm2
	ja	.L21
	leaq	.LC3(%rip), %rdi
	jmp	puts@PLT
	.cfi_endproc
.LFE24:
	.size	judge, .-judge
	.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"
.LC2:
	.string	"OK"
.LC3:
	.string	"NA"
	.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
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	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	20(%rsp), %rax
	leaq	28(%rsp), %r15
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L4:
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	orl	24(%rsp), %eax
	orl	28(%rsp), %eax
	je	.L2
	leaq	32(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	leaq	36(%rsp), %r12
	testl	%eax, %eax
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	pxor	%xmm3, %xmm3
	cvtsi2sdl	28(%rsp), %xmm3
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	comisd	%xmm0, %xmm1
	ja	.L8
	addsd	%xmm3, %xmm2
	comisd	%xmm2, %xmm1
	ja	.L8
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %ebx
	cmpl	%ebx, 32(%rsp)
	jle	.L4
.L3:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	pxor	%xmm0, %xmm0
	movl	36(%rsp), %eax
	pxor	%xmm1, %xmm1
	cvtsi2sdl	20(%rsp), %xmm0
	addl	%eax, %eax
	cvtsi2sdl	%eax, %xmm1
	movapd	%xmm0, %xmm2
	mulsd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	24(%rsp), %xmm0
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	movapd	%xmm2, %xmm3
	addsd	%xmm0, %xmm3
	comisd	%xmm3, %xmm1
	jbe	.L14
.L8:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
.L17:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	judge
	.type	judge, @function
judge:
.LFB24:
	.cfi_startproc
	endbr64
	pxor	%xmm0, %xmm0
	movl	(%rcx), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	(%rdi), %xmm0
	addl	%eax, %eax
	cvtsi2sdl	%eax, %xmm2
	movapd	%xmm0, %xmm1
	mulsd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	(%rsi), %xmm0
	mulsd	%xmm2, %xmm2
	mulsd	%xmm0, %xmm0
	movapd	%xmm0, %xmm3
	addsd	%xmm1, %xmm3
	comisd	%xmm3, %xmm2
	ja	.L21
	pxor	%xmm3, %xmm3
	cvtsi2sdl	(%rdx), %xmm3
	mulsd	%xmm3, %xmm3
	addsd	%xmm3, %xmm0
	comisd	%xmm0, %xmm2
	jbe	.L23
.L21:
	leaq	.LC2(%rip), %rdi
	jmp	puts@PLT
	.p2align 4,,10
	.p2align 3
.L23:
	addsd	%xmm3, %xmm1
	comisd	%xmm1, %xmm2
	ja	.L21
	leaq	.LC3(%rip), %rdi
	jmp	puts@PLT
	.cfi_endproc
.LFE24:
	.size	judge, .-judge
	.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<math.h>

void judge(int*, int*, int*, int*);

int main(void) {
    int d, w, h, n, r;
    int i, j;
    
    while(1) {
        scanf("%d %d %d", &d, &w, &h);
        
        if(d==0&&w==0&&h==0) break;
        
        scanf("%d", &n);

        for(i=0; i<n; i++) {
            scanf("%d", &r);
            judge(&d, &w, &h, &r);
        }
    }
    
    return 0;
}

void judge(int *d, int *w, int *h, int *r) {
    if(pow(*d,2)+pow(*w,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*w,2)+pow(*h,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*h,2)+pow(*d,2) < pow(*r*2,2)) printf("OK\n");
    else printf("NA\n");
}
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>
#include<math.h>

void judge(int*, int*, int*, int*);

int main(void) {
    int d, w, h, n, r;
    int i, j;
    
    while(1) {
        scanf("%d %d %d", &d, &w, &h);
        
        if(d==0&&w==0&&h==0) break;
        
        scanf("%d", &n);

        for(i=0; i<n; i++) {
            scanf("%d", &r);
            judge(&d, &w, &h, &r);
        }
    }
    
    return 0;
}

void judge(int *d, int *w, int *h, int *r) {
    if(pow(*d,2)+pow(*w,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*w,2)+pow(*h,2) < pow(*r*2,2)) printf("OK\n");
    else if(pow(*h,2)+pow(*d,2) < pow(*r*2,2)) printf("OK\n");
    else printf("NA\n");
}```

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:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	je	.L10
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rsi
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	judge
	addl	$1, -12(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	jmp	.L6
.L10:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"OK"
.LC4:
	.string	"NA"
	.text
	.globl	judge
	.type	judge, @function
judge:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	%rcx, -32(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-40(%rbp), %xmm2
	movsd	%xmm2, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm6
	comisd	-40(%rbp), %xmm6
	jbe	.L22
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L22:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm3
	addsd	-40(%rbp), %xmm3
	movsd	%xmm3, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm2
	comisd	-40(%rbp), %xmm2
	jbe	.L23
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L23:
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm4
	addsd	-40(%rbp), %xmm4
	movsd	%xmm4, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm7
	comisd	-40(%rbp), %xmm7
	jbe	.L24
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L24:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	judge, .-judge
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L6:
	leaq	-24(%rbp), %rcx
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	je	.L10
.L2:
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L4
.L5:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-16(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rsi
	leaq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	judge
	addl	$1, -12(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L5
	jmp	.L6
.L10:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"OK"
.LC4:
	.string	"NA"
	.text
	.globl	judge
	.type	judge, @function
judge:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	%rcx, -32(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm2
	addsd	-40(%rbp), %xmm2
	movsd	%xmm2, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm6
	comisd	-40(%rbp), %xmm6
	jbe	.L22
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L22:
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm3
	addsd	-40(%rbp), %xmm3
	movsd	%xmm3, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm7, %xmm7
	cvtsi2sdl	%eax, %xmm7
	movq	%xmm7, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm2
	comisd	-40(%rbp), %xmm2
	jbe	.L23
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L23:
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -40(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movapd	%xmm0, %xmm4
	addsd	-40(%rbp), %xmm4
	movsd	%xmm4, -40(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	pxor	%xmm6, %xmm6
	cvtsi2sdl	%eax, %xmm6
	movq	%xmm6, %rax
	movsd	.LC2(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movq	%xmm0, %rax
	movq	%rax, %xmm7
	comisd	-40(%rbp), %xmm7
	jbe	.L24
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L25
.L24:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	judge, .-judge
	.section	.rodata
	.align 8
.LC2:
	.long	0
	.long	1073741824
	.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:
