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

```c
//AWTF2019-D
#include<stdio.h>
#include<stdbool.h>
#define prime 10000000019

void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

long long calcul(long long p,long long q,long long z,long long *r,long long *b){
  long long f=0,cnt=0,w,i;
  (*r)=0;(*b)=0;
  if(p<q){f=1;llswap(&p,&q);}
  i=0;
  while(z>=0){
    w=z/q;
    cnt+=(w+1);
    (*r)+=i*(w+1);
    (*b)+=llsankaku(w);
    z-=p;
    i++;
  }
  if(f){llswap(r,b);}
  return cnt;
}

void calc(long long p,long long q,long long k,long long *r,long long *b){
  long long st,fi,te,c;
  st=0;fi=prime*2000;
  while(st<=fi){
    te=(st+fi)/2;
    c=calcul(p,q,te,r,b);
    if(c==k){break;}
    if(c<k){st=te+1;}
    if(c>k){fi=te-1;}
  }
}

typedef struct{
  long long xz;
  long long yz;
}point;

point vector_minus(point a,point b){
  point r;
  r.xz=a.xz-b.xz;
  r.yz=a.yz-b.yz;
  return r;
}

//gaiseki
long long crossproduct(point a,point b){
  return a.xz*b.yz-a.yz*b.xz;
}

bool ispossible(long long r,long long b,long long k){
  long long st,fi,te,zr,zb;
  long long fr,fb,sr,sb;
  st=1;fi=prime-1;
  while(st<=fi){
    te=(st+fi)/2;
    calc(te,prime-te,k,&zr,&zb);
    if(zr<=r && zb<=b){return true;}
    if(zr>r && zb>b){return false;}
    if(zr>r){st=te+1;sr=zr;sb=zb;}
    else{fi=te-1;fr=zr;fb=zb;}
  }
  //Is (r,b) on above the line{(fr,fb),(sr,sb)}(fr<sr)?
  point tg,l1,l2;
  tg.xz=r;tg.yz=b;
  l1.xz=fr;l1.yz=fb;
  l2.xz=sr;l2.yz=sb;
  if(crossproduct(vector_minus(l2,l1),vector_minus(tg,l1))>=0){return true;}
  return false;
}

long long solve(long long r,long long b){
  long long st=0,fi=2222222,te;
  while(st<=fi){
    te=(st+fi)/2;
    if(ispossible(r,b,te)){st=te+1;}
    else{fi=te-1;}
  }
  return fi;
}

int main(){
  long long r,b;
  scanf("%lld%lld",&r,&b);
  printf("%lld\n",solve(r,b)-1);//-1 : empty box
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	llswap
	.type	llswap, @function
llswap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	llswap, .-llswap
	.globl	llsankaku
	.type	llsankaku, @function
llsankaku:
.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	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	llsankaku, .-llsankaku
	.globl	calcul
	.type	calcul, @function
calcul:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	$0, (%rax)
	movq	-72(%rbp), %rax
	movq	$0, (%rax)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	$1, -32(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L5:
	movq	$0, -16(%rbp)
	jmp	.L6
.L7:
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	llsankaku
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-40(%rbp), %rax
	subq	%rax, -56(%rbp)
	addq	$1, -16(%rbp)
.L6:
	cmpq	$0, -56(%rbp)
	jns	.L7
	cmpq	$0, -32(%rbp)
	je	.L8
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L8:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	calcul, .-calcul
	.globl	calc
	.type	calc, @function
calc:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movabsq	$20000000038000, %rax
	movq	%rax, -24(%rbp)
	jmp	.L11
.L15:
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdi
	movq	-64(%rbp), %rcx
	movq	-16(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calcul
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L16
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jge	.L14
	movq	-16(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
.L14:
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jle	.L11
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
.L11:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L15
	jmp	.L17
.L16:
	nop
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calc, .-calc
	.globl	vector_minus
	.type	vector_minus, @function
vector_minus:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -32(%rbp)
	movq	%rdi, -24(%rbp)
	movq	%rdx, -48(%rbp)
	movq	%rcx, -40(%rbp)
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	-40(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	vector_minus, .-vector_minus
	.globl	crossproduct
	.type	crossproduct, @function
crossproduct:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -16(%rbp)
	movq	%rdi, -8(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -24(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	imulq	%rdx, %rax
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	crossproduct, .-crossproduct
	.globl	ispossible
	.type	ispossible, @function
ispossible:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%rdi, -184(%rbp)
	movq	%rsi, -192(%rbp)
	movq	%rdx, -200(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	$1, -152(%rbp)
	movabsq	$10000000018, %rax
	movq	%rax, -144(%rbp)
	jmp	.L23
.L28:
	movq	-152(%rbp), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -104(%rbp)
	movabsq	$10000000019, %rax
	subq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	-160(%rbp), %rdi
	leaq	-168(%rbp), %rcx
	movq	-200(%rbp), %rdx
	movq	-104(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calc
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jl	.L24
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L24
	movl	$1, %eax
	jmp	.L30
.L24:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L26
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jge	.L26
	movl	$0, %eax
	jmp	.L30
.L26:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L27
	movq	-104(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -152(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -112(%rbp)
	jmp	.L23
.L27:
	movq	-104(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -144(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -128(%rbp)
.L23:
	movq	-152(%rbp), %rax
	cmpq	-144(%rbp), %rax
	jle	.L28
	movq	-184(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-192(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	-136(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-96(%rbp), %rdi
	movq	-88(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %r12
	movq	%rdx, %r13
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %rcx
	movq	%rdx, %rbx
	movq	%rcx, %rsi
	movq	%rdx, %rax
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	call	crossproduct
	testq	%rax, %rax
	js	.L29
	movl	$1, %eax
	jmp	.L30
.L29:
	movl	$0, %eax
.L30:
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ispossible, .-ispossible
	.globl	solve
	.type	solve, @function
solve:
.LFB7:
	.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	$0, -24(%rbp)
	movq	$2222222, -16(%rbp)
	jmp	.L33
.L35:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	ispossible
	testb	%al, %al
	je	.L34
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
	jmp	.L33
.L34:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16(%rbp)
.L33:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L35
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	solve
	subq	$1, %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	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	llswap
	.type	llswap, @function
llswap:
.LFB23:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE23:
	.size	llswap, .-llswap
	.p2align 4
	.globl	llsankaku
	.type	llsankaku, @function
llsankaku:
.LFB24:
	.cfi_startproc
	endbr64
	leaq	1(%rdi), %rdx
	imulq	%rdi, %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	ret
	.cfi_endproc
.LFE24:
	.size	llsankaku, .-llsankaku
	.p2align 4
	.globl	calcul
	.type	calcul, @function
calcul:
.LFB25:
	.cfi_startproc
	endbr64
	movq	%rdi, %r9
	movq	%rsi, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdx, %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rcx, %rdi
	movq	$0, (%rcx)
	movq	$0, (%r8)
	cmpq	%r10, %r9
	jl	.L5
	xorl	%r11d, %r11d
	testq	%rdx, %rdx
	js	.L4
	movq	%r10, %rax
	xorl	%ebx, %ebx
	movq	%r9, %r10
	movq	%rax, %r9
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	testq	%rdx, %rdx
	js	.L11
	movl	$1, %ebx
.L6:
	xorl	%ecx, %ecx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rsi, %rax
	cqto
	idivq	%r9
	leaq	1(%rax), %rdx
	imulq	%rdx, %rax
	movq	%rdx, %rbp
	addq	%rdx, %r11
	imulq	%rcx, %rbp
	addq	%rbp, (%rdi)
	addq	$1, %rcx
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	addq	(%r8), %rdx
	movq	%rdx, (%r8)
	subq	%r10, %rsi
	jns	.L9
	testq	%rbx, %rbx
	je	.L4
.L8:
	movq	(%rdi), %rax
	movq	%rdx, (%rdi)
	movq	%rax, (%r8)
.L4:
	movq	%r11, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%r11d, %r11d
	jmp	.L8
	.cfi_endproc
.LFE25:
	.size	calcul, .-calcul
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movabsq	$20000000038000, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	movq	%rcx, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, -16(%rsp)
	movq	%rdx, -8(%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	movq	-16(%rsp), %r11
	leaq	(%r12,%r13), %rbx
	movq	$0, (%rdi)
	sarq	%rbx
	movq	$0, (%r8)
	cmpq	%r11, %rbp
	jge	.L25
	movq	%rbp, %r10
	movl	$1, %r14d
.L18:
	movq	%rbx, %rcx
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rcx, %rax
	cqto
	idivq	%r10
	leaq	1(%rax), %rdx
	movq	%rdx, %r15
	addq	%rdx, %r9
	imulq	%rax, %rdx
	imulq	%rsi, %r15
	addq	%r15, (%rdi)
	addq	$1, %rsi
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	addq	(%r8), %rax
	movq	%rax, (%r8)
	subq	%r11, %rcx
	jns	.L19
	testq	%r14, %r14
	je	.L20
	movq	(%rdi), %rdx
	movq	%rax, (%rdi)
	movq	%rdx, (%r8)
.L20:
	cmpq	%r9, -8(%rsp)
	je	.L17
	jle	.L22
	leaq	1(%rbx), %r12
.L23:
	cmpq	%r13, %r12
	jle	.L24
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movq	%r11, %r10
	xorl	%r14d, %r14d
	movq	%rbp, %r11
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L22:
	jge	.L23
	leaq	-1(%rbx), %r13
	jmp	.L23
	.cfi_endproc
.LFE26:
	.size	calc, .-calc
	.p2align 4
	.globl	vector_minus
	.type	vector_minus, @function
vector_minus:
.LFB27:
	.cfi_startproc
	endbr64
	movq	%rdi, -40(%rsp)
	movq	%rsi, -32(%rsp)
	movdqa	-40(%rsp), %xmm0
	movq	%rdx, -24(%rsp)
	movq	%rcx, -16(%rsp)
	psubq	-24(%rsp), %xmm0
	movaps	%xmm0, -40(%rsp)
	movq	-40(%rsp), %rax
	movq	-32(%rsp), %rdx
	ret
	.cfi_endproc
.LFE27:
	.size	vector_minus, .-vector_minus
	.p2align 4
	.globl	crossproduct
	.type	crossproduct, @function
crossproduct:
.LFB28:
	.cfi_startproc
	endbr64
	imulq	%rcx, %rdi
	imulq	%rdx, %rsi
	movq	%rdi, %rax
	subq	%rsi, %rax
	ret
	.cfi_endproc
.LFE28:
	.size	crossproduct, .-crossproduct
	.p2align 4
	.globl	ispossible
	.type	ispossible, @function
ispossible:
.LFB29:
	.cfi_startproc
	endbr64
	movabsq	$10000000018, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, -48(%rsp)
	movq	%rsi, -40(%rsp)
	movq	%rdx, -72(%rsp)
	movq	%rax, -64(%rsp)
	movq	$1, -56(%rsp)
	.p2align 4,,10
	.p2align 3
.L47:
	movq	-56(%rsp), %r12
	addq	-64(%rsp), %r12
	xorl	%ebp, %ebp
	movabsq	$10000000019, %rax
	movabsq	$20000000038000, %r13
	sarq	%r12
	subq	%r12, %rax
	movq	%rax, -80(%rsp)
	.p2align 4,,10
	.p2align 3
.L42:
	movq	-80(%rsp), %r11
	leaq	0(%rbp,%r13), %rbx
	sarq	%rbx
	cmpq	%r12, %r11
	jle	.L48
	movq	%r12, %r10
	movl	$1, %r14d
.L35:
	movq	%rbx, %rcx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L36:
	movq	%rcx, %rax
	cqto
	idivq	%r10
	leaq	1(%rax), %rdx
	imulq	%rdx, %rax
	movq	%rdx, %r15
	addq	%rdx, %rdi
	imulq	%rsi, %r15
	addq	$1, %rsi
	sarq	%rax
	addq	%r15, %r8
	addq	%rax, %r9
	subq	%r11, %rcx
	jns	.L36
	testq	%r14, %r14
	je	.L37
	movq	%r8, %rax
	movq	%r9, %r8
	movq	%rax, %r9
.L37:
	movq	-72(%rsp), %rsi
	cmpq	%rdi, %rsi
	je	.L38
	leaq	1(%rbx), %rax
	cmovg	%rax, %rbp
	jge	.L40
	leaq	-1(%rbx), %r13
	cmpq	%rbp, %r13
	jge	.L42
.L38:
	cmpq	%r8, -48(%rsp)
	jl	.L43
.L60:
	cmpq	%r9, -40(%rsp)
	jge	.L59
	leaq	-1(%r12), %rax
	movq	%r9, -32(%rsp)
	movq	%rax, -64(%rsp)
	movq	%r8, -8(%rsp)
.L46:
	movq	-56(%rsp), %rbx
	cmpq	%rbx, -64(%rsp)
	jge	.L47
	movq	-8(%rsp), %rdi
	movq	-32(%rsp), %rbx
	movq	-24(%rsp), %rcx
	movq	-40(%rsp), %rax
	movq	-16(%rsp), %rdx
	subq	%rbx, %rax
	subq	%rdi, %rcx
	imulq	%rax, %rcx
	movq	-48(%rsp), %rax
	subq	%rbx, %rdx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	subq	%rdi, %rax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	imulq	%rdx, %rax
	popq	%r15
	.cfi_def_cfa_offset 8
	cmpq	%rax, %rcx
	setge	%al
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	movq	%r11, %r10
	xorl	%r14d, %r14d
	movq	%r12, %r11
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L40:
	cmpq	%r13, %rbp
	jle	.L42
	cmpq	%r8, -48(%rsp)
	jge	.L60
.L43:
	cmpq	%r9, -40(%rsp)
	jl	.L50
	leaq	1(%r12), %rax
	movq	%r9, -16(%rsp)
	movq	%rax, -56(%rsp)
	movq	%r8, -24(%rsp)
	jmp	.L46
.L59:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L50:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE29:
	.size	ispossible, .-ispossible
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	$2222222, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	(%r12,%rbp), %rbx
	movq	%r13, %rsi
	movq	%r14, %rdi
	sarq	%rbx
	movq	%rbx, %rdx
	call	ispossible
	testb	%al, %al
	je	.L62
	leaq	1(%rbx), %rbp
	cmpq	%rbp, %r12
	jge	.L65
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	.cfi_restore_state
	leaq	-1(%rbx), %r12
	cmpq	%r12, %rbp
	jle	.L65
	popq	%rbx
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE30:
	.size	solve, .-solve
	.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:
.LFB31:
	.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	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leaq	-1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L70:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE31:
	.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	llswap
	.type	llswap, @function
llswap:
.LFB23:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE23:
	.size	llswap, .-llswap
	.p2align 4
	.globl	llsankaku
	.type	llsankaku, @function
llsankaku:
.LFB24:
	.cfi_startproc
	endbr64
	leaq	1(%rdi), %rdx
	imulq	%rdi, %rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	ret
	.cfi_endproc
.LFE24:
	.size	llsankaku, .-llsankaku
	.p2align 4
	.globl	calcul
	.type	calcul, @function
calcul:
.LFB25:
	.cfi_startproc
	endbr64
	movq	%rdi, %r9
	movq	%rsi, %r10
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdx, %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rcx, %rdi
	movq	$0, (%rcx)
	movq	$0, (%r8)
	cmpq	%r10, %r9
	jl	.L5
	xorl	%r11d, %r11d
	testq	%rdx, %rdx
	js	.L4
	movq	%r10, %rax
	xorl	%ebx, %ebx
	movq	%r9, %r10
	movq	%rax, %r9
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	testq	%rdx, %rdx
	js	.L11
	movl	$1, %ebx
.L6:
	xorl	%ecx, %ecx
	xorl	%r11d, %r11d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rsi, %rax
	cqto
	idivq	%r9
	leaq	1(%rax), %rdx
	imulq	%rdx, %rax
	movq	%rdx, %rbp
	addq	%rdx, %r11
	imulq	%rcx, %rbp
	addq	%rbp, (%rdi)
	addq	$1, %rcx
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	sarq	%rdx
	addq	(%r8), %rdx
	movq	%rdx, (%r8)
	subq	%r10, %rsi
	jns	.L9
	testq	%rbx, %rbx
	je	.L4
.L8:
	movq	(%rdi), %rax
	movq	%rdx, (%rdi)
	movq	%rax, (%r8)
.L4:
	movq	%r11, %rax
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%r11d, %r11d
	jmp	.L8
	.cfi_endproc
.LFE25:
	.size	calcul, .-calcul
	.p2align 4
	.globl	calc
	.type	calc, @function
calc:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movabsq	$20000000038000, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	movq	%rcx, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, -16(%rsp)
	movq	%rdx, -8(%rsp)
	.p2align 4,,10
	.p2align 3
.L24:
	movq	-16(%rsp), %r11
	leaq	(%r12,%r13), %rbx
	movq	$0, (%rdi)
	sarq	%rbx
	movq	$0, (%r8)
	cmpq	%r11, %rbp
	jge	.L25
	movq	%rbp, %r10
	movl	$1, %r14d
.L18:
	movq	%rbx, %rcx
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rcx, %rax
	cqto
	idivq	%r10
	leaq	1(%rax), %rdx
	movq	%rdx, %r15
	addq	%rdx, %r9
	imulq	%rax, %rdx
	imulq	%rsi, %r15
	addq	%r15, (%rdi)
	addq	$1, %rsi
	movq	%rdx, %rax
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	addq	(%r8), %rax
	movq	%rax, (%r8)
	subq	%r11, %rcx
	jns	.L19
	testq	%r14, %r14
	je	.L20
	movq	(%rdi), %rdx
	movq	%rax, (%rdi)
	movq	%rdx, (%r8)
.L20:
	cmpq	%r9, -8(%rsp)
	je	.L17
	jle	.L22
	leaq	1(%rbx), %r12
.L23:
	cmpq	%r13, %r12
	jle	.L24
.L17:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movq	%r11, %r10
	xorl	%r14d, %r14d
	movq	%rbp, %r11
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L22:
	jge	.L23
	leaq	-1(%rbx), %r13
	jmp	.L23
	.cfi_endproc
.LFE26:
	.size	calc, .-calc
	.p2align 4
	.globl	vector_minus
	.type	vector_minus, @function
vector_minus:
.LFB27:
	.cfi_startproc
	endbr64
	movq	%rdi, -40(%rsp)
	movq	%rsi, -32(%rsp)
	movdqa	-40(%rsp), %xmm0
	movq	%rdx, -24(%rsp)
	movq	%rcx, -16(%rsp)
	psubq	-24(%rsp), %xmm0
	movaps	%xmm0, -40(%rsp)
	movq	-40(%rsp), %rax
	movq	-32(%rsp), %rdx
	ret
	.cfi_endproc
.LFE27:
	.size	vector_minus, .-vector_minus
	.p2align 4
	.globl	crossproduct
	.type	crossproduct, @function
crossproduct:
.LFB28:
	.cfi_startproc
	endbr64
	imulq	%rcx, %rdi
	imulq	%rdx, %rsi
	movq	%rdi, %rax
	subq	%rsi, %rax
	ret
	.cfi_endproc
.LFE28:
	.size	crossproduct, .-crossproduct
	.p2align 4
	.globl	ispossible
	.type	ispossible, @function
ispossible:
.LFB29:
	.cfi_startproc
	endbr64
	movabsq	$10000000018, %rax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, -48(%rsp)
	movq	%rsi, -40(%rsp)
	movq	%rdx, -72(%rsp)
	movq	%rax, -64(%rsp)
	movq	$1, -56(%rsp)
	.p2align 4,,10
	.p2align 3
.L47:
	movq	-56(%rsp), %r12
	addq	-64(%rsp), %r12
	xorl	%ebp, %ebp
	movabsq	$10000000019, %rax
	movabsq	$20000000038000, %r13
	sarq	%r12
	subq	%r12, %rax
	movq	%rax, -80(%rsp)
	.p2align 4,,10
	.p2align 3
.L42:
	movq	-80(%rsp), %r11
	leaq	0(%rbp,%r13), %rbx
	sarq	%rbx
	cmpq	%r12, %r11
	jle	.L48
	movq	%r12, %r10
	movl	$1, %r14d
.L35:
	movq	%rbx, %rcx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L36:
	movq	%rcx, %rax
	cqto
	idivq	%r10
	leaq	1(%rax), %rdx
	imulq	%rdx, %rax
	movq	%rdx, %r15
	addq	%rdx, %rdi
	imulq	%rsi, %r15
	addq	$1, %rsi
	sarq	%rax
	addq	%r15, %r8
	addq	%rax, %r9
	subq	%r11, %rcx
	jns	.L36
	testq	%r14, %r14
	je	.L37
	movq	%r8, %rax
	movq	%r9, %r8
	movq	%rax, %r9
.L37:
	movq	-72(%rsp), %rsi
	cmpq	%rdi, %rsi
	je	.L38
	leaq	1(%rbx), %rax
	cmovg	%rax, %rbp
	jge	.L40
	leaq	-1(%rbx), %r13
	cmpq	%rbp, %r13
	jge	.L42
.L38:
	cmpq	%r8, -48(%rsp)
	jl	.L43
.L60:
	cmpq	%r9, -40(%rsp)
	jge	.L59
	leaq	-1(%r12), %rax
	movq	%r9, -32(%rsp)
	movq	%rax, -64(%rsp)
	movq	%r8, -8(%rsp)
.L46:
	movq	-56(%rsp), %rbx
	cmpq	%rbx, -64(%rsp)
	jge	.L47
	movq	-8(%rsp), %rdi
	movq	-32(%rsp), %rbx
	movq	-24(%rsp), %rcx
	movq	-40(%rsp), %rax
	movq	-16(%rsp), %rdx
	subq	%rbx, %rax
	subq	%rdi, %rcx
	imulq	%rax, %rcx
	movq	-48(%rsp), %rax
	subq	%rbx, %rdx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	subq	%rdi, %rax
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	imulq	%rdx, %rax
	popq	%r15
	.cfi_def_cfa_offset 8
	cmpq	%rax, %rcx
	setge	%al
	ret
	.p2align 4,,10
	.p2align 3
.L48:
	.cfi_restore_state
	movq	%r11, %r10
	xorl	%r14d, %r14d
	movq	%r12, %r11
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L40:
	cmpq	%r13, %rbp
	jle	.L42
	cmpq	%r8, -48(%rsp)
	jge	.L60
.L43:
	cmpq	%r9, -40(%rsp)
	jl	.L50
	leaq	1(%r12), %rax
	movq	%r9, -16(%rsp)
	movq	%rax, -56(%rsp)
	movq	%r8, -24(%rsp)
	jmp	.L46
.L59:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L50:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE29:
	.size	ispossible, .-ispossible
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB30:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rsi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	$2222222, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	(%r12,%rbp), %rbx
	movq	%r13, %rsi
	movq	%r14, %rdi
	sarq	%rbx
	movq	%rbx, %rdx
	call	ispossible
	testb	%al, %al
	je	.L62
	leaq	1(%rbx), %rbp
	cmpq	%rbp, %r12
	jge	.L65
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L62:
	.cfi_restore_state
	leaq	-1(%rbx), %r12
	cmpq	%r12, %rbp
	jle	.L65
	popq	%rbx
	.cfi_def_cfa_offset 40
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE30:
	.size	solve, .-solve
	.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:
.LFB31:
	.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	16(%rsp), %rsi
	movq	8(%rsp), %rdi
	call	solve
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	leaq	-1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L70
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L70:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE31:
	.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:

//AWTF2019-D
#include<stdio.h>
#include<stdbool.h>
#define prime 10000000019

void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

long long calcul(long long p,long long q,long long z,long long *r,long long *b){
  long long f=0,cnt=0,w,i;
  (*r)=0;(*b)=0;
  if(p<q){f=1;llswap(&p,&q);}
  i=0;
  while(z>=0){
    w=z/q;
    cnt+=(w+1);
    (*r)+=i*(w+1);
    (*b)+=llsankaku(w);
    z-=p;
    i++;
  }
  if(f){llswap(r,b);}
  return cnt;
}

void calc(long long p,long long q,long long k,long long *r,long long *b){
  long long st,fi,te,c;
  st=0;fi=prime*2000;
  while(st<=fi){
    te=(st+fi)/2;
    c=calcul(p,q,te,r,b);
    if(c==k){break;}
    if(c<k){st=te+1;}
    if(c>k){fi=te-1;}
  }
}

typedef struct{
  long long xz;
  long long yz;
}point;

point vector_minus(point a,point b){
  point r;
  r.xz=a.xz-b.xz;
  r.yz=a.yz-b.yz;
  return r;
}

//gaiseki
long long crossproduct(point a,point b){
  return a.xz*b.yz-a.yz*b.xz;
}

bool ispossible(long long r,long long b,long long k){
  long long st,fi,te,zr,zb;
  long long fr,fb,sr,sb;
  st=1;fi=prime-1;
  while(st<=fi){
    te=(st+fi)/2;
    calc(te,prime-te,k,&zr,&zb);
    if(zr<=r && zb<=b){return true;}
    if(zr>r && zb>b){return false;}
    if(zr>r){st=te+1;sr=zr;sb=zb;}
    else{fi=te-1;fr=zr;fb=zb;}
  }
  //Is (r,b) on above the line{(fr,fb),(sr,sb)}(fr<sr)?
  point tg,l1,l2;
  tg.xz=r;tg.yz=b;
  l1.xz=fr;l1.yz=fb;
  l2.xz=sr;l2.yz=sb;
  if(crossproduct(vector_minus(l2,l1),vector_minus(tg,l1))>=0){return true;}
  return false;
}

long long solve(long long r,long long b){
  long long st=0,fi=2222222,te;
  while(st<=fi){
    te=(st+fi)/2;
    if(ispossible(r,b,te)){st=te+1;}
    else{fi=te-1;}
  }
  return fi;
}

int main(){
  long long r,b;
  scanf("%lld%lld",&r,&b);
  printf("%lld\n",solve(r,b)-1);//-1 : empty box
  return 0;
}

8 3

5

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

```c
//AWTF2019-D
#include<stdio.h>
#include<stdbool.h>
#define prime 10000000019

void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

long long calcul(long long p,long long q,long long z,long long *r,long long *b){
  long long f=0,cnt=0,w,i;
  (*r)=0;(*b)=0;
  if(p<q){f=1;llswap(&p,&q);}
  i=0;
  while(z>=0){
    w=z/q;
    cnt+=(w+1);
    (*r)+=i*(w+1);
    (*b)+=llsankaku(w);
    z-=p;
    i++;
  }
  if(f){llswap(r,b);}
  return cnt;
}

void calc(long long p,long long q,long long k,long long *r,long long *b){
  long long st,fi,te,c;
  st=0;fi=prime*2000;
  while(st<=fi){
    te=(st+fi)/2;
    c=calcul(p,q,te,r,b);
    if(c==k){break;}
    if(c<k){st=te+1;}
    if(c>k){fi=te-1;}
  }
}

typedef struct{
  long long xz;
  long long yz;
}point;

point vector_minus(point a,point b){
  point r;
  r.xz=a.xz-b.xz;
  r.yz=a.yz-b.yz;
  return r;
}

//gaiseki
long long crossproduct(point a,point b){
  return a.xz*b.yz-a.yz*b.xz;
}

bool ispossible(long long r,long long b,long long k){
  long long st,fi,te,zr,zb;
  long long fr,fb,sr,sb;
  st=1;fi=prime-1;
  while(st<=fi){
    te=(st+fi)/2;
    calc(te,prime-te,k,&zr,&zb);
    if(zr<=r && zb<=b){return true;}
    if(zr>r && zb>b){return false;}
    if(zr>r){st=te+1;sr=zr;sb=zb;}
    else{fi=te-1;fr=zr;fb=zb;}
  }
  //Is (r,b) on above the line{(fr,fb),(sr,sb)}(fr<sr)?
  point tg,l1,l2;
  tg.xz=r;tg.yz=b;
  l1.xz=fr;l1.yz=fb;
  l2.xz=sr;l2.yz=sb;
  if(crossproduct(vector_minus(l2,l1),vector_minus(tg,l1))>=0){return true;}
  return false;
}

long long solve(long long r,long long b){
  long long st=0,fi=2222222,te;
  while(st<=fi){
    te=(st+fi)/2;
    if(ispossible(r,b,te)){st=te+1;}
    else{fi=te-1;}
  }
  return fi;
}

int main(){
  long long r,b;
  scanf("%lld%lld",&r,&b);
  printf("%lld\n",solve(r,b)-1);//-1 : empty box
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	llswap
	.type	llswap, @function
llswap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	llswap, .-llswap
	.globl	llsankaku
	.type	llsankaku, @function
llsankaku:
.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	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	llsankaku, .-llsankaku
	.globl	calcul
	.type	calcul, @function
calcul:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	$0, (%rax)
	movq	-72(%rbp), %rax
	movq	$0, (%rax)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	$1, -32(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L5:
	movq	$0, -16(%rbp)
	jmp	.L6
.L7:
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	llsankaku
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-40(%rbp), %rax
	subq	%rax, -56(%rbp)
	addq	$1, -16(%rbp)
.L6:
	cmpq	$0, -56(%rbp)
	jns	.L7
	cmpq	$0, -32(%rbp)
	je	.L8
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L8:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	calcul, .-calcul
	.globl	calc
	.type	calc, @function
calc:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movabsq	$20000000038000, %rax
	movq	%rax, -24(%rbp)
	jmp	.L11
.L15:
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdi
	movq	-64(%rbp), %rcx
	movq	-16(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calcul
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L16
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jge	.L14
	movq	-16(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
.L14:
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jle	.L11
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
.L11:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L15
	jmp	.L17
.L16:
	nop
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calc, .-calc
	.globl	vector_minus
	.type	vector_minus, @function
vector_minus:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -32(%rbp)
	movq	%rdi, -24(%rbp)
	movq	%rdx, -48(%rbp)
	movq	%rcx, -40(%rbp)
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	-40(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	vector_minus, .-vector_minus
	.globl	crossproduct
	.type	crossproduct, @function
crossproduct:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -16(%rbp)
	movq	%rdi, -8(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -24(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	imulq	%rdx, %rax
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	crossproduct, .-crossproduct
	.globl	ispossible
	.type	ispossible, @function
ispossible:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%rdi, -184(%rbp)
	movq	%rsi, -192(%rbp)
	movq	%rdx, -200(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	$1, -152(%rbp)
	movabsq	$10000000018, %rax
	movq	%rax, -144(%rbp)
	jmp	.L23
.L28:
	movq	-152(%rbp), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -104(%rbp)
	movabsq	$10000000019, %rax
	subq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	-160(%rbp), %rdi
	leaq	-168(%rbp), %rcx
	movq	-200(%rbp), %rdx
	movq	-104(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calc
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jl	.L24
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L24
	movl	$1, %eax
	jmp	.L30
.L24:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L26
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jge	.L26
	movl	$0, %eax
	jmp	.L30
.L26:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L27
	movq	-104(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -152(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -112(%rbp)
	jmp	.L23
.L27:
	movq	-104(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -144(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -128(%rbp)
.L23:
	movq	-152(%rbp), %rax
	cmpq	-144(%rbp), %rax
	jle	.L28
	movq	-184(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-192(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	-136(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-96(%rbp), %rdi
	movq	-88(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %r12
	movq	%rdx, %r13
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %rcx
	movq	%rdx, %rbx
	movq	%rcx, %rsi
	movq	%rdx, %rax
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	call	crossproduct
	testq	%rax, %rax
	js	.L29
	movl	$1, %eax
	jmp	.L30
.L29:
	movl	$0, %eax
.L30:
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ispossible, .-ispossible
	.globl	solve
	.type	solve, @function
solve:
.LFB7:
	.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	$0, -24(%rbp)
	movq	$2222222, -16(%rbp)
	jmp	.L33
.L35:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	ispossible
	testb	%al, %al
	je	.L34
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
	jmp	.L33
.L34:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16(%rbp)
.L33:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L35
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	solve
	subq	$1, %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	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	llswap
	.type	llswap, @function
llswap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	llswap, .-llswap
	.globl	llsankaku
	.type	llsankaku, @function
llsankaku:
.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	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	llsankaku, .-llsankaku
	.globl	calcul
	.type	calcul, @function
calcul:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	$0, (%rax)
	movq	-72(%rbp), %rax
	movq	$0, (%rax)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L5
	movq	$1, -32(%rbp)
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L5:
	movq	$0, -16(%rbp)
	jmp	.L6
.L7:
	movq	-48(%rbp), %rcx
	movq	-56(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	addq	$1, %rax
	addq	%rax, -24(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	addq	$1, %rax
	imulq	-16(%rbp), %rax
	addq	%rax, %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	llsankaku
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	(%rax), %rax
	addq	%rax, %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-40(%rbp), %rax
	subq	%rax, -56(%rbp)
	addq	$1, -16(%rbp)
.L6:
	cmpq	$0, -56(%rbp)
	jns	.L7
	cmpq	$0, -32(%rbp)
	je	.L8
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	llswap
.L8:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	calcul, .-calcul
	.globl	calc
	.type	calc, @function
calc:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$72, %rsp
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -72(%rbp)
	movq	$0, -32(%rbp)
	movabsq	$20000000038000, %rax
	movq	%rax, -24(%rbp)
	jmp	.L11
.L15:
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-72(%rbp), %rdi
	movq	-64(%rbp), %rcx
	movq	-16(%rbp), %rdx
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calcul
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	.L16
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jge	.L14
	movq	-16(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -32(%rbp)
.L14:
	movq	-8(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jle	.L11
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -24(%rbp)
.L11:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L15
	jmp	.L17
.L16:
	nop
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	calc, .-calc
	.globl	vector_minus
	.type	vector_minus, @function
vector_minus:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -32(%rbp)
	movq	%rdi, -24(%rbp)
	movq	%rdx, -48(%rbp)
	movq	%rcx, -40(%rbp)
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	-40(%rbp), %rdx
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	vector_minus, .-vector_minus
	.globl	crossproduct
	.type	crossproduct, @function
crossproduct:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rsi, %rax
	movq	%rdi, %r8
	movq	%r8, %rsi
	movq	%r9, %rdi
	movq	%rax, %rdi
	movq	%rsi, -16(%rbp)
	movq	%rdi, -8(%rbp)
	movq	%rdx, -32(%rbp)
	movq	%rcx, -24(%rbp)
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	imulq	%rdx, %rax
	movq	-8(%rbp), %rcx
	movq	-32(%rbp), %rdx
	imulq	%rcx, %rdx
	subq	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	crossproduct, .-crossproduct
	.globl	ispossible
	.type	ispossible, @function
ispossible:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$184, %rsp
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	movq	%rdi, -184(%rbp)
	movq	%rsi, -192(%rbp)
	movq	%rdx, -200(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	movq	$1, -152(%rbp)
	movabsq	$10000000018, %rax
	movq	%rax, -144(%rbp)
	jmp	.L23
.L28:
	movq	-152(%rbp), %rdx
	movq	-144(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -104(%rbp)
	movabsq	$10000000019, %rax
	subq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	-160(%rbp), %rdi
	leaq	-168(%rbp), %rcx
	movq	-200(%rbp), %rdx
	movq	-104(%rbp), %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
	call	calc
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jl	.L24
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jl	.L24
	movl	$1, %eax
	jmp	.L30
.L24:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L26
	movq	-160(%rbp), %rax
	cmpq	%rax, -192(%rbp)
	jge	.L26
	movl	$0, %eax
	jmp	.L30
.L26:
	movq	-168(%rbp), %rax
	cmpq	%rax, -184(%rbp)
	jge	.L27
	movq	-104(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -152(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -112(%rbp)
	jmp	.L23
.L27:
	movq	-104(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -144(%rbp)
	movq	-168(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-160(%rbp), %rax
	movq	%rax, -128(%rbp)
.L23:
	movq	-152(%rbp), %rax
	cmpq	-144(%rbp), %rax
	jle	.L28
	movq	-184(%rbp), %rax
	movq	%rax, -96(%rbp)
	movq	-192(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	-136(%rbp), %rax
	movq	%rax, -80(%rbp)
	movq	-128(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	-120(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	-112(%rbp), %rax
	movq	%rax, -56(%rbp)
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-96(%rbp), %rdi
	movq	-88(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %r12
	movq	%rdx, %r13
	movq	-80(%rbp), %rax
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	movq	%rdx, %rcx
	movq	%rax, %rdx
	call	vector_minus
	movq	%rax, %rcx
	movq	%rdx, %rbx
	movq	%rcx, %rsi
	movq	%rdx, %rax
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	call	crossproduct
	testq	%rax, %rax
	js	.L29
	movl	$1, %eax
	jmp	.L30
.L29:
	movl	$0, %eax
.L30:
	movq	-40(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ispossible, .-ispossible
	.globl	solve
	.type	solve, @function
solve:
.LFB7:
	.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	$0, -24(%rbp)
	movq	$2222222, -16(%rbp)
	jmp	.L33
.L35:
	movq	-24(%rbp), %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	ispossible
	testb	%al, %al
	je	.L34
	movq	-8(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -24(%rbp)
	jmp	.L33
.L34:
	movq	-8(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -16(%rbp)
.L33:
	movq	-24(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jle	.L35
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%lld%lld"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.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	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rdx
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	solve
	subq	$1, %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	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
