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

```c
/* 
   AOJ 1285 
   Grey Area
   
*/

#include<stdio.h>
#include<stdlib.h>

#define N_MAX 100
#define BAR_MAX 11

struct fraction
{
  int numerator, denominator;
};

struct fraction mul(struct fraction x, struct fraction y)
{
  struct fraction z;
  z.numerator = x.numerator * y.numerator;
  z.denominator = x.denominator * y.denominator;
  return z;
}

int main(void)
{
  int i, val_n, width, v, max = -1, max_bar, bar_max = -1, rightest_bar, nume_sum = 0;
  int datasets[N_MAX] = {0};
  int bars[BAR_MAX] = {0};
  double nume, denom;
  struct fraction fraction_bars[BAR_MAX];
  struct fraction ink_percentage;
  while(1)
    {
      for(i = 0; i < BAR_MAX; i++)
	{
	  bars[i] = 0;
	}

      scanf("%d %d", &val_n, &width);
      if(val_n == 0 && width == 0)
	{
	  break;
	}
      for(i = 0; i < val_n; i++)
	{
	  scanf("%d", &datasets[i]);
	}
      
      /* sort(datasets, 0, val_n - 1); */
      /* qsort(datasets, val_n, sizeof(int), comp); */
      
      for(i = 0; i < val_n; i++)
	{
	  if(max < datasets[i])
	    {
	      max = datasets[i];
	    }
	  v = datasets[i] / width;
	  bars[v]++;
	}
      
      rightest_bar = max / width;

      for(i = 0; i < BAR_MAX; i++)
	{
	  if(bar_max < bars[i])
	    {
	      bar_max = bars[i];
	      max_bar = i;
	    }
	  /* printf("%4d", bars[i]); */
	}

      /* printf("\n%d %d\n", rightest_bar, max_bar); */
      


      for(i = 0; i <= rightest_bar; i++)
	{
	  fraction_bars[i].numerator = bars[i];
	  fraction_bars[i].denominator = bars[max_bar];

	  ink_percentage.numerator = rightest_bar - i;
	  ink_percentage.denominator = rightest_bar;

	  fraction_bars[i] = mul(fraction_bars[i], ink_percentage);
	  /* printf("%d/%d ", fraction_bars[i].numerator, fraction_bars[i].denominator); */

	  nume_sum += fraction_bars[i].numerator;
	}
      nume = (double)nume_sum;
      denom = (double)fraction_bars[0].denominator;
      printf("%lf\n", nume / denom + 0.01);
      bar_max = -1;
      max = -1;
      nume_sum = 0;
    }
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mul
	.type	mul, @function
mul:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-24(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	mul, .-mul
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$632, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$-1, -624(%rbp)
	movl	$-1, -616(%rbp)
	movl	$0, -612(%rbp)
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -576(%rbp)
	movq	$0, -568(%rbp)
	movq	$0, -560(%rbp)
	movq	$0, -552(%rbp)
	movq	$0, -544(%rbp)
	movl	$0, -536(%rbp)
.L18:
	movl	$0, -628(%rbp)
	jmp	.L4
.L5:
	movl	-628(%rbp), %eax
	cltq
	movl	$0, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L4:
	cmpl	$10, -628(%rbp)
	jle	.L5
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-632(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	$0, -628(%rbp)
	jmp	.L8
.L9:
	leaq	-432(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -628(%rbp)
.L8:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L9
	movl	$0, -628(%rbp)
	jmp	.L10
.L12:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -624(%rbp)
	jge	.L11
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	%eax, -624(%rbp)
.L11:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	-632(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, -604(%rbp)
	movl	-604(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-604(%rbp), %eax
	cltq
	movl	%edx, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L10:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L12
	movl	-632(%rbp), %ebx
	movl	-624(%rbp), %eax
	cltd
	idivl	%ebx
	movl	%eax, -608(%rbp)
	movl	$0, -628(%rbp)
	jmp	.L13
.L15:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	cmpl	%eax, -616(%rbp)
	jge	.L14
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	movl	%eax, -620(%rbp)
.L14:
	addl	$1, -628(%rbp)
.L13:
	cmpl	$10, -628(%rbp)
	jle	.L15
	movl	$0, -628(%rbp)
	jmp	.L16
.L17:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -528(%rbp,%rax,8)
	movl	-620(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -524(%rbp,%rax,8)
	movl	-608(%rbp), %eax
	subl	-628(%rbp), %eax
	movl	%eax, -584(%rbp)
	movl	-608(%rbp), %eax
	movl	%eax, -580(%rbp)
	movl	-628(%rbp), %eax
	movslq	%eax, %rbx
	movq	-584(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	movq	-528(%rbp,%rax,8), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, -528(%rbp,%rbx,8)
	movl	-628(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,8), %eax
	addl	%eax, -612(%rbp)
	addl	$1, -628(%rbp)
.L16:
	movl	-628(%rbp), %eax
	cmpl	-608(%rbp), %eax
	jle	.L17
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-612(%rbp), %xmm0
	movsd	%xmm0, -600(%rbp)
	movl	-524(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -592(%rbp)
	movsd	-600(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	divsd	-592(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$-1, -616(%rbp)
	movl	$-1, -624(%rbp)
	movl	$0, -612(%rbp)
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	1202590843
	.long	1065646817
	.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	mul
	.type	mul, @function
mul:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	sarq	$32, %rdi
	imull	%esi, %eax
	sarq	$32, %rsi
	imull	%esi, %edi
	movd	%eax, %xmm0
	movd	%edi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC6:
	.string	"%lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	.LC2(%rip), %rbx
	subq	$600, %rsp
	.cfi_def_cfa_offset 656
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	leaq	176(%rsp), %r12
	movq	%r12, %rdi
	rep stosq
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movl	$0, 72(%rsp)
	movq	$0, 64(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jne	.L43
	movl	28(%rsp), %edi
	testl	%edi, %edi
	je	.L44
.L8:
	movl	$-1, %eax
	xorl	%r13d, %r13d
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	cltd
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	idivl	%edi
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
.L27:
	movl	%ecx, %edx
.L13:
	cmpl	%esi, %edx
	jge	.L14
	movl	%esi, %edx
	movl	$3, %ebp
.L14:
	cmpl	%edi, %edx
	jge	.L15
	movl	%edi, %edx
	movl	$4, %ebp
.L15:
	cmpl	%r8d, %edx
	jge	.L16
	movl	%r8d, %edx
	movl	$5, %ebp
.L16:
	cmpl	%r9d, %edx
	jge	.L17
	movl	%r9d, %edx
	movl	$6, %ebp
.L17:
	cmpl	%r10d, %edx
	jge	.L18
	movl	%r10d, %edx
	movl	$7, %ebp
.L18:
	cmpl	%r11d, %edx
	jge	.L19
	movl	%r11d, %edx
	movl	$8, %ebp
.L19:
	cmpl	%r13d, %edx
	jge	.L20
	movl	%r13d, %edx
	movl	$9, %ebp
.L20:
	cmpl	%r15d, %edx
	movl	$10, %edx
	cmovl	%edx, %ebp
	testl	%eax, %eax
	js	.L32
	movslq	%ebp, %rdx
	leal	1(%rax), %esi
	movl	32(%rsp,%rdx,4), %r8d
	imull	%eax, %r8d
	cmpl	$3, %eax
	jle	.L33
	movd	%eax, %xmm4
	movdqa	32(%rsp), %xmm3
	movl	%esi, %edx
	movl	%r8d, 84(%rsp)
	pshufd	$0, %xmm4, %xmm2
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	psubd	.LC3(%rip), %xmm1
	psrlq	$32, %xmm3
	movdqa	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm0
	pshufd	$8, %xmm0, %xmm0
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	cmpl	$1, %edx
	je	.L24
	psubd	.LC4(%rip), %xmm2
	movdqa	48(%rsp), %xmm1
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm1
	pmuludq	48(%rsp), %xmm3
	pshufd	$8, %xmm3, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
.L24:
	movdqa	%xmm0, %xmm1
	movl	%esi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andl	$3, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	je	.L25
.L23:
	movslq	%ecx, %rsi
	movl	%eax, %edi
	subl	%ecx, %edi
	imull	32(%rsp,%rsi,4), %edi
	movl	%r8d, 84(%rsp,%rsi,8)
	leal	1(%rcx), %esi
	addl	%edi, %edx
	cmpl	%eax, %esi
	jg	.L25
	movslq	%esi, %r8
	movl	%eax, %edi
	subl	%esi, %edi
	imull	32(%rsp,%r8,4), %edi
	leal	2(%rcx), %esi
	addl	%edi, %edx
	cmpl	%eax, %esi
	jg	.L25
	movslq	%esi, %r8
	movl	%eax, %edi
	addl	$3, %ecx
	subl	%esi, %edi
	imull	32(%rsp,%r8,4), %edi
	addl	%edi, %edx
	cmpl	%eax, %ecx
	jg	.L25
	subl	%ecx, %eax
	movslq	%ecx, %rcx
	imull	32(%rsp,%rcx,4), %eax
	addl	%eax, %edx
.L25:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edx, %xmm0
.L22:
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2sdl	84(%rsp), %xmm1
	leaq	.LC6(%rip), %rsi
	divsd	%xmm1, %xmm0
	addsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	jle	.L45
	movq	%r12, %r15
	movq	%r12, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L9
	movl	28(%rsp), %edi
	testl	%eax, %eax
	jle	.L8
	subl	$1, %eax
	leaq	4(%r12), %rcx
	movl	$-1, %esi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L46:
	addq	$4, %rcx
.L10:
	movl	(%r15), %eax
	movq	%rcx, %r15
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	cltd
	idivl	%edi
	cltq
	addl	$1, 32(%rsp,%rax,4)
	cmpq	%r8, %rcx
	jne	.L46
	movl	%esi, %eax
	movl	32(%rsp), %ecx
	movl	36(%rsp), %r14d
	cltd
	movl	44(%rsp), %esi
	movl	52(%rsp), %r8d
	idivl	%edi
	movl	56(%rsp), %r9d
	movl	40(%rsp), %edx
	movl	48(%rsp), %edi
	movl	60(%rsp), %r10d
	movl	64(%rsp), %r11d
	movl	68(%rsp), %r13d
	movl	72(%rsp), %r15d
	testl	%ecx, %ecx
	jns	.L47
	movl	$-1, %ecx
.L11:
	cmpl	%r14d, %ecx
	jge	.L12
	movl	%r14d, %ecx
	movl	$1, %ebp
.L12:
	cmpl	%edx, %ecx
	jge	.L27
	movl	$2, %ebp
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L47:
	xorl	%ebp, %ebp
	jmp	.L11
.L32:
	pxor	%xmm0, %xmm0
	jmp	.L22
.L33:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L23
.L44:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$600, %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
.L45:
	.cfi_restore_state
	movl	28(%rsp), %edi
	jmp	.L8
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC4:
	.long	4
	.long	5
	.long	6
	.long	7
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1202590843
	.long	1065646817
	.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	mul
	.type	mul, @function
mul:
.LFB39:
	.cfi_startproc
	endbr64
	movl	%edi, %eax
	sarq	$32, %rdi
	imull	%esi, %eax
	sarq	$32, %rsi
	imull	%esi, %edi
	movd	%eax, %xmm0
	movd	%edi, %xmm1
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d"
.LC6:
	.string	"%lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$50, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	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
	leaq	.LC2(%rip), %rbx
	subq	$600, %rsp
	.cfi_def_cfa_offset 656
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	leaq	176(%rsp), %r12
	movq	%r12, %rdi
	rep stosq
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L26:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	pxor	%xmm0, %xmm0
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	movl	$0, 72(%rsp)
	movq	$0, 64(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jne	.L43
	movl	28(%rsp), %edi
	testl	%edi, %edi
	je	.L44
.L8:
	movl	$-1, %eax
	xorl	%r13d, %r13d
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	cltd
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	xorl	%esi, %esi
	idivl	%edi
	xorl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
.L27:
	movl	%ecx, %edx
.L13:
	cmpl	%esi, %edx
	jge	.L14
	movl	%esi, %edx
	movl	$3, %ebp
.L14:
	cmpl	%edi, %edx
	jge	.L15
	movl	%edi, %edx
	movl	$4, %ebp
.L15:
	cmpl	%r8d, %edx
	jge	.L16
	movl	%r8d, %edx
	movl	$5, %ebp
.L16:
	cmpl	%r9d, %edx
	jge	.L17
	movl	%r9d, %edx
	movl	$6, %ebp
.L17:
	cmpl	%r10d, %edx
	jge	.L18
	movl	%r10d, %edx
	movl	$7, %ebp
.L18:
	cmpl	%r11d, %edx
	jge	.L19
	movl	%r11d, %edx
	movl	$8, %ebp
.L19:
	cmpl	%r13d, %edx
	jge	.L20
	movl	%r13d, %edx
	movl	$9, %ebp
.L20:
	cmpl	%r15d, %edx
	movl	$10, %edx
	cmovl	%edx, %ebp
	testl	%eax, %eax
	js	.L32
	movslq	%ebp, %rdx
	leal	1(%rax), %esi
	movl	32(%rsp,%rdx,4), %r8d
	imull	%eax, %r8d
	cmpl	$3, %eax
	jle	.L33
	movd	%eax, %xmm4
	movdqa	32(%rsp), %xmm3
	movl	%esi, %edx
	movl	%r8d, 84(%rsp)
	pshufd	$0, %xmm4, %xmm2
	shrl	$2, %edx
	movdqa	%xmm2, %xmm1
	psubd	.LC3(%rip), %xmm1
	psrlq	$32, %xmm3
	movdqa	%xmm1, %xmm0
	psrlq	$32, %xmm1
	pmuludq	32(%rsp), %xmm0
	pshufd	$8, %xmm0, %xmm0
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm0
	cmpl	$1, %edx
	je	.L24
	psubd	.LC4(%rip), %xmm2
	movdqa	48(%rsp), %xmm1
	movdqa	%xmm2, %xmm3
	psrlq	$32, %xmm1
	pmuludq	48(%rsp), %xmm3
	pshufd	$8, %xmm3, %xmm3
	psrlq	$32, %xmm2
	pmuludq	%xmm1, %xmm2
	pshufd	$8, %xmm2, %xmm1
	movdqa	%xmm3, %xmm2
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
.L24:
	movdqa	%xmm0, %xmm1
	movl	%esi, %ecx
	psrldq	$8, %xmm1
	andl	$-4, %ecx
	andl	$3, %esi
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	je	.L25
.L23:
	movslq	%ecx, %rsi
	movl	%eax, %edi
	subl	%ecx, %edi
	imull	32(%rsp,%rsi,4), %edi
	movl	%r8d, 84(%rsp,%rsi,8)
	leal	1(%rcx), %esi
	addl	%edi, %edx
	cmpl	%eax, %esi
	jg	.L25
	movslq	%esi, %r8
	movl	%eax, %edi
	subl	%esi, %edi
	imull	32(%rsp,%r8,4), %edi
	leal	2(%rcx), %esi
	addl	%edi, %edx
	cmpl	%eax, %esi
	jg	.L25
	movslq	%esi, %r8
	movl	%eax, %edi
	addl	$3, %ecx
	subl	%esi, %edi
	imull	32(%rsp,%r8,4), %edi
	addl	%edi, %edx
	cmpl	%eax, %ecx
	jg	.L25
	subl	%ecx, %eax
	movslq	%ecx, %rcx
	imull	32(%rsp,%rcx,4), %eax
	addl	%eax, %edx
.L25:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edx, %xmm0
.L22:
	pxor	%xmm1, %xmm1
	movl	$1, %edi
	movl	$1, %eax
	cvtsi2sdl	84(%rsp), %xmm1
	leaq	.LC6(%rip), %rsi
	divsd	%xmm1, %xmm0
	addsd	.LC5(%rip), %xmm0
	call	__printf_chk@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	jle	.L45
	movq	%r12, %r15
	movq	%r12, %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	addq	$4, %r14
	cmpl	%r13d, %eax
	jg	.L9
	movl	28(%rsp), %edi
	testl	%eax, %eax
	jle	.L8
	subl	$1, %eax
	leaq	4(%r12), %rcx
	movl	$-1, %esi
	leaq	(%rcx,%rax,4), %r8
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L46:
	addq	$4, %rcx
.L10:
	movl	(%r15), %eax
	movq	%rcx, %r15
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	cltd
	idivl	%edi
	cltq
	addl	$1, 32(%rsp,%rax,4)
	cmpq	%r8, %rcx
	jne	.L46
	movl	%esi, %eax
	movl	32(%rsp), %ecx
	movl	36(%rsp), %r14d
	cltd
	movl	44(%rsp), %esi
	movl	52(%rsp), %r8d
	idivl	%edi
	movl	56(%rsp), %r9d
	movl	40(%rsp), %edx
	movl	48(%rsp), %edi
	movl	60(%rsp), %r10d
	movl	64(%rsp), %r11d
	movl	68(%rsp), %r13d
	movl	72(%rsp), %r15d
	testl	%ecx, %ecx
	jns	.L47
	movl	$-1, %ecx
.L11:
	cmpl	%r14d, %ecx
	jge	.L12
	movl	%r14d, %ecx
	movl	$1, %ebp
.L12:
	cmpl	%edx, %ecx
	jge	.L27
	movl	$2, %ebp
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L47:
	xorl	%ebp, %ebp
	jmp	.L11
.L32:
	pxor	%xmm0, %xmm0
	jmp	.L22
.L33:
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L23
.L44:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L48
	addq	$600, %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
.L45:
	.cfi_restore_state
	movl	28(%rsp), %edi
	jmp	.L8
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC4:
	.long	4
	.long	5
	.long	6
	.long	7
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	1202590843
	.long	1065646817
	.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:

/* 
   AOJ 1285 
   Grey Area
   
*/

#include<stdio.h>
#include<stdlib.h>

#define N_MAX 100
#define BAR_MAX 11

struct fraction
{
  int numerator, denominator;
};

struct fraction mul(struct fraction x, struct fraction y)
{
  struct fraction z;
  z.numerator = x.numerator * y.numerator;
  z.denominator = x.denominator * y.denominator;
  return z;
}

int main(void)
{
  int i, val_n, width, v, max = -1, max_bar, bar_max = -1, rightest_bar, nume_sum = 0;
  int datasets[N_MAX] = {0};
  int bars[BAR_MAX] = {0};
  double nume, denom;
  struct fraction fraction_bars[BAR_MAX];
  struct fraction ink_percentage;
  while(1)
    {
      for(i = 0; i < BAR_MAX; i++)
	{
	  bars[i] = 0;
	}

      scanf("%d %d", &val_n, &width);
      if(val_n == 0 && width == 0)
	{
	  break;
	}
      for(i = 0; i < val_n; i++)
	{
	  scanf("%d", &datasets[i]);
	}
      
      /* sort(datasets, 0, val_n - 1); */
      /* qsort(datasets, val_n, sizeof(int), comp); */
      
      for(i = 0; i < val_n; i++)
	{
	  if(max < datasets[i])
	    {
	      max = datasets[i];
	    }
	  v = datasets[i] / width;
	  bars[v]++;
	}
      
      rightest_bar = max / width;

      for(i = 0; i < BAR_MAX; i++)
	{
	  if(bar_max < bars[i])
	    {
	      bar_max = bars[i];
	      max_bar = i;
	    }
	  /* printf("%4d", bars[i]); */
	}

      /* printf("\n%d %d\n", rightest_bar, max_bar); */
      


      for(i = 0; i <= rightest_bar; i++)
	{
	  fraction_bars[i].numerator = bars[i];
	  fraction_bars[i].denominator = bars[max_bar];

	  ink_percentage.numerator = rightest_bar - i;
	  ink_percentage.denominator = rightest_bar;

	  fraction_bars[i] = mul(fraction_bars[i], ink_percentage);
	  /* printf("%d/%d ", fraction_bars[i].numerator, fraction_bars[i].denominator); */

	  nume_sum += fraction_bars[i].numerator;
	}
      nume = (double)nume_sum;
      denom = (double)fraction_bars[0].denominator;
      printf("%lf\n", nume / denom + 0.01);
      bar_max = -1;
      max = -1;
      nume_sum = 0;
    }
  
  return 0;
}
3 50
100
0
100
3 50
100
100
50
10 10
1
2
3
4
5
16
17
18
29
53
0 0
 3 50
100
0
100
3 50
100
100
50
10 10
1
2
3
8
5
16
17
18
29
65
0 0
 3 50
100
0
100
3 50
100
100
50
10 10
1
2
3
8
5
16
17
18
56
65
0 0
 3 50
110
1
100
3 50
100
100
19
10 10
1
2
3
8
5
16
17
18
56
65
0 0
 3 50
110
1
100
3 50
100
100
19
10 10
1
2
3
8
5
16
17
1
56
65
0 0
 3 50
110
1
100
3 50
100
100
19
10 10
1
2
3
8
5
16
21
1
56
65
0 0
 3 50
111
1
100
3 50
100
100
7
10 10
1
2
3
9
5
16
21
1
56
91
0 0
 3 50
111
1
100
3 50
100
100
7
10 10
1
2
3
9
5
20
21
1
56
91
0 0
 3 50
111
1
100
3 50
100
000
7
10 10
1
2
3
9
5
20
21
1
56
91
0 0
 3 50
011
1
100
3 50
100
000
7
10 10
1
2
3
9
5
20
21
1
56
91
0 0

0.510000
0.260000
1.610000
 0.510000
0.260000
1.643333
 0.510000
0.260000
1.543333
 0.510000
0.510000
1.543333
 0.510000
0.510000
1.315556
 0.510000
0.510000
1.287778
 0.510000
0.510000
1.361852
 0.510000
0.510000
1.343333
 0.510000
1.010000
1.343333
 1.010000
1.010000
1.343333

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

```c
/* 
   AOJ 1285 
   Grey Area
   
*/

