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 n, a, b, c, d[100], i, j, saikou;
    scanf("%d\n%d %d\n%d", &n, &a, &b, &c);
    for (i=0; i<n; i++)
        scanf("%d", &d[i]);
    for (i=0; i<n; i++)
        for(j=n-1; j>i; j--)
            if (d[j] > d[j-1]){
                int tmp = d[j];
                d[j] = d[j-1];
                d[j-1] = tmp;
            }
    for (i=0; i<=n; i++){
        int cal = c;
        for (j=0; j<i; j++)
            cal += d[j];
        int price = a + i * b;
        int cpd = cal / price;
        if (cpd > saikou)
            saikou = cpd;
    }
    printf("%d\n", saikou);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n%d %d\n%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	addq	$4, %r13
	cmpl	%ebp, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %r8d
	subl	$1, %r8d
	je	.L4
	movslq	%r10d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r9, %rdx
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	-8(%rdx), %xmm0
	subl	$1, %ecx
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %esi
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %esi
	jle	.L8
	movq	%xmm1, -8(%rdx)
.L8:
	subq	$4, %rdx
	cmpl	%edi, %ecx
	jg	.L5
	addl	$1, %edi
	cmpl	%edi, %r8d
	jg	.L6
.L4:
	movl	12(%rsp), %r8d
	movl	4(%rsp), %esi
	xorl	%r12d, %r12d
	leal	1(%r10), %edi
	movl	8(%rsp), %r9d
	movl	$1, %ecx
	leaq	32(%rsp), %r11
	movl	$1, %r10d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	cmovns	%eax, %r12d
	addl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	movl	%r10d, %ebp
	cmovg	%ecx, %ebp
	cmpl	$3, %ecx
	jle	.L17
	movl	%ebp, %edx
	pxor	%xmm0, %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L13:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm1
	movl	%ebp, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r8d, %eax
	andl	$3, %ebp
	je	.L14
.L12:
	movslq	%edx, %rbp
	addl	16(%rsp,%rbp,4), %eax
	leal	1(%rdx), %ebp
	cmpl	%ecx, %ebp
	jge	.L14
	movslq	%ebp, %rbp
	addl	$2, %edx
	addl	16(%rsp,%rbp,4), %eax
	cmpl	%edx, %ecx
	jle	.L14
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L14:
	cltd
	idivl	%esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addl	$1, %ecx
	addl	%r9d, %esi
	cmpl	%edi, %ecx
	jne	.L7
.L11:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%r8d, %eax
	xorl	%edx, %edx
	jmp	.L12
.L2:
	testl	%r10d, %r10d
	jne	.L11
	movl	12(%rsp), %eax
	xorl	%r12d, %r12d
	cltd
	idivl	4(%rsp)
	testl	%eax, %eax
	cmovns	%eax, %r12d
	jmp	.L11
.L30:
	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\n%d %d\n%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	addq	$4, %r13
	cmpl	%ebp, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %r8d
	subl	$1, %r8d
	je	.L4
	movslq	%r10d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r9, %rdx
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	-8(%rdx), %xmm0
	subl	$1, %ecx
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %esi
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %esi
	jle	.L8
	movq	%xmm1, -8(%rdx)
.L8:
	subq	$4, %rdx
	cmpl	%edi, %ecx
	jg	.L5
	addl	$1, %edi
	cmpl	%edi, %r8d
	jg	.L6
.L4:
	movl	12(%rsp), %r8d
	movl	4(%rsp), %esi
	xorl	%r12d, %r12d
	leal	1(%r10), %edi
	movl	8(%rsp), %r9d
	movl	$1, %ecx
	leaq	32(%rsp), %r11
	movl	$1, %r10d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	cmovns	%eax, %r12d
	addl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	movl	%r10d, %ebp
	cmovg	%ecx, %ebp
	cmpl	$3, %ecx
	jle	.L17
	movl	%ebp, %edx
	pxor	%xmm0, %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L13:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm1
	movl	%ebp, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r8d, %eax
	andl	$3, %ebp
	je	.L14
.L12:
	movslq	%edx, %rbp
	addl	16(%rsp,%rbp,4), %eax
	leal	1(%rdx), %ebp
	cmpl	%ecx, %ebp
	jge	.L14
	movslq	%ebp, %rbp
	addl	$2, %edx
	addl	16(%rsp,%rbp,4), %eax
	cmpl	%edx, %ecx
	jle	.L14
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L14:
	cltd
	idivl	%esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addl	$1, %ecx
	addl	%r9d, %esi
	cmpl	%edi, %ecx
	jne	.L7
.L11:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%r8d, %eax
	xorl	%edx, %edx
	jmp	.L12
.L2:
	testl	%r10d, %r10d
	jne	.L11
	movl	12(%rsp), %eax
	xorl	%r12d, %r12d
	cltd
	idivl	4(%rsp)
	testl	%eax, %eax
	cmovns	%eax, %r12d
	jmp	.L11
.L30:
	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\n%d %d\n%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	addq	$4, %r13
	cmpl	%ebp, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %r8d
	subl	$1, %r8d
	je	.L4
	movslq	%r10d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r9, %rdx
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	-8(%rdx), %xmm0
	subl	$1, %ecx
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %esi
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %esi
	jle	.L8
	movq	%xmm1, -8(%rdx)
.L8:
	subq	$4, %rdx
	cmpl	%edi, %ecx
	jg	.L5
	addl	$1, %edi
	cmpl	%edi, %r8d
	jg	.L6
.L4:
	movl	12(%rsp), %r8d
	movl	4(%rsp), %esi
	xorl	%r12d, %r12d
	leal	1(%r10), %edi
	movl	8(%rsp), %r9d
	movl	$1, %ecx
	leaq	32(%rsp), %r11
	movl	$1, %r10d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	cmovns	%eax, %r12d
	addl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	movl	%r10d, %ebp
	cmovg	%ecx, %ebp
	cmpl	$3, %ecx
	jle	.L17
	movl	%ebp, %edx
	pxor	%xmm0, %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L13:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm1
	movl	%ebp, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r8d, %eax
	andl	$3, %ebp
	je	.L14
.L12:
	movslq	%edx, %rbp
	addl	16(%rsp,%rbp,4), %eax
	leal	1(%rdx), %ebp
	cmpl	%ecx, %ebp
	jge	.L14
	movslq	%ebp, %rbp
	addl	$2, %edx
	addl	16(%rsp,%rbp,4), %eax
	cmpl	%edx, %ecx
	jle	.L14
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L14:
	cltd
	idivl	%esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addl	$1, %ecx
	addl	%r9d, %esi
	cmpl	%edi, %ecx
	jne	.L7
.L11:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%r8d, %eax
	xorl	%edx, %edx
	jmp	.L12
.L2:
	testl	%r10d, %r10d
	jne	.L11
	movl	12(%rsp), %eax
	xorl	%r12d, %r12d
	cltd
	idivl	4(%rsp)
	testl	%eax, %eax
	cmovns	%eax, %r12d
	jmp	.L11
.L30:
	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 n, a, b, c, d[100], i, j, saikou;
    scanf("%d\n%d %d\n%d", &n, &a, &b, &c);
    for (i=0; i<n; i++)
        scanf("%d", &d[i]);
    for (i=0; i<n; i++)
        for(j=n-1; j>i; j--)
            if (d[j] > d[j-1]){
                int tmp = d[j];
                d[j] = d[j-1];
                d[j-1] = tmp;
            }
    for (i=0; i<=n; i++){
        int cal = c;
        for (j=0; j<i; j++)
            cal += d[j];
        int price = a + i * b;
        int cpd = cal / price;
        if (cpd > saikou)
            saikou = cpd;
    }
    printf("%d\n", saikou);
    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 n, a, b, c, d[100], i, j, saikou;
    scanf("%d\n%d %d\n%d", &n, &a, &b, &c);
    for (i=0; i<n; i++)
        scanf("%d", &d[i]);
    for (i=0; i<n; i++)
        for(j=n-1; j>i; j--)
            if (d[j] > d[j-1]){
                int tmp = d[j];
                d[j] = d[j-1];
                d[j-1] = tmp;
            }
    for (i=0; i<=n; i++){
        int cal = c;
        for (j=0; j<i; j++)
            cal += d[j];
        int price = a + i * b;
        int cpd = cal / price;
        if (cpd > saikou)
            saikou = cpd;
    }
    printf("%d\n", saikou);
    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:

3
12 2
200
50
300
110
 3
17 2
200
73
300
110
 3
12 2
200
50
599
100
 3
12 2
200
73
575
110
 3
17 2
200
50
300
010
 3
17 2
63
50
300
010
 3
12 2
200
54
506
110
 3
17 2
38
50
300
010
 3
12 2
358
87
575
010
 3
12 2
200
54
383
110

38
 29
 57
 55
 26
 19
 51
 18
 66
 43

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 n, a, b, c, d[100], i, j, saikou;
    scanf("%d\n%d %d\n%d", &n, &a, &b, &c);
    for (i=0; i<n; i++)
        scanf("%d", &d[i]);
    for (i=0; i<n; i++)
        for(j=n-1; j>i; j--)
            if (d[j] > d[j-1]){
                int tmp = d[j];
                d[j] = d[j-1];
                d[j-1] = tmp;
            }
    for (i=0; i<=n; i++){
        int cal = c;
        for (j=0; j<i; j++)
            cal += d[j];
        int price = a + i * b;
        int cpd = cal / price;
        if (cpd > saikou)
            saikou = cpd;
    }
    printf("%d\n", saikou);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n%d %d\n%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	addq	$4, %r13
	cmpl	%ebp, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %r8d
	subl	$1, %r8d
	je	.L4
	movslq	%r10d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r9, %rdx
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	-8(%rdx), %xmm0
	subl	$1, %ecx
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %esi
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %esi
	jle	.L8
	movq	%xmm1, -8(%rdx)
.L8:
	subq	$4, %rdx
	cmpl	%edi, %ecx
	jg	.L5
	addl	$1, %edi
	cmpl	%edi, %r8d
	jg	.L6
.L4:
	movl	12(%rsp), %r8d
	movl	4(%rsp), %esi
	xorl	%r12d, %r12d
	leal	1(%r10), %edi
	movl	8(%rsp), %r9d
	movl	$1, %ecx
	leaq	32(%rsp), %r11
	movl	$1, %r10d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	cmovns	%eax, %r12d
	addl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	movl	%r10d, %ebp
	cmovg	%ecx, %ebp
	cmpl	$3, %ecx
	jle	.L17
	movl	%ebp, %edx
	pxor	%xmm0, %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L13:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm1
	movl	%ebp, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r8d, %eax
	andl	$3, %ebp
	je	.L14
.L12:
	movslq	%edx, %rbp
	addl	16(%rsp,%rbp,4), %eax
	leal	1(%rdx), %ebp
	cmpl	%ecx, %ebp
	jge	.L14
	movslq	%ebp, %rbp
	addl	$2, %edx
	addl	16(%rsp,%rbp,4), %eax
	cmpl	%edx, %ecx
	jle	.L14
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L14:
	cltd
	idivl	%esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addl	$1, %ecx
	addl	%r9d, %esi
	cmpl	%edi, %ecx
	jne	.L7
.L11:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%r8d, %eax
	xorl	%edx, %edx
	jmp	.L12
.L2:
	testl	%r10d, %r10d
	jne	.L11
	movl	12(%rsp), %eax
	xorl	%r12d, %r12d
	cltd
	idivl	4(%rsp)
	testl	%eax, %eax
	cmovns	%eax, %r12d
	jmp	.L11
.L30:
	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\n%d %d\n%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$432, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	testl	%r10d, %r10d
	jle	.L2
	leaq	16(%rsp), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r14
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r10d
	addq	$4, %r13
	cmpl	%ebp, %r10d
	jg	.L3
	testl	%r10d, %r10d
	jle	.L2
	movl	%r10d, %r8d
	subl	$1, %r8d
	je	.L4
	movslq	%r10d, %rax
	xorl	%edi, %edi
	leaq	(%rbx,%rax,4), %r9
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r9, %rdx
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	-8(%rdx), %xmm0
	subl	$1, %ecx
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %eax
	movd	%xmm2, %esi
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %esi
	jle	.L8
	movq	%xmm1, -8(%rdx)
.L8:
	subq	$4, %rdx
	cmpl	%edi, %ecx
	jg	.L5
	addl	$1, %edi
	cmpl	%edi, %r8d
	jg	.L6
.L4:
	movl	12(%rsp), %r8d
	movl	4(%rsp), %esi
	xorl	%r12d, %r12d
	leal	1(%r10), %edi
	movl	8(%rsp), %r9d
	movl	$1, %ecx
	leaq	32(%rsp), %r11
	movl	$1, %r10d
	movl	%r8d, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	cmovns	%eax, %r12d
	addl	%r9d, %esi
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	movl	%r10d, %ebp
	cmovg	%ecx, %ebp
	cmpl	$3, %ecx
	jle	.L17
	movl	%ebp, %edx
	pxor	%xmm0, %xmm0
	movq	%rbx, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	addq	%r11, %rdx
	.p2align 4,,10
	.p2align 3
.L13:
	paddd	(%rax), %xmm0
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L13
	movdqa	%xmm0, %xmm1
	movl	%ebp, %edx
	psrldq	$8, %xmm1
	andl	$-4, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%r8d, %eax
	andl	$3, %ebp
	je	.L14
.L12:
	movslq	%edx, %rbp
	addl	16(%rsp,%rbp,4), %eax
	leal	1(%rdx), %ebp
	cmpl	%ecx, %ebp
	jge	.L14
	movslq	%ebp, %rbp
	addl	$2, %edx
	addl	16(%rsp,%rbp,4), %eax
	cmpl	%edx, %ecx
	jle	.L14
	movslq	%edx, %rdx
	addl	16(%rsp,%rdx,4), %eax
.L14:
	cltd
	idivl	%esi
	cmpl	%eax, %r12d
	cmovl	%eax, %r12d
	addl	$1, %ecx
	addl	%r9d, %esi
	cmpl	%edi, %ecx
	jne	.L7
.L11:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	addq	$432, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	movl	%r8d, %eax
	xorl	%edx, %edx
	jmp	.L12
.L2:
	testl	%r10d, %r10d
	jne	.L11
	movl	12(%rsp), %eax
	xorl	%r12d, %r12d
	cltd
	idivl	4(%rsp)
	testl	%eax, %eax
	cmovns	%eax, %r12d
	jmp	.L11
.L30:
	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:
```