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>
#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 invp(a,p)pom(a,p-2,p)

ll fact[4010],invfact[4010];
ll factinit(ll n){
	fact[0]=1;
	rep(i,0,n)fact[i+1]=fact[i]*(i+1)%MOD;
	invfact[n]=invp(fact[n],MOD);
	for(ll i=n;i>0;i--)invfact[i-1]=invfact[i]*i%MOD;
}
ll choose(ll n,ll r){
	if(n<0||r<0||n-r<0)return 0;
	return fact[n]*invfact[r]%MOD*invfact[n-r]%MOD;
}

ll ans[4010];
int main(){
	factinit(4005);
	ll n,k;
	scanf("%lld %lld\n",&k,&n);
	rep(x,2,k+2){
		ll t=0;
		if(x%2){
			//奇数のとき
			//はずすべきペアはx/2組ある
			ll p=x/2;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする。その組の選び方がchoose(p,i)
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//choose(k+n-2*p-1,n-p+i)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*choose(k+n-2*p-1,n-p+i)%MOD*pom(2,p-i,MOD))%MOD;
			}
		}else{
			//偶数のとき
			//はずすべきペアが(x/2-1)組と、0or1にすべきものが1つある
			ll p=x/2-1;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//まんなかを0にしたときchoose(k+n-2*p-2,n-p+i)通り
				//まんなかを1にしたときchoose(k+n-2*p-3,n-p+i-1)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*(choose(k+n-2*p-2,n-p+i)+choose(k+n-2*p-3,n-p+i-1))%MOD*pom(2,p-i,MOD))%MOD;
			}
		}
		ans[x]=t;
	}
	rep(i,2,k+2)printf("%lld\n",ans[i]);
	rep(i,k+2,2*k+1)printf("%lld\n",ans[2*k+2-i]);
}```

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	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 32080
fact:
	.zero	32080
	.globl	invfact
	.align 32
	.type	invfact, @object
	.size	invfact, 32080
invfact:
	.zero	32080
	.text
	.globl	factinit
	.type	factinit, @function
factinit:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, fact(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-16(%rbp), %rdx
	addq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L21
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$998244353, %edx
	movl	$998244351, %esi
	movq	%rax, %rdi
	call	pom
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L22
.L23:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	invfact(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	leaq	-1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subq	$1, -8(%rbp)
.L22:
	cmpq	$0, -8(%rbp)
	jg	.L23
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	factinit, .-factinit
	.globl	choose
	.type	choose, @function
choose:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -8(%rbp)
	js	.L25
	cmpq	$0, -16(%rbp)
	js	.L25
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	jns	.L26
.L25:
	movl	$0, %eax
	jmp	.L27
.L26:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	invfact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-8(%rbp), %rdx
	subq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L27:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	choose, .-choose
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 32080
ans:
	.zero	32080
	.section	.rodata
.LC0:
	.string	"%lld %lld\n"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4005, %edi
	call	factinit
	leaq	-104(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$2, -88(%rbp)
	jmp	.L29
.L36:
	movq	$0, -80(%rbp)
	movq	-88(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L30
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L31
.L32:
	movq	-72(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-32(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$1, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-32(%rbp), %rax
	subq	-72(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -72(%rbp)
.L31:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jge	.L32
	jmp	.L33
.L30:
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	subq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -64(%rbp)
	jmp	.L34
.L35:
	movq	-64(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %r12
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	addq	%r12, %rax
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	subq	-64(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -64(%rbp)
.L34:
	movq	-40(%rbp), %rax
	cmpq	-64(%rbp), %rax
	jge	.L35
.L33:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rdx
	movq	-80(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L29:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jle	.L36
	movq	$2, -56(%rbp)
	jmp	.L37
.L38:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -56(%rbp)
.L37:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L38
	movq	-96(%rbp), %rax
	addq	$2, %rax
	movq	%rax, -48(%rbp)
	jmp	.L39
.L40:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	addq	%rax, %rax
	subq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -48(%rbp)
.L39:
	movq	-96(%rbp), %rax
	addq	%rax, %rax
	cmpq	%rax, -48(%rbp)
	jle	.L40
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	factinit
	.type	factinit, @function
factinit:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rsi
	leaq	fact(%rip), %r8
	movq	$1, fact(%rip)
	testq	%rdi, %rdi
	jle	.L20
	movl	$1, %edx
	xorl	%ecx, %ecx
	movabsq	$155014655926305585, %r9
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, %rcx
	movq	%rdx, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, (%r8,%rcx,8)
	movq	%rdi, %rdx
	cmpq	%rsi, %rcx
	jne	.L21
.L20:
	movq	(%r8,%rsi,8), %rcx
	movl	$30, %r9d
	movl	$998244351, %ebx
	movabsq	$155014655926305585, %r11
	movabsq	$-8525806094425994177, %r10
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L23:
	testb	$1, %bl
	je	.L22
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rdi
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rcx
	subq	%rax, %rcx
	imulq	$998244353, %rcx, %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
.L22:
	movq	%r8, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rdi
	movq	%rbx, %rax
	shrq	$63, %rax
	movq	%rdi, %r8
	addq	%rbx, %rax
	sarq	%rax
	movq	%rax, %rbx
	subl	$1, %r9d
	jne	.L23
	leaq	invfact(%rip), %rdi
	movq	%rcx, (%rdi,%rsi,8)
	testq	%rsi, %rsi
	jle	.L24
	movabsq	$155014655926305585, %r8
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rdx, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, (%rdi,%rsi,8)
	movq	%rcx, %rdx
	testq	%rsi, %rsi
	jne	.L25
.L24:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	factinit, .-factinit
	.p2align 4
	.globl	choose
	.type	choose, @function
choose:
.LFB57:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%eax, %eax
	movq	%rsi, %rdx
	orq	%rsi, %rcx
	js	.L34
	movq	%rdi, %r9
	subq	%rsi, %r9
	js	.L34
	leaq	invfact(%rip), %r8
	leaq	fact(%rip), %rax
	movabsq	$155014655926305585, %rcx
	movq	(%rax,%rdi,8), %rsi
	imulq	(%r8,%rdx,8), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	(%r8,%r9,8), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rdx, %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$23, %rax
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
.L34:
	ret
	.cfi_endproc
.LFE57:
	.size	choose, .-choose
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld\n"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$4005, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	call	factinit
	leaq	88(%rsp), %rdx
	leaq	96(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rax
	testq	%rax, %rax
	jle	.L39
	movq	88(%rsp), %rbx
	movq	$2, 32(%rsp)
	leaq	fact(%rip), %r14
	movabsq	$155014655926305585, %r13
	movabsq	$-8525806094425994177, %r15
	movq	%rbx, 64(%rsp)
	addq	%rax, %rbx
	addq	$2, %rax
	movq	%rax, 56(%rsp)
	leaq	ans(%rip), %rax
	movq	%rbx, 72(%rsp)
	movq	%rax, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L55:
	movq	32(%rsp), %rax
	movq	%rax, %r12
	sarq	%r12
	testb	$1, %al
	je	.L40
	movq	72(%rsp), %rax
	leaq	(%r12,%r12), %rdx
	movq	%r12, %r11
	xorl	%r9d, %r9d
	movq	64(%rsp), %rdi
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	%rdi, %rbx
	movq	%rdx, 24(%rsp)
	shrq	$63, %rdx
	subq	%r12, %rbx
	movq	%rdx, 16(%rsp)
	movq	%r12, %rdx
	subq	%rdi, %rdx
	movq	%rbx, 8(%rsp)
	leaq	-1(%rax,%rdx), %rbp
	leaq	invfact(%rip), %rax
	leaq	(%rax,%rbx,8), %rax
	xorl	%ebx, %ebx
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L46:
	movq	8(%rsp), %rax
	movq	%r11, %rcx
	leaq	(%rax,%rbx), %rsi
	shrq	$63, %rsi
	orb	16(%rsp), %sil
	testq	%r11, %r11
	js	.L41
	leaq	invfact(%rip), %rdi
	movq	(%r14,%r12,8), %r8
	xorl	%r10d, %r10d
	imulq	(%rdi,%rbx,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %r8
	imulq	(%rdi,%r11,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	movq	%rdx, %rdi
	sarq	$23, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	testb	%sil, %sil
	jne	.L42
	testq	%rbp, %rbp
	js	.L42
.L60:
	movq	24(%rsp), %rax
	movq	(%r14,%rax,8), %rsi
	movq	40(%rsp), %rax
	imulq	(%rax,%rbx,8), %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%r13
	sarq	$63, %r8
	sarq	$23, %rdx
	subq	%r8, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbp,8), %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%r13
	sarq	$63, %r8
	sarq	$23, %rdx
	subq	%r8, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %r10
	subq	%rax, %r10
	imulq	$998244353, %r10, %rax
	subq	%rax, %rsi
	movq	%rsi, %r10
.L42:
	testq	%r11, %r11
	je	.L43
.L59:
	movl	$1, %edi
	movl	$2, %esi
	movq	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L45:
	testb	$1, %r8b
	je	.L44
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rcx, %rdi
	subq	%rax, %rdi
.L44:
	imulq	%rsi, %rsi
	movq	%r8, %rcx
	shrq	$63, %rcx
	addq	%r8, %rcx
	movq	%rsi, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rcx
	movq	%rcx, %r8
	jne	.L45
	imulq	%rdi, %r10
.L43:
	addq	%r9, %r10
	addq	$1, %rbx
	subq	$1, %r11
	subq	$1, %rbp
	movq	%r10, %rax
	movq	%r10, %r9
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r9
	cmpq	%r12, %rbx
	jle	.L46
.L47:
	movq	32(%rsp), %rax
	movq	48(%rsp), %rbx
	movq	%r9, (%rbx,%rax,8)
	addq	$1, %rax
	movq	%rax, 32(%rsp)
	cmpq	56(%rsp), %rax
	jne	.L55
	movq	%rbx, %r12
	leaq	.LC1(%rip), %rbp
	movl	$2, %ebx
	.p2align 4,,10
	.p2align 3
.L56:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	96(%rsp), %rax
	movq	%rbx, %rdx
	addq	$1, %rbx
	cmpq	%rdx, %rax
	jge	.L56
.L39:
	leaq	ans(%rip), %rdi
	leaq	2(%rax), %rbx
	leaq	(%rax,%rax), %rdx
	movq	%rdi, 48(%rsp)
	leaq	.LC1(%rip), %rbp
	movq	%rdi, %r12
	cmpq	%rbx, %rdx
	jl	.L58
	.p2align 4,,10
	.p2align 3
.L57:
	leaq	2(%rax,%rax), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	subq	%rbx, %rax
	addq	$1, %rbx
	movq	(%r12,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	96(%rsp), %rax
	leaq	(%rax,%rax), %rdx
	cmpq	%rbx, %rdx
	jge	.L57
.L58:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L93
	addq	$120, %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
.L41:
	.cfi_restore_state
	testb	%sil, %sil
	jne	.L69
	xorl	%edi, %edi
	testq	%rbp, %rbp
	jns	.L60
.L69:
	xorl	%r10d, %r10d
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L40:
	subq	$1, %r12
	movq	72(%rsp), %rbx
	movq	64(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	(%r12,%r12), %rdx
	movq	%r12, %r11
	xorl	%r9d, %r9d
	subq	%rdx, %rbx
	subq	%r12, %rax
	leaq	-2(%rbx), %rdi
	leaq	-1(%rax), %r10
	movq	%rdi, 40(%rsp)
	shrq	$63, %rdi
	movq	%rdi, 24(%rsp)
	leaq	-3(%rbx), %rdi
	subq	%rax, %rbx
	movq	%rdi, 16(%rsp)
	subq	$2, %rbx
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%r11, %rcx
	xorl	%esi, %esi
	testq	%r11, %r11
	js	.L48
	leaq	invfact(%rip), %rsi
	movq	(%r14,%r12,8), %rdi
	imulq	(%rsi,%rbp,8), %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	(%rsi,%r11,8), %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	imulq	$998244353, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
.L48:
	movq	%r10, %rax
	xorl	%edi, %edi
	addq	$1, %rax
	movq	%rax, 8(%rsp)
	js	.L49
	cmpb	$0, 24(%rsp)
	jne	.L49
	testq	%rbx, %rbx
	js	.L49
	movq	40(%rsp), %rax
	movq	(%r14,%rax,8), %r8
	leaq	8+invfact(%rip), %rax
	imulq	(%rax,%r10,8), %r8
	movq	%r8, %rax
	movq	%r8, %rdi
	imulq	%r13
	sarq	$63, %rdi
	sarq	$23, %rdx
	subq	%rdi, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbx,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	movq	%rdx, %rdi
	sarq	$23, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
.L49:
	movq	16(%rsp), %rax
	testq	%rax, %rax
	js	.L50
	movq	%rbx, %rdx
	orq	%r10, %rdx
	js	.L50
	movq	(%r14,%rax,8), %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%r10,8), %r8
	movq	%r8, %rax
	movq	%r8, %r10
	imulq	%r13
	sarq	$63, %r10
	sarq	$23, %rdx
	subq	%r10, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbx,8), %r8
	movq	%r8, %rax
	movq	%r8, %r10
	imulq	%r13
	sarq	$63, %r10
	sarq	$23, %rdx
	subq	%r10, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	addq	%r8, %rdi
.L50:
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %r10
	subq	%rax, %r10
	imulq	$998244353, %r10, %rax
	subq	%rax, %rsi
	movq	%rsi, %r10
	testq	%r11, %r11
	je	.L51
	movl	$1, %edi
	movl	$2, %esi
	movq	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L53:
	testb	$1, %r8b
	je	.L52
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rcx, %rdi
	subq	%rax, %rdi
.L52:
	imulq	%rsi, %rsi
	movq	%r8, %rcx
	shrq	$63, %rcx
	addq	%r8, %rcx
	movq	%rsi, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rcx
	movq	%rcx, %r8
	jne	.L53
	imulq	%rdi, %r10
.L51:
	addq	%r9, %r10
	addq	$1, %rbp
	subq	$1, %r11
	subq	$1, %rbx
	movq	%r10, %rax
	movq	%r10, %r9
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r9
	cmpq	%rbp, %r12
	jl	.L47
	movq	8(%rsp), %r10
	jmp	.L54
.L93:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE58:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 32080
ans:
	.zero	32080
	.globl	invfact
	.align 32
	.type	invfact, @object
	.size	invfact, 32080
invfact:
	.zero	32080
	.globl	fact
	.align 32
	.type	fact, @object
	.size	fact, 32080
fact:
	.zero	32080
	.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	factinit
	.type	factinit, @function
factinit:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rsi
	leaq	fact(%rip), %r8
	movq	$1, fact(%rip)
	testq	%rdi, %rdi
	jle	.L20
	movl	$1, %edx
	xorl	%ecx, %ecx
	movabsq	$155014655926305585, %r9
	.p2align 4,,10
	.p2align 3
.L21:
	addq	$1, %rcx
	movq	%rdx, %rdi
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	imulq	%r9
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rdi
	movq	%rdi, (%r8,%rcx,8)
	movq	%rdi, %rdx
	cmpq	%rsi, %rcx
	jne	.L21
.L20:
	movq	(%r8,%rsi,8), %rcx
	movl	$30, %r9d
	movl	$998244351, %ebx
	movabsq	$155014655926305585, %r11
	movabsq	$-8525806094425994177, %r10
	movq	%rcx, %rax
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, %r8
	movl	$1, %ecx
	.p2align 4,,10
	.p2align 3
.L23:
	testb	$1, %bl
	je	.L22
	imulq	%r8, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rdi
	imulq	%r11
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rcx
	subq	%rax, %rcx
	imulq	$998244353, %rcx, %rax
	movq	%rdi, %rcx
	subq	%rax, %rcx
.L22:
	movq	%r8, %rdi
	imulq	%r8, %rdi
	movq	%rdi, %rax
	mulq	%r10
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rdi
	movq	%rbx, %rax
	shrq	$63, %rax
	movq	%rdi, %r8
	addq	%rbx, %rax
	sarq	%rax
	movq	%rax, %rbx
	subl	$1, %r9d
	jne	.L23
	leaq	invfact(%rip), %rdi
	movq	%rcx, (%rdi,%rsi,8)
	testq	%rsi, %rsi
	jle	.L24
	movabsq	$155014655926305585, %r8
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rdx, %rcx
	imulq	%rsi, %rcx
	subq	$1, %rsi
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rcx, (%rdi,%rsi,8)
	movq	%rcx, %rdx
	testq	%rsi, %rsi
	jne	.L25
.L24:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	factinit, .-factinit
	.p2align 4
	.globl	choose
	.type	choose, @function
choose:
.LFB57:
	.cfi_startproc
	endbr64
	movq	%rdi, %rcx
	xorl	%eax, %eax
	movq	%rsi, %rdx
	orq	%rsi, %rcx
	js	.L34
	movq	%rdi, %r9
	subq	%rsi, %r9
	js	.L34
	leaq	invfact(%rip), %r8
	leaq	fact(%rip), %rax
	movabsq	$155014655926305585, %rcx
	movq	(%rax,%rdi,8), %rsi
	imulq	(%r8,%rdx,8), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rsi
	imulq	(%r8,%r9,8), %rsi
	movq	%rsi, %rax
	imulq	%rcx
	movq	%rdx, %rax
	movq	%rsi, %rdx
	sarq	$63, %rdx
	sarq	$23, %rax
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rsi, %rax
	subq	%rdx, %rax
.L34:
	ret
	.cfi_endproc
.LFE57:
	.size	choose, .-choose
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld\n"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$4005, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	call	factinit
	leaq	88(%rsp), %rdx
	leaq	96(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rax
	testq	%rax, %rax
	jle	.L39
	movq	88(%rsp), %rbx
	movq	$2, 32(%rsp)
	leaq	fact(%rip), %r14
	movabsq	$155014655926305585, %r13
	movabsq	$-8525806094425994177, %r15
	movq	%rbx, 64(%rsp)
	addq	%rax, %rbx
	addq	$2, %rax
	movq	%rax, 56(%rsp)
	leaq	ans(%rip), %rax
	movq	%rbx, 72(%rsp)
	movq	%rax, 48(%rsp)
	.p2align 4,,10
	.p2align 3
.L55:
	movq	32(%rsp), %rax
	movq	%rax, %r12
	sarq	%r12
	testb	$1, %al
	je	.L40
	movq	72(%rsp), %rax
	leaq	(%r12,%r12), %rdx
	movq	%r12, %r11
	xorl	%r9d, %r9d
	movq	64(%rsp), %rdi
	subq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	%rdi, %rbx
	movq	%rdx, 24(%rsp)
	shrq	$63, %rdx
	subq	%r12, %rbx
	movq	%rdx, 16(%rsp)
	movq	%r12, %rdx
	subq	%rdi, %rdx
	movq	%rbx, 8(%rsp)
	leaq	-1(%rax,%rdx), %rbp
	leaq	invfact(%rip), %rax
	leaq	(%rax,%rbx,8), %rax
	xorl	%ebx, %ebx
	movq	%rax, 40(%rsp)
	.p2align 4,,10
	.p2align 3
.L46:
	movq	8(%rsp), %rax
	movq	%r11, %rcx
	leaq	(%rax,%rbx), %rsi
	shrq	$63, %rsi
	orb	16(%rsp), %sil
	testq	%r11, %r11
	js	.L41
	leaq	invfact(%rip), %rdi
	movq	(%r14,%r12,8), %r8
	xorl	%r10d, %r10d
	imulq	(%rdi,%rbx,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %r8
	imulq	(%rdi,%r11,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	movq	%rdx, %rdi
	sarq	$23, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
	testb	%sil, %sil
	jne	.L42
	testq	%rbp, %rbp
	js	.L42
.L60:
	movq	24(%rsp), %rax
	movq	(%r14,%rax,8), %rsi
	movq	40(%rsp), %rax
	imulq	(%rax,%rbx,8), %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%r13
	sarq	$63, %r8
	sarq	$23, %rdx
	subq	%r8, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbp,8), %rsi
	movq	%rsi, %rax
	movq	%rsi, %r8
	imulq	%r13
	sarq	$63, %r8
	sarq	$23, %rdx
	subq	%r8, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %r10
	subq	%rax, %r10
	imulq	$998244353, %r10, %rax
	subq	%rax, %rsi
	movq	%rsi, %r10
.L42:
	testq	%r11, %r11
	je	.L43
.L59:
	movl	$1, %edi
	movl	$2, %esi
	movq	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L45:
	testb	$1, %r8b
	je	.L44
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rcx, %rdi
	subq	%rax, %rdi
.L44:
	imulq	%rsi, %rsi
	movq	%r8, %rcx
	shrq	$63, %rcx
	addq	%r8, %rcx
	movq	%rsi, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rcx
	movq	%rcx, %r8
	jne	.L45
	imulq	%rdi, %r10
.L43:
	addq	%r9, %r10
	addq	$1, %rbx
	subq	$1, %r11
	subq	$1, %rbp
	movq	%r10, %rax
	movq	%r10, %r9
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r9
	cmpq	%r12, %rbx
	jle	.L46
.L47:
	movq	32(%rsp), %rax
	movq	48(%rsp), %rbx
	movq	%r9, (%rbx,%rax,8)
	addq	$1, %rax
	movq	%rax, 32(%rsp)
	cmpq	56(%rsp), %rax
	jne	.L55
	movq	%rbx, %r12
	leaq	.LC1(%rip), %rbp
	movl	$2, %ebx
	.p2align 4,,10
	.p2align 3
.L56:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	96(%rsp), %rax
	movq	%rbx, %rdx
	addq	$1, %rbx
	cmpq	%rdx, %rax
	jge	.L56
.L39:
	leaq	ans(%rip), %rdi
	leaq	2(%rax), %rbx
	leaq	(%rax,%rax), %rdx
	movq	%rdi, 48(%rsp)
	leaq	.LC1(%rip), %rbp
	movq	%rdi, %r12
	cmpq	%rbx, %rdx
	jl	.L58
	.p2align 4,,10
	.p2align 3
.L57:
	leaq	2(%rax,%rax), %rax
	movq	%rbp, %rsi
	movl	$1, %edi
	subq	%rbx, %rax
	addq	$1, %rbx
	movq	(%r12,%rax,8), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	96(%rsp), %rax
	leaq	(%rax,%rax), %rdx
	cmpq	%rbx, %rdx
	jge	.L57
.L58:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L93
	addq	$120, %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
.L41:
	.cfi_restore_state
	testb	%sil, %sil
	jne	.L69
	xorl	%edi, %edi
	testq	%rbp, %rbp
	jns	.L60
.L69:
	xorl	%r10d, %r10d
	jmp	.L59
	.p2align 4,,10
	.p2align 3
.L40:
	subq	$1, %r12
	movq	72(%rsp), %rbx
	movq	64(%rsp), %rax
	xorl	%ebp, %ebp
	leaq	(%r12,%r12), %rdx
	movq	%r12, %r11
	xorl	%r9d, %r9d
	subq	%rdx, %rbx
	subq	%r12, %rax
	leaq	-2(%rbx), %rdi
	leaq	-1(%rax), %r10
	movq	%rdi, 40(%rsp)
	shrq	$63, %rdi
	movq	%rdi, 24(%rsp)
	leaq	-3(%rbx), %rdi
	subq	%rax, %rbx
	movq	%rdi, 16(%rsp)
	subq	$2, %rbx
	.p2align 4,,10
	.p2align 3
.L54:
	movq	%r11, %rcx
	xorl	%esi, %esi
	testq	%r11, %r11
	js	.L48
	leaq	invfact(%rip), %rsi
	movq	(%r14,%r12,8), %rdi
	imulq	(%rsi,%rbp,8), %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subq	%rdx, %rdi
	imulq	(%rsi,%r11,8), %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	imulq	$998244353, %rsi, %rax
	subq	%rax, %rdi
	movq	%rdi, %rsi
.L48:
	movq	%r10, %rax
	xorl	%edi, %edi
	addq	$1, %rax
	movq	%rax, 8(%rsp)
	js	.L49
	cmpb	$0, 24(%rsp)
	jne	.L49
	testq	%rbx, %rbx
	js	.L49
	movq	40(%rsp), %rax
	movq	(%r14,%rax,8), %r8
	leaq	8+invfact(%rip), %rax
	imulq	(%rax,%r10,8), %r8
	movq	%r8, %rax
	movq	%r8, %rdi
	imulq	%r13
	sarq	$63, %rdi
	sarq	$23, %rdx
	subq	%rdi, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbx,8), %r8
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	movq	%rdx, %rdi
	sarq	$23, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%r8, %rdi
	subq	%rax, %rdi
.L49:
	movq	16(%rsp), %rax
	testq	%rax, %rax
	js	.L50
	movq	%rbx, %rdx
	orq	%r10, %rdx
	js	.L50
	movq	(%r14,%rax,8), %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%r10,8), %r8
	movq	%r8, %rax
	movq	%r8, %r10
	imulq	%r13
	sarq	$63, %r10
	sarq	$23, %rdx
	subq	%r10, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	leaq	invfact(%rip), %rax
	imulq	(%rax,%rbx,8), %r8
	movq	%r8, %rax
	movq	%r8, %r10
	imulq	%r13
	sarq	$63, %r10
	sarq	$23, %rdx
	subq	%r10, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r8
	addq	%r8, %rdi
.L50:
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %r10
	subq	%rax, %r10
	imulq	$998244353, %r10, %rax
	subq	%rax, %rsi
	movq	%rsi, %r10
	testq	%r11, %r11
	je	.L51
	movl	$1, %edi
	movl	$2, %esi
	movq	%rcx, %r8
	.p2align 4,,10
	.p2align 3
.L53:
	testb	$1, %r8b
	je	.L52
	imulq	%rsi, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rcx
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rcx, %rdi
	subq	%rax, %rdi
.L52:
	imulq	%rsi, %rsi
	movq	%r8, %rcx
	shrq	$63, %rcx
	addq	%r8, %rcx
	movq	%rsi, %rax
	mulq	%r15
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	sarq	%rcx
	movq	%rcx, %r8
	jne	.L53
	imulq	%rdi, %r10
.L51:
	addq	%r9, %r10
	addq	$1, %rbp
	subq	$1, %r11
	subq	$1, %rbx
	movq	%r10, %rax
	movq	%r10, %r9
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r9
	cmpq	%rbp, %r12
	jl	.L47
	movq	8(%rsp), %r10
	jmp	.L54
.L93:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE58:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 32080
ans:
	.zero	32080
	.globl	invfact
	.align 32
	.type	invfact, @object
	.size	invfact, 32080
invfact:
	.zero	32080
	.globl	fact
	.align 32
	.type	fact, @object
	.size	fact, 32080
fact:
	.zero	32080
	.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>
#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 invp(a,p)pom(a,p-2,p)

ll fact[4010],invfact[4010];
ll factinit(ll n){
	fact[0]=1;
	rep(i,0,n)fact[i+1]=fact[i]*(i+1)%MOD;
	invfact[n]=invp(fact[n],MOD);
	for(ll i=n;i>0;i--)invfact[i-1]=invfact[i]*i%MOD;
}
ll choose(ll n,ll r){
	if(n<0||r<0||n-r<0)return 0;
	return fact[n]*invfact[r]%MOD*invfact[n-r]%MOD;
}

ll ans[4010];
int main(){
	factinit(4005);
	ll n,k;
	scanf("%lld %lld\n",&k,&n);
	rep(x,2,k+2){
		ll t=0;
		if(x%2){
			//奇数のとき
			//はずすべきペアはx/2組ある
			ll p=x/2;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする。その組の選び方がchoose(p,i)
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//choose(k+n-2*p-1,n-p+i)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*choose(k+n-2*p-1,n-p+i)%MOD*pom(2,p-i,MOD))%MOD;
			}
		}else{
			//偶数のとき
			//はずすべきペアが(x/2-1)組と、0or1にすべきものが1つある
			ll p=x/2-1;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//まんなかを0にしたときchoose(k+n-2*p-2,n-p+i)通り
				//まんなかを1にしたときchoose(k+n-2*p-3,n-p+i-1)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*(choose(k+n-2*p-2,n-p+i)+choose(k+n-2*p-3,n-p+i-1))%MOD*pom(2,p-i,MOD))%MOD;
			}
		}
		ans[x]=t;
	}
	rep(i,2,k+2)printf("%lld\n",ans[i]);
	rep(i,k+2,2*k+1)printf("%lld\n",ans[2*k+2-i]);
}
8 1000
 3 6
 1 5
 13 1000
 18 1000
 18 1100
 2 3
 18 0100
 5 3
 21 1100

172955709
172955709
215375670
215375670
257477746
257477746
670183294
670183294
670183294
257477746
257477746
215375670
215375670
172955709
172955709
 13
13
4
13
13
 0
 497036381
497036381
419411018
419411018
948498877
948498877
80387296
80387296
341522806
341522806
492575700
492575700
300011477
492575700
492575700
341522806
341522806
80387296
80387296
948498877
948498877
419411018
419411018
497036381
497036381
 701224094
701224094
664831880
664831880
891475329
891475329
199895538
199895538
536675936
536675936
454801709
454801709
27559258
27559258
346891948
346891948
154765409
154765409
154765409
346891948
346891948
27559258
27559258
454801709
454801709
536675936
536675936
199895538
199895538
891475329
891475329
664831880
664831880
701224094
701224094
 678273158
678273158
684817417
684817417
30535091
30535091
754927577
754927577
178701636
178701636
786022133
786022133
65850792
65850792
848151174
848151174
25962462
25962462
25962462
848151174
848151174
65850792
65850792
786022133
786022133
178701636
178701636
754927577
754927577
30535091
30535091
684817417
684817417
678273158
678273158
 2
2
2
 384537153
384537153
931782877
931782877
704382179
704382179
489801029
489801029
802417408
802417408
811453991
811453991
425490835
425490835
490987488
490987488
236947076
236947076
236947076
490987488
490987488
425490835
425490835
811453991
811453991
802417408
802417408
489801029
489801029
704382179
704382179
931782877
931782877
384537153
384537153
 30
30
25
25
20
25
25
30
30
 53071304
53071304
615769928
615769928
420248395
420248395
53077309
53077309
96175104
96175104
422310606
422310606
786761162
786761162
769373428
769373428
647001302
647001302
164038326
164038326
365502333
164038326
164038326
647001302
647001302
769373428
769373428
786761162
786761162
422310606
422310606
96175104
96175104
53077309
53077309
420248395
420248395
615769928
615769928
53071304
53071304

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>
#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 invp(a,p)pom(a,p-2,p)

ll fact[4010],invfact[4010];
ll factinit(ll n){
	fact[0]=1;
	rep(i,0,n)fact[i+1]=fact[i]*(i+1)%MOD;
	invfact[n]=invp(fact[n],MOD);
	for(ll i=n;i>0;i--)invfact[i-1]=invfact[i]*i%MOD;
}
ll choose(ll n,ll r){
	if(n<0||r<0||n-r<0)return 0;
	return fact[n]*invfact[r]%MOD*invfact[n-r]%MOD;
}

ll ans[4010];
int main(){
	factinit(4005);
	ll n,k;
	scanf("%lld %lld\n",&k,&n);
	rep(x,2,k+2){
		ll t=0;
		if(x%2){
			//奇数のとき
			//はずすべきペアはx/2組ある
			ll p=x/2;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする。その組の選び方がchoose(p,i)
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//choose(k+n-2*p-1,n-p+i)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*choose(k+n-2*p-1,n-p+i)%MOD*pom(2,p-i,MOD))%MOD;
			}
		}else{
			//偶数のとき
			//はずすべきペアが(x/2-1)組と、0or1にすべきものが1つある
			ll p=x/2-1;
			rep(i,0,p+1){
				//p組のうちちょうどi組が(0,0)だとする
				//残りの(p-i)組に先に1個わりあてると、残りの(n-p+i)個を(k-2*p+p-i)組に振り分けるので
				//まんなかを0にしたときchoose(k+n-2*p-2,n-p+i)通り
				//まんなかを1にしたときchoose(k+n-2*p-3,n-p+i-1)通り
				//(p-i)組はどっちに割り振るか各2通りあるので2^(p-i)倍
				t=(t+choose(p,i)*(choose(k+n-2*p-2,n-p+i)+choose(k+n-2*p-3,n-p+i-1))%MOD*pom(2,p-i,MOD))%MOD;
			}
		}
		ans[x]=t;
	}
	rep(i,2,k+2)printf("%lld\n",ans[i]);
	rep(i,k+2,2*k+1)printf("%lld\n",ans[2*k+2-i]);
}```

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	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 32080
fact:
	.zero	32080
	.globl	invfact
	.align 32
	.type	invfact, @object
	.size	invfact, 32080