#include<stdio.h>
#include<stdlib.h>

#define N_MAX 100
#define BAR_MAX 11

struct fraction
{
  int numerator, denominator;
};

struct fraction mul(struct fraction x, struct fraction y)
{
  struct fraction z;
  z.numerator = x.numerator * y.numerator;
  z.denominator = x.denominator * y.denominator;
  return z;
}

int main(void)
{
  int i, val_n, width, v, max = -1, max_bar, bar_max = -1, rightest_bar, nume_sum = 0;
  int datasets[N_MAX] = {0};
  int bars[BAR_MAX] = {0};
  double nume, denom;
  struct fraction fraction_bars[BAR_MAX];
  struct fraction ink_percentage;
  while(1)
    {
      for(i = 0; i < BAR_MAX; i++)
	{
	  bars[i] = 0;
	}

      scanf("%d %d", &val_n, &width);
      if(val_n == 0 && width == 0)
	{
	  break;
	}
      for(i = 0; i < val_n; i++)
	{
	  scanf("%d", &datasets[i]);
	}
      
      /* sort(datasets, 0, val_n - 1); */
      /* qsort(datasets, val_n, sizeof(int), comp); */
      
      for(i = 0; i < val_n; i++)
	{
	  if(max < datasets[i])
	    {
	      max = datasets[i];
	    }
	  v = datasets[i] / width;
	  bars[v]++;
	}
      
      rightest_bar = max / width;

      for(i = 0; i < BAR_MAX; i++)
	{
	  if(bar_max < bars[i])
	    {
	      bar_max = bars[i];
	      max_bar = i;
	    }
	  /* printf("%4d", bars[i]); */
	}

      /* printf("\n%d %d\n", rightest_bar, max_bar); */
      


      for(i = 0; i <= rightest_bar; i++)
	{
	  fraction_bars[i].numerator = bars[i];
	  fraction_bars[i].denominator = bars[max_bar];

	  ink_percentage.numerator = rightest_bar - i;
	  ink_percentage.denominator = rightest_bar;

	  fraction_bars[i] = mul(fraction_bars[i], ink_percentage);
	  /* printf("%d/%d ", fraction_bars[i].numerator, fraction_bars[i].denominator); */

	  nume_sum += fraction_bars[i].numerator;
	}
      nume = (double)nume_sum;
      denom = (double)fraction_bars[0].denominator;
      printf("%lf\n", nume / denom + 0.01);
      bar_max = -1;
      max = -1;
      nume_sum = 0;
    }
  
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	mul
	.type	mul, @function
mul:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-24(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	mul, .-mul
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$632, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$-1, -624(%rbp)
	movl	$-1, -616(%rbp)
	movl	$0, -612(%rbp)
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -576(%rbp)
	movq	$0, -568(%rbp)
	movq	$0, -560(%rbp)
	movq	$0, -552(%rbp)
	movq	$0, -544(%rbp)
	movl	$0, -536(%rbp)
.L18:
	movl	$0, -628(%rbp)
	jmp	.L4
.L5:
	movl	-628(%rbp), %eax
	cltq
	movl	$0, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L4:
	cmpl	$10, -628(%rbp)
	jle	.L5
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-632(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	$0, -628(%rbp)
	jmp	.L8
.L9:
	leaq	-432(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -628(%rbp)
.L8:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L9
	movl	$0, -628(%rbp)
	jmp	.L10
.L12:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -624(%rbp)
	jge	.L11
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	%eax, -624(%rbp)
.L11:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	-632(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, -604(%rbp)
	movl	-604(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-604(%rbp), %eax
	cltq
	movl	%edx, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L10:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L12
	movl	-632(%rbp), %ebx
	movl	-624(%rbp), %eax
	cltd
	idivl	%ebx
	movl	%eax, -608(%rbp)
	movl	$0, -628(%rbp)
	jmp	.L13
.L15:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	cmpl	%eax, -616(%rbp)
	jge	.L14
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	movl	%eax, -620(%rbp)
.L14:
	addl	$1, -628(%rbp)
.L13:
	cmpl	$10, -628(%rbp)
	jle	.L15
	movl	$0, -628(%rbp)
	jmp	.L16
.L17:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -528(%rbp,%rax,8)
	movl	-620(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -524(%rbp,%rax,8)
	movl	-608(%rbp), %eax
	subl	-628(%rbp), %eax
	movl	%eax, -584(%rbp)
	movl	-608(%rbp), %eax
	movl	%eax, -580(%rbp)
	movl	-628(%rbp), %eax
	movslq	%eax, %rbx
	movq	-584(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	movq	-528(%rbp,%rax,8), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, -528(%rbp,%rbx,8)
	movl	-628(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,8), %eax
	addl	%eax, -612(%rbp)
	addl	$1, -628(%rbp)
.L16:
	movl	-628(%rbp), %eax
	cmpl	-608(%rbp), %eax
	jle	.L17
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-612(%rbp), %xmm0
	movsd	%xmm0, -600(%rbp)
	movl	-524(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -592(%rbp)
	movsd	-600(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	divsd	-592(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$-1, -616(%rbp)
	movl	$-1, -624(%rbp)
	movl	$0, -612(%rbp)
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	1202590843
	.long	1065646817
	.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	mul
	.type	mul, @function
mul:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	-24(%rbp), %edx
	movl	-32(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %edx
	movl	-28(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -4(%rbp)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	mul, .-mul
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$632, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	movl	$-1, -624(%rbp)
	movl	$-1, -616(%rbp)
	movl	$0, -612(%rbp)
	leaq	-432(%rbp), %rdx
	movl	$0, %eax
	movl	$50, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$0, -576(%rbp)
	movq	$0, -568(%rbp)
	movq	$0, -560(%rbp)
	movq	$0, -552(%rbp)
	movq	$0, -544(%rbp)
	movl	$0, -536(%rbp)
.L18:
	movl	$0, -628(%rbp)
	jmp	.L4
.L5:
	movl	-628(%rbp), %eax
	cltq
	movl	$0, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L4:
	cmpl	$10, -628(%rbp)
	jle	.L5
	leaq	-632(%rbp), %rdx
	leaq	-636(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-636(%rbp), %eax
	testl	%eax, %eax
	jne	.L6
	movl	-632(%rbp), %eax
	testl	%eax, %eax
	je	.L22
.L6:
	movl	$0, -628(%rbp)
	jmp	.L8
.L9:
	leaq	-432(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -628(%rbp)
.L8:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L9
	movl	$0, -628(%rbp)
	jmp	.L10
.L12:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	cmpl	%eax, -624(%rbp)
	jge	.L11
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	%eax, -624(%rbp)
.L11:
	movl	-628(%rbp), %eax
	cltq
	movl	-432(%rbp,%rax,4), %eax
	movl	-632(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%eax, -604(%rbp)
	movl	-604(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-604(%rbp), %eax
	cltq
	movl	%edx, -576(%rbp,%rax,4)
	addl	$1, -628(%rbp)
.L10:
	movl	-636(%rbp), %eax
	cmpl	%eax, -628(%rbp)
	jl	.L12
	movl	-632(%rbp), %ebx
	movl	-624(%rbp), %eax
	cltd
	idivl	%ebx
	movl	%eax, -608(%rbp)
	movl	$0, -628(%rbp)
	jmp	.L13
.L15:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	cmpl	%eax, -616(%rbp)
	jge	.L14
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %eax
	movl	%eax, -616(%rbp)
	movl	-628(%rbp), %eax
	movl	%eax, -620(%rbp)
.L14:
	addl	$1, -628(%rbp)
.L13:
	cmpl	$10, -628(%rbp)
	jle	.L15
	movl	$0, -628(%rbp)
	jmp	.L16
.L17:
	movl	-628(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -528(%rbp,%rax,8)
	movl	-620(%rbp), %eax
	cltq
	movl	-576(%rbp,%rax,4), %edx
	movl	-628(%rbp), %eax
	cltq
	movl	%edx, -524(%rbp,%rax,8)
	movl	-608(%rbp), %eax
	subl	-628(%rbp), %eax
	movl	%eax, -584(%rbp)
	movl	-608(%rbp), %eax
	movl	%eax, -580(%rbp)
	movl	-628(%rbp), %eax
	movslq	%eax, %rbx
	movq	-584(%rbp), %rdx
	movl	-628(%rbp), %eax
	cltq
	movq	-528(%rbp,%rax,8), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, -528(%rbp,%rbx,8)
	movl	-628(%rbp), %eax
	cltq
	movl	-528(%rbp,%rax,8), %eax
	addl	%eax, -612(%rbp)
	addl	$1, -628(%rbp)
.L16:
	movl	-628(%rbp), %eax
	cmpl	-608(%rbp), %eax
	jle	.L17
	pxor	%xmm0, %xmm0
	cvtsi2sdl	-612(%rbp), %xmm0
	movsd	%xmm0, -600(%rbp)
	movl	-524(%rbp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movsd	%xmm0, -592(%rbp)
	movsd	-600(%rbp), %xmm0
	movapd	%xmm0, %xmm1
	divsd	-592(%rbp), %xmm1
	movsd	.LC2(%rip), %xmm0
	addsd	%xmm0, %xmm1
	movq	%xmm1, %rax
	movq	%rax, %xmm0
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$-1, -616(%rbp)
	movl	$-1, -624(%rbp)
	movl	$0, -612(%rbp)
	jmp	.L18
.L22:
	nop
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.long	1202590843
	.long	1065646817
	.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:
