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>
#include <stdlib.h>

typedef struct{
    int d;
    int p;
}SYUKUBA;


int struct_sort( const void *a, const void *b ){
    return ((SYUKUBA*)b)->p - ((SYUKUBA*)a)->p;
}



int main(){
    int N,sum;
    long int M,count;
    int i;
    SYUKUBA n[10003];

    while(1){
        scanf("%d %ld",&N, &M);
        if(N == 0 && M == 0){
            break;
        }

        for(i = 0; i < N ; i++){
            scanf("%d %d",&n[i].d,&n[i].p);
            //printf("d = %d p = %d\n",n[i].d,n[i].p);
        }
        qsort(n,N,sizeof(SYUKUBA),struct_sort);
        /*
        for(i = 0; i < N ; i++){
            printf("s.d = %d s.p = %d\n",n[i].d,n[i].p);
        }
        */
       count = M;
       sum = 0;
       for(i = 0; i < N ; i++){
           if(n[i].d <= count){
               count -= n[i].d;
           }else if(n[i].d > count && count != 0){
               sum += (n[i].d - count) * n[i].p;
               count = 0;
           }else if(count == 0){
               sum += n[i].p * n[i].d;
           }

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

    }


    return 0;

}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	struct_sort
	.type	struct_sort, @function
struct_sort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	struct_sort, .-struct_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %ld"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jne	.L20
	cmpq	$0, 8(%rsp)
	je	.L21
.L6:
	leaq	struct_sort(%rip), %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	movq	8(%rsp), %rcx
	testl	%edx, %edx
	jle	.L16
	subl	$1, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	24(%rsp,%rdx,8), %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	subq	%rdx, %rcx
.L11:
	addq	$8, %rax
	cmpq	%rax, %r9
	je	.L9
.L13:
	movslq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jle	.L22
	movl	4(%rax), %edi
	testq	%rcx, %rcx
	je	.L12
	subq	%rcx, %rdx
	addq	$8, %rax
	xorl	%ecx, %ecx
	imull	%edx, %edi
	addl	%edi, %r8d
	cmpq	%rax, %r9
	jne	.L13
.L9:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%edx, %edi
	addl	%edi, %r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	jle	.L6
	movq	%rbp, %r12
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	4(%r12), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addl	$1, %r15d
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	jmp	.L9
.L21:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$80056, %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
	.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
	.p2align 4
	.globl	struct_sort
	.type	struct_sort, @function
struct_sort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	struct_sort, .-struct_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %ld"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jne	.L20
	cmpq	$0, 8(%rsp)
	je	.L21
.L6:
	leaq	struct_sort(%rip), %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	movq	8(%rsp), %rcx
	testl	%edx, %edx
	jle	.L16
	subl	$1, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	24(%rsp,%rdx,8), %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	subq	%rdx, %rcx
.L11:
	addq	$8, %rax
	cmpq	%rax, %r9
	je	.L9
.L13:
	movslq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jle	.L22
	movl	4(%rax), %edi
	testq	%rcx, %rcx
	je	.L12
	subq	%rcx, %rdx
	addq	$8, %rax
	xorl	%ecx, %ecx
	imull	%edx, %edi
	addl	%edi, %r8d
	cmpq	%rax, %r9
	jne	.L13
.L9:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%edx, %edi
	addl	%edi, %r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	jle	.L6
	movq	%rbp, %r12
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	4(%r12), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addl	$1, %r15d
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	jmp	.L9
.L21:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$80056, %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
	.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
	.p2align 4
	.globl	struct_sort
	.type	struct_sort, @function
struct_sort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	struct_sort, .-struct_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %ld"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jne	.L20
	cmpq	$0, 8(%rsp)
	je	.L21
.L6:
	leaq	struct_sort(%rip), %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	movq	8(%rsp), %rcx
	testl	%edx, %edx
	jle	.L16
	subl	$1, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	24(%rsp,%rdx,8), %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	subq	%rdx, %rcx
.L11:
	addq	$8, %rax
	cmpq	%rax, %r9
	je	.L9
.L13:
	movslq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jle	.L22
	movl	4(%rax), %edi
	testq	%rcx, %rcx
	je	.L12
	subq	%rcx, %rdx
	addq	$8, %rax
	xorl	%ecx, %ecx
	imull	%edx, %edi
	addl	%edi, %r8d
	cmpq	%rax, %r9
	jne	.L13
.L9:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%edx, %edi
	addl	%edi, %r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	jle	.L6
	movq	%rbp, %r12
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	4(%r12), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addl	$1, %r15d
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	jmp	.L9
.L21:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$80056, %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
	.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>
#include <stdlib.h>

typedef struct{
    int d;
    int p;
}SYUKUBA;


int struct_sort( const void *a, const void *b ){
    return ((SYUKUBA*)b)->p - ((SYUKUBA*)a)->p;
}



int main(){
    int N,sum;
    long int M,count;
    int i;
    SYUKUBA n[10003];

    while(1){
        scanf("%d %ld",&N, &M);
        if(N == 0 && M == 0){
            break;
        }

        for(i = 0; i < N ; i++){
            scanf("%d %d",&n[i].d,&n[i].p);
            //printf("d = %d p = %d\n",n[i].d,n[i].p);
        }
        qsort(n,N,sizeof(SYUKUBA),struct_sort);
        /*
        for(i = 0; i < N ; i++){
            printf("s.d = %d s.p = %d\n",n[i].d,n[i].p);
        }
        */
       count = M;
       sum = 0;
       for(i = 0; i < N ; i++){
           if(n[i].d <= count){
               count -= n[i].d;
           }else if(n[i].d > count && count != 0){
               sum += (n[i].d - count) * n[i].p;
               count = 0;
           }else if(count == 0){
               sum += n[i].p * n[i].d;
           }

       }
       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>
#include <stdlib.h>

typedef struct{
    int d;
    int p;
}SYUKUBA;


int struct_sort( const void *a, const void *b ){
    return ((SYUKUBA*)b)->p - ((SYUKUBA*)a)->p;
}



int main(){
    int N,sum;
    long int M,count;
    int i;
    SYUKUBA n[10003];

    while(1){
        scanf("%d %ld",&N, &M);
        if(N == 0 && M == 0){
            break;
        }

        for(i = 0; i < N ; i++){
            scanf("%d %d",&n[i].d,&n[i].p);
            //printf("d = %d p = %d\n",n[i].d,n[i].p);
        }
        qsort(n,N,sizeof(SYUKUBA),struct_sort);
        /*
        for(i = 0; i < N ; i++){
            printf("s.d = %d s.p = %d\n",n[i].d,n[i].p);
        }
        */
       count = M;
       sum = 0;
       for(i = 0; i < N ; i++){
           if(n[i].d <= count){
               count -= n[i].d;
           }else if(n[i].d > count && count != 0){
               sum += (n[i].d - count) * n[i].p;
               count = 0;
           }else if(count == 0){
               sum += n[i].p * n[i].d;
           }

       }
       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>
#include <stdlib.h>

typedef struct{
    int d;
    int p;
}SYUKUBA;


int struct_sort( const void *a, const void *b ){
    return ((SYUKUBA*)b)->p - ((SYUKUBA*)a)->p;
}



int main(){
    int N,sum;
    long int M,count;
    int i;
    SYUKUBA n[10003];

    while(1){
        scanf("%d %ld",&N, &M);
        if(N == 0 && M == 0){
            break;
        }

        for(i = 0; i < N ; i++){
            scanf("%d %d",&n[i].d,&n[i].p);
            //printf("d = %d p = %d\n",n[i].d,n[i].p);
        }
        qsort(n,N,sizeof(SYUKUBA),struct_sort);
        /*
        for(i = 0; i < N ; i++){
            printf("s.d = %d s.p = %d\n",n[i].d,n[i].p);
        }
        */
       count = M;
       sum = 0;
       for(i = 0; i < N ; i++){
           if(n[i].d <= count){
               count -= n[i].d;
           }else if(n[i].d > count && count != 0){
               sum += (n[i].d - count) * n[i].p;
               count = 0;
           }else if(count == 0){
               sum += n[i].p * n[i].d;
           }

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

    }


    return 0;

}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	struct_sort
	.type	struct_sort, @function
struct_sort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	struct_sort, .-struct_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %ld"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jne	.L20
	cmpq	$0, 8(%rsp)
	je	.L21
.L6:
	leaq	struct_sort(%rip), %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	movq	8(%rsp), %rcx
	testl	%edx, %edx
	jle	.L16
	subl	$1, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	24(%rsp,%rdx,8), %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	subq	%rdx, %rcx
.L11:
	addq	$8, %rax
	cmpq	%rax, %r9
	je	.L9
.L13:
	movslq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jle	.L22
	movl	4(%rax), %edi
	testq	%rcx, %rcx
	je	.L12
	subq	%rcx, %rdx
	addq	$8, %rax
	xorl	%ecx, %ecx
	imull	%edx, %edi
	addl	%edi, %r8d
	cmpq	%rax, %r9
	jne	.L13
.L9:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%edx, %edi
	addl	%edi, %r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	jle	.L6
	movq	%rbp, %r12
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	4(%r12), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addl	$1, %r15d
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	jmp	.L9
.L21:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$80056, %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
	.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
	.p2align 4
	.globl	struct_sort
	.type	struct_sort, @function
struct_sort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	subl	4(%rdi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	struct_sort, .-struct_sort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %ld"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	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	-77824(%rsp), %r11
	.cfi_def_cfa 11, 77880
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2232, %rsp
	.cfi_def_cfa_offset 80112
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	16(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%r14, %rdx
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	testl	%esi, %esi
	jne	.L20
	cmpq	$0, 8(%rsp)
	je	.L21
.L6:
	leaq	struct_sort(%rip), %rcx
	movl	$8, %edx
	movq	%rbp, %rdi
	call	qsort@PLT
	movl	4(%rsp), %edx
	movq	8(%rsp), %rcx
	testl	%edx, %edx
	jle	.L16
	subl	$1, %edx
	movq	%rbp, %rax
	xorl	%r8d, %r8d
	leaq	24(%rsp,%rdx,8), %r9
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	subq	%rdx, %rcx
.L11:
	addq	$8, %rax
	cmpq	%rax, %r9
	je	.L9
.L13:
	movslq	(%rax), %rdx
	cmpq	%rcx, %rdx
	jle	.L22
	movl	4(%rax), %edi
	testq	%rcx, %rcx
	je	.L12
	subq	%rcx, %rdx
	addq	$8, %rax
	xorl	%ecx, %ecx
	imull	%edx, %edi
	addl	%edi, %r8d
	cmpq	%rax, %r9
	jne	.L13
.L9:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L12:
	imull	%edx, %edi
	addl	%edi, %r8d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L20:
	jle	.L6
	movq	%rbp, %r12
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rsi
	leaq	4(%r12), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addl	$1, %r15d
	addq	$8, %r12
	cmpl	%r15d, %esi
	jg	.L8
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	jmp	.L9
.L21:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$80056, %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
	.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:
```