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

```c
/* 
   AOJ 2012
   Space Coconut Grab
   2015/7/24
*/

#include<stdio.h>
#define ENERGY_MAX 1000000

int calc_m(int energy)
{
  int x = 0, y = 0, z = 0, min = energy, cnt = 0, i;
  /* for(z = 0; z * z * z <= energy; z++); */
  /* z--; */
  for(z = 0; z * z * z <= energy; z++)
    {
      for(y = 0; y * y <= energy - z * z * z; y++)
	{
	  x = energy - z * z * z - y * y;
	  if(min > x + y + z)
	    {
	      min = x + y + z;
	    }
	}
    }
    
  //printf("--->cnt = %d\n", cnt);
  return min;
}

int main(void)
{
  int energy, m;
  while(1)
    {
      scanf("%d", &energy);
      if(energy == 0)
	{
	  break;
	}
      m = calc_m(energy);
      printf("%d\n", m);
    }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	calc_m
	.type	calc_m, @function
calc_m:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %r8d
	movl	%edi, %r9d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r8d, %r8d
	js	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L4
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%r9d, %eax
	jle	.L2
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	calc_m, .-calc_m
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	%r9d, %r8d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r9d, %r9d
	js	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	js	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L13
.L14:
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%eax, %r9d
	jge	.L11
.L12:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	calc_m
	.type	calc_m, @function
calc_m:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %r8d
	movl	%edi, %r9d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r8d, %r8d
	js	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L4
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%r9d, %eax
	jle	.L2
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	calc_m, .-calc_m
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	%r9d, %r8d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r9d, %r9d
	js	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	js	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L13
.L14:
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%eax, %r9d
	jge	.L11
.L12:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	calc_m
	.type	calc_m, @function
calc_m:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %r8d
	movl	%edi, %r9d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r8d, %r8d
	js	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L4
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%r9d, %eax
	jle	.L2
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	calc_m, .-calc_m
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	%r9d, %r8d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r9d, %r9d
	js	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	js	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L13
.L14:
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%eax, %r9d
	jge	.L11
.L12:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
/* 
   AOJ 2012
   Space Coconut Grab
   2015/7/24
*/

#include<stdio.h>
#define ENERGY_MAX 1000000

int calc_m(int energy)
{
  int x = 0, y = 0, z = 0, min = energy, cnt = 0, i;
  /* for(z = 0; z * z * z <= energy; z++); */
  /* z--; */
  for(z = 0; z * z * z <= energy; z++)
    {
      for(y = 0; y * y <= energy - z * z * z; y++)
	{
	  x = energy - z * z * z - y * y;
	  if(min > x + y + z)
	    {
	      min = x + y + z;
	    }
	}
    }
    
  //printf("--->cnt = %d\n", cnt);
  return min;
}

int main(void)
{
  int energy, m;
  while(1)
    {
      scanf("%d", &energy);
      if(energy == 0)
	{
	  break;
	}
      m = calc_m(energy);
      printf("%d\n", m);
    }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/* 
   AOJ 2012
   Space Coconut Grab
   2015/7/24
*/

#include<stdio.h>
#define ENERGY_MAX 1000000

int calc_m(int energy)
{
  int x = 0, y = 0, z = 0, min = energy, cnt = 0, i;
  /* for(z = 0; z * z * z <= energy; z++); */
  /* z--; */
  for(z = 0; z * z * z <= energy; z++)
    {
      for(y = 0; y * y <= energy - z * z * z; y++)
	{
	  x = energy - z * z * z - y * y;
	  if(min > x + y + z)
	    {
	      min = x + y + z;
	    }
	}
    }
    
  //printf("--->cnt = %d\n", cnt);
  return min;
}

int main(void)
{
  int energy, m;
  while(1)
    {
      scanf("%d", &energy);
      if(energy == 0)
	{
	  break;
	}
      m = calc_m(energy);
      printf("%d\n", m);
    }
  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
/* 
   AOJ 2012
   Space Coconut Grab
   2015/7/24
*/

#include<stdio.h>
#define ENERGY_MAX 1000000

int calc_m(int energy)
{
  int x = 0, y = 0, z = 0, min = energy, cnt = 0, i;
  /* for(z = 0; z * z * z <= energy; z++); */
  /* z--; */
  for(z = 0; z * z * z <= energy; z++)
    {
      for(y = 0; y * y <= energy - z * z * z; y++)
	{
	  x = energy - z * z * z - y * y;
	  if(min > x + y + z)
	    {
	      min = x + y + z;
	    }
	}
    }
    
  //printf("--->cnt = %d\n", cnt);
  return min;
}

int main(void)
{
  int energy, m;
  while(1)
    {
      scanf("%d", &energy);
      if(energy == 0)
	{
	  break;
	}
      m = calc_m(energy);
      printf("%d\n", m);
    }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	calc_m
	.type	calc_m, @function
calc_m:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %r8d
	movl	%edi, %r9d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r8d, %r8d
	js	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L4
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%r9d, %eax
	jle	.L2
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	calc_m, .-calc_m
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	%r9d, %r8d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r9d, %r9d
	js	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	js	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L13
.L14:
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%eax, %r9d
	jge	.L11
.L12:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	calc_m
	.type	calc_m, @function
calc_m:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%edi, %r8d
	movl	%edi, %r9d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r8d, %r8d
	js	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L4
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%r9d, %eax
	jle	.L2
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	calc_m, .-calc_m
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	.LC0(%rip), %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r9d
	testl	%r9d, %r9d
	je	.L10
	movl	%r9d, %r8d
	xorl	%eax, %eax
	xorl	%edi, %edi
	testl	%r9d, %r9d
	js	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r9d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	subl	%eax, %esi
	js	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	movl	%esi, %eax
	subl	%ecx, %eax
	addl	%edx, %eax
	addl	%edi, %eax
	cmpl	%eax, %r8d
	cmovg	%eax, %r8d
	addl	$1, %edx
	movl	%edx, %ecx
	imull	%edx, %ecx
	cmpl	%esi, %ecx
	jle	.L13
.L14:
	addl	$1, %edi
	movl	%edi, %eax
	imull	%edi, %eax
	imull	%edi, %eax
	cmpl	%eax, %r9d
	jge	.L11
.L12:
	movl	%r8d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:
```