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 <math.h>

int main(void)
{
    long long n;
    long long ans = 0;
    scanf("%lld", &n);
    long long inf = sqrtl(n+1)-1;
    for (long long i = 1; i <= inf; i++)
    {
        if(n%i == 0)
        {
            ans +=  n/i - 1;
        }
    }

    printf("%lld\n", ans);
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -64(%rbp)
	fildq	-64(%rbp)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fld1
	fsubrp	%st, %st(1)
	fnstcw	-50(%rbp)
	movzwl	-50(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -52(%rbp)
	fldcw	-52(%rbp)
	fistpq	-16(%rbp)
	fldcw	-50(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L2
.L4:
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L3
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	subq	$1, %rax
	addq	%rax, -32(%rbp)
.L3:
	addq	$1, -24(%rbp)
.L2:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	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	.L7
	call	__stack_chk_fail@PLT
.L7:
	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	"%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	leaq	1(%rbx), %rax
	movq	%rax, (%rsp)
	fildq	(%rsp)
	fldz
	fucomip	%st(1), %st
	ja	.L12
	fsqrt
.L4:
	fnstcw	14(%rsp)
	fld1
	fsubrp	%st, %st(1)
	movzwl	14(%rsp), %eax
	orb	$12, %ah
	movw	%ax, 12(%rsp)
	fldcw	12(%rsp)
	fistpq	(%rsp)
	fldcw	14(%rsp)
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L9
	addq	$1, %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	leaq	-1(%r8,%rax), %rax
	cmove	%rax, %r8
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
.L12:
	pushq	%rax
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	fstpt	(%rsp)
	call	sqrtl@PLT
	popq	%rdx
	.cfi_def_cfa_offset 56
	popq	%rcx
	.cfi_def_cfa_offset 48
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC0(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	leaq	1(%rbx), %rax
	movq	%rax, (%rsp)
	fildq	(%rsp)
	fldz
	fucomip	%st(1), %st
	ja	.L12
	fsqrt
.L4:
	fnstcw	14(%rsp)
	fld1
	fsubrp	%st, %st(1)
	movzwl	14(%rsp), %eax
	orb	$12, %ah
	movw	%ax, 12(%rsp)
	fldcw	12(%rsp)
	fistpq	(%rsp)
	fldcw	14(%rsp)
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L9
	addq	$1, %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	leaq	-1(%r8,%rax), %rax
	cmove	%rax, %r8
	addq	$1, %rcx
	cmpq	%rcx, %rsi
	jne	.L7
.L5:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L5
.L12:
	pushq	%rax
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	fstpt	(%rsp)
	call	sqrtl@PLT
	popq	%rdx
	.cfi_def_cfa_offset 56
	popq	%rcx
	.cfi_def_cfa_offset 48
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>
#include <math.h>

int main(void)
{
    long long n;
    long long ans = 0;
    scanf("%lld", &n);
    long long inf = sqrtl(n+1)-1;
    for (long long i = 1; i <= inf; i++)
    {
        if(n%i == 0)
        {
            ans +=  n/i - 1;
        }
    }

    printf("%lld\n", ans);
    
    return 0;
}
1000010000000
 1000011000000
 1100011000000
 1110011000000
 1110011100000
 1110011100100
 1110111100100
 1110111100101
 1110111000101
 1010111000101

2716922731275
 3307289212967
 2999416055122
 3146654438234
 4080876601631
 2753043984264
 2417637625420
 1603984026418
 1113798127512
 1185123120376

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 <math.h>

int main(void)
{
    long long n;
    long long ans = 0;
    scanf("%lld", &n);
    long long inf = sqrtl(n+1)-1;
    for (long long i = 1; i <= inf; i++)
    {
        if(n%i == 0)
        {
            ans +=  n/i - 1;
        }
    }

    printf("%lld\n", ans);
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -64(%rbp)
	fildq	-64(%rbp)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fld1
	fsubrp	%st, %st(1)
	fnstcw	-50(%rbp)
	movzwl	-50(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -52(%rbp)
	fldcw	-52(%rbp)
	fistpq	-16(%rbp)
	fldcw	-50(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L2
.L4:
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L3
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	subq	$1, %rax
	addq	%rax, -32(%rbp)
.L3:
	addq	$1, -24(%rbp)
.L2:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	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	.L7
	call	__stack_chk_fail@PLT
.L7:
	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
	.section	.rodata
.LC0:
	.string	"%lld"
.LC2:
	.string	"%lld\n"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -64(%rbp)
	fildq	-64(%rbp)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	sqrtl@PLT
	addq	$16, %rsp
	fld1
	fsubrp	%st, %st(1)
	fnstcw	-50(%rbp)
	movzwl	-50(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -52(%rbp)
	fldcw	-52(%rbp)
	fistpq	-16(%rbp)
	fldcw	-50(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L2
.L4:
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L3
	movq	-40(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	subq	$1, %rax
	addq	%rax, -32(%rbp)
.L3:
	addq	$1, -24(%rbp)
.L2:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	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	.L7
	call	__stack_chk_fail@PLT
.L7:
	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:
