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<string.h>
int n,m,i,j,k;
int num,id,cnt;

char A[10];
char B[10];
char tmp;

int flg[1001];

int main(){
  while(1){
    scanf("%d %d",&n,&m);
    if(n==0&&m==0)break;
    
    for(i=1;i<=n;i++)flg[i]=0;
    id=1;
    cnt=n;
    
    for(i=1;i<=m;i++){

      //printf("%d %d\n",i,id);
      if(i%15==0){
        strcpy(A,"FizzBuzz");
      }else if(i%5==0){
        strcpy(A,"Buzz");
      }else if(i%3==0){
        strcpy(A,"Fizz");
      }else{
        j=0;
        num=i;
        while(num>0){
          A[j]=num%10+'0';
          j++;
          num/=10;
        }
        for(k=0;k<j/2;k++){
          tmp=A[k];
          A[k]=A[j-1-k];
          A[j-1-k]=tmp;
        }
        A[j]='\0';
      }
      
      scanf("%s",B);
      
      if(cnt==1)continue;


      //printf("%s %s %d %d\n",A,B,strcmp(A,B),id);
      if(strcmp(A,B)!=0){
        flg[id]=1;
        //printf("%d\n",id);
        cnt--;
      }
      
      while(1){
        id++;
        if(id==n+1)id=1;
        if(flg[id]==0)break;
      }
      
    }
    
    j=0;
    for(i=1;i<=n;i++){

      if(flg[i]==0){
        if(j!=0)printf(" ");
        j=1;
        printf("%d",i);
      }
      
    }
    printf("\n");
    
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	id
	.align 4
	.type	id, @object
	.size	id, 4
id:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 10
A:
	.zero	10
	.globl	B
	.align 8
	.type	B, @object
	.size	B, 10
B:
	.zero	10
	.globl	tmp
	.type	tmp, @object
	.size	tmp, 1
tmp:
	.zero	1
	.globl	flg
	.align 32
	.type	flg, @object
	.size	flg, 4004
flg:
	.zero	4004
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
.L26:
	leaq	m(%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	n(%rip), %eax
	testl	%eax, %eax
	jne	.L2
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L29
.L2:
	movl	$1, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$1, id(%rip)
	movl	n(%rip), %eax
	movl	%eax, cnt(%rip)
	movl	$1, i(%rip)
	jmp	.L6
.L21:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$-2004318071, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$3, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$4, %ecx
	subl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L7
	movabsq	$8825495348169042246, %rax
	movq	%rax, A(%rip)
	movb	$0, 8+A(%rip)
	jmp	.L8
.L7:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$2054845762, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$2054842694, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L10:
	movl	$0, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, num(%rip)
	jmp	.L11
.L12:
	movl	num(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	leal	48(%rax), %edx
	movl	j(%rip), %eax
	movl	%edx, %ecx
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	movl	num(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, num(%rip)
.L11:
	movl	num(%rip), %eax
	testl	%eax, %eax
	jg	.L12
	movl	$0, k(%rip)
	jmp	.L13
.L14:
	movl	k(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, tmp(%rip)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movl	k(%rip), %ecx
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movzbl	tmp(%rip), %edx
	cltq
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L13:
	movl	j(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L14
	movl	j(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$0, (%rax,%rdx)
.L8:
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	cnt(%rip), %eax
	cmpl	$1, %eax
	je	.L30
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	id(%rip), %eax
	addl	$1, %eax
	movl	%eax, id(%rip)
	movl	n(%rip), %eax
	leal	1(%rax), %edx
	movl	id(%rip), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	$1, id(%rip)
.L18:
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L31
	jmp	.L20
.L30:
	nop
	jmp	.L16
.L31:
	nop
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$0, j(%rip)
	movl	$1, i(%rip)
	jmp	.L22
.L25:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L24
	movl	$32, %edi
	call	putchar@PLT
.L24:
	movl	$1, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L22:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L26
.L29:
	nop
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r14
	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	flg(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L32:
	xorl	%eax, %eax
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	n(%rip), %ebp
	movl	m(%rip), %r12d
	movl	%ebp, %eax
	orl	%r12d, %eax
	je	.L44
	movl	$1, i(%rip)
	testl	%ebp, %ebp
	jle	.L3
	movslq	%ebp, %rdx
	xorl	%esi, %esi
	leaq	4+flg(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
	movl	%ebp, cnt(%rip)
	movl	$1, id(%rip)
	movl	$1, i(%rip)
	testl	%r12d, %r12d
	jle	.L4
.L37:
	movl	$1, %eax
	leaq	B(%rip), %rbp
	leaq	.LC1(%rip), %r12
	leaq	A(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L30:
	imull	$-286331153, %eax, %edx
	addl	$143165576, %edx
	cmpl	$286331152, %edx
	jbe	.L54
	imull	$-858993459, %eax, %edx
	addl	$429496729, %edx
	cmpl	$858993458, %edx
	jbe	.L55
	imull	$-1431655765, %eax, %edx
	addl	$715827882, %edx
	cmpl	$1431655764, %edx
	ja	.L8
	movl	$2054842694, A(%rip)
	movb	$0, 4+A(%rip)
.L6:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	cnt(%rip), %r13d
	cmpl	$1, %r13d
	je	.L24
	movq	%rbp, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	movl	%eax, %r8d
	movl	id(%rip), %eax
	testl	%r8d, %r8d
	je	.L25
	movslq	%eax, %rdx
	subl	$1, %r13d
	movl	$1, (%rbx,%rdx,4)
	movl	%r13d, cnt(%rip)
.L25:
	movl	n(%rip), %ecx
	.p2align 4,,10
	.p2align 3
.L29:
	cmpl	%eax, %ecx
	je	.L26
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	testl	%edi, %edi
	jne	.L29
.L27:
	movl	%eax, id(%rip)
.L24:
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	m(%rip), %eax
	movl	%eax, i(%rip)
	jle	.L30
	movl	$0, j(%rip)
	movl	n(%rip), %ebp
	movl	$1, i(%rip)
	testl	%ebp, %ebp
	jle	.L36
.L31:
	movl	$1, %edx
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, j(%rip)
	call	__printf_chk@PLT
	movl	i(%rip), %edx
	movl	n(%rip), %ebp
.L33:
	addl	$1, %edx
	movl	%edx, i(%rip)
	cmpl	%ebp, %edx
	jg	.L36
.L35:
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %ecx
	testl	%ecx, %ecx
	jne	.L33
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L34
	movl	$32, %edi
	call	putchar@PLT
	movl	i(%rip), %edx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L26:
	movl	4+flg(%rip), %esi
	movl	$1, %eax
	testl	%esi, %esi
	jne	.L29
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L54:
	movabsq	$8825495348169042246, %rax
	movq	%rax, (%r15)
	movb	$0, 8+A(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L55:
	movl	$2054845762, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$0, j(%rip)
	movl	%eax, num(%rip)
	testl	%eax, %eax
	jle	.L56
	movslq	%eax, %rdx
	movl	%eax, %ecx
	movl	%eax, %esi
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$34, %rdx
	subl	%ecx, %edx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	addl	$48, %esi
	movb	%sil, (%r15)
	cmpl	$9, %eax
	jle	.L11
	movl	%edx, %ecx
	movl	$3435973837, %r11d
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 1+A(%rip)
	cmpl	$99, %eax
	jle	.L12
	movl	%ecx, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %edi
	addl	%edi, %edi
	subl	%edi, %ecx
	addl	$48, %ecx
	movb	%cl, 2+A(%rip)
	cmpl	$999, %eax
	jle	.L13
	movl	%edx, %ecx
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 3+A(%rip)
	cmpl	$9999, %eax
	jle	.L14
	movl	%ecx, %edi
	imulq	%r11, %rdi
	shrq	$35, %rdi
	leal	(%rdi,%rdi,4), %edx
	addl	%edx, %edx
	subl	%edx, %ecx
	addl	$48, %ecx
	movb	%cl, 4+A(%rip)
	cmpl	$99999, %eax
	jle	.L15
	movl	%edi, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edi
	addl	$48, %edi
	movb	%dil, 5+A(%rip)
	cmpl	$999999, %eax
	jle	.L16
	movl	%edx, %ecx
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 6+A(%rip)
	cmpl	$9999999, %eax
	jle	.L17
	movl	%ecx, %edi
	imulq	%r11, %rdi
	shrq	$35, %rdi
	leal	(%rdi,%rdi,4), %edx
	addl	%edx, %edx
	subl	%edx, %ecx
	leal	48(%rcx), %edx
	movb	%dl, 7+A(%rip)
	cmpl	$99999999, %eax
	jle	.L18
	movl	%edi, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edi
	leal	48(%rdi), %ecx
	movb	%cl, 8+A(%rip)
	cmpl	$999999999, %eax
	jle	.L19
	addl	$48, %edx
	movl	$9, %ecx
	movl	$10, %edi
	movl	$10, j(%rip)
	movl	$0, num(%rip)
	movb	%dl, 9+A(%rip)
	movl	$5, %edx
.L20:
	movslq	%ecx, %rax
	movzbl	(%r15,%rax), %r8d
	movb	%sil, (%r15,%rax)
	leal	-1(%rcx), %eax
	movzbl	1+A(%rip), %esi
	cltq
	movb	%r8b, (%r15)
	movzbl	(%r15,%rax), %r8d
	movb	%sil, (%r15,%rax)
	leal	-2(%rcx), %eax
	movzbl	2+A(%rip), %esi
	cltq
	movb	%r8b, 1+A(%rip)
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 2+A(%rip)
	movb	%sil, (%r15,%rax)
	cmpl	$3, %edx
	je	.L23
	leal	-3(%rcx), %eax
	movzbl	3+A(%rip), %esi
	cltq
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 3+A(%rip)
	movb	%sil, (%r15,%rax)
	cmpl	$5, %edx
	jne	.L40
	leal	-4(%rcx), %eax
	movzbl	4+A(%rip), %esi
	cltq
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 4+A(%rip)
	movb	%sil, (%r15,%rax)
.L23:
	xorl	%r10d, %r10d
	leal	-1(%rdx), %eax
	testl	%edx, %edx
	movb	%sil, tmp(%rip)
	movl	%r10d, %r8d
	movl	%edx, k(%rip)
	cmovg	%eax, %r8d
	negl	%eax
	testl	%edx, %edx
	cmovle	%r10d, %eax
	movslq	%r8d, %r8
	addl	%ecx, %eax
	movb	%r9b, (%r15,%r8)
	cltq
	movb	%sil, (%r15,%rax)
.L10:
	movb	$0, (%r15,%rdi)
	jmp	.L6
.L3:
	movl	$1, id(%rip)
	movl	%ebp, cnt(%rip)
	testl	%r12d, %r12d
	jg	.L37
	movl	$0, j(%rip)
	.p2align 4,,10
	.p2align 3
.L36:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L32
.L56:
	movl	$0, k(%rip)
	xorl	%edi, %edi
	jmp	.L10
.L11:
	movl	$1, j(%rip)
	movl	$1, %edi
	movl	%edx, num(%rip)
	movl	$0, k(%rip)
	jmp	.L10
.L12:
	movl	$2, j(%rip)
	movl	$2, %edi
	movl	%ecx, num(%rip)
	movl	$1, %ecx
.L22:
	movslq	%ecx, %rax
	movl	$1, %edx
	movzbl	(%r15,%rax), %r9d
	movb	%sil, (%r15,%rax)
	movb	%r9b, (%r15)
	jmp	.L23
.L13:
	movl	%edx, num(%rip)
	movl	$2, %ecx
	movl	$3, %edi
	movl	$3, j(%rip)
	jmp	.L22
.L40:
	movl	$4, %edx
	jmp	.L23
.L14:
	movl	$4, j(%rip)
	movl	$4, %edi
	movl	%ecx, num(%rip)
	movl	$3, %ecx
.L21:
	movslq	%ecx, %rax
	movzbl	(%r15,%rax), %edx
	movb	%sil, (%r15,%rax)
	leal	-1(%rcx), %eax
	cltq
	movzbl	1+A(%rip), %esi
	movzbl	(%r15,%rax), %r9d
	movb	%dl, (%r15)
	movl	$2, %edx
	movb	%sil, (%r15,%rax)
	movb	%r9b, 1+A(%rip)
	jmp	.L23
.L4:
	movl	$0, j(%rip)
	jmp	.L31
.L15:
	movl	%edi, num(%rip)
	movl	$4, %ecx
	movl	$5, %edi
	movl	$5, j(%rip)
	jmp	.L21
.L16:
	movl	%edx, num(%rip)
	movl	$5, %ecx
	movl	$3, %edx
	movl	$6, %edi
	movl	$6, j(%rip)
	jmp	.L20
.L17:
	movl	%ecx, num(%rip)
	movl	$3, %edx
	movl	$6, %ecx
	movl	$7, %edi
	movl	$7, j(%rip)
	jmp	.L20
.L18:
	movl	%edi, num(%rip)
	movl	$7, %ecx
	movl	$4, %edx
	movl	$8, %edi
	movl	$8, j(%rip)
	jmp	.L20
.L19:
	movl	%edx, num(%rip)
	movl	$8, %ecx
	movl	$4, %edx
	movl	$9, %edi
	movl	$9, j(%rip)
	jmp	.L20
.L44:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	flg
	.bss
	.align 32
	.type	flg, @object
	.size	flg, 4004
flg:
	.zero	4004
	.globl	tmp
	.type	tmp, @object
	.size	tmp, 1
tmp:
	.zero	1
	.globl	B
	.align 8
	.type	B, @object
	.size	B, 10
B:
	.zero	10
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 10
A:
	.zero	10
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	id
	.align 4
	.type	id, @object
	.size	id, 4
id:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC2(%rip), %r14
	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	flg(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L32:
	xorl	%eax, %eax
	leaq	m(%rip), %rdx
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	n(%rip), %ebp
	movl	m(%rip), %r12d
	movl	%ebp, %eax
	orl	%r12d, %eax
	je	.L44
	movl	$1, i(%rip)
	testl	%ebp, %ebp
	jle	.L3
	movslq	%ebp, %rdx
	xorl	%esi, %esi
	leaq	4+flg(%rip), %rdi
	salq	$2, %rdx
	call	memset@PLT
	movl	%ebp, cnt(%rip)
	movl	$1, id(%rip)
	movl	$1, i(%rip)
	testl	%r12d, %r12d
	jle	.L4
.L37:
	movl	$1, %eax
	leaq	B(%rip), %rbp
	leaq	.LC1(%rip), %r12
	leaq	A(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L30:
	imull	$-286331153, %eax, %edx
	addl	$143165576, %edx
	cmpl	$286331152, %edx
	jbe	.L54
	imull	$-858993459, %eax, %edx
	addl	$429496729, %edx
	cmpl	$858993458, %edx
	jbe	.L55
	imull	$-1431655765, %eax, %edx
	addl	$715827882, %edx
	cmpl	$1431655764, %edx
	ja	.L8
	movl	$2054842694, A(%rip)
	movb	$0, 4+A(%rip)
.L6:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	cnt(%rip), %r13d
	cmpl	$1, %r13d
	je	.L24
	movq	%rbp, %rsi
	movq	%r15, %rdi
	call	strcmp@PLT
	movl	%eax, %r8d
	movl	id(%rip), %eax
	testl	%r8d, %r8d
	je	.L25
	movslq	%eax, %rdx
	subl	$1, %r13d
	movl	$1, (%rbx,%rdx,4)
	movl	%r13d, cnt(%rip)
.L25:
	movl	n(%rip), %ecx
	.p2align 4,,10
	.p2align 3
.L29:
	cmpl	%eax, %ecx
	je	.L26
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	(%rbx,%rdx,4), %edi
	testl	%edi, %edi
	jne	.L29
.L27:
	movl	%eax, id(%rip)
.L24:
	movl	i(%rip), %eax
	addl	$1, %eax
	cmpl	m(%rip), %eax
	movl	%eax, i(%rip)
	jle	.L30
	movl	$0, j(%rip)
	movl	n(%rip), %ebp
	movl	$1, i(%rip)
	testl	%ebp, %ebp
	jle	.L36
.L31:
	movl	$1, %edx
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%r14, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	$1, j(%rip)
	call	__printf_chk@PLT
	movl	i(%rip), %edx
	movl	n(%rip), %ebp
.L33:
	addl	$1, %edx
	movl	%edx, i(%rip)
	cmpl	%ebp, %edx
	jg	.L36
.L35:
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %ecx
	testl	%ecx, %ecx
	jne	.L33
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L34
	movl	$32, %edi
	call	putchar@PLT
	movl	i(%rip), %edx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L26:
	movl	4+flg(%rip), %esi
	movl	$1, %eax
	testl	%esi, %esi
	jne	.L29
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L54:
	movabsq	$8825495348169042246, %rax
	movq	%rax, (%r15)
	movb	$0, 8+A(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L55:
	movl	$2054845762, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	movl	$0, j(%rip)
	movl	%eax, num(%rip)
	testl	%eax, %eax
	jle	.L56
	movslq	%eax, %rdx
	movl	%eax, %ecx
	movl	%eax, %esi
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$34, %rdx
	subl	%ecx, %edx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %esi
	addl	$48, %esi
	movb	%sil, (%r15)
	cmpl	$9, %eax
	jle	.L11
	movl	%edx, %ecx
	movl	$3435973837, %r11d
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 1+A(%rip)
	cmpl	$99, %eax
	jle	.L12
	movl	%ecx, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %edi
	addl	%edi, %edi
	subl	%edi, %ecx
	addl	$48, %ecx
	movb	%cl, 2+A(%rip)
	cmpl	$999, %eax
	jle	.L13
	movl	%edx, %ecx
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 3+A(%rip)
	cmpl	$9999, %eax
	jle	.L14
	movl	%ecx, %edi
	imulq	%r11, %rdi
	shrq	$35, %rdi
	leal	(%rdi,%rdi,4), %edx
	addl	%edx, %edx
	subl	%edx, %ecx
	addl	$48, %ecx
	movb	%cl, 4+A(%rip)
	cmpl	$99999, %eax
	jle	.L15
	movl	%edi, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edi
	addl	$48, %edi
	movb	%dil, 5+A(%rip)
	cmpl	$999999, %eax
	jle	.L16
	movl	%edx, %ecx
	imulq	%r11, %rcx
	shrq	$35, %rcx
	leal	(%rcx,%rcx,4), %edi
	addl	%edi, %edi
	subl	%edi, %edx
	addl	$48, %edx
	movb	%dl, 6+A(%rip)
	cmpl	$9999999, %eax
	jle	.L17
	movl	%ecx, %edi
	imulq	%r11, %rdi
	shrq	$35, %rdi
	leal	(%rdi,%rdi,4), %edx
	addl	%edx, %edx
	subl	%edx, %ecx
	leal	48(%rcx), %edx
	movb	%dl, 7+A(%rip)
	cmpl	$99999999, %eax
	jle	.L18
	movl	%edi, %edx
	imulq	%r11, %rdx
	shrq	$35, %rdx
	leal	(%rdx,%rdx,4), %ecx
	addl	%ecx, %ecx
	subl	%ecx, %edi
	leal	48(%rdi), %ecx
	movb	%cl, 8+A(%rip)
	cmpl	$999999999, %eax
	jle	.L19
	addl	$48, %edx
	movl	$9, %ecx
	movl	$10, %edi
	movl	$10, j(%rip)
	movl	$0, num(%rip)
	movb	%dl, 9+A(%rip)
	movl	$5, %edx
.L20:
	movslq	%ecx, %rax
	movzbl	(%r15,%rax), %r8d
	movb	%sil, (%r15,%rax)
	leal	-1(%rcx), %eax
	movzbl	1+A(%rip), %esi
	cltq
	movb	%r8b, (%r15)
	movzbl	(%r15,%rax), %r8d
	movb	%sil, (%r15,%rax)
	leal	-2(%rcx), %eax
	movzbl	2+A(%rip), %esi
	cltq
	movb	%r8b, 1+A(%rip)
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 2+A(%rip)
	movb	%sil, (%r15,%rax)
	cmpl	$3, %edx
	je	.L23
	leal	-3(%rcx), %eax
	movzbl	3+A(%rip), %esi
	cltq
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 3+A(%rip)
	movb	%sil, (%r15,%rax)
	cmpl	$5, %edx
	jne	.L40
	leal	-4(%rcx), %eax
	movzbl	4+A(%rip), %esi
	cltq
	movzbl	(%r15,%rax), %r9d
	movb	%r9b, 4+A(%rip)
	movb	%sil, (%r15,%rax)
.L23:
	xorl	%r10d, %r10d
	leal	-1(%rdx), %eax
	testl	%edx, %edx
	movb	%sil, tmp(%rip)
	movl	%r10d, %r8d
	movl	%edx, k(%rip)
	cmovg	%eax, %r8d
	negl	%eax
	testl	%edx, %edx
	cmovle	%r10d, %eax
	movslq	%r8d, %r8
	addl	%ecx, %eax
	movb	%r9b, (%r15,%r8)
	cltq
	movb	%sil, (%r15,%rax)
.L10:
	movb	$0, (%r15,%rdi)
	jmp	.L6
.L3:
	movl	$1, id(%rip)
	movl	%ebp, cnt(%rip)
	testl	%r12d, %r12d
	jg	.L37
	movl	$0, j(%rip)
	.p2align 4,,10
	.p2align 3
.L36:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L32
.L56:
	movl	$0, k(%rip)
	xorl	%edi, %edi
	jmp	.L10
.L11:
	movl	$1, j(%rip)
	movl	$1, %edi
	movl	%edx, num(%rip)
	movl	$0, k(%rip)
	jmp	.L10
.L12:
	movl	$2, j(%rip)
	movl	$2, %edi
	movl	%ecx, num(%rip)
	movl	$1, %ecx
.L22:
	movslq	%ecx, %rax
	movl	$1, %edx
	movzbl	(%r15,%rax), %r9d
	movb	%sil, (%r15,%rax)
	movb	%r9b, (%r15)
	jmp	.L23
.L13:
	movl	%edx, num(%rip)
	movl	$2, %ecx
	movl	$3, %edi
	movl	$3, j(%rip)
	jmp	.L22
.L40:
	movl	$4, %edx
	jmp	.L23
.L14:
	movl	$4, j(%rip)
	movl	$4, %edi
	movl	%ecx, num(%rip)
	movl	$3, %ecx
.L21:
	movslq	%ecx, %rax
	movzbl	(%r15,%rax), %edx
	movb	%sil, (%r15,%rax)
	leal	-1(%rcx), %eax
	cltq
	movzbl	1+A(%rip), %esi
	movzbl	(%r15,%rax), %r9d
	movb	%dl, (%r15)
	movl	$2, %edx
	movb	%sil, (%r15,%rax)
	movb	%r9b, 1+A(%rip)
	jmp	.L23
.L4:
	movl	$0, j(%rip)
	jmp	.L31
.L15:
	movl	%edi, num(%rip)
	movl	$4, %ecx
	movl	$5, %edi
	movl	$5, j(%rip)
	jmp	.L21
.L16:
	movl	%edx, num(%rip)
	movl	$5, %ecx
	movl	$3, %edx
	movl	$6, %edi
	movl	$6, j(%rip)
	jmp	.L20
.L17:
	movl	%ecx, num(%rip)
	movl	$3, %edx
	movl	$6, %ecx
	movl	$7, %edi
	movl	$7, j(%rip)
	jmp	.L20
.L18:
	movl	%edi, num(%rip)
	movl	$7, %ecx
	movl	$4, %edx
	movl	$8, %edi
	movl	$8, j(%rip)
	jmp	.L20
.L19:
	movl	%edx, num(%rip)
	movl	$8, %ecx
	movl	$4, %edx
	movl	$9, %edi
	movl	$9, j(%rip)
	jmp	.L20
.L44:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	flg
	.bss
	.align 32
	.type	flg, @object
	.size	flg, 4004
flg:
	.zero	4004
	.globl	tmp
	.type	tmp, @object
	.size	tmp, 1
tmp:
	.zero	1
	.globl	B
	.align 8
	.type	B, @object
	.size	B, 10
B:
	.zero	10
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 10
A:
	.zero	10
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	id
	.align 4
	.type	id, @object
	.size	id, 4
id:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
#include<string.h>
int n,m,i,j,k;
int num,id,cnt;

char A[10];
char B[10];
char tmp;

int flg[1001];

int main(){
  while(1){
    scanf("%d %d",&n,&m);
    if(n==0&&m==0)break;
    
    for(i=1;i<=n;i++)flg[i]=0;
    id=1;
    cnt=n;
    
    for(i=1;i<=m;i++){

      //printf("%d %d\n",i,id);
      if(i%15==0){
        strcpy(A,"FizzBuzz");
      }else if(i%5==0){
        strcpy(A,"Buzz");
      }else if(i%3==0){
        strcpy(A,"Fizz");
      }else{
        j=0;
        num=i;
        while(num>0){
          A[j]=num%10+'0';
          j++;
          num/=10;
        }
        for(k=0;k<j/2;k++){
          tmp=A[k];
          A[k]=A[j-1-k];
          A[j-1-k]=tmp;
        }
        A[j]='\0';
      }
      
      scanf("%s",B);
      
      if(cnt==1)continue;


      //printf("%s %s %d %d\n",A,B,strcmp(A,B),id);
      if(strcmp(A,B)!=0){
        flg[id]=1;
        //printf("%d\n",id);
        cnt--;
      }
      
      while(1){
        id++;
        if(id==n+1)id=1;
        if(flg[id]==0)break;
      }
      
    }
    
    j=0;
    for(i=1;i<=n;i++){

      if(flg[i]==0){
        if(j!=0)printf(" ");
        j=1;
        printf("%d",i);
      }
      
    }
    printf("\n");
    
  }
  return 0;
}
5 7
1
0
Fizz
4
Buzz
6
7
3 5
1
2
3
4
5
0 0
 5 7
1
0
Fizz
4
Buzz
6
2
3 5
1
2
3
4
5
0 0
 5 7
1
0
Fizz
2
Buzz
6
2
3 5
1
2
4
4
8
0 0
 5 7
1
0
Fizz
2
zuzB
6
2
3 5
1
2
4
4
8
0 0
 5 7
1
2
Fizz
4
Buzz
6
7
3 5
1
1
3
4
5
0 0
 5 7
1
0
Fizz
2
zuzB
6
2
3 5
1
2
4
5
8
0 0
 5 7
1
0
Fizz
2
zuzB
2
2
3 5
2
1
4
4
8
0 0
 5 7
1
1
Fizz
4
Bu{z
6
7
3 5
1
2
3
4
5
0 0
 7 7
1
0
Fizz
4
Buzz
6
0
3 5
1
2
4
4
8
0 0
 5 7
1
0
zziF
2
zuzB
6
2
3 5
1
2
4
5
8
0 0

3 4 5
1
 4 5
1
 5
1
 3
1
 2 3 4 5
1
 3
2
 3
3
 3 4
1
 1 3 4 5
1
 1
2

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<string.h>
int n,m,i,j,k;
int num,id,cnt;

char A[10];
char B[10];
char tmp;

int flg[1001];

int main(){
  while(1){
    scanf("%d %d",&n,&m);
    if(n==0&&m==0)break;
    
    for(i=1;i<=n;i++)flg[i]=0;
    id=1;
    cnt=n;
    
    for(i=1;i<=m;i++){

      //printf("%d %d\n",i,id);
      if(i%15==0){
        strcpy(A,"FizzBuzz");
      }else if(i%5==0){
        strcpy(A,"Buzz");
      }else if(i%3==0){
        strcpy(A,"Fizz");
      }else{
        j=0;
        num=i;
        while(num>0){
          A[j]=num%10+'0';
          j++;
          num/=10;
        }
        for(k=0;k<j/2;k++){
          tmp=A[k];
          A[k]=A[j-1-k];
          A[j-1-k]=tmp;
        }
        A[j]='\0';
      }
      
      scanf("%s",B);
      
      if(cnt==1)continue;


      //printf("%s %s %d %d\n",A,B,strcmp(A,B),id);
      if(strcmp(A,B)!=0){
        flg[id]=1;
        //printf("%d\n",id);
        cnt--;
      }
      
      while(1){
        id++;
        if(id==n+1)id=1;
        if(flg[id]==0)break;
      }
      
    }
    
    j=0;
    for(i=1;i<=n;i++){

      if(flg[i]==0){
        if(j!=0)printf(" ");
        j=1;
        printf("%d",i);
      }
      
    }
    printf("\n");
    
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	id
	.align 4
	.type	id, @object
	.size	id, 4
id:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 10
A:
	.zero	10
	.globl	B
	.align 8
	.type	B, @object
	.size	B, 10
B:
	.zero	10
	.globl	tmp
	.type	tmp, @object
	.size	tmp, 1
tmp:
	.zero	1
	.globl	flg
	.align 32
	.type	flg, @object
	.size	flg, 4004
flg:
	.zero	4004
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
.L26:
	leaq	m(%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	n(%rip), %eax
	testl	%eax, %eax
	jne	.L2
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L29
.L2:
	movl	$1, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$1, id(%rip)
	movl	n(%rip), %eax
	movl	%eax, cnt(%rip)
	movl	$1, i(%rip)
	jmp	.L6
.L21:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$-2004318071, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$3, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$4, %ecx
	subl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L7
	movabsq	$8825495348169042246, %rax
	movq	%rax, A(%rip)
	movb	$0, 8+A(%rip)
	jmp	.L8
.L7:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$2054845762, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$2054842694, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L10:
	movl	$0, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, num(%rip)
	jmp	.L11
.L12:
	movl	num(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	leal	48(%rax), %edx
	movl	j(%rip), %eax
	movl	%edx, %ecx
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	movl	num(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, num(%rip)
.L11:
	movl	num(%rip), %eax
	testl	%eax, %eax
	jg	.L12
	movl	$0, k(%rip)
	jmp	.L13
.L14:
	movl	k(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, tmp(%rip)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movl	k(%rip), %ecx
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movzbl	tmp(%rip), %edx
	cltq
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L13:
	movl	j(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L14
	movl	j(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$0, (%rax,%rdx)
.L8:
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	cnt(%rip), %eax
	cmpl	$1, %eax
	je	.L30
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	id(%rip), %eax
	addl	$1, %eax
	movl	%eax, id(%rip)
	movl	n(%rip), %eax
	leal	1(%rax), %edx
	movl	id(%rip), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	$1, id(%rip)
.L18:
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L31
	jmp	.L20
.L30:
	nop
	jmp	.L16
.L31:
	nop
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$0, j(%rip)
	movl	$1, i(%rip)
	jmp	.L22
.L25:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L24
	movl	$32, %edi
	call	putchar@PLT
.L24:
	movl	$1, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L22:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L26
.L29:
	nop
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	id
	.align 4
	.type	id, @object
	.size	id, 4
id:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 8
	.type	A, @object
	.size	A, 10
A:
	.zero	10
	.globl	B
	.align 8
	.type	B, @object
	.size	B, 10
B:
	.zero	10
	.globl	tmp
	.type	tmp, @object
	.size	tmp, 1
tmp:
	.zero	1
	.globl	flg
	.align 32
	.type	flg, @object
	.size	flg, 4004
flg:
	.zero	4004
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
.L26:
	leaq	m(%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	n(%rip), %eax
	testl	%eax, %eax
	jne	.L2
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L29
.L2:
	movl	$1, i(%rip)
	jmp	.L4
.L5:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L4:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	$1, id(%rip)
	movl	n(%rip), %eax
	movl	%eax, cnt(%rip)
	movl	$1, i(%rip)
	jmp	.L6
.L21:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$-2004318071, %rax, %rax
	shrq	$32, %rax
	addl	%edx, %eax
	sarl	$3, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$4, %ecx
	subl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L7
	movabsq	$8825495348169042246, %rax
	movq	%rax, A(%rip)
	movb	$0, 8+A(%rip)
	jmp	.L8
.L7:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L9
	movl	$2054845762, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L9:
	movl	i(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L10
	movl	$2054842694, A(%rip)
	movb	$0, 4+A(%rip)
	jmp	.L8
.L10:
	movl	$0, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, num(%rip)
	jmp	.L11
.L12:
	movl	num(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%edx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %ecx
	movl	%ecx, %eax
	sall	$2, %eax
	addl	%ecx, %eax
	addl	%eax, %eax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	leal	48(%rax), %edx
	movl	j(%rip), %eax
	movl	%edx, %ecx
	cltq
	leaq	A(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	movl	num(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, num(%rip)
.L11:
	movl	num(%rip), %eax
	testl	%eax, %eax
	jg	.L12
	movl	$0, k(%rip)
	jmp	.L13
.L14:
	movl	k(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, tmp(%rip)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movl	k(%rip), %ecx
	cltq
	leaq	A(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movslq	%ecx, %rax
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	k(%rip), %edx
	subl	%edx, %eax
	movzbl	tmp(%rip), %edx
	cltq
	leaq	A(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L13:
	movl	j(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L14
	movl	j(%rip), %eax
	cltq
	leaq	A(%rip), %rdx
	movb	$0, (%rax,%rdx)
.L8:
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	cnt(%rip), %eax
	cmpl	$1, %eax
	je	.L30
	leaq	B(%rip), %rax
	movq	%rax, %rsi
	leaq	A(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	cnt(%rip), %eax
	subl	$1, %eax
	movl	%eax, cnt(%rip)
.L20:
	movl	id(%rip), %eax
	addl	$1, %eax
	movl	%eax, id(%rip)
	movl	n(%rip), %eax
	leal	1(%rax), %edx
	movl	id(%rip), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	$1, id(%rip)
.L18:
	movl	id(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L31
	jmp	.L20
.L30:
	nop
	jmp	.L16
.L31:
	nop
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L6:
	movl	i(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jle	.L21
	movl	$0, j(%rip)
	movl	$1, i(%rip)
	jmp	.L22
.L25:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	flg(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L24
	movl	$32, %edi
	call	putchar@PLT
.L24:
	movl	$1, j(%rip)
	movl	i(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L22:
	movl	i(%rip), %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jle	.L25
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L26
.L29:
	nop
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
