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 ld;
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define rrep(i,l,r)for(ll i=(l);i>=(r);i--)
#define INF (1LL<<60)
#define MOD1 1000000007
#define MOD2 998244353
#define MAX_N (1 << 17)
#define YES printf("Yes\n")
#define NO printf("No\n")
#define PN printf("\n")

void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}
ll max2(ll a,ll b){return a>=b?a:b;}
ll min2(ll a,ll b){return a>=b?b:a;}
ll min3(ll a, ll b, ll c){return (a<=b && a<=c) ? a : b<=c ? b : c;}
ll max3(ll a, ll b, ll c){return (a>=b && a>=c) ? a : b>=c ? b : c;}
ll minn(ll n, ll a[n]){ll b=INF;rep(i,0,n) b=min2(b,a[i]);return b;}
ll maxn(ll n, ll a[n]){ll b=-INF;rep(i,0,n) b=max2(b,a[i]);return b;}
ll ABS(ll a){return a>=0?a:(-a);}
ll POW(ll a, ll b){ll c=1;rep(i,0,b) c*=a;return c;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll mod(ll n){return n%=MOD1;}
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 sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

typedef struct{ ll a , b;}fr;
int cmp1( const void *p, const void *q ) { return ((fr*)p) ->a - ((fr*)q)->a;}
int cmp2( const void *p, const void *q ) { return ((fr*)q) ->a - ((fr*)p)->a;}
void strsortup(fr*a,int n){qsort(a,n,sizeof(fr),cmp1);}
void strsortdown(fr*a,int n){qsort(a,n,sizeof(fr),cmp2);}

int main(void){
    char s[100005];
    ll n,ans=0,g=0,p=0;
    scanf("%s",s);
    n=strlen(s);
    rep(i,0,n){
        if(s[i]=='g') g++;
        else p++;
    }
    if(n%2) ans=(ABS(p-g)-1)/2;
    else ans=ABS(p-g)/2;
    printf("%lld\n",ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	max2
	.type	max2, @function
max2:
.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max2, .-max2
	.globl	min2
	.type	min2, @function
min2:
.LFB8:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	min2, .-min2
	.globl	min3
	.type	min3, @function
min3:
.LFB9:
	.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jg	.L7
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	jmp	.L10
.L8:
	movq	-8(%rbp), %rax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	min3, .-min3
	.globl	max3
	.type	max3, @function
max3:
.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L12
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L13
.L12:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	jmp	.L15
.L13:
	movq	-8(%rbp), %rax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	max3, .-max3
	.globl	minn
	.type	minn, @function
minn:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L17
.L18:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L18
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	minn, .-minn
	.globl	maxn
	.type	maxn, @function
maxn:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$-1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L21
.L22:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L21:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L22
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	maxn, .-maxn
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ABS, .-ABS
	.globl	POW
	.type	POW, @function
POW:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L27
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L27:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L28
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	POW, .-POW
	.globl	gcd
	.type	gcd, @function
gcd:
.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)
	cmpq	$0, -16(%rbp)
	je	.L31
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	jmp	.L33
.L31:
	movq	-8(%rbp), %rax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB16:
	.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), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	%rcx
	imulq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	lcm, .-lcm
	.globl	mod
	.type	mod, @function
mod:
.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, -8(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	mod, .-mod
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L39
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L41
.L39:
	movl	$-1, %eax
.L41:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L43
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L44
	movl	$-1, %eax
	jmp	.L47
.L44:
	movl	$0, %eax
	jmp	.L47
.L43:
	movl	$1, %eax
.L47:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB20:
	.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
.LFE20:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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
	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
.LFE21:
	.size	sortdown, .-sortdown
	.globl	cmp1
	.type	cmp1, @function
cmp1:
.LFB22:
	.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), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	cmp1, .-cmp1
	.globl	cmp2
	.type	cmp2, @function
cmp2:
.LFB23:
	.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	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	cmp2, .-cmp2
	.globl	strsortup
	.type	strsortup, @function
strsortup:
.LFB24:
	.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	cmp1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	strsortup, .-strsortup
	.globl	strsortdown
	.type	strsortdown, @function
strsortdown:
.LFB25:
	.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	cmp2(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	strsortdown, .-strsortdown
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -100056(%rbp)
	movq	$0, -100048(%rbp)
	movq	$0, -100040(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -100024(%rbp)
	movq	$0, -100032(%rbp)
	jmp	.L57
.L60:
	leaq	-100016(%rbp), %rdx
	movq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$103, %al
	jne	.L58
	addq	$1, -100048(%rbp)
	jmp	.L59
.L58:
	addq	$1, -100040(%rbp)
.L59:
	addq	$1, -100032(%rbp)
.L57:
	movq	-100032(%rbp), %rax
	cmpq	-100024(%rbp), %rax
	jl	.L60
	movq	-100024(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L61
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	subq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
	jmp	.L62
.L61:
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
.L62:
	movq	-100056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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	upll
	.type	upll, @function
upll:
.LFB63:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE63:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB64:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE64:
	.size	downll, .-downll
	.p2align 4
	.globl	cmp1
	.type	cmp1, @function
cmp1:
.LFB67:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE67:
	.size	cmp1, .-cmp1
	.p2align 4
	.globl	cmp2
	.type	cmp2, @function
cmp2:
.LFB68:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE68:
	.size	cmp2, .-cmp2
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	movq	(%rdi), %rdx
	movq	%rdx, (%rsi)
	movq	%rax, (%rdi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	max2
	.type	max2, @function
max2:
.LFB52:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	max2, .-max2
	.p2align 4
	.globl	min2
	.type	min2, @function
min2:
.LFB53:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	min2, .-min2
	.p2align 4
	.globl	min3
	.type	min3, @function
min3:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdx, %rsi
	movq	%rdi, %rax
	cmovg	%rdx, %rsi
	cmpq	%rdi, %rsi
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	min3, .-min3
	.p2align 4
	.globl	max3
	.type	max3, @function
max3:
.LFB55:
	.cfi_startproc
	endbr64
	cmpq	%rdx, %rsi
	movq	%rdi, %rax
	cmovl	%rdx, %rsi
	cmpq	%rdi, %rsi
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	max3, .-max3
	.p2align 4
	.globl	minn
	.type	minn, @function
minn:
.LFB56:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846976, %rax
	testq	%rdi, %rdi
	jle	.L15
	leaq	(%rsi,%rdi,8), %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	.L17
.L15:
	ret
	.cfi_endproc
.LFE56:
	.size	minn, .-minn
	.p2align 4
	.globl	maxn
	.type	maxn, @function
maxn:
.LFB57:
	.cfi_startproc
	endbr64
	movabsq	$-1152921504606846976, %rax
	testq	%rdi, %rdi
	jle	.L20
	leaq	(%rsi,%rdi,8), %rcx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	.L22
.L20:
	ret
	.cfi_endproc
.LFE57:
	.size	maxn, .-maxn
	.p2align 4
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB58:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	negq	%rax
	cmovs	%rdi, %rax
	ret
	.cfi_endproc
.LFE58:
	.size	ABS, .-ABS
	.p2align 4
	.globl	POW
	.type	POW, @function
POW:
.LFB59:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jle	.L29
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rax
	imulq	%rdi, %r8
	cmpq	%rax, %rsi
	jne	.L28
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE59:
	.size	POW, .-POW
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB60:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r8
	testq	%rsi, %rsi
	jne	.L33
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rdx, %r8
.L33:
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L35
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE60:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB61:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L40
	movq	%rdi, %rax
	movq	%rsi, %rcx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rdx, %rcx
.L39:
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L41
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	imulq	%rsi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE61:
	.size	lcm, .-lcm
	.p2align 4
	.globl	mod
	.type	mod, @function
mod:
.LFB62:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE62:
	.size	mod, .-mod
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB65:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE65:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB66:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE66:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	strsortup
	.type	strsortup, @function
strsortup:
.LFB69:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	cmp1(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE69:
	.size	strsortup, .-strsortup
	.p2align 4
	.globl	strsortdown
	.type	strsortdown, @function
strsortdown:
.LFB70:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	cmp2(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE70:
	.size	strsortdown, .-strsortdown
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB71:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L87
	movq	%rax, %rsi
	leaq	-1(%rax), %rax
	cmpq	$14, %rax
	jbe	.L88
	movq	%rsi, %rdx
	pxor	%xmm9, %xmm9
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	andq	$-16, %rdx
	movdqa	%xmm9, %xmm8
	pxor	%xmm4, %xmm4
	movdqa	.LC1(%rip), %xmm7
	movdqa	.LC2(%rip), %xmm6
	addq	%rbx, %rdx
	pxor	%xmm3, %xmm3
	.p2align 4,,10
	.p2align 3
.L50:
	movdqa	%xmm7, %xmm1
	movdqa	%xmm5, %xmm2
	movdqa	%xmm3, %xmm13
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm1
	movdqa	%xmm1, %xmm0
	pandn	%xmm6, %xmm1
	pand	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm11
	punpcklbw	%xmm2, %xmm11
	punpckhbw	%xmm2, %xmm0
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm11, %xmm2
	movdqa	%xmm11, %xmm12
	movdqa	%xmm0, %xmm10
	punpcklwd	%xmm2, %xmm12
	punpckhwd	%xmm2, %xmm11
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	pcmpgtd	%xmm12, %xmm13
	punpcklwd	%xmm2, %xmm10
	punpckhwd	%xmm2, %xmm0
	movdqa	%xmm12, %xmm2
	punpckldq	%xmm13, %xmm2
	punpckhdq	%xmm13, %xmm12
	paddq	%xmm8, %xmm2
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm11, %xmm8
	paddq	%xmm12, %xmm2
	movdqa	%xmm11, %xmm12
	punpckldq	%xmm8, %xmm12
	punpckhdq	%xmm8, %xmm11
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm10, %xmm8
	paddq	%xmm12, %xmm2
	movdqa	%xmm3, %xmm12
	paddq	%xmm11, %xmm2
	movdqa	%xmm10, %xmm11
	punpckldq	%xmm8, %xmm11
	punpckhdq	%xmm8, %xmm10
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm0, %xmm8
	paddq	%xmm11, %xmm2
	paddq	%xmm10, %xmm2
	movdqa	%xmm0, %xmm10
	punpckldq	%xmm8, %xmm10
	punpckhdq	%xmm8, %xmm0
	paddq	%xmm10, %xmm2
	paddq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pcmpgtb	%xmm0, %xmm1
	movdqa	%xmm0, %xmm10
	movdqa	%xmm2, %xmm8
	punpcklbw	%xmm1, %xmm10
	punpckhbw	%xmm1, %xmm0
	movdqa	%xmm4, %xmm1
	pcmpgtw	%xmm10, %xmm1
	movdqa	%xmm10, %xmm11
	movdqa	%xmm0, %xmm2
	punpcklwd	%xmm1, %xmm11
	punpckhwd	%xmm1, %xmm10
	movdqa	%xmm4, %xmm1
	pcmpgtw	%xmm0, %xmm1
	pcmpgtd	%xmm11, %xmm12
	punpcklwd	%xmm1, %xmm2
	punpckhwd	%xmm1, %xmm0
	movdqa	%xmm11, %xmm1
	punpckldq	%xmm12, %xmm1
	punpckhdq	%xmm12, %xmm11
	paddq	%xmm9, %xmm1
	movdqa	%xmm3, %xmm9
	pcmpgtd	%xmm10, %xmm9
	paddq	%xmm11, %xmm1
	movdqa	%xmm10, %xmm11
	punpckldq	%xmm9, %xmm11
	punpckhdq	%xmm9, %xmm10
	movdqa	%xmm3, %xmm9
	pcmpgtd	%xmm2, %xmm9
	paddq	%xmm11, %xmm1
	paddq	%xmm10, %xmm1
	movdqa	%xmm2, %xmm10
	punpckldq	%xmm9, %xmm10
	punpckhdq	%xmm9, %xmm2
	movdqa	%xmm0, %xmm9
	paddq	%xmm10, %xmm1
	paddq	%xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	pcmpgtd	%xmm0, %xmm2
	punpckldq	%xmm2, %xmm9
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm9, %xmm1
	paddq	%xmm0, %xmm1
	movdqa	%xmm1, %xmm9
	cmpq	%rdx, %rax
	jne	.L50
	movdqa	%xmm1, %xmm0
	movq	%rsi, %rdx
	psrldq	$8, %xmm0
	andq	$-16, %rdx
	paddq	%xmm0, %xmm9
	movdqa	%xmm8, %xmm0
	psrldq	$8, %xmm0
	movq	%xmm9, %rax
	paddq	%xmm0, %xmm8
	movq	%xmm8, %rcx
	testb	$15, %sil
	je	.L53
.L49:
	cmpb	$103, (%rsp,%rdx)
	je	.L92
	addq	$1, %rax
.L55:
	leaq	1(%rdx), %rdi
	cmpq	%rsi, %rdi
	jge	.L53
	cmpb	$103, 1(%rsp,%rdx)
	je	.L93
	addq	$1, %rax
.L57:
	leaq	2(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 2(%rsp,%rdx)
	je	.L94
	addq	$1, %rax
.L59:
	leaq	3(%rdx), %rdi
	cmpq	%rsi, %rdi
	jge	.L53
	cmpb	$103, 3(%rsp,%rdx)
	je	.L95
	addq	$1, %rax
.L61:
	leaq	4(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 4(%rsp,%rdx)
	je	.L96
	addq	$1, %rax
.L63:
	leaq	5(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 5(%rsp,%rdx)
	je	.L97
	addq	$1, %rax
.L65:
	leaq	6(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 6(%rsp,%rdx)
	je	.L98
	addq	$1, %rax
.L67:
	leaq	7(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 7(%rsp,%rdx)
	je	.L99
	addq	$1, %rax
.L69:
	leaq	8(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 8(%rsp,%rdx)
	je	.L100
	addq	$1, %rax
.L71:
	leaq	9(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 9(%rsp,%rdx)
	je	.L101
	addq	$1, %rax
.L73:
	leaq	10(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 10(%rsp,%rdx)
	je	.L102
	addq	$1, %rax
.L75:
	leaq	11(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 11(%rsp,%rdx)
	je	.L103
	addq	$1, %rax
.L77:
	leaq	12(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 12(%rsp,%rdx)
	je	.L104
	addq	$1, %rax
.L79:
	leaq	13(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 13(%rsp,%rdx)
	je	.L105
	addq	$1, %rax
.L81:
	addq	$14, %rdx
	cmpq	%rdx, %rsi
	jle	.L53
	cmpb	$103, (%rsp,%rdx)
	je	.L82
	addq	$1, %rax
	.p2align 4,,10
	.p2align 3
.L53:
	subq	%rcx, %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	andl	$1, %esi
	je	.L48
	subq	$1, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
.L85:
	movq	%rax, %rdx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L106
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L87:
	.cfi_restore_state
	xorl	%eax, %eax
.L48:
	sarq	%rax
	jmp	.L85
.L93:
	addq	$1, %rcx
	jmp	.L57
.L92:
	addq	$1, %rcx
	jmp	.L55
.L94:
	addq	$1, %rcx
	jmp	.L59
.L95:
	addq	$1, %rcx
	jmp	.L61
.L101:
	addq	$1, %rcx
	jmp	.L73
.L96:
	addq	$1, %rcx
	jmp	.L63
.L97:
	addq	$1, %rcx
	jmp	.L65
.L98:
	addq	$1, %rcx
	jmp	.L67
.L99:
	addq	$1, %rcx
	jmp	.L69
.L100:
	addq	$1, %rcx
	jmp	.L71
.L88:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L49
.L102:
	addq	$1, %rcx
	jmp	.L75
.L103:
	addq	$1, %rcx
	jmp	.L77
.L104:
	addq	$1, %rcx
	jmp	.L79
.L105:
	addq	$1, %rcx
	jmp	.L81
.L82:
	addq	$1, %rcx
	jmp	.L53
.L106:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE71:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.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	upll
	.type	upll, @function
upll:
.LFB63:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE63:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB64:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE64:
	.size	downll, .-downll
	.p2align 4
	.globl	cmp1
	.type	cmp1, @function
cmp1:
.LFB67:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE67:
	.size	cmp1, .-cmp1
	.p2align 4
	.globl	cmp2
	.type	cmp2, @function
cmp2:
.LFB68:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE68:
	.size	cmp2, .-cmp2
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	movq	(%rdi), %rdx
	movq	%rdx, (%rsi)
	movq	%rax, (%rdi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	max2
	.type	max2, @function
max2:
.LFB52:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovge	%rdi, %rax
	ret
	.cfi_endproc
.LFE52:
	.size	max2, .-max2
	.p2align 4
	.globl	min2
	.type	min2, @function
min2:
.LFB53:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE53:
	.size	min2, .-min2
	.p2align 4
	.globl	min3
	.type	min3, @function
min3:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	%rdx, %rsi
	movq	%rdi, %rax
	cmovg	%rdx, %rsi
	cmpq	%rdi, %rsi
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE54:
	.size	min3, .-min3
	.p2align 4
	.globl	max3
	.type	max3, @function
max3:
.LFB55:
	.cfi_startproc
	endbr64
	cmpq	%rdx, %rsi
	movq	%rdi, %rax
	cmovl	%rdx, %rsi
	cmpq	%rdi, %rsi
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	max3, .-max3
	.p2align 4
	.globl	minn
	.type	minn, @function
minn:
.LFB56:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846976, %rax
	testq	%rdi, %rdi
	jle	.L15
	leaq	(%rsi,%rdi,8), %rcx
	.p2align 4,,10
	.p2align 3
.L17:
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	.L17
.L15:
	ret
	.cfi_endproc
.LFE56:
	.size	minn, .-minn
	.p2align 4
	.globl	maxn
	.type	maxn, @function
maxn:
.LFB57:
	.cfi_startproc
	endbr64
	movabsq	$-1152921504606846976, %rax
	testq	%rdi, %rdi
	jle	.L20
	leaq	(%rsi,%rdi,8), %rcx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	.L22
.L20:
	ret
	.cfi_endproc
.LFE57:
	.size	maxn, .-maxn
	.p2align 4
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB58:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	negq	%rax
	cmovs	%rdi, %rax
	ret
	.cfi_endproc
.LFE58:
	.size	ABS, .-ABS
	.p2align 4
	.globl	POW
	.type	POW, @function
POW:
.LFB59:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	jle	.L29
	xorl	%eax, %eax
	movl	$1, %r8d
	.p2align 4,,10
	.p2align 3
.L28:
	addq	$1, %rax
	imulq	%rdi, %r8
	cmpq	%rax, %rsi
	jne	.L28
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	movl	$1, %r8d
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE59:
	.size	POW, .-POW
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB60:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rsi, %r8
	testq	%rsi, %rsi
	jne	.L33
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rdx, %r8
.L33:
	cqto
	idivq	%r8
	movq	%r8, %rax
	testq	%rdx, %rdx
	jne	.L35
	movq	%r8, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	movq	%rdi, %r8
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE60:
	.size	gcd, .-gcd
	.p2align 4
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB61:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L40
	movq	%rdi, %rax
	movq	%rsi, %rcx
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rdx, %rcx
.L39:
	cqto
	idivq	%rcx
	movq	%rcx, %rax
	testq	%rdx, %rdx
	jne	.L41
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	imulq	%rsi, %rax
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE61:
	.size	lcm, .-lcm
	.p2align 4
	.globl	mod
	.type	mod, @function
mod:
.LFB62:
	.cfi_startproc
	endbr64
	movabsq	$-8543223828751151131, %rdx
	movq	%rdi, %rax
	imulq	%rdx
	leaq	(%rdx,%rdi), %rax
	movq	%rdi, %rdx
	sarq	$63, %rdx
	sarq	$29, %rax
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rdi, %rax
	subq	%rdx, %rax
	ret
	.cfi_endproc
.LFE62:
	.size	mod, .-mod
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB65:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE65:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB66:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE66:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	strsortup
	.type	strsortup, @function
strsortup:
.LFB69:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	cmp1(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE69:
	.size	strsortup, .-strsortup
	.p2align 4
	.globl	strsortdown
	.type	strsortdown, @function
strsortdown:
.LFB70:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	cmp2(%rip), %rcx
	movl	$16, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE70:
	.size	strsortdown, .-strsortdown
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB71:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-98304(%rsp), %r11
	.cfi_def_cfa 11, 98320
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1712, %rsp
	.cfi_def_cfa_offset 100032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 100008(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	testq	%rax, %rax
	je	.L87
	movq	%rax, %rsi
	leaq	-1(%rax), %rax
	cmpq	$14, %rax
	jbe	.L88
	movq	%rsi, %rdx
	pxor	%xmm9, %xmm9
	pxor	%xmm5, %xmm5
	movq	%rbx, %rax
	andq	$-16, %rdx
	movdqa	%xmm9, %xmm8
	pxor	%xmm4, %xmm4
	movdqa	.LC1(%rip), %xmm7
	movdqa	.LC2(%rip), %xmm6
	addq	%rbx, %rdx
	pxor	%xmm3, %xmm3
	.p2align 4,,10
	.p2align 3
.L50:
	movdqa	%xmm7, %xmm1
	movdqa	%xmm5, %xmm2
	movdqa	%xmm3, %xmm13
	addq	$16, %rax
	pcmpeqb	-16(%rax), %xmm1
	movdqa	%xmm1, %xmm0
	pandn	%xmm6, %xmm1
	pand	%xmm6, %xmm0
	pcmpgtb	%xmm0, %xmm2
	movdqa	%xmm0, %xmm11
	punpcklbw	%xmm2, %xmm11
	punpckhbw	%xmm2, %xmm0
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm11, %xmm2
	movdqa	%xmm11, %xmm12
	movdqa	%xmm0, %xmm10
	punpcklwd	%xmm2, %xmm12
	punpckhwd	%xmm2, %xmm11
	movdqa	%xmm4, %xmm2
	pcmpgtw	%xmm0, %xmm2
	pcmpgtd	%xmm12, %xmm13
	punpcklwd	%xmm2, %xmm10
	punpckhwd	%xmm2, %xmm0
	movdqa	%xmm12, %xmm2
	punpckldq	%xmm13, %xmm2
	punpckhdq	%xmm13, %xmm12
	paddq	%xmm8, %xmm2
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm11, %xmm8
	paddq	%xmm12, %xmm2
	movdqa	%xmm11, %xmm12
	punpckldq	%xmm8, %xmm12
	punpckhdq	%xmm8, %xmm11
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm10, %xmm8
	paddq	%xmm12, %xmm2
	movdqa	%xmm3, %xmm12
	paddq	%xmm11, %xmm2
	movdqa	%xmm10, %xmm11
	punpckldq	%xmm8, %xmm11
	punpckhdq	%xmm8, %xmm10
	movdqa	%xmm3, %xmm8
	pcmpgtd	%xmm0, %xmm8
	paddq	%xmm11, %xmm2
	paddq	%xmm10, %xmm2
	movdqa	%xmm0, %xmm10
	punpckldq	%xmm8, %xmm10
	punpckhdq	%xmm8, %xmm0
	paddq	%xmm10, %xmm2
	paddq	%xmm0, %xmm2
	movdqa	%xmm1, %xmm0
	movdqa	%xmm5, %xmm1
	pcmpgtb	%xmm0, %xmm1
	movdqa	%xmm0, %xmm10
	movdqa	%xmm2, %xmm8
	punpcklbw	%xmm1, %xmm10
	punpckhbw	%xmm1, %xmm0
	movdqa	%xmm4, %xmm1
	pcmpgtw	%xmm10, %xmm1
	movdqa	%xmm10, %xmm11
	movdqa	%xmm0, %xmm2
	punpcklwd	%xmm1, %xmm11
	punpckhwd	%xmm1, %xmm10
	movdqa	%xmm4, %xmm1
	pcmpgtw	%xmm0, %xmm1
	pcmpgtd	%xmm11, %xmm12
	punpcklwd	%xmm1, %xmm2
	punpckhwd	%xmm1, %xmm0
	movdqa	%xmm11, %xmm1
	punpckldq	%xmm12, %xmm1
	punpckhdq	%xmm12, %xmm11
	paddq	%xmm9, %xmm1
	movdqa	%xmm3, %xmm9
	pcmpgtd	%xmm10, %xmm9
	paddq	%xmm11, %xmm1
	movdqa	%xmm10, %xmm11
	punpckldq	%xmm9, %xmm11
	punpckhdq	%xmm9, %xmm10
	movdqa	%xmm3, %xmm9
	pcmpgtd	%xmm2, %xmm9
	paddq	%xmm11, %xmm1
	paddq	%xmm10, %xmm1
	movdqa	%xmm2, %xmm10
	punpckldq	%xmm9, %xmm10
	punpckhdq	%xmm9, %xmm2
	movdqa	%xmm0, %xmm9
	paddq	%xmm10, %xmm1
	paddq	%xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	pcmpgtd	%xmm0, %xmm2
	punpckldq	%xmm2, %xmm9
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm9, %xmm1
	paddq	%xmm0, %xmm1
	movdqa	%xmm1, %xmm9
	cmpq	%rdx, %rax
	jne	.L50
	movdqa	%xmm1, %xmm0
	movq	%rsi, %rdx
	psrldq	$8, %xmm0
	andq	$-16, %rdx
	paddq	%xmm0, %xmm9
	movdqa	%xmm8, %xmm0
	psrldq	$8, %xmm0
	movq	%xmm9, %rax
	paddq	%xmm0, %xmm8
	movq	%xmm8, %rcx
	testb	$15, %sil
	je	.L53
.L49:
	cmpb	$103, (%rsp,%rdx)
	je	.L92
	addq	$1, %rax
.L55:
	leaq	1(%rdx), %rdi
	cmpq	%rsi, %rdi
	jge	.L53
	cmpb	$103, 1(%rsp,%rdx)
	je	.L93
	addq	$1, %rax
.L57:
	leaq	2(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 2(%rsp,%rdx)
	je	.L94
	addq	$1, %rax
.L59:
	leaq	3(%rdx), %rdi
	cmpq	%rsi, %rdi
	jge	.L53
	cmpb	$103, 3(%rsp,%rdx)
	je	.L95
	addq	$1, %rax
.L61:
	leaq	4(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 4(%rsp,%rdx)
	je	.L96
	addq	$1, %rax
.L63:
	leaq	5(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 5(%rsp,%rdx)
	je	.L97
	addq	$1, %rax
.L65:
	leaq	6(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 6(%rsp,%rdx)
	je	.L98
	addq	$1, %rax
.L67:
	leaq	7(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 7(%rsp,%rdx)
	je	.L99
	addq	$1, %rax
.L69:
	leaq	8(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 8(%rsp,%rdx)
	je	.L100
	addq	$1, %rax
.L71:
	leaq	9(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 9(%rsp,%rdx)
	je	.L101
	addq	$1, %rax
.L73:
	leaq	10(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 10(%rsp,%rdx)
	je	.L102
	addq	$1, %rax
.L75:
	leaq	11(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 11(%rsp,%rdx)
	je	.L103
	addq	$1, %rax
.L77:
	leaq	12(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 12(%rsp,%rdx)
	je	.L104
	addq	$1, %rax
.L79:
	leaq	13(%rdx), %rdi
	cmpq	%rdi, %rsi
	jle	.L53
	cmpb	$103, 13(%rsp,%rdx)
	je	.L105
	addq	$1, %rax
.L81:
	addq	$14, %rdx
	cmpq	%rdx, %rsi
	jle	.L53
	cmpb	$103, (%rsp,%rdx)
	je	.L82
	addq	$1, %rax
	.p2align 4,,10
	.p2align 3
.L53:
	subq	%rcx, %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	andl	$1, %esi
	je	.L48
	subq	$1, %rax
	movl	$2, %ecx
	cqto
	idivq	%rcx
.L85:
	movq	%rax, %rdx
	leaq	.LC3(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	100008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L106
	addq	$100016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L87:
	.cfi_restore_state
	xorl	%eax, %eax
.L48:
	sarq	%rax
	jmp	.L85
.L93:
	addq	$1, %rcx
	jmp	.L57
.L92:
	addq	$1, %rcx
	jmp	.L55
.L94:
	addq	$1, %rcx
	jmp	.L59
.L95:
	addq	$1, %rcx
	jmp	.L61
.L101:
	addq	$1, %rcx
	jmp	.L73
.L96:
	addq	$1, %rcx
	jmp	.L63
.L97:
	addq	$1, %rcx
	jmp	.L65
.L98:
	addq	$1, %rcx
	jmp	.L67
.L99:
	addq	$1, %rcx
	jmp	.L69
.L100:
	addq	$1, %rcx
	jmp	.L71
.L88:
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	.L49
.L102:
	addq	$1, %rcx
	jmp	.L75
.L103:
	addq	$1, %rcx
	jmp	.L77
.L104:
	addq	$1, %rcx
	jmp	.L79
.L105:
	addq	$1, %rcx
	jmp	.L81
.L82:
	addq	$1, %rcx
	jmp	.L53
.L106:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE71:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.byte	103
	.align 16
.LC2:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.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 ld;
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define rrep(i,l,r)for(ll i=(l);i>=(r);i--)
#define INF (1LL<<60)
#define MOD1 1000000007
#define MOD2 998244353
#define MAX_N (1 << 17)
#define YES printf("Yes\n")
#define NO printf("No\n")
#define PN printf("\n")

void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}
ll max2(ll a,ll b){return a>=b?a:b;}
ll min2(ll a,ll b){return a>=b?b:a;}
ll min3(ll a, ll b, ll c){return (a<=b && a<=c) ? a : b<=c ? b : c;}
ll max3(ll a, ll b, ll c){return (a>=b && a>=c) ? a : b>=c ? b : c;}
ll minn(ll n, ll a[n]){ll b=INF;rep(i,0,n) b=min2(b,a[i]);return b;}
ll maxn(ll n, ll a[n]){ll b=-INF;rep(i,0,n) b=max2(b,a[i]);return b;}
ll ABS(ll a){return a>=0?a:(-a);}
ll POW(ll a, ll b){ll c=1;rep(i,0,b) c*=a;return c;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll mod(ll n){return n%=MOD1;}
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 sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

typedef struct{ ll a , b;}fr;
int cmp1( const void *p, const void *q ) { return ((fr*)p) ->a - ((fr*)q)->a;}
int cmp2( const void *p, const void *q ) { return ((fr*)q) ->a - ((fr*)p)->a;}
void strsortup(fr*a,int n){qsort(a,n,sizeof(fr),cmp1);}
void strsortdown(fr*a,int n){qsort(a,n,sizeof(fr),cmp2);}

int main(void){
    char s[100005];
    ll n,ans=0,g=0,p=0;
    scanf("%s",s);
    n=strlen(s);
    rep(i,0,n){
        if(s[i]=='g') g++;
        else p++;
    }
    if(n%2) ans=(ABS(p-g)-1)/2;
    else ans=ABS(p-g)/2;
    printf("%lld\n",ans);
    return 0;
}

gpg

0

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 ld;
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define rrep(i,l,r)for(ll i=(l);i>=(r);i--)
#define INF (1LL<<60)
#define MOD1 1000000007
#define MOD2 998244353
#define MAX_N (1 << 17)
#define YES printf("Yes\n")
#define NO printf("No\n")
#define PN printf("\n")

void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}
ll max2(ll a,ll b){return a>=b?a:b;}
ll min2(ll a,ll b){return a>=b?b:a;}
ll min3(ll a, ll b, ll c){return (a<=b && a<=c) ? a : b<=c ? b : c;}
ll max3(ll a, ll b, ll c){return (a>=b && a>=c) ? a : b>=c ? b : c;}
ll minn(ll n, ll a[n]){ll b=INF;rep(i,0,n) b=min2(b,a[i]);return b;}
ll maxn(ll n, ll a[n]){ll b=-INF;rep(i,0,n) b=max2(b,a[i]);return b;}
ll ABS(ll a){return a>=0?a:(-a);}
ll POW(ll a, ll b){ll c=1;rep(i,0,b) c*=a;return c;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll mod(ll n){return n%=MOD1;}
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 sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

typedef struct{ ll a , b;}fr;
int cmp1( const void *p, const void *q ) { return ((fr*)p) ->a - ((fr*)q)->a;}
int cmp2( const void *p, const void *q ) { return ((fr*)q) ->a - ((fr*)p)->a;}
void strsortup(fr*a,int n){qsort(a,n,sizeof(fr),cmp1);}
void strsortdown(fr*a,int n){qsort(a,n,sizeof(fr),cmp2);}

int main(void){
    char s[100005];
    ll n,ans=0,g=0,p=0;
    scanf("%s",s);
    n=strlen(s);
    rep(i,0,n){
        if(s[i]=='g') g++;
        else p++;
    }
    if(n%2) ans=(ABS(p-g)-1)/2;
    else ans=ABS(p-g)/2;
    printf("%lld\n",ans);
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	max2
	.type	max2, @function
max2:
.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max2, .-max2
	.globl	min2
	.type	min2, @function
min2:
.LFB8:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	min2, .-min2
	.globl	min3
	.type	min3, @function
min3:
.LFB9:
	.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jg	.L7
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	jmp	.L10
.L8:
	movq	-8(%rbp), %rax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	min3, .-min3
	.globl	max3
	.type	max3, @function
max3:
.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L12
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L13
.L12:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	jmp	.L15
.L13:
	movq	-8(%rbp), %rax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	max3, .-max3
	.globl	minn
	.type	minn, @function
minn:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L17
.L18:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L18
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	minn, .-minn
	.globl	maxn
	.type	maxn, @function
maxn:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$-1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L21
.L22:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L21:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L22
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	maxn, .-maxn
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ABS, .-ABS
	.globl	POW
	.type	POW, @function
POW:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L27
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L27:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L28
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	POW, .-POW
	.globl	gcd
	.type	gcd, @function
gcd:
.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)
	cmpq	$0, -16(%rbp)
	je	.L31
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	jmp	.L33
.L31:
	movq	-8(%rbp), %rax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB16:
	.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), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	%rcx
	imulq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	lcm, .-lcm
	.globl	mod
	.type	mod, @function
mod:
.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, -8(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	mod, .-mod
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L39
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L41
.L39:
	movl	$-1, %eax
.L41:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L43
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L44
	movl	$-1, %eax
	jmp	.L47
.L44:
	movl	$0, %eax
	jmp	.L47
.L43:
	movl	$1, %eax
.L47:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB20:
	.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
.LFE20:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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
	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
.LFE21:
	.size	sortdown, .-sortdown
	.globl	cmp1
	.type	cmp1, @function
cmp1:
.LFB22:
	.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), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	cmp1, .-cmp1
	.globl	cmp2
	.type	cmp2, @function
cmp2:
.LFB23:
	.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	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	cmp2, .-cmp2
	.globl	strsortup
	.type	strsortup, @function
strsortup:
.LFB24:
	.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	cmp1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	strsortup, .-strsortup
	.globl	strsortdown
	.type	strsortdown, @function
strsortdown:
.LFB25:
	.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	cmp2(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	strsortdown, .-strsortdown
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -100056(%rbp)
	movq	$0, -100048(%rbp)
	movq	$0, -100040(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -100024(%rbp)
	movq	$0, -100032(%rbp)
	jmp	.L57
.L60:
	leaq	-100016(%rbp), %rdx
	movq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$103, %al
	jne	.L58
	addq	$1, -100048(%rbp)
	jmp	.L59
.L58:
	addq	$1, -100040(%rbp)
.L59:
	addq	$1, -100032(%rbp)
.L57:
	movq	-100032(%rbp), %rax
	cmpq	-100024(%rbp), %rax
	jl	.L60
	movq	-100024(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L61
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	subq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
	jmp	.L62
.L61:
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
.L62:
	movq	-100056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	max2
	.type	max2, @function
max2:
.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), %rdx
	movq	-16(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max2, .-max2
	.globl	min2
	.type	min2, @function
min2:
.LFB8:
	.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	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	min2, .-min2
	.globl	min3
	.type	min3, @function
min3:
.LFB9:
	.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jg	.L7
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L8
.L7:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	jmp	.L10
.L8:
	movq	-8(%rbp), %rax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	min3, .-min3
	.globl	max3
	.type	max3, @function
max3:
.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	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L12
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jge	.L13
.L12:
	movq	-16(%rbp), %rdx
	movq	-24(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	jmp	.L15
.L13:
	movq	-8(%rbp), %rax
.L15:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	max3, .-max3
	.globl	minn
	.type	minn, @function
minn:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L17
.L18:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	min2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L17:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L18
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	minn, .-minn
	.globl	maxn
	.type	maxn, @function
maxn:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movabsq	$-1152921504606846976, %rax
	movq	%rax, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L21
.L22:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	max2
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L21:
	movq	-8(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L22
	movq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	maxn, .-maxn
	.globl	ABS
	.type	ABS, @function
ABS:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ABS, .-ABS
	.globl	POW
	.type	POW, @function
POW:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$1, -16(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L27
.L28:
	movq	-16(%rbp), %rax
	imulq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	addq	$1, -8(%rbp)
.L27:
	movq	-8(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jl	.L28
	movq	-16(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	POW, .-POW
	.globl	gcd
	.type	gcd, @function
gcd:
.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)
	cmpq	$0, -16(%rbp)
	je	.L31
	movq	-8(%rbp), %rax
	cqto
	idivq	-16(%rbp)
	movq	-16(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	jmp	.L33
.L31:
	movq	-8(%rbp), %rax
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	gcd, .-gcd
	.globl	lcm
	.type	lcm, @function
lcm:
.LFB16:
	.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), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	gcd
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	cqto
	idivq	%rcx
	imulq	-16(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	lcm, .-lcm
	.globl	mod
	.type	mod, @function
mod:
.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, -8(%rbp)
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	mod, .-mod
	.globl	upll
	.type	upll, @function
upll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L39
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L41
.L39:
	movl	$-1, %eax
.L41:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L43
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L44
	movl	$-1, %eax
	jmp	.L47
.L44:
	movl	$0, %eax
	jmp	.L47
.L43:
	movl	$1, %eax
.L47:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB20:
	.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
.LFE20:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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
	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
.LFE21:
	.size	sortdown, .-sortdown
	.globl	cmp1
	.type	cmp1, @function
cmp1:
.LFB22:
	.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), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	cmp1, .-cmp1
	.globl	cmp2
	.type	cmp2, @function
cmp2:
.LFB23:
	.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	-16(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	cmp2, .-cmp2
	.globl	strsortup
	.type	strsortup, @function
strsortup:
.LFB24:
	.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	cmp1(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	strsortup, .-strsortup
	.globl	strsortdown
	.type	strsortdown, @function
strsortdown:
.LFB25:
	.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	cmp2(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	strsortdown, .-strsortdown
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-98304(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1760, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -100056(%rbp)
	movq	$0, -100048(%rbp)
	movq	$0, -100040(%rbp)
	leaq	-100016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-100016(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -100024(%rbp)
	movq	$0, -100032(%rbp)
	jmp	.L57
.L60:
	leaq	-100016(%rbp), %rdx
	movq	-100032(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$103, %al
	jne	.L58
	addq	$1, -100048(%rbp)
	jmp	.L59
.L58:
	addq	$1, -100040(%rbp)
.L59:
	addq	$1, -100032(%rbp)
.L57:
	movq	-100032(%rbp), %rax
	cmpq	-100024(%rbp), %rax
	jl	.L60
	movq	-100024(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L61
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	subq	$1, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
	jmp	.L62
.L61:
	movq	-100040(%rbp), %rax
	subq	-100048(%rbp), %rax
	movq	%rax, %rdi
	call	ABS
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -100056(%rbp)
.L62:
	movq	-100056(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L64
	call	__stack_chk_fail@PLT
.L64:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
