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

```c
#include <stdio.h>

int main(void){
  char S[50];
  scanf("%s", S);

  int ans = 1, num = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'K') ans = 0;
  if(S[num++] != 'I') ans = 0;
  if(S[num++] != 'H') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'B') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'R') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != '\0') ans = 0;

  if(ans) printf("YES\n");
  else printf("NO\n");

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$72, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	cmpb	$65, (%rsp)
	sete	%dl
	sete	%al
	leal	1(%rdx), %esi
	movzbl	%al, %eax
	leal	2(%rdx), %ecx
	movslq	%esi, %rsi
	movzbl	(%rsp,%rax), %edi
	xorl	%eax, %eax
	cmpb	$73, (%rsp,%rsi)
	jne	.L2
	xorl	%eax, %eax
	cmpb	$75, %dil
	sete	%al
.L2:
	movslq	%ecx, %rcx
	leal	3(%rdx), %esi
	cmpb	$72, (%rsp,%rcx)
	movslq	%esi, %rdi
	movl	$0, %ecx
	cmovne	%ecx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L4
	leal	4(%rdx), %esi
	movslq	%esi, %rdi
.L4:
	leal	1(%rsi), %ecx
	xorl	%edx, %edx
	cmpb	$66, (%rsp,%rdi)
	movslq	%ecx, %rdi
	cmovne	%edx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L6
	leal	2(%rsi), %ecx
	movslq	%ecx, %rdi
.L6:
	leal	1(%rcx), %edx
	cmpb	$82, (%rsp,%rdi)
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %esi
	je	.L25
	cmpb	$65, %sil
	je	.L26
.L9:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	xorl	%eax, %eax
.L11:
	leal	2(%rcx), %edx
	movslq	%edx, %rdx
.L8:
	cmpb	$0, (%rsp,%rdx)
	jne	.L9
	testb	$1, %al
	je	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L25:
	cmpb	$65, %sil
	jne	.L8
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$72, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	cmpb	$65, (%rsp)
	sete	%dl
	sete	%al
	leal	1(%rdx), %esi
	movzbl	%al, %eax
	leal	2(%rdx), %ecx
	movslq	%esi, %rsi
	movzbl	(%rsp,%rax), %edi
	xorl	%eax, %eax
	cmpb	$73, (%rsp,%rsi)
	jne	.L2
	xorl	%eax, %eax
	cmpb	$75, %dil
	sete	%al
.L2:
	movslq	%ecx, %rcx
	leal	3(%rdx), %esi
	cmpb	$72, (%rsp,%rcx)
	movslq	%esi, %rdi
	movl	$0, %ecx
	cmovne	%ecx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L4
	leal	4(%rdx), %esi
	movslq	%esi, %rdi
.L4:
	leal	1(%rsi), %ecx
	xorl	%edx, %edx
	cmpb	$66, (%rsp,%rdi)
	movslq	%ecx, %rdi
	cmovne	%edx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L6
	leal	2(%rsi), %ecx
	movslq	%ecx, %rdi
.L6:
	leal	1(%rcx), %edx
	cmpb	$82, (%rsp,%rdi)
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %esi
	je	.L25
	cmpb	$65, %sil
	je	.L26
.L9:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	xorl	%eax, %eax
.L11:
	leal	2(%rcx), %edx
	movslq	%edx, %rdx
.L8:
	cmpb	$0, (%rsp,%rdx)
	jne	.L9
	testb	$1, %al
	je	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L25:
	cmpb	$65, %sil
	jne	.L8
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$72, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	cmpb	$65, (%rsp)
	sete	%dl
	sete	%al
	leal	1(%rdx), %esi
	movzbl	%al, %eax
	leal	2(%rdx), %ecx
	movslq	%esi, %rsi
	movzbl	(%rsp,%rax), %edi
	xorl	%eax, %eax
	cmpb	$73, (%rsp,%rsi)
	jne	.L2
	xorl	%eax, %eax
	cmpb	$75, %dil
	sete	%al
.L2:
	movslq	%ecx, %rcx
	leal	3(%rdx), %esi
	cmpb	$72, (%rsp,%rcx)
	movslq	%esi, %rdi
	movl	$0, %ecx
	cmovne	%ecx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L4
	leal	4(%rdx), %esi
	movslq	%esi, %rdi
.L4:
	leal	1(%rsi), %ecx
	xorl	%edx, %edx
	cmpb	$66, (%rsp,%rdi)
	movslq	%ecx, %rdi
	cmovne	%edx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L6
	leal	2(%rsi), %ecx
	movslq	%ecx, %rdi
.L6:
	leal	1(%rcx), %edx
	cmpb	$82, (%rsp,%rdi)
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %esi
	je	.L25
	cmpb	$65, %sil
	je	.L26
.L9:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	xorl	%eax, %eax
.L11:
	leal	2(%rcx), %edx
	movslq	%edx, %rdx
.L8:
	cmpb	$0, (%rsp,%rdx)
	jne	.L9
	testb	$1, %al
	je	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L25:
	cmpb	$65, %sil
	jne	.L8
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include <stdio.h>

int main(void){
  char S[50];
  scanf("%s", S);

  int ans = 1, num = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'K') ans = 0;
  if(S[num++] != 'I') ans = 0;
  if(S[num++] != 'H') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'B') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'R') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != '\0') ans = 0;

  if(ans) printf("YES\n");
  else printf("NO\n");

  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void){
  char S[50];
  scanf("%s", S);

  int ans = 1, num = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'K') ans = 0;
  if(S[num++] != 'I') ans = 0;
  if(S[num++] != 'H') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'B') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'R') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != '\0') ans = 0;

  if(ans) printf("YES\n");
  else printf("NO\n");

  return 0;
}```

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.
Optimized Assembly Code:

AKIBAAARH
 JIHBR
 ARAABHAIKAA
 HRAAABIKA
 RBHIJ
 AR@ABHAIKAA
 HRAAABHKA
 QBHIJ
 AR@ABHAIJAA
 AKHBAAARH

NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO

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

```c
#include <stdio.h>

int main(void){
  char S[50];
  scanf("%s", S);

  int ans = 1, num = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'K') ans = 0;
  if(S[num++] != 'I') ans = 0;
  if(S[num++] != 'H') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'B') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != 'R') ans = 0;
  if(S[num] == 'A') num++;
  if(S[num++] != '\0') ans = 0;

  if(ans) printf("YES\n");
  else printf("NO\n");

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$72, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	cmpb	$65, (%rsp)
	sete	%dl
	sete	%al
	leal	1(%rdx), %esi
	movzbl	%al, %eax
	leal	2(%rdx), %ecx
	movslq	%esi, %rsi
	movzbl	(%rsp,%rax), %edi
	xorl	%eax, %eax
	cmpb	$73, (%rsp,%rsi)
	jne	.L2
	xorl	%eax, %eax
	cmpb	$75, %dil
	sete	%al
.L2:
	movslq	%ecx, %rcx
	leal	3(%rdx), %esi
	cmpb	$72, (%rsp,%rcx)
	movslq	%esi, %rdi
	movl	$0, %ecx
	cmovne	%ecx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L4
	leal	4(%rdx), %esi
	movslq	%esi, %rdi
.L4:
	leal	1(%rsi), %ecx
	xorl	%edx, %edx
	cmpb	$66, (%rsp,%rdi)
	movslq	%ecx, %rdi
	cmovne	%edx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L6
	leal	2(%rsi), %ecx
	movslq	%ecx, %rdi
.L6:
	leal	1(%rcx), %edx
	cmpb	$82, (%rsp,%rdi)
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %esi
	je	.L25
	cmpb	$65, %sil
	je	.L26
.L9:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	xorl	%eax, %eax
.L11:
	leal	2(%rcx), %edx
	movslq	%edx, %rdx
.L8:
	cmpb	$0, (%rsp,%rdx)
	jne	.L9
	testb	$1, %al
	je	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L25:
	cmpb	$65, %sil
	jne	.L8
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$72, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	xorl	%edx, %edx
	cmpb	$65, (%rsp)
	sete	%dl
	sete	%al
	leal	1(%rdx), %esi
	movzbl	%al, %eax
	leal	2(%rdx), %ecx
	movslq	%esi, %rsi
	movzbl	(%rsp,%rax), %edi
	xorl	%eax, %eax
	cmpb	$73, (%rsp,%rsi)
	jne	.L2
	xorl	%eax, %eax
	cmpb	$75, %dil
	sete	%al
.L2:
	movslq	%ecx, %rcx
	leal	3(%rdx), %esi
	cmpb	$72, (%rsp,%rcx)
	movslq	%esi, %rdi
	movl	$0, %ecx
	cmovne	%ecx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L4
	leal	4(%rdx), %esi
	movslq	%esi, %rdi
.L4:
	leal	1(%rsi), %ecx
	xorl	%edx, %edx
	cmpb	$66, (%rsp,%rdi)
	movslq	%ecx, %rdi
	cmovne	%edx, %eax
	cmpb	$65, (%rsp,%rdi)
	jne	.L6
	leal	2(%rsi), %ecx
	movslq	%ecx, %rdi
.L6:
	leal	1(%rcx), %edx
	cmpb	$82, (%rsp,%rdi)
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %esi
	je	.L25
	cmpb	$65, %sil
	je	.L26
.L9:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	xorl	%eax, %eax
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	xorl	%eax, %eax
.L11:
	leal	2(%rcx), %edx
	movslq	%edx, %rdx
.L8:
	cmpb	$0, (%rsp,%rdx)
	jne	.L9
	testb	$1, %al
	je	.L9
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L25:
	cmpb	$65, %sil
	jne	.L8
	jmp	.L11
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```