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 a[3];
    scanf("%d %d %d",&a[0],&a[1],&a[2]);

    for(int i=0;i<2;i++){
        for(int j=2;j>i;j--){
            if(a[j-1]>a[j]){
                int temp=a[j];
                a[j]=a[j-1];
                a[j-1]=temp;
            }
        }
    }
    if(a[0]==5&&a[1]==5&&a[2]==7){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.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	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L2
.L6:
	movl	$2, -28(%rbp)
	jmp	.L3
.L5:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L4:
	subl	$1, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L5
	addl	$1, -32(%rbp)
.L2:
	cmpl	$1, -32(%rbp)
	jle	.L6
	movl	-20(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-12(%rbp), %eax
	cmpl	$7, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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 %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rcx
	call	__isoc99_scanf@PLT
	movq	12(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L2
	movq	%xmm1, 12(%rsp)
.L2:
	movq	8(%rsp), %xmm0
	movl	8(%rsp), %ecx
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %edx
	movd	%xmm3, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L4
	movd	16(%rsp), %xmm0
	movd	%ecx, %xmm4
	movq	%xmm1, 8(%rsp)
	punpckldq	%xmm4, %xmm0
	cmpl	16(%rsp), %edx
	jle	.L4
	movq	%xmm0, 12(%rsp)
.L4:
	cmpl	$5, 8(%rsp)
	jne	.L5
	cmpl	$5, 12(%rsp)
	je	.L13
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	cmpl	$7, 16(%rsp)
	jne	.L5
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	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 %d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %rcx
	call	__isoc99_scanf@PLT
	movq	12(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L2
	movq	%xmm1, 12(%rsp)
.L2:
	movq	8(%rsp), %xmm0
	movl	8(%rsp), %ecx
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %edx
	movd	%xmm3, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L4
	movd	16(%rsp), %xmm0
	movd	%ecx, %xmm4
	movq	%xmm1, 8(%rsp)
	punpckldq	%xmm4, %xmm0
	cmpl	16(%rsp), %edx
	jle	.L4
	movq	%xmm0, 12(%rsp)
.L4:
	cmpl	$5, 8(%rsp)
	jne	.L5
	cmpl	$5, 12(%rsp)
	je	.L13
.L5:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L6:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	cmpl	$7, 16(%rsp)
	jne	.L5
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L14:
	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 a[3];
    scanf("%d %d %d",&a[0],&a[1],&a[2]);

    for(int i=0;i<2;i++){
        for(int j=2;j>i;j--){
            if(a[j-1]>a[j]){
                int temp=a[j];
                a[j]=a[j-1];
                a[j-1]=temp;
            }
        }
    }
    if(a[0]==5&&a[1]==5&&a[2]==7){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
    return 0;
}
5 5 14
 2 7 5
 5 1 14
 2 7 3
 2 4 3
 2 4 1
 2 4 0
 3 4 0
 4 4 0
 4 4 -1

NO
 NO
 NO
 NO
 NO
 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 a[3];
    scanf("%d %d %d",&a[0],&a[1],&a[2]);

    for(int i=0;i<2;i++){
        for(int j=2;j>i;j--){
            if(a[j-1]>a[j]){
                int temp=a[j];
                a[j]=a[j-1];
                a[j-1]=temp;
            }
        }
    }
    if(a[0]==5&&a[1]==5&&a[2]==7){
        printf("YES\n");
    }else{
        printf("NO\n");
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"YES"
.LC2:
	.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	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L2
.L6:
	movl	$2, -28(%rbp)
	jmp	.L3
.L5:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L4:
	subl	$1, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L5
	addl	$1, -32(%rbp)
.L2:
	cmpl	$1, -32(%rbp)
	jle	.L6
	movl	-20(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-12(%rbp), %eax
	cmpl	$7, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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 %d %d"
.LC1:
	.string	"YES"
.LC2:
	.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	-20(%rbp), %rax
	leaq	8(%rax), %rcx
	leaq	-20(%rbp), %rax
	leaq	4(%rax), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -32(%rbp)
	jmp	.L2
.L6:
	movl	$2, -28(%rbp)
	jmp	.L3
.L5:
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-28(%rbp), %eax
	cltq
	movl	-20(%rbp,%rax,4), %eax
	movl	%eax, -24(%rbp)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-20(%rbp,%rax,4), %edx
	movl	-28(%rbp), %eax
	cltq
	movl	%edx, -20(%rbp,%rax,4)
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-24(%rbp), %edx
	movl	%edx, -20(%rbp,%rax,4)
.L4:
	subl	$1, -28(%rbp)
.L3:
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L5
	addl	$1, -32(%rbp)
.L2:
	cmpl	$1, -32(%rbp)
	jle	.L6
	movl	-20(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	$5, %eax
	jne	.L7
	movl	-12(%rbp), %eax
	cmpl	$7, %eax
	jne	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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:
