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>
#define ll long long
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

int main(){
	int n;
	scanf("%d",&n);
	ll ans=0;
	for(int i=0;i<n;i++){
		int x;
		scanf("%d",&x);
		ans=(ans+pom(2,n-1-i,MOD)*x%MOD*pom(x+1,i,MOD))%MOD;
	}
	printf("%d\n",ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	pom
	.type	pom, @function
pom:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	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	.L2
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L4:
	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)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L5
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	pom, .-pom
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	subl	$1, %eax
	subl	-36(%rbp), %eax
	cltq
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	movl	-40(%rbp), %edx
	movslq	%edx, %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
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$998244353, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	pom
	.type	pom, @function
pom:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %sil
	je	.L3
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L3:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L4
.L1:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	pom, .-pom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L21
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	leaq	4(%rsp), %rbp
	movabsq	$155014655926305585, %r13
	movabsq	$-8525806094425994177, %r12
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r8d
	movl	$1, %edi
	leal	-1(%r8), %eax
	subl	%r15d, %eax
	movslq	%eax, %r9
	je	.L13
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	testb	$1, %r9b
	je	.L14
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rsi
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
.L14:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r12
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	movq	%r9, %rsi
	shrq	$63, %rsi
	addq	%r9, %rsi
	sarq	%rsi
	movq	%rsi, %r9
	jne	.L15
.L13:
	movslq	4(%rsp), %rcx
	movq	%rcx, %rsi
	imulq	%rdi, %rcx
	movq	%r15, %rdi
	addl	$1, %esi
	movslq	%esi, %rsi
	movq	%rcx, %rax
	imulq	%r13
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	movq	%rcx, %r11
	movq	%rsi, %rcx
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	testq	%r15, %r15
	je	.L16
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %dil
	je	.L17
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
.L17:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	mulq	%r12
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %r10
	subq	%r10, %rcx
	sarq	%rdi
	jne	.L18
	imulq	%rsi, %r11
.L16:
	addq	%r14, %r11
	addq	$1, %r15
	movq	%r11, %rax
	movq	%r11, %r14
	imulq	%r13
	movq	%r11, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r14
	cmpl	%r15d, %r8d
	jg	.L19
.L12:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$24, %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
.L21:
	.cfi_restore_state
	xorl	%r14d, %r14d
	jmp	.L12
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	pom
	.type	pom, @function
pom:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	testb	$1, %sil
	je	.L3
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L3:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L4
.L1:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	pom, .-pom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L21
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	leaq	4(%rsp), %rbp
	movabsq	$155014655926305585, %r13
	movabsq	$-8525806094425994177, %r12
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r8d
	movl	$1, %edi
	leal	-1(%r8), %eax
	subl	%r15d, %eax
	movslq	%eax, %r9
	je	.L13
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L15:
	testb	$1, %r9b
	je	.L14
	imulq	%rcx, %rdi
	movq	%rdi, %rax
	movq	%rdi, %rsi
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	imulq	$998244353, %rdi, %rax
	movq	%rsi, %rdi
	subq	%rax, %rdi
.L14:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	movq	%rcx, %rsi
	mulq	%r12
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
	movq	%rsi, %rcx
	movq	%r9, %rsi
	shrq	$63, %rsi
	addq	%r9, %rsi
	sarq	%rsi
	movq	%rsi, %r9
	jne	.L15
.L13:
	movslq	4(%rsp), %rcx
	movq	%rcx, %rsi
	imulq	%rdi, %rcx
	movq	%r15, %rdi
	addl	$1, %esi
	movslq	%esi, %rsi
	movq	%rcx, %rax
	imulq	%r13
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	movq	%rcx, %r11
	movq	%rsi, %rcx
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rcx
	testq	%r15, %r15
	je	.L16
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %dil
	je	.L17
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %rsi
.L17:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	mulq	%r12
	shrq	$29, %rdx
	imulq	$998244353, %rdx, %r10
	subq	%r10, %rcx
	sarq	%rdi
	jne	.L18
	imulq	%rsi, %r11
.L16:
	addq	%r14, %r11
	addq	$1, %r15
	movq	%r11, %rax
	movq	%r11, %r14
	imulq	%r13
	movq	%r11, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	subq	%rax, %r14
	cmpl	%r15d, %r8d
	jg	.L19
.L12:
	xorl	%eax, %eax
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$24, %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
.L21:
	.cfi_restore_state
	xorl	%r14d, %r14d
	jmp	.L12
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#define ll long long
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

int main(){
	int n;
	scanf("%d",&n);
	ll ans=0;
	for(int i=0;i<n;i++){
		int x;
		scanf("%d",&x);
		ans=(ans+pom(2,n-1-i,MOD)*x%MOD*pom(x+1,i,MOD))%MOD;
	}
	printf("%d\n",ans);
}

5
100 325 300 400 500
 3
1 4 3
 5
101 325 300 400 500
 3
2 4 3
 5
101 325 404 400 500
 3
3 4 3
 5
101 608 404 400 500
 3
4 4 3
 5
101 608 404 772 500
 3
4 4 1

936266429
 92
 936266445
 96
 94365292
 100
 96479868
 104
 831789230
 60

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>
#define ll long long
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

int main(){
	int n;
	scanf("%d",&n);
	ll ans=0;
	for(int i=0;i<n;i++){
		int x;
		scanf("%d",&x);
		ans=(ans+pom(2,n-1-i,MOD)*x%MOD*pom(x+1,i,MOD))%MOD;
	}
	printf("%d\n",ans);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	pom
	.type	pom, @function
pom:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	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	.L2
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L4:
	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)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L5
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	pom, .-pom
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	subl	$1, %eax
	subl	-36(%rbp), %eax
	cltq
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	movl	-40(%rbp), %edx
	movslq	%edx, %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
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$998244353, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	pom
	.type	pom, @function
pom:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	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	.L2
.L5:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L4
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L4:
	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)
.L2:
	cmpq	$0, -32(%rbp)
	jne	.L5
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	pom, .-pom
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L8
.L9:
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-44(%rbp), %eax
	subl	$1, %eax
	subl	-36(%rbp), %eax
	cltq
	movl	$998244353, %edx
	movq	%rax, %rsi
	movl	$2, %edi
	call	pom
	movl	-40(%rbp), %edx
	movslq	%edx, %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
	movq	%rax, %rbx
	imulq	$998244353, %rbx, %rax
	movq	%rcx, %rbx
	subq	%rax, %rbx
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-40(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$998244353, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	pom
	imulq	%rax, %rbx
	movq	%rbx, %rdx
	movq	-32(%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, -32(%rbp)
	movq	-32(%rbp), %rax
	imulq	$998244353, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L8:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L9
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
