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>

void func1(int n);

int main(void) {
  int n;
  scanf("%d", &n);
  while(n >= 10) {
    if(n < 100) {
      n %= 10;
    } else if(n < 1000) {
      n %= 100;
    }
  }
  func1(n);
  return 0;
}

void func1(int n) {
  if(n == 2 || n == 4 || n == 5 || n == 7 || n == 9) {
    printf("hon");
  } else if(n == 0 || n == 1 || n == 6 || n == 8) {
    printf("pon");
  } else {
    printf("bon");
  }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hon"
.LC1:
	.string	"pon"
.LC2:
	.string	"bon"
	.text
	.p2align 4
	.globl	func1
	.type	func1, @function
func1:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$9, %edi
	ja	.L2
	movl	$1, %eax
	movl	%edi, %ecx
	salq	%cl, %rax
	testl	$692, %eax
	jne	.L3
	testl	$323, %eax
	je	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE24:
	.size	func1, .-func1
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.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	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	cmpl	$9, %edi
	jle	.L7
.L10:
	cmpl	$99, %edi
	jg	.L8
	movl	%edi, %eax
	movl	$3435973837, %edx
	imulq	%rdx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edi
	movl	%edi, 4(%rsp)
.L7:
	call	func1
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$999, %edi
	jg	.L9
	movl	%edi, %eax
	imulq	$1374389535, %rax, %rax
	shrq	$37, %rax
	imull	$100, %eax, %eax
	subl	%eax, %edi
	cmpl	$9, %edi
	jg	.L10
	movl	%edi, 4(%rsp)
	jmp	.L7
.L9:
	jmp	.L9
.L19:
	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	"hon"
.LC1:
	.string	"pon"
.LC2:
	.string	"bon"
	.text
	.p2align 4
	.globl	func1
	.type	func1, @function
func1:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$9, %edi
	ja	.L2
	movl	$1, %eax
	movl	%edi, %ecx
	salq	%cl, %rax
	testl	$692, %eax
	jne	.L3
	testl	$323, %eax
	je	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE24:
	.size	func1, .-func1
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.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	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	cmpl	$9, %edi
	jle	.L7
.L10:
	cmpl	$99, %edi
	jg	.L8
	movl	%edi, %eax
	movl	$3435973837, %edx
	imulq	%rdx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edi
	movl	%edi, 4(%rsp)
.L7:
	call	func1
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$999, %edi
	jg	.L9
	movl	%edi, %eax
	imulq	$1374389535, %rax, %rax
	shrq	$37, %rax
	imull	$100, %eax, %eax
	subl	%eax, %edi
	cmpl	$9, %edi
	jg	.L10
	movl	%edi, 4(%rsp)
	jmp	.L7
.L9:
	jmp	.L9
.L19:
	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	"hon"
.LC1:
	.string	"pon"
.LC2:
	.string	"bon"
	.text
	.p2align 4
	.globl	func1
	.type	func1, @function
func1:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$9, %edi
	ja	.L2
	movl	$1, %eax
	movl	%edi, %ecx
	salq	%cl, %rax
	testl	$692, %eax
	jne	.L3
	testl	$323, %eax
	je	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE24:
	.size	func1, .-func1
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.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	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	cmpl	$9, %edi
	jle	.L7
.L10:
	cmpl	$99, %edi
	jg	.L8
	movl	%edi, %eax
	movl	$3435973837, %edx
	imulq	%rdx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edi
	movl	%edi, 4(%rsp)
.L7:
	call	func1
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$999, %edi
	jg	.L9
	movl	%edi, %eax
	imulq	$1374389535, %rax, %rax
	shrq	$37, %rax
	imull	$100, %eax, %eax
	subl	%eax, %edi
	cmpl	$9, %edi
	jg	.L10
	movl	%edi, 4(%rsp)
	jmp	.L7
.L9:
	jmp	.L9
.L19:
	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>

void func1(int n);

int main(void) {
  int n;
  scanf("%d", &n);
  while(n >= 10) {
    if(n < 100) {
      n %= 10;
    } else if(n < 1000) {
      n %= 100;
    }
  }
  func1(n);
  return 0;
}

void func1(int n) {
  if(n == 2 || n == 4 || n == 5 || n == 7 || n == 9) {
    printf("hon");
  } else if(n == 0 || n == 1 || n == 6 || n == 8) {
    printf("pon");
  } else {
    printf("bon");
  }
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

void func1(int n);

int main(void) {
  int n;
  scanf("%d", &n);
  while(n >= 10) {
    if(n < 100) {
      n %= 10;
    } else if(n < 1000) {
      n %= 100;
    }
  }
  func1(n);
  return 0;
}

void func1(int n) {
  if(n == 2 || n == 4 || n == 5 || n == 7 || n == 9) {
    printf("hon");
  } else if(n == 0 || n == 1 || n == 6 || n == 8) {
    printf("pon");
  } else {
    printf("bon");
  }
}
```

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:

31
 4
 23
 39
 49
 6
 76
 62
 12
 58

pon hon bon hon hon pon pon hon hon pon
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>

void func1(int n);

int main(void) {
  int n;
  scanf("%d", &n);
  while(n >= 10) {
    if(n < 100) {
      n %= 10;
    } else if(n < 1000) {
      n %= 100;
    }
  }
  func1(n);
  return 0;
}

void func1(int n) {
  if(n == 2 || n == 4 || n == 5 || n == 7 || n == 9) {
    printf("hon");
  } else if(n == 0 || n == 1 || n == 6 || n == 8) {
    printf("pon");
  } else {
    printf("bon");
  }
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hon"
.LC1:
	.string	"pon"
.LC2:
	.string	"bon"
	.text
	.p2align 4
	.globl	func1
	.type	func1, @function
func1:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$9, %edi
	ja	.L2
	movl	$1, %eax
	movl	%edi, %ecx
	salq	%cl, %rax
	testl	$692, %eax
	jne	.L3
	testl	$323, %eax
	je	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE24:
	.size	func1, .-func1
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.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	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	cmpl	$9, %edi
	jle	.L7
.L10:
	cmpl	$99, %edi
	jg	.L8
	movl	%edi, %eax
	movl	$3435973837, %edx
	imulq	%rdx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edi
	movl	%edi, 4(%rsp)
.L7:
	call	func1
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$999, %edi
	jg	.L9
	movl	%edi, %eax
	imulq	$1374389535, %rax, %rax
	shrq	$37, %rax
	imull	$100, %eax, %eax
	subl	%eax, %edi
	cmpl	$9, %edi
	jg	.L10
	movl	%edi, 4(%rsp)
	jmp	.L7
.L9:
	jmp	.L9
.L19:
	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	"hon"
.LC1:
	.string	"pon"
.LC2:
	.string	"bon"
	.text
	.p2align 4
	.globl	func1
	.type	func1, @function
func1:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	$9, %edi
	ja	.L2
	movl	$1, %eax
	movl	%edi, %ecx
	salq	%cl, %rax
	testl	$692, %eax
	jne	.L3
	testl	$323, %eax
	je	.L2
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE24:
	.size	func1, .-func1
	.section	.rodata.str1.1
.LC3:
	.string	"%d"
	.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	.LC3(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %edi
	cmpl	$9, %edi
	jle	.L7
.L10:
	cmpl	$99, %edi
	jg	.L8
	movl	%edi, %eax
	movl	$3435973837, %edx
	imulq	%rdx, %rax
	shrq	$35, %rax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	subl	%eax, %edi
	movl	%edi, 4(%rsp)
.L7:
	call	func1
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L19
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmpl	$999, %edi
	jg	.L9
	movl	%edi, %eax
	imulq	$1374389535, %rax, %rax
	shrq	$37, %rax
	imull	$100, %eax, %eax
	subl	%eax, %edi
	cmpl	$9, %edi
	jg	.L10
	movl	%edi, 4(%rsp)
	jmp	.L7
.L9:
	jmp	.L9
.L19:
	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:
```