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

```c
#define f(I)(p[I]+h[I]*(h[I]-2*h[i]))
long C,h[2<<17],p[2<<17],X,a;
P[2<<17];
s,t,x,y;
main(i){
	for(scanf("%*d%ld%ld",&C,h);~scanf("%ld",&a);P[++t]=i-1){
		for(h[i]=a;X=f(P[s]),s<t&&X>=f(P[s+1]);s++);
		for(p[i++]=X+=a*a+C;s<t&&(h[y=P[t]]-h[x=P[t-1]])*(f(y)-f(i-1))>(a-h[y])*(f(x)-f(y));t--);
	}
	printf("%ld",X);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	C
	.bss
	.align 8
	.type	C, @object
	.size	C, 8
C:
	.zero	8
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 2097152
h:
	.zero	2097152
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 2097152
p:
	.zero	2097152
	.globl	X
	.align 8
	.type	X, @object
	.size	X, 8
X:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1048576
P:
	.zero	1048576
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%ld%ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	C(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L10:
	movq	a(%rip), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L3
.L6:
	movl	s(%rip), %eax
	addl	$1, %eax
	movl	%eax, s(%rip)
.L3:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rax, X(%rip)
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%rdi,%rax), %rdx
	movq	X(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	$0, %eax
.L5:
	testl	%eax, %eax
	jne	.L6
	movq	a(%rip), %rdx
	movq	a(%rip), %rax
	imulq	%rax, %rdx
	movq	C(%rip), %rax
	addq	%rax, %rdx
	movq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, X(%rip)
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movq	X(%rip), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L7
.L9:
	movl	t(%rip), %eax
	subl	$1, %eax
	movl	%eax, t(%rip)
.L7:
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, y(%rip)
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	t(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, x(%rip)
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rdi
	subq	%rax, %rdi
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r8
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	y(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rax, %r8
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r9
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%r9,%rax), %rdx
	movq	%r8, %rax
	subq	%rdx, %rax
	imulq	%rax, %rdi
	movq	%rdi, %rdx
	movq	a(%rip), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rax
	movq	%rax, %r8
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r9
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	x(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	addq	%rax, %r9
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r10
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	leaq	(%r10,%rax), %rcx
	movq	%r9, %rax
	subq	%rcx, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rdx
	jg	.L9
.L8:
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	-4(%rbp), %edx
	leal	-1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L2:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movq	X(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%*d%ld%ld"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	h(%rip), %r15
	leaq	C(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r15, %rdx
	leaq	p(%rip), %r14
	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
	movl	%edi, %ebx
	leaq	.LC0(%rip), %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	call	scanf@PLT
	leal	1(%rbx), %eax
	movl	%eax, 20(%rsp)
	movslq	%ebx, %rax
	salq	$3, %rax
	leaq	(%r14,%rax), %rdi
	addq	%r15, %rax
	movq	%rdi, 40(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	leaq	a(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	subl	$1, %eax
	movl	%eax, 36(%rsp)
	xorl	%eax, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movslq	s(%rip), %rcx
	leaq	P(%rip), %rbx
	movq	24(%rsp), %rax
	movq	a(%rip), %r13
	movslq	(%rbx,%rcx,4), %rsi
	movq	%rcx, %rdx
	movq	%r13, (%rax)
	leaq	(%r13,%r13), %r10
	movq	(%r15,%rsi,8), %rdi
	movq	%rdi, %rax
	subq	%r10, %rax
	imulq	%rdi, %rax
	movl	t(%rip), %edi
	addq	(%r14,%rsi,8), %rax
	cmpl	%edi, %ecx
	jge	.L3
	movl	32(%rsp), %esi
	leaq	(%rbx,%rcx,4), %r8
	xorl	%r11d, %r11d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %r8
	movl	$1, %r11d
	cmpl	%edi, %edx
	je	.L26
	movl	%edx, %esi
.L5:
	movslq	4(%r8), %rcx
	movq	%rax, %r9
	movl	%edx, %r12d
	addl	$1, %edx
	movq	(%r15,%rcx,8), %rbx
	movq	%rbx, %rax
	subq	%r10, %rax
	imulq	%rbx, %rax
	addq	(%r14,%rcx,8), %rax
	cmpq	%r9, %rax
	jle	.L27
	movl	%esi, 32(%rsp)
	testb	%r11b, %r11b
	je	.L7
	movl	%esi, s(%rip)
.L7:
	movq	%r13, %rax
	movq	40(%rsp), %rsi
	imulq	%r13, %rax
	addq	C(%rip), %rax
	addq	%r9, %rax
	movq	%rax, X(%rip)
	movq	%rax, (%rsi)
	cmpl	%r12d, %edi
	jle	.L23
	movslq	20(%rsp), %rdx
	leaq	P(%rip), %rbx
	movq	(%r15,%rdx,8), %rbp
	movq	%r13, %rdx
	addq	%rbp, %rbp
	subq	%rbp, %rdx
	imulq	%r13, %rdx
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
	movslq	%edi, %rax
	movslq	(%rbx,%rax,4), %rdx
	leaq	(%rbx,%rax,4), %r9
	movl	(%r9), %r10d
	movq	(%r15,%rdx,8), %rcx
	movq	(%r14,%rdx,8), %r11
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$4, %r9
	cmpl	%r12d, %edi
	je	.L28
.L10:
	movq	%rcx, %rsi
	movslq	-4(%r9), %rax
	movl	%r10d, 16(%rsp)
	movl	%edi, %ebx
	movq	%rsi, %rdx
	movq	%rsi, %r8
	leal	-1(%rdi), %edi
	subq	%rbp, %rdx
	movq	(%r15,%rax,8), %rcx
	movq	%rax, %r10
	imulq	%rsi, %rdx
	subq	%rcx, %r8
	addq	%r11, %rdx
	movq	(%r14,%rax,8), %r11
	movq	%rdx, %rax
	subq	8(%rsp), %rax
	imulq	%rax, %r8
	movq	%rcx, %rax
	subq	%rbp, %rax
	imulq	%rcx, %rax
	addq	%r11, %rax
	subq	%rdx, %rax
	movq	%r13, %rdx
	subq	%rsi, %rdx
	imulq	%rdx, %rax
	cmpq	%rax, %r8
	jg	.L11
	movl	16(%rsp), %eax
	movl	%r10d, x(%rip)
	addl	$1, %ebx
	movl	%eax, y(%rip)
.L9:
	movl	36(%rsp), %edi
	movl	%ebx, t(%rip)
	movslq	%ebx, %rbx
	leaq	P(%rip), %rax
	addl	$1, 20(%rsp)
	addq	$8, 40(%rsp)
	addq	$8, 24(%rsp)
	movl	%edi, (%rax,%rbx,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	movl	16(%rsp), %eax
	movl	%r10d, x(%rip)
	movl	%eax, y(%rip)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%esi, 32(%rsp)
	movl	%edi, s(%rip)
.L3:
	movq	%r13, %rdx
	movq	40(%rsp), %rsi
	imulq	%r13, %rdx
	addq	C(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, X(%rip)
	movq	%rax, (%rsi)
.L23:
	leal	1(%rdi), %ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	movq	X(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	y
	.bss
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1048576
P:
	.zero	1048576
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	X
	.align 8
	.type	X, @object
	.size	X, 8
X:
	.zero	8
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 2097152
p:
	.zero	2097152
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 2097152
h:
	.zero	2097152
	.globl	C
	.align 8
	.type	C, @object
	.size	C, 8
C:
	.zero	8
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%*d%ld%ld"
.LC1:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	h(%rip), %r15
	leaq	C(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r15, %rdx
	leaq	p(%rip), %r14
	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
	movl	%edi, %ebx
	leaq	.LC0(%rip), %rdi
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	call	scanf@PLT
	leal	1(%rbx), %eax
	movl	%eax, 20(%rsp)
	movslq	%ebx, %rax
	salq	$3, %rax
	leaq	(%r14,%rax), %rdi
	addq	%r15, %rax
	movq	%rdi, 40(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movl	20(%rsp), %eax
	leaq	a(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	subl	$1, %eax
	movl	%eax, 36(%rsp)
	xorl	%eax, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	je	.L25
	movslq	s(%rip), %rcx
	leaq	P(%rip), %rbx
	movq	24(%rsp), %rax
	movq	a(%rip), %r13
	movslq	(%rbx,%rcx,4), %rsi
	movq	%rcx, %rdx
	movq	%r13, (%rax)
	leaq	(%r13,%r13), %r10
	movq	(%r15,%rsi,8), %rdi
	movq	%rdi, %rax
	subq	%r10, %rax
	imulq	%rdi, %rax
	movl	t(%rip), %edi
	addq	(%r14,%rsi,8), %rax
	cmpl	%edi, %ecx
	jge	.L3
	movl	32(%rsp), %esi
	leaq	(%rbx,%rcx,4), %r8
	xorl	%r11d, %r11d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L27:
	addq	$4, %r8
	movl	$1, %r11d
	cmpl	%edi, %edx
	je	.L26
	movl	%edx, %esi
.L5:
	movslq	4(%r8), %rcx
	movq	%rax, %r9
	movl	%edx, %r12d
	addl	$1, %edx
	movq	(%r15,%rcx,8), %rbx
	movq	%rbx, %rax
	subq	%r10, %rax
	imulq	%rbx, %rax
	addq	(%r14,%rcx,8), %rax
	cmpq	%r9, %rax
	jle	.L27
	movl	%esi, 32(%rsp)
	testb	%r11b, %r11b
	je	.L7
	movl	%esi, s(%rip)
.L7:
	movq	%r13, %rax
	movq	40(%rsp), %rsi
	imulq	%r13, %rax
	addq	C(%rip), %rax
	addq	%r9, %rax
	movq	%rax, X(%rip)
	movq	%rax, (%rsi)
	cmpl	%r12d, %edi
	jle	.L23
	movslq	20(%rsp), %rdx
	leaq	P(%rip), %rbx
	movq	(%r15,%rdx,8), %rbp
	movq	%r13, %rdx
	addq	%rbp, %rbp
	subq	%rbp, %rdx
	imulq	%r13, %rdx
	addq	%rdx, %rax
	movq	%rax, 8(%rsp)
	movslq	%edi, %rax
	movslq	(%rbx,%rax,4), %rdx
	leaq	(%rbx,%rax,4), %r9
	movl	(%r9), %r10d
	movq	(%r15,%rdx,8), %rcx
	movq	(%r14,%rdx,8), %r11
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	subq	$4, %r9
	cmpl	%r12d, %edi
	je	.L28
.L10:
	movq	%rcx, %rsi
	movslq	-4(%r9), %rax
	movl	%r10d, 16(%rsp)
	movl	%edi, %ebx
	movq	%rsi, %rdx
	movq	%rsi, %r8
	leal	-1(%rdi), %edi
	subq	%rbp, %rdx
	movq	(%r15,%rax,8), %rcx
	movq	%rax, %r10
	imulq	%rsi, %rdx
	subq	%rcx, %r8
	addq	%r11, %rdx
	movq	(%r14,%rax,8), %r11
	movq	%rdx, %rax
	subq	8(%rsp), %rax
	imulq	%rax, %r8
	movq	%rcx, %rax
	subq	%rbp, %rax
	imulq	%rcx, %rax
	addq	%r11, %rax
	subq	%rdx, %rax
	movq	%r13, %rdx
	subq	%rsi, %rdx
	imulq	%rdx, %rax
	cmpq	%rax, %r8
	jg	.L11
	movl	16(%rsp), %eax
	movl	%r10d, x(%rip)
	addl	$1, %ebx
	movl	%eax, y(%rip)
.L9:
	movl	36(%rsp), %edi
	movl	%ebx, t(%rip)
	movslq	%ebx, %rbx
	leaq	P(%rip), %rax
	addl	$1, 20(%rsp)
	addq	$8, 40(%rsp)
	addq	$8, 24(%rsp)
	movl	%edi, (%rax,%rbx,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	movl	16(%rsp), %eax
	movl	%r10d, x(%rip)
	movl	%eax, y(%rip)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L26:
	movl	%esi, 32(%rsp)
	movl	%edi, s(%rip)
.L3:
	movq	%r13, %rdx
	movq	40(%rsp), %rsi
	imulq	%r13, %rdx
	addq	C(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, X(%rip)
	movq	%rax, (%rsi)
.L23:
	leal	1(%rdi), %ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	movq	X(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	addq	$56, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	y
	.bss
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1048576
P:
	.zero	1048576
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	X
	.align 8
	.type	X, @object
	.size	X, 8
X:
	.zero	8
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 2097152
p:
	.zero	2097152
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 2097152
h:
	.zero	2097152
	.globl	C
	.align 8
	.type	C, @object
	.size	C, 8
C:
	.zero	8
	.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:

#define f(I)(p[I]+h[I]*(h[I]-2*h[i]))
long C,h[2<<17],p[2<<17],X,a;
P[2<<17];
s,t,x,y;
main(i){
	for(scanf("%*d%ld%ld",&C,h);~scanf("%ld",&a);P[++t]=i-1){
		for(h[i]=a;X=f(P[s]),s<t&&X>=f(P[s+1]);s++);
		for(p[i++]=X+=a*a+C;s<t&&(h[y=P[t]]-h[x=P[t-1]])*(f(y)-f(i-1))>(a-h[y])*(f(x)-f(y));t--);
	}
	printf("%ld",X);
}
1 1000000000000
500000 1000000
 8 5
1 3 4 6 10 11 12 13
 2 1000000000000
948591 1000000
 8 5
1 3 4 6 10 11 12 14
 2 1000000000000
710905 1000000
 2 1000000100000
710905 1000000
 2 1000000100000
710905 1001000
 2 1000000110000
710905 1001000
 2 1100100000000
596787 1000001
 2 1000000010000
710905 1001000

1250000000000 58 1002642885281 62 1083575919025 1083576019025 1084155209025 1084155219025 1262681529796 1084155119025
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#define f(I)(p[I]+h[I]*(h[I]-2*h[i]))
long C,h[2<<17],p[2<<17],X,a;
P[2<<17];
s,t,x,y;
main(i){
	for(scanf("%*d%ld%ld",&C,h);~scanf("%ld",&a);P[++t]=i-1){
		for(h[i]=a;X=f(P[s]),s<t&&X>=f(P[s+1]);s++);
		for(p[i++]=X+=a*a+C;s<t&&(h[y=P[t]]-h[x=P[t-1]])*(f(y)-f(i-1))>(a-h[y])*(f(x)-f(y));t--);
	}
	printf("%ld",X);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	C
	.bss
	.align 8
	.type	C, @object
	.size	C, 8
C:
	.zero	8
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 2097152
h:
	.zero	2097152
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 2097152
p:
	.zero	2097152
	.globl	X
	.align 8
	.type	X, @object
	.size	X, 8
X:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1048576
P:
	.zero	1048576
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%ld%ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	C(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L10:
	movq	a(%rip), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L3
.L6:
	movl	s(%rip), %eax
	addl	$1, %eax
	movl	%eax, s(%rip)
.L3:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rax, X(%rip)
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%rdi,%rax), %rdx
	movq	X(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	$0, %eax
.L5:
	testl	%eax, %eax
	jne	.L6
	movq	a(%rip), %rdx
	movq	a(%rip), %rax
	imulq	%rax, %rdx
	movq	C(%rip), %rax
	addq	%rax, %rdx
	movq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, X(%rip)
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movq	X(%rip), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L7
.L9:
	movl	t(%rip), %eax
	subl	$1, %eax
	movl	%eax, t(%rip)
.L7:
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, y(%rip)
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	t(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, x(%rip)
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rdi
	subq	%rax, %rdi
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r8
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	y(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rax, %r8
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r9
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%r9,%rax), %rdx
	movq	%r8, %rax
	subq	%rdx, %rax
	imulq	%rax, %rdi
	movq	%rdi, %rdx
	movq	a(%rip), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rax
	movq	%rax, %r8
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r9
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	x(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	addq	%rax, %r9
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r10
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	leaq	(%r10,%rax), %rcx
	movq	%r9, %rax
	subq	%rcx, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rdx
	jg	.L9
.L8:
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	-4(%rbp), %edx
	leal	-1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L2:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movq	X(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	C
	.bss
	.align 8
	.type	C, @object
	.size	C, 8
C:
	.zero	8
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 2097152
h:
	.zero	2097152
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 2097152
p:
	.zero	2097152
	.globl	X
	.align 8
	.type	X, @object
	.size	X, 8
X:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	P
	.align 32
	.type	P, @object
	.size	P, 1048576
P:
	.zero	1048576
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%*d%ld%ld"
.LC1:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	C(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	jmp	.L2
.L10:
	movq	a(%rip), %rax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	jmp	.L3
.L6:
	movl	s(%rip), %eax
	addl	$1, %eax
	movl	%eax, s(%rip)
.L3:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rax, X(%rip)
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L4
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %rdi
	movl	s(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	s(%rip), %edx
	addl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	P(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%rdi,%rax), %rdx
	movq	X(%rip), %rax
	cmpq	%rax, %rdx
	jg	.L4
	movl	$1, %eax
	jmp	.L5
.L4:
	movl	$0, %eax
.L5:
	testl	%eax, %eax
	jne	.L6
	movq	a(%rip), %rdx
	movq	a(%rip), %rax
	imulq	%rax, %rdx
	movq	C(%rip), %rax
	addq	%rax, %rdx
	movq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, X(%rip)
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movq	X(%rip), %rdx
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	%rdx, (%rcx,%rax)
	jmp	.L7
.L9:
	movl	t(%rip), %eax
	subl	$1, %eax
	movl	%eax, t(%rip)
.L7:
	movl	s(%rip), %edx
	movl	t(%rip), %eax
	cmpl	%eax, %edx
	jge	.L8
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, y(%rip)
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	t(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	P(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, x(%rip)
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rdi
	subq	%rax, %rdi
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r8
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	y(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	addq	%rax, %r8
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	p(%rip), %rax
	movq	(%rdx,%rax), %r9
	movl	-4(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	h(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-4(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	h(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	movl	-4(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	addq	%rcx, %rcx
	subq	%rcx, %rdx
	imulq	%rdx, %rax
	leaq	(%r9,%rax), %rdx
	movq	%r8, %rax
	subq	%rdx, %rax
	imulq	%rax, %rdi
	movq	%rdi, %rdx
	movq	a(%rip), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	subq	%rcx, %rax
	movq	%rax, %r8
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r9
	movl	x(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	x(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	addq	%rax, %r9
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	p(%rip), %rax
	movq	(%rcx,%rax), %r10
	movl	y(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	h(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	y(%rip), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	h(%rip), %rcx
	movq	(%rsi,%rcx), %rcx
	movl	-4(%rbp), %esi
	movslq	%esi, %rsi
	leaq	0(,%rsi,8), %rdi
	leaq	h(%rip), %rsi
	movq	(%rdi,%rsi), %rsi
	addq	%rsi, %rsi
	subq	%rsi, %rcx
	imulq	%rcx, %rax
	leaq	(%r10,%rax), %rcx
	movq	%r9, %rax
	subq	%rcx, %rax
	imulq	%r8, %rax
	cmpq	%rax, %rdx
	jg	.L9
.L8:
	movl	t(%rip), %eax
	addl	$1, %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	-4(%rbp), %edx
	leal	-1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	P(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L2:
	leaq	a(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L10
	movq	X(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