invfact:
	.zero	32080
	.text
	.globl	factinit
	.type	factinit, @function
factinit:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, fact(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-16(%rbp), %rdx
	addq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L21
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$998244353, %edx
	movl	$998244351, %esi
	movq	%rax, %rdi
	call	pom
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L22
.L23:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	invfact(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	leaq	-1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subq	$1, -8(%rbp)
.L22:
	cmpq	$0, -8(%rbp)
	jg	.L23
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	factinit, .-factinit
	.globl	choose
	.type	choose, @function
choose:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -8(%rbp)
	js	.L25
	cmpq	$0, -16(%rbp)
	js	.L25
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	jns	.L26
.L25:
	movl	$0, %eax
	jmp	.L27
.L26:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	invfact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-8(%rbp), %rdx
	subq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L27:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	choose, .-choose
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 32080
ans:
	.zero	32080
	.section	.rodata
.LC0:
	.string	"%lld %lld\n"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4005, %edi
	call	factinit
	leaq	-104(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$2, -88(%rbp)
	jmp	.L29
.L36:
	movq	$0, -80(%rbp)
	movq	-88(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L30
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L31
.L32:
	movq	-72(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-32(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$1, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-32(%rbp), %rax
	subq	-72(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -72(%rbp)
.L31:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jge	.L32
	jmp	.L33
.L30:
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	subq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -64(%rbp)
	jmp	.L34
.L35:
	movq	-64(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %r12
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	addq	%r12, %rax
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	subq	-64(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -64(%rbp)
.L34:
	movq	-40(%rbp), %rax
	cmpq	-64(%rbp), %rax
	jge	.L35
.L33:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rdx
	movq	-80(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L29:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jle	.L36
	movq	$2, -56(%rbp)
	jmp	.L37
.L38:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -56(%rbp)
.L37:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L38
	movq	-96(%rbp), %rax
	addq	$2, %rax
	movq	%rax, -48(%rbp)
	jmp	.L39
.L40:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	addq	%rax, %rax
	subq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -48(%rbp)
.L39:
	movq	-96(%rbp), %rax
	addq	%rax, %rax
	cmpq	%rax, -48(%rbp)
	jle	.L40
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	fact
	.bss
	.align 32
	.type	fact, @object
	.size	fact, 32080
fact:
	.zero	32080
	.globl	invfact
	.align 32
	.type	invfact, @object
	.size	invfact, 32080
invfact:
	.zero	32080
	.text
	.globl	factinit
	.type	factinit, @function
factinit:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$24, %rsp
	movq	%rdi, -24(%rbp)
	movq	$1, fact(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	-16(%rbp), %rdx
	addq	$1, %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	fact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addq	$1, -16(%rbp)
.L20:
	movq	-16(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jl	.L21
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$998244353, %edx
	movl	$998244351, %esi
	movq	%rax, %rdi
	call	pom
	movq	-24(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	movq	-24(%rbp), %rax
	movq	%rax, -8(%rbp)
	jmp	.L22
.L23:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	invfact(%rip), %rax
	movq	(%rdx,%rax), %rax
	imulq	-8(%rbp), %rax
	movq	%rax, %rcx
	movq	-8(%rbp), %rax
	leaq	-1(%rax), %rsi
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	leaq	0(,%rsi,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	subq	$1, -8(%rbp)
.L22:
	cmpq	$0, -8(%rbp)
	jg	.L23
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	factinit, .-factinit
	.globl	choose
	.type	choose, @function
choose:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -8(%rbp)
	js	.L25
	cmpq	$0, -16(%rbp)
	js	.L25
	movq	-8(%rbp), %rax
	subq	-16(%rbp), %rax
	testq	%rax, %rax
	jns	.L26
.L25:
	movl	$0, %eax
	jmp	.L27
.L26:
	movq	-8(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	fact(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	invfact(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	-8(%rbp), %rdx
	subq	-16(%rbp), %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	invfact(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	imulq	%rdx, %rax
	movq	%rax, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
.L27:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	choose, .-choose
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 32080
ans:
	.zero	32080
	.section	.rodata
.LC0:
	.string	"%lld %lld\n"
.LC1:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$4005, %edi
	call	factinit
	leaq	-104(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$2, -88(%rbp)
	jmp	.L29
.L36:
	movq	$0, -80(%rbp)
	movq	-88(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L30
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
	movq	$0, -72(%rbp)
	jmp	.L31
.L32:
	movq	-72(%rbp), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-32(%rbp), %rax
	movq	%rax, %rdx
	movq	-72(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-32(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$1, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-32(%rbp), %rax
	subq	-72(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -72(%rbp)
.L31:
	movq	-32(%rbp), %rax
	cmpq	-72(%rbp), %rax
	jge	.L32
	jmp	.L33
.L30:
	movq	-88(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	subq	$1, %rax
	movq	%rax, -40(%rbp)
	movq	$0, -64(%rbp)
	jmp	.L34
.L35:
	movq	-64(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %rbx
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rax, %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	movq	%rax, %r12
	movq	-104(%rbp), %rax
	subq	-40(%rbp), %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	-1(%rax), %rdx
	movq	-96(%rbp), %rcx
	movq	-104(%rbp), %rax
	addq	%rax, %rcx
	movq	-40(%rbp), %rax
	leaq	(%rax,%rax), %rsi
	movq	%rcx, %rax
	subq	%rsi, %rax
	subq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	choose
	addq	%r12, %rax
	imulq	%rax, %rbx
	movq	%rbx, %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movq	-40(%rbp), %rax
	subq	-64(%rbp), %rax
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-80(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$155014655926305585, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$23, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	movq	-80(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -80(%rbp)
	addq	$1, -64(%rbp)
.L34:
	movq	-40(%rbp), %rax
	cmpq	-64(%rbp), %rax
	jge	.L35
.L33:
	movq	-88(%rbp), %rax
	leaq	0(,%rax,8), %rcx
	leaq	ans(%rip), %rdx
	movq	-80(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addq	$1, -88(%rbp)
.L29:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -88(%rbp)
	jle	.L36
	movq	$2, -56(%rbp)
	jmp	.L37
.L38:
	movq	-56(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -56(%rbp)
.L37:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	cmpq	%rax, -56(%rbp)
	jle	.L38
	movq	-96(%rbp), %rax
	addq	$2, %rax
	movq	%rax, -48(%rbp)
	jmp	.L39
.L40:
	movq	-96(%rbp), %rax
	addq	$1, %rax
	addq	%rax, %rax
	subq	-48(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -48(%rbp)
.L39:
	movq	-96(%rbp), %rax
	addq	%rax, %rax
	cmpq	%rax, -48(%rbp)
	jle	.L40
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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:
