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

```c
#include <stdio.h>
#define P_MAX 100

int main(void)
{
    int length[P_MAX + 1], n, m, d, p, sum;

    while(scanf("%d %d", &n, &m), n + m)
    {
        for(p = 0; p <= P_MAX; p++)
            length[p] = 0;

        while(n--)
        {
            scanf("%d %d", &d, &p);
            length[p] += d;
        }

        for(p = P_MAX; p >= 0 && m > 0; p--)
            if(length[p] <= m) m -= length[p], length[p] = 0;
            else length[p] -= m, m = 0;

        for(sum = p = 0; p <= P_MAX; p++)
            sum += p * length[p];

        printf("%d\n", sum);
    }

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	addl	%edx, %eax
	je	.L26
	leaq	32(%rsp), %rbx
	xorl	%eax, %eax
	movl	$50, %ecx
	movl	$101, 28(%rsp)
	movq	%rbx, %rdi
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 16(%rsp)
	movl	$0, (%rdi)
	testl	%esi, %esi
	je	.L3
	leaq	28(%rsp), %r14
	leaq	24(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movl	24(%rsp), %edx
	addl	%edx, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L4
	movl	20(%rsp), %edx
.L3:
	movl	$100, 28(%rsp)
	movl	$99, %eax
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$0, 4(%rbx,%rax,4)
	movl	%eax, %r12d
	subq	$1, %rax
	subl	%ecx, %edx
	movl	$1, %ecx
	cmpq	$-2, %rax
	je	.L8
.L5:
	testl	%edx, %edx
	jle	.L27
	movl	4(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jle	.L28
	subl	%edx, %ecx
	movl	%eax, %r12d
	xorl	%edx, %edx
	movl	%ecx, 36(%rsp,%rax,4)
.L8:
	movl	%edx, 20(%rsp)
	movl	%r12d, 28(%rsp)
.L9:
	movdqa	.LC0(%rip), %xmm4
	leaq	432(%rsp), %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm3
	movdqa	%xmm4, %xmm1
	addq	$16, %rbx
	paddd	.LC2(%rip), %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	-16(%rbx), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	imull	$100, 432(%rsp), %edx
	movq	%r15, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm1
	movl	$101, 28(%rsp)
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L27:
	testb	%cl, %cl
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$456, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	addl	%edx, %eax
	je	.L26
	leaq	32(%rsp), %rbx
	xorl	%eax, %eax
	movl	$50, %ecx
	movl	$101, 28(%rsp)
	movq	%rbx, %rdi
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 16(%rsp)
	movl	$0, (%rdi)
	testl	%esi, %esi
	je	.L3
	leaq	28(%rsp), %r14
	leaq	24(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movl	24(%rsp), %edx
	addl	%edx, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L4
	movl	20(%rsp), %edx
.L3:
	movl	$100, 28(%rsp)
	movl	$99, %eax
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$0, 4(%rbx,%rax,4)
	movl	%eax, %r12d
	subq	$1, %rax
	subl	%ecx, %edx
	movl	$1, %ecx
	cmpq	$-2, %rax
	je	.L8
.L5:
	testl	%edx, %edx
	jle	.L27
	movl	4(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jle	.L28
	subl	%edx, %ecx
	movl	%eax, %r12d
	xorl	%edx, %edx
	movl	%ecx, 36(%rsp,%rax,4)
.L8:
	movl	%edx, 20(%rsp)
	movl	%r12d, 28(%rsp)
.L9:
	movdqa	.LC0(%rip), %xmm4
	leaq	432(%rsp), %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm3
	movdqa	%xmm4, %xmm1
	addq	$16, %rbx
	paddd	.LC2(%rip), %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	-16(%rbx), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	imull	$100, 432(%rsp), %edx
	movq	%r15, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm1
	movl	$101, 28(%rsp)
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L27:
	testb	%cl, %cl
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$456, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	addl	%edx, %eax
	je	.L26
	leaq	32(%rsp), %rbx
	xorl	%eax, %eax
	movl	$50, %ecx
	movl	$101, 28(%rsp)
	movq	%rbx, %rdi
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 16(%rsp)
	movl	$0, (%rdi)
	testl	%esi, %esi
	je	.L3
	leaq	28(%rsp), %r14
	leaq	24(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movl	24(%rsp), %edx
	addl	%edx, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L4
	movl	20(%rsp), %edx
.L3:
	movl	$100, 28(%rsp)
	movl	$99, %eax
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$0, 4(%rbx,%rax,4)
	movl	%eax, %r12d
	subq	$1, %rax
	subl	%ecx, %edx
	movl	$1, %ecx
	cmpq	$-2, %rax
	je	.L8
.L5:
	testl	%edx, %edx
	jle	.L27
	movl	4(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jle	.L28
	subl	%edx, %ecx
	movl	%eax, %r12d
	xorl	%edx, %edx
	movl	%ecx, 36(%rsp,%rax,4)
.L8:
	movl	%edx, 20(%rsp)
	movl	%r12d, 28(%rsp)
.L9:
	movdqa	.LC0(%rip), %xmm4
	leaq	432(%rsp), %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm3
	movdqa	%xmm4, %xmm1
	addq	$16, %rbx
	paddd	.LC2(%rip), %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	-16(%rbx), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	imull	$100, 432(%rsp), %edx
	movq	%r15, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm1
	movl	$101, 28(%rsp)
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L27:
	testb	%cl, %cl
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$456, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>
#define P_MAX 100

int main(void)
{
    int length[P_MAX + 1], n, m, d, p, sum;

    while(scanf("%d %d", &n, &m), n + m)
    {
        for(p = 0; p <= P_MAX; p++)
            length[p] = 0;

        while(n--)
        {
            scanf("%d %d", &d, &p);
            length[p] += d;
        }

        for(p = P_MAX; p >= 0 && m > 0; p--)
            if(length[p] <= m) m -= length[p], length[p] = 0;
            else length[p] -= m, m = 0;

        for(sum = p = 0; p <= P_MAX; p++)
            sum += p * length[p];

        printf("%d\n", sum);
    }

    return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define P_MAX 100

int main(void)
{
    int length[P_MAX + 1], n, m, d, p, sum;

    while(scanf("%d %d", &n, &m), n + m)
    {
        for(p = 0; p <= P_MAX; p++)
            length[p] = 0;

        while(n--)
        {
            scanf("%d %d", &d, &p);
            length[p] += d;
        }

        for(p = P_MAX; p >= 0 && m > 0; p--)
            if(length[p] <= m) m -= length[p], length[p] = 0;
            else length[p] -= m, m = 0;

        for(sum = p = 0; p <= P_MAX; p++)
            sum += p * length[p];

        printf("%d\n", sum);
    }

    return 0;
}```

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.
Optimized Assembly Code:

