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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define BUF_SIZE 20

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

#define PARTS_MAX 100000
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int main(void) {
    static uint64_t parts[PARTS_MAX*2];
    int ps = get_int();
    uint64_t sum3 = 0;
    static uint64_t cum[PARTS_MAX*2+1];
    uint64_t part_max = 0;
    int i;
    for(i = 0; i < ps; i++) {
        parts[i] = parts[i+ps] = get_int();
        part_max = max(part_max, parts[i]);
    }
    for(i = 1; i <= ps*2; i++) {
        cum[i] = parts[i-1] + cum[i-1];
    }
    // max in theory.
    uint64_t sum = cum[ps];
    sum3 = max(sum / 3, part_max);
#ifdef DEBUG
    printf("sum3: %llu\n", sum3);
#endif

    int start, end;
    uint64_t ans = 0;
    uint64_t s = 0;
    for(start = 0, end = 0; start < ps; start++) {
        // Shactory Method .. set end
        while(end < start+ps) {
            uint64_t ns = s + parts[end];
            if(ns > sum3) break;
            s = ns;
            end++;
        }
#ifdef DEBUG
        printf("[%d, %d)\n", start, end);
#endif
        // [start, end-1], [end, high), [high, start+ps)

        // search [end, start+ps) in [start, start+ps) using binary-search.
        int low = end-1;
        int high = start + ps;
        while(low + 1 < high) {
            int mid = (low + high)/2;
            uint64_t vs = cum[mid] - cum[end]; // [end, mid)
            // lower bound
            if(s <= vs) {
                high = mid;
            } else {
                low = mid;
            }
        }
        // update answer
        // [end, high)
        uint64_t s2 = cum[high] - cum[end];
        uint64_t rem = sum - s - s2;
        uint64_t res = min(s, rem);
#ifdef DEBUG
        printf("[%d, %d), [%d, %d+1) -> %llu ;;", start, end, end, high, s);
        printf("%llu %llu %llu\n", s, s2, rem);
#endif
        ans = max(ans, res);

        // update s
        s -= parts[start];
    }
    printf("%llu\n", ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$0, %eax
	jmp	.L4
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	call	get_int
	movl	%eax, -88(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L7
.L8:
	call	get_int
	movl	%eax, %edx
	movl	-108(%rbp), %ecx
	movl	-88(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	parts.1(%rip), %rcx
	movq	%rdx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	parts.1(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-80(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L8
	movl	$1, -108(%rbp)
	jmp	.L9
.L10:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -108(%rbp)
.L9:
	movl	-88(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jle	.L10
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movabsq	$-6148914691236517205, %rdx
	mulq	%rdx
	shrq	%rdx
	movq	-80(%rbp), %rax
	cmpq	%rdx, %rax
	cmovb	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L15:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-56(%rbp), %rax
	ja	.L21
	movq	-40(%rbp), %rax
	movq	%rax, -64(%rbp)
	addl	$1, -100(%rbp)
.L12:
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L14
.L21:
	nop
.L14:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L18:
	movl	-96(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-8(%rbp), %rax
	ja	.L17
	movl	-84(%rbp), %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L17:
	movl	-84(%rbp), %eax
	movl	%eax, -96(%rbp)
.L16:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jg	.L18
	movl	-92(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	subq	-64(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-64(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -72(%rbp)
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, -64(%rbp)
	addl	$1, -104(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L12
	movq	-72(%rbp), %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
.LFE7:
	.size	main, .-main
	.local	parts.1
	.comm	parts.1,1600000,32
	.local	cum.0
	.comm	cum.0,1600008,32
	.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"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$20, %esi
	subq	$48, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	movq	%rax, %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	je	.L1
	leaq	12(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %eax
.L1:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L8
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int, .-get_int
	.section	.rodata.str1.1
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	get_int
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L26
	leaq	parts.1(%rip), %rbx
	movl	%eax, %edi
	leal	-1(%rax), %eax
	xorl	%ebp, %ebp
	leaq	8(%rbx), %rdx
	leaq	32(%rsp), %r12
	movslq	%edi, %r13
	leaq	(%rdx,%rax,8), %r14
	leaq	.LC0(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdx
	movl	$20, %esi
	movq	%r12, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L11
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	__isoc99_sscanf@PLT
	movslq	28(%rsp), %rax
	cmpq	%rax, %rbp
	movq	%rax, (%rbx,%r13,8)
	cmovb	%rax, %rbp
	movq	%rax, (%rbx)
	addq	$8, %rbx
	cmpq	%r14, %rbx
	jne	.L14
.L13:
	movl	12(%rsp), %eax
	movq	cum.0(%rip), %rdx
	leaq	-8+parts.1(%rip), %rcx
	leaq	cum.0(%rip), %r10
	leal	(%rax,%rax), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	addq	(%rcx,%rax,8), %rdx
	movq	%rdx, (%r10,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %esi
	jge	.L15
	movq	(%r10,%r13,8), %r15
	movl	12(%rsp), %ebx
	movabsq	$-6148914691236517205, %rdx
	leaq	parts.1(%rip), %r14
	movq	%r15, %rax
	mulq	%rdx
	leal	(%rbx,%rbx), %eax
	movl	%eax, 12(%rsp)
	shrq	%rdx
	cmpq	%rbp, %rdx
	cmovnb	%rdx, %rbp
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%ebx, %rcx
	cmpl	%edi, %ebx
	jle	.L23
	leaq	parts.1(%rip), %rdx
	movq	(%rdx,%r12,8), %rsi
	addq	%rax, %rsi
	cmpq	%rsi, %rbp
	jb	.L23
	leaq	(%rdx,%r12,8), %rax
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L18:
	movq	8(%rax), %rdx
	addq	$8, %rax
	addq	%rsi, %rdx
	cmpq	%rdx, %rbp
	jb	.L34
	movq	%rdx, %rsi
.L24:
	movl	%edi, %r9d
	addl	$1, %edi
	cmpl	%edi, %ebx
	jne	.L18
	movslq	%ebx, %r12
.L17:
	movq	(%r10,%r12,8), %r8
.L19:
	leal	1(%r9), %r11d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%rcx,%r9), %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	(%r10,%rdx,8), %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jb	.L35
	movslq	%eax, %rcx
.L20:
	cmpl	%r11d, %ecx
	jg	.L21
	subq	%rsi, %r8
	leaq	(%r8,%r15), %rax
	subq	(%r10,%rcx,8), %rax
	cmpq	%rsi, %rax
	cmova	%rsi, %rax
	cmpq	%rax, %r13
	cmovb	%rax, %r13
	movq	%rsi, %rax
	addl	$1, %ebx
	subq	(%r14), %rax
	addq	$8, %r14
	cmpl	%ebx, 12(%rsp)
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$72, %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
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movl	%eax, %r9d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edi, %r12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L11:
	movq	$0, (%rbx,%r13,8)
	addq	$8, %rbx
	movq	$0, -8(%rbx)
	cmpq	%rbx, %r14
	jne	.L14
	jmp	.L13
.L23:
	leal	-1(%rdi), %r9d
	movq	%rax, %rsi
	jmp	.L17
.L26:
	xorl	%r13d, %r13d
	jmp	.L10
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.local	cum.0
	.comm	cum.0,1600008,32
	.local	parts.1
	.comm	parts.1,1600000,32
	.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"
	.text
	.p2align 4
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$20, %esi
	subq	$48, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rbp, %rdi
	call	fgets@PLT
	movq	%rax, %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	je	.L1
	leaq	12(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_sscanf@PLT
	movl	12(%rsp), %eax
.L1:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L8
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	get_int, .-get_int
	.section	.rodata.str1.1
.LC1:
	.string	"%llu\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	call	get_int
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L26
	leaq	parts.1(%rip), %rbx
	movl	%eax, %edi
	leal	-1(%rax), %eax
	xorl	%ebp, %ebp
	leaq	8(%rbx), %rdx
	leaq	32(%rsp), %r12
	movslq	%edi, %r13
	leaq	(%rdx,%rax,8), %r14
	leaq	.LC0(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L14:
	movq	stdin(%rip), %rdx
	movl	$20, %esi
	movq	%r12, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L11
	xorl	%eax, %eax
	leaq	28(%rsp), %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	__isoc99_sscanf@PLT
	movslq	28(%rsp), %rax
	cmpq	%rax, %rbp
	movq	%rax, (%rbx,%r13,8)
	cmovb	%rax, %rbp
	movq	%rax, (%rbx)
	addq	$8, %rbx
	cmpq	%r14, %rbx
	jne	.L14
.L13:
	movl	12(%rsp), %eax
	movq	cum.0(%rip), %rdx
	leaq	-8+parts.1(%rip), %rcx
	leaq	cum.0(%rip), %r10
	leal	(%rax,%rax), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	addq	(%rcx,%rax,8), %rdx
	movq	%rdx, (%r10,%rax,8)
	addq	$1, %rax
	cmpl	%eax, %esi
	jge	.L15
	movq	(%r10,%r13,8), %r15
	movl	12(%rsp), %ebx
	movabsq	$-6148914691236517205, %rdx
	leaq	parts.1(%rip), %r14
	movq	%r15, %rax
	mulq	%rdx
	leal	(%rbx,%rbx), %eax
	movl	%eax, 12(%rsp)
	shrq	%rdx
	cmpq	%rbp, %rdx
	cmovnb	%rdx, %rbp
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%ebx, %rcx
	cmpl	%edi, %ebx
	jle	.L23
	leaq	parts.1(%rip), %rdx
	movq	(%rdx,%r12,8), %rsi
	addq	%rax, %rsi
	cmpq	%rsi, %rbp
	jb	.L23
	leaq	(%rdx,%r12,8), %rax
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L18:
	movq	8(%rax), %rdx
	addq	$8, %rax
	addq	%rsi, %rdx
	cmpq	%rdx, %rbp
	jb	.L34
	movq	%rdx, %rsi
.L24:
	movl	%edi, %r9d
	addl	$1, %edi
	cmpl	%edi, %ebx
	jne	.L18
	movslq	%ebx, %r12
.L17:
	movq	(%r10,%r12,8), %r8
.L19:
	leal	1(%r9), %r11d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	leal	(%rcx,%r9), %eax
	sarl	%eax
	movslq	%eax, %rdx
	movq	(%r10,%rdx,8), %rdx
	subq	%r8, %rdx
	cmpq	%rsi, %rdx
	jb	.L35
	movslq	%eax, %rcx
.L20:
	cmpl	%r11d, %ecx
	jg	.L21
	subq	%rsi, %r8
	leaq	(%r8,%r15), %rax
	subq	(%r10,%rcx,8), %rax
	cmpq	%rsi, %rax
	cmova	%rsi, %rax
	cmpq	%rax, %r13
	cmovb	%rax, %r13
	movq	%rsi, %rax
	addl	$1, %ebx
	subq	(%r14), %rax
	addq	$8, %r14
	cmpl	%ebx, 12(%rsp)
	jne	.L16
.L10:
	xorl	%eax, %eax
	movq	%r13, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$72, %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
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	movl	%eax, %r9d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	%edi, %r12
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L11:
	movq	$0, (%rbx,%r13,8)
	addq	$8, %rbx
	movq	$0, -8(%rbx)
	cmpq	%rbx, %r14
	jne	.L14
	jmp	.L13
.L23:
	leal	-1(%rdi), %r9d
	movq	%rax, %rsi
	jmp	.L17
.L26:
	xorl	%r13d, %r13d
	jmp	.L10
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	main, .-main
	.local	cum.0
	.comm	cum.0,1600008,32
	.local	parts.1
	.comm	parts.1,1600000,32
	.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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define BUF_SIZE 20

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

#define PARTS_MAX 100000
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int main(void) {
    static uint64_t parts[PARTS_MAX*2];
    int ps = get_int();
    uint64_t sum3 = 0;
    static uint64_t cum[PARTS_MAX*2+1];
    uint64_t part_max = 0;
    int i;
    for(i = 0; i < ps; i++) {
        parts[i] = parts[i+ps] = get_int();
        part_max = max(part_max, parts[i]);
    }
    for(i = 1; i <= ps*2; i++) {
        cum[i] = parts[i-1] + cum[i-1];
    }
    // max in theory.
    uint64_t sum = cum[ps];
    sum3 = max(sum / 3, part_max);
#ifdef DEBUG
    printf("sum3: %llu\n", sum3);
#endif

    int start, end;
    uint64_t ans = 0;
    uint64_t s = 0;
    for(start = 0, end = 0; start < ps; start++) {
        // Shactory Method .. set end
        while(end < start+ps) {
            uint64_t ns = s + parts[end];
            if(ns > sum3) break;
            s = ns;
            end++;
        }
#ifdef DEBUG
        printf("[%d, %d)\n", start, end);
#endif
        // [start, end-1], [end, high), [high, start+ps)

        // search [end, start+ps) in [start, start+ps) using binary-search.
        int low = end-1;
        int high = start + ps;
        while(low + 1 < high) {
            int mid = (low + high)/2;
            uint64_t vs = cum[mid] - cum[end]; // [end, mid)
            // lower bound
            if(s <= vs) {
                high = mid;
            } else {
                low = mid;
            }
        }
        // update answer
        // [end, high)
        uint64_t s2 = cum[high] - cum[end];
        uint64_t rem = sum - s - s2;
        uint64_t res = min(s, rem);
#ifdef DEBUG
        printf("[%d, %d), [%d, %d+1) -> %llu ;;", start, end, end, high, s);
        printf("%llu %llu %llu\n", s, s2, rem);
#endif
        ans = max(ans, res);

        // update s
        s -= parts[start];
    }
    printf("%llu\n", ans);
    return 0;
}

6
1
5
4
5
2
4

6

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 <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define BUF_SIZE 20

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

#define PARTS_MAX 100000
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int main(void) {
    static uint64_t parts[PARTS_MAX*2];
    int ps = get_int();
    uint64_t sum3 = 0;
    static uint64_t cum[PARTS_MAX*2+1];
    uint64_t part_max = 0;
    int i;
    for(i = 0; i < ps; i++) {
        parts[i] = parts[i+ps] = get_int();
        part_max = max(part_max, parts[i]);
    }
    for(i = 1; i <= ps*2; i++) {
        cum[i] = parts[i-1] + cum[i-1];
    }
    // max in theory.
    uint64_t sum = cum[ps];
    sum3 = max(sum / 3, part_max);
#ifdef DEBUG
    printf("sum3: %llu\n", sum3);
#endif

    int start, end;
    uint64_t ans = 0;
    uint64_t s = 0;
    for(start = 0, end = 0; start < ps; start++) {
        // Shactory Method .. set end
        while(end < start+ps) {
            uint64_t ns = s + parts[end];
            if(ns > sum3) break;
            s = ns;
            end++;
        }
#ifdef DEBUG
        printf("[%d, %d)\n", start, end);
#endif
        // [start, end-1], [end, high), [high, start+ps)

        // search [end, start+ps) in [start, start+ps) using binary-search.
        int low = end-1;
        int high = start + ps;
        while(low + 1 < high) {
            int mid = (low + high)/2;
            uint64_t vs = cum[mid] - cum[end]; // [end, mid)
            // lower bound
            if(s <= vs) {
                high = mid;
            } else {
                low = mid;
            }
        }
        // update answer
        // [end, high)
        uint64_t s2 = cum[high] - cum[end];
        uint64_t rem = sum - s - s2;
        uint64_t res = min(s, rem);
#ifdef DEBUG
        printf("[%d, %d), [%d, %d+1) -> %llu ;;", start, end, end, high, s);
        printf("%llu %llu %llu\n", s, s2, rem);
#endif
        ans = max(ans, res);

        // update s
        s -= parts[start];
    }
    printf("%llu\n", ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$0, %eax
	jmp	.L4
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	call	get_int
	movl	%eax, -88(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L7
.L8:
	call	get_int
	movl	%eax, %edx
	movl	-108(%rbp), %ecx
	movl	-88(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	parts.1(%rip), %rcx
	movq	%rdx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	parts.1(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-80(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L8
	movl	$1, -108(%rbp)
	jmp	.L9
.L10:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -108(%rbp)
.L9:
	movl	-88(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jle	.L10
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movabsq	$-6148914691236517205, %rdx
	mulq	%rdx
	shrq	%rdx
	movq	-80(%rbp), %rax
	cmpq	%rdx, %rax
	cmovb	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L15:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-56(%rbp), %rax
	ja	.L21
	movq	-40(%rbp), %rax
	movq	%rax, -64(%rbp)
	addl	$1, -100(%rbp)
.L12:
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L14
.L21:
	nop
.L14:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L18:
	movl	-96(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-8(%rbp), %rax
	ja	.L17
	movl	-84(%rbp), %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L17:
	movl	-84(%rbp), %eax
	movl	%eax, -96(%rbp)
.L16:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jg	.L18
	movl	-92(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	subq	-64(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-64(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -72(%rbp)
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, -64(%rbp)
	addl	$1, -104(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L12
	movq	-72(%rbp), %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
.LFE7:
	.size	main, .-main
	.local	parts.1
	.comm	parts.1,1600000,32
	.local	cum.0
	.comm	cum.0,1600008,32
	.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
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	stdin(%rip), %rdx
	leaq	-32(%rbp), %rax
	movl	$20, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	jne	.L2
	movl	$0, %eax
	jmp	.L4
.L2:
	leaq	-36(%rbp), %rdx
	leaq	-32(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-36(%rbp), %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int, .-get_int
	.section	.rodata
.LC1:
	.string	"%llu\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	call	get_int
	movl	%eax, -88(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	movl	$0, -108(%rbp)
	jmp	.L7
.L8:
	call	get_int
	movl	%eax, %edx
	movl	-108(%rbp), %ecx
	movl	-88(%rbp), %eax
	addl	%ecx, %eax
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	leaq	0(,%rcx,8), %rsi
	leaq	parts.1(%rip), %rcx
	movq	%rdx, (%rsi,%rcx)
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	parts.1(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-80(%rbp), %rdx
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -80(%rbp)
	addl	$1, -108(%rbp)
.L7:
	movl	-108(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L8
	movl	$1, -108(%rbp)
	jmp	.L9
.L10:
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-108(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addl	$1, -108(%rbp)
.L9:
	movl	-88(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jle	.L10
	movl	-88(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, -48(%rbp)
	movq	-48(%rbp), %rax
	movabsq	$-6148914691236517205, %rdx
	mulq	%rdx
	shrq	%rdx
	movq	-80(%rbp), %rax
	cmpq	%rdx, %rax
	cmovb	%rdx, %rax
	movq	%rax, -56(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	jmp	.L11
.L15:
	movl	-100(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-40(%rbp), %rax
	cmpq	-56(%rbp), %rax
	ja	.L21
	movq	-40(%rbp), %rax
	movq	%rax, -64(%rbp)
	addl	$1, -100(%rbp)
.L12:
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L14
.L21:
	nop
.L14:
	movl	-100(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -96(%rbp)
	movl	-104(%rbp), %edx
	movl	-88(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L18:
	movl	-96(%rbp), %edx
	movl	-92(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, -84(%rbp)
	movl	-84(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-64(%rbp), %rax
	cmpq	-8(%rbp), %rax
	ja	.L17
	movl	-84(%rbp), %eax
	movl	%eax, -92(%rbp)
	jmp	.L16
.L17:
	movl	-84(%rbp), %eax
	movl	%eax, -96(%rbp)
.L16:
	movl	-96(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -92(%rbp)
	jg	.L18
	movl	-92(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cum.0(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	cum.0(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	subq	-64(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-64(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovbe	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovnb	%rdx, %rax
	movq	%rax, -72(%rbp)
	movl	-104(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	parts.1(%rip), %rax
	movq	(%rdx,%rax), %rax
	subq	%rax, -64(%rbp)
	addl	$1, -104(%rbp)
.L11:
	movl	-104(%rbp), %eax
	cmpl	-88(%rbp), %eax
	jl	.L12
	movq	-72(%rbp), %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
.LFE7:
	.size	main, .-main
	.local	parts.1
	.comm	parts.1,1600000,32
	.local	cum.0
	.comm	cum.0,1600008,32
	.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:
