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 main(void){
	int x,y,z,max,ans,t;
	while(1){
		scanf("%d",&z);
		if(!z)
			break;
		max=0;
		for(x=1;x<1111;x++){
			for(y=1;y<1111;y++){
				t=x*x*x+y*y*y;
				if(t<=z*z*z&&max<t){
					max=t;
				}
				else if(t>z*z*z)
					break;
			}
		}
		printf("%d\n",z*z*z-max);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
.L7:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	imull	%eax, %edi
	imull	%eax, %edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r8d
	cmpl	$1111, %r8d
	je	.L6
.L3:
	movl	%r8d, %esi
	movl	$1, %edx
	imull	%r8d, %esi
	imull	%r8d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cmpl	%eax, %edi
	jl	.L4
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	addl	$1, %edx
	cmpl	$1111, %edx
	jne	.L5
	addl	$1, %r8d
	cmpl	$1111, %r8d
	jne	.L3
.L6:
	subl	%ecx, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L7
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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:
```

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
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
.L7:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	imull	%eax, %edi
	imull	%eax, %edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r8d
	cmpl	$1111, %r8d
	je	.L6
.L3:
	movl	%r8d, %esi
	movl	$1, %edx
	imull	%r8d, %esi
	imull	%r8d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cmpl	%eax, %edi
	jl	.L4
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	addl	$1, %edx
	cmpl	$1111, %edx
	jne	.L5
	addl	$1, %r8d
	cmpl	$1111, %r8d
	jne	.L3
.L6:
	subl	%ecx, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L7
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
.L7:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	imull	%eax, %edi
	imull	%eax, %edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r8d
	cmpl	$1111, %r8d
	je	.L6
.L3:
	movl	%r8d, %esi
	movl	$1, %edx
	imull	%r8d, %esi
	imull	%r8d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cmpl	%eax, %edi
	jl	.L4
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	addl	$1, %edx
	cmpl	$1111, %edx
	jne	.L5
	addl	$1, %r8d
	cmpl	$1111, %r8d
	jne	.L3
.L6:
	subl	%ecx, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L7
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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:
```
```c
#include <stdio.h>
int main(void){
	int x,y,z,max,ans,t;
	while(1){
		scanf("%d",&z);
		if(!z)
			break;
		max=0;
		for(x=1;x<1111;x++){
			for(y=1;y<1111;y++){
				t=x*x*x+y*y*y;
				if(t<=z*z*z&&max<t){
					max=t;
				}
				else if(t>z*z*z)
					break;
			}
		}
		printf("%d\n",z*z*z-max);
	}
	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 main(void){
	int x,y,z,max,ans,t;
	while(1){
		scanf("%d",&z);
		if(!z)
			break;
		max=0;
		for(x=1;x<1111;x++){
			for(y=1;y<1111;y++){
				t=x*x*x+y*y*y;
				if(t<=z*z*z&&max<t){
					max=t;
				}
				else if(t>z*z*z)
					break;
			}
		}
		printf("%d\n",z*z*z-max);
	}
	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:

6
6
2
0
 6
6
0
0
 6
4
4
0
 6
4
0
-1
 6
5
2
0
 6
0
0
1
 6
3
2
0
 6
5
0
1
 6
7
4
0
 6
2
2
0

27
27
6
 27
27
 27
10
10
 27
10
 27
34
6
 27
 27
11
6
 27
34
 27
2
10
 27
6
6

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 main(void){
	int x,y,z,max,ans,t;
	while(1){
		scanf("%d",&z);
		if(!z)
			break;
		max=0;
		for(x=1;x<1111;x++){
			for(y=1;y<1111;y++){
				t=x*x*x+y*y*y;
				if(t<=z*z*z&&max<t){
					max=t;
				}
				else if(t>z*z*z)
					break;
			}
		}
		printf("%d\n",z*z*z-max);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
.L7:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	imull	%eax, %edi
	imull	%eax, %edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r8d
	cmpl	$1111, %r8d
	je	.L6
.L3:
	movl	%r8d, %esi
	movl	$1, %edx
	imull	%r8d, %esi
	imull	%r8d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cmpl	%eax, %edi
	jl	.L4
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	addl	$1, %edx
	cmpl	$1111, %edx
	jne	.L5
	addl	$1, %r8d
	cmpl	$1111, %r8d
	jne	.L3
.L6:
	subl	%ecx, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L7
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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:
```

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
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC1(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
.L7:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	movl	%eax, %edi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	imull	%eax, %edi
	imull	%eax, %edi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r8d
	cmpl	$1111, %r8d
	je	.L6
.L3:
	movl	%r8d, %esi
	movl	$1, %edx
	imull	%r8d, %esi
	imull	%r8d, %esi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%edx, %eax
	imull	%edx, %eax
	imull	%edx, %eax
	addl	%esi, %eax
	cmpl	%eax, %edi
	jl	.L4
	cmpl	%eax, %ecx
	cmovl	%eax, %ecx
	addl	$1, %edx
	cmpl	$1111, %edx
	jne	.L5
	addl	$1, %r8d
	cmpl	$1111, %r8d
	jne	.L3
.L6:
	subl	%ecx, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	%edi, %edx
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L7
.L2:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	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:
```