2 8
5 6
4 5
3 2
5 10
5 10
5 10
0 0
 2 8
5 6
4 5
3 2
5 10
3 10
5 10
0 0
 2 8
5 6
4 5
3 2
1 10
5 10
5 10
0 0
 2 8
5 6
4 5
3 1
3 10
5 10
5 10
0 0
 2 8
5 6
4 5
3 2
5 10
7 10
5 10
0 0
 2 8
5 6
4 5
3 2
0 10
5 10
5 10
0 0
 2 8
5 6
4 5
3 2
0 10
7 10
5 10
0 0
 2 8
5 6
4 5
3 4
0 5
5 10
5 10
0 0
 2 8
5 6
4 5
3 2
0 6
7 10
4 7
0 0
 2 8
7 6
4 5
3 2
5 10
3 10
5 10
0 0

5
130
 5
110
 5
90
 5
120
 5
150
 5
80
 5
100
 5
60
 5
78
 15
110

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

```c
#include <stdio.h>
#define P_MAX 100

int main(void)
{
    int length[P_MAX + 1], n, m, d, p, sum;

    while(scanf("%d %d", &n, &m), n + m)
    {
        for(p = 0; p <= P_MAX; p++)
            length[p] = 0;

        while(n--)
        {
            scanf("%d %d", &d, &p);
            length[p] += d;
        }

        for(p = P_MAX; p >= 0 && m > 0; p--)
            if(length[p] <= m) m -= length[p], length[p] = 0;
            else length[p] -= m, m = 0;

        for(sum = p = 0; p <= P_MAX; p++)
            sum += p * length[p];

        printf("%d\n", sum);
    }

    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	addl	%edx, %eax
	je	.L26
	leaq	32(%rsp), %rbx
	xorl	%eax, %eax
	movl	$50, %ecx
	movl	$101, 28(%rsp)
	movq	%rbx, %rdi
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 16(%rsp)
	movl	$0, (%rdi)
	testl	%esi, %esi
	je	.L3
	leaq	28(%rsp), %r14
	leaq	24(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movl	24(%rsp), %edx
	addl	%edx, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L4
	movl	20(%rsp), %edx
.L3:
	movl	$100, 28(%rsp)
	movl	$99, %eax
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$0, 4(%rbx,%rax,4)
	movl	%eax, %r12d
	subq	$1, %rax
	subl	%ecx, %edx
	movl	$1, %ecx
	cmpq	$-2, %rax
	je	.L8
.L5:
	testl	%edx, %edx
	jle	.L27
	movl	4(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jle	.L28
	subl	%edx, %ecx
	movl	%eax, %r12d
	xorl	%edx, %edx
	movl	%ecx, 36(%rsp,%rax,4)
.L8:
	movl	%edx, 20(%rsp)
	movl	%r12d, 28(%rsp)
.L9:
	movdqa	.LC0(%rip), %xmm4
	leaq	432(%rsp), %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm3
	movdqa	%xmm4, %xmm1
	addq	$16, %rbx
	paddd	.LC2(%rip), %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	-16(%rbx), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	imull	$100, 432(%rsp), %edx
	movq	%r15, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm1
	movl	$101, 28(%rsp)
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L27:
	testb	%cl, %cl
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$456, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC3(%rip), %r15
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	addl	%edx, %eax
	je	.L26
	leaq	32(%rsp), %rbx
	xorl	%eax, %eax
	movl	$50, %ecx
	movl	$101, 28(%rsp)
	movq	%rbx, %rdi
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 16(%rsp)
	movl	$0, (%rdi)
	testl	%esi, %esi
	je	.L3
	leaq	28(%rsp), %r14
	leaq	24(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	movl	24(%rsp), %edx
	addl	%edx, 32(%rsp,%rax,4)
	movl	16(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 16(%rsp)
	testl	%eax, %eax
	jne	.L4
	movl	20(%rsp), %edx
.L3:
	movl	$100, 28(%rsp)
	movl	$99, %eax
	xorl	%ecx, %ecx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$0, 4(%rbx,%rax,4)
	movl	%eax, %r12d
	subq	$1, %rax
	subl	%ecx, %edx
	movl	$1, %ecx
	cmpq	$-2, %rax
	je	.L8
.L5:
	testl	%edx, %edx
	jle	.L27
	movl	4(%rbx,%rax,4), %ecx
	cmpl	%edx, %ecx
	jle	.L28
	subl	%edx, %ecx
	movl	%eax, %r12d
	xorl	%edx, %edx
	movl	%ecx, 36(%rsp,%rax,4)
.L8:
	movl	%edx, 20(%rsp)
	movl	%r12d, 28(%rsp)
.L9:
	movdqa	.LC0(%rip), %xmm4
	leaq	432(%rsp), %rax
	pxor	%xmm0, %xmm0
	.p2align 4,,10
	.p2align 3
.L11:
	movdqa	(%rbx), %xmm3
	movdqa	%xmm4, %xmm1
	addq	$16, %rbx
	paddd	.LC2(%rip), %xmm4
	movdqa	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	-16(%rbx), %xmm2
	pshufd	$8, %xmm2, %xmm2
	psrlq	$32, %xmm3
	pmuludq	%xmm3, %xmm1
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	paddd	%xmm2, %xmm0
	cmpq	%rax, %rbx
	jne	.L11
	movdqa	%xmm0, %xmm1
	imull	$100, 432(%rsp), %edx
	movq	%r15, %rsi
	movl	$1, %edi
	psrldq	$8, %xmm1
	movl	$101, 28(%rsp)
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L27:
	testb	%cl, %cl
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L29
	addq	$456, %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
.L29:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC2:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```