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>

int const M = 998244353;
int i, n, x, c[7 << 14];

int power(int a, int b) {
  int r = 1;
  for(; b; b >>= 1) {
    if(b & 1)
      r = (long long) r * a % M;
    a = (long long) a * a % M;
  }
  return r;
}  

int main() {
  scanf("%d%d", &n, &x);
  int r = 0;
  if(x == 0) {
    for(i = 0; ++i < n; c[x]++) scanf("%d", &x);
    if(c[0] == 0) {
      c[0] = r = 1;
      for(i = 0; c[++i];) {
        n -= c[i];
        r = (long long) r * power(c[i - 1], c[i]) % M;
      }
    }
  }
  printf("%d\n", n > 1 ? 0 : r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	M
	.section	.rodata
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.long	998244353
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 458752
c:
	.zero	458752
	.text
	.globl	power
	.type	power, @function
power:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L4
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	power, .-power
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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	$24, %rsp
	.cfi_offset 3, -24
	leaq	x(%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
	movl	$0, -20(%rbp)
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L9:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	x(%rip), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	movl	c(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, c(%rip)
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, n(%rip)
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	power
	cltq
	imulq	%rbx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
.L10:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
.L7:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jg	.L12
	movl	-20(%rbp), %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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	power
	.type	power, @function
power:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	movl	$1, %esi
	testl	%ecx, %ecx
	je	.L1
	movabsq	$155014655926305585, %r8
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdi
	testb	$1, %cl
	je	.L3
	movslq	%esi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %esi
.L3:
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r8
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %edi
	sarl	%ecx
	jne	.L4
.L1:
	movl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	power, .-power
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdx
	call	__isoc99_scanf@PLT
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	cmpl	$1, n(%rip)
	movl	$1, i(%rip)
	jle	.L14
	leaq	.LC1(%rip), %r12
	leaq	c(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movslq	x(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L15
	cmpl	$0, (%rbx)
	jne	.L16
.L21:
	movl	4+c(%rip), %edi
	movl	n(%rip), %r10d
	movl	$1, c(%rip)
	movl	$1, i(%rip)
	testl	%edi, %edi
	je	.L23
	leaq	-8+c(%rip), %rbp
	movl	$2, %r9d
	movl	$1, %edx
	movabsq	$155014655926305585, %r8
	leaq	4(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L19:
	movl	0(%rbp,%r9,4), %ecx
	subl	%edi, %r10d
	movslq	%edx, %r11
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L18:
	movslq	%ecx, %rcx
	testb	$1, %dil
	je	.L17
	movslq	%esi, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %esi
.L17:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %ecx
	sarl	%edi
	jne	.L18
	movslq	%esi, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	movl	%esi, %edx
	subl	%eax, %edx
	movl	%r9d, %eax
	addq	$1, %r9
	movl	(%rbx,%r9,4), %edi
	testl	%edi, %edi
	jne	.L19
	movl	%r10d, n(%rip)
	movl	%eax, i(%rip)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%edx, %edx
.L13:
	cmpl	$1, n(%rip)
	jle	.L20
.L22:
	xorl	%edx, %edx
.L20:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	cmpl	$0, c(%rip)
	je	.L21
	jmp	.L22
.L23:
	movl	$1, %edx
	jmp	.L13
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 458752
c:
	.zero	458752
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	M
	.section	.rodata
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.long	998244353
	.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	power
	.type	power, @function
power:
.LFB23:
	.cfi_startproc
	endbr64
	movl	%esi, %ecx
	movl	$1, %esi
	testl	%ecx, %ecx
	je	.L1
	movabsq	$155014655926305585, %r8
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%edi, %rdi
	testb	$1, %cl
	je	.L3
	movslq	%esi, %rsi
	imulq	%rdi, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %esi
.L3:
	imulq	%rdi, %rdi
	movq	%rdi, %rax
	imulq	%r8
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %edi
	sarl	%ecx
	jne	.L4
.L1:
	movl	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	power, .-power
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	x(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdx
	call	__isoc99_scanf@PLT
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	cmpl	$1, n(%rip)
	movl	$1, i(%rip)
	jle	.L14
	leaq	.LC1(%rip), %r12
	leaq	c(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	movslq	x(%rip), %rax
	addl	$1, (%rbx,%rax,4)
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	n(%rip), %eax
	movl	%eax, i(%rip)
	jl	.L15
	cmpl	$0, (%rbx)
	jne	.L16
.L21:
	movl	4+c(%rip), %edi
	movl	n(%rip), %r10d
	movl	$1, c(%rip)
	movl	$1, i(%rip)
	testl	%edi, %edi
	je	.L23
	leaq	-8+c(%rip), %rbp
	movl	$2, %r9d
	movl	$1, %edx
	movabsq	$155014655926305585, %r8
	leaq	4(%rbp), %rbx
	.p2align 4,,10
	.p2align 3
.L19:
	movl	0(%rbp,%r9,4), %ecx
	subl	%edi, %r10d
	movslq	%edx, %r11
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L18:
	movslq	%ecx, %rcx
	testb	$1, %dil
	je	.L17
	movslq	%esi, %rsi
	imulq	%rcx, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %esi
.L17:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	imulq	%r8
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rdx
	subl	%edx, %ecx
	sarl	%edi
	jne	.L18
	movslq	%esi, %rsi
	imulq	%r11, %rsi
	movq	%rsi, %rax
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$23, %rdx
	subq	%rax, %rdx
	imulq	$998244353, %rdx, %rax
	movl	%esi, %edx
	subl	%eax, %edx
	movl	%r9d, %eax
	addq	$1, %r9
	movl	(%rbx,%r9,4), %edi
	testl	%edi, %edi
	jne	.L19
	movl	%r10d, n(%rip)
	movl	%eax, i(%rip)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%edx, %edx
.L13:
	cmpl	$1, n(%rip)
	jle	.L20
.L22:
	xorl	%edx, %edx
.L20:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	cmpl	$0, c(%rip)
	je	.L21
	jmp	.L22
.L23:
	movl	$1, %edx
	jmp	.L13
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	c
	.bss
	.align 32
	.type	c, @object
	.size	c, 458752
c:
	.zero	458752
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	M
	.section	.rodata
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.long	998244353
	.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>

int const M = 998244353;
int i, n, x, c[7 << 14];

int power(int a, int b) {
  int r = 1;
  for(; b; b >>= 1) {
    if(b & 1)
      r = (long long) r * a % M;
    a = (long long) a * a % M;
  }
  return r;
}  

int main() {
  scanf("%d%d", &n, &x);
  int r = 0;
  if(x == 0) {
    for(i = 0; ++i < n; c[x]++) scanf("%d", &x);
    if(c[0] == 0) {
      c[0] = r = 1;
      for(i = 0; c[++i];) {
        n -= c[i];
        r = (long long) r * power(c[i - 1], c[i]) % M;
      }
    }
  }
  printf("%d\n", n > 1 ? 0 : r);
  return 0;
}

4
0 1 1 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>

int const M = 998244353;
int i, n, x, c[7 << 14];

int power(int a, int b) {
  int r = 1;
  for(; b; b >>= 1) {
    if(b & 1)
      r = (long long) r * a % M;
    a = (long long) a * a % M;
  }
  return r;
}  

int main() {
  scanf("%d%d", &n, &x);
  int r = 0;
  if(x == 0) {
    for(i = 0; ++i < n; c[x]++) scanf("%d", &x);
    if(c[0] == 0) {
      c[0] = r = 1;
      for(i = 0; c[++i];) {
        n -= c[i];
        r = (long long) r * power(c[i - 1], c[i]) % M;
      }
    }
  }
  printf("%d\n", n > 1 ? 0 : r);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	M
	.section	.rodata
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.long	998244353
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 458752
c:
	.zero	458752
	.text
	.globl	power
	.type	power, @function
power:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L4
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	power, .-power
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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	$24, %rsp
	.cfi_offset 3, -24
	leaq	x(%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
	movl	$0, -20(%rbp)
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L9:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	x(%rip), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	movl	c(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, c(%rip)
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, n(%rip)
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	power
	cltq
	imulq	%rbx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
.L10:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
.L7:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jg	.L12
	movl	-20(%rbp), %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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	M
	.section	.rodata
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.long	998244353
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 458752
c:
	.zero	458752
	.text
	.globl	power
	.type	power, @function
power:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$1, -4(%rbp)
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -4(%rbp)
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	imulq	%rdx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
	sarl	-24(%rbp)
.L2:
	cmpl	$0, -24(%rbp)
	jne	.L4
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	power, .-power
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.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	$24, %rsp
	.cfi_offset 3, -24
	leaq	x(%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
	movl	$0, -20(%rbp)
	movl	x(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$0, i(%rip)
	jmp	.L8
.L9:
	leaq	x(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	x(%rip), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L9
	movl	c(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	$1, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, c(%rip)
	movl	$0, i(%rip)
	jmp	.L10
.L11:
	movl	n(%rip), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	c(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, n(%rip)
	movl	-20(%rbp), %eax
	movslq	%eax, %rbx
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	i(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	c(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	power
	cltq
	imulq	%rbx, %rax
	movl	$998244353, %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, %rax
	movl	%eax, -20(%rbp)
.L10:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	c(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L11
.L7:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jg	.L12
	movl	-20(%rbp), %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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:
