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>
#include<stdlib.h>
typedef struct{
    int w;
    int h;
}Cake;
Cake cake[100];
int comp(const void *a,const void *b){
    Cake c=*(Cake *)a;
    Cake d=*(Cake *)b;
    if((c.w*c.h)<(d.w*d.h)) return -1;
    else return 1;
}
int main(void){
    while(1){
        int n,w,h;
        int s,p;
        scanf("%d%d%d",&n,&w,&h);
        if(n+w+h==0) break;
        cake[0].w=w; cake[0].h=h;
        for(int i=0;i<n;i++){
            scanf("%d%d",&p,&s);
            p=p-1;
            w=cake[p].w; h=cake[p].h;
            s=s%(w+h);
            //printf("p:%d s:%d\n",p,s);
            Cake small,big;
            if(s<w){
                if(s<=w/2){
                    small.w=s,small.h=cake[p].h;
                    big.w=cake[p].w-s,big.h=cake[p].h;
                }
                else{
                    small.w=cake[p].w-s,small.h=cake[p].h;
                    big.w=s,big.h=cake[p].h;
                }
            }
            else{
                s=s-w;
                if(s<=h/2){
                    small.w=cake[p].w,small.h=s;
                    big.w=cake[p].w,big.h=cake[p].h-s;
                }
                else{
                    small.w=cake[p].w,small.h=cake[p].h-s;
                    big.w=cake[p].w,big.h=s;
                }
            }
            //printf("w:%d h:%d\n",small.w,small.h);
            for(int j=p;j<i;j++){
                cake[j]=cake[j+1];
            }
            cake[i]=small; cake[i+1]=big;
        }
        qsort(cake,n+1,sizeof(Cake),comp);
        for(int i=0;i<n;i++) printf("%d ",cake[i].w*cake[i].h);
        printf("%d\n",cake[n].w*cake[n].h);
    }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cake
	.bss
	.align 32
	.type	cake, @object
	.size	cake, 800
cake:
	.zero	800
	.text
	.globl	comp
	.type	comp, @function
comp:
.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)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-4(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\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
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	jmp	.L20
.L6:
	movl	-52(%rbp), %eax
	movl	%eax, cake(%rip)
	movl	-48(%rbp), %eax
	movl	%eax, 4+cake(%rip)
	movl	$0, -36(%rbp)
	jmp	.L8
.L15:
	leaq	-44(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -52(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %edx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L9:
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L14:
	movl	-32(%rbp), %eax
	leal	1(%rax), %esi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movslq	%esi, %rax
	leaq	0(,%rax,8), %rsi
	leaq	cake(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -32(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movl	-56(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	cake(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L16:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L17
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L20:
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	imull	4(%rdi), %eax
	movl	%eax, %edx
	movl	(%rsi), %eax
	imull	4(%rsi), %eax
	cmpl	%eax, %edx
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\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
	leaq	cake(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	4(%r15), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	movq	32(%rsp), %rdx
	movq	40(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	movl	56(%rsp), %edx
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm4
	addl	%eax, %edx
	addl	60(%rsp), %edx
	punpckldq	%xmm4, %xmm0
	je	.L6
	movq	%xmm0, (%r15)
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	64(%rsp), %rbp
	leaq	68(%rsp), %rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ecx, %r10d
	movl	%r9d, %eax
	shrl	$31, %r10d
	addl	%ecx, %r10d
	subl	%edx, %ecx
	sarl	%r10d
	cmpl	%r10d, %edx
	jg	.L9
	movl	%ecx, %r10d
	movl	%edx, %ecx
	movl	%r10d, %edx
.L9:
	movd	%edx, %xmm1
	movd	%eax, %xmm2
	movd	%ecx, %xmm0
	movd	%r9d, %xmm3
	punpckldq	%xmm2, %xmm1
	punpckldq	%xmm3, %xmm0
	punpcklqdq	%xmm1, %xmm0
	cmpl	%r14d, %r8d
	jge	.L21
	movl	%r14d, %eax
	salq	$3, %rdi
	movaps	%xmm0, (%rsp)
	subl	%esi, %eax
	leaq	8(%r15,%rdi), %rsi
	addq	%r15, %rdi
	leaq	8(,%rax,8), %rdx
	call	memmove@PLT
	movdqa	(%rsp), %xmm0
.L21:
	movl	52(%rsp), %eax
	movups	%xmm0, (%r15,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jle	.L7
.L11:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %esi
	movl	64(%rsp), %eax
	leal	-1(%rsi), %r8d
	cltd
	movslq	%r8d, %rdi
	movl	%r8d, 68(%rsp)
	movl	(%r15,%rdi,8), %ecx
	movl	4(%r15,%rdi,8), %r9d
	leal	(%rcx,%r9), %r10d
	movl	%ecx, 56(%rsp)
	idivl	%r10d
	movl	%r9d, 60(%rsp)
	movl	%edx, 64(%rsp)
	cmpl	%edx, %ecx
	jg	.L22
	movl	%r9d, %r10d
	movl	%edx, %eax
	movl	%ecx, %edx
	shrl	$31, %r10d
	subl	%ecx, %eax
	addl	%r9d, %r10d
	movl	%eax, 64(%rsp)
	subl	%eax, %r9d
	sarl	%r10d
	cmpl	%r10d, %eax
	jg	.L9
	movl	%r9d, %r10d
	movl	%eax, %r9d
	movl	%r10d, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %eax
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r15, %rdi
	movslq	%eax, %rsi
	call	qsort@PLT
	movslq	52(%rsp), %rax
	testl	%eax, %eax
	jle	.L13
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%r15,%rbp,8), %edx
	imull	(%r12,%rbp,8), %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addq	$1, %rbp
	call	__printf_chk@PLT
	movslq	52(%rsp), %rax
	cmpl	%ebp, %eax
	jg	.L14
.L13:
	movl	(%r15,%rax,8), %edx
	imull	4(%r15,%rax,8), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L15
.L6:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$88, %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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	cake
	.bss
	.align 32
	.type	cake, @object
	.size	cake, 800
cake:
	.zero	800
	.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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	imull	4(%rdi), %eax
	movl	%eax, %edx
	movl	(%rsi), %eax
	imull	4(%rsi), %eax
	cmpl	%eax, %edx
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\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
	leaq	cake(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	4(%r15), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movq	%rax, 40(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	movq	32(%rsp), %rdx
	movq	40(%rsp), %rcx
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	movq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %eax
	movl	56(%rsp), %edx
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm4
	addl	%eax, %edx
	addl	60(%rsp), %edx
	punpckldq	%xmm4, %xmm0
	je	.L6
	movq	%xmm0, (%r15)
	testl	%eax, %eax
	jle	.L7
	xorl	%r14d, %r14d
	leaq	64(%rsp), %rbp
	leaq	68(%rsp), %rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	movl	%ecx, %r10d
	movl	%r9d, %eax
	shrl	$31, %r10d
	addl	%ecx, %r10d
	subl	%edx, %ecx
	sarl	%r10d
	cmpl	%r10d, %edx
	jg	.L9
	movl	%ecx, %r10d
	movl	%edx, %ecx
	movl	%r10d, %edx
.L9:
	movd	%edx, %xmm1
	movd	%eax, %xmm2
	movd	%ecx, %xmm0
	movd	%r9d, %xmm3
	punpckldq	%xmm2, %xmm1
	punpckldq	%xmm3, %xmm0
	punpcklqdq	%xmm1, %xmm0
	cmpl	%r14d, %r8d
	jge	.L21
	movl	%r14d, %eax
	salq	$3, %rdi
	movaps	%xmm0, (%rsp)
	subl	%esi, %eax
	leaq	8(%r15,%rdi), %rsi
	addq	%r15, %rdi
	leaq	8(,%rax,8), %rdx
	call	memmove@PLT
	movdqa	(%rsp), %xmm0
.L21:
	movl	52(%rsp), %eax
	movups	%xmm0, (%r15,%r14,8)
	addq	$1, %r14
	cmpl	%r14d, %eax
	jle	.L7
.L11:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	68(%rsp), %esi
	movl	64(%rsp), %eax
	leal	-1(%rsi), %r8d
	cltd
	movslq	%r8d, %rdi
	movl	%r8d, 68(%rsp)
	movl	(%r15,%rdi,8), %ecx
	movl	4(%r15,%rdi,8), %r9d
	leal	(%rcx,%r9), %r10d
	movl	%ecx, 56(%rsp)
	idivl	%r10d
	movl	%r9d, 60(%rsp)
	movl	%edx, 64(%rsp)
	cmpl	%edx, %ecx
	jg	.L22
	movl	%r9d, %r10d
	movl	%edx, %eax
	movl	%ecx, %edx
	shrl	$31, %r10d
	subl	%ecx, %eax
	addl	%r9d, %r10d
	movl	%eax, 64(%rsp)
	subl	%eax, %r9d
	sarl	%r10d
	cmpl	%r10d, %eax
	jg	.L9
	movl	%r9d, %r10d
	movl	%eax, %r9d
	movl	%r10d, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %eax
	leaq	comp(%rip), %rcx
	movl	$8, %edx
	movq	%r15, %rdi
	movslq	%eax, %rsi
	call	qsort@PLT
	movslq	52(%rsp), %rax
	testl	%eax, %eax
	jle	.L13
	xorl	%ebp, %ebp
	leaq	.LC2(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%r15,%rbp,8), %edx
	imull	(%r12,%rbp,8), %edx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addq	$1, %rbp
	call	__printf_chk@PLT
	movslq	52(%rsp), %rax
	cmpl	%ebp, %eax
	jg	.L14
.L13:
	movl	(%r15,%rax,8), %edx
	imull	4(%r15,%rax,8), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	jmp	.L15
.L6:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$88, %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
.L23:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	cake
	.bss
	.align 32
	.type	cake, @object
	.size	cake, 800
cake:
	.zero	800
	.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>
#include<stdlib.h>
typedef struct{
    int w;
    int h;
}Cake;
Cake cake[100];
int comp(const void *a,const void *b){
    Cake c=*(Cake *)a;
    Cake d=*(Cake *)b;
    if((c.w*c.h)<(d.w*d.h)) return -1;
    else return 1;
}
int main(void){
    while(1){
        int n,w,h;
        int s,p;
        scanf("%d%d%d",&n,&w,&h);
        if(n+w+h==0) break;
        cake[0].w=w; cake[0].h=h;
        for(int i=0;i<n;i++){
            scanf("%d%d",&p,&s);
            p=p-1;
            w=cake[p].w; h=cake[p].h;
            s=s%(w+h);
            //printf("p:%d s:%d\n",p,s);
            Cake small,big;
            if(s<w){
                if(s<=w/2){
                    small.w=s,small.h=cake[p].h;
                    big.w=cake[p].w-s,big.h=cake[p].h;
                }
                else{
                    small.w=cake[p].w-s,small.h=cake[p].h;
                    big.w=s,big.h=cake[p].h;
                }
            }
            else{
                s=s-w;
                if(s<=h/2){
                    small.w=cake[p].w,small.h=s;
                    big.w=cake[p].w,big.h=cake[p].h-s;
                }
                else{
                    small.w=cake[p].w,small.h=cake[p].h-s;
                    big.w=cake[p].w,big.h=s;
                }
            }
            //printf("w:%d h:%d\n",small.w,small.h);
            for(int j=p;j<i;j++){
                cake[j]=cake[j+1];
            }
            cake[i]=small; cake[i+1]=big;
        }
        qsort(cake,n+1,sizeof(Cake),comp);
        for(int i=0;i<n;i++) printf("%d ",cake[i].w*cake[i].h);
        printf("%d\n",cake[n].w*cake[n].h);
    }
}


3 5 6
1 18
2 31
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 5 6
1 35
2 31
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 5 6
1 48
2 31
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 5 6
1 48
2 6
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 7 6
1 35
2 31
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 5 6
1 48
2 6
1 2
3 4 2
1 1
2 1
3 1
0 2 5
0 0 0
 3 5 6
1 48
2 31
2 2
3 4 1
1 2
2 1
3 1
0 2 5
0 0 0
 3 4 6
1 48
2 31
1 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0
 3 7 6
1 35
2 31
1 2
3 4 1
1 1
2 1
2 1
0 2 5
0 0 0
 3 5 6
1 48
1 31
2 2
3 4 1
1 1
2 1
3 1
0 2 5
0 0 0

4 4 6 16
1 1 1 1
10
 0 3 12 15
1 1 1 1
10
 1 5 6 18
1 1 1 1
10
 1 5 8 16
1 1 1 1
10
 4 10 14 14
1 1 1 1
10
 1 5 8 16
2 2 2 2
10
 1 5 6 18
0 1 1 2
10
 4 4 4 12
1 1 1 1
10
 4 10 14 14
0 1 1 2
10
 1 1 4 24
1 1 1 1
10

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>
#include<stdlib.h>
typedef struct{
    int w;
    int h;
}Cake;
Cake cake[100];
int comp(const void *a,const void *b){
    Cake c=*(Cake *)a;
    Cake d=*(Cake *)b;
    if((c.w*c.h)<(d.w*d.h)) return -1;
    else return 1;
}
int main(void){
    while(1){
        int n,w,h;
        int s,p;
        scanf("%d%d%d",&n,&w,&h);
        if(n+w+h==0) break;
        cake[0].w=w; cake[0].h=h;
        for(int i=0;i<n;i++){
            scanf("%d%d",&p,&s);
            p=p-1;
            w=cake[p].w; h=cake[p].h;
            s=s%(w+h);
            //printf("p:%d s:%d\n",p,s);
            Cake small,big;
            if(s<w){
                if(s<=w/2){
                    small.w=s,small.h=cake[p].h;
                    big.w=cake[p].w-s,big.h=cake[p].h;
                }
                else{
                    small.w=cake[p].w-s,small.h=cake[p].h;
                    big.w=s,big.h=cake[p].h;
                }
            }
            else{
                s=s-w;
                if(s<=h/2){
                    small.w=cake[p].w,small.h=s;
                    big.w=cake[p].w,big.h=cake[p].h-s;
                }
                else{
                    small.w=cake[p].w,small.h=cake[p].h-s;
                    big.w=cake[p].w,big.h=s;
                }
            }
            //printf("w:%d h:%d\n",small.w,small.h);
            for(int j=p;j<i;j++){
                cake[j]=cake[j+1];
            }
            cake[i]=small; cake[i+1]=big;
        }
        qsort(cake,n+1,sizeof(Cake),comp);
        for(int i=0;i<n;i++) printf("%d ",cake[i].w*cake[i].h);
        printf("%d\n",cake[n].w*cake[n].h);
    }
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cake
	.bss
	.align 32
	.type	cake, @object
	.size	cake, 800
cake:
	.zero	800
	.text
	.globl	comp
	.type	comp, @function
comp:
.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)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-4(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\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
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	jmp	.L20
.L6:
	movl	-52(%rbp), %eax
	movl	%eax, cake(%rip)
	movl	-48(%rbp), %eax
	movl	%eax, 4+cake(%rip)
	movl	$0, -36(%rbp)
	jmp	.L8
.L15:
	leaq	-44(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -52(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %edx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L9:
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L14:
	movl	-32(%rbp), %eax
	leal	1(%rax), %esi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movslq	%esi, %rax
	leaq	0(,%rax,8), %rsi
	leaq	cake(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -32(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movl	-56(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	cake(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L16:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L17
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L20:
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	cake
	.bss
	.align 32
	.type	cake, @object
	.size	cake, 800
cake:
	.zero	800
	.text
	.globl	comp
	.type	comp, @function
comp:
.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)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	-16(%rbp), %edx
	movl	-12(%rbp), %eax
	imull	%eax, %edx
	movl	-8(%rbp), %ecx
	movl	-4(%rbp), %eax
	imull	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L4
.L2:
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d "
.LC3:
	.string	"%d\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
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L18:
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	addl	%eax, %edx
	movl	-48(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	jne	.L6
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	jmp	.L20
.L6:
	movl	-52(%rbp), %eax
	movl	%eax, cake(%rip)
	movl	-48(%rbp), %eax
	movl	%eax, 4+cake(%rip)
	movl	$0, -36(%rbp)
	jmp	.L8
.L15:
	leaq	-44(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -52(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -48(%rbp)
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %edx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-44(%rbp), %edx
	movl	-52(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L9
	movl	-52(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L10
	movl	-44(%rbp), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L9:
	movl	-44(%rbp), %eax
	movl	-52(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-44(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L12
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	4+cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-44(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -20(%rbp)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -12(%rbp)
.L11:
	movl	-40(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L13
.L14:
	movl	-32(%rbp), %eax
	leal	1(%rax), %esi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movslq	%esi, %rax
	leaq	0(,%rax,8), %rsi
	leaq	cake(%rip), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -32(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L14
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	cake(%rip), %rdx
	movq	-16(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -36(%rbp)
.L8:
	movl	-56(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L15
	movl	-56(%rbp), %eax
	addl	$1, %eax
	cltq
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rsi
	leaq	cake(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L16
.L17:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L16:
	movl	-56(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L17
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	cake(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-56(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	4+cake(%rip), %rax
	movl	(%rcx,%rax), %eax
	imull	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L20:
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
