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 <string.h>
#include <math.h>
#define ll long long
#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 INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
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);}
ll pom(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 MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

void mebiusu_henkan(int N,ll*dp){
	//積集合で条件が与えられたとき、和集合の条件を返す
	dp[0]=0;
	rep(k,0,N)rep(j,0,1<<N)if(bit(j,k))dp[j]-=dp[j^(1<<k)];
	rep(j,0,1<<N)if(!__builtin_parity(j))dp[j]*=-1;
}

int n,k,and,or;
int aa[99];
int a[99];
ll dp[1<<18];
ll choose[60][60];
ll coe[60];
#define N 18

int main(){
	scanf("%d%d%d%d",&n,&k,&and,&or);
	rep(i,0,n)scanf("%d",aa+i);

	//10
	rep(k,0,N){
		if(bit(and,k)==1&&bit(or,k)==0){
			puts("0");
			return 0;
		}
	}
	
	//00,11
	{
		int cnt=0;
		rep(i,0,n){
			int mask=~(and^or);
			if((mask&and)==(mask&aa[i]))a[cnt++]=aa[i];
		}
		n=cnt;
	}

	choose[0][0]=1;
	rep(i,1,55){
		choose[i][0]=1;
		rep(j,1,i+1)choose[i][j]=choose[i-1][j-1]+choose[i-1][j];
		rep(j,1,k+1)coe[i]+=choose[i][j];
	}
	
	//01
	rep(mask,1,1<<N){
		int hoge=mask&(and^or);
		//hogeのところが全部ダメ
		if(hoge!=mask)continue;
		ll aaaaa[99];
		rep(i,0,n)aaaaa[i]=a[i]&hoge;
		sortup(aaaaa,n);
		//rep(i,0,n)printf("%d ",aaaaa[i]);puts("");
		aaaaa[n]=-1;
		int cnt=0;
		rep(i,0,n){
			cnt++;
			if(aaaaa[i]!=aaaaa[i+1]){
				dp[mask]+=coe[cnt];
				cnt=0;
			}
		}
	}	
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");
	mebiusu_henkan(N,dp);
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");

	printf("%lld\n",coe[n]-dp[(1<<N)-1]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	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	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.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	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
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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	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
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.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, -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	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	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)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	mebiusu_henkan
	.type	mebiusu_henkan, @function
mebiusu_henkan:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	$0, (%rax)
	movq	$0, -24(%rbp)
	jmp	.L20
.L24:
	movq	$0, -16(%rbp)
	jmp	.L21
.L23:
	movq	-24(%rbp), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movl	%edx, %ecx
	sarq	%cl, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L22
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	cltq
	xorq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-48(%rbp), %rax
	addq	%rsi, %rax
	subq	%rcx, %rdx
	movq	%rdx, (%rax)
.L22:
	addq	$1, -16(%rbp)
.L21:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L23
	addq	$1, -24(%rbp)
.L20:
	movl	-36(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L24
	movq	$0, -8(%rbp)
	jmp	.L25
.L27:
	movq	-8(%rbp), %rax
	movl	%eax, %edx
	shrl	$16, %edx
	xorl	%edx, %eax
	xorb	%ah, %al
	setnp	%al
	movzbl	%al, %eax
	testl	%eax, %eax
	jne	.L26
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	negq	%rdx
	movq	%rdx, (%rax)
.L26:
	addq	$1, -8(%rbp)
.L25:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jl	.L27
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mebiusu_henkan, .-mebiusu_henkan
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	and
	.align 4
	.type	and, @object
	.size	and, 4
and:
	.zero	4
	.globl	or
	.align 4
	.type	or, @object
	.size	or, 4
or:
	.zero	4
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 396
aa:
	.zero	396
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097152
dp:
	.zero	2097152
	.globl	choose
	.align 32
	.type	choose, @object
	.size	choose, 28800
choose:
	.zero	28800
	.globl	coe
	.align 32
	.type	coe, @object
	.size	coe, 480
coe:
	.zero	480
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$896, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	or(%rip), %r8
	leaq	and(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -872(%rbp)
	jmp	.L29
.L30:
	movq	-872(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -872(%rbp)
.L29:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -872(%rbp)
	jl	.L30
	movq	$0, -864(%rbp)
	jmp	.L31
.L34:
	movl	and(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L32
	movl	or(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L32
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L33
.L32:
	addq	$1, -864(%rbp)
.L31:
	cmpq	$17, -864(%rbp)
	jle	.L34
	movl	$0, -888(%rbp)
	movq	$0, -856(%rbp)
	jmp	.L35
.L37:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%edx, %eax
	notl	%eax
	movl	%eax, -876(%rbp)
	movq	-856(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	and(%rip), %eax
	xorl	%edx, %eax
	andl	-876(%rbp), %eax
	testl	%eax, %eax
	jne	.L36
	movl	-888(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -888(%rbp)
	movq	-856(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	aa(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L36:
	addq	$1, -856(%rbp)
.L35:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -856(%rbp)
	jl	.L37
	movl	-888(%rbp), %eax
	movl	%eax, n(%rip)
	movq	$1, choose(%rip)
	movq	$1, -848(%rbp)
	jmp	.L38
.L43:
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	choose(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	$1, -840(%rbp)
	jmp	.L39
.L40:
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-840(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -840(%rbp)
.L39:
	movq	-848(%rbp), %rax
	cmpq	-840(%rbp), %rax
	jge	.L40
	movq	$1, -832(%rbp)
	jmp	.L41
.L42:
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-832(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -832(%rbp)
.L41:
	movl	k(%rip), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -832(%rbp)
	jl	.L42
	addq	$1, -848(%rbp)
.L38:
	cmpq	$54, -848(%rbp)
	jle	.L43
	movq	$1, -824(%rbp)
	jmp	.L44
.L52:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%eax, %edx
	movq	-824(%rbp), %rax
	andl	%edx, %eax
	movl	%eax, -880(%rbp)
	movl	-880(%rbp), %eax
	cltq
	cmpq	%rax, -824(%rbp)
	jne	.L54
	movq	$0, -816(%rbp)
	jmp	.L47
.L48:
	movq	-816(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	-880(%rbp), %eax
	movslq	%eax, %rdx
	movq	-816(%rbp), %rax
	movq	%rdx, -800(%rbp,%rax,8)
	addq	$1, -816(%rbp)
.L47:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -816(%rbp)
	jl	.L48
	movl	n(%rip), %edx
	leaq	-800(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	n(%rip), %eax
	cltq
	movq	$-1, -800(%rbp,%rax,8)
	movl	$0, -884(%rbp)
	movq	$0, -808(%rbp)
	jmp	.L49
.L51:
	addl	$1, -884(%rbp)
	movq	-808(%rbp), %rax
	movq	-800(%rbp,%rax,8), %rdx
	movq	-808(%rbp), %rax
	addq	$1, %rax
	movq	-800(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L50
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-884(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	$0, -884(%rbp)
.L50:
	addq	$1, -808(%rbp)
.L49:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -808(%rbp)
	jl	.L51
	jmp	.L46
.L54:
	nop
.L46:
	addq	$1, -824(%rbp)
.L44:
	cmpq	$262143, -824(%rbp)
	jle	.L52
	leaq	dp(%rip), %rax
	movq	%rax, %rsi
	movl	$18, %edi
	call	mebiusu_henkan
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	2097144+dp(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.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
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	pom
	.type	pom, @function
pom:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %sil
	je	.L12
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L12:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L13
.L10:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	pom, .-pom
	.p2align 4
	.globl	mebiusu_henkan
	.type	mebiusu_henkan, @function
mebiusu_henkan:
.LFB56:
	.cfi_startproc
	endbr64
	movslq	%edi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rdx
	movq	$0, (%rsi)
	movq	%r10, %rcx
	movl	$1, %esi
	sall	%cl, %esi
	movslq	%esi, %rsi
	testq	%r10, %r10
	jle	.L20
	xorl	%ecx, %ecx
	movl	$1, %ebx
	movl	$1, %r11d
	testq	%rsi, %rsi
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%r11d, %r9d
	movq	%rbx, %r8
	movl	$1, %eax
	sall	%cl, %r9d
	salq	%cl, %r8
	movslq	%r9d, %r9
	cmpq	$1, %rsi
	je	.L26
	.p2align 4,,10
	.p2align 3
.L24:
	testq	%rax, %r8
	je	.L23
	movq	%r9, %rdi
	xorq	%rax, %rdi
	movq	(%rdx,%rdi,8), %rdi
	subq	%rdi, (%rdx,%rax,8)
.L23:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L24
.L26:
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L21
.L25:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%eax, %ecx
	shrl	$16, %ecx
	xorl	%eax, %ecx
	xorb	%ch, %cl
	setnp	%cl
	movzbl	%cl, %ecx
.L28:
	testl	%ecx, %ecx
	jne	.L27
	negq	(%rdx,%rax,8)
.L27:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L39
.L19:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	testq	%rsi, %rsi
	jg	.L25
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	mebiusu_henkan, .-mebiusu_henkan
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	k(%rip), %rdx
	leaq	or(%rip), %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	and(%rip), %rcx
	leaq	n(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$824, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 808(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rdx
	testq	%rdx, %rdx
	jle	.L41
	leaq	aa(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rdx
	addq	$4, %rbp
	cmpq	%rbx, %rdx
	jg	.L42
.L41:
	movl	and(%rip), %esi
	movl	or(%rip), %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L45:
	btl	%eax, %esi
	jnc	.L43
	btl	%eax, %ebp
	jnc	.L87
.L43:
	addq	$1, %rax
	cmpq	$18, %rax
	jne	.L45
	movl	%esi, %edi
	xorl	%ebp, %edi
	testq	%rdx, %rdx
	jle	.L71
	leaq	aa(%rip), %rax
	notl	%edi
	xorl	%r10d, %r10d
	leaq	(%rax,%rdx,4), %r8
	leaq	a(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L48:
	movl	(%rax), %edx
	movl	%esi, %ecx
	xorl	%edx, %ecx
	testl	%edi, %ecx
	jne	.L47
	movslq	%r10d, %rcx
	addl	$1, %r10d
	movl	%edx, (%r9,%rcx,4)
.L47:
	addq	$4, %rax
	cmpq	%r8, %rax
	jne	.L48
	movl	%r10d, (%rsp)
	movl	%r10d, %eax
.L46:
	movl	k(%rip), %r13d
	movl	%eax, n(%rip)
	leaq	488+choose(%rip), %r8
	movl	$1, %edx
	movl	%esi, 8(%rsp)
	leaq	coe(%rip), %rbx
	leaq	-488(%r8), %rcx
	leal	1(%r13), %r12d
	movl	%ebp, 12(%rsp)
	movq	$1, choose(%rip)
	movslq	%r12d, %r14
	subq	$1, %r14
	movq	%r14, %r15
	movq	%r14, %rax
	movq	%r14, %r11
	shrq	%r15
	orq	$1, %rax
	andq	$-2, %r11
	salq	$4, %r15
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L56:
	movq	$1, -8(%r8)
	leaq	-1(%rdx), %rsi
	cmpq	$1, %rdx
	je	.L72
	movq	%rdx, %rdi
	leaq	-488(%r8), %r10
	leaq	-480(%r8), %r9
	xorl	%eax, %eax
	shrq	%rdi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L50:
	movdqu	(%r9,%rax), %xmm0
	paddq	(%r10,%rax), %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L50
	movq	%rdx, %rdi
	orq	$1, %rdi
	testb	$1, %dl
	je	.L51
.L49:
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,4), %r9
	movq	%rsi, %rax
	salq	$4, %rax
	subq	%rsi, %rax
	salq	$2, %rax
	leaq	-1(%rdi,%rax), %rsi
	addq	%rdi, %rax
	movq	(%rcx,%rax,8), %rax
	addq	(%rcx,%rsi,8), %rax
	movq	%rax, (%rcx,%r9,8)
.L51:
	cmpl	$1, %r12d
	jle	.L52
	movq	(%rbx,%rdx,8), %rsi
	cmpl	$1, %r13d
	je	.L73
	leaq	(%r15,%r8), %rdi
	movq	%r8, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L54:
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	paddq	%xmm5, %xmm0
	cmpq	%rdi, %rax
	jne	.L54
	movdqa	%xmm0, %xmm1
	movq	%rbp, %rdi
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	addq	%rax, %rsi
	cmpq	%r14, %r11
	je	.L55
.L53:
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,4), %rax
	addq	(%rcx,%rax,8), %rsi
.L55:
	movq	%rsi, (%rbx,%rdx,8)
.L52:
	addq	$1, %rdx
	addq	$480, %r8
	cmpq	$55, %rdx
	jne	.L56
	movl	8(%rsp), %esi
	movl	12(%rsp), %ebp
	movl	$1, %r14d
	leaq	dp(%rip), %r15
	movslq	(%rsp), %r8
	leaq	a(%rip), %r12
	leaq	16(%rsp), %r13
	movl	%esi, %eax
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L57:
	addq	$1, %r14
	cmpq	$262144, %r14
	je	.L68
.L88:
	movl	and(%rip), %eax
	movl	or(%rip), %ebp
.L69:
	xorl	%ebp, %eax
	andl	%r14d, %eax
	movslq	%eax, %rdx
	cmpq	%r14, %rdx
	jne	.L57
	testq	%r8, %r8
	jle	.L64
	leaq	-1(%r8), %rdx
	cmpq	$2, %rdx
	jbe	.L74
	movq	%r8, %rsi
	movd	%eax, %xmm6
	pxor	%xmm3, %xmm3
	movq	%r13, %rdx
	shrq	$2, %rsi
	pshufd	$0, %xmm6, %xmm4
	leaq	a(%rip), %rcx
	salq	$5, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L62:
	movdqa	(%rcx), %xmm0
	movdqa	%xmm3, %xmm1
	addq	$32, %rdx
	addq	$16, %rcx
	pand	%xmm4, %xmm0
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm2
	punpckhdq	%xmm1, %xmm0
	movaps	%xmm2, -32(%rdx)
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L62
	movq	%r8, %rdx
	andq	$-4, %rdx
	testb	$3, %r8b
	je	.L64
.L61:
	movl	(%r12,%rdx,4), %ecx
	andl	%eax, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, 16(%rsp,%rdx,8)
	leaq	1(%rdx), %rcx
	cmpq	%r8, %rcx
	jge	.L64
	movl	(%r12,%rcx,4), %esi
	addq	$2, %rdx
	andl	%eax, %esi
	movslq	%esi, %rsi
	movq	%rsi, 16(%rsp,%rcx,8)
	cmpq	%r8, %rdx
	jge	.L64
	andl	(%r12,%rdx,4), %eax
	cltq
	movq	%rax, 16(%rsp,%rdx,8)
.L64:
	movq	%r8, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movslq	n(%rip), %r8
	movq	$-1, 16(%rsp,%r8,8)
	testl	%r8d, %r8d
	jle	.L57
	movq	16(%rsp), %rcx
	movq	%r13, %rdx
	leaq	0(%r13,%r8,8), %rdi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%rcx, %rsi
	movq	8(%rdx), %rcx
	addl	$1, %eax
	cmpq	%rsi, %rcx
	je	.L66
	cltq
	movq	(%rbx,%rax,8), %rax
	addq	%rax, (%r15,%r14,8)
	xorl	%eax, %eax
.L66:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L67
	addq	$1, %r14
	cmpq	$262144, %r14
	jne	.L88
.L68:
	movq	%r15, %rsi
	movl	$18, %edi
	movq	%r8, (%rsp)
	call	mebiusu_henkan
	movq	(%rsp), %r8
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movq	(%rbx,%r8,8), %rdx
	subq	2097144+dp(%rip), %rdx
	call	__printf_chk@PLT
.L44:
	movq	808(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L89
	addq	$824, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L72:
	.cfi_restore_state
	movl	$1, %edi
	jmp	.L49
.L73:
	movl	$1, %edi
	jmp	.L53
.L74:
	xorl	%edx, %edx
	jmp	.L61
.L87:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L44
.L71:
	movl	$0, (%rsp)
	movl	(%rsp), %eax
	jmp	.L46
.L89:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.globl	coe
	.bss
	.align 32
	.type	coe, @object
	.size	coe, 480
coe:
	.zero	480
	.globl	choose
	.align 32
	.type	choose, @object
	.size	choose, 28800
choose:
	.zero	28800
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097152
dp:
	.zero	2097152
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 396
aa:
	.zero	396
	.globl	or
	.align 4
	.type	or, @object
	.size	or, 4
or:
	.zero	4
	.globl	and
	.align 4
	.type	and, @object
	.size	and, 4
and:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.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
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	pom
	.type	pom, @function
pom:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %sil
	je	.L12
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L12:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L13
.L10:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	pom, .-pom
	.p2align 4
	.globl	mebiusu_henkan
	.type	mebiusu_henkan, @function
mebiusu_henkan:
.LFB56:
	.cfi_startproc
	endbr64
	movslq	%edi, %r10
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rdx
	movq	$0, (%rsi)
	movq	%r10, %rcx
	movl	$1, %esi
	sall	%cl, %esi
	movslq	%esi, %rsi
	testq	%r10, %r10
	jle	.L20
	xorl	%ecx, %ecx
	movl	$1, %ebx
	movl	$1, %r11d
	testq	%rsi, %rsi
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L21:
	movl	%r11d, %r9d
	movq	%rbx, %r8
	movl	$1, %eax
	sall	%cl, %r9d
	salq	%cl, %r8
	movslq	%r9d, %r9
	cmpq	$1, %rsi
	je	.L26
	.p2align 4,,10
	.p2align 3
.L24:
	testq	%rax, %r8
	je	.L23
	movq	%r9, %rdi
	xorq	%rax, %rdi
	movq	(%rdx,%rdi,8), %rdi
	subq	%rdi, (%rdx,%rax,8)
.L23:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L24
.L26:
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L21
.L25:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L39:
	movl	%eax, %ecx
	shrl	$16, %ecx
	xorl	%eax, %ecx
	xorb	%ch, %cl
	setnp	%cl
	movzbl	%cl, %ecx
.L28:
	testl	%ecx, %ecx
	jne	.L27
	negq	(%rdx,%rax,8)
.L27:
	addq	$1, %rax
	cmpq	%rsi, %rax
	jne	.L39
.L19:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	testq	%rsi, %rsi
	jg	.L25
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	mebiusu_henkan, .-mebiusu_henkan
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB57:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	k(%rip), %rdx
	leaq	or(%rip), %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	and(%rip), %rcx
	leaq	n(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$824, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 808(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rdx
	testq	%rdx, %rdx
	jle	.L41
	leaq	aa(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L42:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__isoc99_scanf@PLT
	movslq	n(%rip), %rdx
	addq	$4, %rbp
	cmpq	%rbx, %rdx
	jg	.L42
.L41:
	movl	and(%rip), %esi
	movl	or(%rip), %ebp
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L45:
	btl	%eax, %esi
	jnc	.L43
	btl	%eax, %ebp
	jnc	.L87
.L43:
	addq	$1, %rax
	cmpq	$18, %rax
	jne	.L45
	movl	%esi, %edi
	xorl	%ebp, %edi
	testq	%rdx, %rdx
	jle	.L71
	leaq	aa(%rip), %rax
	notl	%edi
	xorl	%r10d, %r10d
	leaq	(%rax,%rdx,4), %r8
	leaq	a(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L48:
	movl	(%rax), %edx
	movl	%esi, %ecx
	xorl	%edx, %ecx
	testl	%edi, %ecx
	jne	.L47
	movslq	%r10d, %rcx
	addl	$1, %r10d
	movl	%edx, (%r9,%rcx,4)
.L47:
	addq	$4, %rax
	cmpq	%r8, %rax
	jne	.L48
	movl	%r10d, (%rsp)
	movl	%r10d, %eax
.L46:
	movl	k(%rip), %r13d
	movl	%eax, n(%rip)
	leaq	488+choose(%rip), %r8
	movl	$1, %edx
	movl	%esi, 8(%rsp)
	leaq	coe(%rip), %rbx
	leaq	-488(%r8), %rcx
	leal	1(%r13), %r12d
	movl	%ebp, 12(%rsp)
	movq	$1, choose(%rip)
	movslq	%r12d, %r14
	subq	$1, %r14
	movq	%r14, %r15
	movq	%r14, %rax
	movq	%r14, %r11
	shrq	%r15
	orq	$1, %rax
	andq	$-2, %r11
	salq	$4, %r15
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L56:
	movq	$1, -8(%r8)
	leaq	-1(%rdx), %rsi
	cmpq	$1, %rdx
	je	.L72
	movq	%rdx, %rdi
	leaq	-488(%r8), %r10
	leaq	-480(%r8), %r9
	xorl	%eax, %eax
	shrq	%rdi
	salq	$4, %rdi
	.p2align 4,,10
	.p2align 3
.L50:
	movdqu	(%r9,%rax), %xmm0
	paddq	(%r10,%rax), %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rdi, %rax
	jne	.L50
	movq	%rdx, %rdi
	orq	$1, %rdi
	testb	$1, %dl
	je	.L51
.L49:
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,4), %r9
	movq	%rsi, %rax
	salq	$4, %rax
	subq	%rsi, %rax
	salq	$2, %rax
	leaq	-1(%rdi,%rax), %rsi
	addq	%rdi, %rax
	movq	(%rcx,%rax,8), %rax
	addq	(%rcx,%rsi,8), %rax
	movq	%rax, (%rcx,%r9,8)
.L51:
	cmpl	$1, %r12d
	jle	.L52
	movq	(%rbx,%rdx,8), %rsi
	cmpl	$1, %r13d
	je	.L73
	leaq	(%r15,%r8), %rdi
	movq	%r8, %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L54:
	movdqu	(%rax), %xmm5
	addq	$16, %rax
	paddq	%xmm5, %xmm0
	cmpq	%rdi, %rax
	jne	.L54
	movdqa	%xmm0, %xmm1
	movq	%rbp, %rdi
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	addq	%rax, %rsi
	cmpq	%r14, %r11
	je	.L55
.L53:
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,4), %rax
	addq	(%rcx,%rax,8), %rsi
.L55:
	movq	%rsi, (%rbx,%rdx,8)
.L52:
	addq	$1, %rdx
	addq	$480, %r8
	cmpq	$55, %rdx
	jne	.L56
	movl	8(%rsp), %esi
	movl	12(%rsp), %ebp
	movl	$1, %r14d
	leaq	dp(%rip), %r15
	movslq	(%rsp), %r8
	leaq	a(%rip), %r12
	leaq	16(%rsp), %r13
	movl	%esi, %eax
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L57:
	addq	$1, %r14
	cmpq	$262144, %r14
	je	.L68
.L88:
	movl	and(%rip), %eax
	movl	or(%rip), %ebp
.L69:
	xorl	%ebp, %eax
	andl	%r14d, %eax
	movslq	%eax, %rdx
	cmpq	%r14, %rdx
	jne	.L57
	testq	%r8, %r8
	jle	.L64
	leaq	-1(%r8), %rdx
	cmpq	$2, %rdx
	jbe	.L74
	movq	%r8, %rsi
	movd	%eax, %xmm6
	pxor	%xmm3, %xmm3
	movq	%r13, %rdx
	shrq	$2, %rsi
	pshufd	$0, %xmm6, %xmm4
	leaq	a(%rip), %rcx
	salq	$5, %rsi
	addq	%r13, %rsi
	.p2align 4,,10
	.p2align 3
.L62:
	movdqa	(%rcx), %xmm0
	movdqa	%xmm3, %xmm1
	addq	$32, %rdx
	addq	$16, %rcx
	pand	%xmm4, %xmm0
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm2
	punpckhdq	%xmm1, %xmm0
	movaps	%xmm2, -32(%rdx)
	movaps	%xmm0, -16(%rdx)
	cmpq	%rdx, %rsi
	jne	.L62
	movq	%r8, %rdx
	andq	$-4, %rdx
	testb	$3, %r8b
	je	.L64
.L61:
	movl	(%r12,%rdx,4), %ecx
	andl	%eax, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, 16(%rsp,%rdx,8)
	leaq	1(%rdx), %rcx
	cmpq	%r8, %rcx
	jge	.L64
	movl	(%r12,%rcx,4), %esi
	addq	$2, %rdx
	andl	%eax, %esi
	movslq	%esi, %rsi
	movq	%rsi, 16(%rsp,%rcx,8)
	cmpq	%r8, %rdx
	jge	.L64
	andl	(%r12,%rdx,4), %eax
	cltq
	movq	%rax, 16(%rsp,%rdx,8)
.L64:
	movq	%r8, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movslq	n(%rip), %r8
	movq	$-1, 16(%rsp,%r8,8)
	testl	%r8d, %r8d
	jle	.L57
	movq	16(%rsp), %rcx
	movq	%r13, %rdx
	leaq	0(%r13,%r8,8), %rdi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%rcx, %rsi
	movq	8(%rdx), %rcx
	addl	$1, %eax
	cmpq	%rsi, %rcx
	je	.L66
	cltq
	movq	(%rbx,%rax,8), %rax
	addq	%rax, (%r15,%r14,8)
	xorl	%eax, %eax
.L66:
	addq	$8, %rdx
	cmpq	%rdx, %rdi
	jne	.L67
	addq	$1, %r14
	cmpq	$262144, %r14
	jne	.L88
.L68:
	movq	%r15, %rsi
	movl	$18, %edi
	movq	%r8, (%rsp)
	call	mebiusu_henkan
	movq	(%rsp), %r8
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movq	(%rbx,%r8,8), %rdx
	subq	2097144+dp(%rip), %rdx
	call	__printf_chk@PLT
.L44:
	movq	808(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L89
	addq	$824, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L72:
	.cfi_restore_state
	movl	$1, %edi
	jmp	.L49
.L73:
	movl	$1, %edi
	jmp	.L53
.L74:
	xorl	%edx, %edx
	jmp	.L61
.L87:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L44
.L71:
	movl	$0, (%rsp)
	movl	(%rsp), %eax
	jmp	.L46
.L89:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE57:
	.size	main, .-main
	.globl	coe
	.bss
	.align 32
	.type	coe, @object
	.size	coe, 480
coe:
	.zero	480
	.globl	choose
	.align 32
	.type	choose, @object
	.size	choose, 28800
choose:
	.zero	28800
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097152
dp:
	.zero	2097152
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 396
aa:
	.zero	396
	.globl	or
	.align 4
	.type	or, @object
	.size	or, 4
or:
	.zero	4
	.globl	and
	.align 4
	.type	and, @object
	.size	and, 4
and:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.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 <string.h>
#include <math.h>
#define ll long long
#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 INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
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);}
ll pom(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 MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

void mebiusu_henkan(int N,ll*dp){
	//積集合で条件が与えられたとき、和集合の条件を返す
	dp[0]=0;
	rep(k,0,N)rep(j,0,1<<N)if(bit(j,k))dp[j]-=dp[j^(1<<k)];
	rep(j,0,1<<N)if(!__builtin_parity(j))dp[j]*=-1;
}

int n,k,and,or;
int aa[99];
int a[99];
ll dp[1<<18];
ll choose[60][60];
ll coe[60];
#define N 18

int main(){
	scanf("%d%d%d%d",&n,&k,&and,&or);
	rep(i,0,n)scanf("%d",aa+i);

	//10
	rep(k,0,N){
		if(bit(and,k)==1&&bit(or,k)==0){
			puts("0");
			return 0;
		}
	}
	
	//00,11
	{
		int cnt=0;
		rep(i,0,n){
			int mask=~(and^or);
			if((mask&and)==(mask&aa[i]))a[cnt++]=aa[i];
		}
		n=cnt;
	}

	choose[0][0]=1;
	rep(i,1,55){
		choose[i][0]=1;
		rep(j,1,i+1)choose[i][j]=choose[i-1][j-1]+choose[i-1][j];
		rep(j,1,k+1)coe[i]+=choose[i][j];
	}
	
	//01
	rep(mask,1,1<<N){
		int hoge=mask&(and^or);
		//hogeのところが全部ダメ
		if(hoge!=mask)continue;
		ll aaaaa[99];
		rep(i,0,n)aaaaa[i]=a[i]&hoge;
		sortup(aaaaa,n);
		//rep(i,0,n)printf("%d ",aaaaa[i]);puts("");
		aaaaa[n]=-1;
		int cnt=0;
		rep(i,0,n){
			cnt++;
			if(aaaaa[i]!=aaaaa[i+1]){
				dp[mask]+=coe[cnt];
				cnt=0;
			}
		}
	}	
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");
	mebiusu_henkan(N,dp);
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");

	printf("%lld\n",coe[n]-dp[(1<<N)-1]);
}
3 3 0 3
0 2 3
 5 4 0 15
3 6 9 1 5
 3 3 0 6
0 2 3
 5 4 1 15
3 11 1 0 5
 5 3 1 7
3 4 9 0 5
 5 4 0 15
3 4 9 1 1
 5 4 0 15
3 6 1 1 8
 5 5 1 7
3 4 9 1 5
 5 5 1 7
3 4 11 1 5
 5 4 1 15
3 6 9 1 5

2
 7
 0
 4
 1
 3
 6
 2
 2
 2

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 <string.h>
#include <math.h>
#define ll long long
#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 INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
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);}
ll pom(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 MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

void mebiusu_henkan(int N,ll*dp){
	//積集合で条件が与えられたとき、和集合の条件を返す
	dp[0]=0;
	rep(k,0,N)rep(j,0,1<<N)if(bit(j,k))dp[j]-=dp[j^(1<<k)];
	rep(j,0,1<<N)if(!__builtin_parity(j))dp[j]*=-1;
}

int n,k,and,or;
int aa[99];
int a[99];
ll dp[1<<18];
ll choose[60][60];
ll coe[60];
#define N 18

int main(){
	scanf("%d%d%d%d",&n,&k,&and,&or);
	rep(i,0,n)scanf("%d",aa+i);

	//10
	rep(k,0,N){
		if(bit(and,k)==1&&bit(or,k)==0){
			puts("0");
			return 0;
		}
	}
	
	//00,11
	{
		int cnt=0;
		rep(i,0,n){
			int mask=~(and^or);
			if((mask&and)==(mask&aa[i]))a[cnt++]=aa[i];
		}
		n=cnt;
	}

	choose[0][0]=1;
	rep(i,1,55){
		choose[i][0]=1;
		rep(j,1,i+1)choose[i][j]=choose[i-1][j-1]+choose[i-1][j];
		rep(j,1,k+1)coe[i]+=choose[i][j];
	}
	
	//01
	rep(mask,1,1<<N){
		int hoge=mask&(and^or);
		//hogeのところが全部ダメ
		if(hoge!=mask)continue;
		ll aaaaa[99];
		rep(i,0,n)aaaaa[i]=a[i]&hoge;
		sortup(aaaaa,n);
		//rep(i,0,n)printf("%d ",aaaaa[i]);puts("");
		aaaaa[n]=-1;
		int cnt=0;
		rep(i,0,n){
			cnt++;
			if(aaaaa[i]!=aaaaa[i+1]){
				dp[mask]+=coe[cnt];
				cnt=0;
			}
		}
	}	
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");
	mebiusu_henkan(N,dp);
	//rep(i,0,1<<N)printf("%lld ",dp[i]);puts("");

	printf("%lld\n",coe[n]-dp[(1<<N)-1]);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	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	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.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	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
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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	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
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.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, -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	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	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)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	mebiusu_henkan
	.type	mebiusu_henkan, @function
mebiusu_henkan:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	$0, (%rax)
	movq	$0, -24(%rbp)
	jmp	.L20
.L24:
	movq	$0, -16(%rbp)
	jmp	.L21
.L23:
	movq	-24(%rbp), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movl	%edx, %ecx
	sarq	%cl, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L22
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	cltq
	xorq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-48(%rbp), %rax
	addq	%rsi, %rax
	subq	%rcx, %rdx
	movq	%rdx, (%rax)
.L22:
	addq	$1, -16(%rbp)
.L21:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L23
	addq	$1, -24(%rbp)
.L20:
	movl	-36(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L24
	movq	$0, -8(%rbp)
	jmp	.L25
.L27:
	movq	-8(%rbp), %rax
	movl	%eax, %edx
	shrl	$16, %edx
	xorl	%edx, %eax
	xorb	%ah, %al
	setnp	%al
	movzbl	%al, %eax
	testl	%eax, %eax
	jne	.L26
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	negq	%rdx
	movq	%rdx, (%rax)
.L26:
	addq	$1, -8(%rbp)
.L25:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jl	.L27
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mebiusu_henkan, .-mebiusu_henkan
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	and
	.align 4
	.type	and, @object
	.size	and, 4
and:
	.zero	4
	.globl	or
	.align 4
	.type	or, @object
	.size	or, 4
or:
	.zero	4
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 396
aa:
	.zero	396
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097152
dp:
	.zero	2097152
	.globl	choose
	.align 32
	.type	choose, @object
	.size	choose, 28800
choose:
	.zero	28800
	.globl	coe
	.align 32
	.type	coe, @object
	.size	coe, 480
coe:
	.zero	480
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$896, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	or(%rip), %r8
	leaq	and(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -872(%rbp)
	jmp	.L29
.L30:
	movq	-872(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -872(%rbp)
.L29:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -872(%rbp)
	jl	.L30
	movq	$0, -864(%rbp)
	jmp	.L31
.L34:
	movl	and(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L32
	movl	or(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L32
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L33
.L32:
	addq	$1, -864(%rbp)
.L31:
	cmpq	$17, -864(%rbp)
	jle	.L34
	movl	$0, -888(%rbp)
	movq	$0, -856(%rbp)
	jmp	.L35
.L37:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%edx, %eax
	notl	%eax
	movl	%eax, -876(%rbp)
	movq	-856(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	and(%rip), %eax
	xorl	%edx, %eax
	andl	-876(%rbp), %eax
	testl	%eax, %eax
	jne	.L36
	movl	-888(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -888(%rbp)
	movq	-856(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	aa(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L36:
	addq	$1, -856(%rbp)
.L35:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -856(%rbp)
	jl	.L37
	movl	-888(%rbp), %eax
	movl	%eax, n(%rip)
	movq	$1, choose(%rip)
	movq	$1, -848(%rbp)
	jmp	.L38
.L43:
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	choose(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	$1, -840(%rbp)
	jmp	.L39
.L40:
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-840(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -840(%rbp)
.L39:
	movq	-848(%rbp), %rax
	cmpq	-840(%rbp), %rax
	jge	.L40
	movq	$1, -832(%rbp)
	jmp	.L41
.L42:
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-832(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -832(%rbp)
.L41:
	movl	k(%rip), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -832(%rbp)
	jl	.L42
	addq	$1, -848(%rbp)
.L38:
	cmpq	$54, -848(%rbp)
	jle	.L43
	movq	$1, -824(%rbp)
	jmp	.L44
.L52:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%eax, %edx
	movq	-824(%rbp), %rax
	andl	%edx, %eax
	movl	%eax, -880(%rbp)
	movl	-880(%rbp), %eax
	cltq
	cmpq	%rax, -824(%rbp)
	jne	.L54
	movq	$0, -816(%rbp)
	jmp	.L47
.L48:
	movq	-816(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	-880(%rbp), %eax
	movslq	%eax, %rdx
	movq	-816(%rbp), %rax
	movq	%rdx, -800(%rbp,%rax,8)
	addq	$1, -816(%rbp)
.L47:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -816(%rbp)
	jl	.L48
	movl	n(%rip), %edx
	leaq	-800(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	n(%rip), %eax
	cltq
	movq	$-1, -800(%rbp,%rax,8)
	movl	$0, -884(%rbp)
	movq	$0, -808(%rbp)
	jmp	.L49
.L51:
	addl	$1, -884(%rbp)
	movq	-808(%rbp), %rax
	movq	-800(%rbp,%rax,8), %rdx
	movq	-808(%rbp), %rax
	addq	$1, %rax
	movq	-800(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L50
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-884(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	$0, -884(%rbp)
.L50:
	addq	$1, -808(%rbp)
.L49:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -808(%rbp)
	jl	.L51
	jmp	.L46
.L54:
	nop
.L46:
	addq	$1, -824(%rbp)
.L44:
	cmpq	$262143, -824(%rbp)
	jle	.L52
	leaq	dp(%rip), %rax
	movq	%rax, %rsi
	movl	$18, %edi
	call	mebiusu_henkan
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	2097144+dp(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	upll
	.type	upll, @function
upll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	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	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.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	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
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.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	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
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.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, -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	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	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)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	mebiusu_henkan
	.type	mebiusu_henkan, @function
mebiusu_henkan:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -36(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	$0, (%rax)
	movq	$0, -24(%rbp)
	jmp	.L20
.L24:
	movq	$0, -16(%rbp)
	jmp	.L21
.L23:
	movq	-24(%rbp), %rax
	movl	%eax, %edx
	movq	-16(%rbp), %rax
	movl	%edx, %ecx
	sarq	%cl, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L22
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movl	$1, %esi
	movl	%eax, %ecx
	sall	%cl, %esi
	movl	%esi, %eax
	cltq
	xorq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rcx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rsi
	movq	-48(%rbp), %rax
	addq	%rsi, %rax
	subq	%rcx, %rdx
	movq	%rdx, (%rax)
.L22:
	addq	$1, -16(%rbp)
.L21:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -16(%rbp)
	jl	.L23
	addq	$1, -24(%rbp)
.L20:
	movl	-36(%rbp), %eax
	cltq
	cmpq	%rax, -24(%rbp)
	jl	.L24
	movq	$0, -8(%rbp)
	jmp	.L25
.L27:
	movq	-8(%rbp), %rax
	movl	%eax, %edx
	shrl	$16, %edx
	xorl	%edx, %eax
	xorb	%ah, %al
	setnp	%al
	movzbl	%al, %eax
	testl	%eax, %eax
	jne	.L26
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	movq	-48(%rbp), %rax
	addq	%rcx, %rax
	negq	%rdx
	movq	%rdx, (%rax)
.L26:
	addq	$1, -8(%rbp)
.L25:
	movl	-36(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	cltq
	cmpq	%rax, -8(%rbp)
	jl	.L27
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mebiusu_henkan, .-mebiusu_henkan
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	and
	.align 4
	.type	and, @object
	.size	and, 4
and:
	.zero	4
	.globl	or
	.align 4
	.type	or, @object
	.size	or, 4
or:
	.zero	4
	.globl	aa
	.align 32
	.type	aa, @object
	.size	aa, 396
aa:
	.zero	396
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 396
a:
	.zero	396
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 2097152
dp:
	.zero	2097152
	.globl	choose
	.align 32
	.type	choose, @object
	.size	choose, 28800
choose:
	.zero	28800
	.globl	coe
	.align 32
	.type	coe, @object
	.size	coe, 480
coe:
	.zero	480
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$896, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	or(%rip), %r8
	leaq	and(%rip), %rax
	movq	%rax, %rcx
	leaq	k(%rip), %rax
	movq	%rax, %rdx
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -872(%rbp)
	jmp	.L29
.L30:
	movq	-872(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -872(%rbp)
.L29:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -872(%rbp)
	jl	.L30
	movq	$0, -864(%rbp)
	jmp	.L31
.L34:
	movl	and(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L32
	movl	or(%rip), %eax
	movq	-864(%rbp), %rdx
	movl	%edx, %ecx
	sarl	%cl, %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L32
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L33
.L32:
	addq	$1, -864(%rbp)
.L31:
	cmpq	$17, -864(%rbp)
	jle	.L34
	movl	$0, -888(%rbp)
	movq	$0, -856(%rbp)
	jmp	.L35
.L37:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%edx, %eax
	notl	%eax
	movl	%eax, -876(%rbp)
	movq	-856(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	aa(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	and(%rip), %eax
	xorl	%edx, %eax
	andl	-876(%rbp), %eax
	testl	%eax, %eax
	jne	.L36
	movl	-888(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -888(%rbp)
	movq	-856(%rbp), %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	aa(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L36:
	addq	$1, -856(%rbp)
.L35:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -856(%rbp)
	jl	.L37
	movl	-888(%rbp), %eax
	movl	%eax, n(%rip)
	movq	$1, choose(%rip)
	movq	$1, -848(%rbp)
	jmp	.L38
.L43:
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$5, %rax
	movq	%rax, %rdx
	leaq	choose(%rip), %rax
	movq	$1, (%rdx,%rax)
	movq	$1, -840(%rbp)
	jmp	.L39
.L40:
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-840(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-840(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -840(%rbp)
.L39:
	movq	-848(%rbp), %rax
	cmpq	-840(%rbp), %rax
	jge	.L40
	movq	$1, -832(%rbp)
	jmp	.L41
.L42:
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movq	-848(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	salq	$2, %rax
	movq	-832(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	choose(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-848(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -832(%rbp)
.L41:
	movl	k(%rip), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -832(%rbp)
	jl	.L42
	addq	$1, -848(%rbp)
.L38:
	cmpq	$54, -848(%rbp)
	jle	.L43
	movq	$1, -824(%rbp)
	jmp	.L44
.L52:
	movl	and(%rip), %edx
	movl	or(%rip), %eax
	xorl	%eax, %edx
	movq	-824(%rbp), %rax
	andl	%edx, %eax
	movl	%eax, -880(%rbp)
	movl	-880(%rbp), %eax
	cltq
	cmpq	%rax, -824(%rbp)
	jne	.L54
	movq	$0, -816(%rbp)
	jmp	.L47
.L48:
	movq	-816(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	andl	-880(%rbp), %eax
	movslq	%eax, %rdx
	movq	-816(%rbp), %rax
	movq	%rdx, -800(%rbp,%rax,8)
	addq	$1, -816(%rbp)
.L47:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -816(%rbp)
	jl	.L48
	movl	n(%rip), %edx
	leaq	-800(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	sortup
	movl	n(%rip), %eax
	cltq
	movq	$-1, -800(%rbp,%rax,8)
	movl	$0, -884(%rbp)
	movq	$0, -808(%rbp)
	jmp	.L49
.L51:
	addl	$1, -884(%rbp)
	movq	-808(%rbp), %rax
	movq	-800(%rbp,%rax,8), %rdx
	movq	-808(%rbp), %rax
	addq	$1, %rax
	movq	-800(%rbp,%rax,8), %rax
	cmpq	%rax, %rdx
	je	.L50
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	(%rdx,%rax), %rcx
	movl	-884(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, %rcx
	movq	-824(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	dp(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	movl	$0, -884(%rbp)
.L50:
	addq	$1, -808(%rbp)
.L49:
	movl	n(%rip), %eax
	cltq
	cmpq	%rax, -808(%rbp)
	jl	.L51
	jmp	.L46
.L54:
	nop
.L46:
	addq	$1, -824(%rbp)
.L44:
	cmpq	$262143, -824(%rbp)
	jle	.L52
	leaq	dp(%rip), %rax
	movq	%rax, %rsi
	movl	$18, %edi
	call	mebiusu_henkan
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	coe(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	2097144+dp(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L33:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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:
