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 main(void) {
	int N;
	int t_zihanki,h_zihanki,t_max;
	int t[100],h[100];
	int i;
	int zihanki_zankin;
	scanf("%d%d%d%d",&N,&t_zihanki,&h_zihanki,&t_max);
	for(i=0;i<N;i++)scanf("%d%d",&t[i],&h[i]);
	zihanki_zankin=0;
	for(i=0;;i=(i+1)%N) {
		if(t[i]>0) {
			t[i]--;
			t_zihanki++;
			zihanki_zankin+=10;
		} else if(h[i]>0) {
			h[i]--;
			h_zihanki++;
			zihanki_zankin+=100;
		} else {
			/* player i wins : he/she has no coins */
			break;
		}
		if(t_zihanki>t_max) {
			/* player i wins : the bender is broken */
			break;
		}
		if(zihanki_zankin>=90) {
			zihanki_zankin-=90;
			if(zihanki_zankin<100) {
				if(t_zihanki>=zihanki_zankin/10) {
					t_zihanki-=zihanki_zankin/10;
					t[i]+=zihanki_zankin/10;
				} else {
					/* player i wins : change can't be paid */
					break;
				}
			} else if(t_zihanki>=zihanki_zankin/10) {
				t_zihanki-=zihanki_zankin/10;
				t[i]+=zihanki_zankin/10;
			} else if(h_zihanki>0 && t_zihanki>=zihanki_zankin/10-10) {
				/* I think the change can't be 100 yen or more */
				h_zihanki--;
				t_zihanki-=zihanki_zankin/10-10;
				h[i]++;
				t[i]+=zihanki_zankin/10-10;
			} else {
				/* player i wins : change can't be paid */
				break;
			}
			zihanki_zankin=0;
		}
	}
	printf("%d\n",i+1);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rsi
	leaq	-832(%rbp), %rcx
	leaq	-836(%rbp), %rdx
	leaq	-840(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-816(%rbp), %rcx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	movl	$0, -824(%rbp)
.L14:
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L4
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	addl	$10, -820(%rbp)
	jmp	.L5
.L4:
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L17
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-832(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	addl	$100, -820(%rbp)
.L5:
	movl	-836(%rbp), %edx
	movl	-828(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L18
	cmpl	$89, -820(%rbp)
	jle	.L9
	subl	$90, -820(%rbp)
	cmpl	$99, -820(%rbp)
	jg	.L10
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L19
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L10:
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L13:
	movl	-832(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-10(%rax), %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-832(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -832(%rbp)
	movl	-836(%rbp), %edx
	movl	-820(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$2, %ecx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	leal	-10(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	subl	$10, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L12:
	movl	$0, -820(%rbp)
.L9:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	-840(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, -824(%rbp)
	jmp	.L14
.L17:
	nop
	jmp	.L7
.L18:
	nop
	jmp	.L7
.L19:
	nop
.L7:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	416(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	movl	8(%rsp), %r11d
	movl	12(%rsp), %r10d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	movl	4(%rsp), %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	movl	$3435973837, %ebx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L40:
	subl	$1, %esi
	addl	$1, %r8d
	addl	$10, %ecx
	movl	%esi, 16(%rsp,%rdi,4)
	cmpl	%r10d, %r8d
	jg	.L39
	movl	$1, %r12d
	cmpl	$89, %ecx
	jg	.L11
.L13:
	leal	1(%rdx), %eax
	movl	$1, %r12d
	cltd
	idivl	%r9d
.L15:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %esi
	testl	%esi, %esi
	jg	.L40
	movl	416(%rsp,%rdi,4), %eax
	testl	%eax, %eax
	jle	.L14
	subl	$1, %eax
	addl	$1, %r11d
	addl	$100, %ecx
	movl	%eax, 416(%rsp,%rdi,4)
	cmpl	%r10d, %r8d
	jg	.L37
	movl	$1, %ebp
.L11:
	subl	$90, %ecx
	imulq	%rbx, %rcx
	shrq	$35, %rcx
	cmpl	%r8d, %ecx
	jg	.L14
	subl	%ecx, %r8d
	addl	%esi, %ecx
	movl	%ecx, 16(%rsp,%rdi,4)
	xorl	%ecx, %ecx
	jmp	.L13
.L14:
	testb	%bpl, %bpl
	je	.L16
.L37:
	movl	%r11d, 8(%rsp)
.L16:
	testb	%r12b, %r12b
	je	.L7
.L36:
	movl	%r8d, 4(%rsp)
.L7:
	addl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$840, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L39:
	.cfi_restore_state
	testb	%bpl, %bpl
	je	.L36
	movl	%r11d, 8(%rsp)
	jmp	.L36
.L41:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$840, %rsp
	.cfi_def_cfa_offset 880
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rcx
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	12(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	416(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	movl	8(%rsp), %r11d
	movl	12(%rsp), %r10d
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	movl	4(%rsp), %r8d
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	movl	$3435973837, %ebx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L40:
	subl	$1, %esi
	addl	$1, %r8d
	addl	$10, %ecx
	movl	%esi, 16(%rsp,%rdi,4)
	cmpl	%r10d, %r8d
	jg	.L39
	movl	$1, %r12d
	cmpl	$89, %ecx
	jg	.L11
.L13:
	leal	1(%rdx), %eax
	movl	$1, %r12d
	cltd
	idivl	%r9d
.L15:
	movslq	%edx, %rdi
	movl	16(%rsp,%rdi,4), %esi
	testl	%esi, %esi
	jg	.L40
	movl	416(%rsp,%rdi,4), %eax
	testl	%eax, %eax
	jle	.L14
	subl	$1, %eax
	addl	$1, %r11d
	addl	$100, %ecx
	movl	%eax, 416(%rsp,%rdi,4)
	cmpl	%r10d, %r8d
	jg	.L37
	movl	$1, %ebp
.L11:
	subl	$90, %ecx
	imulq	%rbx, %rcx
	shrq	$35, %rcx
	cmpl	%r8d, %ecx
	jg	.L14
	subl	%ecx, %r8d
	addl	%esi, %ecx
	movl	%ecx, 16(%rsp,%rdi,4)
	xorl	%ecx, %ecx
	jmp	.L13
.L14:
	testb	%bpl, %bpl
	je	.L16
.L37:
	movl	%r11d, 8(%rsp)
.L16:
	testb	%r12b, %r12b
	je	.L7
.L36:
	movl	%r8d, 4(%rsp)
.L7:
	addl	$1, %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$840, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L39:
	.cfi_restore_state
	testb	%bpl, %bpl
	je	.L36
	movl	%r11d, 8(%rsp)
	jmp	.L36
.L41:
	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:

#include <stdio.h>

int main(void) {
	int N;
	int t_zihanki,h_zihanki,t_max;
	int t[100],h[100];
	int i;
	int zihanki_zankin;
	scanf("%d%d%d%d",&N,&t_zihanki,&h_zihanki,&t_max);
	for(i=0;i<N;i++)scanf("%d%d",&t[i],&h[i]);
	zihanki_zankin=0;
	for(i=0;;i=(i+1)%N) {
		if(t[i]>0) {
			t[i]--;
			t_zihanki++;
			zihanki_zankin+=10;
		} else if(h[i]>0) {
			h[i]--;
			h_zihanki++;
			zihanki_zankin+=100;
		} else {
			/* player i wins : he/she has no coins */
			break;
		}
		if(t_zihanki>t_max) {
			/* player i wins : the bender is broken */
			break;
		}
		if(zihanki_zankin>=90) {
			zihanki_zankin-=90;
			if(zihanki_zankin<100) {
				if(t_zihanki>=zihanki_zankin/10) {
					t_zihanki-=zihanki_zankin/10;
					t[i]+=zihanki_zankin/10;
				} else {
					/* player i wins : change can't be paid */
					break;
				}
			} else if(t_zihanki>=zihanki_zankin/10) {
				t_zihanki-=zihanki_zankin/10;
				t[i]+=zihanki_zankin/10;
			} else if(h_zihanki>0 && t_zihanki>=zihanki_zankin/10-10) {
				/* I think the change can't be 100 yen or more */
				h_zihanki--;
				t_zihanki-=zihanki_zankin/10-10;
				h[i]++;
				t[i]+=zihanki_zankin/10-10;
			} else {
				/* player i wins : change can't be paid */
				break;
			}
			zihanki_zankin=0;
		}
	}
	printf("%d\n",i+1);
	return 0;
}
3 -1 0 100
4 0
3 0
3 0
 3 -1 0 100
4 0
5 0
3 0
 2 -1 0 100
4 0
5 -1
3 0
 5 -2 -1 011
8 0
-1 -1
6 0
 3 -1 0 100
4 0
5 -1
3 0
 3 -2 0 100
4 0
5 -1
3 0
 3 0 0 100
7 0
3 0
3 0
 3 -1 0 101
4 0
3 0
3 0
 3 -1 0 100
4 1
5 0
3 0
 3 -2 0 100
1 0
5 -1
3 0

2
 3
 1
 2
 3
 3
 2
 2
 3
 1

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 main(void) {
	int N;
	int t_zihanki,h_zihanki,t_max;
	int t[100],h[100];
	int i;
	int zihanki_zankin;
	scanf("%d%d%d%d",&N,&t_zihanki,&h_zihanki,&t_max);
	for(i=0;i<N;i++)scanf("%d%d",&t[i],&h[i]);
	zihanki_zankin=0;
	for(i=0;;i=(i+1)%N) {
		if(t[i]>0) {
			t[i]--;
			t_zihanki++;
			zihanki_zankin+=10;
		} else if(h[i]>0) {
			h[i]--;
			h_zihanki++;
			zihanki_zankin+=100;
		} else {
			/* player i wins : he/she has no coins */
			break;
		}
		if(t_zihanki>t_max) {
			/* player i wins : the bender is broken */
			break;
		}
		if(zihanki_zankin>=90) {
			zihanki_zankin-=90;
			if(zihanki_zankin<100) {
				if(t_zihanki>=zihanki_zankin/10) {
					t_zihanki-=zihanki_zankin/10;
					t[i]+=zihanki_zankin/10;
				} else {
					/* player i wins : change can't be paid */
					break;
				}
			} else if(t_zihanki>=zihanki_zankin/10) {
				t_zihanki-=zihanki_zankin/10;
				t[i]+=zihanki_zankin/10;
			} else if(h_zihanki>0 && t_zihanki>=zihanki_zankin/10-10) {
				/* I think the change can't be 100 yen or more */
				h_zihanki--;
				t_zihanki-=zihanki_zankin/10-10;
				h[i]++;
				t[i]+=zihanki_zankin/10-10;
			} else {
				/* player i wins : change can't be paid */
				break;
			}
			zihanki_zankin=0;
		}
	}
	printf("%d\n",i+1);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rsi
	leaq	-832(%rbp), %rcx
	leaq	-836(%rbp), %rdx
	leaq	-840(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-816(%rbp), %rcx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	movl	$0, -824(%rbp)
.L14:
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L4
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	addl	$10, -820(%rbp)
	jmp	.L5
.L4:
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L17
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-832(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	addl	$100, -820(%rbp)
.L5:
	movl	-836(%rbp), %edx
	movl	-828(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L18
	cmpl	$89, -820(%rbp)
	jle	.L9
	subl	$90, -820(%rbp)
	cmpl	$99, -820(%rbp)
	jg	.L10
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L19
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L10:
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L13:
	movl	-832(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-10(%rax), %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-832(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -832(%rbp)
	movl	-836(%rbp), %edx
	movl	-820(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$2, %ecx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	leal	-10(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	subl	$10, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L12:
	movl	$0, -820(%rbp)
.L9:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	-840(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, -824(%rbp)
	jmp	.L14
.L17:
	nop
	jmp	.L7
.L18:
	nop
	jmp	.L7
.L19:
	nop
.L7:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$848, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rsi
	leaq	-832(%rbp), %rcx
	leaq	-836(%rbp), %rdx
	leaq	-840(%rbp), %rax
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L2
.L3:
	leaq	-416(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-816(%rbp), %rcx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L2:
	movl	-840(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L3
	movl	$0, -820(%rbp)
	movl	$0, -824(%rbp)
.L14:
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L4
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	movl	-836(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -836(%rbp)
	addl	$10, -820(%rbp)
	jmp	.L5
.L4:
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L17
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	-1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-832(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -832(%rbp)
	addl	$100, -820(%rbp)
.L5:
	movl	-836(%rbp), %edx
	movl	-828(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L18
	cmpl	$89, -820(%rbp)
	jle	.L9
	subl	$90, -820(%rbp)
	cmpl	$99, -820(%rbp)
	jg	.L10
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L19
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L10:
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	subl	%eax, %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	movl	%edx, %ecx
	sarl	$2, %ecx
	sarl	$31, %eax
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	-836(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
	jmp	.L12
.L13:
	movl	-832(%rbp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-10(%rax), %edx
	movl	-836(%rbp), %eax
	cmpl	%eax, %edx
	jg	.L7
	movl	-832(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -832(%rbp)
	movl	-836(%rbp), %edx
	movl	-820(%rbp), %eax
	movslq	%eax, %rcx
	imulq	$1717986919, %rcx, %rcx
	shrq	$32, %rcx
	sarl	$2, %ecx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%ecx, %eax
	subl	%esi, %eax
	leal	-10(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -836(%rbp)
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %ecx
	movl	-820(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1717986919, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$2, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	subl	$10, %eax
	leal	(%rcx,%rax), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -816(%rbp,%rax,4)
.L12:
	movl	$0, -820(%rbp)
.L9:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	-840(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, -824(%rbp)
	jmp	.L14
.L17:
	nop
	jmp	.L7
.L18:
	nop
	jmp	.L7
.L19:
	nop
.L7:
	movl	-824(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
