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 N;
	int a, b, c;
	int i, temp;
	scanf("%d", &N);
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &a, &b, &c);
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if(b < c) {
			temp = c;
			c = b;
			b = temp;
		}
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if((a*a) == b*b + c*c) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.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
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L8:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %esi
	imull	%edx, %esi
	movl	-20(%rbp), %ecx
	movl	-20(%rbp), %edx
	imull	%ecx, %edx
	addl	%esi, %edx
	cmpl	%edx, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%d %d %d"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.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	.LC0(%rip), %rdi
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC3(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r14, %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	%edx, %ecx
	movl	%edx, 16(%rsp)
	movl	%eax, %edx
	movl	%eax, 12(%rsp)
	movl	%ecx, %eax
.L3:
	movl	20(%rsp), %ecx
	cmpl	%ecx, %eax
	jge	.L5
	movl	%eax, 20(%rsp)
	cmpl	%ecx, %edx
	jge	.L15
	movl	%edx, %esi
	movl	%edx, 16(%rsp)
	movl	%ecx, %edx
	movl	%ecx, 12(%rsp)
	movl	%eax, %ecx
	movl	%esi, %eax
.L5:
	imull	%eax, %eax
	imull	%ecx, %ecx
	imull	%edx, %edx
	addl	%ecx, %eax
	cmpl	%eax, %edx
	je	.L16
	movq	%r15, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L16:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
	jmp	.L8
.L15:
	movl	%ecx, 16(%rsp)
	xchgl	%ecx, %eax
	jmp	.L5
.L17:
	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	"%d %d %d"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.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	.LC0(%rip), %rdi
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	20(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC3(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r13, %rdx
	movq	%r14, %rcx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	movl	16(%rsp), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	%edx, %ecx
	movl	%edx, 16(%rsp)
	movl	%eax, %edx
	movl	%eax, 12(%rsp)
	movl	%ecx, %eax
.L3:
	movl	20(%rsp), %ecx
	cmpl	%ecx, %eax
	jge	.L5
	movl	%eax, 20(%rsp)
	cmpl	%ecx, %edx
	jge	.L15
	movl	%edx, %esi
	movl	%edx, 16(%rsp)
	movl	%ecx, %edx
	movl	%ecx, 12(%rsp)
	movl	%eax, %ecx
	movl	%esi, %eax
.L5:
	imull	%eax, %eax
	imull	%ecx, %ecx
	imull	%edx, %edx
	addl	%ecx, %eax
	cmpl	%eax, %edx
	je	.L16
	movq	%r15, %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
.L8:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L16:
	.cfi_restore_state
	leaq	.LC2(%rip), %rdi
	addl	$1, %ebx
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jg	.L2
	jmp	.L8
.L15:
	movl	%ecx, 16(%rsp)
	xchgl	%ecx, %eax
	jmp	.L5
.L17:
	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 N;
	int a, b, c;
	int i, temp;
	scanf("%d", &N);
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &a, &b, &c);
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if(b < c) {
			temp = c;
			c = b;
			b = temp;
		}
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if((a*a) == b*b + c*c) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}
3
4 3 5
0 3 6
8 8 8
 3
4 5 5
-2 3 6
8 8 8
 3
2 2 -2
-1 1 0
3 2 0
 3
0 2 -2
0 1 1
0 4 15
 3
-1 -2 0
0 1 -1
-2 0 2
 3
-1 -2 -1
0 1 0
-2 0 2
 3
1 1 0
29 1 -1
0 1 -1
 3
4 3 5
-1 3 6
8 8 8
 3
4 3 5
-2 3 6
8 8 8
 3
4 5 5
-2 3 6
16 8 8

YES
NO
NO
 NO
NO
NO
 NO
YES
NO
 YES
YES
NO
 NO
YES
YES
 NO
NO
YES
 YES
NO
YES
 YES
NO
NO
 YES
NO
NO
 NO
NO
NO

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 N;
	int a, b, c;
	int i, temp;
	scanf("%d", &N);
	for(i = 0; i < N; i++) {
		scanf("%d %d %d", &a, &b, &c);
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if(b < c) {
			temp = c;
			c = b;
			b = temp;
		}
		if(a < b) {
			temp = b;
			b = a;
			a = temp;
		}
		if((a*a) == b*b + c*c) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d %d"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.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
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L8:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %esi
	imull	%edx, %esi
	movl	-20(%rbp), %ecx
	movl	-20(%rbp), %edx
	imull	%ecx, %edx
	addl	%esi, %edx
	cmpl	%edx, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%d %d %d"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.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
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L2
.L8:
	leaq	-20(%rbp), %rcx
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L3:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	-20(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -24(%rbp)
.L4:
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-24(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, -28(%rbp)
.L5:
	movl	-28(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	-24(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	%ecx, %esi
	imull	%edx, %esi
	movl	-20(%rbp), %ecx
	movl	-20(%rbp), %edx
	imull	%ecx, %edx
	addl	%esi, %edx
	cmpl	%edx, %eax
	jne	.L6
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L7
.L6:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L7:
	addl	$1, -16(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
