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 chk(int);

int main(void){
   int x,y,xg,yg;
   scanf("%d%d",&x,&y);

   xg = chk(x); yg = chk(y);
   if(xg==yg){
      printf("Yes\n");
   } else {
      printf("No\n");
   }

   return 0;
}

int chk(int n){
   int g;
   if(n==2) return 2;
   if (n<8){
      if(n%2==1){ g=0;
      } else { g=1;}
   } else {
      if(n%2==0){g=0;
      } else { g=1;}
   }

   return g; 
}   ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$2, %ecx
	je	.L2
	cmpl	$7, %ecx
	jle	.L21
	andl	$1, %ecx
.L4:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L7
.L10:
	movl	%eax, %edx
	andl	$1, %edx
	cmpl	$7, %eax
	jg	.L6
	cltd
	movl	$2, %esi
	idivl	%esi
	subl	$1, %edx
	setne	%dl
	movzbl	%dl, %edx
.L6:
	cmpl	%ecx, %edx
	je	.L9
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%ecx, %eax
	movl	$2, %esi
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	subl	$1, %edx
	setne	%cl
	jmp	.L4
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	chk
	.type	chk, @function
chk:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L26
	movl	%edi, %eax
	andl	$1, %eax
	cmpl	$7, %edi
	jg	.L23
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%eax, %edi
	andl	$1, %edi
	subl	%eax, %edi
	xorl	%eax, %eax
	cmpl	$1, %edi
	setne	%al
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$2, %eax
.L23:
	ret
	.cfi_endproc
.LFE24:
	.size	chk, .-chk
	.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	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$2, %ecx
	je	.L2
	cmpl	$7, %ecx
	jle	.L21
	andl	$1, %ecx
.L4:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L7
.L10:
	movl	%eax, %edx
	andl	$1, %edx
	cmpl	$7, %eax
	jg	.L6
	cltd
	movl	$2, %esi
	idivl	%esi
	subl	$1, %edx
	setne	%dl
	movzbl	%dl, %edx
.L6:
	cmpl	%ecx, %edx
	je	.L9
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%ecx, %eax
	movl	$2, %esi
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	subl	$1, %edx
	setne	%cl
	jmp	.L4
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	chk
	.type	chk, @function
chk:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L26
	movl	%edi, %eax
	andl	$1, %eax
	cmpl	$7, %edi
	jg	.L23
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%eax, %edi
	andl	$1, %edi
	subl	%eax, %edi
	xorl	%eax, %eax
	cmpl	$1, %edi
	setne	%al
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$2, %eax
.L23:
	ret
	.cfi_endproc
.LFE24:
	.size	chk, .-chk
	.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	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$2, %ecx
	je	.L2
	cmpl	$7, %ecx
	jle	.L21
	andl	$1, %ecx
.L4:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L7
.L10:
	movl	%eax, %edx
	andl	$1, %edx
	cmpl	$7, %eax
	jg	.L6
	cltd
	movl	$2, %esi
	idivl	%esi
	subl	$1, %edx
	setne	%dl
	movzbl	%dl, %edx
.L6:
	cmpl	%ecx, %edx
	je	.L9
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%ecx, %eax
	movl	$2, %esi
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	subl	$1, %edx
	setne	%cl
	jmp	.L4
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	chk
	.type	chk, @function
chk:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L26
	movl	%edi, %eax
	andl	$1, %eax
	cmpl	$7, %edi
	jg	.L23
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%eax, %edi
	andl	$1, %edi
	subl	%eax, %edi
	xorl	%eax, %eax
	cmpl	$1, %edi
	setne	%al
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$2, %eax
.L23:
	ret
	.cfi_endproc
.LFE24:
	.size	chk, .-chk
	.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 chk(int);

int main(void){
   int x,y,xg,yg;
   scanf("%d%d",&x,&y);

   xg = chk(x); yg = chk(y);
   if(xg==yg){
      printf("Yes\n");
   } else {
      printf("No\n");
   }

   return 0;
}

int chk(int n){
   int g;
   if(n==2) return 2;
   if (n<8){
      if(n%2==1){ g=0;
      } else { g=1;}
   } else {
      if(n%2==0){g=0;
      } else { g=1;}
   }

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

```c
#include <stdio.h>                                                              

int chk(int);

int main(void){
   int x,y,xg,yg;
   scanf("%d%d",&x,&y);

   xg = chk(x); yg = chk(y);
   if(xg==yg){
      printf("Yes\n");
   } else {
      printf("No\n");
   }

   return 0;
}

int chk(int n){
   int g;
   if(n==2) return 2;
   if (n<8){
      if(n%2==1){ g=0;
      } else { g=1;}
   } else {
      if(n%2==0){g=0;
      } else { g=1;}
   }

   return g; 
}   ```

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:

2 8
 1 10
 1 4
 2 3
 2 10
 4 3
 7 3
 7 6
 7 4
 7 5

No
 Yes
 No
 No
 No
 No
 Yes
 No
 No
 Yes

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 chk(int);

int main(void){
   int x,y,xg,yg;
   scanf("%d%d",&x,&y);

   xg = chk(x); yg = chk(y);
   if(xg==yg){
      printf("Yes\n");
   } else {
      printf("No\n");
   }

   return 0;
}

int chk(int n){
   int g;
   if(n==2) return 2;
   if (n<8){
      if(n%2==1){ g=0;
      } else { g=1;}
   } else {
      if(n%2==0){g=0;
      } else { g=1;}
   }

   return g; 
}   ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$2, %ecx
	je	.L2
	cmpl	$7, %ecx
	jle	.L21
	andl	$1, %ecx
.L4:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L7
.L10:
	movl	%eax, %edx
	andl	$1, %edx
	cmpl	$7, %eax
	jg	.L6
	cltd
	movl	$2, %esi
	idivl	%esi
	subl	$1, %edx
	setne	%dl
	movzbl	%dl, %edx
.L6:
	cmpl	%ecx, %edx
	je	.L9
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%ecx, %eax
	movl	$2, %esi
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	subl	$1, %edx
	setne	%cl
	jmp	.L4
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	chk
	.type	chk, @function
chk:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L26
	movl	%edi, %eax
	andl	$1, %eax
	cmpl	$7, %edi
	jg	.L23
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%eax, %edi
	andl	$1, %edi
	subl	%eax, %edi
	xorl	%eax, %eax
	cmpl	$1, %edi
	setne	%al
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$2, %eax
.L23:
	ret
	.cfi_endproc
.LFE24:
	.size	chk, .-chk
	.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	"%d%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	cmpl	$2, %ecx
	je	.L2
	cmpl	$7, %ecx
	jle	.L21
	andl	$1, %ecx
.L4:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	je	.L7
.L10:
	movl	%eax, %edx
	andl	$1, %edx
	cmpl	$7, %eax
	jg	.L6
	cltd
	movl	$2, %esi
	idivl	%esi
	subl	$1, %edx
	setne	%dl
	movzbl	%dl, %edx
.L6:
	cmpl	%ecx, %edx
	je	.L9
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L8:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L21:
	.cfi_restore_state
	movl	%ecx, %eax
	movl	$2, %esi
	xorl	%ecx, %ecx
	cltd
	idivl	%esi
	subl	$1, %edx
	setne	%cl
	jmp	.L4
.L2:
	movl	4(%rsp), %eax
	cmpl	$2, %eax
	jne	.L10
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	chk
	.type	chk, @function
chk:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L26
	movl	%edi, %eax
	andl	$1, %eax
	cmpl	$7, %edi
	jg	.L23
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%eax, %edi
	andl	$1, %edi
	subl	%eax, %edi
	xorl	%eax, %eax
	cmpl	$1, %edi
	setne	%al
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$2, %eax
.L23:
	ret
	.cfi_endproc
.LFE24:
	.size	chk, .-chk
	.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:
```