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[4],i,j,hold;
    for(i=0;i<4;i++){
        scanf("%d",&n[i]);
    }
    for(i=3;i>0;i--){
        for(j=0;j<i;j++){
            if(n[j]>n[j+1]){
                hold = n[j];
                n[j] = n[j+1];
                n[j+1] = hold;
            }
        }
    }
    if(n[0]==1 && n[1]==4 && n[2]==7 && n[3]==9 ) printf("YES\n");
    else printf("NO\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -44(%rbp)
.L2:
	cmpl	$3, -44(%rbp)
	jle	.L3
	movl	$3, -44(%rbp)
	jmp	.L4
.L8:
	movl	$0, -40(%rbp)
	jmp	.L5
.L7:
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L6:
	addl	$1, -40(%rbp)
.L5:
	movl	-40(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L7
	subl	$1, -44(%rbp)
.L4:
	cmpl	$0, -44(%rbp)
	jg	.L8
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-28(%rbp), %eax
	cmpl	$4, %eax
	jne	.L9
	movl	-24(%rbp), %eax
	cmpl	$7, %eax
	jne	.L9
	movl	-20(%rbp), %eax
	cmpl	$9, %eax
	jne	.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:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %edx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L3
	movq	%xmm1, (%rsp)
.L3:
	movq	4(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %eax
	movd	%xmm3, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L9
	movq	%xmm1, 4(%rsp)
.L9:
	movq	8(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm7
	movd	%xmm0, %edx
	movd	%xmm7, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jg	.L5
.L8:
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm4
	movd	%xmm0, %eax
	movd	%xmm4, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L7
	movq	%xmm1, (%rsp)
.L7:
	movq	4(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm5
	movd	%xmm0, %eax
	movd	%xmm5, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L13
	movq	%xmm1, 4(%rsp)
.L13:
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm6
	movd	%xmm0, %edx
	movd	%xmm6, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L12
	movq	%xmm1, (%rsp)
.L12:
	cmpl	$1, (%rsp)
	jne	.L14
	cmpl	$4, 4(%rsp)
	je	.L20
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movq	%xmm1, 8(%rsp)
	jmp	.L8
.L20:
	cmpl	$7, 8(%rsp)
	jne	.L14
	cmpl	$9, 12(%rsp)
	jne	.L14
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L15
.L21:
	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	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %edx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L3
	movq	%xmm1, (%rsp)
.L3:
	movq	4(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm3
	movd	%xmm0, %eax
	movd	%xmm3, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L9
	movq	%xmm1, 4(%rsp)
.L9:
	movq	8(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm7
	movd	%xmm0, %edx
	movd	%xmm7, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jg	.L5
.L8:
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm4
	movd	%xmm0, %eax
	movd	%xmm4, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L7
	movq	%xmm1, (%rsp)
.L7:
	movq	4(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm5
	movd	%xmm0, %eax
	movd	%xmm5, %edx
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jge	.L13
	movq	%xmm1, 4(%rsp)
.L13:
	movq	(%rsp), %xmm0
	pshufd	$0xe5, %xmm0, %xmm6
	movd	%xmm0, %edx
	movd	%xmm6, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %edx
	jle	.L12
	movq	%xmm1, (%rsp)
.L12:
	cmpl	$1, (%rsp)
	jne	.L14
	cmpl	$4, 4(%rsp)
	je	.L20
.L14:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L15:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	movq	%xmm1, 8(%rsp)
	jmp	.L8
.L20:
	cmpl	$7, 8(%rsp)
	jne	.L14
	cmpl	$9, 12(%rsp)
	jne	.L14
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L15
.L21:
	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[4],i,j,hold;
    for(i=0;i<4;i++){
        scanf("%d",&n[i]);
    }
    for(i=3;i>0;i--){
        for(j=0;j<i;j++){
            if(n[j]>n[j+1]){
                hold = n[j];
                n[j] = n[j+1];
                n[j+1] = hold;
            }
        }
    }
    if(n[0]==1 && n[1]==4 && n[2]==7 && n[3]==9 ) printf("YES\n");
    else printf("NO\n");
    return 0;
}
1 9 13 4
 1 2 3 1
 4 9 0 13
 0 7 9 4
 1 9 13 3
 1 3 3 1
 3 9 0 13
 1 12 9 4
 1 9 13 0
 1 2 3 2

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 n[4],i,j,hold;
    for(i=0;i<4;i++){
        scanf("%d",&n[i]);
    }
    for(i=3;i>0;i--){
        for(j=0;j<i;j++){
            if(n[j]>n[j+1]){
                hold = n[j];
                n[j] = n[j+1];
                n[j+1] = hold;
            }
        }
    }
    if(n[0]==1 && n[1]==4 && n[2]==7 && n[3]==9 ) printf("YES\n");
    else printf("NO\n");
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -44(%rbp)
.L2:
	cmpl	$3, -44(%rbp)
	jle	.L3
	movl	$3, -44(%rbp)
	jmp	.L4
.L8:
	movl	$0, -40(%rbp)
	jmp	.L5
.L7:
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L6:
	addl	$1, -40(%rbp)
.L5:
	movl	-40(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L7
	subl	$1, -44(%rbp)
.L4:
	cmpl	$0, -44(%rbp)
	jg	.L8
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-28(%rbp), %eax
	cmpl	$4, %eax
	jne	.L9
	movl	-24(%rbp), %eax
	cmpl	$7, %eax
	jne	.L9
	movl	-20(%rbp), %eax
	cmpl	$9, %eax
	jne	.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:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -44(%rbp)
	jmp	.L2
.L3:
	leaq	-32(%rbp), %rdx
	movl	-44(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -44(%rbp)
.L2:
	cmpl	$3, -44(%rbp)
	jle	.L3
	movl	$3, -44(%rbp)
	jmp	.L4
.L8:
	movl	$0, -40(%rbp)
	jmp	.L5
.L7:
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L6
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-40(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L6:
	addl	$1, -40(%rbp)
.L5:
	movl	-40(%rbp), %eax
	cmpl	-44(%rbp), %eax
	jl	.L7
	subl	$1, -44(%rbp)
.L4:
	cmpl	$0, -44(%rbp)
	jg	.L8
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L9
	movl	-28(%rbp), %eax
	cmpl	$4, %eax
	jne	.L9
	movl	-24(%rbp), %eax
	cmpl	$7, %eax
	jne	.L9
	movl	-20(%rbp), %eax
	cmpl	$9, %eax
	jne	.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:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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:
