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>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
typedef long long LL;
typedef long double Lf;
#define in (void)scanf
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
//#define Rep(i,a,n)for(LL i=(LL)(a);i<(LL)(n);i++)
#define rep(i,n)Rep(i,0,n)
#define Repp(i,l,r,k)for(int i=(int)(l);i<(int)(r);i+=(int)(k))
//#define Repp(i,l,r,k)for(LL i=(LL)(l);i<(LL)(r);i+=(LL)(k))
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))
#define MOD 1000000007//998244353,1000000007,1000000009,4999999999999997
int upi(const void* a, const void* b) { return*(int*)a<*(int*)b ? -1 : *(int*)a> * (int*)b ? 1 : 0; }
int downi(const void* a, const void* b) { return*(int*)a<*(int*)b ? 1 : *(int*)a> * (int*)b ? -1 : 0; }
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); } //1,2,3,4,...
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? -1 : *(LL*)a> * (LL*)b ? 1 : 0; }
int downLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? 1 : *(LL*)a> * (LL*)b ? -1 : 0; }
void sortupLL(LL* a, int n) { qsort(a, n, sizeof(LL), upLL); }
void sortdownLL(LL* a, int n) { qsort(a, n, sizeof(LL), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; } // a,b,c,d
int cmp_str(const void* a, const void* b) { return strcmp(*(const char**)a, *(const char**)b); } // aaa,aab
LL gcd(LL p, LL q) { while (q) { LL t = p % q; p = q; q = t; }return p; }
LL modpow(LL a,LL n,int m){LL x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invmodpow(b,p)modpow(b,p-2,p)// a/b≡a*b^{-1}(mod p)...return b^{-1}(mod p)
typedef struct fac { LL n, exp; }F;
LL fact(LL n,F*a){LL x=n,i,j,c=0;for(i=2;i*i<=x;i++){for(j=1;x%i==0;j++)x/=i;if(j>1){a[c].n=i;a[c++].exp=j-1;}}if(x-1){a[c].n=x;a[c++].exp=1;}return c;}
LL nibtan(LL* a,LL n,LL x){LL p=0,q=n/2,r=n-1;while(r-p>1){if(x>=a[q])p=q;if(x<=a[q])r=q;q=(p+r)/2;}return a[p]==x?p:r;}
//snippet

#define N 100009

void run(void) {
	int n, h, a[N], b[N], A = 0, x = 0;
	in("%d%d", &n, &h);
	rep(i, n) {
		in("%d%d", &a[i], &b[i]);
		A = Ma(A, a[i]);
	}
	sortdowni(b, n);
	while (b[x] >= A && h > 0 && x < n) h -= b[x++];
	if (h > 0)x += ceill((Lf)h / (Lf)A);
	printf("%d\n", x);
}

int main(void) {
	int test = 1;
//	in("%d", &test);
	while (test--) {
		run();
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upi
	.type	upi, @function
upi:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upi, .-upi
	.globl	downi
	.type	downi, @function
downi:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L6
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downi, .-downi
	.globl	sortupi
	.type	sortupi, @function
sortupi:
.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortupi, .-sortupi
	.globl	sortdowni
	.type	sortdowni, @function
sortdowni:
.LFB9:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdowni, .-sortdowni
	.globl	upLL
	.type	upLL, @function
upLL:
.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)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L16
.L14:
	movl	$-1, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	upLL, .-upLL
	.globl	downLL
	.type	downLL, @function
downLL:
.LFB11:
	.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L18
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L19
	movl	$-1, %eax
	jmp	.L22
.L19:
	movl	$0, %eax
	jmp	.L22
.L18:
	movl	$1, %eax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	downLL, .-downLL
	.globl	sortupLL
	.type	sortupLL, @function
sortupLL:
.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sortupLL, .-sortupLL
	.globl	sortdownLL
	.type	sortdownLL, @function
sortdownLL:
.LFB13:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	sortdownLL, .-sortdownLL
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB14:
	.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
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB15:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	cmp_str, .-cmp_str
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB16:
	.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)
	jmp	.L30
.L31:
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L30:
	cmpq	$0, -32(%rbp)
	jne	.L31
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	gcd, .-gcd
	.globl	modpow
	.type	modpow, @function
modpow:
.LFB17:
	.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)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L34
.L37:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L36
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L36:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L34:
	cmpq	$0, -32(%rbp)
	jne	.L37
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	modpow, .-modpow
	.globl	fact
	.type	fact, @function
fact:
.LFB18:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -8(%rbp)
	movq	$2, -24(%rbp)
	jmp	.L40
.L44:
	movq	$1, -16(%rbp)
	jmp	.L41
.L42:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -32(%rbp)
	addq	$1, -16(%rbp)
.L41:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L42
	cmpq	$1, -16(%rbp)
	jle	.L43
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	-16(%rbp), %rdx
	subq	$1, %rdx
	movq	%rdx, 8(%rax)
.L43:
	addq	$1, -24(%rbp)
.L40:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -32(%rbp)
	jge	.L44
	cmpq	$1, -32(%rbp)
	je	.L45
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	$1, 8(%rax)
.L45:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	fact, .-fact
	.globl	nibtan
	.type	nibtan, @function
nibtan:
.LFB19:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -8(%rbp)
	jmp	.L48
.L51:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L49
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L49:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jg	.L50
	movq	-16(%rbp), %rax
	movq	%rax, -8(%rbp)
.L50:
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
.L48:
	movq	-8(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L51
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jne	.L52
	movq	-24(%rbp), %rax
	jmp	.L54
.L52:
	movq	-8(%rbp), %rax
.L54:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	nibtan, .-nibtan
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB20:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800108(%rbp)
	movl	$0, -800104(%rbp)
	leaq	-800112(%rbp), %rdx
	leaq	-800116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800100(%rbp)
	jmp	.L56
.L57:
	leaq	-400048(%rbp), %rdx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-800096(%rbp), %rcx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800100(%rbp), %eax
	cltq
	movl	-800096(%rbp,%rax,4), %eax
	movl	-800108(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -800108(%rbp)
	addl	$1, -800100(%rbp)
.L56:
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800100(%rbp)
	jl	.L57
	movl	-800116(%rbp), %edx
	leaq	-400048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortdowni
	jmp	.L58
.L60:
	movl	-800104(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -800104(%rbp)
	cltq
	movl	-400048(%rbp,%rax,4), %edx
	movl	-800112(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -800112(%rbp)
.L58:
	movl	-800104(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cmpl	%eax, -800108(%rbp)
	jg	.L59
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L59
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800104(%rbp)
	jl	.L60
.L59:
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L61
	fildl	-800104(%rbp)
	fstpt	-800160(%rbp)
	movl	-800112(%rbp), %eax
	movl	%eax, -800136(%rbp)
	fildl	-800136(%rbp)
	fildl	-800108(%rbp)
	fdivrp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	ceill@PLT
	addq	$16, %rsp
	fldt	-800160(%rbp)
	faddp	%st, %st(1)
	fnstcw	-800130(%rbp)
	movzwl	-800130(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -800132(%rbp)
	fldcw	-800132(%rbp)
	fistpl	-800104(%rbp)
	fldcw	-800130(%rbp)
.L61:
	movl	-800104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB21:
	.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	$1, -4(%rbp)
	jmp	.L65
.L66:
	call	run
.L65:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L66
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.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	upi
	.type	upi, @function
upi:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upi, .-upi
	.p2align 4
	.globl	downi
	.type	downi, @function
downi:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downi, .-downi
	.p2align 4
	.globl	upLL
	.type	upLL, @function
upLL:
.LFB55:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	upLL, .-upLL
	.p2align 4
	.globl	downLL
	.type	downLL, @function
downLL:
.LFB56:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L11
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L11:
	ret
	.cfi_endproc
.LFE56:
	.size	downLL, .-downLL
	.p2align 4
	.globl	sortupi
	.type	sortupi, @function
sortupi:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upi(%rip), %rcx
	movl	$4, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortupi, .-sortupi
	.p2align 4
	.globl	sortdowni
	.type	sortdowni, @function
sortdowni:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downi(%rip), %rcx
	movl	$4, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdowni, .-sortdowni
	.p2align 4
	.globl	sortupLL
	.type	sortupLL, @function
sortupLL:
.LFB57:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upLL(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE57:
	.size	sortupLL, .-sortupLL
	.p2align 4
	.globl	sortdownLL
	.type	sortdownLL, @function
sortdownLL:
.LFB58:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downLL(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE58:
	.size	sortdownLL, .-sortdownLL
	.p2align 4
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB59:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE59:
	.size	cmp_char, .-cmp_char
	.p2align 4
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB60:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rsi
	movq	(%rdi), %rdi
	jmp	strcmp@PLT
	.cfi_endproc
.LFE60:
	.size	cmp_str, .-cmp_str
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB61:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	testq	%rsi, %rsi
	je	.L23
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L22
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE61:
	.size	gcd, .-gcd
	.p2align 4
	.globl	modpow
	.type	modpow, @function
modpow:
.LFB62:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L25
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %sil
	je	.L27
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L27:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L28
.L25:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE62:
	.size	modpow, .-modpow
	.p2align 4
	.globl	fact
	.type	fact, @function
fact:
.LFB63:
	.cfi_startproc
	endbr64
	movq	%rsi, %r10
	movq	%rdi, %rcx
	xorl	%r9d, %r9d
	movl	$2, %esi
	cmpq	$3, %rdi
	jle	.L36
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L38
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%rcx, %rax
	movq	%rdi, %r8
	addq	$1, %rdi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L37
	movq	%r9, %rax
	movq	%rsi, %xmm0
	movq	%r8, %xmm1
	addq	$1, %r9
	salq	$4, %rax
	punpcklqdq	%xmm1, %xmm0
	movups	%xmm0, (%r10,%rax)
.L38:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L35
.L36:
	cmpq	$1, %rcx
	je	.L34
	movq	%r9, %rax
	addq	$1, %r9
	salq	$4, %rax
	addq	%rax, %r10
	movq	%rcx, (%r10)
	movq	$1, 8(%r10)
.L34:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE63:
	.size	fact, .-fact
	.p2align 4
	.globl	nibtan
	.type	nibtan, @function
nibtan:
.LFB64:
	.cfi_startproc
	endbr64
	movq	%rsi, %rax
	xorl	%r8d, %r8d
	shrq	$63, %rax
	addq	%rsi, %rax
	subq	$1, %rsi
	sarq	%rax
	cmpq	$1, %rsi
	jg	.L54
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%rax, %r8
	je	.L50
.L52:
	leaq	(%rsi,%r8), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	movq	%rsi, %rcx
	subq	%r8, %rcx
	sarq	%rax
	cmpq	$1, %rcx
	jle	.L59
.L54:
	cmpq	%rdx, (%rdi,%rax,8)
	jle	.L60
	movq	%rax, %rsi
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L59:
	leaq	(%rdi,%r8,8), %rdi
.L51:
	cmpq	%rdx, (%rdi)
	cmovne	%rsi, %r8
.L50:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE64:
	.size	nibtan, .-nibtan
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB65:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1408, %rsp
	.cfi_def_cfa_offset 800176
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	28(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rsi
	testl	%esi, %esi
	jle	.L76
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	32(%rsp), %r14
	leaq	400080(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	0(,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	leaq	(%r12,%rsi), %rdx
	addq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	24(%rsp), %rsi
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L63
.L62:
	leaq	downi(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	400080(%rsp), %ecx
	movl	28(%rsp), %eax
	xorl	%edx, %edx
	cmpl	%ebp, %ecx
	jl	.L65
	movl	28(%rsp), %r9d
	movl	24(%rsp), %r8d
	xorl	%edi, %edi
	xorl	%edx, %edx
	leaq	400084(%rsp), %rsi
	movl	%r9d, %eax
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L68:
	cmpl	%edx, %r8d
	jle	.L86
	addq	$4, %rsi
	subl	%ecx, %eax
	addl	$1, %edx
	movl	$1, %edi
	movl	-4(%rsi), %ecx
	cmpl	%ebp, %ecx
	jl	.L67
.L66:
	testl	%eax, %eax
	jg	.L68
	testb	%dil, %dil
	je	.L70
	movl	%eax, 28(%rsp)
.L70:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L87
	addq	$800128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
.L67:
	.cfi_restore_state
	movl	%eax, 28(%rsp)
.L65:
	testl	%eax, %eax
	jle	.L70
.L74:
	fnstcw	14(%rsp)
	movl	%eax, 4(%rsp)
	fildl	4(%rsp)
	movl	%ebp, 4(%rsp)
	fildl	4(%rsp)
	movzwl	14(%rsp), %eax
	movl	%edx, 4(%rsp)
	andb	$-13, %ah
	fdivrp	%st, %st(1)
	orb	$8, %ah
	movw	%ax, 12(%rsp)
	movzwl	14(%rsp), %eax
	orb	$12, %ah
	movw	%ax, 10(%rsp)
	fldcw	12(%rsp)
	frndint
	fldcw	14(%rsp)
	fildl	4(%rsp)
	faddp	%st, %st(1)
	fldcw	10(%rsp)
	fistpl	4(%rsp)
	fldcw	14(%rsp)
	movl	4(%rsp), %edx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L86:
	testb	%dil, %dil
	je	.L77
	movl	%eax, 28(%rsp)
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L76:
	xorl	%ebp, %ebp
	leaq	400080(%rsp), %r12
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%r9d, %eax
	jmp	.L74
.L87:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB66:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE66:
	.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	upi
	.type	upi, @function
upi:
.LFB51:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upi, .-upi
	.p2align 4
	.globl	downi
	.type	downi, @function
downi:
.LFB52:
	.cfi_startproc
	endbr64
	movl	(%rsi), %edx
	movl	$1, %eax
	cmpl	%edx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downi, .-downi
	.p2align 4
	.globl	upLL
	.type	upLL, @function
upLL:
.LFB55:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE55:
	.size	upLL, .-upLL
	.p2align 4
	.globl	downLL
	.type	downLL, @function
downLL:
.LFB56:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L11
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L11:
	ret
	.cfi_endproc
.LFE56:
	.size	downLL, .-downLL
	.p2align 4
	.globl	sortupi
	.type	sortupi, @function
sortupi:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upi(%rip), %rcx
	movl	$4, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortupi, .-sortupi
	.p2align 4
	.globl	sortdowni
	.type	sortdowni, @function
sortdowni:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downi(%rip), %rcx
	movl	$4, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdowni, .-sortdowni
	.p2align 4
	.globl	sortupLL
	.type	sortupLL, @function
sortupLL:
.LFB57:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upLL(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE57:
	.size	sortupLL, .-sortupLL
	.p2align 4
	.globl	sortdownLL
	.type	sortdownLL, @function
sortdownLL:
.LFB58:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downLL(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE58:
	.size	sortdownLL, .-sortdownLL
	.p2align 4
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB59:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movsbl	(%rsi), %edx
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE59:
	.size	cmp_char, .-cmp_char
	.p2align 4
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB60:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rsi
	movq	(%rdi), %rdi
	jmp	strcmp@PLT
	.cfi_endproc
.LFE60:
	.size	cmp_str, .-cmp_str
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB61:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %rdx
	testq	%rsi, %rsi
	je	.L23
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rdx, %r8
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L22
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE61:
	.size	gcd, .-gcd
	.p2align 4
	.globl	modpow
	.type	modpow, @function
modpow:
.LFB62:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L25
	.p2align 4,,10
	.p2align 3
.L28:
	testb	$1, %sil
	je	.L27
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L27:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L28
.L25:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE62:
	.size	modpow, .-modpow
	.p2align 4
	.globl	fact
	.type	fact, @function
fact:
.LFB63:
	.cfi_startproc
	endbr64
	movq	%rsi, %r10
	movq	%rdi, %rcx
	xorl	%r9d, %r9d
	movl	$2, %esi
	cmpq	$3, %rdi
	jle	.L36
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rcx, %rax
	movl	$1, %edi
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L38
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%rcx, %rax
	movq	%rdi, %r8
	addq	$1, %rdi
	cqto
	idivq	%rsi
	cqto
	movq	%rax, %rcx
	idivq	%rsi
	testq	%rdx, %rdx
	je	.L37
	movq	%r9, %rax
	movq	%rsi, %xmm0
	movq	%r8, %xmm1
	addq	$1, %r9
	salq	$4, %rax
	punpcklqdq	%xmm1, %xmm0
	movups	%xmm0, (%r10,%rax)
.L38:
	addq	$1, %rsi
	movq	%rsi, %rax
	imulq	%rsi, %rax
	cmpq	%rcx, %rax
	jle	.L35
.L36:
	cmpq	$1, %rcx
	je	.L34
	movq	%r9, %rax
	addq	$1, %r9
	salq	$4, %rax
	addq	%rax, %r10
	movq	%rcx, (%r10)
	movq	$1, 8(%r10)
.L34:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE63:
	.size	fact, .-fact
	.p2align 4
	.globl	nibtan
	.type	nibtan, @function
nibtan:
.LFB64:
	.cfi_startproc
	endbr64
	movq	%rsi, %rax
	xorl	%r8d, %r8d
	shrq	$63, %rax
	addq	%rsi, %rax
	subq	$1, %rsi
	sarq	%rax
	cmpq	$1, %rsi
	jg	.L54
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L60:
	movq	%rax, %r8
	je	.L50
.L52:
	leaq	(%rsi,%r8), %rcx
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	movq	%rsi, %rcx
	subq	%r8, %rcx
	sarq	%rax
	cmpq	$1, %rcx
	jle	.L59
.L54:
	cmpq	%rdx, (%rdi,%rax,8)
	jle	.L60
	movq	%rax, %rsi
	jmp	.L52
	.p2align 4,,10
	.p2align 3
.L59:
	leaq	(%rdi,%r8,8), %rdi
.L51:
	cmpq	%rdx, (%rdi)
	cmovne	%rsi, %r8
.L50:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE64:
	.size	nibtan, .-nibtan
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB65:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798768
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1408, %rsp
	.cfi_def_cfa_offset 800176
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 800120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	28(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movslq	24(%rsp), %rsi
	testl	%esi, %esi
	jle	.L76
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	32(%rsp), %r14
	leaq	400080(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	0(,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	leaq	(%r12,%rsi), %rdx
	addq	%r14, %rsi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	movslq	24(%rsp), %rsi
	cmpl	%eax, %ebp
	cmovl	%eax, %ebp
	addq	$1, %rbx
	cmpl	%ebx, %esi
	jg	.L63
.L62:
	leaq	downi(%rip), %rcx
	movl	$4, %edx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	400080(%rsp), %ecx
	movl	28(%rsp), %eax
	xorl	%edx, %edx
	cmpl	%ebp, %ecx
	jl	.L65
	movl	28(%rsp), %r9d
	movl	24(%rsp), %r8d
	xorl	%edi, %edi
	xorl	%edx, %edx
	leaq	400084(%rsp), %rsi
	movl	%r9d, %eax
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L68:
	cmpl	%edx, %r8d
	jle	.L86
	addq	$4, %rsi
	subl	%ecx, %eax
	addl	$1, %edx
	movl	$1, %edi
	movl	-4(%rsi), %ecx
	cmpl	%ebp, %ecx
	jl	.L67
.L66:
	testl	%eax, %eax
	jg	.L68
	testb	%dil, %dil
	je	.L70
	movl	%eax, 28(%rsp)
.L70:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	800120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L87
	addq	$800128, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	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
.L67:
	.cfi_restore_state
	movl	%eax, 28(%rsp)
.L65:
	testl	%eax, %eax
	jle	.L70
.L74:
	fnstcw	14(%rsp)
	movl	%eax, 4(%rsp)
	fildl	4(%rsp)
	movl	%ebp, 4(%rsp)
	fildl	4(%rsp)
	movzwl	14(%rsp), %eax
	movl	%edx, 4(%rsp)
	andb	$-13, %ah
	fdivrp	%st, %st(1)
	orb	$8, %ah
	movw	%ax, 12(%rsp)
	movzwl	14(%rsp), %eax
	orb	$12, %ah
	movw	%ax, 10(%rsp)
	fldcw	12(%rsp)
	frndint
	fldcw	14(%rsp)
	fildl	4(%rsp)
	faddp	%st, %st(1)
	fldcw	10(%rsp)
	fistpl	4(%rsp)
	fldcw	14(%rsp)
	movl	4(%rsp), %edx
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L86:
	testb	%dil, %dil
	je	.L77
	movl	%eax, 28(%rsp)
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L76:
	xorl	%ebp, %ebp
	leaq	400080(%rsp), %r12
	jmp	.L62
	.p2align 4,,10
	.p2align 3
.L77:
	movl	%r9d, %eax
	jmp	.L74
.L87:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE65:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB66:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE66:
	.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>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
typedef long long LL;
typedef long double Lf;
#define in (void)scanf
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
//#define Rep(i,a,n)for(LL i=(LL)(a);i<(LL)(n);i++)
#define rep(i,n)Rep(i,0,n)
#define Repp(i,l,r,k)for(int i=(int)(l);i<(int)(r);i+=(int)(k))
//#define Repp(i,l,r,k)for(LL i=(LL)(l);i<(LL)(r);i+=(LL)(k))
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))
#define MOD 1000000007//998244353,1000000007,1000000009,4999999999999997
int upi(const void* a, const void* b) { return*(int*)a<*(int*)b ? -1 : *(int*)a> * (int*)b ? 1 : 0; }
int downi(const void* a, const void* b) { return*(int*)a<*(int*)b ? 1 : *(int*)a> * (int*)b ? -1 : 0; }
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); } //1,2,3,4,...
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? -1 : *(LL*)a> * (LL*)b ? 1 : 0; }
int downLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? 1 : *(LL*)a> * (LL*)b ? -1 : 0; }
void sortupLL(LL* a, int n) { qsort(a, n, sizeof(LL), upLL); }
void sortdownLL(LL* a, int n) { qsort(a, n, sizeof(LL), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; } // a,b,c,d
int cmp_str(const void* a, const void* b) { return strcmp(*(const char**)a, *(const char**)b); } // aaa,aab
LL gcd(LL p, LL q) { while (q) { LL t = p % q; p = q; q = t; }return p; }
LL modpow(LL a,LL n,int m){LL x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invmodpow(b,p)modpow(b,p-2,p)// a/b≡a*b^{-1}(mod p)...return b^{-1}(mod p)
typedef struct fac { LL n, exp; }F;
LL fact(LL n,F*a){LL x=n,i,j,c=0;for(i=2;i*i<=x;i++){for(j=1;x%i==0;j++)x/=i;if(j>1){a[c].n=i;a[c++].exp=j-1;}}if(x-1){a[c].n=x;a[c++].exp=1;}return c;}
LL nibtan(LL* a,LL n,LL x){LL p=0,q=n/2,r=n-1;while(r-p>1){if(x>=a[q])p=q;if(x<=a[q])r=q;q=(p+r)/2;}return a[p]==x?p:r;}
//snippet

#define N 100009

void run(void) {
	int n, h, a[N], b[N], A = 0, x = 0;
	in("%d%d", &n, &h);
	rep(i, n) {
		in("%d%d", &a[i], &b[i]);
		A = Ma(A, a[i]);
	}
	sortdowni(b, n);
	while (b[x] >= A && h > 0 && x < n) h -= b[x++];
	if (h > 0)x += ceill((Lf)h / (Lf)A);
	printf("%d\n", x);
}

int main(void) {
	int test = 1;
//	in("%d", &test);
	while (test--) {
		run();
	}
	return 0;
}
4 1000000000
1 1
1 00000000
1 30000000
1 99999999
 1 10
4 5
 2 10
2 5
2 6
 5 500
35 44
28 83
46 62
31 79
0 43
 4 1000000000
1 1
1 00000000
1 30000000
1 164820504
 2 19
2 5
2 6
 2 19
4 5
2 6
 4 1000000000
1 1
1 00000000
0 30000000
2 164820504
 2 19
4 5
2 4
 3 500
35 44
28 83
46 62
22 79
0 81

870000003
 3
 2
 9
 805179498
 6
 4
 402589750
 5
 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>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
typedef long long LL;
typedef long double Lf;
#define in (void)scanf
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
//#define Rep(i,a,n)for(LL i=(LL)(a);i<(LL)(n);i++)
#define rep(i,n)Rep(i,0,n)
#define Repp(i,l,r,k)for(int i=(int)(l);i<(int)(r);i+=(int)(k))
//#define Repp(i,l,r,k)for(LL i=(LL)(l);i<(LL)(r);i+=(LL)(k))
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))
#define MOD 1000000007//998244353,1000000007,1000000009,4999999999999997
int upi(const void* a, const void* b) { return*(int*)a<*(int*)b ? -1 : *(int*)a> * (int*)b ? 1 : 0; }
int downi(const void* a, const void* b) { return*(int*)a<*(int*)b ? 1 : *(int*)a> * (int*)b ? -1 : 0; }
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); } //1,2,3,4,...
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? -1 : *(LL*)a> * (LL*)b ? 1 : 0; }
int downLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? 1 : *(LL*)a> * (LL*)b ? -1 : 0; }
void sortupLL(LL* a, int n) { qsort(a, n, sizeof(LL), upLL); }
void sortdownLL(LL* a, int n) { qsort(a, n, sizeof(LL), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; } // a,b,c,d
int cmp_str(const void* a, const void* b) { return strcmp(*(const char**)a, *(const char**)b); } // aaa,aab
LL gcd(LL p, LL q) { while (q) { LL t = p % q; p = q; q = t; }return p; }
LL modpow(LL a,LL n,int m){LL x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invmodpow(b,p)modpow(b,p-2,p)// a/b≡a*b^{-1}(mod p)...return b^{-1}(mod p)
typedef struct fac { LL n, exp; }F;
LL fact(LL n,F*a){LL x=n,i,j,c=0;for(i=2;i*i<=x;i++){for(j=1;x%i==0;j++)x/=i;if(j>1){a[c].n=i;a[c++].exp=j-1;}}if(x-1){a[c].n=x;a[c++].exp=1;}return c;}
LL nibtan(LL* a,LL n,LL x){LL p=0,q=n/2,r=n-1;while(r-p>1){if(x>=a[q])p=q;if(x<=a[q])r=q;q=(p+r)/2;}return a[p]==x?p:r;}
//snippet

#define N 100009

void run(void) {
	int n, h, a[N], b[N], A = 0, x = 0;
	in("%d%d", &n, &h);
	rep(i, n) {
		in("%d%d", &a[i], &b[i]);
		A = Ma(A, a[i]);
	}
	sortdowni(b, n);
	while (b[x] >= A && h > 0 && x < n) h -= b[x++];
	if (h > 0)x += ceill((Lf)h / (Lf)A);
	printf("%d\n", x);
}

int main(void) {
	int test = 1;
//	in("%d", &test);
	while (test--) {
		run();
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upi
	.type	upi, @function
upi:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upi, .-upi
	.globl	downi
	.type	downi, @function
downi:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L6
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downi, .-downi
	.globl	sortupi
	.type	sortupi, @function
sortupi:
.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortupi, .-sortupi
	.globl	sortdowni
	.type	sortdowni, @function
sortdowni:
.LFB9:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdowni, .-sortdowni
	.globl	upLL
	.type	upLL, @function
upLL:
.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)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L16
.L14:
	movl	$-1, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	upLL, .-upLL
	.globl	downLL
	.type	downLL, @function
downLL:
.LFB11:
	.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L18
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L19
	movl	$-1, %eax
	jmp	.L22
.L19:
	movl	$0, %eax
	jmp	.L22
.L18:
	movl	$1, %eax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	downLL, .-downLL
	.globl	sortupLL
	.type	sortupLL, @function
sortupLL:
.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sortupLL, .-sortupLL
	.globl	sortdownLL
	.type	sortdownLL, @function
sortdownLL:
.LFB13:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	sortdownLL, .-sortdownLL
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB14:
	.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
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB15:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	cmp_str, .-cmp_str
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB16:
	.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)
	jmp	.L30
.L31:
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L30:
	cmpq	$0, -32(%rbp)
	jne	.L31
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	gcd, .-gcd
	.globl	modpow
	.type	modpow, @function
modpow:
.LFB17:
	.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)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L34
.L37:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L36
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L36:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L34:
	cmpq	$0, -32(%rbp)
	jne	.L37
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	modpow, .-modpow
	.globl	fact
	.type	fact, @function
fact:
.LFB18:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -8(%rbp)
	movq	$2, -24(%rbp)
	jmp	.L40
.L44:
	movq	$1, -16(%rbp)
	jmp	.L41
.L42:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -32(%rbp)
	addq	$1, -16(%rbp)
.L41:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L42
	cmpq	$1, -16(%rbp)
	jle	.L43
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	-16(%rbp), %rdx
	subq	$1, %rdx
	movq	%rdx, 8(%rax)
.L43:
	addq	$1, -24(%rbp)
.L40:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -32(%rbp)
	jge	.L44
	cmpq	$1, -32(%rbp)
	je	.L45
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	$1, 8(%rax)
.L45:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	fact, .-fact
	.globl	nibtan
	.type	nibtan, @function
nibtan:
.LFB19:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -8(%rbp)
	jmp	.L48
.L51:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L49
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L49:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jg	.L50
	movq	-16(%rbp), %rax
	movq	%rax, -8(%rbp)
.L50:
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
.L48:
	movq	-8(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L51
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jne	.L52
	movq	-24(%rbp), %rax
	jmp	.L54
.L52:
	movq	-8(%rbp), %rax
.L54:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	nibtan, .-nibtan
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB20:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800108(%rbp)
	movl	$0, -800104(%rbp)
	leaq	-800112(%rbp), %rdx
	leaq	-800116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800100(%rbp)
	jmp	.L56
.L57:
	leaq	-400048(%rbp), %rdx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-800096(%rbp), %rcx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800100(%rbp), %eax
	cltq
	movl	-800096(%rbp,%rax,4), %eax
	movl	-800108(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -800108(%rbp)
	addl	$1, -800100(%rbp)
.L56:
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800100(%rbp)
	jl	.L57
	movl	-800116(%rbp), %edx
	leaq	-400048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortdowni
	jmp	.L58
.L60:
	movl	-800104(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -800104(%rbp)
	cltq
	movl	-400048(%rbp,%rax,4), %edx
	movl	-800112(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -800112(%rbp)
.L58:
	movl	-800104(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cmpl	%eax, -800108(%rbp)
	jg	.L59
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L59
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800104(%rbp)
	jl	.L60
.L59:
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L61
	fildl	-800104(%rbp)
	fstpt	-800160(%rbp)
	movl	-800112(%rbp), %eax
	movl	%eax, -800136(%rbp)
	fildl	-800136(%rbp)
	fildl	-800108(%rbp)
	fdivrp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	ceill@PLT
	addq	$16, %rsp
	fldt	-800160(%rbp)
	faddp	%st, %st(1)
	fnstcw	-800130(%rbp)
	movzwl	-800130(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -800132(%rbp)
	fldcw	-800132(%rbp)
	fistpl	-800104(%rbp)
	fldcw	-800130(%rbp)
.L61:
	movl	-800104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB21:
	.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	$1, -4(%rbp)
	jmp	.L65
.L66:
	call	run
.L65:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L66
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.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	upi
	.type	upi, @function
upi:
.LFB6:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L2
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upi, .-upi
	.globl	downi
	.type	downi, @function
downi:
.LFB7:
	.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jl	.L6
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downi, .-downi
	.globl	sortupi
	.type	sortupi, @function
sortupi:
.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortupi, .-sortupi
	.globl	sortdowni
	.type	sortdowni, @function
sortdowni:
.LFB9:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downi(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdowni, .-sortdowni
	.globl	upLL
	.type	upLL, @function
upLL:
.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)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L14
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L16
.L14:
	movl	$-1, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	upLL, .-upLL
	.globl	downLL
	.type	downLL, @function
downLL:
.LFB11:
	.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L18
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L19
	movl	$-1, %eax
	jmp	.L22
.L19:
	movl	$0, %eax
	jmp	.L22
.L18:
	movl	$1, %eax
.L22:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	downLL, .-downLL
	.globl	sortupLL
	.type	sortupLL, @function
sortupLL:
.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sortupLL, .-sortupLL
	.globl	sortdownLL
	.type	sortdownLL, @function
sortdownLL:
.LFB13:
	.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)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downLL(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	sortdownLL, .-sortdownLL
	.globl	cmp_char
	.type	cmp_char, @function
cmp_char:
.LFB14:
	.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
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cmp_char, .-cmp_char
	.globl	cmp_str
	.type	cmp_str, @function
cmp_str:
.LFB15:
	.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)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	cmp_str, .-cmp_str
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB16:
	.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)
	jmp	.L30
.L31:
	movq	-24(%rbp), %rax
	cqto
	idivq	-32(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, -32(%rbp)
.L30:
	cmpq	$0, -32(%rbp)
	jne	.L31
	movq	-24(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	gcd, .-gcd
	.globl	modpow
	.type	modpow, @function
modpow:
.LFB17:
	.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)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L34
.L37:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L36
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L36:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L34:
	cmpq	$0, -32(%rbp)
	jne	.L37
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	modpow, .-modpow
	.globl	fact
	.type	fact, @function
fact:
.LFB18:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -8(%rbp)
	movq	$2, -24(%rbp)
	jmp	.L40
.L44:
	movq	$1, -16(%rbp)
	jmp	.L41
.L42:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rax, -32(%rbp)
	addq	$1, -16(%rbp)
.L41:
	movq	-32(%rbp), %rax
	cqto
	idivq	-24(%rbp)
	movq	%rdx, %rax
	testq	%rax, %rax
	je	.L42
	cmpq	$1, -16(%rbp)
	jle	.L43
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	-16(%rbp), %rdx
	subq	$1, %rdx
	movq	%rdx, 8(%rax)
.L43:
	addq	$1, -24(%rbp)
.L40:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	cmpq	%rax, -32(%rbp)
	jge	.L44
	cmpq	$1, -32(%rbp)
	je	.L45
	movq	-8(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	$1, 8(%rax)
.L45:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	fact, .-fact
	.globl	nibtan
	.type	nibtan, @function
nibtan:
.LFB19:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	$0, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -8(%rbp)
	jmp	.L48
.L51:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jl	.L49
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L49:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jg	.L50
	movq	-16(%rbp), %rax
	movq	%rax, -8(%rbp)
.L50:
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -16(%rbp)
.L48:
	movq	-8(%rbp), %rax
	subq	-24(%rbp), %rax
	cmpq	$1, %rax
	jg	.L51
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-40(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -56(%rbp)
	jne	.L52
	movq	-24(%rbp), %rax
	jmp	.L54
.L52:
	movq	-8(%rbp), %rax
.L54:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	nibtan, .-nibtan
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	run
	.type	run, @function
run:
.LFB20:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-798720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1440, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -800108(%rbp)
	movl	$0, -800104(%rbp)
	leaq	-800112(%rbp), %rdx
	leaq	-800116(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -800100(%rbp)
	jmp	.L56
.L57:
	leaq	-400048(%rbp), %rdx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-800096(%rbp), %rcx
	movl	-800100(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-800100(%rbp), %eax
	cltq
	movl	-800096(%rbp,%rax,4), %eax
	movl	-800108(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -800108(%rbp)
	addl	$1, -800100(%rbp)
.L56:
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800100(%rbp)
	jl	.L57
	movl	-800116(%rbp), %edx
	leaq	-400048(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortdowni
	jmp	.L58
.L60:
	movl	-800104(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -800104(%rbp)
	cltq
	movl	-400048(%rbp,%rax,4), %edx
	movl	-800112(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, -800112(%rbp)
.L58:
	movl	-800104(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cmpl	%eax, -800108(%rbp)
	jg	.L59
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L59
	movl	-800116(%rbp), %eax
	cmpl	%eax, -800104(%rbp)
	jl	.L60
.L59:
	movl	-800112(%rbp), %eax
	testl	%eax, %eax
	jle	.L61
	fildl	-800104(%rbp)
	fstpt	-800160(%rbp)
	movl	-800112(%rbp), %eax
	movl	%eax, -800136(%rbp)
	fildl	-800136(%rbp)
	fildl	-800108(%rbp)
	fdivrp	%st, %st(1)
	leaq	-16(%rsp), %rsp
	fstpt	(%rsp)
	call	ceill@PLT
	addq	$16, %rsp
	fldt	-800160(%rbp)
	faddp	%st, %st(1)
	fnstcw	-800130(%rbp)
	movzwl	-800130(%rbp), %eax
	orb	$12, %ah
	movw	%ax, -800132(%rbp)
	fldcw	-800132(%rbp)
	fistpl	-800104(%rbp)
	fldcw	-800130(%rbp)
.L61:
	movl	-800104(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	run, .-run
	.globl	main
	.type	main, @function
main:
.LFB21:
	.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	$1, -4(%rbp)
	jmp	.L65
.L66:
	call	run
.L65:
	movl	-4(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -4(%rbp)
	testl	%eax, %eax
	jne	.L66
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.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:
