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(void)
{
int a,b,n,m,i,j,k,y;
int c,d[100];
for(i=0;i<100;i++){
d[i]=0;
}
scanf("%d",&n);
scanf("%d %d",&a,&b);
scanf("%d",&c);
for(i=0;i<n;i++){
scanf("%d",&d[i]);
}
for(j=0;j<n;j++){
for(k=0;k<n-1;k++){
if(d[k]<d[k+1]){
m=d[k+1];
d[k+1]=d[k];
d[k]=m;
}
}
}

for(i=0;i<n;i++){
if(c/(a+i*b)<d[i]/b){
c+=d[i];
}
else{
y=c/(a+i*b);
printf("%d\n",y);
break;
}
}
return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %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
	movl	$50, %ecx
	leaq	.LC0(%rip), %r14
	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	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	rep stosq
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	movq	%rbx, %rbp
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r13
	cmpl	%r12d, %edi
	jg	.L3
	testl	%edi, %edi
	jle	.L10
	leaq	4(%rbx), %r9
	cmpl	$1, %edi
	je	.L4
	leal	-2(%rdi), %eax
	leaq	4(%rbx), %r9
	xorl	%r8d, %r8d
	leaq	(%r9,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L6
	movq	%xmm1, (%rdx)
.L6:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jne	.L5
.L4:
	leal	-1(%rdi), %eax
	movl	12(%rsp), %ecx
	movl	4(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	(%rsp), %esi
	leaq	(%r9,%rax,4), %r11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$4, %rbp
	addl	%edi, %ecx
	addl	%r8d, %esi
	movl	$1, %r10d
	cmpq	%rbp, %r11
	je	.L10
.L9:
	movl	%ecx, %eax
	movl	0(%rbp), %edi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	cmpl	%eax, %r9d
	jl	.L24
	testb	%r10b, %r10b
	je	.L11
	movl	%ecx, 12(%rsp)
.L11:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L25:
	.cfi_restore_state
	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"
.LC1:
	.string	"%d %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
	movl	$50, %ecx
	leaq	.LC0(%rip), %r14
	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	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	rep stosq
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	movq	%rbx, %rbp
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r13
	cmpl	%r12d, %edi
	jg	.L3
	testl	%edi, %edi
	jle	.L10
	leaq	4(%rbx), %r9
	cmpl	$1, %edi
	je	.L4
	leal	-2(%rdi), %eax
	leaq	4(%rbx), %r9
	xorl	%r8d, %r8d
	leaq	(%r9,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L6
	movq	%xmm1, (%rdx)
.L6:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jne	.L5
.L4:
	leal	-1(%rdi), %eax
	movl	12(%rsp), %ecx
	movl	4(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	(%rsp), %esi
	leaq	(%r9,%rax,4), %r11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$4, %rbp
	addl	%edi, %ecx
	addl	%r8d, %esi
	movl	$1, %r10d
	cmpq	%rbp, %r11
	je	.L10
.L9:
	movl	%ecx, %eax
	movl	0(%rbp), %edi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	cmpl	%eax, %r9d
	jl	.L24
	testb	%r10b, %r10b
	je	.L11
	movl	%ecx, 12(%rsp)
.L11:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L25:
	.cfi_restore_state
	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"
.LC1:
	.string	"%d %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
	movl	$50, %ecx
	leaq	.LC0(%rip), %r14
	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	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	rep stosq
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	movq	%rbx, %rbp
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r13
	cmpl	%r12d, %edi
	jg	.L3
	testl	%edi, %edi
	jle	.L10
	leaq	4(%rbx), %r9
	cmpl	$1, %edi
	je	.L4
	leal	-2(%rdi), %eax
	leaq	4(%rbx), %r9
	xorl	%r8d, %r8d
	leaq	(%r9,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L6
	movq	%xmm1, (%rdx)
.L6:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jne	.L5
.L4:
	leal	-1(%rdi), %eax
	movl	12(%rsp), %ecx
	movl	4(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	(%rsp), %esi
	leaq	(%r9,%rax,4), %r11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$4, %rbp
	addl	%edi, %ecx
	addl	%r8d, %esi
	movl	$1, %r10d
	cmpq	%rbp, %r11
	je	.L10
.L9:
	movl	%ecx, %eax
	movl	0(%rbp), %edi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	cmpl	%eax, %r9d
	jl	.L24
	testb	%r10b, %r10b
	je	.L11
	movl	%ecx, 12(%rsp)
.L11:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L25:
	.cfi_restore_state
	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(void)
{
int a,b,n,m,i,j,k,y;
int c,d[100];
for(i=0;i<100;i++){
d[i]=0;
}
scanf("%d",&n);
scanf("%d %d",&a,&b);
scanf("%d",&c);
for(i=0;i<n;i++){
scanf("%d",&d[i]);
}
for(j=0;j<n;j++){
for(k=0;k<n-1;k++){
if(d[k]<d[k+1]){
m=d[k+1];
d[k+1]=d[k];
d[k]=m;
}
}
}

for(i=0;i<n;i++){
if(c/(a+i*b)<d[i]/b){
c+=d[i];
}
else{
y=c/(a+i*b);
printf("%d\n",y);
break;
}
}
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(void)
{
int a,b,n,m,i,j,k,y;
int c,d[100];
for(i=0;i<100;i++){
d[i]=0;
}
scanf("%d",&n);
scanf("%d %d",&a,&b);
scanf("%d",&c);
for(i=0;i<n;i++){
scanf("%d",&d[i]);
}
for(j=0;j<n;j++){
for(k=0;k<n-1;k++){
if(d[k]<d[k+1]){
m=d[k+1];
d[k+1]=d[k];
d[k]=m;
}
}
}

for(i=0;i<n;i++){
if(c/(a+i*b)<d[i]/b){
c+=d[i];
}
else{
y=c/(a+i*b);
printf("%d\n",y);
break;
}
}
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
 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(void)
{
int a,b,n,m,i,j,k,y;
int c,d[100];
for(i=0;i<100;i++){
d[i]=0;
}
scanf("%d",&n);
scanf("%d %d",&a,&b);
scanf("%d",&c);
for(i=0;i<n;i++){
scanf("%d",&d[i]);
}
for(j=0;j<n;j++){
for(k=0;k<n-1;k++){
if(d[k]<d[k+1]){
m=d[k+1];
d[k+1]=d[k];
d[k]=m;
}
}
}

for(i=0;i<n;i++){
if(c/(a+i*b)<d[i]/b){
c+=d[i];
}
else{
y=c/(a+i*b);
printf("%d\n",y);
break;
}
}
return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %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
	movl	$50, %ecx
	leaq	.LC0(%rip), %r14
	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	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	rep stosq
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	movq	%rbx, %rbp
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r13
	cmpl	%r12d, %edi
	jg	.L3
	testl	%edi, %edi
	jle	.L10
	leaq	4(%rbx), %r9
	cmpl	$1, %edi
	je	.L4
	leal	-2(%rdi), %eax
	leaq	4(%rbx), %r9
	xorl	%r8d, %r8d
	leaq	(%r9,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L6
	movq	%xmm1, (%rdx)
.L6:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jne	.L5
.L4:
	leal	-1(%rdi), %eax
	movl	12(%rsp), %ecx
	movl	4(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	(%rsp), %esi
	leaq	(%r9,%rax,4), %r11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$4, %rbp
	addl	%edi, %ecx
	addl	%r8d, %esi
	movl	$1, %r10d
	cmpq	%rbp, %r11
	je	.L10
.L9:
	movl	%ecx, %eax
	movl	0(%rbp), %edi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	cmpl	%eax, %r9d
	jl	.L24
	testb	%r10b, %r10b
	je	.L11
	movl	%ecx, 12(%rsp)
.L11:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L25:
	.cfi_restore_state
	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"
.LC1:
	.string	"%d %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
	movl	$50, %ecx
	leaq	.LC0(%rip), %r14
	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	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	rep stosq
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	movq	%rbx, %rbp
	movq	%rbx, %r13
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r13
	cmpl	%r12d, %edi
	jg	.L3
	testl	%edi, %edi
	jle	.L10
	leaq	4(%rbx), %r9
	cmpl	$1, %edi
	je	.L4
	leal	-2(%rdi), %eax
	leaq	4(%rbx), %r9
	xorl	%r8d, %r8d
	leaq	(%r9,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbx, %rdx
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%eax, %ecx
	jge	.L6
	movq	%xmm1, (%rdx)
.L6:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L7
	addl	$1, %r8d
	cmpl	%r8d, %edi
	jne	.L5
.L4:
	leal	-1(%rdi), %eax
	movl	12(%rsp), %ecx
	movl	4(%rsp), %r8d
	xorl	%r10d, %r10d
	movl	(%rsp), %esi
	leaq	(%r9,%rax,4), %r11
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	addq	$4, %rbp
	addl	%edi, %ecx
	addl	%r8d, %esi
	movl	$1, %r10d
	cmpq	%rbp, %r11
	je	.L10
.L9:
	movl	%ecx, %eax
	movl	0(%rbp), %edi
	cltd
	idivl	%esi
	movl	%eax, %r9d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	cmpl	%eax, %r9d
	jl	.L24
	testb	%r10b, %r10b
	je	.L11
	movl	%ecx, 12(%rsp)
.L11:
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L10:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	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
.L25:
	.cfi_restore_state
	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:
```