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>
char s[110];
int p=0;
double f(double a,int b,double c){
  if(b==2)return a+c;
  if(b==3)return a-c;
  if(b==4)return a*c;
  return a/c;
}
int kobun(){
  int i,r=0,o[3];
  int n[3],a;
  char c[]={")=+-*/"};
  while(1){
    for(a=0;'0'<=s[p]&&s[p]<='9';p++)a=a*10+s[p]-'0';
    if(s[p]=='('){
      p++;
      a=kobun();
    }
    for(i=0;s[p]-c[i];i++);
    for(;r&&o[r-1]/2>=i/2;r--)a=f(n[r-1],o[r-1],a);
    n[r]=a;
    o[r++]=i;
    p++;
    if(i/2==0)return n[0];
  }
  return 0;
}
int main(){
  int n;
  for(scanf("%d",&n);n--;p=0){
    scanf("%s",s);
    printf("%d\n",kobun());
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 110
s:
	.zero	110
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movl	%edi, -12(%rbp)
	movsd	%xmm1, -24(%rbp)
	cmpl	$2, -12(%rbp)
	jne	.L2
	movsd	-8(%rbp), %xmm0
	addsd	-24(%rbp), %xmm0
	jmp	.L3
.L2:
	cmpl	$3, -12(%rbp)
	jne	.L4
	movsd	-8(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	jmp	.L3
.L4:
	cmpl	$4, -12(%rbp)
	jne	.L5
	movsd	-8(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	jmp	.L3
.L5:
	movsd	-8(%rbp), %xmm0
	divsd	-24(%rbp), %xmm0
.L3:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	kobun
	.type	kobun, @function
kobun:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -48(%rbp)
	movl	$757808425, -15(%rbp)
	movw	$12074, -11(%rbp)
	movb	$0, -9(%rbp)
.L18:
	movl	$0, -44(%rbp)
	jmp	.L7
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -44(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L8
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L9
.L8:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L10
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	kobun
	movl	%eax, -44(%rbp)
.L10:
	movl	$0, -52(%rbp)
	jmp	.L11
.L12:
	addl	$1, -52(%rbp)
.L11:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-52(%rbp), %eax
	cltq
	movzbl	-15(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L12
	jmp	.L13
.L15:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-44(%rbp), %xmm0
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %edx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-28(%rbp,%rax,4), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movl	%edx, %edi
	movq	%rax, %xmm0
	call	f
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -44(%rbp)
	subl	$1, -48(%rbp)
.L13:
	cmpl	$0, -48(%rbp)
	je	.L14
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-52(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jge	.L15
.L14:
	movl	-48(%rbp), %eax
	cltq
	movl	-44(%rbp), %edx
	movl	%edx, -28(%rbp,%rax,4)
	movl	-48(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -48(%rbp)
	cltq
	movl	-52(%rbp), %edx
	movl	%edx, -40(%rbp,%rax,4)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	ja	.L18
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kobun, .-kobun
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L22
.L23:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	kobun
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, p(%rip)
.L22:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	f
	.type	f, @function
f:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L7
	cmpl	$3, %edi
	je	.L8
	cmpl	$4, %edi
	je	.L9
	divsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	addsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	mulsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	subsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.p2align 4
	.globl	kobun
	.type	kobun, @function
kobun:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	s(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movl	p(%rip), %edi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
.L33:
	movslq	%edi, %rax
	movsbl	(%rbx,%rax), %eax
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L38
	leal	1(%rdi), %edx
	xorl	%ecx, %ecx
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rcx,%rcx,4), %ecx
	movl	%edx, %edi
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%rbx,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	jbe	.L12
.L11:
	cmpb	$40, %al
	je	.L55
	cmpb	$41, %al
	je	.L14
.L61:
	cmpb	$61, %al
	je	.L39
	cmpb	$43, %al
	je	.L40
	cmpb	$45, %al
	je	.L41
	cmpb	$42, %al
	je	.L42
	xorl	%esi, %esi
	cmpb	$47, %al
	setne	%sil
	addl	$5, %esi
.L15:
	leal	1(%rsi), %r10d
	testl	%ebp, %ebp
	je	.L44
.L35:
	leal	-1(%rbp), %r9d
	movl	%esi, %r8d
	movslq	%r9d, %rdx
	sarl	%r8d
	movl	(%rsp,%rdx,4), %r11d
	movl	%r11d, %eax
	shrl	$31, %eax
	addl	%r11d, %eax
	sarl	%eax
	cmpl	%eax, %r8d
	jg	.L45
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%rdx,4), %xmm0
	cmpl	$2, %r11d
	je	.L18
	cmpl	$3, %r11d
	je	.L19
	cmpl	$4, %r11d
	je	.L20
	divsd	%xmm1, %xmm0
.L21:
	cvttsd2sil	%xmm0, %ecx
	testl	%r9d, %r9d
	je	.L44
	leal	-2(%rbp), %r11d
	movslq	%r11d, %r13
	movl	(%rsp,%r13,4), %r12d
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	cmpl	%eax, %r8d
	jg	.L17
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%r13,4), %xmm0
	cmpl	$2, %r12d
	je	.L23
	cmpl	$3, %r12d
	je	.L24
	cmpl	$4, %r12d
	je	.L25
	divsd	%xmm1, %xmm0
.L26:
	cvttsd2sil	%xmm0, %ecx
	testl	%r11d, %r11d
	je	.L44
	subl	$3, %ebp
	movslq	%ebp, %rbp
	movl	(%rsp,%rbp,4), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	%r8d, %eax
	jl	.L56
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%rbp,4), %xmm0
	cmpl	$2, %edx
	je	.L57
	cmpl	$3, %edx
	je	.L58
	cmpl	$4, %edx
	je	.L59
	divsd	%xmm1, %xmm0
.L29:
	cvttsd2sil	%xmm0, %ecx
.L44:
	movl	$1, %ebp
	xorl	%edx, %edx
.L16:
	addl	$1, %edi
	movl	%ecx, 12(%rsp,%rdx,4)
	movl	%esi, (%rsp,%rdx,4)
	movl	%edi, p(%rip)
	cmpl	$2, %r10d
	ja	.L33
.L34:
	movl	12(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L60
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L45:
	.cfi_restore_state
	movslq	%ebp, %rdx
	movq	%rdx, %r9
.L17:
	leal	1(%r9), %ebp
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L55:
	addl	$1, %edi
	xorl	%eax, %eax
	movl	%edi, p(%rip)
	call	kobun
	movl	%eax, %ecx
	movslq	p(%rip), %rax
	movq	%rax, %rdi
	movzbl	(%rbx,%rax), %eax
	cmpb	$41, %al
	jne	.L61
.L14:
	testl	%ebp, %ebp
	je	.L62
	movl	$1, %r10d
	xorl	%esi, %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L18:
	addsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	addsd	%xmm1, %xmm0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L57:
	addsd	%xmm1, %xmm0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L19:
	subsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	subsd	%xmm1, %xmm0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$1, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L58:
	subsd	%xmm1, %xmm0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L20:
	mulsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%ecx, %ecx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$2, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	mulsd	%xmm1, %xmm0
	jmp	.L26
.L59:
	mulsd	%xmm1, %xmm0
	jmp	.L29
.L41:
	movl	$3, %esi
	jmp	.L15
.L42:
	movl	$4, %esi
	jmp	.L15
.L56:
	movslq	%r11d, %rdx
	movq	%rdx, %r9
	leal	1(%r9), %ebp
	jmp	.L16
.L62:
	addl	$1, %edi
	movl	%ecx, 12(%rsp)
	movl	%edi, p(%rip)
	jmp	.L34
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	kobun, .-kobun
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L64
	leaq	s(%rip), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	kobun
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	movl	$0, p(%rip)
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	jne	.L65
.L64:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L72:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	p
	.bss
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 110
s:
	.zero	110
	.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	f
	.type	f, @function
f:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$2, %edi
	je	.L7
	cmpl	$3, %edi
	je	.L8
	cmpl	$4, %edi
	je	.L9
	divsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	addsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	mulsd	%xmm1, %xmm0
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	subsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.p2align 4
	.globl	kobun
	.type	kobun, @function
kobun:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	s(%rip), %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movl	p(%rip), %edi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
.L33:
	movslq	%edi, %rax
	movsbl	(%rbx,%rax), %eax
	leal	-48(%rax), %edx
	cmpb	$9, %dl
	ja	.L38
	leal	1(%rdi), %edx
	xorl	%ecx, %ecx
	movslq	%edx, %rdx
	.p2align 4,,10
	.p2align 3
.L12:
	leal	(%rcx,%rcx,4), %ecx
	movl	%edx, %edi
	leal	-48(%rax,%rcx,2), %ecx
	movsbl	(%rbx,%rdx), %eax
	addq	$1, %rdx
	leal	-48(%rax), %esi
	cmpb	$9, %sil
	jbe	.L12
.L11:
	cmpb	$40, %al
	je	.L55
	cmpb	$41, %al
	je	.L14
.L61:
	cmpb	$61, %al
	je	.L39
	cmpb	$43, %al
	je	.L40
	cmpb	$45, %al
	je	.L41
	cmpb	$42, %al
	je	.L42
	xorl	%esi, %esi
	cmpb	$47, %al
	setne	%sil
	addl	$5, %esi
.L15:
	leal	1(%rsi), %r10d
	testl	%ebp, %ebp
	je	.L44
.L35:
	leal	-1(%rbp), %r9d
	movl	%esi, %r8d
	movslq	%r9d, %rdx
	sarl	%r8d
	movl	(%rsp,%rdx,4), %r11d
	movl	%r11d, %eax
	shrl	$31, %eax
	addl	%r11d, %eax
	sarl	%eax
	cmpl	%eax, %r8d
	jg	.L45
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%rdx,4), %xmm0
	cmpl	$2, %r11d
	je	.L18
	cmpl	$3, %r11d
	je	.L19
	cmpl	$4, %r11d
	je	.L20
	divsd	%xmm1, %xmm0
.L21:
	cvttsd2sil	%xmm0, %ecx
	testl	%r9d, %r9d
	je	.L44
	leal	-2(%rbp), %r11d
	movslq	%r11d, %r13
	movl	(%rsp,%r13,4), %r12d
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	cmpl	%eax, %r8d
	jg	.L17
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%r13,4), %xmm0
	cmpl	$2, %r12d
	je	.L23
	cmpl	$3, %r12d
	je	.L24
	cmpl	$4, %r12d
	je	.L25
	divsd	%xmm1, %xmm0
.L26:
	cvttsd2sil	%xmm0, %ecx
	testl	%r11d, %r11d
	je	.L44
	subl	$3, %ebp
	movslq	%ebp, %rbp
	movl	(%rsp,%rbp,4), %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cmpl	%r8d, %eax
	jl	.L56
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%ecx, %xmm1
	cvtsi2sdl	12(%rsp,%rbp,4), %xmm0
	cmpl	$2, %edx
	je	.L57
	cmpl	$3, %edx
	je	.L58
	cmpl	$4, %edx
	je	.L59
	divsd	%xmm1, %xmm0
.L29:
	cvttsd2sil	%xmm0, %ecx
.L44:
	movl	$1, %ebp
	xorl	%edx, %edx
.L16:
	addl	$1, %edi
	movl	%ecx, 12(%rsp,%rdx,4)
	movl	%esi, (%rsp,%rdx,4)
	movl	%edi, p(%rip)
	cmpl	$2, %r10d
	ja	.L33
.L34:
	movl	12(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L60
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L45:
	.cfi_restore_state
	movslq	%ebp, %rdx
	movq	%rdx, %r9
.L17:
	leal	1(%r9), %ebp
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L55:
	addl	$1, %edi
	xorl	%eax, %eax
	movl	%edi, p(%rip)
	call	kobun
	movl	%eax, %ecx
	movslq	p(%rip), %rax
	movq	%rax, %rdi
	movzbl	(%rbx,%rax), %eax
	cmpb	$41, %al
	jne	.L61
.L14:
	testl	%ebp, %ebp
	je	.L62
	movl	$1, %r10d
	xorl	%esi, %esi
	jmp	.L35
	.p2align 4,,10
	.p2align 3
.L18:
	addsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	addsd	%xmm1, %xmm0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L57:
	addsd	%xmm1, %xmm0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L19:
	subsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	subsd	%xmm1, %xmm0
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L39:
	movl	$1, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L58:
	subsd	%xmm1, %xmm0
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L20:
	mulsd	%xmm1, %xmm0
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%ecx, %ecx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$2, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	mulsd	%xmm1, %xmm0
	jmp	.L26
.L59:
	mulsd	%xmm1, %xmm0
	jmp	.L29
.L41:
	movl	$3, %esi
	jmp	.L15
.L42:
	movl	$4, %esi
	jmp	.L15
.L56:
	movslq	%r11d, %rdx
	movq	%rdx, %r9
	leal	1(%r9), %ebp
	jmp	.L16
.L62:
	addl	$1, %edi
	movl	%ecx, 12(%rsp)
	movl	%edi, p(%rip)
	jmp	.L34
.L60:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	kobun, .-kobun
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	je	.L64
	leaq	s(%rip), %r12
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L65:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	call	kobun
	movq	%rbx, %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	4(%rsp), %eax
	movl	$0, p(%rip)
	leal	-1(%rax), %edx
	movl	%edx, 4(%rsp)
	testl	%eax, %eax
	jne	.L65
.L64:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L72
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L72:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	p
	.bss
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 110
s:
	.zero	110
	.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>
char s[110];
int p=0;
double f(double a,int b,double c){
  if(b==2)return a+c;
  if(b==3)return a-c;
  if(b==4)return a*c;
  return a/c;
}
int kobun(){
  int i,r=0,o[3];
  int n[3],a;
  char c[]={")=+-*/"};
  while(1){
    for(a=0;'0'<=s[p]&&s[p]<='9';p++)a=a*10+s[p]-'0';
    if(s[p]=='('){
      p++;
      a=kobun();
    }
    for(i=0;s[p]-c[i];i++);
    for(;r&&o[r-1]/2>=i/2;r--)a=f(n[r-1],o[r-1],a);
    n[r]=a;
    o[r++]=i;
    p++;
    if(i/2==0)return n[0];
  }
  return 0;
}
int main(){
  int n;
  for(scanf("%d",&n);n--;p=0){
    scanf("%s",s);
    printf("%d\n",kobun());
  }
  return 0;
}
2
4-2*3=
8*(4+4+3)=
 2
4-2*3=
8*(4+4+2)=
 2
4-3*3=
4*(8+4+3)=
 2
4-1*3=
4*(8+4+3)=
 2
4-1+3=
4*(8+4+3)=
 2
4-2+3=
4*(8+4+3)=
 2
5-1+3=
4*(8+4+3)=
 2
3-1*3=
4*(8+4+3)=
 2
4-2+3=
4+(8+4*3)=
 2
4-2*3=
4+(8+4*3)=

-2
88
 -2
80
 -5
60
 1
60
 6
60
 5
60
 7
60
 0
60
 5
24
 -2
24

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>
char s[110];
int p=0;
double f(double a,int b,double c){
  if(b==2)return a+c;
  if(b==3)return a-c;
  if(b==4)return a*c;
  return a/c;
}
int kobun(){
  int i,r=0,o[3];
  int n[3],a;
  char c[]={")=+-*/"};
  while(1){
    for(a=0;'0'<=s[p]&&s[p]<='9';p++)a=a*10+s[p]-'0';
    if(s[p]=='('){
      p++;
      a=kobun();
    }
    for(i=0;s[p]-c[i];i++);
    for(;r&&o[r-1]/2>=i/2;r--)a=f(n[r-1],o[r-1],a);
    n[r]=a;
    o[r++]=i;
    p++;
    if(i/2==0)return n[0];
  }
  return 0;
}
int main(){
  int n;
  for(scanf("%d",&n);n--;p=0){
    scanf("%s",s);
    printf("%d\n",kobun());
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 110
s:
	.zero	110
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movl	%edi, -12(%rbp)
	movsd	%xmm1, -24(%rbp)
	cmpl	$2, -12(%rbp)
	jne	.L2
	movsd	-8(%rbp), %xmm0
	addsd	-24(%rbp), %xmm0
	jmp	.L3
.L2:
	cmpl	$3, -12(%rbp)
	jne	.L4
	movsd	-8(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	jmp	.L3
.L4:
	cmpl	$4, -12(%rbp)
	jne	.L5
	movsd	-8(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	jmp	.L3
.L5:
	movsd	-8(%rbp), %xmm0
	divsd	-24(%rbp), %xmm0
.L3:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	kobun
	.type	kobun, @function
kobun:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -48(%rbp)
	movl	$757808425, -15(%rbp)
	movw	$12074, -11(%rbp)
	movb	$0, -9(%rbp)
.L18:
	movl	$0, -44(%rbp)
	jmp	.L7
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -44(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L8
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L9
.L8:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L10
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	kobun
	movl	%eax, -44(%rbp)
.L10:
	movl	$0, -52(%rbp)
	jmp	.L11
.L12:
	addl	$1, -52(%rbp)
.L11:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-52(%rbp), %eax
	cltq
	movzbl	-15(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L12
	jmp	.L13
.L15:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-44(%rbp), %xmm0
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %edx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-28(%rbp,%rax,4), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movl	%edx, %edi
	movq	%rax, %xmm0
	call	f
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -44(%rbp)
	subl	$1, -48(%rbp)
.L13:
	cmpl	$0, -48(%rbp)
	je	.L14
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-52(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jge	.L15
.L14:
	movl	-48(%rbp), %eax
	cltq
	movl	-44(%rbp), %edx
	movl	%edx, -28(%rbp,%rax,4)
	movl	-48(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -48(%rbp)
	cltq
	movl	-52(%rbp), %edx
	movl	%edx, -40(%rbp,%rax,4)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	ja	.L18
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kobun, .-kobun
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L22
.L23:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	kobun
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, p(%rip)
.L22:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 110
s:
	.zero	110
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movl	%edi, -12(%rbp)
	movsd	%xmm1, -24(%rbp)
	cmpl	$2, -12(%rbp)
	jne	.L2
	movsd	-8(%rbp), %xmm0
	addsd	-24(%rbp), %xmm0
	jmp	.L3
.L2:
	cmpl	$3, -12(%rbp)
	jne	.L4
	movsd	-8(%rbp), %xmm0
	subsd	-24(%rbp), %xmm0
	jmp	.L3
.L4:
	cmpl	$4, -12(%rbp)
	jne	.L5
	movsd	-8(%rbp), %xmm0
	mulsd	-24(%rbp), %xmm0
	jmp	.L3
.L5:
	movsd	-8(%rbp), %xmm0
	divsd	-24(%rbp), %xmm0
.L3:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.globl	kobun
	.type	kobun, @function
kobun:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -48(%rbp)
	movl	$757808425, -15(%rbp)
	movw	$12074, -11(%rbp)
	movb	$0, -9(%rbp)
.L18:
	movl	$0, -44(%rbp)
	jmp	.L7
.L9:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	subl	$48, %eax
	movl	%eax, -44(%rbp)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
.L7:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$47, %al
	jle	.L8
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$57, %al
	jle	.L9
.L8:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$40, %al
	jne	.L10
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	$0, %eax
	call	kobun
	movl	%eax, -44(%rbp)
.L10:
	movl	$0, -52(%rbp)
	jmp	.L11
.L12:
	addl	$1, -52(%rbp)
.L11:
	movl	p(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-52(%rbp), %eax
	cltq
	movzbl	-15(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L12
	jmp	.L13
.L15:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-44(%rbp), %xmm0
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %edx
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-28(%rbp,%rax,4), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movl	%edx, %edi
	movq	%rax, %xmm0
	call	f
	cvttsd2sil	%xmm0, %eax
	movl	%eax, -44(%rbp)
	subl	$1, -48(%rbp)
.L13:
	cmpl	$0, -48(%rbp)
	je	.L14
	movl	-48(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-40(%rbp,%rax,4), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-52(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %edx
	jge	.L15
.L14:
	movl	-48(%rbp), %eax
	cltq
	movl	-44(%rbp), %edx
	movl	%edx, -28(%rbp,%rax,4)
	movl	-48(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -48(%rbp)
	cltq
	movl	-52(%rbp), %edx
	movl	%edx, -40(%rbp,%rax,4)
	movl	p(%rip), %eax
	addl	$1, %eax
	movl	%eax, p(%rip)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	cmpl	$2, %eax
	ja	.L18
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	kobun, .-kobun
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L22
.L23:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, %eax
	call	kobun
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, p(%rip)
.L22:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L23
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
