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

```c
/*
AizuOnline A2418
Title Problem B War II
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N,T,L,H;
int ten[101];
int hund[101];
int stor_ten;
int stor_hund;
int zan;
int player;
int change;
//
void juice()
{
#ifdef DEBUG
        printf("juice\n");
#endif
}

void init()
{
        stor_ten=T;
        stor_hund=H;
}
int ins_coin(int p)
{
        if(ten[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 10 YES\n");
#endif
                ten[p]--;
                stor_ten++;
                zan += 10;
        }
        else if(hund[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 100 YES\n");
#endif
                hund[p]--;
                stor_hund++;
                zan += 100;
        }
        else
        {
#ifdef DEBUG
                printf("PLAYER HAS NO COIN\n");
#endif                
                return(-1);  //NO coin >> WIN
        }
        if(stor_ten > L) // 10 YES UPPER LIMIT
        {
#ifdef DEBUG
                printf("MORE THAN 10 YEN STORAGE\n");
#endif                
                return(-1);
        }
        if(zan >= 90) //eq or more than juice price
        {
                juice();
                change = (zan - 90)/10;
                if(change > stor_ten)    // cannot return change
                {
#ifdef DEBUG
                        printf("CHANGE (%d)SHORTAGE \n",change);
#endif
                        return(-1);
                }
                stor_ten -= change;
                ten[p] += change;
                zan=0;
        }
        return(0);
}
main()
{
        int i,ret;

        scanf("%d %d %d %d",&N,&T,&H,&L);
        for(i=1;i<=N;i++)
                scanf("%d %d",&ten[i],&hund[i]);
        init();
        player=1;
        while(1)
        {
#ifdef DEBUG
                printf("PLAYER %d TURN\n",player);
#endif
                ret=ins_coin(player);

                if(ret)
                        break;
                player++;
                if(player>N)player=1;
        }

        printf("%d\n",player);




return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	ten
	.align 32
	.type	ten, @object
	.size	ten, 404
ten:
	.zero	404
	.globl	hund
	.align 32
	.type	hund, @object
	.size	hund, 404
hund:
	.zero	404
	.globl	stor_ten
	.align 4
	.type	stor_ten, @object
	.size	stor_ten, 4
stor_ten:
	.zero	4
	.globl	stor_hund
	.align 4
	.type	stor_hund, @object
	.size	stor_hund, 4
stor_hund:
	.zero	4
	.globl	zan
	.align 4
	.type	zan, @object
	.size	zan, 4
zan:
	.zero	4
	.globl	player
	.align 4
	.type	player, @object
	.size	player, 4
player:
	.zero	4
	.globl	change
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.text
	.globl	juice
	.type	juice, @function
juice:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	juice, .-juice
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	T(%rip), %eax
	movl	%eax, stor_ten(%rip)
	movl	H(%rip), %eax
	movl	%eax, stor_hund(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	ins_coin
	.type	ins_coin, @function
ins_coin:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_ten(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_ten(%rip)
	movl	zan(%rip), %eax
	addl	$10, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_hund(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_hund(%rip)
	movl	zan(%rip), %eax
	addl	$100, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L6:
	movl	$-1, %eax
	jmp	.L7
.L5:
	movl	stor_ten(%rip), %edx
	movl	L(%rip), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	$-1, %eax
	jmp	.L7
.L8:
	movl	zan(%rip), %eax
	cmpl	$89, %eax
	jle	.L9
	movl	$0, %eax
	call	juice
	movl	zan(%rip), %eax
	subl	$90, %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
	movl	%eax, change(%rip)
	movl	change(%rip), %edx
	movl	stor_ten(%rip), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$-1, %eax
	jmp	.L7
.L10:
	movl	stor_ten(%rip), %eax
	movl	change(%rip), %edx
	subl	%edx, %eax
	movl	%eax, stor_ten(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	change(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	$0, zan(%rip)
.L9:
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ins_coin, .-ins_coin
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	L(%rip), %r8
	leaq	H(%rip), %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ten(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L12:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L13
	movl	$0, %eax
	call	init
	movl	$1, player(%rip)
.L17:
	movl	player(%rip), %eax
	movl	%eax, %edi
	call	ins_coin
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	player(%rip), %eax
	addl	$1, %eax
	movl	%eax, player(%rip)
	movl	player(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L17
	movl	$1, player(%rip)
	jmp	.L17
.L20:
	nop
	movl	player(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	juice
	.type	juice, @function
juice:
.LFB23:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE23:
	.size	juice, .-juice
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB24:
	.cfi_startproc
	endbr64
	movl	T(%rip), %eax
	movl	%eax, stor_ten(%rip)
	movl	H(%rip), %eax
	movl	%eax, stor_hund(%rip)
	ret
	.cfi_endproc
.LFE24:
	.size	init, .-init
	.p2align 4
	.globl	ins_coin
	.type	ins_coin, @function
ins_coin:
.LFB25:
	.cfi_startproc
	endbr64
	leaq	ten(%rip), %rsi
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %ecx
	testl	%ecx, %ecx
	je	.L5
	movl	stor_ten(%rip), %eax
	subl	$1, %ecx
	movl	%ecx, (%rsi,%rdi,4)
	leal	1(%rax), %edx
	movl	zan(%rip), %eax
	movl	%edx, stor_ten(%rip)
	addl	$10, %eax
	movl	%eax, zan(%rip)
.L6:
	cmpl	%edx, L(%rip)
	jl	.L9
	xorl	%r8d, %r8d
	cmpl	$89, %eax
	jle	.L4
	subl	$90, %eax
	movl	$3435973837, %r9d
	imulq	%r9, %rax
	shrq	$35, %rax
	movl	%eax, change(%rip)
	cmpl	%edx, %eax
	jg	.L9
	movl	$0, zan(%rip)
	subl	%eax, %edx
	addl	%ecx, %eax
	movl	%edx, stor_ten(%rip)
	movl	%eax, (%rsi,%rdi,4)
.L4:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	hund(%rip), %rdx
	movl	(%rdx,%rdi,4), %eax
	testl	%eax, %eax
	je	.L9
	subl	$1, %eax
	addl	$1, stor_hund(%rip)
	movl	%eax, (%rdx,%rdi,4)
	movl	zan(%rip), %eax
	movl	stor_ten(%rip), %edx
	addl	$100, %eax
	movl	%eax, zan(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$-1, %r8d
	jmp	.L4
	.cfi_endproc
.LFE25:
	.size	ins_coin, .-ins_coin
	.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:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	L(%rip), %r8
	xorl	%eax, %eax
	leaq	H(%rip), %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	T(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %rdi
	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
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L12
	movl	$4, %ebp
	movl	$1, %r15d
	leaq	hund(%rip), %r14
	leaq	ten(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%r14,%rbp), %rdx
	leaq	0(%r13,%rbp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r8d
	addl	$1, %r15d
	addq	$4, %rbp
	cmpl	%r15d, %r8d
	jge	.L13
.L12:
	movl	T(%rip), %esi
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%r11d, %r11d
	movl	H(%rip), %r9d
	movl	zan(%rip), %ecx
	movl	$1, player(%rip)
	xorl	%r13d, %r13d
	movl	%esi, stor_ten(%rip)
	movl	L(%rip), %r12d
	leaq	hund(%rip), %rbp
	movl	%r9d, stor_hund(%rip)
.L30:
	leaq	4+ten(%rip), %rdx
	movl	$1, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L73:
	subl	$1, %edi
	addl	$1, %esi
	addl	$10, %ecx
	movl	$1, %r11d
	movl	%edi, (%rdx)
	cmpl	%esi, %r12d
	jl	.L72
.L23:
	cmpl	$89, %ecx
	jle	.L28
	leal	-90(%rcx), %ebx
	movl	$3435973837, %edi
	imulq	%rdi, %rbx
	shrq	$35, %rbx
	cmpl	%esi, %ebx
	jg	.L71
	addl	%ebx, (%rdx)
	subl	%ebx, %esi
	movl	$1, %r15d
	xorl	%ecx, %ecx
	movl	$1, %r11d
.L28:
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, %r13d
	cmpl	%eax, %r8d
	jl	.L30
.L31:
	movl	(%rdx), %edi
	movl	%eax, %r10d
	testl	%edi, %edi
	jne	.L73
	movl	0(%rbp,%rax,4), %edi
	testl	%edi, %edi
	je	.L74
	subl	$1, %edi
	addl	$1, %r9d
	addl	$100, %ecx
	movl	$1, %r14d
	movl	%edi, 0(%rbp,%rax,4)
	cmpl	%esi, %r12d
	jge	.L23
.L72:
	testb	%r15b, %r15b
	je	.L24
.L71:
	movl	%ebx, change(%rip)
.L24:
	testb	%r14b, %r14b
	je	.L32
	movl	%r9d, stor_hund(%rip)
.L32:
	movl	%ecx, zan(%rip)
	testb	%r11b, %r11b
	je	.L33
	movl	%esi, stor_ten(%rip)
.L33:
	testb	%r13b, %r13b
	je	.L22
.L68:
	movl	%r10d, player(%rip)
.L22:
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L74:
	.cfi_restore_state
	testb	%r15b, %r15b
	je	.L17
	movl	%ebx, change(%rip)
.L17:
	testb	%r14b, %r14b
	je	.L18
	movl	%r9d, stor_hund(%rip)
.L18:
	testb	%r13b, %r13b
	je	.L19
	movl	%ecx, zan(%rip)
	testb	%r11b, %r11b
	je	.L68
	movl	%esi, stor_ten(%rip)
	jmp	.L68
.L19:
	testb	%r11b, %r11b
	je	.L22
	movl	%esi, stor_ten(%rip)
	jmp	.L22
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	change
	.bss
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.globl	player
	.align 4
	.type	player, @object
	.size	player, 4
player:
	.zero	4
	.globl	zan
	.align 4
	.type	zan, @object
	.size	zan, 4
zan:
	.zero	4
	.globl	stor_hund
	.align 4
	.type	stor_hund, @object
	.size	stor_hund, 4
stor_hund:
	.zero	4
	.globl	stor_ten
	.align 4
	.type	stor_ten, @object
	.size	stor_ten, 4
stor_ten:
	.zero	4
	.globl	hund
	.align 32
	.type	hund, @object
	.size	hund, 404
hund:
	.zero	404
	.globl	ten
	.align 32
	.type	ten, @object
	.size	ten, 404
ten:
	.zero	404
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	juice
	.type	juice, @function
juice:
.LFB23:
	.cfi_startproc
	endbr64
	ret
	.cfi_endproc
.LFE23:
	.size	juice, .-juice
	.p2align 4
	.globl	init
	.type	init, @function
init:
.LFB24:
	.cfi_startproc
	endbr64
	movl	T(%rip), %eax
	movl	%eax, stor_ten(%rip)
	movl	H(%rip), %eax
	movl	%eax, stor_hund(%rip)
	ret
	.cfi_endproc
.LFE24:
	.size	init, .-init
	.p2align 4
	.globl	ins_coin
	.type	ins_coin, @function
ins_coin:
.LFB25:
	.cfi_startproc
	endbr64
	leaq	ten(%rip), %rsi
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %ecx
	testl	%ecx, %ecx
	je	.L5
	movl	stor_ten(%rip), %eax
	subl	$1, %ecx
	movl	%ecx, (%rsi,%rdi,4)
	leal	1(%rax), %edx
	movl	zan(%rip), %eax
	movl	%edx, stor_ten(%rip)
	addl	$10, %eax
	movl	%eax, zan(%rip)
.L6:
	cmpl	%edx, L(%rip)
	jl	.L9
	xorl	%r8d, %r8d
	cmpl	$89, %eax
	jle	.L4
	subl	$90, %eax
	movl	$3435973837, %r9d
	imulq	%r9, %rax
	shrq	$35, %rax
	movl	%eax, change(%rip)
	cmpl	%edx, %eax
	jg	.L9
	movl	$0, zan(%rip)
	subl	%eax, %edx
	addl	%ecx, %eax
	movl	%edx, stor_ten(%rip)
	movl	%eax, (%rsi,%rdi,4)
.L4:
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	hund(%rip), %rdx
	movl	(%rdx,%rdi,4), %eax
	testl	%eax, %eax
	je	.L9
	subl	$1, %eax
	addl	$1, stor_hund(%rip)
	movl	%eax, (%rdx,%rdi,4)
	movl	zan(%rip), %eax
	movl	stor_ten(%rip), %edx
	addl	$100, %eax
	movl	%eax, zan(%rip)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$-1, %r8d
	jmp	.L4
	.cfi_endproc
.LFE25:
	.size	ins_coin, .-ins_coin
	.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:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	L(%rip), %r8
	xorl	%eax, %eax
	leaq	H(%rip), %rcx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	T(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %rdi
	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
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r8d
	testl	%r8d, %r8d
	jle	.L12
	movl	$4, %ebp
	movl	$1, %r15d
	leaq	hund(%rip), %r14
	leaq	ten(%rip), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L13:
	leaq	(%r14,%rbp), %rdx
	leaq	0(%r13,%rbp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	N(%rip), %r8d
	addl	$1, %r15d
	addq	$4, %rbp
	cmpl	%r15d, %r8d
	jge	.L13
.L12:
	movl	T(%rip), %esi
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%r11d, %r11d
	movl	H(%rip), %r9d
	movl	zan(%rip), %ecx
	movl	$1, player(%rip)
	xorl	%r13d, %r13d
	movl	%esi, stor_ten(%rip)
	movl	L(%rip), %r12d
	leaq	hund(%rip), %rbp
	movl	%r9d, stor_hund(%rip)
.L30:
	leaq	4+ten(%rip), %rdx
	movl	$1, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L73:
	subl	$1, %edi
	addl	$1, %esi
	addl	$10, %ecx
	movl	$1, %r11d
	movl	%edi, (%rdx)
	cmpl	%esi, %r12d
	jl	.L72
.L23:
	cmpl	$89, %ecx
	jle	.L28
	leal	-90(%rcx), %ebx
	movl	$3435973837, %edi
	imulq	%rdi, %rbx
	shrq	$35, %rbx
	cmpl	%esi, %ebx
	jg	.L71
	addl	%ebx, (%rdx)
	subl	%ebx, %esi
	movl	$1, %r15d
	xorl	%ecx, %ecx
	movl	$1, %r11d
.L28:
	addq	$1, %rax
	addq	$4, %rdx
	movl	$1, %r13d
	cmpl	%eax, %r8d
	jl	.L30
.L31:
	movl	(%rdx), %edi
	movl	%eax, %r10d
	testl	%edi, %edi
	jne	.L73
	movl	0(%rbp,%rax,4), %edi
	testl	%edi, %edi
	je	.L74
	subl	$1, %edi
	addl	$1, %r9d
	addl	$100, %ecx
	movl	$1, %r14d
	movl	%edi, 0(%rbp,%rax,4)
	cmpl	%esi, %r12d
	jge	.L23
.L72:
	testb	%r15b, %r15b
	je	.L24
.L71:
	movl	%ebx, change(%rip)
.L24:
	testb	%r14b, %r14b
	je	.L32
	movl	%r9d, stor_hund(%rip)
.L32:
	movl	%ecx, zan(%rip)
	testb	%r11b, %r11b
	je	.L33
	movl	%esi, stor_ten(%rip)
.L33:
	testb	%r13b, %r13b
	je	.L22
.L68:
	movl	%r10d, player(%rip)
.L22:
	movl	%r10d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L74:
	.cfi_restore_state
	testb	%r15b, %r15b
	je	.L17
	movl	%ebx, change(%rip)
.L17:
	testb	%r14b, %r14b
	je	.L18
	movl	%r9d, stor_hund(%rip)
.L18:
	testb	%r13b, %r13b
	je	.L19
	movl	%ecx, zan(%rip)
	testb	%r11b, %r11b
	je	.L68
	movl	%esi, stor_ten(%rip)
	jmp	.L68
.L19:
	testb	%r11b, %r11b
	je	.L22
	movl	%esi, stor_ten(%rip)
	jmp	.L22
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	change
	.bss
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.globl	player
	.align 4
	.type	player, @object
	.size	player, 4
player:
	.zero	4
	.globl	zan
	.align 4
	.type	zan, @object
	.size	zan, 4
zan:
	.zero	4
	.globl	stor_hund
	.align 4
	.type	stor_hund, @object
	.size	stor_hund, 4
stor_hund:
	.zero	4
	.globl	stor_ten
	.align 4
	.type	stor_ten, @object
	.size	stor_ten, 4
stor_ten:
	.zero	4
	.globl	hund
	.align 32
	.type	hund, @object
	.size	hund, 404
hund:
	.zero	404
	.globl	ten
	.align 32
	.type	ten, @object
	.size	ten, 404
ten:
	.zero	404
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:

/*
AizuOnline A2418
Title Problem B War II
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N,T,L,H;
int ten[101];
int hund[101];
int stor_ten;
int stor_hund;
int zan;
int player;
int change;
//
void juice()
{
#ifdef DEBUG
        printf("juice\n");
#endif
}

void init()
{
        stor_ten=T;
        stor_hund=H;
}
int ins_coin(int p)
{
        if(ten[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 10 YES\n");
#endif
                ten[p]--;
                stor_ten++;
                zan += 10;
        }
        else if(hund[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 100 YES\n");
#endif
                hund[p]--;
                stor_hund++;
                zan += 100;
        }
        else
        {
#ifdef DEBUG
                printf("PLAYER HAS NO COIN\n");
#endif                
                return(-1);  //NO coin >> WIN
        }
        if(stor_ten > L) // 10 YES UPPER LIMIT
        {
#ifdef DEBUG
                printf("MORE THAN 10 YEN STORAGE\n");
#endif                
                return(-1);
        }
        if(zan >= 90) //eq or more than juice price
        {
                juice();
                change = (zan - 90)/10;
                if(change > stor_ten)    // cannot return change
                {
#ifdef DEBUG
                        printf("CHANGE (%d)SHORTAGE \n",change);
#endif
                        return(-1);
                }
                stor_ten -= change;
                ten[p] += change;
                zan=0;
        }
        return(0);
}
main()
{
        int i,ret;

        scanf("%d %d %d %d",&N,&T,&H,&L);
        for(i=1;i<=N;i++)
                scanf("%d %d",&ten[i],&hund[i]);
        init();
        player=1;
        while(1)
        {
#ifdef DEBUG
                printf("PLAYER %d TURN\n",player);
#endif
                ret=ins_coin(player);

                if(ret)
                        break;
                player++;
                if(player>N)player=1;
        }

        printf("%d\n",player);




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
 4
 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
/*
AizuOnline A2418
Title Problem B War II
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int N,T,L,H;
int ten[101];
int hund[101];
int stor_ten;
int stor_hund;
int zan;
int player;
int change;
//
void juice()
{
#ifdef DEBUG
        printf("juice\n");
#endif
}

void init()
{
        stor_ten=T;
        stor_hund=H;
}
int ins_coin(int p)
{
        if(ten[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 10 YES\n");
#endif
                ten[p]--;
                stor_ten++;
                zan += 10;
        }
        else if(hund[p])
        {
#ifdef DEBUG
                printf("PLAYER PAYS 100 YES\n");
#endif
                hund[p]--;
                stor_hund++;
                zan += 100;
        }
        else
        {
#ifdef DEBUG
                printf("PLAYER HAS NO COIN\n");
#endif                
                return(-1);  //NO coin >> WIN
        }
        if(stor_ten > L) // 10 YES UPPER LIMIT
        {
#ifdef DEBUG
                printf("MORE THAN 10 YEN STORAGE\n");
#endif                
                return(-1);
        }
        if(zan >= 90) //eq or more than juice price
        {
                juice();
                change = (zan - 90)/10;
                if(change > stor_ten)    // cannot return change
                {
#ifdef DEBUG
                        printf("CHANGE (%d)SHORTAGE \n",change);
#endif
                        return(-1);
                }
                stor_ten -= change;
                ten[p] += change;
                zan=0;
        }
        return(0);
}
main()
{
        int i,ret;

        scanf("%d %d %d %d",&N,&T,&H,&L);
        for(i=1;i<=N;i++)
                scanf("%d %d",&ten[i],&hund[i]);
        init();
        player=1;
        while(1)
        {
#ifdef DEBUG
                printf("PLAYER %d TURN\n",player);
#endif
                ret=ins_coin(player);

                if(ret)
                        break;
                player++;
                if(player>N)player=1;
        }

        printf("%d\n",player);




return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	ten
	.align 32
	.type	ten, @object
	.size	ten, 404
ten:
	.zero	404
	.globl	hund
	.align 32
	.type	hund, @object
	.size	hund, 404
hund:
	.zero	404
	.globl	stor_ten
	.align 4
	.type	stor_ten, @object
	.size	stor_ten, 4
stor_ten:
	.zero	4
	.globl	stor_hund
	.align 4
	.type	stor_hund, @object
	.size	stor_hund, 4
stor_hund:
	.zero	4
	.globl	zan
	.align 4
	.type	zan, @object
	.size	zan, 4
zan:
	.zero	4
	.globl	player
	.align 4
	.type	player, @object
	.size	player, 4
player:
	.zero	4
	.globl	change
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.text
	.globl	juice
	.type	juice, @function
juice:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	juice, .-juice
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	T(%rip), %eax
	movl	%eax, stor_ten(%rip)
	movl	H(%rip), %eax
	movl	%eax, stor_hund(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	ins_coin
	.type	ins_coin, @function
ins_coin:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_ten(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_ten(%rip)
	movl	zan(%rip), %eax
	addl	$10, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_hund(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_hund(%rip)
	movl	zan(%rip), %eax
	addl	$100, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L6:
	movl	$-1, %eax
	jmp	.L7
.L5:
	movl	stor_ten(%rip), %edx
	movl	L(%rip), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	$-1, %eax
	jmp	.L7
.L8:
	movl	zan(%rip), %eax
	cmpl	$89, %eax
	jle	.L9
	movl	$0, %eax
	call	juice
	movl	zan(%rip), %eax
	subl	$90, %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
	movl	%eax, change(%rip)
	movl	change(%rip), %edx
	movl	stor_ten(%rip), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$-1, %eax
	jmp	.L7
.L10:
	movl	stor_ten(%rip), %eax
	movl	change(%rip), %edx
	subl	%edx, %eax
	movl	%eax, stor_ten(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	change(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	$0, zan(%rip)
.L9:
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ins_coin, .-ins_coin
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	L(%rip), %r8
	leaq	H(%rip), %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ten(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L12:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L13
	movl	$0, %eax
	call	init
	movl	$1, player(%rip)
.L17:
	movl	player(%rip), %eax
	movl	%eax, %edi
	call	ins_coin
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	player(%rip), %eax
	addl	$1, %eax
	movl	%eax, player(%rip)
	movl	player(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L17
	movl	$1, player(%rip)
	jmp	.L17
.L20:
	nop
	movl	player(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	T
	.align 4
	.type	T, @object
	.size	T, 4
T:
	.zero	4
	.globl	L
	.align 4
	.type	L, @object
	.size	L, 4
L:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	ten
	.align 32
	.type	ten, @object
	.size	ten, 404
ten:
	.zero	404
	.globl	hund
	.align 32
	.type	hund, @object
	.size	hund, 404
hund:
	.zero	404
	.globl	stor_ten
	.align 4
	.type	stor_ten, @object
	.size	stor_ten, 4
stor_ten:
	.zero	4
	.globl	stor_hund
	.align 4
	.type	stor_hund, @object
	.size	stor_hund, 4
stor_hund:
	.zero	4
	.globl	zan
	.align 4
	.type	zan, @object
	.size	zan, 4
zan:
	.zero	4
	.globl	player
	.align 4
	.type	player, @object
	.size	player, 4
player:
	.zero	4
	.globl	change
	.align 4
	.type	change, @object
	.size	change, 4
change:
	.zero	4
	.text
	.globl	juice
	.type	juice, @function
juice:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	juice, .-juice
	.globl	init
	.type	init, @function
init:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	T(%rip), %eax
	movl	%eax, stor_ten(%rip)
	movl	H(%rip), %eax
	movl	%eax, stor_hund(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	init, .-init
	.globl	ins_coin
	.type	ins_coin, @function
ins_coin:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$8, %rsp
	movl	%edi, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_ten(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_ten(%rip)
	movl	zan(%rip), %eax
	addl	$10, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L6
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	-1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	stor_hund(%rip), %eax
	addl	$1, %eax
	movl	%eax, stor_hund(%rip)
	movl	zan(%rip), %eax
	addl	$100, %eax
	movl	%eax, zan(%rip)
	jmp	.L5
.L6:
	movl	$-1, %eax
	jmp	.L7
.L5:
	movl	stor_ten(%rip), %edx
	movl	L(%rip), %eax
	cmpl	%eax, %edx
	jle	.L8
	movl	$-1, %eax
	jmp	.L7
.L8:
	movl	zan(%rip), %eax
	cmpl	$89, %eax
	jle	.L9
	movl	$0, %eax
	call	juice
	movl	zan(%rip), %eax
	subl	$90, %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
	movl	%eax, change(%rip)
	movl	change(%rip), %edx
	movl	stor_ten(%rip), %eax
	cmpl	%eax, %edx
	jle	.L10
	movl	$-1, %eax
	jmp	.L7
.L10:
	movl	stor_ten(%rip), %eax
	movl	change(%rip), %edx
	subl	%edx, %eax
	movl	%eax, stor_ten(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	change(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	ten(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	$0, zan(%rip)
.L9:
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ins_coin, .-ins_coin
	.section	.rodata
.LC0:
	.string	"%d %d %d %d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	L(%rip), %r8
	leaq	H(%rip), %rax
	movq	%rax, %rcx
	leaq	T(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -8(%rbp)
	jmp	.L12
.L13:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	hund(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	ten(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -8(%rbp)
.L12:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L13
	movl	$0, %eax
	call	init
	movl	$1, player(%rip)
.L17:
	movl	player(%rip), %eax
	movl	%eax, %edi
	call	ins_coin
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L20
	movl	player(%rip), %eax
	addl	$1, %eax
	movl	%eax, player(%rip)
	movl	player(%rip), %edx
	movl	N(%rip), %eax
	cmpl	%eax, %edx
	jle	.L17
	movl	$1, player(%rip)
	jmp	.L17
.L20:
	nop
	movl	player(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
