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

```c
//B - Sum of Three Integers
//Hiia
#include <stdio.h>
#include <stdlib.h>//rannsuu, zettaichi(absolute)
#include <time.h>
//srand((unsigned int) time(0));
#include <math.h>//koudona keisann
#include <string.h>//hairetsu
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
typedef long long ll;
//#define N 998244353
#define pi 3.1415926535897932384626433832

int gcd(int m,int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
int lcm(int m,int n){if((0==m)||(0==n))return 0;return(m*n/gcd(m, n));}
int fact(int x){if(x==1) return(x);else return(x*fact(x-1));}//Kaijou x!
int ruijou(int base,int exponent){int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

long long int llgcd(long long int m,long long int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
long long int lllcm(long long int m,long long int n){if((0==m)||(0==n))return 0;return(m*n/llgcd(m, n));}
long long int llfact(long long int x){if(x==1) return(x);else return(x*llfact(x-1));}//Kaijou
int llruijou(long long int base,long long int exponent){long long int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

int main()
{
  ll k,s,ans=0;
  scanf("%lld %lld", &k,&s);
  for(ll i = 0; i <= min(s,k); i++) {  //x
    if(0<=s-i && s-i<=k){     //y+z=s-x=s-i, y,s no kumiawase ha...
      ans+=s-i+1;
    }
    else if(k<s-i && s-i<=2*k){
      ans+=2*k-(s-i)+1;
    }
  }

  /*for(ll x = 0; x <= k; x++) {
    for(ll y = 0; y <= k; y++) {
      for(ll z = 0; z <= k; z++) {
        if(x+y+z==s){
          ans++;
        }
      }
    }
  }*/

  printf("%lld\n", ans);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB6:
	.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)
	cmpl	$0, -4(%rbp)
	je	.L2
	cmpl	$0, -8(%rbp)
	jne	.L5
.L2:
	movl	$0, %eax
	jmp	.L4
.L7:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L6
	movl	-8(%rbp), %eax
	subl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L7
	movl	-4(%rbp), %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	%edi, -12(%rbp)
	movl	%esi, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L9
	cmpl	$0, -16(%rbp)
	jne	.L10
.L9:
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	-12(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ebx
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lcm, .-lcm
	.globl	fact
	.type	fact, @function
fact:
.LFB8:
	.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
	movl	%edi, -4(%rbp)
	cmpl	$1, -4(%rbp)
	jne	.L13
	movl	-4(%rbp), %eax
	jmp	.L14
.L13:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fact
	imull	-4(%rbp), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fact, .-fact
	.globl	ruijou
	.type	ruijou, @function
ruijou:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	imull	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L16:
	cmpl	$0, -8(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruijou, .-ruijou
	.globl	llgcd
	.type	llgcd, @function
llgcd:
.LFB10:
	.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)
	cmpq	$0, -8(%rbp)
	je	.L20
	cmpq	$0, -16(%rbp)
	jne	.L23
.L20:
	movl	$0, %eax
	jmp	.L22
.L25:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L24
	movq	-16(%rbp), %rax
	subq	%rax, -8(%rbp)
	jmp	.L23
.L24:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L23:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	llgcd, .-llgcd
	.globl	lllcm
	.type	lllcm, @function
lllcm:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L27
	cmpq	$0, -24(%rbp)
	jne	.L28
.L27:
	movl	$0, %eax
	jmp	.L29
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rbx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llgcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
.L29:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	lllcm, .-lllcm
	.globl	llfact
	.type	llfact, @function
llfact:
.LFB12:
	.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	%rdi, -8(%rbp)
	cmpq	$1, -8(%rbp)
	jne	.L31
	movq	-8(%rbp), %rax
	jmp	.L32
.L31:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, %rdi
	call	llfact
	imulq	-8(%rbp), %rax
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	llfact, .-llfact
	.globl	llruijou
	.type	llruijou, @function
llruijou:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L34
.L35:
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L34:
	cmpq	$0, -16(%rbp)
	jne	.L35
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	llruijou, .-llruijou
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
	movq	$0, -24(%rbp)
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	jmp	.L38
.L41:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	jmp	.L40
.L39:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L40
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cmpq	%rdx, %rax
	jg	.L40
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
.L40:
	addq	$1, -16(%rbp)
.L38:
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	cmpq	%rax, -16(%rbp)
	jle	.L41
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	gcd
	.type	gcd, @function
gcd:
.LFB51:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L6
	testl	%esi, %esi
	je	.L6
	cmpl	%esi, %edi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%esi, %edi
	jle	.L3
	subl	%esi, %edi
	cmpl	%esi, %edi
	jne	.L5
.L8:
	movl	%edi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	subl	%edi, %esi
	cmpl	%esi, %edi
	jne	.L5
	movl	%edi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB52:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L17
	testl	%esi, %esi
	je	.L17
	movl	%edi, %eax
	imull	%esi, %eax
	cmpl	%esi, %edi
	je	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%esi, %edi
	jle	.L13
	subl	%esi, %edi
	cmpl	%edi, %esi
	jne	.L16
	cltd
	idivl	%edi
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%edi, %esi
	cmpl	%esi, %edi
	jne	.L16
	cltd
	idivl	%edi
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	lcm, .-lcm
	.p2align 4
	.globl	fact
	.type	fact, @function
fact:
.LFB53:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	cmpl	$1, %edi
	je	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%edi, %edx
	subl	$1, %edi
	imull	%edx, %eax
	cmpl	$1, %edi
	jne	.L21
.L20:
	ret
	.cfi_endproc
.LFE53:
	.size	fact, .-fact
	.p2align 4
	.globl	ruijou
	.type	ruijou, @function
ruijou:
.LFB54:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	testl	%esi, %esi
	je	.L31
	.p2align 4,,10
	.p2align 3
.L30:
	imull	%edi, %eax
	subl	$1, %esi
	jne	.L30
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	ret
	.cfi_endproc
.LFE54:
	.size	ruijou, .-ruijou
	.p2align 4
	.globl	llgcd
	.type	llgcd, @function
llgcd:
.LFB55:
	.cfi_startproc
	endbr64
	testq	%rdi, %rdi
	je	.L38
	testq	%rsi, %rsi
	je	.L38
	cmpq	%rsi, %rdi
	je	.L40
	.p2align 4,,10
	.p2align 3
.L37:
	cmpq	%rsi, %rdi
	jle	.L35
	subq	%rsi, %rdi
	cmpq	%rsi, %rdi
	jne	.L37
.L40:
	movq	%rdi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	subq	%rdi, %rsi
	cmpq	%rsi, %rdi
	jne	.L37
	movq	%rdi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	llgcd, .-llgcd
	.p2align 4
	.globl	lllcm
	.type	lllcm, @function
lllcm:
.LFB56:
	.cfi_startproc
	endbr64
	testq	%rdi, %rdi
	je	.L48
	testq	%rsi, %rsi
	je	.L48
	movq	%rdi, %rax
	imulq	%rsi, %rax
	cmpq	%rsi, %rdi
	je	.L49
	.p2align 4,,10
	.p2align 3
.L47:
	cmpq	%rsi, %rdi
	jle	.L44
	subq	%rsi, %rdi
	cmpq	%rdi, %rsi
	jne	.L47
	cqto
	idivq	%rdi
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	subq	%rdi, %rsi
	cmpq	%rsi, %rdi
	jne	.L47
	cqto
	idivq	%rdi
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%rdi, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	lllcm, .-lllcm
	.p2align 4
	.globl	llfact
	.type	llfact, @function
llfact:
.LFB57:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	cmpq	$1, %rdi
	je	.L51
	.p2align 4,,10
	.p2align 3
.L52:
	movq	%rdi, %rdx
	subq	$1, %rdi
	imulq	%rdx, %rax
	cmpq	$1, %rdi
	jne	.L52
.L51:
	ret
	.cfi_endproc
.LFE57:
	.size	llfact, .-llfact
	.p2align 4
	.globl	llruijou
	.type	llruijou, @function
llruijou:
.LFB58:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L62
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L61:
	imulq	%rdi, %rax
	subq	$1, %rsi
	jne	.L61
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE58:
	.size	llruijou, .-llruijou
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB59:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rax
	movq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovle	%rax, %rdx
	testq	%rdx, %rdx
	js	.L70
	leaq	(%rcx,%rcx), %rdi
	leaq	-1(%rax), %rsi
	subq	%rdx, %rsi
	leaq	1(%rdi), %r10
	xorl	%edx, %edx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L78:
	testq	%rax, %rax
	jns	.L77
	cmpq	%rcx, %rax
	jg	.L75
.L67:
	subq	$1, %rax
	cmpq	%rax, %rsi
	je	.L65
.L68:
	cmpq	%rcx, %rax
	jle	.L78
.L75:
	movq	%r10, %r9
	movq	%rdx, %r8
	subq	%rax, %r9
	addq	%r9, %rdx
	cmpq	%rdi, %rax
	cmovg	%r8, %rdx
	subq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L68
.L65:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L77:
	.cfi_restore_state
	leaq	1(%rax,%rdx), %rdx
	jmp	.L67
.L70:
	xorl	%edx, %edx
	jmp	.L65
.L79:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.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	gcd
	.type	gcd, @function
gcd:
.LFB51:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L6
	testl	%esi, %esi
	je	.L6
	cmpl	%esi, %edi
	je	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	cmpl	%esi, %edi
	jle	.L3
	subl	%esi, %edi
	cmpl	%esi, %edi
	jne	.L5
.L8:
	movl	%edi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	subl	%edi, %esi
	cmpl	%esi, %edi
	jne	.L5
	movl	%edi, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB52:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L17
	testl	%esi, %esi
	je	.L17
	movl	%edi, %eax
	imull	%esi, %eax
	cmpl	%esi, %edi
	je	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	cmpl	%esi, %edi
	jle	.L13
	subl	%esi, %edi
	cmpl	%edi, %esi
	jne	.L16
	cltd
	idivl	%edi
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	subl	%edi, %esi
	cmpl	%esi, %edi
	jne	.L16
	cltd
	idivl	%edi
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	movl	%edi, %eax
	ret
	.cfi_endproc
.LFE52:
	.size	lcm, .-lcm
	.p2align 4
	.globl	fact
	.type	fact, @function
fact:
.LFB53:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	cmpl	$1, %edi
	je	.L20
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%edi, %edx
	subl	$1, %edi
	imull	%edx, %eax
	cmpl	$1, %edi
	jne	.L21
.L20:
	ret
	.cfi_endproc
.LFE53:
	.size	fact, .-fact
	.p2align 4
	.globl	ruijou
	.type	ruijou, @function
ruijou:
.LFB54:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	testl	%esi, %esi
	je	.L31
	.p2align 4,,10
	.p2align 3
.L30:
	imull	%edi, %eax
	subl	$1, %esi
	jne	.L30
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	ret
	.cfi_endproc
.LFE54:
	.size	ruijou, .-ruijou
	.p2align 4
	.globl	llgcd
	.type	llgcd, @function
llgcd:
.LFB55:
	.cfi_startproc
	endbr64
	testq	%rdi, %rdi
	je	.L38
	testq	%rsi, %rsi
	je	.L38
	cmpq	%rsi, %rdi
	je	.L40
	.p2align 4,,10
	.p2align 3
.L37:
	cmpq	%rsi, %rdi
	jle	.L35
	subq	%rsi, %rdi
	cmpq	%rsi, %rdi
	jne	.L37
.L40:
	movq	%rdi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	subq	%rdi, %rsi
	cmpq	%rsi, %rdi
	jne	.L37
	movq	%rdi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	llgcd, .-llgcd
	.p2align 4
	.globl	lllcm
	.type	lllcm, @function
lllcm:
.LFB56:
	.cfi_startproc
	endbr64
	testq	%rdi, %rdi
	je	.L48
	testq	%rsi, %rsi
	je	.L48
	movq	%rdi, %rax
	imulq	%rsi, %rax
	cmpq	%rsi, %rdi
	je	.L49
	.p2align 4,,10
	.p2align 3
.L47:
	cmpq	%rsi, %rdi
	jle	.L44
	subq	%rsi, %rdi
	cmpq	%rdi, %rsi
	jne	.L47
	cqto
	idivq	%rdi
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	subq	%rdi, %rsi
	cmpq	%rsi, %rdi
	jne	.L47
	cqto
	idivq	%rdi
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	movq	%rdi, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	lllcm, .-lllcm
	.p2align 4
	.globl	llfact
	.type	llfact, @function
llfact:
.LFB57:
	.cfi_startproc
	endbr64
	movl	$1, %eax
	cmpq	$1, %rdi
	je	.L51
	.p2align 4,,10
	.p2align 3
.L52:
	movq	%rdi, %rdx
	subq	$1, %rdi
	imulq	%rdx, %rax
	cmpq	$1, %rdi
	jne	.L52
.L51:
	ret
	.cfi_endproc
.LFE57:
	.size	llfact, .-llfact
	.p2align 4
	.globl	llruijou
	.type	llruijou, @function
llruijou:
.LFB58:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L62
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L61:
	imulq	%rdi, %rax
	subq	$1, %rsi
	jne	.L61
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE58:
	.size	llruijou, .-llruijou
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB59:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	16(%rsp), %rax
	movq	%rcx, %rdx
	cmpq	%rcx, %rax
	cmovle	%rax, %rdx
	testq	%rdx, %rdx
	js	.L70
	leaq	(%rcx,%rcx), %rdi
	leaq	-1(%rax), %rsi
	subq	%rdx, %rsi
	leaq	1(%rdi), %r10
	xorl	%edx, %edx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L78:
	testq	%rax, %rax
	jns	.L77
	cmpq	%rcx, %rax
	jg	.L75
.L67:
	subq	$1, %rax
	cmpq	%rax, %rsi
	je	.L65
.L68:
	cmpq	%rcx, %rax
	jle	.L78
.L75:
	movq	%r10, %r9
	movq	%rdx, %r8
	subq	%rax, %r9
	addq	%r9, %rdx
	cmpq	%rdi, %rax
	cmovg	%r8, %rdx
	subq	$1, %rax
	cmpq	%rax, %rsi
	jne	.L68
.L65:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L79
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L77:
	.cfi_restore_state
	leaq	1(%rax,%rdx), %rdx
	jmp	.L67
.L70:
	xorl	%edx, %edx
	jmp	.L65
.L79:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.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:

//B - Sum of Three Integers
//Hiia
#include <stdio.h>
#include <stdlib.h>//rannsuu, zettaichi(absolute)
#include <time.h>
//srand((unsigned int) time(0));
#include <math.h>//koudona keisann
#include <string.h>//hairetsu
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
typedef long long ll;
//#define N 998244353
#define pi 3.1415926535897932384626433832

int gcd(int m,int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
int lcm(int m,int n){if((0==m)||(0==n))return 0;return(m*n/gcd(m, n));}
int fact(int x){if(x==1) return(x);else return(x*fact(x-1));}//Kaijou x!
int ruijou(int base,int exponent){int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

long long int llgcd(long long int m,long long int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
long long int lllcm(long long int m,long long int n){if((0==m)||(0==n))return 0;return(m*n/llgcd(m, n));}
long long int llfact(long long int x){if(x==1) return(x);else return(x*llfact(x-1));}//Kaijou
int llruijou(long long int base,long long int exponent){long long int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

int main()
{
  ll k,s,ans=0;
  scanf("%lld %lld", &k,&s);
  for(ll i = 0; i <= min(s,k); i++) {  //x
    if(0<=s-i && s-i<=k){     //y+z=s-x=s-i, y,s no kumiawase ha...
      ans+=s-i+1;
    }
    else if(k<s-i && s-i<=2*k){
      ans+=2*k-(s-i)+1;
    }
  }

  /*for(ll x = 0; x <= k; x++) {
    for(ll y = 0; y <= k; y++) {
      for(ll z = 0; z <= k; z++) {
        if(x+y+z==s){
          ans++;
        }
      }
    }
  }*/

  printf("%lld\n", ans);

  return 0;
}

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

6
 27
 10
 18
 12
 0
 3
 1
 33
 15

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

```c
//B - Sum of Three Integers
//Hiia
#include <stdio.h>
#include <stdlib.h>//rannsuu, zettaichi(absolute)
#include <time.h>
//srand((unsigned int) time(0));
#include <math.h>//koudona keisann
#include <string.h>//hairetsu
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
typedef long long ll;
//#define N 998244353
#define pi 3.1415926535897932384626433832

int gcd(int m,int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
int lcm(int m,int n){if((0==m)||(0==n))return 0;return(m*n/gcd(m, n));}
int fact(int x){if(x==1) return(x);else return(x*fact(x-1));}//Kaijou x!
int ruijou(int base,int exponent){int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

long long int llgcd(long long int m,long long int n){if((0==m)||(0==n))return 0;while(m!=n)if(m>n)m=m-n;else n=n-m;return m;}
long long int lllcm(long long int m,long long int n){if((0==m)||(0==n))return 0;return(m*n/llgcd(m, n));}
long long int llfact(long long int x){if(x==1) return(x);else return(x*llfact(x-1));}//Kaijou
int llruijou(long long int base,long long int exponent){long long int i,answer=1;i=exponent;while(i!=0){answer=answer*base;--i;}return answer;}//ruijou base^exponent

int main()
{
  ll k,s,ans=0;
  scanf("%lld %lld", &k,&s);
  for(ll i = 0; i <= min(s,k); i++) {  //x
    if(0<=s-i && s-i<=k){     //y+z=s-x=s-i, y,s no kumiawase ha...
      ans+=s-i+1;
    }
    else if(k<s-i && s-i<=2*k){
      ans+=2*k-(s-i)+1;
    }
  }

  /*for(ll x = 0; x <= k; x++) {
    for(ll y = 0; y <= k; y++) {
      for(ll z = 0; z <= k; z++) {
        if(x+y+z==s){
          ans++;
        }
      }
    }
  }*/

  printf("%lld\n", ans);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB6:
	.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)
	cmpl	$0, -4(%rbp)
	je	.L2
	cmpl	$0, -8(%rbp)
	jne	.L5
.L2:
	movl	$0, %eax
	jmp	.L4
.L7:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L6
	movl	-8(%rbp), %eax
	subl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L7
	movl	-4(%rbp), %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	%edi, -12(%rbp)
	movl	%esi, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L9
	cmpl	$0, -16(%rbp)
	jne	.L10
.L9:
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	-12(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ebx
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lcm, .-lcm
	.globl	fact
	.type	fact, @function
fact:
.LFB8:
	.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
	movl	%edi, -4(%rbp)
	cmpl	$1, -4(%rbp)
	jne	.L13
	movl	-4(%rbp), %eax
	jmp	.L14
.L13:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fact
	imull	-4(%rbp), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fact, .-fact
	.globl	ruijou
	.type	ruijou, @function
ruijou:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	imull	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L16:
	cmpl	$0, -8(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruijou, .-ruijou
	.globl	llgcd
	.type	llgcd, @function
llgcd:
.LFB10:
	.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)
	cmpq	$0, -8(%rbp)
	je	.L20
	cmpq	$0, -16(%rbp)
	jne	.L23
.L20:
	movl	$0, %eax
	jmp	.L22
.L25:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L24
	movq	-16(%rbp), %rax
	subq	%rax, -8(%rbp)
	jmp	.L23
.L24:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L23:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	llgcd, .-llgcd
	.globl	lllcm
	.type	lllcm, @function
lllcm:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L27
	cmpq	$0, -24(%rbp)
	jne	.L28
.L27:
	movl	$0, %eax
	jmp	.L29
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rbx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llgcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
.L29:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	lllcm, .-lllcm
	.globl	llfact
	.type	llfact, @function
llfact:
.LFB12:
	.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	%rdi, -8(%rbp)
	cmpq	$1, -8(%rbp)
	jne	.L31
	movq	-8(%rbp), %rax
	jmp	.L32
.L31:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, %rdi
	call	llfact
	imulq	-8(%rbp), %rax
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	llfact, .-llfact
	.globl	llruijou
	.type	llruijou, @function
llruijou:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L34
.L35:
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L34:
	cmpq	$0, -16(%rbp)
	jne	.L35
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	llruijou, .-llruijou
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
	movq	$0, -24(%rbp)
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	jmp	.L38
.L41:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	jmp	.L40
.L39:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L40
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cmpq	%rdx, %rax
	jg	.L40
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
.L40:
	addq	$1, -16(%rbp)
.L38:
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	cmpq	%rax, -16(%rbp)
	jle	.L41
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	gcd
	.type	gcd, @function
gcd:
.LFB6:
	.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)
	cmpl	$0, -4(%rbp)
	je	.L2
	cmpl	$0, -8(%rbp)
	jne	.L5
.L2:
	movl	$0, %eax
	jmp	.L4
.L7:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jle	.L6
	movl	-8(%rbp), %eax
	subl	%eax, -4(%rbp)
	jmp	.L5
.L6:
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jne	.L7
	movl	-4(%rbp), %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	%edi, -12(%rbp)
	movl	%esi, -16(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L9
	cmpl	$0, -16(%rbp)
	jne	.L10
.L9:
	movl	$0, %eax
	jmp	.L11
.L10:
	movl	-12(%rbp), %eax
	imull	-16(%rbp), %eax
	movl	%eax, %ebx
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	gcd
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	lcm, .-lcm
	.globl	fact
	.type	fact, @function
fact:
.LFB8:
	.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
	movl	%edi, -4(%rbp)
	cmpl	$1, -4(%rbp)
	jne	.L13
	movl	-4(%rbp), %eax
	jmp	.L14
.L13:
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %edi
	call	fact
	imull	-4(%rbp), %eax
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	fact, .-fact
	.globl	ruijou
	.type	ruijou, @function
ruijou:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	imull	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	subl	$1, -8(%rbp)
.L16:
	cmpl	$0, -8(%rbp)
	jne	.L17
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ruijou, .-ruijou
	.globl	llgcd
	.type	llgcd, @function
llgcd:
.LFB10:
	.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)
	cmpq	$0, -8(%rbp)
	je	.L20
	cmpq	$0, -16(%rbp)
	jne	.L23
.L20:
	movl	$0, %eax
	jmp	.L22
.L25:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L24
	movq	-16(%rbp), %rax
	subq	%rax, -8(%rbp)
	jmp	.L23
.L24:
	movq	-8(%rbp), %rax
	subq	%rax, -16(%rbp)
.L23:
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jne	.L25
	movq	-8(%rbp), %rax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	llgcd, .-llgcd
	.globl	lllcm
	.type	lllcm, @function
lllcm:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -16(%rbp)
	movq	%rsi, -24(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L27
	cmpq	$0, -24(%rbp)
	jne	.L28
.L27:
	movl	$0, %eax
	jmp	.L29
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, %rbx
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llgcd
	movq	%rax, %rcx
	movq	%rbx, %rax
	cqto
	idivq	%rcx
.L29:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	lllcm, .-lllcm
	.globl	llfact
	.type	llfact, @function
llfact:
.LFB12:
	.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	%rdi, -8(%rbp)
	cmpq	$1, -8(%rbp)
	jne	.L31
	movq	-8(%rbp), %rax
	jmp	.L32
.L31:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, %rdi
	call	llfact
	imulq	-8(%rbp), %rax
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	llfact, .-llfact
	.globl	llruijou
	.type	llruijou, @function
llruijou:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	jmp	.L34
.L35:
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	subq	$1, -16(%rbp)
.L34:
	cmpq	$0, -16(%rbp)
	jne	.L35
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	llruijou, .-llruijou
	.section	.rodata
.LC0:
	.string	"%lld %lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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
	movq	$0, -24(%rbp)
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -16(%rbp)
	jmp	.L38
.L41:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	js	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jg	.L39
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	jmp	.L40
.L39:
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	cmpq	%rax, %rdx
	jle	.L40
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	%rdx, %rdx
	cmpq	%rdx, %rax
	jg	.L40
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
.L40:
	addq	$1, -16(%rbp)
.L38:
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	cmpq	%rax, -16(%rbp)
	jle	.L41
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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:
