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

```c
#include <stdio.h>

int e;
int func(int y, int z)
{
    return e - (y * y) - (z * z * z) + y + z;
}

int main(void)
{
    while(1){
        int i, j;
        int min = 1000000;

        scanf("%d", &e);

        if(e == 0)
            break;

        for(i = 0; i <= e; i++){
            for(j = 0; j <= e; j++){
                if(i * i + j * j * j <= e){
                    int temp = func(i, j);
                    if(min > temp){
                        min = temp;
                    }
                }else{
                    break;
                }
            }
            if(i * i > e)
                break;
        }

        printf("%d\n", min);
    }

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	e(%rip), %eax
	imull	%edi, %edx
	subl	%edx, %eax
	movl	%esi, %edx
	imull	%esi, %edx
	imull	%esi, %edx
	subl	%edx, %eax
	addl	%edi, %eax
	addl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	func, .-func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	e(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	e(%rip), %esi
	testl	%esi, %esi
	je	.L12
	movl	$1000000, %r8d
	movl	$0, %edi
	js	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %r9d
	imull	%edi, %r9d
	cmpl	%r9d, %esi
	jl	.L6
	movl	%esi, %r10d
	subl	%r9d, %r10d
	leal	(%r10,%rdi), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ecx
	imull	%eax, %ecx
	imull	%eax, %ecx
	leal	(%rcx,%r9), %edx
	cmpl	%edx, %esi
	jl	.L7
	movl	%r10d, %edx
	subl	%ecx, %edx
	addl	%edi, %edx
	addl	%eax, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %eax
	cmpl	%eax, %esi
	jge	.L8
.L7:
	addl	$1, %edi
	cmpl	%edi, %esi
	jge	.L5
.L6:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L12:
	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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	e
	.bss
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.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
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	e(%rip), %eax
	imull	%edi, %edx
	subl	%edx, %eax
	movl	%esi, %edx
	imull	%esi, %edx
	imull	%esi, %edx
	subl	%edx, %eax
	addl	%edi, %eax
	addl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	func, .-func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	e(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	e(%rip), %esi
	testl	%esi, %esi
	je	.L12
	movl	$1000000, %r8d
	movl	$0, %edi
	js	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %r9d
	imull	%edi, %r9d
	cmpl	%r9d, %esi
	jl	.L6
	movl	%esi, %r10d
	subl	%r9d, %r10d
	leal	(%r10,%rdi), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ecx
	imull	%eax, %ecx
	imull	%eax, %ecx
	leal	(%rcx,%r9), %edx
	cmpl	%edx, %esi
	jl	.L7
	movl	%r10d, %edx
	subl	%ecx, %edx
	addl	%edi, %edx
	addl	%eax, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %eax
	cmpl	%eax, %esi
	jge	.L8
.L7:
	addl	$1, %edi
	cmpl	%edi, %esi
	jge	.L5
.L6:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L12:
	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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	e
	.bss
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.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
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	e(%rip), %eax
	imull	%edi, %edx
	subl	%edx, %eax
	movl	%esi, %edx
	imull	%esi, %edx
	imull	%esi, %edx
	subl	%edx, %eax
	addl	%edi, %eax
	addl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	func, .-func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	e(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	e(%rip), %esi
	testl	%esi, %esi
	je	.L12
	movl	$1000000, %r8d
	movl	$0, %edi
	js	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %r9d
	imull	%edi, %r9d
	cmpl	%r9d, %esi
	jl	.L6
	movl	%esi, %r10d
	subl	%r9d, %r10d
	leal	(%r10,%rdi), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ecx
	imull	%eax, %ecx
	imull	%eax, %ecx
	leal	(%rcx,%r9), %edx
	cmpl	%edx, %esi
	jl	.L7
	movl	%r10d, %edx
	subl	%ecx, %edx
	addl	%edi, %edx
	addl	%eax, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %eax
	cmpl	%eax, %esi
	jge	.L8
.L7:
	addl	$1, %edi
	cmpl	%edi, %esi
	jge	.L5
.L6:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L12:
	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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	e
	.bss
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.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
#include <stdio.h>

int e;
int func(int y, int z)
{
    return e - (y * y) - (z * z * z) + y + z;
}

int main(void)
{
    while(1){
        int i, j;
        int min = 1000000;

        scanf("%d", &e);

        if(e == 0)
            break;

        for(i = 0; i <= e; i++){
            for(j = 0; j <= e; j++){
                if(i * i + j * j * j <= e){
                    int temp = func(i, j);
                    if(min > temp){
                        min = temp;
                    }
                }else{
                    break;
                }
            }
            if(i * i > e)
                break;
        }

        printf("%d\n", min);
    }

    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int e;
int func(int y, int z)
{
    return e - (y * y) - (z * z * z) + y + z;
}

int main(void)
{
    while(1){
        int i, j;
        int min = 1000000;

        scanf("%d", &e);

        if(e == 0)
            break;

        for(i = 0; i <= e; i++){
            for(j = 0; j <= e; j++){
                if(i * i + j * j * j <= e){
                    int temp = func(i, j);
                    if(min > temp){
                        min = temp;
                    }
                }else{
                    break;
                }
            }
            if(i * i > e)
                break;
        }

        printf("%d\n", min);
    }

    return 0;
}```

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
#include <stdio.h>

int e;
int func(int y, int z)
{
    return e - (y * y) - (z * z * z) + y + z;
}

int main(void)
{
    while(1){
        int i, j;
        int min = 1000000;

        scanf("%d", &e);

        if(e == 0)
            break;

        for(i = 0; i <= e; i++){
            for(j = 0; j <= e; j++){
                if(i * i + j * j * j <= e){
                    int temp = func(i, j);
                    if(min > temp){
                        min = temp;
                    }
                }else{
                    break;
                }
            }
            if(i * i > e)
                break;
        }

        printf("%d\n", min);
    }

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	e(%rip), %eax
	imull	%edi, %edx
	subl	%edx, %eax
	movl	%esi, %edx
	imull	%esi, %edx
	imull	%esi, %edx
	subl	%edx, %eax
	addl	%edi, %eax
	addl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	func, .-func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	e(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	e(%rip), %esi
	testl	%esi, %esi
	je	.L12
	movl	$1000000, %r8d
	movl	$0, %edi
	js	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %r9d
	imull	%edi, %r9d
	cmpl	%r9d, %esi
	jl	.L6
	movl	%esi, %r10d
	subl	%r9d, %r10d
	leal	(%r10,%rdi), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ecx
	imull	%eax, %ecx
	imull	%eax, %ecx
	leal	(%rcx,%r9), %edx
	cmpl	%edx, %esi
	jl	.L7
	movl	%r10d, %edx
	subl	%ecx, %edx
	addl	%edi, %edx
	addl	%eax, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %eax
	cmpl	%eax, %esi
	jge	.L8
.L7:
	addl	$1, %edi
	cmpl	%edi, %esi
	jge	.L5
.L6:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L12:
	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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	e
	.bss
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.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
	.p2align 4
	.globl	func
	.type	func, @function
func:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	e(%rip), %eax
	imull	%edi, %edx
	subl	%edx, %eax
	movl	%esi, %edx
	imull	%esi, %edx
	imull	%esi, %edx
	subl	%edx, %eax
	addl	%edi, %eax
	addl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	func, .-func
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	e(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	e(%rip), %esi
	testl	%esi, %esi
	je	.L12
	movl	$1000000, %r8d
	movl	$0, %edi
	js	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edi, %r9d
	imull	%edi, %r9d
	cmpl	%r9d, %esi
	jl	.L6
	movl	%esi, %r10d
	subl	%r9d, %r10d
	leal	(%r10,%rdi), %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %ecx
	imull	%eax, %ecx
	imull	%eax, %ecx
	leal	(%rcx,%r9), %edx
	cmpl	%edx, %esi
	jl	.L7
	movl	%r10d, %edx
	subl	%ecx, %edx
	addl	%edi, %edx
	addl	%eax, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
	addl	$1, %eax
	cmpl	%eax, %esi
	jge	.L8
.L7:
	addl	$1, %edi
	cmpl	%edi, %esi
	jge	.L5
.L6:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L12:
	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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	e
	.bss
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.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:
```