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>

int minof(int min, int x) {
  min = (min < x) ? min:x;
  return min;
}

int slovei(int, int);
int slovei(int a, int b) {
  int i, j, k, l, o, p, min, temp, d[4] = {}; 
  min = 268435456; 
  for(i = 1; i <= a; i += 1) {
    if(a % i == 0) {
      for(k = 1; k <= b; k += 1) {
        if(b % k == 0) {
          j = a / i;
          d[0] = i;
          d[1] = j;
          l = b / k;
          d[2] = k;
          d[3] = l;
          for(o = 0; o < 3; o += 1) {
            for(p = 3; p >= o; p -= 1) {
              if(d[p] < d[p - 1]) {
               temp = d[p];
               d[p] = d[p - 1]; 
               d[p - 1] = temp;
              };  
            };  
          };  
          min = minof(min, (d[1] - d[0]) * (d[1] - d[0]) + (d[2] - d[1]) * (d[2] - d[1]) + (d[3] - d[2]) * (d[3] - d[2]));
        };  
      };  
    };  
  };  
  return min;
}

int main() {
  int a, b;

  while(1) {
    scanf("%d %d", &a, &b);
    if(a == 0 && b == 0) {
      break;
    };  
    printf("%d\n", slovei(a, b));
  };

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	minof
	.type	minof, @function
minof:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	minof, .-minof
	.globl	slovei
	.type	slovei, @function
slovei:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movl	%edi, -68(%rbp)
	movl	%esi, -72(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$268435456, -48(%rbp)
	movl	$1, -64(%rbp)
	jmp	.L4
.L14:
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$1, -60(%rbp)
	jmp	.L6
.L13:
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%eax, -40(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -56(%rbp)
	jmp	.L8
.L12:
	movl	$3, -52(%rbp)
	jmp	.L9
.L11:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L10:
	subl	$1, -52(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jge	.L11
	addl	$1, -56(%rbp)
.L8:
	cmpl	$2, -56(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	imull	%edx, %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-48(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	minof
	movl	%eax, -48(%rbp)
.L7:
	addl	$1, -60(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	-72(%rbp), %eax
	jle	.L13
.L5:
	addl	$1, -64(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jle	.L14
	movl	-48(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slovei, .-slovei
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-12(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L18:
	movl	-12(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	slovei
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.p2align 4
	.globl	minof
	.type	minof, @function
minof:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	minof, .-minof
	.p2align 4
	.globl	slovei
	.type	slovei, @function
slovei:
.LFB24:
	.cfi_startproc
	endbr64
	movl	$268435456, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	slovei, .-slovei
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	movq	%rsp, %rbp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	call	slovei
	movq	%r13, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edi
	movl	4(%rsp), %esi
	movl	%edi, %eax
	orl	%esi, %eax
	jne	.L9
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	minof
	.type	minof, @function
minof:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	minof, .-minof
	.p2align 4
	.globl	slovei
	.type	slovei, @function
slovei:
.LFB24:
	.cfi_startproc
	endbr64
	movl	$268435456, %eax
	ret
	.cfi_endproc
.LFE24:
	.size	slovei, .-slovei
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %r12
	movq	%rsp, %rbp
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	call	slovei
	movq	%r13, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L6:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%r12, %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %edi
	movl	4(%rsp), %esi
	movl	%edi, %eax
	orl	%esi, %eax
	jne	.L9
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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>

int minof(int min, int x) {
  min = (min < x) ? min:x;
  return min;
}

int slovei(int, int);
int slovei(int a, int b) {
  int i, j, k, l, o, p, min, temp, d[4] = {}; 
  min = 268435456; 
  for(i = 1; i <= a; i += 1) {
    if(a % i == 0) {
      for(k = 1; k <= b; k += 1) {
        if(b % k == 0) {
          j = a / i;
          d[0] = i;
          d[1] = j;
          l = b / k;
          d[2] = k;
          d[3] = l;
          for(o = 0; o < 3; o += 1) {
            for(p = 3; p >= o; p -= 1) {
              if(d[p] < d[p - 1]) {
               temp = d[p];
               d[p] = d[p - 1]; 
               d[p - 1] = temp;
              };  
            };  
          };  
          min = minof(min, (d[1] - d[0]) * (d[1] - d[0]) + (d[2] - d[1]) * (d[2] - d[1]) + (d[3] - d[2]) * (d[3] - d[2]));
        };  
      };  
    };  
  };  
  return min;
}

int main() {
  int a, b;

  while(1) {
    scanf("%d %d", &a, &b);
    if(a == 0 && b == 0) {
      break;
    };  
    printf("%d\n", slovei(a, b));
  };

  return 0;
}
66 40
57 144
0 0
 66 40
57 41
0 0
 66 40
108 41
0 0
 66 65
108 41
0 0
 132 65
108 41
0 0
 77 65
108 41
0 0
 33 39
57 144
0 0
 66 40
52 144
0 0
 66 40
57 51
0 0
 104 40
108 41
0 0

14
94
 14
744
 14
698
 30
698
 38
698
 24
698
 68
94
 14
50
 14
200
 29
698

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>

int minof(int min, int x) {
  min = (min < x) ? min:x;
  return min;
}

int slovei(int, int);
int slovei(int a, int b) {
  int i, j, k, l, o, p, min, temp, d[4] = {}; 
  min = 268435456; 
  for(i = 1; i <= a; i += 1) {
    if(a % i == 0) {
      for(k = 1; k <= b; k += 1) {
        if(b % k == 0) {
          j = a / i;
          d[0] = i;
          d[1] = j;
          l = b / k;
          d[2] = k;
          d[3] = l;
          for(o = 0; o < 3; o += 1) {
            for(p = 3; p >= o; p -= 1) {
              if(d[p] < d[p - 1]) {
               temp = d[p];
               d[p] = d[p - 1]; 
               d[p - 1] = temp;
              };  
            };  
          };  
          min = minof(min, (d[1] - d[0]) * (d[1] - d[0]) + (d[2] - d[1]) * (d[2] - d[1]) + (d[3] - d[2]) * (d[3] - d[2]));
        };  
      };  
    };  
  };  
  return min;
}

int main() {
  int a, b;

  while(1) {
    scanf("%d %d", &a, &b);
    if(a == 0 && b == 0) {
      break;
    };  
    printf("%d\n", slovei(a, b));
  };

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	minof
	.type	minof, @function
minof:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	minof, .-minof
	.globl	slovei
	.type	slovei, @function
slovei:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movl	%edi, -68(%rbp)
	movl	%esi, -72(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$268435456, -48(%rbp)
	movl	$1, -64(%rbp)
	jmp	.L4
.L14:
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$1, -60(%rbp)
	jmp	.L6
.L13:
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%eax, -40(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -56(%rbp)
	jmp	.L8
.L12:
	movl	$3, -52(%rbp)
	jmp	.L9
.L11:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L10:
	subl	$1, -52(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jge	.L11
	addl	$1, -56(%rbp)
.L8:
	cmpl	$2, -56(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	imull	%edx, %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-48(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	minof
	movl	%eax, -48(%rbp)
.L7:
	addl	$1, -60(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	-72(%rbp), %eax
	jle	.L13
.L5:
	addl	$1, -64(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jle	.L14
	movl	-48(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slovei, .-slovei
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-12(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L18:
	movl	-12(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	slovei
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.globl	minof
	.type	minof, @function
minof:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	minof, .-minof
	.globl	slovei
	.type	slovei, @function
slovei:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movl	%edi, -68(%rbp)
	movl	%esi, -72(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$268435456, -48(%rbp)
	movl	$1, -64(%rbp)
	jmp	.L4
.L14:
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L5
	movl	$1, -60(%rbp)
	jmp	.L6
.L13:
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-68(%rbp), %eax
	cltd
	idivl	-64(%rbp)
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-72(%rbp), %eax
	cltd
	idivl	-60(%rbp)
	movl	%eax, -40(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	$0, -56(%rbp)
	jmp	.L8
.L12:
	movl	$3, -52(%rbp)
	jmp	.L9
.L11:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L10
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movl	%eax, -36(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-32(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-36(%rbp), %edx
	movl	%edx, -32(%rbp,%rax,4)
.L10:
	subl	$1, -52(%rbp)
.L9:
	movl	-52(%rbp), %eax
	cmpl	-56(%rbp), %eax
	jge	.L11
	addl	$1, -56(%rbp)
.L8:
	cmpl	$2, -56(%rbp)
	jle	.L12
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %ecx
	subl	%ecx, %eax
	movl	%edx, %ecx
	imull	%eax, %ecx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	movl	-28(%rbp), %esi
	subl	%esi, %eax
	imull	%edx, %eax
	leal	(%rcx,%rax), %esi
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	movl	-24(%rbp), %ecx
	subl	%ecx, %eax
	imull	%edx, %eax
	leal	(%rsi,%rax), %edx
	movl	-48(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	minof
	movl	%eax, -48(%rbp)
.L7:
	addl	$1, -60(%rbp)
.L6:
	movl	-60(%rbp), %eax
	cmpl	-72(%rbp), %eax
	jle	.L13
.L5:
	addl	$1, -64(%rbp)
.L4:
	movl	-64(%rbp), %eax
	cmpl	-68(%rbp), %eax
	jle	.L14
	movl	-48(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	slovei, .-slovei
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L20:
	leaq	-12(%rbp), %rdx
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-16(%rbp), %eax
	testl	%eax, %eax
	jne	.L18
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	.L24
.L18:
	movl	-12(%rbp), %edx
	movl	-16(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	slovei
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L20
.L24:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
