Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// Aizu 0551: Icicles
// 2017.9.22 bal4u@uu

#include <stdio.h>

/* ????????????????????????????????\????????????????????? */
#define QSIZE 100010
#define PARENT(i) ((i)>>1)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

typedef struct { int key, a; } QUE;	// ???????????????????§??????????????´????????????????t?????????????±?
QUE que[QSIZE + 5];
int qsize;

void max_heapify(int i)
{
	int l, r, max;
	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].key > que[i].key) max = l; else max = i;
	if (r < qsize && que[r].key > que[max].key) max = r;
	if (max != i) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		max_heapify(max);
	}
}

int deq(int *a)
{
	if (qsize == 0) return 0;
	*a = que[0].a;
	que[0] = que[--qsize];
	max_heapify(0);
	return 1;
}

void enq(int t, int a)
{
	int i, max;
	i = qsize++;
	que[i].key = t, que[i].a = a;
	while (i > 0 && que[max = PARENT(i)].key < que[i].key) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		i = max;
	}
}
/* ????????????????????????????????\????????????????????? */


#define MAX 100010
typedef struct { int a, b; } T;
T len[MAX]; int n;

int check(int k)
{
	if (k < 0 || k >= n) return 0;
	if (k == 0   && len[0].a > len[1].a) return 1;
	if (k == n-1 && len[n-1].a > len[n-2].a) return 1;
	if (len[k].a > len[k-1].a && len[k].a > len[k+1].a) return 1;
	return 0;
}

int main(void)
{
	int l, i, t, ans;

	scanf("%d%d", &n, &l);
	qsize = 0; for (i = 0; i < n; i++) scanf("%d", &t), len[i].a = len[i].b = t;
	for (i = 0; i < n; i++) if (check(i)) enq(len[i].b, i);
	ans = 0;
	while (deq(&i)) {
		if (l - len[i].b > ans) ans = l - len[i].b;
		len[i].a = 0;
		if (check(i-1)) len[i-1].b -= ans, enq(len[i-1].b, i-1);
		if (check(i+1)) len[i+1].b -= ans, enq(len[i+1].b, i+1);
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	que
	.bss
	.align 32
	.type	que, @object
	.size	que, 800120
que:
	.zero	800120
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.text
	.globl	max_heapify
	.type	max_heapify, @function
max_heapify:
.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
	movl	%edi, -36(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L2
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L6
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	max_heapify
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max_heapify, .-max_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	4+que(%rip), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, que(%rip)
	movl	$0, %edi
	call	max_heapify
	movl	$1, %eax
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+que(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	enq, .-enq
	.globl	len
	.bss
	.align 32
	.type	len, @object
	.size	len, 800080
len:
	.zero	800080
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L16
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	cmpl	$0, -4(%rbp)
	jne	.L19
	movl	len(%rip), %edx
	movl	8+len(%rip), %eax
	cmpl	%eax, %edx
	jle	.L19
	movl	$1, %eax
	jmp	.L18
.L19:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L20
	movl	n(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$1, %eax
	jmp	.L18
.L21:
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	-24(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, qsize(%rip)
	movl	$0, -20(%rbp)
	jmp	.L23
.L24:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	4+len(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-20(%rbp), %edx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L23:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L24
	movl	$0, -20(%rbp)
	jmp	.L25
.L27:
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L26
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L26:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L25:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L27
	movl	$0, -12(%rbp)
	jmp	.L28
.L31:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L29
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
.L29:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L30
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	subl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L30:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L28
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	testl	%eax, %eax
	jne	.L31
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	max_heapify
	.type	max_heapify, @function
max_heapify:
.LFB23:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %r8d
	leaq	que(%rip), %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edi, %rcx
	movslq	%esi, %r9
	movl	(%rax,%rcx,8), %r11d
	cmpl	%r11d, (%rax,%r9,8)
	jle	.L2
	cmpl	%edx, %r8d
	jg	.L9
	movl	%esi, %edx
.L3:
	cmpl	%edi, %edx
	je	.L1
	movslq	%edx, %rsi
	movq	(%rax,%rcx,8), %rdi
	movq	(%rax,%rsi,8), %r9
	movq	%r9, (%rax,%rcx,8)
	movq	%rdi, (%rax,%rsi,8)
	movl	%edx, %edi
.L5:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %edx
	cmpl	%esi, %r8d
	jg	.L10
.L2:
	cmpl	%edx, %r8d
	jle	.L1
	movslq	%edx, %rsi
	movslq	%edi, %rcx
	movl	(%rax,%rsi,8), %esi
	cmpl	%esi, (%rax,%rcx,8)
	jl	.L3
.L1:
	ret
.L9:
	movslq	%edx, %r10
	movl	(%rax,%r9,8), %r11d
	cmpl	%r11d, (%rax,%r10,8)
	cmovle	%esi, %edx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	max_heapify, .-max_heapify
	.p2align 4
	.globl	deq
	.type	deq, @function
deq:
.LFB24:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	movl	4+que(%rip), %eax
	leaq	que(%rip), %rdx
	movl	%eax, (%rdi)
	movl	qsize(%rip), %eax
	xorl	%edi, %edi
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	cltq
	movq	(%rdx,%rax,8), %rax
	movq	%rax, que(%rip)
	call	max_heapify
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	deq, .-deq
	.p2align 4
	.globl	enq
	.type	enq, @function
enq:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	qsize(%rip), %rcx
	movd	%esi, %xmm1
	movd	%edi, %xmm0
	punpckldq	%xmm1, %xmm0
	leal	1(%rcx), %edx
	movq	%rcx, %rax
	movl	%edx, qsize(%rip)
	leaq	que(%rip), %rdx
	movq	%xmm0, (%rdx,%rcx,8)
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L20:
	movq	(%rdx,%rdi,8), %r8
	movq	%r8, (%rdx,%rcx,8)
	movq	%xmm0, (%rdx,%rdi,8)
	testl	%eax, %eax
	je	.L17
.L18:
	movslq	%eax, %rcx
	sarl	%eax
	movl	(%rdx,%rcx,8), %r8d
	movslq	%eax, %rdi
	movd	%r8d, %xmm0
	punpckldq	%xmm1, %xmm0
	cmpl	%r8d, (%rdx,%rdi,8)
	jl	.L20
.L17:
	ret
.L25:
	ret
	.cfi_endproc
.LFE25:
	.size	enq, .-enq
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB26:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	js	.L26
	movl	n(%rip), %edx
	cmpl	%edi, %edx
	jle	.L26
	testl	%edi, %edi
	jne	.L28
	movl	8+len(%rip), %esi
	cmpl	%esi, len(%rip)
	movl	$1, %eax
	jg	.L26
.L28:
	movslq	%edi, %rax
	leaq	len(%rip), %rcx
	movl	(%rcx,%rax,8), %esi
	leal	-1(%rdx), %eax
	cmpl	%edi, %eax
	je	.L36
.L29:
	leal	-1(%rdi), %edx
	xorl	%eax, %eax
	movslq	%edx, %rdx
	cmpl	%esi, (%rcx,%rdx,8)
	jge	.L26
	addl	$1, %edi
	xorl	%eax, %eax
	movslq	%edi, %rdi
	cmpl	%esi, (%rcx,%rdi,8)
	setl	%al
.L26:
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	subl	$2, %edx
	movl	$1, %eax
	movslq	%edx, %rdx
	cmpl	%esi, (%rcx,%rdx,8)
	jge	.L29
	ret
	.cfi_endproc
.LFE26:
	.size	check, .-check
	.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:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	$0, qsize(%rip)
	testl	%eax, %eax
	jle	.L54
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	len(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	4(%rsp), %xmm2
	movl	n(%rip), %r8d
	pshufd	$0xe0, %xmm2, %xmm0
	movq	%xmm0, (%rbx,%rbp,8)
	addq	$1, %rbp
	cmpl	%ebp, %r8d
	jg	.L39
	movl	qsize(%rip), %r9d
	testl	%r8d, %r8d
	jle	.L40
	leal	-2(%r8), %r13d
	leaq	len(%rip), %rdi
	pxor	%xmm0, %xmm0
	movl	$1, %r10d
	leaq	que(%rip), %rax
	leal	-1(%r8), %r12d
	movslq	%r13d, %r13
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%r10d, %r11d
	cmpl	%edx, -8(%rdi)
	jge	.L44
	cmpl	%edx, 8(%rdi)
	jl	.L42
	.p2align 4,,10
	.p2align 3
.L44:
	movd	%xmm0, %ecx
	addl	$1, %r10d
	addq	$8, %rdi
	addl	$1, %ecx
	movd	%ecx, %xmm0
	cmpl	%r11d, %r8d
	jle	.L40
.L47:
	movd	%xmm0, %ecx
	testl	%ecx, %ecx
	jne	.L41
	movl	8+len(%rip), %esi
	cmpl	%esi, (%rbx)
	jg	.L42
.L41:
	movd	%xmm0, %ecx
	movl	(%rdi), %edx
	cmpl	%ecx, %r12d
	jne	.L43
	cmpl	%edx, (%rbx,%r13,8)
	jge	.L43
.L42:
	movd	4(%rdi), %xmm1
	leal	1(%r9), %ebp
	movslq	%r9d, %rdx
	movl	%r10d, %r11d
	movl	%ebp, qsize(%rip)
	punpckldq	%xmm0, %xmm1
	movq	%xmm1, (%rax,%rdx,8)
	testl	%r9d, %r9d
	jg	.L45
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L46:
	movq	(%rax,%rcx,8), %rsi
	movq	%rsi, (%rax,%rdx,8)
	movq	%xmm1, (%rax,%rcx,8)
	testl	%r9d, %r9d
	je	.L55
.L45:
	movslq	%r9d, %rdx
	sarl	%r9d
	movl	(%rax,%rdx,8), %esi
	movslq	%r9d, %rcx
	movd	%esi, %xmm1
	punpckldq	%xmm0, %xmm1
	cmpl	(%rax,%rcx,8), %esi
	jg	.L46
.L55:
	movl	%ebp, %r9d
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L40:
	xorl	%r13d, %r13d
	leaq	que(%rip), %r12
	testl	%r9d, %r9d
	je	.L38
.L48:
	subl	$1, %r9d
	movl	4+que(%rip), %ebp
	xorl	%edi, %edi
	movl	%r9d, qsize(%rip)
	movslq	%r9d, %r9
	movq	(%r12,%r9,8), %rax
	movq	%rax, (%r12)
	call	max_heapify
	movslq	%ebp, %rax
	movl	(%rsp), %r9d
	leal	-1(%rbp), %r8d
	subl	4(%rbx,%rax,8), %r9d
	movl	%r8d, %edi
	movl	$0, (%rbx,%rax,8)
	cmpl	%r13d, %r9d
	cmovl	%r13d, %r9d
	call	check
	testl	%eax, %eax
	jne	.L69
.L52:
	addl	$1, %ebp
	movl	%ebp, %edi
	call	check
	testl	%eax, %eax
	jne	.L70
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L50
.L38:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L71
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L70:
	.cfi_restore_state
	movslq	%ebp, %rax
	movl	%ebp, %esi
	movl	4(%rbx,%rax,8), %edi
	subl	%r9d, %edi
	movl	%edi, 4(%rbx,%rax,8)
	call	enq
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	je	.L38
.L50:
	movl	%r9d, %r13d
	movl	%eax, %r9d
	jmp	.L48
.L69:
	movslq	%r8d, %rax
	movl	%r8d, %esi
	movl	4(%rbx,%rax,8), %edi
	subl	%r9d, %edi
	movl	%edi, 4(%rbx,%rax,8)
	call	enq
	jmp	.L52
.L54:
	xorl	%r9d, %r9d
	jmp	.L38
.L71:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 800080
len:
	.zero	800080
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	que
	.align 32
	.type	que, @object
	.size	que, 800120
que:
	.zero	800120
	.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	max_heapify
	.type	max_heapify, @function
max_heapify:
.LFB23:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %r8d
	leaq	que(%rip), %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movslq	%edi, %rcx
	movslq	%esi, %r9
	movl	(%rax,%rcx,8), %r11d
	cmpl	%r11d, (%rax,%r9,8)
	jle	.L2
	cmpl	%edx, %r8d
	jg	.L9
	movl	%esi, %edx
.L3:
	cmpl	%edi, %edx
	je	.L1
	movslq	%edx, %rsi
	movq	(%rax,%rcx,8), %rdi
	movq	(%rax,%rsi,8), %r9
	movq	%r9, (%rax,%rcx,8)
	movq	%rdi, (%rax,%rsi,8)
	movl	%edx, %edi
.L5:
	leal	(%rdi,%rdi), %esi
	leal	1(%rsi), %edx
	cmpl	%esi, %r8d
	jg	.L10
.L2:
	cmpl	%edx, %r8d
	jle	.L1
	movslq	%edx, %rsi
	movslq	%edi, %rcx
	movl	(%rax,%rsi,8), %esi
	cmpl	%esi, (%rax,%rcx,8)
	jl	.L3
.L1:
	ret
.L9:
	movslq	%edx, %r10
	movl	(%rax,%r9,8), %r11d
	cmpl	%r11d, (%rax,%r10,8)
	cmovle	%esi, %edx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	max_heapify, .-max_heapify
	.p2align 4
	.globl	deq
	.type	deq, @function
deq:
.LFB24:
	.cfi_startproc
	endbr64
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	movl	4+que(%rip), %eax
	leaq	que(%rip), %rdx
	movl	%eax, (%rdi)
	movl	qsize(%rip), %eax
	xorl	%edi, %edi
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	cltq
	movq	(%rdx,%rax,8), %rax
	movq	%rax, que(%rip)
	call	max_heapify
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	deq, .-deq
	.p2align 4
	.globl	enq
	.type	enq, @function
enq:
.LFB25:
	.cfi_startproc
	endbr64
	movslq	qsize(%rip), %rcx
	movd	%esi, %xmm1
	movd	%edi, %xmm0
	punpckldq	%xmm1, %xmm0
	leal	1(%rcx), %edx
	movq	%rcx, %rax
	movl	%edx, qsize(%rip)
	leaq	que(%rip), %rdx
	movq	%xmm0, (%rdx,%rcx,8)
	testl	%ecx, %ecx
	jg	.L18
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L20:
	movq	(%rdx,%rdi,8), %r8
	movq	%r8, (%rdx,%rcx,8)
	movq	%xmm0, (%rdx,%rdi,8)
	testl	%eax, %eax
	je	.L17
.L18:
	movslq	%eax, %rcx
	sarl	%eax
	movl	(%rdx,%rcx,8), %r8d
	movslq	%eax, %rdi
	movd	%r8d, %xmm0
	punpckldq	%xmm1, %xmm0
	cmpl	%r8d, (%rdx,%rdi,8)
	jl	.L20
.L17:
	ret
.L25:
	ret
	.cfi_endproc
.LFE25:
	.size	enq, .-enq
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB26:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testl	%edi, %edi
	js	.L26
	movl	n(%rip), %edx
	cmpl	%edi, %edx
	jle	.L26
	testl	%edi, %edi
	jne	.L28
	movl	8+len(%rip), %esi
	cmpl	%esi, len(%rip)
	movl	$1, %eax
	jg	.L26
.L28:
	movslq	%edi, %rax
	leaq	len(%rip), %rcx
	movl	(%rcx,%rax,8), %esi
	leal	-1(%rdx), %eax
	cmpl	%edi, %eax
	je	.L36
.L29:
	leal	-1(%rdi), %edx
	xorl	%eax, %eax
	movslq	%edx, %rdx
	cmpl	%esi, (%rcx,%rdx,8)
	jge	.L26
	addl	$1, %edi
	xorl	%eax, %eax
	movslq	%edi, %rdi
	cmpl	%esi, (%rcx,%rdi,8)
	setl	%al
.L26:
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	subl	$2, %edx
	movl	$1, %eax
	movslq	%edx, %rdx
	cmpl	%esi, (%rcx,%rdx,8)
	jge	.L29
	ret
	.cfi_endproc
.LFE26:
	.size	check, .-check
	.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:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rdx
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	movl	$0, qsize(%rip)
	testl	%eax, %eax
	jle	.L54
	xorl	%ebp, %ebp
	leaq	4(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	len(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L39:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	4(%rsp), %xmm2
	movl	n(%rip), %r8d
	pshufd	$0xe0, %xmm2, %xmm0
	movq	%xmm0, (%rbx,%rbp,8)
	addq	$1, %rbp
	cmpl	%ebp, %r8d
	jg	.L39
	movl	qsize(%rip), %r9d
	testl	%r8d, %r8d
	jle	.L40
	leal	-2(%r8), %r13d
	leaq	len(%rip), %rdi
	pxor	%xmm0, %xmm0
	movl	$1, %r10d
	leaq	que(%rip), %rax
	leal	-1(%r8), %r12d
	movslq	%r13d, %r13
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%r10d, %r11d
	cmpl	%edx, -8(%rdi)
	jge	.L44
	cmpl	%edx, 8(%rdi)
	jl	.L42
	.p2align 4,,10
	.p2align 3
.L44:
	movd	%xmm0, %ecx
	addl	$1, %r10d
	addq	$8, %rdi
	addl	$1, %ecx
	movd	%ecx, %xmm0
	cmpl	%r11d, %r8d
	jle	.L40
.L47:
	movd	%xmm0, %ecx
	testl	%ecx, %ecx
	jne	.L41
	movl	8+len(%rip), %esi
	cmpl	%esi, (%rbx)
	jg	.L42
.L41:
	movd	%xmm0, %ecx
	movl	(%rdi), %edx
	cmpl	%ecx, %r12d
	jne	.L43
	cmpl	%edx, (%rbx,%r13,8)
	jge	.L43
.L42:
	movd	4(%rdi), %xmm1
	leal	1(%r9), %ebp
	movslq	%r9d, %rdx
	movl	%r10d, %r11d
	movl	%ebp, qsize(%rip)
	punpckldq	%xmm0, %xmm1
	movq	%xmm1, (%rax,%rdx,8)
	testl	%r9d, %r9d
	jg	.L45
	jmp	.L55
	.p2align 4,,10
	.p2align 3
.L46:
	movq	(%rax,%rcx,8), %rsi
	movq	%rsi, (%rax,%rdx,8)
	movq	%xmm1, (%rax,%rcx,8)
	testl	%r9d, %r9d
	je	.L55
.L45:
	movslq	%r9d, %rdx
	sarl	%r9d
	movl	(%rax,%rdx,8), %esi
	movslq	%r9d, %rcx
	movd	%esi, %xmm1
	punpckldq	%xmm0, %xmm1
	cmpl	(%rax,%rcx,8), %esi
	jg	.L46
.L55:
	movl	%ebp, %r9d
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L40:
	xorl	%r13d, %r13d
	leaq	que(%rip), %r12
	testl	%r9d, %r9d
	je	.L38
.L48:
	subl	$1, %r9d
	movl	4+que(%rip), %ebp
	xorl	%edi, %edi
	movl	%r9d, qsize(%rip)
	movslq	%r9d, %r9
	movq	(%r12,%r9,8), %rax
	movq	%rax, (%r12)
	call	max_heapify
	movslq	%ebp, %rax
	movl	(%rsp), %r9d
	leal	-1(%rbp), %r8d
	subl	4(%rbx,%rax,8), %r9d
	movl	%r8d, %edi
	movl	$0, (%rbx,%rax,8)
	cmpl	%r13d, %r9d
	cmovl	%r13d, %r9d
	call	check
	testl	%eax, %eax
	jne	.L69
.L52:
	addl	$1, %ebp
	movl	%ebp, %edi
	call	check
	testl	%eax, %eax
	jne	.L70
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L50
.L38:
	xorl	%eax, %eax
	movl	%r9d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L71
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L70:
	.cfi_restore_state
	movslq	%ebp, %rax
	movl	%ebp, %esi
	movl	4(%rbx,%rax,8), %edi
	subl	%r9d, %edi
	movl	%edi, 4(%rbx,%rax,8)
	call	enq
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	je	.L38
.L50:
	movl	%r9d, %r13d
	movl	%eax, %r9d
	jmp	.L48
.L69:
	movslq	%r8d, %rax
	movl	%r8d, %esi
	movl	4(%rbx,%rax,8), %edi
	subl	%r9d, %edi
	movl	%edi, 4(%rbx,%rax,8)
	call	enq
	jmp	.L52
.L54:
	xorl	%r9d, %r9d
	jmp	.L38
.L71:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 800080
len:
	.zero	800080
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.globl	que
	.align 32
	.type	que, @object
	.size	que, 800120
que:
	.zero	800120
	.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:

// Aizu 0551: Icicles
// 2017.9.22 bal4u@uu

#include <stdio.h>

/* ????????????????????????????????\????????????????????? */
#define QSIZE 100010
#define PARENT(i) ((i)>>1)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

typedef struct { int key, a; } QUE;	// ???????????????????§??????????????´????????????????t?????????????±?
QUE que[QSIZE + 5];
int qsize;

void max_heapify(int i)
{
	int l, r, max;
	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].key > que[i].key) max = l; else max = i;
	if (r < qsize && que[r].key > que[max].key) max = r;
	if (max != i) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		max_heapify(max);
	}
}

int deq(int *a)
{
	if (qsize == 0) return 0;
	*a = que[0].a;
	que[0] = que[--qsize];
	max_heapify(0);
	return 1;
}

void enq(int t, int a)
{
	int i, max;
	i = qsize++;
	que[i].key = t, que[i].a = a;
	while (i > 0 && que[max = PARENT(i)].key < que[i].key) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		i = max;
	}
}
/* ????????????????????????????????\????????????????????? */


#define MAX 100010
typedef struct { int a, b; } T;
T len[MAX]; int n;

int check(int k)
{
	if (k < 0 || k >= n) return 0;
	if (k == 0   && len[0].a > len[1].a) return 1;
	if (k == n-1 && len[n-1].a > len[n-2].a) return 1;
	if (len[k].a > len[k-1].a && len[k].a > len[k+1].a) return 1;
	return 0;
}

int main(void)
{
	int l, i, t, ans;

	scanf("%d%d", &n, &l);
	qsize = 0; for (i = 0; i < n; i++) scanf("%d", &t), len[i].a = len[i].b = t;
	for (i = 0; i < n; i++) if (check(i)) enq(len[i].b, i);
	ans = 0;
	while (deq(&i)) {
		if (l - len[i].b > ans) ans = l - len[i].b;
		len[i].a = 0;
		if (check(i-1)) len[i-1].b -= ans, enq(len[i-1].b, i-1);
		if (check(i+1)) len[i+1].b -= ans, enq(len[i+1].b, i+1);
	}
	printf("%d\n", ans);
	return 0;
}
4 6
7
2
3
5
 4 6
4
1
3
5
 1 6
4
2
3
1
 4 10
7
1
3
5
 4 11
5
2
3
5
 4 5
4
2
3
1
 1 6
3
2
3
1
 1 6
2
2
3
1
 4 9
7
2
3
5
 1 6
1
0
1
1

8
 9
 2
 21
 23
 6
 3
 4
 17
 5

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// Aizu 0551: Icicles
// 2017.9.22 bal4u@uu

#include <stdio.h>

/* ????????????????????????????????\????????????????????? */
#define QSIZE 100010
#define PARENT(i) ((i)>>1)
#define LEFT(i)   ((i)<<1)
#define RIGHT(i)  (((i)<<1)+1)

typedef struct { int key, a; } QUE;	// ???????????????????§??????????????´????????????????t?????????????±?
QUE que[QSIZE + 5];
int qsize;

void max_heapify(int i)
{
	int l, r, max;
	l = LEFT(i), r = RIGHT(i);
	if (l < qsize && que[l].key > que[i].key) max = l; else max = i;
	if (r < qsize && que[r].key > que[max].key) max = r;
	if (max != i) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		max_heapify(max);
	}
}

int deq(int *a)
{
	if (qsize == 0) return 0;
	*a = que[0].a;
	que[0] = que[--qsize];
	max_heapify(0);
	return 1;
}

void enq(int t, int a)
{
	int i, max;
	i = qsize++;
	que[i].key = t, que[i].a = a;
	while (i > 0 && que[max = PARENT(i)].key < que[i].key) {
		QUE t = que[i]; que[i] = que[max], que[max] = t;
		i = max;
	}
}
/* ????????????????????????????????\????????????????????? */


#define MAX 100010
typedef struct { int a, b; } T;
T len[MAX]; int n;

int check(int k)
{
	if (k < 0 || k >= n) return 0;
	if (k == 0   && len[0].a > len[1].a) return 1;
	if (k == n-1 && len[n-1].a > len[n-2].a) return 1;
	if (len[k].a > len[k-1].a && len[k].a > len[k+1].a) return 1;
	return 0;
}

int main(void)
{
	int l, i, t, ans;

	scanf("%d%d", &n, &l);
	qsize = 0; for (i = 0; i < n; i++) scanf("%d", &t), len[i].a = len[i].b = t;
	for (i = 0; i < n; i++) if (check(i)) enq(len[i].b, i);
	ans = 0;
	while (deq(&i)) {
		if (l - len[i].b > ans) ans = l - len[i].b;
		len[i].a = 0;
		if (check(i-1)) len[i-1].b -= ans, enq(len[i-1].b, i-1);
		if (check(i+1)) len[i+1].b -= ans, enq(len[i+1].b, i+1);
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	que
	.bss
	.align 32
	.type	que, @object
	.size	que, 800120
que:
	.zero	800120
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.text
	.globl	max_heapify
	.type	max_heapify, @function
max_heapify:
.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
	movl	%edi, -36(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L2
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L6
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	max_heapify
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max_heapify, .-max_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	4+que(%rip), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, que(%rip)
	movl	$0, %edi
	call	max_heapify
	movl	$1, %eax
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+que(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	enq, .-enq
	.globl	len
	.bss
	.align 32
	.type	len, @object
	.size	len, 800080
len:
	.zero	800080
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L16
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	cmpl	$0, -4(%rbp)
	jne	.L19
	movl	len(%rip), %edx
	movl	8+len(%rip), %eax
	cmpl	%eax, %edx
	jle	.L19
	movl	$1, %eax
	jmp	.L18
.L19:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L20
	movl	n(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$1, %eax
	jmp	.L18
.L21:
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	-24(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, qsize(%rip)
	movl	$0, -20(%rbp)
	jmp	.L23
.L24:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	4+len(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-20(%rbp), %edx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L23:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L24
	movl	$0, -20(%rbp)
	jmp	.L25
.L27:
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L26
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L26:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L25:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L27
	movl	$0, -12(%rbp)
	jmp	.L28
.L31:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L29
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
.L29:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L30
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	subl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L30:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L28
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	testl	%eax, %eax
	jne	.L31
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	que
	.bss
	.align 32
	.type	que, @object
	.size	que, 800120
que:
	.zero	800120
	.globl	qsize
	.align 4
	.type	qsize, @object
	.size	qsize, 4
qsize:
	.zero	4
	.text
	.globl	max_heapify
	.type	max_heapify, @function
max_heapify:
.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
	movl	%edi, -36(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	movl	%eax, -16(%rbp)
	movl	-36(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	qsize(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L2
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L2
	movl	-16(%rbp), %eax
	movl	%eax, -20(%rbp)
	jmp	.L3
.L2:
	movl	-36(%rbp), %eax
	movl	%eax, -20(%rbp)
.L3:
	movl	qsize(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L4:
	movl	-20(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	.L6
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	max_heapify
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max_heapify, .-max_heapify
	.globl	deq
	.type	deq, @function
deq:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	qsize(%rip), %eax
	testl	%eax, %eax
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	4+que(%rip), %edx
	movq	-8(%rbp), %rax
	movl	%edx, (%rax)
	movl	qsize(%rip), %eax
	subl	$1, %eax
	movl	%eax, qsize(%rip)
	movl	qsize(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, que(%rip)
	movl	$0, %edi
	call	max_heapify
	movl	$1, %eax
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	deq, .-deq
	.globl	enq
	.type	enq, @function
enq:
.LFB2:
	.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)
	movl	%esi, -24(%rbp)
	movl	qsize(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, qsize(%rip)
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+que(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	jmp	.L11
.L13:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rsi
	leaq	que(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	movl	%eax, -16(%rbp)
.L11:
	cmpl	$0, -16(%rbp)
	jle	.L14
	movl	-16(%rbp), %eax
	sarl	%eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	que(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	que(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jl	.L13
.L14:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	enq, .-enq
	.globl	len
	.bss
	.align 32
	.type	len, @object
	.size	len, 800080
len:
	.zero	800080
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$0, -4(%rbp)
	js	.L16
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L17
.L16:
	movl	$0, %eax
	jmp	.L18
.L17:
	cmpl	$0, -4(%rbp)
	jne	.L19
	movl	len(%rip), %edx
	movl	8+len(%rip), %eax
	cmpl	%eax, %edx
	jle	.L19
	movl	$1, %eax
	jmp	.L18
.L19:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jne	.L20
	movl	n(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	n(%rip), %eax
	subl	$2, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	len(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$1, %eax
	jmp	.L18
.L21:
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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	-24(%rbp), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, qsize(%rip)
	movl	$0, -20(%rbp)
	jmp	.L23
.L24:
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %eax
	movl	-16(%rbp), %edx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	4+len(%rip), %rcx
	movl	%edx, (%rsi,%rcx)
	movl	-20(%rbp), %edx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L23:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L24
	movl	$0, -20(%rbp)
	jmp	.L25
.L27:
	movl	-20(%rbp), %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L26
	movl	-20(%rbp), %edx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L26:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -20(%rbp)
.L25:
	movl	-20(%rbp), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L27
	movl	$0, -12(%rbp)
	jmp	.L28
.L31:
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	jge	.L29
	movl	-24(%rbp), %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
.L29:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	len(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L30
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	subl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L30:
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L28
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-20(%rbp), %edx
	addl	$1, %edx
	subl	-12(%rbp), %eax
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	4+len(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+len(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	enq
.L28:
	leaq	-20(%rbp), %rax
	movq	%rax, %rdi
	call	deq
	testl	%eax, %eax
	jne	.L31
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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:
