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>

long max(long a, long b){
  if(a > b) return a;
  else return b;
}

long min(long a, long b){
  if(a < b) return a;
  else return b;
}

int f(long a,long b){

  long c = max(a,b);
  int keta = 1;
  for(int i = 0; i < 10; ++i){
    if( c/10 > 0 ){
      keta ++;
      c /= 10;
    }
  }
  return keta;
}

int main(){

  long n;
  int minimum = 11;
  scanf("%ld",&n);
  for(long a = 1; a*a <= n ; ++a){
    long b = 0;
    if( n % a == 0 ){
      b = n/a;
      b = f(a,b);
      minimum = min(minimum,b);
    }
  }
  printf("%ld",minimum);
  return 0;

}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L5
	movq	-8(%rbp), %rax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	f
	.type	f, @function
f:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max
	movq	%rax, -8(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L8
.L10:
	cmpq	$9, -8(%rbp)
	jle	.L9
	addl	$1, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
.L9:
	addl	$1, -12(%rbp)
.L8:
	cmpl	$9, -12(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$11, -36(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -24(%rbp)
	jmp	.L13
.L15:
	movq	$0, -16(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L14
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	f
	cltq
	movq	%rax, -16(%rbp)
	movl	-36(%rbp), %eax
	cltq
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min
	movl	%eax, -36(%rbp)
.L14:
	addq	$1, -24(%rbp)
.L13:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L15
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB25:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movl	$1, %eax
	cmovl	%rsi, %rdi
	cmpq	$9, %rdi
	jle	.L4
	movl	$2, %eax
	cmpq	$99, %rdi
	jle	.L4
	movl	$3, %eax
	cmpq	$999, %rdi
	jle	.L4
	movl	$4, %eax
	cmpq	$9999, %rdi
	jle	.L4
	movl	$5, %eax
	cmpq	$99999, %rdi
	jle	.L4
	movl	$6, %eax
	cmpq	$999999, %rdi
	jle	.L4
	movl	$7, %eax
	cmpq	$9999999, %rdi
	jle	.L4
	movl	$8, %eax
	cmpq	$99999999, %rdi
	jle	.L4
	movl	$9, %eax
	cmpq	$999999999, %rdi
	jle	.L4
	movabsq	$9999999999, %rax
	cmpq	%rax, %rdi
	setg	%al
	movzbl	%al, %eax
	addl	$10, %eax
.L4:
	ret
	.cfi_endproc
.LFE25:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L25
	movl	$1, %ecx
	movl	$11, %r8d
	movabsq	$9999999999, %rdi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cmpq	%rsi, %rax
	jg	.L20
.L23:
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L21
	cmpq	%rcx, %rax
	movl	$1, %edx
	cmovl	%rcx, %rax
	cmpq	$9, %rax
	jle	.L22
	cmpq	$99, %rax
	jle	.L27
	cmpq	$999, %rax
	jle	.L28
	cmpq	$9999, %rax
	jle	.L29
	cmpq	$99999, %rax
	jle	.L30
	cmpq	$999999, %rax
	jle	.L31
	cmpq	$9999999, %rax
	jle	.L32
	cmpq	$99999999, %rax
	jle	.L33
	cmpq	$999999999, %rax
	jle	.L34
	xorl	%edx, %edx
	cmpq	%rdi, %rax
	setg	%dl
	addq	$10, %rdx
.L22:
	movslq	%r8d, %rax
	cmpq	%rdx, %rax
	cmovle	%rax, %rdx
	addq	$1, %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	movq	%rdx, %r8
	cmpq	%rsi, %rax
	jle	.L23
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	movl	$11, %r8d
	jmp	.L20
.L27:
	movl	$2, %edx
	jmp	.L22
.L38:
	call	__stack_chk_fail@PLT
.L34:
	movl	$9, %edx
	jmp	.L22
.L33:
	movl	$8, %edx
	jmp	.L22
.L32:
	movl	$7, %edx
	jmp	.L22
.L31:
	movl	$6, %edx
	jmp	.L22
.L30:
	movl	$5, %edx
	jmp	.L22
.L29:
	movl	$4, %edx
	jmp	.L22
.L28:
	movl	$3, %edx
	jmp	.L22
	.cfi_endproc
.LFE26:
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.p2align 4
	.globl	f
	.type	f, @function
f:
.LFB25:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movl	$1, %eax
	cmovl	%rsi, %rdi
	cmpq	$9, %rdi
	jle	.L4
	movl	$2, %eax
	cmpq	$99, %rdi
	jle	.L4
	movl	$3, %eax
	cmpq	$999, %rdi
	jle	.L4
	movl	$4, %eax
	cmpq	$9999, %rdi
	jle	.L4
	movl	$5, %eax
	cmpq	$99999, %rdi
	jle	.L4
	movl	$6, %eax
	cmpq	$999999, %rdi
	jle	.L4
	movl	$7, %eax
	cmpq	$9999999, %rdi
	jle	.L4
	movl	$8, %eax
	cmpq	$99999999, %rdi
	jle	.L4
	movl	$9, %eax
	cmpq	$999999999, %rdi
	jle	.L4
	movabsq	$9999999999, %rax
	cmpq	%rax, %rdi
	setg	%al
	movzbl	%al, %eax
	addl	$10, %eax
.L4:
	ret
	.cfi_endproc
.LFE25:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	testq	%rsi, %rsi
	jle	.L25
	movl	$1, %ecx
	movl	$11, %r8d
	movabsq	$9999999999, %rdi
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	cmpq	%rsi, %rax
	jg	.L20
.L23:
	movq	%rsi, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	.L21
	cmpq	%rcx, %rax
	movl	$1, %edx
	cmovl	%rcx, %rax
	cmpq	$9, %rax
	jle	.L22
	cmpq	$99, %rax
	jle	.L27
	cmpq	$999, %rax
	jle	.L28
	cmpq	$9999, %rax
	jle	.L29
	cmpq	$99999, %rax
	jle	.L30
	cmpq	$999999, %rax
	jle	.L31
	cmpq	$9999999, %rax
	jle	.L32
	cmpq	$99999999, %rax
	jle	.L33
	cmpq	$999999999, %rax
	jle	.L34
	xorl	%edx, %edx
	cmpq	%rdi, %rax
	setg	%dl
	addq	$10, %rdx
.L22:
	movslq	%r8d, %rax
	cmpq	%rdx, %rax
	cmovle	%rax, %rdx
	addq	$1, %rcx
	movq	%rcx, %rax
	imulq	%rcx, %rax
	movq	%rdx, %r8
	cmpq	%rsi, %rax
	jle	.L23
.L20:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	movl	$11, %r8d
	jmp	.L20
.L27:
	movl	$2, %edx
	jmp	.L22
.L38:
	call	__stack_chk_fail@PLT
.L34:
	movl	$9, %edx
	jmp	.L22
.L33:
	movl	$8, %edx
	jmp	.L22
.L32:
	movl	$7, %edx
	jmp	.L22
.L31:
	movl	$6, %edx
	jmp	.L22
.L30:
	movl	$5, %edx
	jmp	.L22
.L29:
	movl	$4, %edx
	jmp	.L22
.L28:
	movl	$3, %edx
	jmp	.L22
	.cfi_endproc
.LFE26:
	.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>

long max(long a, long b){
  if(a > b) return a;
  else return b;
}

long min(long a, long b){
  if(a < b) return a;
  else return b;
}

int f(long a,long b){

  long c = max(a,b);
  int keta = 1;
  for(int i = 0; i < 10; ++i){
    if( c/10 > 0 ){
      keta ++;
      c /= 10;
    }
  }
  return keta;
}

int main(){

  long n;
  int minimum = 11;
  scanf("%ld",&n);
  for(long a = 1; a*a <= n ; ++a){
    long b = 0;
    if( n % a == 0 ){
      b = n/a;
      b = f(a,b);
      minimum = min(minimum,b);
    }
  }
  printf("%ld",minimum);
  return 0;

}

101914
 17346
 2771679283
 7026
 5110764300
 472
 10211397040
 16034112351
 010
 53937807463

5 3 9 4 7 2 6 8 1 10
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>

long max(long a, long b){
  if(a > b) return a;
  else return b;
}

long min(long a, long b){
  if(a < b) return a;
  else return b;
}

int f(long a,long b){

  long c = max(a,b);
  int keta = 1;
  for(int i = 0; i < 10; ++i){
    if( c/10 > 0 ){
      keta ++;
      c /= 10;
    }
  }
  return keta;
}

int main(){

  long n;
  int minimum = 11;
  scanf("%ld",&n);
  for(long a = 1; a*a <= n ; ++a){
    long b = 0;
    if( n % a == 0 ){
      b = n/a;
      b = f(a,b);
      minimum = min(minimum,b);
    }
  }
  printf("%ld",minimum);
  return 0;

}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L5
	movq	-8(%rbp), %rax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	f
	.type	f, @function
f:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max
	movq	%rax, -8(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L8
.L10:
	cmpq	$9, -8(%rbp)
	jle	.L9
	addl	$1, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
.L9:
	addl	$1, -12(%rbp)
.L8:
	cmpl	$9, -12(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$11, -36(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -24(%rbp)
	jmp	.L13
.L15:
	movq	$0, -16(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L14
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	f
	cltq
	movq	%rax, -16(%rbp)
	movl	-36(%rbp), %eax
	cltq
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min
	movl	%eax, -36(%rbp)
.L14:
	addq	$1, -24(%rbp)
.L13:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L15
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L5
	movq	-8(%rbp), %rax
	jmp	.L6
.L5:
	movq	-16(%rbp), %rax
.L6:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	f
	.type	f, @function
f:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max
	movq	%rax, -8(%rbp)
	movl	$1, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L8
.L10:
	cmpq	$9, -8(%rbp)
	jle	.L9
	addl	$1, -16(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
.L9:
	addl	$1, -12(%rbp)
.L8:
	cmpl	$9, -12(%rbp)
	jle	.L10
	movl	-16(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$11, -36(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1, -24(%rbp)
	jmp	.L13
.L15:
	movq	$0, -16(%rbp)
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	jne	.L14
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	f
	cltq
	movq	%rax, -16(%rbp)
	movl	-36(%rbp), %eax
	cltq
	movq	-16(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min
	movl	%eax, -36(%rbp)
.L14:
	addq	$1, -24(%rbp)
.L13:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L15
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
