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

```c
#include<stdio.h>
int MIN(int a,int b){return a<b?a:b;}
int d[200010][4][4][4]={};
char w[200010][4][4][4]={};
int f[200010][4][4][4]={};
void g(int i,int j,int k,int l,int a,int b,int c,char s){
  d[i][j][k][l]=1;
  f[i][j][k][l]=a*16+b*4+c;
  w[i][j][k][l]=s;
}
int main(){
  int n,a,b,c,i,j,k,l;
  char s[1000010];
  scanf("%d %d %d %d",&n,&a,&b,&c);
  if(a>3)a=3;
  if(b>3)b=3;
  if(c>3)c=3;
  d[0][a][b][c]=1;
  for(i=0;i<n;i++){
    scanf("%s",s);
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	for(l=0;l<4;l++){
	  if(d[i][j][k][l]==0)continue;
	  if(s[1]=='B'){
	    if(k){  
	      g(i+1,MIN(j+1,3),k-1,l,j,k,l,'A');
	      //if(k==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,MIN(k+1,3),l,j,k,l,'B');
	      //if(j==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	  }
	  if(s[0]=='A'&&s[1]=='C'){
	    if(l){
	      g(i+1,MIN(j+1,3),k,l-1,j,k,l,'A');
	      //if(l==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,k,MIN(l+1,3),j,k,l,'C');
	      //if(j==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }
	  }
	  if(s[0]=='B'){
	    if(l){
	      g(i+1,j,MIN(k+1,3),l-1,j,k,l,'B');
	      //if(l==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	    if(k){
	      g(i+1,j,k-1,MIN(l+1,3),j,k,l,'C');
	      //if(k==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }	 
	  }
	}
      }
    }
  }
  for(i=0;i<4;i++){
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	if(d[n][i][j][k]){//printf("%d %d %d",i,j,k);
	  printf("Yes\n");
	  for(l=n;l;l--){
	    a=f[l][i][j][k];
	    s[l]=w[l][i][j][k];
	    i=a/16;
	    j=(a%16)/4;
	    k=a%4;//printf("%d %d %d\n",i,j,k);
	  }
	  for(l=0;l<n;l++)printf("%c\n",s[l+1]);
	  return 0;
	}
      }
    }
  }
  printf("No\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 51202560
d:
	.zero	51202560
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 12800640
w:
	.zero	12800640
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 51202560
f:
	.zero	51202560
	.text
	.globl	g
	.type	g, @function
g:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	24(%rbp), %eax
	movb	%al, -28(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	leal	0(,%rax,4), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	leal	0(,%rax,4), %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rax, %rdx
	movzbl	-28(%rbp), %eax
	movb	%al, (%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	g, .-g
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%c\n"
.LC4:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$648, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1000068(%rbp), %rsi
	leaq	-1000072(%rbp), %rcx
	leaq	-1000076(%rbp), %rdx
	leaq	-1000080(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1000076(%rbp), %eax
	cmpl	$3, %eax
	jle	.L5
	movl	$3, -1000076(%rbp)
.L5:
	movl	-1000072(%rbp), %eax
	cmpl	$3, %eax
	jle	.L6
	movl	$3, -1000072(%rbp)
.L6:
	movl	-1000068(%rbp), %eax
	cmpl	$3, %eax
	jle	.L7
	movl	$3, -1000068(%rbp)
.L7:
	movl	-1000076(%rbp), %eax
	movl	-1000072(%rbp), %edx
	movl	-1000068(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -1000064(%rbp)
	jmp	.L8
.L22:
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000060(%rbp)
	jmp	.L9
.L21:
	movl	$0, -1000056(%rbp)
	jmp	.L10
.L20:
	movl	$0, -1000052(%rbp)
	jmp	.L11
.L19:
	movl	-1000052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000064(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000056(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movzbl	-1000047(%rbp), %eax
	cmpb	$66, %al
	jne	.L14
	cmpl	$0, -1000056(%rbp)
	je	.L15
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%ebx, %edx
	call	g
	addq	$16, %rsp
.L15:
	cmpl	$0, -1000060(%rbp)
	je	.L14
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %r10d
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%r10d, %edx
	call	g
	addq	$16, %rsp
.L14:
	movzbl	-1000048(%rbp), %eax
	cmpb	$65, %al
	jne	.L16
	movzbl	-1000047(%rbp), %eax
	cmpb	$67, %al
	jne	.L16
	cmpl	$0, -1000052(%rbp)
	je	.L17
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000056(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L17:
	cmpl	$0, -1000060(%rbp)
	je	.L16
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000056(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L16:
	movzbl	-1000048(%rbp), %eax
	cmpb	$66, %al
	jne	.L13
	cmpl	$0, -1000052(%rbp)
	je	.L18
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000060(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
.L18:
	cmpl	$0, -1000056(%rbp)
	je	.L13
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000060(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %ecx
	pushq	%rcx
	movl	%esi, %ecx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
	jmp	.L13
.L37:
	nop
.L13:
	addl	$1, -1000052(%rbp)
.L11:
	cmpl	$3, -1000052(%rbp)
	jle	.L19
	addl	$1, -1000056(%rbp)
.L10:
	cmpl	$3, -1000056(%rbp)
	jle	.L20
	addl	$1, -1000060(%rbp)
.L9:
	cmpl	$3, -1000060(%rbp)
	jle	.L21
	addl	$1, -1000064(%rbp)
.L8:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000064(%rbp)
	jl	.L22
	movl	$0, -1000064(%rbp)
	jmp	.L23
.L34:
	movl	$0, -1000060(%rbp)
	jmp	.L24
.L33:
	movl	$0, -1000056(%rbp)
	jmp	.L25
.L32:
	movl	-1000080(%rbp), %eax
	movl	-1000056(%rbp), %edx
	movslq	%edx, %rcx
	movl	-1000064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-1000080(%rbp), %eax
	movl	%eax, -1000052(%rbp)
	jmp	.L27
.L28:
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1000076(%rbp)
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-1000052(%rbp), %eax
	cltq
	movb	%dl, -1000048(%rbp,%rax)
	movl	-1000076(%rbp), %eax
	leal	15(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$4, %eax
	movl	%eax, -1000064(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$28, %edx
	addl	%edx, %eax
	andl	$15, %eax
	subl	%edx, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, -1000060(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -1000056(%rbp)
	subl	$1, -1000052(%rbp)
.L27:
	cmpl	$0, -1000052(%rbp)
	jne	.L28
	movl	$0, -1000052(%rbp)
	jmp	.L29
.L30:
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-1000048(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1000052(%rbp)
.L29:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000052(%rbp)
	jl	.L30
	movl	$0, %eax
	jmp	.L35
.L26:
	addl	$1, -1000056(%rbp)
.L25:
	cmpl	$3, -1000056(%rbp)
	jle	.L32
	addl	$1, -1000060(%rbp)
.L24:
	cmpl	$3, -1000060(%rbp)
	jle	.L33
	addl	$1, -1000064(%rbp)
.L23:
	cmpl	$3, -1000064(%rbp)
	jle	.L34
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L35:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	leaq	(%rsi,%rdi,4), %rax
	movl	8(%rsp), %edi
	leaq	(%rdx,%rax,4), %rdx
	leaq	d(%rip), %rax
	salq	$2, %rdx
	leaq	(%rdx,%rcx), %rsi
	movl	$1, (%rax,%rsi,4)
	leal	(%r9,%r8,4), %eax
	leal	(%rdi,%rax,4), %eax
	leaq	f(%rip), %rdi
	movl	%eax, (%rdi,%rsi,4)
	leaq	w(%rip), %rax
	addq	%rdx, %rax
	movl	16(%rsp), %edx
	movb	%dl, (%rax,%rcx)
	ret
	.cfi_endproc
.LFE24:
	.size	g, .-g
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%c\n"
.LC4:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999480
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$760, %rsp
	.cfi_def_cfa_offset 1000240
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000168(%rsp)
	xorl	%eax, %eax
	leaq	136(%rsp), %rcx
	leaq	132(%rsp), %rdx
	leaq	128(%rsp), %rsi
	leaq	140(%rsp), %r8
	call	__isoc99_scanf@PLT
	cmpl	$3, 132(%rsp)
	jle	.L5
	movl	$3, 132(%rsp)
.L5:
	cmpl	$3, 136(%rsp)
	jle	.L6
	movl	$3, 136(%rsp)
.L6:
	cmpl	$3, 140(%rsp)
	jle	.L7
	movl	$3, 140(%rsp)
.L7:
	movslq	132(%rsp), %rcx
	movslq	136(%rsp), %rdx
	leaq	d(%rip), %rsi
	movslq	140(%rsp), %rax
	leaq	(%rdx,%rcx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	movl	$1, (%rsi,%rax,4)
	movslq	128(%rsp), %rax
	testl	%eax, %eax
	jle	.L8
	leaq	144(%rsp), %rax
	movl	$0, 92(%rsp)
	movq	%rax, 112(%rsp)
	leaq	w(%rip), %rax
	movq	$4, 96(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L61:
	movq	112(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rsi
	addl	$1, 92(%rsp)
	movl	92(%rsp), %edi
	movl	$3, 88(%rsp)
	movq	%rsi, %rax
	salq	$6, %rsi
	movzbl	145(%rsp), %r13d
	movl	$-1, 12(%rsp)
	salq	$4, %rax
	addq	24(%rsp), %rax
	movq	%rsi, 72(%rsp)
	movzbl	144(%rsp), %r15d
	movq	%rax, 64(%rsp)
	movslq	%edi, %rax
	movq	%rax, 104(%rsp)
	salq	$2, %rax
	movl	$0, 32(%rsp)
	movq	%rax, 40(%rsp)
	movb	%r13b, 11(%rsp)
.L9:
	movl	12(%rsp), %eax
	movl	$3, %r11d
	movq	40(%rsp), %rbx
	leaq	-256+d(%rip), %rdx
	movq	64(%rsp), %r9
	movl	88(%rsp), %ecx
	movl	$-1, %r13d
	leal	2(%rax), %r10d
	movq	72(%rsp), %rax
	leaq	-16(%r9), %r14
	leal	-1(%rcx), %r8d
	addq	%rax, %rdx
	leaq	-64(%rax), %r12
	movq	%rax, %rsi
	xorl	%eax, %eax
	cmpl	%r11d, %r10d
	movq	%r14, 16(%rsp)
	leal	-2(%rcx), %edi
	cmovg	%r11d, %r10d
	movslq	%r10d, %r11
	movslq	32(%rsp), %r10
	movq	%r11, 80(%rsp)
	addq	%rbx, %r10
	addq	%r11, %rbx
	salq	$2, %r10
	leaq	0(,%rbx,4), %rbx
	movq	%r10, 56(%rsp)
	movq	%rbx, 48(%rsp)
.L60:
	movl	(%rdx), %ebx
	movl	%eax, 36(%rsp)
	leal	-3(%rcx), %r11d
	leal	1(%rax), %r10d
	testl	%ebx, %ebx
	je	.L23
	cmpb	$66, 11(%rsp)
	je	.L139
	cmpb	$65, %r15b
	je	.L140
.L24:
	cmpb	$66, %r15b
	jne	.L23
	testq	%rax, %rax
	je	.L23
	leaq	-12+d(%rip), %rbx
	movb	$67, -3(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-12+f(%rip), %rbx
	movl	%r11d, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L23:
	movl	4(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L35
	cmpb	$66, 11(%rsp)
	je	.L141
	cmpb	$65, %r15b
	je	.L142
.L37:
	cmpb	$66, %r15b
	jne	.L35
	movl	$3, %r11d
	leaq	d(%rip), %rbp
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	movslq	%r11d, %r11
	addq	56(%rsp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 0(%rbp,%rbx)
	leaq	f(%rip), %rbp
	movl	%edi, 0(%rbp,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, (%rbx,%r11,4)
	testq	%rax, %rax
	je	.L35
	leaq	-8+d(%rip), %r11
	movb	$67, -2(%r9)
	movl	$1, (%r11,%rsi)
	leaq	-8+f(%rip), %r11
	movl	%edi, (%r11,%rsi)
	.p2align 4,,10
	.p2align 3
.L35:
	movl	8(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L49
	cmpb	$66, 11(%rsp)
	je	.L143
	cmpb	$65, %r15b
	je	.L144
.L51:
	cmpb	$66, %r15b
	jne	.L49
	movl	$3, %r11d
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	movslq	%r11d, %r11
	addq	56(%rsp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 1(%rbx,%r11,4)
	testq	%rax, %rax
	je	.L49
	leaq	-4+d(%rip), %rbx
	movb	$67, -1(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-4+f(%rip), %rbx
	movl	%r8d, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L49:
	movl	12(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpb	$66, 11(%rsp)
	je	.L145
	cmpb	$65, %r15b
	je	.L146
.L14:
	cmpb	$66, %r15b
	jne	.L10
	movl	$3, %r11d
	leaq	d(%rip), %rbx
	cmpl	%r11d, %r10d
	cmovg	%r11d, %r10d
	movslq	%r10d, %r10
	addq	56(%rsp), %r10
	movq	%r10, %r11
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$66, 2(%rbx,%r10,4)
	testq	%rax, %rax
	je	.L10
	leaq	-4+d(%rip), %rbx
	movb	$67, -1(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-4+f(%rip), %rbx
	movl	%ecx, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rax
	addq	$4, 16(%rsp)
	addl	$4, %ecx
	addl	$4, %edi
	addq	$16, %rdx
	addq	$4, %r9
	addl	$1, %r13d
	addl	$4, %r8d
	addq	$16, %r12
	addq	$16, %rsi
	cmpq	$4, %rax
	jne	.L60
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	addl	$1, 32(%rsp)
	addl	$16, 88(%rsp)
	addq	$16, 64(%rsp)
	addq	$64, 72(%rsp)
	cmpl	$3, %eax
	jne	.L9
	addq	$4, 96(%rsp)
	movslq	128(%rsp), %rax
	cmpl	92(%rsp), %eax
	jg	.L61
.L8:
	salq	$8, %rax
	leaq	d(%rip), %rsi
	xorl	%r12d, %r12d
	addq	%rsi, %rax
.L62:
	movl	(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L75
	movl	4(%rax), %r9d
	testl	%r9d, %r9d
	jne	.L76
	movl	8(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L77
	movl	12(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L78
	movl	16(%rax), %r8d
	testl	%r8d, %r8d
	jne	.L137
	movl	20(%rax), %edi
	testl	%edi, %edi
	jne	.L80
	movl	24(%rax), %esi
	testl	%esi, %esi
	jne	.L81
	movl	28(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L82
	movl	32(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L138
	movl	36(%rax), %edx
	testl	%edx, %edx
	jne	.L84
	movl	40(%rax), %r15d
	testl	%r15d, %r15d
	jne	.L85
	movl	44(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L86
	movl	48(%rax), %r14d
	testl	%r14d, %r14d
	jne	.L136
	movl	52(%rax), %r13d
	testl	%r13d, %r13d
	jne	.L88
	movl	56(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L89
	movl	60(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L147
	addl	$1, %r12d
	addq	$64, %rax
	cmpl	$4, %r12d
	jne	.L62
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L64:
	movq	1000168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L148
	addq	$1000184, %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
.L139:
	.cfi_restore_state
	testq	%rax, %rax
	je	.L30
	movslq	%r13d, %rbx
	addq	48(%rsp), %rbx
	leaq	d(%rip), %r14
	movq	%rbx, %rbp
	salq	$4, %rbp
	movl	$1, (%r14,%rbp)
	leaq	f(%rip), %r14
	movl	%r11d, (%r14,%rbp)
	movq	24(%rsp), %r14
	movb	$65, (%r14,%rbx,4)
.L30:
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L29
	movl	$3, %ebx
	movslq	12(%rsp), %rbp
	leaq	d(%rip), %r14
	cmpl	%ebx, %r10d
	cmovle	%r10d, %ebx
	addq	40(%rsp), %rbp
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbp,4), %rbx
	movq	%rbx, %rbp
	salq	$4, %rbp
	movl	$1, (%r14,%rbp)
	leaq	f(%rip), %r14
	movl	%r11d, (%r14,%rbp)
	movq	24(%rsp), %r14
	movb	$66, (%r14,%rbx,4)
.L29:
	cmpb	$65, %r15b
	jne	.L24
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L141:
	testq	%rax, %rax
	je	.L44
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 1(%rbx,%r11,4)
.L44:
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L43
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 1(%rbx,%r11,4)
.L43:
	cmpb	$65, %r15b
	jne	.L37
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L140:
	cmpb	$67, 11(%rsp)
	jne	.L23
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L25
	leaq	4+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	4+f(%rip), %rbx
	movl	4(%rdx), %ebp
	movl	%r11d, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 1(%rbx)
	testl	%ebp, %ebp
	je	.L35
.L38:
	movslq	36(%rsp), %rbp
	movq	48(%rsp), %rbx
	leaq	d(%rip), %r14
	addq	%rbp, %rbx
	movq	%rbx, %r11
	salq	$4, %r11
	addq	%r11, %r14
	movq	%r14, 120(%rsp)
	movl	$1, (%r14)
	leaq	f(%rip), %r14
	addq	%r14, %r11
	movq	24(%rsp), %r14
	movl	%edi, (%r11)
	movb	$65, (%r14,%rbx,4)
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L35
	leaq	8+d(%rip), %r14
	movl	$1, (%r14,%r12)
	leaq	8+f(%rip), %r14
	movl	%edi, (%r14,%r12)
	movq	16(%rsp), %r14
	movb	$67, 2(%r14)
	movl	8(%rdx), %r14d
	testl	%r14d, %r14d
	je	.L49
	movq	120(%rsp), %r14
	movl	%r8d, 4(%r11)
	movl	$1, 4(%r14)
	movq	24(%rsp), %r14
	movb	$65, 1(%r14,%rbx,4)
.L54:
	leaq	12+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	12+f(%rip), %rbx
	movl	12(%rdx), %r14d
	movl	%r8d, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 3(%rbx)
	testl	%r14d, %r14d
	je	.L10
	movq	80(%rsp), %rbx
	movq	104(%rsp), %r14
	leaq	(%rbx,%r14,4), %r10
	leaq	d(%rip), %rbx
	leaq	0(%rbp,%r10,4), %r10
	movq	%r10, %r11
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r10,4)
.L72:
	leaq	12+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	12+f(%rip), %rbx
	movl	%ecx, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 3(%rbx)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L143:
	testq	%rax, %rax
	je	.L58
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 8(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 8(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r11,4)
.L58:
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	je	.L57
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 8(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 8(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 2(%rbx,%r11,4)
.L57:
	cmpb	$65, %r15b
	jne	.L51
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L142:
	cmpb	$67, 11(%rsp)
	jne	.L35
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L145:
	testq	%rax, %rax
	je	.L12
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 12(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%ecx, 12(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 3(%rbx,%r11,4)
.L12:
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L13
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 12(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%ecx, 12(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 3(%rbx,%r11,4)
.L13:
	cmpb	$65, %r15b
	jne	.L14
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L144:
	cmpb	$67, 11(%rsp)
	jne	.L49
	movq	48(%rsp), %rbx
	movslq	36(%rsp), %rbp
	leaq	d(%rip), %r14
	leaq	(%rbx,%rbp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 1(%rbx,%r11,4)
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L49
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L146:
	cmpb	$67, 11(%rsp)
	jne	.L10
	movslq	36(%rsp), %r10
	leaq	d(%rip), %rbx
	addq	48(%rsp), %r10
	movq	%r10, %r11
	movl	32(%rsp), %ebp
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r10,4)
	testl	%ebp, %ebp
	je	.L10
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L25:
	movl	4(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L35
	movslq	36(%rsp), %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, (%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, (%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, (%rbx,%r11,4)
	jmp	.L35
.L147:
	movl	$3, %ebx
.L136:
	movl	$3, %ebp
.L69:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	128(%rsp), %edi
	testl	%edi, %edi
	je	.L64
	movslq	%edi, %rcx
	leaq	144(%rsp), %r8
	leaq	w(%rip), %r9
	leaq	f(%rip), %rsi
.L65:
	movslq	%r12d, %r12
	movslq	%ecx, %rdx
	movslq	%ebp, %rbp
	movslq	%ebx, %rax
	leaq	(%r12,%rdx,4), %rdx
	leaq	0(%rbp,%rdx,4), %r10
	salq	$2, %r10
	leaq	(%r10,%rax), %rdx
	addq	%r9, %r10
	movl	(%rsi,%rdx,4), %edx
	movzbl	(%r10,%rax), %eax
	testl	%edx, %edx
	leal	15(%rdx), %r12d
	movl	%edx, %r10d
	movb	%al, (%r8,%rcx)
	cmovns	%edx, %r12d
	sarl	$31, %r10d
	movl	%r10d, %r11d
	shrl	$28, %r11d
	sarl	$4, %r12d
	leal	(%rdx,%r11), %eax
	andl	$15, %eax
	subl	%r11d, %eax
	leal	3(%rax), %ebp
	cmovns	%eax, %ebp
	shrl	$30, %r10d
	subq	$1, %rcx
	leal	(%rdx,%r10), %eax
	andl	$3, %eax
	sarl	$2, %ebp
	subl	%r10d, %eax
	movl	%eax, %ebx
	testl	%ecx, %ecx
	jne	.L65
	movl	%edx, 132(%rsp)
	testl	%edi, %edi
	jle	.L64
	xorl	%ebx, %ebx
	leaq	145(%rsp), %r12
	leaq	.LC3(%rip), %rbp
.L67:
	movsbl	(%r12,%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 128(%rsp)
	jg	.L67
	jmp	.L64
.L80:
	movl	$1, %ebx
.L137:
	movl	$1, %ebp
	jmp	.L69
.L85:
	movl	$2, %ebx
.L138:
	movl	$2, %ebp
	jmp	.L69
.L88:
	movl	$1, %ebx
	movl	$3, %ebp
	jmp	.L69
.L86:
	movl	$3, %ebx
	movl	$2, %ebp
	jmp	.L69
.L84:
	movl	$1, %ebx
	movl	$2, %ebp
	jmp	.L69
.L75:
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	jmp	.L69
.L76:
	movl	$1, %ebx
	jmp	.L69
.L77:
	xorl	%ebp, %ebp
	movl	$2, %ebx
	jmp	.L69
.L78:
	movl	$3, %ebx
	jmp	.L69
.L81:
	movl	$2, %ebx
	movl	$1, %ebp
	jmp	.L69
.L82:
	movl	$3, %ebx
	movl	$1, %ebp
	jmp	.L69
.L89:
	movl	$2, %ebx
	movl	$3, %ebp
	jmp	.L69
.L148:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	f
	.bss
	.align 32
	.type	f, @object
	.size	f, 51202560
f:
	.zero	51202560
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 12800640
w:
	.zero	12800640
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 51202560
d:
	.zero	51202560
	.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	MIN
	.type	MIN, @function
MIN:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%edi, %esi
	movl	%edi, %eax
	cmovle	%esi, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	MIN, .-MIN
	.p2align 4
	.globl	g
	.type	g, @function
g:
.LFB24:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	movslq	%edi, %rdi
	movslq	%edx, %rdx
	movslq	%ecx, %rcx
	leaq	(%rsi,%rdi,4), %rax
	movl	8(%rsp), %edi
	leaq	(%rdx,%rax,4), %rdx
	leaq	d(%rip), %rax
	salq	$2, %rdx
	leaq	(%rdx,%rcx), %rsi
	movl	$1, (%rax,%rsi,4)
	leal	(%r9,%r8,4), %eax
	leal	(%rdi,%rax,4), %eax
	leaq	f(%rip), %rdi
	movl	%eax, (%rdi,%rsi,4)
	leaq	w(%rip), %rax
	addq	%rdx, %rax
	movl	16(%rsp), %edx
	movb	%dl, (%rax,%rcx)
	ret
	.cfi_endproc
.LFE24:
	.size	g, .-g
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%c\n"
.LC4:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-999424(%rsp), %r11
	.cfi_def_cfa 11, 999480
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$760, %rsp
	.cfi_def_cfa_offset 1000240
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 1000168(%rsp)
	xorl	%eax, %eax
	leaq	136(%rsp), %rcx
	leaq	132(%rsp), %rdx
	leaq	128(%rsp), %rsi
	leaq	140(%rsp), %r8
	call	__isoc99_scanf@PLT
	cmpl	$3, 132(%rsp)
	jle	.L5
	movl	$3, 132(%rsp)
.L5:
	cmpl	$3, 136(%rsp)
	jle	.L6
	movl	$3, 136(%rsp)
.L6:
	cmpl	$3, 140(%rsp)
	jle	.L7
	movl	$3, 140(%rsp)
.L7:
	movslq	132(%rsp), %rcx
	movslq	136(%rsp), %rdx
	leaq	d(%rip), %rsi
	movslq	140(%rsp), %rax
	leaq	(%rdx,%rcx,4), %rdx
	leaq	(%rax,%rdx,4), %rax
	movl	$1, (%rsi,%rax,4)
	movslq	128(%rsp), %rax
	testl	%eax, %eax
	jle	.L8
	leaq	144(%rsp), %rax
	movl	$0, 92(%rsp)
	movq	%rax, 112(%rsp)
	leaq	w(%rip), %rax
	movq	$4, 96(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L61:
	movq	112(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	96(%rsp), %rsi
	addl	$1, 92(%rsp)
	movl	92(%rsp), %edi
	movl	$3, 88(%rsp)
	movq	%rsi, %rax
	salq	$6, %rsi
	movzbl	145(%rsp), %r13d
	movl	$-1, 12(%rsp)
	salq	$4, %rax
	addq	24(%rsp), %rax
	movq	%rsi, 72(%rsp)
	movzbl	144(%rsp), %r15d
	movq	%rax, 64(%rsp)
	movslq	%edi, %rax
	movq	%rax, 104(%rsp)
	salq	$2, %rax
	movl	$0, 32(%rsp)
	movq	%rax, 40(%rsp)
	movb	%r13b, 11(%rsp)
.L9:
	movl	12(%rsp), %eax
	movl	$3, %r11d
	movq	40(%rsp), %rbx
	leaq	-256+d(%rip), %rdx
	movq	64(%rsp), %r9
	movl	88(%rsp), %ecx
	movl	$-1, %r13d
	leal	2(%rax), %r10d
	movq	72(%rsp), %rax
	leaq	-16(%r9), %r14
	leal	-1(%rcx), %r8d
	addq	%rax, %rdx
	leaq	-64(%rax), %r12
	movq	%rax, %rsi
	xorl	%eax, %eax
	cmpl	%r11d, %r10d
	movq	%r14, 16(%rsp)
	leal	-2(%rcx), %edi
	cmovg	%r11d, %r10d
	movslq	%r10d, %r11
	movslq	32(%rsp), %r10
	movq	%r11, 80(%rsp)
	addq	%rbx, %r10
	addq	%r11, %rbx
	salq	$2, %r10
	leaq	0(,%rbx,4), %rbx
	movq	%r10, 56(%rsp)
	movq	%rbx, 48(%rsp)
.L60:
	movl	(%rdx), %ebx
	movl	%eax, 36(%rsp)
	leal	-3(%rcx), %r11d
	leal	1(%rax), %r10d
	testl	%ebx, %ebx
	je	.L23
	cmpb	$66, 11(%rsp)
	je	.L139
	cmpb	$65, %r15b
	je	.L140
.L24:
	cmpb	$66, %r15b
	jne	.L23
	testq	%rax, %rax
	je	.L23
	leaq	-12+d(%rip), %rbx
	movb	$67, -3(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-12+f(%rip), %rbx
	movl	%r11d, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L23:
	movl	4(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L35
	cmpb	$66, 11(%rsp)
	je	.L141
	cmpb	$65, %r15b
	je	.L142
.L37:
	cmpb	$66, %r15b
	jne	.L35
	movl	$3, %r11d
	leaq	d(%rip), %rbp
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	movslq	%r11d, %r11
	addq	56(%rsp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 0(%rbp,%rbx)
	leaq	f(%rip), %rbp
	movl	%edi, 0(%rbp,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, (%rbx,%r11,4)
	testq	%rax, %rax
	je	.L35
	leaq	-8+d(%rip), %r11
	movb	$67, -2(%r9)
	movl	$1, (%r11,%rsi)
	leaq	-8+f(%rip), %r11
	movl	%edi, (%r11,%rsi)
	.p2align 4,,10
	.p2align 3
.L35:
	movl	8(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L49
	cmpb	$66, 11(%rsp)
	je	.L143
	cmpb	$65, %r15b
	je	.L144
.L51:
	cmpb	$66, %r15b
	jne	.L49
	movl	$3, %r11d
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	movslq	%r11d, %r11
	addq	56(%rsp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 1(%rbx,%r11,4)
	testq	%rax, %rax
	je	.L49
	leaq	-4+d(%rip), %rbx
	movb	$67, -1(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-4+f(%rip), %rbx
	movl	%r8d, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L49:
	movl	12(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L10
	cmpb	$66, 11(%rsp)
	je	.L145
	cmpb	$65, %r15b
	je	.L146
.L14:
	cmpb	$66, %r15b
	jne	.L10
	movl	$3, %r11d
	leaq	d(%rip), %rbx
	cmpl	%r11d, %r10d
	cmovg	%r11d, %r10d
	movslq	%r10d, %r10
	addq	56(%rsp), %r10
	movq	%r10, %r11
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$66, 2(%rbx,%r10,4)
	testq	%rax, %rax
	je	.L10
	leaq	-4+d(%rip), %rbx
	movb	$67, -1(%r9)
	movl	$1, (%rbx,%rsi)
	leaq	-4+f(%rip), %rbx
	movl	%ecx, (%rbx,%rsi)
	.p2align 4,,10
	.p2align 3
.L10:
	addq	$1, %rax
	addq	$4, 16(%rsp)
	addl	$4, %ecx
	addl	$4, %edi
	addq	$16, %rdx
	addq	$4, %r9
	addl	$1, %r13d
	addl	$4, %r8d
	addq	$16, %r12
	addq	$16, %rsi
	cmpq	$4, %rax
	jne	.L60
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	addl	$1, 32(%rsp)
	addl	$16, 88(%rsp)
	addq	$16, 64(%rsp)
	addq	$64, 72(%rsp)
	cmpl	$3, %eax
	jne	.L9
	addq	$4, 96(%rsp)
	movslq	128(%rsp), %rax
	cmpl	92(%rsp), %eax
	jg	.L61
.L8:
	salq	$8, %rax
	leaq	d(%rip), %rsi
	xorl	%r12d, %r12d
	addq	%rsi, %rax
.L62:
	movl	(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L75
	movl	4(%rax), %r9d
	testl	%r9d, %r9d
	jne	.L76
	movl	8(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L77
	movl	12(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L78
	movl	16(%rax), %r8d
	testl	%r8d, %r8d
	jne	.L137
	movl	20(%rax), %edi
	testl	%edi, %edi
	jne	.L80
	movl	24(%rax), %esi
	testl	%esi, %esi
	jne	.L81
	movl	28(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L82
	movl	32(%rax), %ecx
	testl	%ecx, %ecx
	jne	.L138
	movl	36(%rax), %edx
	testl	%edx, %edx
	jne	.L84
	movl	40(%rax), %r15d
	testl	%r15d, %r15d
	jne	.L85
	movl	44(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L86
	movl	48(%rax), %r14d
	testl	%r14d, %r14d
	jne	.L136
	movl	52(%rax), %r13d
	testl	%r13d, %r13d
	jne	.L88
	movl	56(%rax), %ebp
	testl	%ebp, %ebp
	jne	.L89
	movl	60(%rax), %ebx
	testl	%ebx, %ebx
	jne	.L147
	addl	$1, %r12d
	addq	$64, %rax
	cmpl	$4, %r12d
	jne	.L62
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
.L64:
	movq	1000168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L148
	addq	$1000184, %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
.L139:
	.cfi_restore_state
	testq	%rax, %rax
	je	.L30
	movslq	%r13d, %rbx
	addq	48(%rsp), %rbx
	leaq	d(%rip), %r14
	movq	%rbx, %rbp
	salq	$4, %rbp
	movl	$1, (%r14,%rbp)
	leaq	f(%rip), %r14
	movl	%r11d, (%r14,%rbp)
	movq	24(%rsp), %r14
	movb	$65, (%r14,%rbx,4)
.L30:
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L29
	movl	$3, %ebx
	movslq	12(%rsp), %rbp
	leaq	d(%rip), %r14
	cmpl	%ebx, %r10d
	cmovle	%r10d, %ebx
	addq	40(%rsp), %rbp
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbp,4), %rbx
	movq	%rbx, %rbp
	salq	$4, %rbp
	movl	$1, (%r14,%rbp)
	leaq	f(%rip), %r14
	movl	%r11d, (%r14,%rbp)
	movq	24(%rsp), %r14
	movb	$66, (%r14,%rbx,4)
.L29:
	cmpb	$65, %r15b
	jne	.L24
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L141:
	testq	%rax, %rax
	je	.L44
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 1(%rbx,%r11,4)
.L44:
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L43
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 1(%rbx,%r11,4)
.L43:
	cmpb	$65, %r15b
	jne	.L37
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L140:
	cmpb	$67, 11(%rsp)
	jne	.L23
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L25
	leaq	4+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	4+f(%rip), %rbx
	movl	4(%rdx), %ebp
	movl	%r11d, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 1(%rbx)
	testl	%ebp, %ebp
	je	.L35
.L38:
	movslq	36(%rsp), %rbp
	movq	48(%rsp), %rbx
	leaq	d(%rip), %r14
	addq	%rbp, %rbx
	movq	%rbx, %r11
	salq	$4, %r11
	addq	%r11, %r14
	movq	%r14, 120(%rsp)
	movl	$1, (%r14)
	leaq	f(%rip), %r14
	addq	%r14, %r11
	movq	24(%rsp), %r14
	movl	%edi, (%r11)
	movb	$65, (%r14,%rbx,4)
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L35
	leaq	8+d(%rip), %r14
	movl	$1, (%r14,%r12)
	leaq	8+f(%rip), %r14
	movl	%edi, (%r14,%r12)
	movq	16(%rsp), %r14
	movb	$67, 2(%r14)
	movl	8(%rdx), %r14d
	testl	%r14d, %r14d
	je	.L49
	movq	120(%rsp), %r14
	movl	%r8d, 4(%r11)
	movl	$1, 4(%r14)
	movq	24(%rsp), %r14
	movb	$65, 1(%r14,%rbx,4)
.L54:
	leaq	12+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	12+f(%rip), %rbx
	movl	12(%rdx), %r14d
	movl	%r8d, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 3(%rbx)
	testl	%r14d, %r14d
	je	.L10
	movq	80(%rsp), %rbx
	movq	104(%rsp), %r14
	leaq	(%rbx,%r14,4), %r10
	leaq	d(%rip), %rbx
	leaq	0(%rbp,%r10,4), %r10
	movq	%r10, %r11
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r10,4)
.L72:
	leaq	12+d(%rip), %rbx
	movl	$1, (%rbx,%r12)
	leaq	12+f(%rip), %rbx
	movl	%ecx, (%rbx,%r12)
	movq	16(%rsp), %rbx
	movb	$67, 3(%rbx)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L143:
	testq	%rax, %rax
	je	.L58
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 8(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 8(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r11,4)
.L58:
	movl	32(%rsp), %r11d
	testl	%r11d, %r11d
	je	.L57
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 8(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 8(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 2(%rbx,%r11,4)
.L57:
	cmpb	$65, %r15b
	jne	.L51
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L142:
	cmpb	$67, 11(%rsp)
	jne	.L35
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L145:
	testq	%rax, %rax
	je	.L12
	movslq	%r13d, %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 12(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%ecx, 12(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 3(%rbx,%r11,4)
.L12:
	movl	32(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L13
	movl	$3, %r11d
	movslq	12(%rsp), %rbx
	leaq	d(%rip), %r14
	cmpl	%r11d, %r10d
	cmovle	%r10d, %r11d
	addq	40(%rsp), %rbx
	movslq	%r11d, %r11
	leaq	(%r11,%rbx,4), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 12(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%ecx, 12(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$66, 3(%rbx,%r11,4)
.L13:
	cmpb	$65, %r15b
	jne	.L14
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L144:
	cmpb	$67, 11(%rsp)
	jne	.L49
	movq	48(%rsp), %rbx
	movslq	36(%rsp), %rbp
	leaq	d(%rip), %r14
	leaq	(%rbx,%rbp), %r11
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, 4(%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%r8d, 4(%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, 1(%rbx,%r11,4)
	movl	32(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L49
	jmp	.L54
	.p2align 4,,10
	.p2align 3
.L146:
	cmpb	$67, 11(%rsp)
	jne	.L10
	movslq	36(%rsp), %r10
	leaq	d(%rip), %rbx
	addq	48(%rsp), %r10
	movq	%r10, %r11
	movl	32(%rsp), %ebp
	salq	$4, %r11
	movl	$1, 8(%rbx,%r11)
	leaq	f(%rip), %rbx
	movl	%ecx, 8(%rbx,%r11)
	movq	24(%rsp), %rbx
	movb	$65, 2(%rbx,%r10,4)
	testl	%ebp, %ebp
	je	.L10
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L25:
	movl	4(%rdx), %r11d
	testl	%r11d, %r11d
	je	.L35
	movslq	36(%rsp), %r11
	addq	48(%rsp), %r11
	leaq	d(%rip), %r14
	movq	%r11, %rbx
	salq	$4, %rbx
	movl	$1, (%r14,%rbx)
	leaq	f(%rip), %r14
	movl	%edi, (%r14,%rbx)
	movq	24(%rsp), %rbx
	movb	$65, (%rbx,%r11,4)
	jmp	.L35
.L147:
	movl	$3, %ebx
.L136:
	movl	$3, %ebp
.L69:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	128(%rsp), %edi
	testl	%edi, %edi
	je	.L64
	movslq	%edi, %rcx
	leaq	144(%rsp), %r8
	leaq	w(%rip), %r9
	leaq	f(%rip), %rsi
.L65:
	movslq	%r12d, %r12
	movslq	%ecx, %rdx
	movslq	%ebp, %rbp
	movslq	%ebx, %rax
	leaq	(%r12,%rdx,4), %rdx
	leaq	0(%rbp,%rdx,4), %r10
	salq	$2, %r10
	leaq	(%r10,%rax), %rdx
	addq	%r9, %r10
	movl	(%rsi,%rdx,4), %edx
	movzbl	(%r10,%rax), %eax
	testl	%edx, %edx
	leal	15(%rdx), %r12d
	movl	%edx, %r10d
	movb	%al, (%r8,%rcx)
	cmovns	%edx, %r12d
	sarl	$31, %r10d
	movl	%r10d, %r11d
	shrl	$28, %r11d
	sarl	$4, %r12d
	leal	(%rdx,%r11), %eax
	andl	$15, %eax
	subl	%r11d, %eax
	leal	3(%rax), %ebp
	cmovns	%eax, %ebp
	shrl	$30, %r10d
	subq	$1, %rcx
	leal	(%rdx,%r10), %eax
	andl	$3, %eax
	sarl	$2, %ebp
	subl	%r10d, %eax
	movl	%eax, %ebx
	testl	%ecx, %ecx
	jne	.L65
	movl	%edx, 132(%rsp)
	testl	%edi, %edi
	jle	.L64
	xorl	%ebx, %ebx
	leaq	145(%rsp), %r12
	leaq	.LC3(%rip), %rbp
.L67:
	movsbl	(%r12,%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, 128(%rsp)
	jg	.L67
	jmp	.L64
.L80:
	movl	$1, %ebx
.L137:
	movl	$1, %ebp
	jmp	.L69
.L85:
	movl	$2, %ebx
.L138:
	movl	$2, %ebp
	jmp	.L69
.L88:
	movl	$1, %ebx
	movl	$3, %ebp
	jmp	.L69
.L86:
	movl	$3, %ebx
	movl	$2, %ebp
	jmp	.L69
.L84:
	movl	$1, %ebx
	movl	$2, %ebp
	jmp	.L69
.L75:
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	jmp	.L69
.L76:
	movl	$1, %ebx
	jmp	.L69
.L77:
	xorl	%ebp, %ebp
	movl	$2, %ebx
	jmp	.L69
.L78:
	movl	$3, %ebx
	jmp	.L69
.L81:
	movl	$2, %ebx
	movl	$1, %ebp
	jmp	.L69
.L82:
	movl	$3, %ebx
	movl	$1, %ebp
	jmp	.L69
.L89:
	movl	$2, %ebx
	movl	$3, %ebp
	jmp	.L69
.L148:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	f
	.bss
	.align 32
	.type	f, @object
	.size	f, 51202560
f:
	.zero	51202560
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 12800640
w:
	.zero	12800640
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 51202560
d:
	.zero	51202560
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>
int MIN(int a,int b){return a<b?a:b;}
int d[200010][4][4][4]={};
char w[200010][4][4][4]={};
int f[200010][4][4][4]={};
void g(int i,int j,int k,int l,int a,int b,int c,char s){
  d[i][j][k][l]=1;
  f[i][j][k][l]=a*16+b*4+c;
  w[i][j][k][l]=s;
}
int main(){
  int n,a,b,c,i,j,k,l;
  char s[1000010];
  scanf("%d %d %d %d",&n,&a,&b,&c);
  if(a>3)a=3;
  if(b>3)b=3;
  if(c>3)c=3;
  d[0][a][b][c]=1;
  for(i=0;i<n;i++){
    scanf("%s",s);
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	for(l=0;l<4;l++){
	  if(d[i][j][k][l]==0)continue;
	  if(s[1]=='B'){
	    if(k){  
	      g(i+1,MIN(j+1,3),k-1,l,j,k,l,'A');
	      //if(k==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,MIN(k+1,3),l,j,k,l,'B');
	      //if(j==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	  }
	  if(s[0]=='A'&&s[1]=='C'){
	    if(l){
	      g(i+1,MIN(j+1,3),k,l-1,j,k,l,'A');
	      //if(l==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,k,MIN(l+1,3),j,k,l,'C');
	      //if(j==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }
	  }
	  if(s[0]=='B'){
	    if(l){
	      g(i+1,j,MIN(k+1,3),l-1,j,k,l,'B');
	      //if(l==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	    if(k){
	      g(i+1,j,k-1,MIN(l+1,3),j,k,l,'C');
	      //if(k==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }	 
	  }
	}
      }
    }
  }
  for(i=0;i<4;i++){
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	if(d[n][i][j][k]){//printf("%d %d %d",i,j,k);
	  printf("Yes\n");
	  for(l=n;l;l--){
	    a=f[l][i][j][k];
	    s[l]=w[l][i][j][k];
	    i=a/16;
	    j=(a%16)/4;
	    k=a%4;//printf("%d %d %d\n",i,j,k);
	  }
	  for(l=0;l<n;l++)printf("%c\n",s[l+1]);
	  return 0;
	}
      }
    }
  }
  printf("No\n");
  return 0;
}

2 1 3 1
AB
AC
 8 6 9 1
BC
BC
AB
BC
AC
BC
AB
AB
 3 1 0 -1
AB
BC
AB
 8 6 16 1
AC
BC
AB
BC
AC
BC
AB
AB
 2 0 3 2
AB
AC
 1 0 8 1
AC
 8 9 16 1
AC
BC
AB
BC
AC
BC
AC
AB
 1 0 6 1
BC
 2 2 3 0
AB
AB
 2 3 2 0
AB
AC

Yes
A
C
 Yes
C
B
A
C
C
C
B
B
 Yes
A
C
B
 Yes
C
C
B
C
C
C
A
B
 Yes
A
C
 Yes
A
 Yes
C
B
A
C
C
C
C
B
 Yes
C
 Yes
B
B
 Yes
B
C

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

```c
#include<stdio.h>
int MIN(int a,int b){return a<b?a:b;}
int d[200010][4][4][4]={};
char w[200010][4][4][4]={};
int f[200010][4][4][4]={};
void g(int i,int j,int k,int l,int a,int b,int c,char s){
  d[i][j][k][l]=1;
  f[i][j][k][l]=a*16+b*4+c;
  w[i][j][k][l]=s;
}
int main(){
  int n,a,b,c,i,j,k,l;
  char s[1000010];
  scanf("%d %d %d %d",&n,&a,&b,&c);
  if(a>3)a=3;
  if(b>3)b=3;
  if(c>3)c=3;
  d[0][a][b][c]=1;
  for(i=0;i<n;i++){
    scanf("%s",s);
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	for(l=0;l<4;l++){
	  if(d[i][j][k][l]==0)continue;
	  if(s[1]=='B'){
	    if(k){  
	      g(i+1,MIN(j+1,3),k-1,l,j,k,l,'A');
	      //if(k==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,MIN(k+1,3),l,j,k,l,'B');
	      //if(j==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	  }
	  if(s[0]=='A'&&s[1]=='C'){
	    if(l){
	      g(i+1,MIN(j+1,3),k,l-1,j,k,l,'A');
	      //if(l==3)g(i+1,MIN(j+1,3),k,l,j,k,l,'A');
	    }
	    if(j){
	      g(i+1,j-1,k,MIN(l+1,3),j,k,l,'C');
	      //if(j==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }
	  }
	  if(s[0]=='B'){
	    if(l){
	      g(i+1,j,MIN(k+1,3),l-1,j,k,l,'B');
	      //if(l==3)g(i+1,j,MIN(k+1,3),l,j,k,l,'B');
	    }
	    if(k){
	      g(i+1,j,k-1,MIN(l+1,3),j,k,l,'C');
	      //if(k==3)g(i+1,j,k,MIN(l+1,3),j,k,l,'C');
	    }	 
	  }
	}
      }
    }
  }
  for(i=0;i<4;i++){
    for(j=0;j<4;j++){
      for(k=0;k<4;k++){
	if(d[n][i][j][k]){//printf("%d %d %d",i,j,k);
	  printf("Yes\n");
	  for(l=n;l;l--){
	    a=f[l][i][j][k];
	    s[l]=w[l][i][j][k];
	    i=a/16;
	    j=(a%16)/4;
	    k=a%4;//printf("%d %d %d\n",i,j,k);
	  }
	  for(l=0;l<n;l++)printf("%c\n",s[l+1]);
	  return 0;
	}
      }
    }
  }
  printf("No\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 51202560
d:
	.zero	51202560
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 12800640
w:
	.zero	12800640
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 51202560
f:
	.zero	51202560
	.text
	.globl	g
	.type	g, @function
g:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	24(%rbp), %eax
	movb	%al, -28(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	leal	0(,%rax,4), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	leal	0(,%rax,4), %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rax, %rdx
	movzbl	-28(%rbp), %eax
	movb	%al, (%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	g, .-g
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%c\n"
.LC4:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$648, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1000068(%rbp), %rsi
	leaq	-1000072(%rbp), %rcx
	leaq	-1000076(%rbp), %rdx
	leaq	-1000080(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1000076(%rbp), %eax
	cmpl	$3, %eax
	jle	.L5
	movl	$3, -1000076(%rbp)
.L5:
	movl	-1000072(%rbp), %eax
	cmpl	$3, %eax
	jle	.L6
	movl	$3, -1000072(%rbp)
.L6:
	movl	-1000068(%rbp), %eax
	cmpl	$3, %eax
	jle	.L7
	movl	$3, -1000068(%rbp)
.L7:
	movl	-1000076(%rbp), %eax
	movl	-1000072(%rbp), %edx
	movl	-1000068(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -1000064(%rbp)
	jmp	.L8
.L22:
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000060(%rbp)
	jmp	.L9
.L21:
	movl	$0, -1000056(%rbp)
	jmp	.L10
.L20:
	movl	$0, -1000052(%rbp)
	jmp	.L11
.L19:
	movl	-1000052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000064(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000056(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movzbl	-1000047(%rbp), %eax
	cmpb	$66, %al
	jne	.L14
	cmpl	$0, -1000056(%rbp)
	je	.L15
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%ebx, %edx
	call	g
	addq	$16, %rsp
.L15:
	cmpl	$0, -1000060(%rbp)
	je	.L14
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %r10d
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%r10d, %edx
	call	g
	addq	$16, %rsp
.L14:
	movzbl	-1000048(%rbp), %eax
	cmpb	$65, %al
	jne	.L16
	movzbl	-1000047(%rbp), %eax
	cmpb	$67, %al
	jne	.L16
	cmpl	$0, -1000052(%rbp)
	je	.L17
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000056(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L17:
	cmpl	$0, -1000060(%rbp)
	je	.L16
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000056(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L16:
	movzbl	-1000048(%rbp), %eax
	cmpb	$66, %al
	jne	.L13
	cmpl	$0, -1000052(%rbp)
	je	.L18
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000060(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
.L18:
	cmpl	$0, -1000056(%rbp)
	je	.L13
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000060(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %ecx
	pushq	%rcx
	movl	%esi, %ecx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
	jmp	.L13
.L37:
	nop
.L13:
	addl	$1, -1000052(%rbp)
.L11:
	cmpl	$3, -1000052(%rbp)
	jle	.L19
	addl	$1, -1000056(%rbp)
.L10:
	cmpl	$3, -1000056(%rbp)
	jle	.L20
	addl	$1, -1000060(%rbp)
.L9:
	cmpl	$3, -1000060(%rbp)
	jle	.L21
	addl	$1, -1000064(%rbp)
.L8:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000064(%rbp)
	jl	.L22
	movl	$0, -1000064(%rbp)
	jmp	.L23
.L34:
	movl	$0, -1000060(%rbp)
	jmp	.L24
.L33:
	movl	$0, -1000056(%rbp)
	jmp	.L25
.L32:
	movl	-1000080(%rbp), %eax
	movl	-1000056(%rbp), %edx
	movslq	%edx, %rcx
	movl	-1000064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-1000080(%rbp), %eax
	movl	%eax, -1000052(%rbp)
	jmp	.L27
.L28:
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1000076(%rbp)
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-1000052(%rbp), %eax
	cltq
	movb	%dl, -1000048(%rbp,%rax)
	movl	-1000076(%rbp), %eax
	leal	15(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$4, %eax
	movl	%eax, -1000064(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$28, %edx
	addl	%edx, %eax
	andl	$15, %eax
	subl	%edx, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, -1000060(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -1000056(%rbp)
	subl	$1, -1000052(%rbp)
.L27:
	cmpl	$0, -1000052(%rbp)
	jne	.L28
	movl	$0, -1000052(%rbp)
	jmp	.L29
.L30:
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-1000048(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1000052(%rbp)
.L29:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000052(%rbp)
	jl	.L30
	movl	$0, %eax
	jmp	.L35
.L26:
	addl	$1, -1000056(%rbp)
.L25:
	cmpl	$3, -1000056(%rbp)
	jle	.L32
	addl	$1, -1000060(%rbp)
.L24:
	cmpl	$3, -1000060(%rbp)
	jle	.L33
	addl	$1, -1000064(%rbp)
.L23:
	cmpl	$3, -1000064(%rbp)
	jle	.L34
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L35:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	MIN
	.type	MIN, @function
MIN:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	MIN, .-MIN
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 51202560
d:
	.zero	51202560
	.globl	w
	.align 32
	.type	w, @object
	.size	w, 12800640
w:
	.zero	12800640
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 51202560
f:
	.zero	51202560
	.text
	.globl	g
	.type	g, @function
g:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	movl	24(%rbp), %eax
	movb	%al, -28(%rbp)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	leal	0(,%rax,4), %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	leal	0(,%rax,4), %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rax, %rdx
	movzbl	-28(%rbp), %eax
	movb	%al, (%rdx)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	g, .-g
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%c\n"
.LC4:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	leaq	-999424(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$648, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-1000068(%rbp), %rsi
	leaq	-1000072(%rbp), %rcx
	leaq	-1000076(%rbp), %rdx
	leaq	-1000080(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1000076(%rbp), %eax
	cmpl	$3, %eax
	jle	.L5
	movl	$3, -1000076(%rbp)
.L5:
	movl	-1000072(%rbp), %eax
	cmpl	$3, %eax
	jle	.L6
	movl	$3, -1000072(%rbp)
.L6:
	movl	-1000068(%rbp), %eax
	cmpl	$3, %eax
	jle	.L7
	movl	$3, -1000068(%rbp)
.L7:
	movl	-1000076(%rbp), %eax
	movl	-1000072(%rbp), %edx
	movl	-1000068(%rbp), %ecx
	movslq	%ecx, %rcx
	cltq
	movslq	%edx, %rdx
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	$0, -1000064(%rbp)
	jmp	.L8
.L22:
	leaq	-1000048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -1000060(%rbp)
	jmp	.L9
.L21:
	movl	$0, -1000056(%rbp)
	jmp	.L10
.L20:
	movl	$0, -1000052(%rbp)
	jmp	.L11
.L19:
	movl	-1000052(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000064(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000056(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movzbl	-1000047(%rbp), %eax
	cmpb	$66, %al
	jne	.L14
	cmpl	$0, -1000056(%rbp)
	je	.L15
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%ebx, %edx
	call	g
	addq	$16, %rsp
.L15:
	cmpl	$0, -1000060(%rbp)
	je	.L14
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %r10d
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000052(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%eax, %ecx
	movl	%r10d, %edx
	call	g
	addq	$16, %rsp
.L14:
	movzbl	-1000048(%rbp), %eax
	cmpb	$65, %al
	jne	.L16
	movzbl	-1000047(%rbp), %eax
	cmpb	$67, %al
	jne	.L16
	cmpl	$0, -1000052(%rbp)
	je	.L17
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000060(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000056(%rbp), %eax
	pushq	$65
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L17:
	cmpl	$0, -1000060(%rbp)
	je	.L16
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %ecx
	movl	-1000060(%rbp), %eax
	leal	-1(%rax), %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000056(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%eax, %edx
	call	g
	addq	$16, %rsp
.L16:
	movzbl	-1000048(%rbp), %eax
	cmpb	$66, %al
	jne	.L13
	cmpl	$0, -1000052(%rbp)
	je	.L18
	movl	-1000052(%rbp), %eax
	leal	-1(%rax), %ebx
	movl	-1000056(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r8d
	movl	-1000060(%rbp), %ecx
	movl	-1000060(%rbp), %eax
	pushq	$66
	movl	-1000052(%rbp), %edx
	pushq	%rdx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%esi, %edx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
.L18:
	cmpl	$0, -1000056(%rbp)
	je	.L13
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	movl	$3, %esi
	movl	%eax, %edi
	call	MIN
	movl	%eax, %esi
	movl	-1000056(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-1000064(%rbp), %eax
	leal	1(%rax), %edi
	movl	-1000056(%rbp), %r9d
	movl	-1000060(%rbp), %r8d
	movl	-1000060(%rbp), %eax
	pushq	$67
	movl	-1000052(%rbp), %ecx
	pushq	%rcx
	movl	%esi, %ecx
	movl	%eax, %esi
	call	g
	addq	$16, %rsp
	jmp	.L13
.L37:
	nop
.L13:
	addl	$1, -1000052(%rbp)
.L11:
	cmpl	$3, -1000052(%rbp)
	jle	.L19
	addl	$1, -1000056(%rbp)
.L10:
	cmpl	$3, -1000056(%rbp)
	jle	.L20
	addl	$1, -1000060(%rbp)
.L9:
	cmpl	$3, -1000060(%rbp)
	jle	.L21
	addl	$1, -1000064(%rbp)
.L8:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000064(%rbp)
	jl	.L22
	movl	$0, -1000064(%rbp)
	jmp	.L23
.L34:
	movl	$0, -1000060(%rbp)
	jmp	.L24
.L33:
	movl	$0, -1000056(%rbp)
	jmp	.L25
.L32:
	movl	-1000080(%rbp), %eax
	movl	-1000056(%rbp), %edx
	movslq	%edx, %rcx
	movl	-1000064(%rbp), %edx
	movslq	%edx, %rdx
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L26
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	-1000080(%rbp), %eax
	movl	%eax, -1000052(%rbp)
	jmp	.L27
.L28:
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -1000076(%rbp)
	movl	-1000056(%rbp), %eax
	movslq	%eax, %rcx
	movl	-1000064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1000052(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	movl	-1000060(%rbp), %eax
	cltq
	salq	$2, %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	w(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-1000052(%rbp), %eax
	cltq
	movb	%dl, -1000048(%rbp,%rax)
	movl	-1000076(%rbp), %eax
	leal	15(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$4, %eax
	movl	%eax, -1000064(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$28, %edx
	addl	%edx, %eax
	andl	$15, %eax
	subl	%edx, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, -1000060(%rbp)
	movl	-1000076(%rbp), %eax
	cltd
	shrl	$30, %edx
	addl	%edx, %eax
	andl	$3, %eax
	subl	%edx, %eax
	movl	%eax, -1000056(%rbp)
	subl	$1, -1000052(%rbp)
.L27:
	cmpl	$0, -1000052(%rbp)
	jne	.L28
	movl	$0, -1000052(%rbp)
	jmp	.L29
.L30:
	movl	-1000052(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-1000048(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1000052(%rbp)
.L29:
	movl	-1000080(%rbp), %eax
	cmpl	%eax, -1000052(%rbp)
	jl	.L30
	movl	$0, %eax
	jmp	.L35
.L26:
	addl	$1, -1000056(%rbp)
.L25:
	cmpl	$3, -1000056(%rbp)
	jle	.L32
	addl	$1, -1000060(%rbp)
.L24:
	cmpl	$3, -1000060(%rbp)
	jle	.L33
	addl	$1, -1000064(%rbp)
.L23:
	cmpl	$3, -1000064(%rbp)
	jle	.L34
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L35:
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
