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

```c
main(e,m,y,z,t){for(;scanf("%d",&e)*e;printf("%d\n",m))for(m=1e9,z=0;y=sqrt(t=e-z*z*z),t>=0;)m=fmin(m,t-y*y+y+z++);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r12d
	imull	%r12d, %eax
	testl	%eax, %eax
	je	.L13
	xorl	%eax, %eax
	movl	$1000000000, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	leal	1(%rax), %ebp
	movl	%edx, %ecx
	imull	%edx, %ecx
	cvtsi2sdl	%esi, %xmm0
	subl	%ecx, %ebx
	addl	%edx, %ebx
	addl	%eax, %ebx
	cvtsi2sdl	%ebx, %xmm1
	call	fmin@PLT
	movl	%ebp, %eax
	cvttsd2sil	%xmm0, %esi
.L7:
	movl	%eax, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	%r12d, %ebx
	imull	%eax, %edx
	imull	%eax, %edx
	subl	%edx, %ebx
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L10
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %edx
	testl	%ebx, %ebx
	jns	.L5
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	movl	%esi, 8(%rsp)
	movl	%eax, 4(%rsp)
	call	sqrt@PLT
	testl	%ebx, %ebx
	movl	4(%rsp), %eax
	movl	8(%rsp), %esi
	cvttsd2sil	%xmm0, %edx
	jns	.L5
	jmp	.L6
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r12d
	imull	%r12d, %eax
	testl	%eax, %eax
	je	.L13
	xorl	%eax, %eax
	movl	$1000000000, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	leal	1(%rax), %ebp
	movl	%edx, %ecx
	imull	%edx, %ecx
	cvtsi2sdl	%esi, %xmm0
	subl	%ecx, %ebx
	addl	%edx, %ebx
	addl	%eax, %ebx
	cvtsi2sdl	%ebx, %xmm1
	call	fmin@PLT
	movl	%ebp, %eax
	cvttsd2sil	%xmm0, %esi
.L7:
	movl	%eax, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	%r12d, %ebx
	imull	%eax, %edx
	imull	%eax, %edx
	subl	%edx, %ebx
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L10
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %edx
	testl	%ebx, %ebx
	jns	.L5
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	movl	%esi, 8(%rsp)
	movl	%eax, 4(%rsp)
	call	sqrt@PLT
	testl	%ebx, %ebx
	movl	4(%rsp), %eax
	movl	8(%rsp), %esi
	cvttsd2sil	%xmm0, %edx
	jns	.L5
	jmp	.L6
	.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r12d
	imull	%r12d, %eax
	testl	%eax, %eax
	je	.L13
	xorl	%eax, %eax
	movl	$1000000000, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	leal	1(%rax), %ebp
	movl	%edx, %ecx
	imull	%edx, %ecx
	cvtsi2sdl	%esi, %xmm0
	subl	%ecx, %ebx
	addl	%edx, %ebx
	addl	%eax, %ebx
	cvtsi2sdl	%ebx, %xmm1
	call	fmin@PLT
	movl	%ebp, %eax
	cvttsd2sil	%xmm0, %esi
.L7:
	movl	%eax, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	%r12d, %ebx
	imull	%eax, %edx
	imull	%eax, %edx
	subl	%edx, %ebx
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L10
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %edx
	testl	%ebx, %ebx
	jns	.L5
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	movl	%esi, 8(%rsp)
	movl	%eax, 4(%rsp)
	call	sqrt@PLT
	testl	%ebx, %ebx
	movl	4(%rsp), %eax
	movl	8(%rsp), %esi
	cvttsd2sil	%xmm0, %edx
	jns	.L5
	jmp	.L6
	.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:
```
```c
main(e,m,y,z,t){for(;scanf("%d",&e)*e;printf("%d\n",m))for(m=1e9,z=0;y=sqrt(t=e-z*z*z),t>=0;)m=fmin(m,t-y*y+y+z++);}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
main(e,m,y,z,t){for(;scanf("%d",&e)*e;printf("%d\n",m))for(m=1e9,z=0;y=sqrt(t=e-z*z*z),t>=0;)m=fmin(m,t-y*y+y+z++);}```

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.
Optimized Assembly Code:

1
2
4
6
300
1250
0
 1
2
4
2
300
1250
0
 1
2
4
3
300
1250
0
 1
2
4
3
76
1250
0
 1
2
4
27
557
1250
0
 1
2
4
6
300
1687
0
 1
1
4
2
300
1250
0
 1
2
5
3
300
1250
0
 1
2
3
3
76
1250
0
 1
2
4
27
266
1250
0

1
2
2
4
18
44
 1
2
2
2
18
44
 1
2
2
3
18
44
 1
2
2
3
10
44
 1
2
2
3
23
44
 1
2
2
4
18
47
 1
1
2
2
18
44
 1
2
3
3
18
44
 1
2
3
3
10
44
 1
2
2
3
14
44

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

```c
main(e,m,y,z,t){for(;scanf("%d",&e)*e;printf("%d\n",m))for(m=1e9,z=0;y=sqrt(t=e-z*z*z),t>=0;)m=fmin(m,t-y*y+y+z++);}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r12d
	imull	%r12d, %eax
	testl	%eax, %eax
	je	.L13
	xorl	%eax, %eax
	movl	$1000000000, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	leal	1(%rax), %ebp
	movl	%edx, %ecx
	imull	%edx, %ecx
	cvtsi2sdl	%esi, %xmm0
	subl	%ecx, %ebx
	addl	%edx, %ebx
	addl	%eax, %ebx
	cvtsi2sdl	%ebx, %xmm1
	call	fmin@PLT
	movl	%ebp, %eax
	cvttsd2sil	%xmm0, %esi
.L7:
	movl	%eax, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	%r12d, %ebx
	imull	%eax, %edx
	imull	%eax, %edx
	subl	%edx, %ebx
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L10
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %edx
	testl	%ebx, %ebx
	jns	.L5
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	movl	%esi, 8(%rsp)
	movl	%eax, 4(%rsp)
	call	sqrt@PLT
	testl	%ebx, %ebx
	movl	4(%rsp), %eax
	movl	8(%rsp), %esi
	cvttsd2sil	%xmm0, %edx
	jns	.L5
	jmp	.L6
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.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	.LC1(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r12d
	imull	%r12d, %eax
	testl	%eax, %eax
	je	.L13
	xorl	%eax, %eax
	movl	$1000000000, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	leal	1(%rax), %ebp
	movl	%edx, %ecx
	imull	%edx, %ecx
	cvtsi2sdl	%esi, %xmm0
	subl	%ecx, %ebx
	addl	%edx, %ebx
	addl	%eax, %ebx
	cvtsi2sdl	%ebx, %xmm1
	call	fmin@PLT
	movl	%ebp, %eax
	cvttsd2sil	%xmm0, %esi
.L7:
	movl	%eax, %edx
	pxor	%xmm0, %xmm0
	pxor	%xmm2, %xmm2
	movl	%r12d, %ebx
	imull	%eax, %edx
	imull	%eax, %edx
	subl	%edx, %ebx
	cvtsi2sdl	%ebx, %xmm0
	ucomisd	%xmm0, %xmm2
	ja	.L10
	sqrtsd	%xmm0, %xmm0
	cvttsd2sil	%xmm0, %edx
	testl	%ebx, %ebx
	jns	.L5
.L6:
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	movl	%esi, 8(%rsp)
	movl	%eax, 4(%rsp)
	call	sqrt@PLT
	testl	%ebx, %ebx
	movl	4(%rsp), %eax
	movl	8(%rsp), %esi
	cvttsd2sil	%xmm0, %edx
	jns	.L5
	jmp	.L6
	.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:
```