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 max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}

// <arr[0]> <arr[1]> .. <arr[size-1]>
int fget_array(int *arr, int size) {
    int i;
    for(i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }
    return 0;
}

#define NUM_MAX 100000
#define INF (NUM_MAX+1)


int main(void) {
    int num, llimit;
    int arr[NUM_MAX];

    get_int2(&num, &llimit);
    fget_array(arr, num);

    int left;
    int right = 0;
    int sum = 0;
    int ans = INF;
    for(left = 0; left < num; left++) {
        for(; right < num; right++) {
            if(sum >= llimit) break;
            sum += arr[right];
        }
        // no need to search
        if(sum < llimit) break;
#ifdef DEBUG
        printf("%d %d -> %d\n", left, right, sum);
#endif
        ans = min(ans, right-left);
        sum -= arr[left];
    }
    printf("%d\n", ans == INF ? 0 : ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fget_array
	.type	fget_array, @function
fget_array:
.LFB7:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fget_array, .-fget_array
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-400040(%rbp), %edx
	leaq	-400016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	fget_array
	movl	$0, -400028(%rbp)
	movl	$0, -400024(%rbp)
	movl	$100001, -400020(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jge	.L20
	movl	-400028(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%eax, -400024(%rbp)
	addl	$1, -400028(%rbp)
.L9:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400028(%rbp)
	jl	.L12
	jmp	.L11
.L20:
	nop
.L11:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L21
	movl	-400028(%rbp), %eax
	subl	-400032(%rbp), %eax
	movl	-400020(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	subl	%eax, -400024(%rbp)
	addl	$1, -400032(%rbp)
.L8:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L9
	jmp	.L14
.L21:
	nop
.L14:
	cmpl	$100001, -400020(%rbp)
	je	.L16
	movl	-400020(%rbp), %eax
	jmp	.L17
.L16:
	movl	$0, %eax
.L17:
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rsi, %rdx
	xorl	%eax, %eax
	movq	%rdi, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_int2, .-get_int2
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fget_array
	.type	fget_array, @function
fget_array:
.LFB52:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L9
	leal	-1(%rsi), %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	4(%rdi,%rax,4), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L6
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fget_array, .-fget_array
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L27
	leaq	16(%rsp), %rbx
	subl	$1, %eax
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	leaq	20(%rsp,%rax,4), %r14
	movq	%rbx, %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbp
	jne	.L14
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L27
	movl	12(%rsp), %edi
	movl	$100001, %r10d
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, %edx
	cmpl	%r8d, %esi
	jle	.L25
.L42:
	movslq	%r8d, %rdx
	leaq	(%rbx,%rdx,4), %rcx
	movl	%r8d, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %edx
	addl	(%rcx), %eax
	addq	$4, %rcx
	cmpl	%esi, %edx
	je	.L40
.L17:
	cmpl	%eax, %edi
	jg	.L41
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addl	$1, %r9d
	subl	(%r12), %eax
	cmpl	%r9d, %esi
	je	.L20
	movl	%edx, %r8d
	addq	$4, %r12
	movl	%r8d, %edx
	cmpl	%r8d, %esi
	jg	.L42
.L25:
	cmpl	%eax, %edi
	jg	.L20
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addl	$1, %r9d
	subl	(%r12), %eax
	cmpl	%esi, %r9d
	je	.L20
	addq	$4, %r12
	cmpl	%r8d, %esi
	jle	.L37
	movl	%edx, %r8d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%esi, %edx
	cmpl	%eax, %edi
	jle	.L43
.L20:
	cmpl	$100001, %r10d
	je	.L27
.L26:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L26
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB53:
.L37:
	.cfi_def_cfa_offset 400080
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movslq	%r9d, %r9
.L22:
	cmpl	%eax, %edi
	jg	.L20
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	subl	(%rbx,%r9,4), %eax
	addq	$1, %r9
	cmpl	%r9d, %esi
	jg	.L22
	jmp	.L20
	.cfi_endproc
.LFE53:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 %d"
	.text
	.p2align 4
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	movq	%rsi, %rdx
	xorl	%eax, %eax
	movq	%rdi, %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	get_int2, .-get_int2
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	fget_array
	.type	fget_array, @function
fget_array:
.LFB52:
	.cfi_startproc
	endbr64
	testl	%esi, %esi
	jle	.L9
	leal	-1(%rsi), %eax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	4(%rdi,%rax,4), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L6
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	fget_array, .-fget_array
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2720, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	jle	.L27
	leaq	16(%rsp), %rbx
	subl	$1, %eax
	leaq	.LC1(%rip), %r13
	movq	%rbx, %r12
	leaq	20(%rsp,%rax,4), %r14
	movq	%rbx, %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbp
	jne	.L14
	movl	8(%rsp), %esi
	testl	%esi, %esi
	jle	.L27
	movl	12(%rsp), %edi
	movl	$100001, %r10d
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%r8d, %edx
	cmpl	%r8d, %esi
	jle	.L25
.L42:
	movslq	%r8d, %rdx
	leaq	(%rbx,%rdx,4), %rcx
	movl	%r8d, %edx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %edx
	addl	(%rcx), %eax
	addq	$4, %rcx
	cmpl	%esi, %edx
	je	.L40
.L17:
	cmpl	%eax, %edi
	jg	.L41
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addl	$1, %r9d
	subl	(%r12), %eax
	cmpl	%r9d, %esi
	je	.L20
	movl	%edx, %r8d
	addq	$4, %r12
	movl	%r8d, %edx
	cmpl	%r8d, %esi
	jg	.L42
.L25:
	cmpl	%eax, %edi
	jg	.L20
	.p2align 4,,10
	.p2align 3
.L43:
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	addl	$1, %r9d
	subl	(%r12), %eax
	cmpl	%esi, %r9d
	je	.L20
	addq	$4, %r12
	cmpl	%r8d, %esi
	jle	.L37
	movl	%edx, %r8d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L40:
	movl	%esi, %edx
	cmpl	%eax, %edi
	jle	.L43
.L20:
	cmpl	$100001, %r10d
	je	.L27
.L26:
	xorl	%eax, %eax
	movl	%r10d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$400032, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	xorl	%r10d, %r10d
	jmp	.L26
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB53:
.L37:
	.cfi_def_cfa_offset 400080
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	movslq	%r9d, %r9
.L22:
	cmpl	%eax, %edi
	jg	.L20
	movl	%edx, %ecx
	subl	%r9d, %ecx
	cmpl	%ecx, %r10d
	cmovg	%ecx, %r10d
	subl	(%rbx,%r9,4), %eax
	addq	$1, %r9
	cmpl	%r9d, %esi
	jg	.L22
	jmp	.L20
	.cfi_endproc
.LFE53:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.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 max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}

// <arr[0]> <arr[1]> .. <arr[size-1]>
int fget_array(int *arr, int size) {
    int i;
    for(i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }
    return 0;
}

#define NUM_MAX 100000
#define INF (NUM_MAX+1)


int main(void) {
    int num, llimit;
    int arr[NUM_MAX];

    get_int2(&num, &llimit);
    fget_array(arr, num);

    int left;
    int right = 0;
    int sum = 0;
    int ans = INF;
    for(left = 0; left < num; left++) {
        for(; right < num; right++) {
            if(sum >= llimit) break;
            sum += arr[right];
        }
        // no need to search
        if(sum < llimit) break;
#ifdef DEBUG
        printf("%d %d -> %d\n", left, right, sum);
#endif
        ans = min(ans, right-left);
        sum -= arr[left];
    }
    printf("%d\n", ans == INF ? 0 : ans);
    return 0;
}

6 4
1 2 0 2 3 2
 6 6
1 2 1 2 1 2
 6 5
1 2 0 2 2 2
 6 5
1 2 0 0 2 2
 6 5
1 0 0 0 2 2
 6 5
0 0 0 0 2 2
 6 4
1 2 1 2 6 2
 6 5
1 2 0 2 3 2
 6 6
1 1 1 2 1 2
 6 5
0 0 0 1 2 2

2
 4
 3
 5
 6
 0
 1
 2
 4
 3

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 max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))

int get_int2(int *a1, int *a2) {
  scanf("%d %d", a1, a2);
  return 0;
}

// <arr[0]> <arr[1]> .. <arr[size-1]>
int fget_array(int *arr, int size) {
    int i;
    for(i = 0; i < size; i++) {
        scanf("%d", &arr[i]);
    }
    return 0;
}

#define NUM_MAX 100000
#define INF (NUM_MAX+1)


int main(void) {
    int num, llimit;
    int arr[NUM_MAX];

    get_int2(&num, &llimit);
    fget_array(arr, num);

    int left;
    int right = 0;
    int sum = 0;
    int ans = INF;
    for(left = 0; left < num; left++) {
        for(; right < num; right++) {
            if(sum >= llimit) break;
            sum += arr[right];
        }
        // no need to search
        if(sum < llimit) break;
#ifdef DEBUG
        printf("%d %d -> %d\n", left, right, sum);
#endif
        ans = min(ans, right-left);
        sum -= arr[left];
    }
    printf("%d\n", ans == INF ? 0 : ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fget_array
	.type	fget_array, @function
fget_array:
.LFB7:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fget_array, .-fget_array
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-400040(%rbp), %edx
	leaq	-400016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	fget_array
	movl	$0, -400028(%rbp)
	movl	$0, -400024(%rbp)
	movl	$100001, -400020(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jge	.L20
	movl	-400028(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%eax, -400024(%rbp)
	addl	$1, -400028(%rbp)
.L9:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400028(%rbp)
	jl	.L12
	jmp	.L11
.L20:
	nop
.L11:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L21
	movl	-400028(%rbp), %eax
	subl	-400032(%rbp), %eax
	movl	-400020(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	subl	%eax, -400024(%rbp)
	addl	$1, -400032(%rbp)
.L8:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L9
	jmp	.L14
.L21:
	nop
.L14:
	cmpl	$100001, -400020(%rbp)
	je	.L16
	movl	-400020(%rbp), %eax
	jmp	.L17
.L16:
	movl	$0, %eax
.L17:
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
	.text
	.globl	get_int2
	.type	get_int2, @function
get_int2:
.LFB6:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_int2, .-get_int2
	.section	.rodata
.LC1:
	.string	"%d"
	.text
	.globl	fget_array
	.type	fget_array, @function
fget_array:
.LFB7:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L4
.L5:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L5
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fget_array, .-fget_array
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2736, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400036(%rbp), %rdx
	leaq	-400040(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	get_int2
	movl	-400040(%rbp), %edx
	leaq	-400016(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	fget_array
	movl	$0, -400028(%rbp)
	movl	$0, -400024(%rbp)
	movl	$100001, -400020(%rbp)
	movl	$0, -400032(%rbp)
	jmp	.L8
.L12:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jge	.L20
	movl	-400028(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	addl	%eax, -400024(%rbp)
	addl	$1, -400028(%rbp)
.L9:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400028(%rbp)
	jl	.L12
	jmp	.L11
.L20:
	nop
.L11:
	movl	-400036(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L21
	movl	-400028(%rbp), %eax
	subl	-400032(%rbp), %eax
	movl	-400020(%rbp), %edx
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400032(%rbp), %eax
	cltq
	movl	-400016(%rbp,%rax,4), %eax
	subl	%eax, -400024(%rbp)
	addl	$1, -400032(%rbp)
.L8:
	movl	-400040(%rbp), %eax
	cmpl	%eax, -400032(%rbp)
	jl	.L9
	jmp	.L14
.L21:
	nop
.L14:
	cmpl	$100001, -400020(%rbp)
	je	.L16
	movl	-400020(%rbp), %eax
	jmp	.L17
.L16:
	movl	$0, %eax
.L17:
	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	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
