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>
#include <stdlib.h>

int narabe_all;
int narabe[1001*1001];

/* syo-zyun */
int qsort_comp(const void* x,const void* y) {
	int* a=(int*)x;
	int* b=(int*)y;
	if(*a>*b)return 1;
	if(*a<*b)return -1;
	return 0;
}

int nibun_tansaku(int searchfor) {
	int left,right,mid;
	if(searchfor<0)return 0;
	left=0;right=narabe_all-1;
	while(left<=right) {
		mid=(left+right)/2;
		if(narabe[mid]==searchfor)return mid;
		else if(narabe[mid]<searchfor)left=mid+1;
		else right=mid-1;
	}
	return left-1;
}

int main(void) {
	int N,M;
	int i,j;
	int P[1001];
	int now,max;
	while(1) {
		scanf("%d%d",&N,&M);
		if(N==0 && M==0)break;
		P[0]=0;
		for(i=1;i<=N;i++)scanf("%d",&P[i]);
		narabe_all=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				narabe[narabe_all++]=P[i]+P[j];
			}
		}
		qsort(narabe,narabe_all,sizeof(int),qsort_comp);
		max=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				now=P[i]+P[j];
				now+=narabe[nibun_tansaku(M-now)];
				if(now<=M && now>max)max=now;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	narabe_all
	.bss
	.align 4
	.type	narabe_all, @object
	.size	narabe_all, 4
narabe_all:
	.zero	4
	.globl	narabe
	.align 32
	.type	narabe, @object
	.size	narabe, 4008004
narabe:
	.zero	4008004
	.text
	.globl	qsort_comp
	.type	qsort_comp, @function
qsort_comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	qsort_comp, .-qsort_comp
	.globl	nibun_tansaku
	.type	nibun_tansaku, @function
nibun_tansaku:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
	movl	narabe_all(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L9
	movl	-4(%rbp), %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nibun_tansaku, .-nibun_tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L26:
	leaq	-4036(%rbp), %rdx
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L13:
	movl	$0, -4016(%rbp)
	movl	$1, -4032(%rbp)
	jmp	.L15
.L16:
	leaq	-4016(%rbp), %rdx
	movl	-4032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4032(%rbp)
.L15:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L16
	movl	$0, narabe_all(%rip)
	movl	$0, -4032(%rbp)
	jmp	.L17
.L20:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L18
.L19:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %esi
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	narabe_all(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, narabe_all(%rip)
	addl	%esi, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4028(%rbp)
.L18:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L19
	addl	$1, -4032(%rbp)
.L17:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L20
	movl	narabe_all(%rip), %eax
	cltq
	leaq	qsort_comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	narabe(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4024(%rbp)
	movl	$0, -4032(%rbp)
	jmp	.L21
.L25:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L22
.L24:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	%edx, %eax
	movl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	subl	-4020(%rbp), %eax
	movl	%eax, %edi
	call	nibun_tansaku
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	cmpl	%eax, -4020(%rbp)
	jg	.L23
	movl	-4020(%rbp), %eax
	cmpl	-4024(%rbp), %eax
	jle	.L23
	movl	-4020(%rbp), %eax
	movl	%eax, -4024(%rbp)
.L23:
	addl	$1, -4028(%rbp)
.L22:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L24
	addl	$1, -4032(%rbp)
.L21:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L25
	movl	-4024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L26
.L30:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.p2align 4
	.globl	qsort_comp
	.type	qsort_comp, @function
qsort_comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_comp, .-qsort_comp
	.p2align 4
	.globl	nibun_tansaku
	.type	nibun_tansaku, @function
nibun_tansaku:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	js	.L5
	movl	narabe_all(%rip), %edx
	subl	$1, %edx
	js	.L13
	xorl	%ecx, %ecx
	leaq	narabe(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	je	.L5
.L15:
	jge	.L8
	leal	1(%rax), %ecx
	cmpl	%edx, %ecx
	jle	.L11
.L10:
	leal	-1(%rcx), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rax), %edx
	cmpl	%ecx, %edx
	jl	.L10
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	jne	.L15
.L5:
	ret
.L13:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	nibun_tansaku, .-nibun_tansaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	narabe(%rip), %r15
	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	$4072, %rsp
	.cfi_def_cfa_offset 4128
	movq	%fs:40, %rax
	movq	%rax, 4056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
.L37:
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L17
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L54
	movl	$0, 48(%rsp)
.L38:
	leaq	48(%rsp), %rax
	movl	%ecx, %r8d
	leal	1(%rcx), %r14d
	xorl	%r10d, %r10d
	xorl	%edx, %edx
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L26:
	leal	1(%r8), %r11d
	cmpl	%edx, %ecx
	movl	(%rax), %ebx
	cmovl	%r13d, %r11d
	cmpl	$2, %r8d
	jbe	.L41
	cmpl	%edx, %ecx
	jl	.L41
	movl	%r11d, %edi
	movslq	%r10d, %rsi
	movd	%ebx, %xmm2
	shrl	$2, %edi
	leaq	(%r15,%rsi,4), %r9
	pshufd	$0, %xmm2, %xmm1
	xorl	%esi, %esi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L24:
	movdqu	(%rax,%rsi), %xmm0
	paddd	%xmm1, %xmm0
	movups	%xmm0, (%r9,%rsi)
	addq	$16, %rsi
	cmpq	%rdi, %rsi
	jne	.L24
	movl	%r11d, %r9d
	andl	$-4, %r9d
	leal	(%rdx,%r9), %esi
	leal	(%r10,%r9), %edi
	cmpl	%r11d, %r9d
	je	.L25
.L23:
	movslq	%esi, %rbp
	movslq	%edi, %r9
	leal	1(%rdi), %r11d
	movl	48(%rsp,%rbp,4), %r12d
	addl	%ebx, %r12d
	movl	%r12d, (%r15,%r9,4)
	leal	1(%rsi), %r9d
	cmpl	%r9d, %ecx
	jl	.L25
	movslq	%r9d, %r9
	movslq	%r11d, %r11
	addl	$2, %esi
	addl	$2, %edi
	movl	48(%rsp,%r9,4), %ebp
	addl	%ebx, %ebp
	movl	%ebp, (%r15,%r11,4)
	cmpl	%esi, %ecx
	jl	.L25
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	addl	48(%rsp,%rsi,4), %ebx
	movl	%ebx, (%r15,%rdi,4)
.L25:
	xorl	%esi, %esi
	cmpl	%edx, %ecx
	cmovge	%r8d, %esi
	addl	$1, %edx
	addq	$4, %rax
	subl	$1, %r8d
	leal	1(%r10,%rsi), %r10d
	cmpl	%r14d, %edx
	jne	.L26
	movl	%r10d, narabe_all(%rip)
	movslq	%r10d, %rsi
.L22:
	leaq	qsort_comp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	call	qsort@PLT
	movl	40(%rsp), %r13d
	testl	%r13d, %r13d
	js	.L42
	movl	44(%rsp), %r11d
	movl	(%r15), %r14d
	xorl	%r10d, %r10d
	leaq	48(%rsp), %rbp
	movl	narabe_all(%rip), %eax
	movq	$0, (%rsp)
	movq	(%rsp), %r9
	leal	-1(%rax), %ebx
	movslq	%r13d, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L36:
	movl	0(%rbp,%r9,4), %r12d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	0(%rbp,%r9,4), %esi
	movl	%r11d, %r8d
	movl	%r14d, %edi
	addl	%r12d, %esi
	subl	%esi, %r8d
	js	.L28
	testl	%ebx, %ebx
	js	.L44
	movl	%ebx, %ecx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L33:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rdi
	movl	(%r15,%rdi,4), %edi
	cmpl	%edi, %r8d
	je	.L28
	jle	.L30
	leal	1(%rax), %edx
	cmpl	%ecx, %edx
	jle	.L33
.L32:
	subl	$1, %edx
.L29:
	movslq	%edx, %rdx
	movl	(%r15,%rdx,4), %edi
.L28:
	addl	%edi, %esi
	cmpl	%esi, %r10d
	movl	%esi, %eax
	cmovge	%r10d, %eax
	cmpl	%esi, %r11d
	cmovge	%eax, %r10d
	addq	$1, %r9
	cmpl	%r9d, %r13d
	jge	.L35
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rax
	cmpq	%rsi, 8(%rsp)
	je	.L27
	movq	%rax, (%rsp)
	movq	%rax, %r9
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L30:
	leal	-1(%rax), %ecx
	cmpl	%edx, %ecx
	jge	.L33
	jmp	.L32
.L44:
	movl	$-1, %edx
	jmp	.L29
.L42:
	xorl	%r10d, %r10d
.L27:
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L37
.L17:
	movl	$0, 48(%rsp)
	jle	.L20
	leaq	52(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jge	.L21
.L20:
	movl	$0, narabe_all(%rip)
	testl	%ecx, %ecx
	jns	.L38
	xorl	%esi, %esi
	jmp	.L22
.L41:
	movl	%r10d, %edi
	movl	%edx, %esi
	jmp	.L23
.L54:
	movq	4056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	addq	$4072, %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
.L55:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	narabe
	.bss
	.align 32
	.type	narabe, @object
	.size	narabe, 4008004
narabe:
	.zero	4008004
	.globl	narabe_all
	.align 4
	.type	narabe_all, @object
	.size	narabe_all, 4
narabe_all:
	.zero	4
	.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
	.p2align 4
	.globl	qsort_comp
	.type	qsort_comp, @function
qsort_comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	qsort_comp, .-qsort_comp
	.p2align 4
	.globl	nibun_tansaku
	.type	nibun_tansaku, @function
nibun_tansaku:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	js	.L5
	movl	narabe_all(%rip), %edx
	subl	$1, %edx
	js	.L13
	xorl	%ecx, %ecx
	leaq	narabe(%rip), %r8
	.p2align 4,,10
	.p2align 3
.L11:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	je	.L5
.L15:
	jge	.L8
	leal	1(%rax), %ecx
	cmpl	%edx, %ecx
	jle	.L11
.L10:
	leal	-1(%rcx), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%rax), %edx
	cmpl	%ecx, %edx
	jl	.L10
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rsi
	cmpl	%edi, (%r8,%rsi,4)
	jne	.L15
.L5:
	ret
.L13:
	movl	$-1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	nibun_tansaku, .-nibun_tansaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	narabe(%rip), %r15
	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	$4072, %rsp
	.cfi_def_cfa_offset 4128
	movq	%fs:40, %rax
	movq	%rax, 4056(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movq	%rax, 16(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 24(%rsp)
.L37:
	movq	16(%rsp), %rdx
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %ecx
	testl	%ecx, %ecx
	jne	.L17
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L54
	movl	$0, 48(%rsp)
.L38:
	leaq	48(%rsp), %rax
	movl	%ecx, %r8d
	leal	1(%rcx), %r14d
	xorl	%r10d, %r10d
	xorl	%edx, %edx
	movl	$1, %r13d
	.p2align 4,,10
	.p2align 3
.L26:
	leal	1(%r8), %r11d
	cmpl	%edx, %ecx
	movl	(%rax), %ebx
	cmovl	%r13d, %r11d
	cmpl	$2, %r8d
	jbe	.L41
	cmpl	%edx, %ecx
	jl	.L41
	movl	%r11d, %edi
	movslq	%r10d, %rsi
	movd	%ebx, %xmm2
	shrl	$2, %edi
	leaq	(%r15,%rsi,4), %r9
	pshufd	$0, %xmm2, %xmm1
	xorl	%esi, %esi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L24:
	movdqu	(%rax,%rsi), %xmm0
	paddd	%xmm1, %xmm0
	movups	%xmm0, (%r9,%rsi)
	addq	$16, %rsi
	cmpq	%rdi, %rsi
	jne	.L24
	movl	%r11d, %r9d
	andl	$-4, %r9d
	leal	(%rdx,%r9), %esi
	leal	(%r10,%r9), %edi
	cmpl	%r11d, %r9d
	je	.L25
.L23:
	movslq	%esi, %rbp
	movslq	%edi, %r9
	leal	1(%rdi), %r11d
	movl	48(%rsp,%rbp,4), %r12d
	addl	%ebx, %r12d
	movl	%r12d, (%r15,%r9,4)
	leal	1(%rsi), %r9d
	cmpl	%r9d, %ecx
	jl	.L25
	movslq	%r9d, %r9
	movslq	%r11d, %r11
	addl	$2, %esi
	addl	$2, %edi
	movl	48(%rsp,%r9,4), %ebp
	addl	%ebx, %ebp
	movl	%ebp, (%r15,%r11,4)
	cmpl	%esi, %ecx
	jl	.L25
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	addl	48(%rsp,%rsi,4), %ebx
	movl	%ebx, (%r15,%rdi,4)
.L25:
	xorl	%esi, %esi
	cmpl	%edx, %ecx
	cmovge	%r8d, %esi
	addl	$1, %edx
	addq	$4, %rax
	subl	$1, %r8d
	leal	1(%r10,%rsi), %r10d
	cmpl	%r14d, %edx
	jne	.L26
	movl	%r10d, narabe_all(%rip)
	movslq	%r10d, %rsi
.L22:
	leaq	qsort_comp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	call	qsort@PLT
	movl	40(%rsp), %r13d
	testl	%r13d, %r13d
	js	.L42
	movl	44(%rsp), %r11d
	movl	(%r15), %r14d
	xorl	%r10d, %r10d
	leaq	48(%rsp), %rbp
	movl	narabe_all(%rip), %eax
	movq	$0, (%rsp)
	movq	(%rsp), %r9
	leal	-1(%rax), %ebx
	movslq	%r13d, %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L36:
	movl	0(%rbp,%r9,4), %r12d
	.p2align 4,,10
	.p2align 3
.L35:
	movl	0(%rbp,%r9,4), %esi
	movl	%r11d, %r8d
	movl	%r14d, %edi
	addl	%r12d, %esi
	subl	%esi, %r8d
	js	.L28
	testl	%ebx, %ebx
	js	.L44
	movl	%ebx, %ecx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L33:
	leal	(%rdx,%rcx), %eax
	sarl	%eax
	movslq	%eax, %rdi
	movl	(%r15,%rdi,4), %edi
	cmpl	%edi, %r8d
	je	.L28
	jle	.L30
	leal	1(%rax), %edx
	cmpl	%ecx, %edx
	jle	.L33
.L32:
	subl	$1, %edx
.L29:
	movslq	%edx, %rdx
	movl	(%r15,%rdx,4), %edi
.L28:
	addl	%edi, %esi
	cmpl	%esi, %r10d
	movl	%esi, %eax
	cmovge	%r10d, %eax
	cmpl	%esi, %r11d
	cmovge	%eax, %r10d
	addq	$1, %r9
	cmpl	%r9d, %r13d
	jge	.L35
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rax
	cmpq	%rsi, 8(%rsp)
	je	.L27
	movq	%rax, (%rsp)
	movq	%rax, %r9
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L30:
	leal	-1(%rax), %ecx
	cmpl	%edx, %ecx
	jge	.L33
	jmp	.L32
.L44:
	movl	$-1, %edx
	jmp	.L29
.L42:
	xorl	%r10d, %r10d
.L27:
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L37
.L17:
	movl	$0, 48(%rsp)
	jle	.L20
	leaq	52(%rsp), %r12
	movl	$1, %ebx
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %ecx
	addq	$4, %r12
	cmpl	%ebx, %ecx
	jge	.L21
.L20:
	movl	$0, narabe_all(%rip)
	testl	%ecx, %ecx
	jns	.L38
	xorl	%esi, %esi
	jmp	.L22
.L41:
	movl	%r10d, %edi
	movl	%edx, %esi
	jmp	.L23
.L54:
	movq	4056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	addq	$4072, %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
.L55:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	narabe
	.bss
	.align 32
	.type	narabe, @object
	.size	narabe, 4008004
narabe:
	.zero	4008004
	.globl	narabe_all
	.align 4
	.type	narabe_all, @object
	.size	narabe_all, 4
narabe_all:
	.zero	4
	.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>
#include <stdlib.h>

int narabe_all;
int narabe[1001*1001];

/* syo-zyun */
int qsort_comp(const void* x,const void* y) {
	int* a=(int*)x;
	int* b=(int*)y;
	if(*a>*b)return 1;
	if(*a<*b)return -1;
	return 0;
}

int nibun_tansaku(int searchfor) {
	int left,right,mid;
	if(searchfor<0)return 0;
	left=0;right=narabe_all-1;
	while(left<=right) {
		mid=(left+right)/2;
		if(narabe[mid]==searchfor)return mid;
		else if(narabe[mid]<searchfor)left=mid+1;
		else right=mid-1;
	}
	return left-1;
}

int main(void) {
	int N,M;
	int i,j;
	int P[1001];
	int now,max;
	while(1) {
		scanf("%d%d",&N,&M);
		if(N==0 && M==0)break;
		P[0]=0;
		for(i=1;i<=N;i++)scanf("%d",&P[i]);
		narabe_all=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				narabe[narabe_all++]=P[i]+P[j];
			}
		}
		qsort(narabe,narabe_all,sizeof(int),qsort_comp);
		max=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				now=P[i]+P[j];
				now+=narabe[nibun_tansaku(M-now)];
				if(now<=M && now>max)max=now;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}
4 58
3
14
15
9
3 21
16
11
2
0 0
 4 50
3
14
27
9
3 21
16
11
2
0 0
 4 58
6
14
15
6
3 21
5
11
2
0 0
 4 50
3
14
20
9
3 21
16
11
2
0 0
 4 58
3
14
25
9
3 21
16
11
2
0 0
 4 58
6
14
28
6
3 21
16
11
2
0 0
 4 10
3
14
20
9
3 21
16
11
2
0 0
 4 80
3
14
27
9
3 21
16
11
3
0 0
 4 52
3
14
30
9
3 21
16
11
3
0 0
 4 52
3
14
20
9
3 21
16
11
3
0 0

58
20
 50
20
 58
21
 49
20
 57
20
 56
20
 9
20
 77
20
 51
20
 52
20

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>
#include <stdlib.h>

int narabe_all;
int narabe[1001*1001];

/* syo-zyun */
int qsort_comp(const void* x,const void* y) {
	int* a=(int*)x;
	int* b=(int*)y;
	if(*a>*b)return 1;
	if(*a<*b)return -1;
	return 0;
}

int nibun_tansaku(int searchfor) {
	int left,right,mid;
	if(searchfor<0)return 0;
	left=0;right=narabe_all-1;
	while(left<=right) {
		mid=(left+right)/2;
		if(narabe[mid]==searchfor)return mid;
		else if(narabe[mid]<searchfor)left=mid+1;
		else right=mid-1;
	}
	return left-1;
}

int main(void) {
	int N,M;
	int i,j;
	int P[1001];
	int now,max;
	while(1) {
		scanf("%d%d",&N,&M);
		if(N==0 && M==0)break;
		P[0]=0;
		for(i=1;i<=N;i++)scanf("%d",&P[i]);
		narabe_all=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				narabe[narabe_all++]=P[i]+P[j];
			}
		}
		qsort(narabe,narabe_all,sizeof(int),qsort_comp);
		max=0;
		for(i=0;i<=N;i++) {
			for(j=i;j<=N;j++) {
				now=P[i]+P[j];
				now+=narabe[nibun_tansaku(M-now)];
				if(now<=M && now>max)max=now;
			}
		}
		printf("%d\n",max);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	narabe_all
	.bss
	.align 4
	.type	narabe_all, @object
	.size	narabe_all, 4
narabe_all:
	.zero	4
	.globl	narabe
	.align 32
	.type	narabe, @object
	.size	narabe, 4008004
narabe:
	.zero	4008004
	.text
	.globl	qsort_comp
	.type	qsort_comp, @function
qsort_comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	qsort_comp, .-qsort_comp
	.globl	nibun_tansaku
	.type	nibun_tansaku, @function
nibun_tansaku:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
	movl	narabe_all(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L9
	movl	-4(%rbp), %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nibun_tansaku, .-nibun_tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L26:
	leaq	-4036(%rbp), %rdx
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L13:
	movl	$0, -4016(%rbp)
	movl	$1, -4032(%rbp)
	jmp	.L15
.L16:
	leaq	-4016(%rbp), %rdx
	movl	-4032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4032(%rbp)
.L15:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L16
	movl	$0, narabe_all(%rip)
	movl	$0, -4032(%rbp)
	jmp	.L17
.L20:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L18
.L19:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %esi
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	narabe_all(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, narabe_all(%rip)
	addl	%esi, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4028(%rbp)
.L18:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L19
	addl	$1, -4032(%rbp)
.L17:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L20
	movl	narabe_all(%rip), %eax
	cltq
	leaq	qsort_comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	narabe(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4024(%rbp)
	movl	$0, -4032(%rbp)
	jmp	.L21
.L25:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L22
.L24:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	%edx, %eax
	movl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	subl	-4020(%rbp), %eax
	movl	%eax, %edi
	call	nibun_tansaku
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	cmpl	%eax, -4020(%rbp)
	jg	.L23
	movl	-4020(%rbp), %eax
	cmpl	-4024(%rbp), %eax
	jle	.L23
	movl	-4020(%rbp), %eax
	movl	%eax, -4024(%rbp)
.L23:
	addl	$1, -4028(%rbp)
.L22:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L24
	addl	$1, -4032(%rbp)
.L21:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L25
	movl	-4024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L26
.L30:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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
	.globl	narabe_all
	.bss
	.align 4
	.type	narabe_all, @object
	.size	narabe_all, 4
narabe_all:
	.zero	4
	.globl	narabe
	.align 32
	.type	narabe, @object
	.size	narabe, 4008004
narabe:
	.zero	4008004
	.text
	.globl	qsort_comp
	.type	qsort_comp, @function
qsort_comp:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	qsort_comp, .-qsort_comp
	.globl	nibun_tansaku
	.type	nibun_tansaku, @function
nibun_tansaku:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	movl	$0, %eax
	jmp	.L7
.L6:
	movl	$0, -12(%rbp)
	movl	narabe_all(%rip), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
	jmp	.L8
.L11:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L9
	movl	-4(%rbp), %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -8(%rbp)
.L8:
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L11
	movl	-12(%rbp), %eax
	subl	$1, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	nibun_tansaku, .-nibun_tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4048, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L26:
	leaq	-4036(%rbp), %rdx
	leaq	-4040(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-4040(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	-4036(%rbp), %eax
	testl	%eax, %eax
	je	.L30
.L13:
	movl	$0, -4016(%rbp)
	movl	$1, -4032(%rbp)
	jmp	.L15
.L16:
	leaq	-4016(%rbp), %rdx
	movl	-4032(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4032(%rbp)
.L15:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L16
	movl	$0, narabe_all(%rip)
	movl	$0, -4032(%rbp)
	jmp	.L17
.L20:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L18
.L19:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %esi
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %ecx
	movl	narabe_all(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, narabe_all(%rip)
	addl	%esi, %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -4028(%rbp)
.L18:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L19
	addl	$1, -4032(%rbp)
.L17:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L20
	movl	narabe_all(%rip), %eax
	cltq
	leaq	qsort_comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	narabe(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4024(%rbp)
	movl	$0, -4032(%rbp)
	jmp	.L21
.L25:
	movl	-4032(%rbp), %eax
	movl	%eax, -4028(%rbp)
	jmp	.L22
.L24:
	movl	-4032(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %edx
	movl	-4028(%rbp), %eax
	cltq
	movl	-4016(%rbp,%rax,4), %eax
	addl	%edx, %eax
	movl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	subl	-4020(%rbp), %eax
	movl	%eax, %edi
	call	nibun_tansaku
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	narabe(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4020(%rbp)
	movl	-4036(%rbp), %eax
	cmpl	%eax, -4020(%rbp)
	jg	.L23
	movl	-4020(%rbp), %eax
	cmpl	-4024(%rbp), %eax
	jle	.L23
	movl	-4020(%rbp), %eax
	movl	%eax, -4024(%rbp)
.L23:
	addl	$1, -4028(%rbp)
.L22:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4028(%rbp)
	jle	.L24
	addl	$1, -4032(%rbp)
.L21:
	movl	-4040(%rbp), %eax
	cmpl	%eax, -4032(%rbp)
	jle	.L25
	movl	-4024(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L26
.L30:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
