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

```c
/*
  AOJ 2190
  Title:
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char stairs[50001][3];
char music[50001][3];
int m,n;
char oct[]="C C#D D# E F F#G G#A A#B ";

int t2n(char tt[3])
{
        int num;
	char t[3];
	memcpy(t,tt,3);
 
        if(t[1]=='\0')
        {       t[1]=' ';
                t[2]='\0';
        }
        num=(strstr(oct,t)-oct)/2;
        return(num);
} 
int diff(char t1[],char t2[])
{
  int ret=t2n(t2)-t2n(t1);
  //printf("diff %c%c %c%c\n",t1[0],t1[1],t2[0],t2[1]);
  if(ret<0)
    ret+=12;
  return(ret);
}
solve(int st,int mu,int lv)
{
  int i;
#ifdef DEBUG
  for(i=0;i<lv;i++)printf(">");
  printf("st,mu=%d %d \n",st,mu);
#endif
  if(st>=m-1 && mu==n)
    return(1);
  if(mu==n)
    return(0);
  if(diff(&stairs[st+1][0],&music[mu+1][0])==0)
    if(solve(st+1,mu+1,lv+1))
      return(1);
  if(st < n-1 && diff(&stairs[st+2][0],&music[mu+1][0])==1)
    if(solve(st+2,mu+1,lv+1))
      return(1);
  if(st > 1 && diff(&stairs[st-1][0],&music[mu+1][0])==11)
    return(solve(st-1,mu+1,lv+1));
  return(0);
}
void dump()
{
  int i;
  for(i=1;i<=m;i++)
    printf("%2s|",&stairs[i][0]);
  printf("\n");
  for(i=1;i<=n;i++)
    printf("%2s|",&music[i][0]);
  printf("\n");
  printf("----------------\n");
}
int check_last()
{
  int diff1,diff2;

  diff1=diff(&stairs[m][0],&music[n][0]);
  diff2=diff(&stairs[m-1][0],&music[n][0]);
  return ((diff1==0||diff1==1||diff1==11) || (diff2==0||diff2==1||diff2==11));
}
main()
{
  int d,i,j,ret;
  scanf("%d",&d);
  for(i=0;i<d;i++)
    {
      scanf("%d %d",&m,&n);
      for(j=1;j<=m;j++)
	scanf("%s ",&stairs[j][0]);
      for(j=1;j<=n;j++)
	scanf("%s ",&music[j][0]);
#ifdef DEBUG
      dump();
#endif
      ret=(  check_last() && solve(0,0,0));
      printf("%s\n",ret?"Yes":"No");
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	stairs
	.bss
	.align 32
	.type	stairs, @object
	.size	stairs, 150003
stairs:
	.zero	150003
	.globl	music
	.align 32
	.type	music, @object
	.size	music, 150003
music:
	.zero	150003
	.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
	.globl	oct
	.data
	.align 16
	.type	oct, @object
	.size	oct, 26
oct:
	.string	"C C#D D# E F F#G G#A A#B "
	.text
	.globl	t2n
	.type	t2n, @function
t2n:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movzwl	(%rax), %edx
	movw	%dx, -11(%rbp)
	movzbl	2(%rax), %eax
	movb	%al, -9(%rbp)
	movzbl	-10(%rbp), %eax
	testb	%al, %al
	jne	.L2
	movb	$32, -10(%rbp)
	movb	$0, -9(%rbp)
.L2:
	leaq	-11(%rbp), %rax
	movq	%rax, %rsi
	leaq	oct(%rip), %rax
	movq	%rax, %rdi
	call	strstr@PLT
	leaq	oct(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	t2n, .-t2n
	.globl	diff
	.type	diff, @function
diff:
.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %ebx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	addl	$12, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	diff, .-diff
	.globl	solve
	.type	solve, @function
solve:
.LFB2:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L9
	movl	$1, %eax
	jmp	.L10
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L11
	movl	$0, %eax
	jmp	.L10
.L11:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L12
	movl	$1, %eax
	jmp	.L10
.L12:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L13
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$1, %eax
	jne	.L13
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L13
	movl	$1, %eax
	jmp	.L10
.L13:
	cmpl	$1, -4(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$11, %eax
	jne	.L14
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	jmp	.L10
.L14:
	movl	$0, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%2s|"
.LC1:
	.string	"----------------"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB3:
	.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
	movl	$1, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L16:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L17
	movl	$10, %edi
	call	putchar@PLT
	movl	$1, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L19
	movl	$10, %edi
	call	putchar@PLT
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	dump, .-dump
	.globl	check_last
	.type	check_last, @function
check_last:
.LFB4:
	.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
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -8(%rbp)
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -4(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L21
	cmpl	$1, -8(%rbp)
	je	.L21
	cmpl	$11, -8(%rbp)
	je	.L21
	cmpl	$0, -4(%rbp)
	je	.L21
	cmpl	$1, -4(%rbp)
	je	.L21
	cmpl	$11, -4(%rbp)
	jne	.L22
.L21:
	movl	$1, %eax
	jmp	.L24
.L22:
	movl	$0, %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	check_last, .-check_last
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"%d %d"
.LC4:
	.string	"%s "
.LC5:
	.string	"Yes"
.LC6:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L26
.L35:
	leaq	n(%rip), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L27:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L28
	movl	$1, -16(%rbp)
	jmp	.L29
.L30:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L29:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L30
	movl	$0, %eax
	call	check_last
	testl	%eax, %eax
	je	.L31
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	solve
	testl	%eax, %eax
	je	.L31
	movl	$1, %eax
	jmp	.L32
.L31:
	movl	$0, %eax
.L32:
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L33
	leaq	.LC5(%rip), %rax
	jmp	.L34
.L33:
	leaq	.LC6(%rip), %rax
.L34:
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	t2n
	.type	t2n, @function
t2n:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movzbl	2(%rdi), %edx
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movzwl	(%rdi), %eax
	movb	%dl, 7(%rsp)
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L2
	movl	$32, %eax
	movw	%ax, 6(%rsp)
.L2:
	leaq	oct(%rip), %rbx
	leaq	5(%rsp), %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L6
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	t2n, .-t2n
	.p2align 4
	.globl	diff
	.type	diff, @function
diff:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movzbl	2(%rsi), %edx
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movzwl	(%rsi), %eax
	movb	%dl, 7(%rsp)
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L8
	movl	$32, %edx
	movw	%dx, 6(%rsp)
.L8:
	leaq	oct(%rip), %rbp
	leaq	5(%rsp), %r13
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strstr@PLT
	movzbl	2(%r12), %edx
	subq	%rbp, %rax
	movq	%rax, %rbx
	movb	%dl, 7(%rsp)
	shrq	$63, %rbx
	addq	%rbx, %rax
	sarq	%rax
	movq	%rax, %rbx
	movzwl	(%r12), %eax
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L9
	movl	$32, %eax
	movw	%ax, 6(%rsp)
.L9:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strstr@PLT
	subq	%rbp, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%ebx, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	diff, .-diff
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	oct(%rip), %r15
	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
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%esi, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, 12(%rsp)
	movl	n(%rip), %eax
	movl	%eax, 4(%rsp)
	leal	1(%rdx), %eax
	movl	%eax, 8(%rsp)
	movslq	%edi, %rax
	leaq	(%rax,%rax,2), %r12
	leaq	stairs(%rip), %rax
	addq	%rax, %r12
	movslq	%esi, %rax
	leaq	3(%rax,%rax,2), %r8
	leaq	music(%rip), %rax
	leaq	(%r8,%rax), %r14
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	%ecx, (%rsp)
	je	.L16
.L17:
	leal	1(%rbp), %eax
	movzbl	2(%r14), %edx
	addl	$1, (%rsp)
	movl	%eax, 16(%rsp)
	movzwl	(%r14), %eax
	movb	%dl, 39(%rsp)
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L19
	movl	$32, %r8d
	movw	%r8w, 38(%rsp)
.L19:
	leaq	37(%rsp), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strstr@PLT
	movzbl	5(%r12), %edx
	subq	%r15, %rax
	movq	%rax, %rbx
	movb	%dl, 39(%rsp)
	shrq	$63, %rbx
	addq	%rax, %rbx
	movzwl	3(%r12), %eax
	sarq	%rbx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L20
	movl	$32, %edi
	movw	%di, 38(%rsp)
.L20:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %ebx
	leal	12(%rbx), %eax
	cmovs	%eax, %ebx
	testl	%ebx, %ebx
	je	.L38
.L22:
	movl	4(%rsp), %eax
	subl	$1, %eax
	cmpl	%ebp, %eax
	jle	.L29
	leal	2(%rbp), %ebx
	movzbl	2(%r14), %esi
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rdx
	leaq	stairs(%rip), %rax
	movb	%sil, 39(%rsp)
	addq	%rax, %rdx
	movzwl	(%r14), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L26
	movl	$32, %esi
	movw	%si, 38(%rsp)
.L26:
	movq	%r13, %rsi
	movq	%r15, %rdi
	movq	%rdx, 24(%rsp)
	call	strstr@PLT
	movq	24(%rsp), %rdx
	subq	%r15, %rax
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	sarq	%rax
	movq	%rax, 16(%rsp)
	movzwl	(%rdx), %eax
	movzbl	2(%rdx), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L27
	movl	$32, %ecx
	movw	%cx, 38(%rsp)
.L27:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	16(%rsp), %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	cmpl	$1, %eax
	je	.L39
.L29:
	cmpl	$1, %ebp
	jle	.L25
	movzwl	(%r14), %eax
	movzbl	2(%r14), %edx
	subl	$1, %ebp
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L30
	movl	$32, %edx
	movw	%dx, 38(%rsp)
.L30:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	movzbl	-1(%r12), %edx
	subq	%r15, %rax
	movq	%rax, %rbx
	movb	%dl, 39(%rsp)
	shrq	$63, %rbx
	addq	%rax, %rbx
	movzwl	-3(%r12), %eax
	sarq	%rbx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L31
	movl	$32, %eax
	movw	%ax, 38(%rsp)
.L31:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %ebx
	leal	12(%rbx), %eax
	cmovs	%eax, %ebx
	addl	$1, 8(%rsp)
	subq	$3, %r12
	addq	$3, %r14
	cmpl	$11, %ebx
	jne	.L25
.L33:
	movl	4(%rsp), %ecx
	cmpl	12(%rsp), %ebp
	jge	.L40
	cmpl	%ecx, (%rsp)
	jne	.L17
.L25:
	xorl	%eax, %eax
.L14:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L41
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L38:
	.cfi_restore_state
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	movl	16(%rsp), %edi
	call	solve
	testl	%eax, %eax
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$1, %eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	movl	%ebx, %edi
	call	solve
	testl	%eax, %eax
	je	.L29
	jmp	.L16
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%2s|"
.LC1:
	.string	"----------------"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB38:
	.cfi_startproc
	endbr64
	movl	m(%rip), %edx
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	testl	%edx, %edx
	jle	.L43
	leaq	3+stairs(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, %ebx
	addq	$3, %rbp
	cmpl	%ebx, m(%rip)
	jge	.L44
.L43:
	movl	$10, %edi
	call	putchar@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leaq	3+music(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, %ebx
	addq	$3, %rbp
	cmpl	%ebx, n(%rip)
	jge	.L46
.L45:
	movl	$10, %edi
	call	putchar@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	puts@PLT
	.cfi_endproc
.LFE38:
	.size	dump, .-dump
	.p2align 4
	.globl	check_last
	.type	check_last, @function
check_last:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	music(%rip), %rdx
	leaq	stairs(%rip), %rcx
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movslq	n(%rip), %rax
	leaq	(%rax,%rax,2), %rax
	addq	%rdx, %rax
	movslq	m(%rip), %rdx
	movzwl	(%rax), %r15d
	movzbl	2(%rax), %ebp
	leaq	(%rdx,%rdx,2), %r13
	movl	%r15d, %eax
	movw	%r15w, 21(%rsp)
	leaq	(%rcx,%r13), %rdx
	shrw	$8, %ax
	movb	%bpl, 23(%rsp)
	jne	.L51
	movl	$32, %esi
	movw	%si, 22(%rsp)
.L51:
	leaq	oct(%rip), %rbx
	leaq	21(%rsp), %r14
	movq	%rdx, 8(%rsp)
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movq	8(%rsp), %rdx
	subq	%rbx, %rax
	movq	%rax, %r12
	shrq	$63, %r12
	addq	%rax, %r12
	movzwl	(%rdx), %eax
	movzbl	2(%rdx), %edx
	sarq	%r12
	movw	%ax, 21(%rsp)
	shrw	$8, %ax
	movb	%dl, 23(%rsp)
	jne	.L52
	movl	$32, %ecx
	movw	%cx, 22(%rsp)
.L52:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movw	%r15w, 21(%rsp)
	subq	%rbx, %rax
	movb	%bpl, 23(%rsp)
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %r12d
	leal	12(%r12), %eax
	cmovs	%eax, %r12d
	leaq	stairs(%rip), %rax
	shrw	$8, %r15w
	leaq	-3(%rax,%r13), %r13
	jne	.L54
	movl	$32, %edx
	movw	%dx, 22(%rsp)
.L54:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movzwl	0(%r13), %eax
	sarq	%rdx
	movq	%rdx, %rbp
	movzbl	2(%r13), %edx
	movw	%ax, 21(%rsp)
	shrw	$8, %ax
	movb	%dl, 23(%rsp)
	jne	.L55
	movl	$32, %eax
	movw	%ax, 22(%rsp)
.L55:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	movl	%ebp, %edx
	sarq	%rax
	subl	%eax, %edx
	leal	12(%rdx), %eax
	cmovs	%eax, %edx
	cmpl	$1, %r12d
	jbe	.L59
	cmpl	$11, %r12d
	je	.L59
	cmpl	$1, %edx
	setbe	%al
	cmpl	$11, %edx
	sete	%dl
	orl	%edx, %eax
	movzbl	%al, %eax
.L50:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L61
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L59:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L50
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	check_last, .-check_last
	.section	.rodata.str1.1
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
.LC4:
	.string	"%d"
.LC5:
	.string	"%d %d"
.LC6:
	.string	"%s "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L88
	movl	$0, 16(%rsp)
	leaq	37(%rsp), %r13
	leaq	oct(%rip), %rbx
	leaq	.LC6(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	n(%rip), %rdx
	leaq	m(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	jle	.L64
	leaq	3+stairs(%rip), %r14
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	addq	$3, %r14
	cmpl	%r12d, %edx
	jge	.L65
.L64:
	movl	n(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L66
	leaq	3+music(%rip), %r14
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r15d
	addq	$3, %r14
	cmpl	%r12d, %r15d
	jge	.L67
	movl	m(%rip), %edx
.L66:
	movslq	%r15d, %rax
	leaq	music(%rip), %rcx
	movslq	%edx, %rsi
	leaq	(%rax,%rax,2), %rax
	leaq	stairs(%rip), %r9
	addq	%rcx, %rax
	leaq	(%rsi,%rsi,2), %rcx
	movzwl	(%rax), %r14d
	movzbl	2(%rax), %eax
	addq	%rcx, %r9
	movq	%rcx, (%rsp)
	movb	%al, 8(%rsp)
	movb	%al, 39(%rsp)
	movl	%r14d, %eax
	shrw	$8, %ax
	movw	%r14w, 37(%rsp)
	jne	.L68
	movl	$32, %r10d
	movw	%r10w, 38(%rsp)
.L68:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	%r9, 24(%rsp)
	movl	%edx, 20(%rsp)
	call	strstr@PLT
	movq	24(%rsp), %r9
	movl	20(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movzbl	2(%r9), %esi
	shrq	$63, %r12
	addq	%rax, %r12
	movzwl	(%r9), %eax
	movb	%sil, 39(%rsp)
	sarq	%r12
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L69
	movl	$32, %r9d
	movw	%r9w, 38(%rsp)
.L69:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movl	%edx, 20(%rsp)
	call	strstr@PLT
	movq	(%rsp), %rcx
	movw	%r14w, 37(%rsp)
	subq	%rbx, %rax
	movl	20(%rsp), %edx
	movq	%rax, %rsi
	shrq	$63, %rax
	addq	%rsi, %rax
	sarq	%rax
	subl	%eax, %r12d
	leal	12(%r12), %eax
	cmovs	%eax, %r12d
	leaq	stairs(%rip), %rax
	shrw	$8, %r14w
	leaq	-3(%rax,%rcx), %rcx
	movzbl	8(%rsp), %eax
	movb	%al, 39(%rsp)
	jne	.L71
	movl	$32, %r8d
	movw	%r8w, 38(%rsp)
.L71:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	%rcx, 8(%rsp)
	movl	%edx, (%rsp)
	call	strstr@PLT
	movq	8(%rsp), %rcx
	movl	(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %r14
	movzbl	2(%rcx), %esi
	shrq	$63, %r14
	addq	%rax, %r14
	movzwl	(%rcx), %eax
	movb	%sil, 39(%rsp)
	sarq	%r14
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L72
	movl	$32, %edi
	movw	%di, 38(%rsp)
.L72:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movl	%edx, (%rsp)
	call	strstr@PLT
	movl	(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %rsi
	shrq	$63, %rax
	addq	%rsi, %rax
	sarq	%rax
	subl	%eax, %r14d
	leal	12(%r14), %eax
	cmovs	%eax, %r14d
	cmpl	$1, %r12d
	jbe	.L74
	cmpl	$11, %r12d
	je	.L74
	cmpl	$1, %r14d
	jbe	.L74
	cmpl	$11, %r14d
	je	.L74
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	.LC2(%rip), %rdi
.L79:
	call	puts@PLT
	addl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jg	.L63
.L88:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L102
	addq	$56, %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
.L74:
	.cfi_restore_state
	cmpl	$1, %edx
	jg	.L77
	testl	%r15d, %r15d
	je	.L84
.L78:
	movzwl	3+music(%rip), %eax
	movzbl	5+music(%rip), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L80
	movl	$32, %esi
	movw	%si, 38(%rsp)
.L80:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movzbl	5+stairs(%rip), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movb	%dl, 39(%rsp)
	shrq	$63, %r12
	addq	%r12, %rax
	sarq	%rax
	movq	%rax, %r12
	movzwl	3+stairs(%rip), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L81
	movl	$32, %ecx
	movw	%cx, 38(%rsp)
.L81:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%r12d, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	testl	%eax, %eax
	je	.L103
.L83:
	cmpl	$1, %r15d
	jle	.L75
	movzwl	3+music(%rip), %eax
	movzbl	5+music(%rip), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L85
	movl	$32, %edx
	movw	%dx, 38(%rsp)
.L85:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movzbl	8+stairs(%rip), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movb	%dl, 39(%rsp)
	shrq	$63, %r12
	addq	%r12, %rax
	sarq	%rax
	movq	%rax, %r12
	movzwl	6+stairs(%rip), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L86
	movl	$32, %eax
	movw	%ax, 38(%rsp)
.L86:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%r12d, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	cmpl	$1, %eax
	jne	.L75
	movl	$1, %edx
	movl	$1, %esi
	movl	$2, %edi
	call	solve
	testl	%eax, %eax
	je	.L75
.L84:
	leaq	.LC3(%rip), %rdi
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L77:
	testl	%r15d, %r15d
	jne	.L78
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L103:
	movl	$1, %edx
	movl	$1, %esi
	movl	$1, %edi
	call	solve
	testl	%eax, %eax
	je	.L83
	jmp	.L84
.L102:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	oct
	.data
	.align 16
	.type	oct, @object
	.size	oct, 26
oct:
	.string	"C C#D D# E F F#G G#A A#B "
	.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	music
	.align 32
	.type	music, @object
	.size	music, 150003
music:
	.zero	150003
	.globl	stairs
	.align 32
	.type	stairs, @object
	.size	stairs, 150003
stairs:
	.zero	150003
	.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	t2n
	.type	t2n, @function
t2n:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movzbl	2(%rdi), %edx
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movzwl	(%rdi), %eax
	movb	%dl, 7(%rsp)
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L2
	movl	$32, %eax
	movw	%ax, 6(%rsp)
.L2:
	leaq	oct(%rip), %rbx
	leaq	5(%rsp), %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L6
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	t2n, .-t2n
	.p2align 4
	.globl	diff
	.type	diff, @function
diff:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movzbl	2(%rsi), %edx
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movzwl	(%rsi), %eax
	movb	%dl, 7(%rsp)
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L8
	movl	$32, %edx
	movw	%dx, 6(%rsp)
.L8:
	leaq	oct(%rip), %rbp
	leaq	5(%rsp), %r13
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strstr@PLT
	movzbl	2(%r12), %edx
	subq	%rbp, %rax
	movq	%rax, %rbx
	movb	%dl, 7(%rsp)
	shrq	$63, %rbx
	addq	%rbx, %rax
	sarq	%rax
	movq	%rax, %rbx
	movzwl	(%r12), %eax
	movw	%ax, 5(%rsp)
	shrw	$8, %ax
	jne	.L9
	movl	$32, %eax
	movw	%ax, 6(%rsp)
.L9:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strstr@PLT
	subq	%rbp, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%ebx, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L13
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	diff, .-diff
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	oct(%rip), %r15
	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
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%esi, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	movl	m(%rip), %eax
	subl	$1, %eax
	movl	%eax, 12(%rsp)
	movl	n(%rip), %eax
	movl	%eax, 4(%rsp)
	leal	1(%rdx), %eax
	movl	%eax, 8(%rsp)
	movslq	%edi, %rax
	leaq	(%rax,%rax,2), %r12
	leaq	stairs(%rip), %rax
	addq	%rax, %r12
	movslq	%esi, %rax
	leaq	3(%rax,%rax,2), %r8
	leaq	music(%rip), %rax
	leaq	(%r8,%rax), %r14
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	%ecx, (%rsp)
	je	.L16
.L17:
	leal	1(%rbp), %eax
	movzbl	2(%r14), %edx
	addl	$1, (%rsp)
	movl	%eax, 16(%rsp)
	movzwl	(%r14), %eax
	movb	%dl, 39(%rsp)
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L19
	movl	$32, %r8d
	movw	%r8w, 38(%rsp)
.L19:
	leaq	37(%rsp), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	call	strstr@PLT
	movzbl	5(%r12), %edx
	subq	%r15, %rax
	movq	%rax, %rbx
	movb	%dl, 39(%rsp)
	shrq	$63, %rbx
	addq	%rax, %rbx
	movzwl	3(%r12), %eax
	sarq	%rbx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L20
	movl	$32, %edi
	movw	%di, 38(%rsp)
.L20:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %ebx
	leal	12(%rbx), %eax
	cmovs	%eax, %ebx
	testl	%ebx, %ebx
	je	.L38
.L22:
	movl	4(%rsp), %eax
	subl	$1, %eax
	cmpl	%ebp, %eax
	jle	.L29
	leal	2(%rbp), %ebx
	movzbl	2(%r14), %esi
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rdx
	leaq	stairs(%rip), %rax
	movb	%sil, 39(%rsp)
	addq	%rax, %rdx
	movzwl	(%r14), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L26
	movl	$32, %esi
	movw	%si, 38(%rsp)
.L26:
	movq	%r13, %rsi
	movq	%r15, %rdi
	movq	%rdx, 24(%rsp)
	call	strstr@PLT
	movq	24(%rsp), %rdx
	subq	%r15, %rax
	movq	%rax, %rsi
	shrq	$63, %rsi
	addq	%rsi, %rax
	sarq	%rax
	movq	%rax, 16(%rsp)
	movzwl	(%rdx), %eax
	movzbl	2(%rdx), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L27
	movl	$32, %ecx
	movw	%cx, 38(%rsp)
.L27:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	16(%rsp), %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	cmpl	$1, %eax
	je	.L39
.L29:
	cmpl	$1, %ebp
	jle	.L25
	movzwl	(%r14), %eax
	movzbl	2(%r14), %edx
	subl	$1, %ebp
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L30
	movl	$32, %edx
	movw	%dx, 38(%rsp)
.L30:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	movzbl	-1(%r12), %edx
	subq	%r15, %rax
	movq	%rax, %rbx
	movb	%dl, 39(%rsp)
	shrq	$63, %rbx
	addq	%rax, %rbx
	movzwl	-3(%r12), %eax
	sarq	%rbx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L31
	movl	$32, %eax
	movw	%ax, 38(%rsp)
.L31:
	movq	%r13, %rsi
	movq	%r15, %rdi
	call	strstr@PLT
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %ebx
	leal	12(%rbx), %eax
	cmovs	%eax, %ebx
	addl	$1, 8(%rsp)
	subq	$3, %r12
	addq	$3, %r14
	cmpl	$11, %ebx
	jne	.L25
.L33:
	movl	4(%rsp), %ecx
	cmpl	12(%rsp), %ebp
	jge	.L40
	cmpl	%ecx, (%rsp)
	jne	.L17
.L25:
	xorl	%eax, %eax
.L14:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L41
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L38:
	.cfi_restore_state
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	movl	16(%rsp), %edi
	call	solve
	testl	%eax, %eax
	je	.L22
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$1, %eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L39:
	movl	8(%rsp), %edx
	movl	(%rsp), %esi
	movl	%ebx, %edi
	call	solve
	testl	%eax, %eax
	je	.L29
	jmp	.L16
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	solve, .-solve
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%2s|"
.LC1:
	.string	"----------------"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB38:
	.cfi_startproc
	endbr64
	movl	m(%rip), %edx
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	testl	%edx, %edx
	jle	.L43
	leaq	3+stairs(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L44:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, %ebx
	addq	$3, %rbp
	cmpl	%ebx, m(%rip)
	jge	.L44
.L43:
	movl	$10, %edi
	call	putchar@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L45
	leaq	3+music(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC0(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L46:
	movq	%rbp, %rdx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addl	$1, %ebx
	addq	$3, %rbp
	cmpl	%ebx, n(%rip)
	jge	.L46
.L45:
	movl	$10, %edi
	call	putchar@PLT
	popq	%rbx
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	puts@PLT
	.cfi_endproc
.LFE38:
	.size	dump, .-dump
	.p2align 4
	.globl	check_last
	.type	check_last, @function
check_last:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	music(%rip), %rdx
	leaq	stairs(%rip), %rcx
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movslq	n(%rip), %rax
	leaq	(%rax,%rax,2), %rax
	addq	%rdx, %rax
	movslq	m(%rip), %rdx
	movzwl	(%rax), %r15d
	movzbl	2(%rax), %ebp
	leaq	(%rdx,%rdx,2), %r13
	movl	%r15d, %eax
	movw	%r15w, 21(%rsp)
	leaq	(%rcx,%r13), %rdx
	shrw	$8, %ax
	movb	%bpl, 23(%rsp)
	jne	.L51
	movl	$32, %esi
	movw	%si, 22(%rsp)
.L51:
	leaq	oct(%rip), %rbx
	leaq	21(%rsp), %r14
	movq	%rdx, 8(%rsp)
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movq	8(%rsp), %rdx
	subq	%rbx, %rax
	movq	%rax, %r12
	shrq	$63, %r12
	addq	%rax, %r12
	movzwl	(%rdx), %eax
	movzbl	2(%rdx), %edx
	sarq	%r12
	movw	%ax, 21(%rsp)
	shrw	$8, %ax
	movb	%dl, 23(%rsp)
	jne	.L52
	movl	$32, %ecx
	movw	%cx, 22(%rsp)
.L52:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movw	%r15w, 21(%rsp)
	subq	%rbx, %rax
	movb	%bpl, 23(%rsp)
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	sarq	%rax
	subl	%eax, %r12d
	leal	12(%r12), %eax
	cmovs	%eax, %r12d
	leaq	stairs(%rip), %rax
	shrw	$8, %r15w
	leaq	-3(%rax,%r13), %r13
	jne	.L54
	movl	$32, %edx
	movw	%dx, 22(%rsp)
.L54:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movzwl	0(%r13), %eax
	sarq	%rdx
	movq	%rdx, %rbp
	movzbl	2(%r13), %edx
	movw	%ax, 21(%rsp)
	shrw	$8, %ax
	movb	%dl, 23(%rsp)
	jne	.L55
	movl	$32, %eax
	movw	%ax, 22(%rsp)
.L55:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rax
	addq	%rdx, %rax
	movl	%ebp, %edx
	sarq	%rax
	subl	%eax, %edx
	leal	12(%rdx), %eax
	cmovs	%eax, %edx
	cmpl	$1, %r12d
	jbe	.L59
	cmpl	$11, %r12d
	je	.L59
	cmpl	$1, %edx
	setbe	%al
	cmpl	$11, %edx
	sete	%dl
	orl	%edx, %eax
	movzbl	%al, %eax
.L50:
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L61
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L59:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L50
.L61:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	check_last, .-check_last
	.section	.rodata.str1.1
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
.LC4:
	.string	"%d"
.LC5:
	.string	"%d %d"
.LC6:
	.string	"%s "
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC4(%rip), %rdi
	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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	jle	.L88
	movl	$0, 16(%rsp)
	leaq	37(%rsp), %r13
	leaq	oct(%rip), %rbx
	leaq	.LC6(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	n(%rip), %rdx
	leaq	m(%rip), %rsi
	xorl	%eax, %eax
	leaq	.LC5(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	jle	.L64
	leaq	3+stairs(%rip), %r14
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	addq	$3, %r14
	cmpl	%r12d, %edx
	jge	.L65
.L64:
	movl	n(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L66
	leaq	3+music(%rip), %r14
	movl	$1, %r12d
	.p2align 4,,10
	.p2align 3
.L67:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r15d
	addq	$3, %r14
	cmpl	%r12d, %r15d
	jge	.L67
	movl	m(%rip), %edx
.L66:
	movslq	%r15d, %rax
	leaq	music(%rip), %rcx
	movslq	%edx, %rsi
	leaq	(%rax,%rax,2), %rax
	leaq	stairs(%rip), %r9
	addq	%rcx, %rax
	leaq	(%rsi,%rsi,2), %rcx
	movzwl	(%rax), %r14d
	movzbl	2(%rax), %eax
	addq	%rcx, %r9
	movq	%rcx, (%rsp)
	movb	%al, 8(%rsp)
	movb	%al, 39(%rsp)
	movl	%r14d, %eax
	shrw	$8, %ax
	movw	%r14w, 37(%rsp)
	jne	.L68
	movl	$32, %r10d
	movw	%r10w, 38(%rsp)
.L68:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	%r9, 24(%rsp)
	movl	%edx, 20(%rsp)
	call	strstr@PLT
	movq	24(%rsp), %r9
	movl	20(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movzbl	2(%r9), %esi
	shrq	$63, %r12
	addq	%rax, %r12
	movzwl	(%r9), %eax
	movb	%sil, 39(%rsp)
	sarq	%r12
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L69
	movl	$32, %r9d
	movw	%r9w, 38(%rsp)
.L69:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movl	%edx, 20(%rsp)
	call	strstr@PLT
	movq	(%rsp), %rcx
	movw	%r14w, 37(%rsp)
	subq	%rbx, %rax
	movl	20(%rsp), %edx
	movq	%rax, %rsi
	shrq	$63, %rax
	addq	%rsi, %rax
	sarq	%rax
	subl	%eax, %r12d
	leal	12(%r12), %eax
	cmovs	%eax, %r12d
	leaq	stairs(%rip), %rax
	shrw	$8, %r14w
	leaq	-3(%rax,%rcx), %rcx
	movzbl	8(%rsp), %eax
	movb	%al, 39(%rsp)
	jne	.L71
	movl	$32, %r8d
	movw	%r8w, 38(%rsp)
.L71:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	%rcx, 8(%rsp)
	movl	%edx, (%rsp)
	call	strstr@PLT
	movq	8(%rsp), %rcx
	movl	(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %r14
	movzbl	2(%rcx), %esi
	shrq	$63, %r14
	addq	%rax, %r14
	movzwl	(%rcx), %eax
	movb	%sil, 39(%rsp)
	sarq	%r14
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L72
	movl	$32, %edi
	movw	%di, 38(%rsp)
.L72:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movl	%edx, (%rsp)
	call	strstr@PLT
	movl	(%rsp), %edx
	subq	%rbx, %rax
	movq	%rax, %rsi
	shrq	$63, %rax
	addq	%rsi, %rax
	sarq	%rax
	subl	%eax, %r14d
	leal	12(%r14), %eax
	cmovs	%eax, %r14d
	cmpl	$1, %r12d
	jbe	.L74
	cmpl	$11, %r12d
	je	.L74
	cmpl	$1, %r14d
	jbe	.L74
	cmpl	$11, %r14d
	je	.L74
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	.LC2(%rip), %rdi
.L79:
	call	puts@PLT
	addl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	jg	.L63
.L88:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L102
	addq	$56, %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
.L74:
	.cfi_restore_state
	cmpl	$1, %edx
	jg	.L77
	testl	%r15d, %r15d
	je	.L84
.L78:
	movzwl	3+music(%rip), %eax
	movzbl	5+music(%rip), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L80
	movl	$32, %esi
	movw	%si, 38(%rsp)
.L80:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movzbl	5+stairs(%rip), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movb	%dl, 39(%rsp)
	shrq	$63, %r12
	addq	%r12, %rax
	sarq	%rax
	movq	%rax, %r12
	movzwl	3+stairs(%rip), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L81
	movl	$32, %ecx
	movw	%cx, 38(%rsp)
.L81:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%r12d, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	testl	%eax, %eax
	je	.L103
.L83:
	cmpl	$1, %r15d
	jle	.L75
	movzwl	3+music(%rip), %eax
	movzbl	5+music(%rip), %edx
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	movb	%dl, 39(%rsp)
	jne	.L85
	movl	$32, %edx
	movw	%dx, 38(%rsp)
.L85:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	movzbl	8+stairs(%rip), %edx
	subq	%rbx, %rax
	movq	%rax, %r12
	movb	%dl, 39(%rsp)
	shrq	$63, %r12
	addq	%r12, %rax
	sarq	%rax
	movq	%rax, %r12
	movzwl	6+stairs(%rip), %eax
	movw	%ax, 37(%rsp)
	shrw	$8, %ax
	jne	.L86
	movl	$32, %eax
	movw	%ax, 38(%rsp)
.L86:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	strstr@PLT
	subq	%rbx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	movl	%r12d, %eax
	sarq	%rdx
	subl	%edx, %eax
	leal	12(%rax), %edx
	cmovs	%edx, %eax
	cmpl	$1, %eax
	jne	.L75
	movl	$1, %edx
	movl	$1, %esi
	movl	$2, %edi
	call	solve
	testl	%eax, %eax
	je	.L75
.L84:
	leaq	.LC3(%rip), %rdi
	jmp	.L79
	.p2align 4,,10
	.p2align 3
.L77:
	testl	%r15d, %r15d
	jne	.L78
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L103:
	movl	$1, %edx
	movl	$1, %esi
	movl	$1, %edi
	call	solve
	testl	%eax, %eax
	je	.L83
	jmp	.L84
.L102:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	oct
	.data
	.align 16
	.type	oct, @object
	.size	oct, 26
oct:
	.string	"C C#D D# E F F#G G#A A#B "
	.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	music
	.align 32
	.type	music, @object
	.size	music, 150003
music:
	.zero	150003
	.globl	stairs
	.align 32
	.type	stairs, @object
	.size	stairs, 150003
stairs:
	.zero	150003
	.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:

/*
  AOJ 2190
  Title:
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char stairs[50001][3];
char music[50001][3];
int m,n;
char oct[]="C C#D D# E F F#G G#A A#B ";

int t2n(char tt[3])
{
        int num;
	char t[3];
	memcpy(t,tt,3);
 
        if(t[1]=='\0')
        {       t[1]=' ';
                t[2]='\0';
        }
        num=(strstr(oct,t)-oct)/2;
        return(num);
} 
int diff(char t1[],char t2[])
{
  int ret=t2n(t2)-t2n(t1);
  //printf("diff %c%c %c%c\n",t1[0],t1[1],t2[0],t2[1]);
  if(ret<0)
    ret+=12;
  return(ret);
}
solve(int st,int mu,int lv)
{
  int i;
#ifdef DEBUG
  for(i=0;i<lv;i++)printf(">");
  printf("st,mu=%d %d \n",st,mu);
#endif
  if(st>=m-1 && mu==n)
    return(1);
  if(mu==n)
    return(0);
  if(diff(&stairs[st+1][0],&music[mu+1][0])==0)
    if(solve(st+1,mu+1,lv+1))
      return(1);
  if(st < n-1 && diff(&stairs[st+2][0],&music[mu+1][0])==1)
    if(solve(st+2,mu+1,lv+1))
      return(1);
  if(st > 1 && diff(&stairs[st-1][0],&music[mu+1][0])==11)
    return(solve(st-1,mu+1,lv+1));
  return(0);
}
void dump()
{
  int i;
  for(i=1;i<=m;i++)
    printf("%2s|",&stairs[i][0]);
  printf("\n");
  for(i=1;i<=n;i++)
    printf("%2s|",&music[i][0]);
  printf("\n");
  printf("----------------\n");
}
int check_last()
{
  int diff1,diff2;

  diff1=diff(&stairs[m][0],&music[n][0]);
  diff2=diff(&stairs[m-1][0],&music[n][0]);
  return ((diff1==0||diff1==1||diff1==11) || (diff2==0||diff2==1||diff2==11));
}
main()
{
  int d,i,j,ret;
  scanf("%d",&d);
  for(i=0;i<d;i++)
    {
      scanf("%d %d",&m,&n);
      for(j=1;j<=m;j++)
	scanf("%s ",&stairs[j][0]);
      for(j=1;j<=n;j++)
	scanf("%s ",&music[j][0]);
#ifdef DEBUG
      dump();
#endif
      ret=(  check_last() && solve(0,0,0));
      printf("%s\n",ret?"Yes":"No");
    }
  return(0);
}
4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 8
C B B B B B F F
C B B B B B B B
 4
6 4
C E D# G G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 8
C B B B B B F F
C B B B B B B B
 4
6 4
C E D# G G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# D#
8 8
C B B B B B F F
C B B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B E B D# C#
8 8
C B B B B B E F
C A B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 8
C B B B B B F F
C A B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 8
C B B A B B F F
C A B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 8
D B B B B B F F
C B B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
B D# F G
3 6
C D D
D# B D B D# C#
8 8
C B B B B B F F
C A B B B B B B
 4
6 4
C E D# E G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 6
C B B A B B F F
C A B B B B B B
 4
6 4
C E D# F G A
C E F G
6 4
C E D# F G A
C D# F G
3 6
C D D
D# B D B D# C#
8 6
C B B B B B F F
C B B B B B B B

Yes
No
Yes
No
 No
No
Yes
No
 No
No
No
No
 Yes
No
No
No
 Yes
No
Yes
No
 Yes
No
Yes
No
 Yes
No
Yes
No
 Yes
No
Yes
No
 Yes
No
Yes
No
 Yes
No
Yes
No

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

```c
/*
  AOJ 2190
  Title:
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
char stairs[50001][3];
char music[50001][3];
int m,n;
char oct[]="C C#D D# E F F#G G#A A#B ";

int t2n(char tt[3])
{
        int num;
	char t[3];
	memcpy(t,tt,3);
 
        if(t[1]=='\0')
        {       t[1]=' ';
                t[2]='\0';
        }
        num=(strstr(oct,t)-oct)/2;
        return(num);
} 
int diff(char t1[],char t2[])
{
  int ret=t2n(t2)-t2n(t1);
  //printf("diff %c%c %c%c\n",t1[0],t1[1],t2[0],t2[1]);
  if(ret<0)
    ret+=12;
  return(ret);
}
solve(int st,int mu,int lv)
{
  int i;
#ifdef DEBUG
  for(i=0;i<lv;i++)printf(">");
  printf("st,mu=%d %d \n",st,mu);
#endif
  if(st>=m-1 && mu==n)
    return(1);
  if(mu==n)
    return(0);
  if(diff(&stairs[st+1][0],&music[mu+1][0])==0)
    if(solve(st+1,mu+1,lv+1))
      return(1);
  if(st < n-1 && diff(&stairs[st+2][0],&music[mu+1][0])==1)
    if(solve(st+2,mu+1,lv+1))
      return(1);
  if(st > 1 && diff(&stairs[st-1][0],&music[mu+1][0])==11)
    return(solve(st-1,mu+1,lv+1));
  return(0);
}
void dump()
{
  int i;
  for(i=1;i<=m;i++)
    printf("%2s|",&stairs[i][0]);
  printf("\n");
  for(i=1;i<=n;i++)
    printf("%2s|",&music[i][0]);
  printf("\n");
  printf("----------------\n");
}
int check_last()
{
  int diff1,diff2;

  diff1=diff(&stairs[m][0],&music[n][0]);
  diff2=diff(&stairs[m-1][0],&music[n][0]);
  return ((diff1==0||diff1==1||diff1==11) || (diff2==0||diff2==1||diff2==11));
}
main()
{
  int d,i,j,ret;
  scanf("%d",&d);
  for(i=0;i<d;i++)
    {
      scanf("%d %d",&m,&n);
      for(j=1;j<=m;j++)
	scanf("%s ",&stairs[j][0]);
      for(j=1;j<=n;j++)
	scanf("%s ",&music[j][0]);
#ifdef DEBUG
      dump();
#endif
      ret=(  check_last() && solve(0,0,0));
      printf("%s\n",ret?"Yes":"No");
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	stairs
	.bss
	.align 32
	.type	stairs, @object
	.size	stairs, 150003
stairs:
	.zero	150003
	.globl	music
	.align 32
	.type	music, @object
	.size	music, 150003
music:
	.zero	150003
	.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
	.globl	oct
	.data
	.align 16
	.type	oct, @object
	.size	oct, 26
oct:
	.string	"C C#D D# E F F#G G#A A#B "
	.text
	.globl	t2n
	.type	t2n, @function
t2n:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movzwl	(%rax), %edx
	movw	%dx, -11(%rbp)
	movzbl	2(%rax), %eax
	movb	%al, -9(%rbp)
	movzbl	-10(%rbp), %eax
	testb	%al, %al
	jne	.L2
	movb	$32, -10(%rbp)
	movb	$0, -9(%rbp)
.L2:
	leaq	-11(%rbp), %rax
	movq	%rax, %rsi
	leaq	oct(%rip), %rax
	movq	%rax, %rdi
	call	strstr@PLT
	leaq	oct(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	t2n, .-t2n
	.globl	diff
	.type	diff, @function
diff:
.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %ebx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	addl	$12, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	diff, .-diff
	.globl	solve
	.type	solve, @function
solve:
.LFB2:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L9
	movl	$1, %eax
	jmp	.L10
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L11
	movl	$0, %eax
	jmp	.L10
.L11:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L12
	movl	$1, %eax
	jmp	.L10
.L12:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L13
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$1, %eax
	jne	.L13
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L13
	movl	$1, %eax
	jmp	.L10
.L13:
	cmpl	$1, -4(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$11, %eax
	jne	.L14
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	jmp	.L10
.L14:
	movl	$0, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%2s|"
.LC1:
	.string	"----------------"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB3:
	.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
	movl	$1, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L16:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L17
	movl	$10, %edi
	call	putchar@PLT
	movl	$1, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L19
	movl	$10, %edi
	call	putchar@PLT
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	dump, .-dump
	.globl	check_last
	.type	check_last, @function
check_last:
.LFB4:
	.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
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -8(%rbp)
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -4(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L21
	cmpl	$1, -8(%rbp)
	je	.L21
	cmpl	$11, -8(%rbp)
	je	.L21
	cmpl	$0, -4(%rbp)
	je	.L21
	cmpl	$1, -4(%rbp)
	je	.L21
	cmpl	$11, -4(%rbp)
	jne	.L22
.L21:
	movl	$1, %eax
	jmp	.L24
.L22:
	movl	$0, %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	check_last, .-check_last
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"%d %d"
.LC4:
	.string	"%s "
.LC5:
	.string	"Yes"
.LC6:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L26
.L35:
	leaq	n(%rip), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L27:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L28
	movl	$1, -16(%rbp)
	jmp	.L29
.L30:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L29:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L30
	movl	$0, %eax
	call	check_last
	testl	%eax, %eax
	je	.L31
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	solve
	testl	%eax, %eax
	je	.L31
	movl	$1, %eax
	jmp	.L32
.L31:
	movl	$0, %eax
.L32:
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L33
	leaq	.LC5(%rip), %rax
	jmp	.L34
.L33:
	leaq	.LC6(%rip), %rax
.L34:
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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	stairs
	.bss
	.align 32
	.type	stairs, @object
	.size	stairs, 150003
stairs:
	.zero	150003
	.globl	music
	.align 32
	.type	music, @object
	.size	music, 150003
music:
	.zero	150003
	.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
	.globl	oct
	.data
	.align 16
	.type	oct, @object
	.size	oct, 26
oct:
	.string	"C C#D D# E F F#G G#A A#B "
	.text
	.globl	t2n
	.type	t2n, @function
t2n:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	-24(%rbp), %rax
	movzwl	(%rax), %edx
	movw	%dx, -11(%rbp)
	movzbl	2(%rax), %eax
	movb	%al, -9(%rbp)
	movzbl	-10(%rbp), %eax
	testb	%al, %al
	jne	.L2
	movb	$32, -10(%rbp)
	movb	$0, -9(%rbp)
.L2:
	leaq	-11(%rbp), %rax
	movq	%rax, %rsi
	leaq	oct(%rip), %rax
	movq	%rax, %rdi
	call	strstr@PLT
	leaq	oct(%rip), %rdx
	subq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movl	%eax, -16(%rbp)
	movl	-16(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	t2n, .-t2n
	.globl	diff
	.type	diff, @function
diff:
.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	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %ebx
	movq	-40(%rbp), %rax
	movq	%rax, %rdi
	call	t2n
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	cmpl	$0, -20(%rbp)
	jns	.L6
	addl	$12, -20(%rbp)
.L6:
	movl	-20(%rbp), %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	diff, .-diff
	.globl	solve
	.type	solve, @function
solve:
.LFB2:
	.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
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jl	.L9
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L9
	movl	$1, %eax
	jmp	.L10
.L9:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jne	.L11
	movl	$0, %eax
	jmp	.L10
.L11:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	testl	%eax, %eax
	jne	.L12
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L12
	movl	$1, %eax
	jmp	.L10
.L12:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -4(%rbp)
	jge	.L13
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$1, %eax
	jne	.L13
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	addl	$2, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	testl	%eax, %eax
	je	.L13
	movl	$1, %eax
	jmp	.L10
.L13:
	cmpl	$1, -4(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	cmpl	$11, %eax
	jne	.L14
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	subl	$1, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	solve
	jmp	.L10
.L14:
	movl	$0, %eax
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%2s|"
.LC1:
	.string	"----------------"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB3:
	.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
	movl	$1, -4(%rbp)
	jmp	.L16
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L16:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L17
	movl	$10, %edi
	call	putchar@PLT
	movl	$1, -4(%rbp)
	jmp	.L18
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L18:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jle	.L19
	movl	$10, %edi
	call	putchar@PLT
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	dump, .-dump
	.globl	check_last
	.type	check_last, @function
check_last:
.LFB4:
	.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
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -8(%rbp)
	movl	n(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rax, %rdx
	movl	m(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	stairs(%rip), %rcx
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	diff
	movl	%eax, -4(%rbp)
	cmpl	$0, -8(%rbp)
	je	.L21
	cmpl	$1, -8(%rbp)
	je	.L21
	cmpl	$11, -8(%rbp)
	je	.L21
	cmpl	$0, -4(%rbp)
	je	.L21
	cmpl	$1, -4(%rbp)
	je	.L21
	cmpl	$11, -4(%rbp)
	jne	.L22
.L21:
	movl	$1, %eax
	jmp	.L24
.L22:
	movl	$0, %eax
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	check_last, .-check_last
	.section	.rodata
.LC2:
	.string	"%d"
.LC3:
	.string	"%d %d"
.LC4:
	.string	"%s "
.LC5:
	.string	"Yes"
.LC6:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB5:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L26
.L35:
	leaq	n(%rip), %rax
	movq	%rax, %rdx
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -16(%rbp)
	jmp	.L27
.L28:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	stairs(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L27:
	movl	m(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L28
	movl	$1, -16(%rbp)
	jmp	.L29
.L30:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	music(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L29:
	movl	n(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L30
	movl	$0, %eax
	call	check_last
	testl	%eax, %eax
	je	.L31
	movl	$0, %edx
	movl	$0, %esi
	movl	$0, %edi
	call	solve
	testl	%eax, %eax
	je	.L31
	movl	$1, %eax
	jmp	.L32
.L31:
	movl	$0, %eax
.L32:
	movl	%eax, -12(%rbp)
	cmpl	$0, -12(%rbp)
	je	.L33
	leaq	.LC5(%rip), %rax
	jmp	.L34
.L33:
	leaq	.LC6(%rip), %rax
.L34:
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -20(%rbp)
.L26:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.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:
