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

struct Point {
  int x;
  int y;
  bool paired;
};

int psort(const void *p1, const void *p2) {
  return ((struct Point*)p1)->x > ((struct Point*)p2)->x;
}

int main(void) {
  int N;
  int i, b, r, cnt = 0;
  struct Point *red, *blue;
  scanf("%d", &N);
  red = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  blue = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(red[i].x), &(red[i].y));
    red[i].paired = false;
  }
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(blue[i].x), &(blue[i].y));
    blue[i].paired = false;
  }

  qsort(red, N, sizeof(struct Point), psort);
  qsort(blue, N, sizeof(struct Point), psort);

  for (r = N - 1; r >= 0; r--) {
    int m = 999, mi = -1;
    for (b = N - 1; red[r].x < blue[b].x; b--) {
      if (!blue[b].paired && red[r].y < blue[b].y && m > blue[b].y) {
        m = blue[b].y;
        mi = b;
      }
    }
    if (mi >= 0) {
      blue[mi].paired = true;
      red[r].paired = true;
    }
  }

  for (i = 0; i < N; i++) {
    if (blue[i].paired) cnt++;
  }
  printf("%d\n", cnt);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	psort
	.type	psort, @function
psort:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	psort, .-psort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	movl	$0, -36(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L5
	movl	$0, -48(%rbp)
	jmp	.L6
.L7:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-16(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L8
.L13:
	movl	$999, -32(%rbp)
	movl	$-1, -28(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L10
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %ecx
	jge	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L11
	cmpl	$0, -28(%rbp)
	js	.L12
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
.L12:
	subl	$1, -40(%rbp)
.L8:
	cmpl	$0, -40(%rbp)
	jns	.L13
	movl	$0, -48(%rbp)
	jmp	.L14
.L16:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	testb	%al, %al
	je	.L15
	addl	$1, -36(%rbp)
.L15:
	addl	$1, -48(%rbp)
.L14:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	psort
	.type	psort, @function
psort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	psort, .-psort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rbp
	leaq	0(%rbp,%rbp,2), %r14
	salq	$3, %r14
	movq	%r14, %rdi
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rax, %rbx
	testl	%ebp, %ebp
	jle	.L4
	movq	%r12, %rbp
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r15d
	movb	$0, 8(%rbp)
	addq	$12, %rbp
	cmpl	%r15d, %r13d
	jg	.L5
	testl	%r13d, %r13d
	jle	.L30
	movq	%rbx, %rbp
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r15d
	movb	$0, 8(%rbp)
	addq	$12, %rbp
	cmpl	%r15d, %r13d
	jg	.L6
.L30:
	movslq	%r13d, %rbp
.L4:
	leaq	psort(%rip), %r13
	movl	$12, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	movq	%r13, %rcx
	call	qsort@PLT
	movslq	4(%rsp), %rsi
	movq	%r13, %rcx
	movq	%rbx, %rdi
	movl	$12, %edx
	call	qsort@PLT
	movl	4(%rsp), %r13d
	movl	%r13d, %r10d
	subl	$1, %r10d
	js	.L7
	movslq	%r10d, %rax
	movl	%r10d, %edx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rax
	salq	$2, %rdx
	leaq	(%rbx,%rax), %rbp
	leaq	(%r12,%rax), %r8
	subq	$12, %rax
	movq	%rax, %rcx
	movl	0(%rbp), %r11d
	leaq	(%rbx,%rax), %r9
	subq	%rdx, %rcx
	addq	%rcx, %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r8), %r14d
	cmpl	%r14d, %r11d
	jle	.L12
	movq	%r9, %rax
	movl	%r10d, %ecx
	movq	%rbp, %rdx
	movl	$-1, %edi
	movl	$999, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$0, 8(%rdx)
	jne	.L9
	movl	4(%rdx), %edx
	cmpl	%edx, 4(%r8)
	jge	.L9
	cmpl	%esi, %edx
	setl	%r15b
	testb	%r15b, %r15b
	cmovne	%ecx, %edi
	cmovne	%edx, %esi
.L9:
	movq	%rax, %rdx
	subq	$12, %rax
	subl	$1, %ecx
	cmpl	%r14d, 12(%rax)
	jg	.L11
	testl	%edi, %edi
	js	.L12
	movslq	%edi, %rdi
	movb	$1, 8(%r8)
	leaq	(%rdi,%rdi,2), %rax
	movb	$1, 8(%rbx,%rax,4)
.L12:
	subq	$12, %r8
	cmpq	%r12, %r8
	jne	.L8
.L7:
	testl	%r13d, %r13d
	jle	.L19
	movl	%r10d, %r10d
	leaq	8(%rbx), %rax
	leaq	(%r10,%r10,2), %rdx
	leaq	20(%rbx,%rdx,4), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L15:
	cmpb	$1, (%rax)
	sbbl	$-1, %edx
	addq	$12, %rax
	cmpq	%rax, %rcx
	jne	.L15
.L13:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$24, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L31:
	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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	psort
	.type	psort, @function
psort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	setg	%al
	movzbl	%al, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	psort, .-psort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.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
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rbp
	leaq	0(%rbp,%rbp,2), %r14
	salq	$3, %r14
	movq	%r14, %rdi
	call	malloc@PLT
	movq	%r14, %rdi
	movq	%rax, %r12
	call	malloc@PLT
	movq	%rax, %rbx
	testl	%ebp, %ebp
	jle	.L4
	movq	%r12, %rbp
	xorl	%r15d, %r15d
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r15d
	movb	$0, 8(%rbp)
	addq	$12, %rbp
	cmpl	%r15d, %r13d
	jg	.L5
	testl	%r13d, %r13d
	jle	.L30
	movq	%rbx, %rbp
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	4(%rbp), %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %r13d
	addl	$1, %r15d
	movb	$0, 8(%rbp)
	addq	$12, %rbp
	cmpl	%r15d, %r13d
	jg	.L6
.L30:
	movslq	%r13d, %rbp
.L4:
	leaq	psort(%rip), %r13
	movl	$12, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	movq	%r13, %rcx
	call	qsort@PLT
	movslq	4(%rsp), %rsi
	movq	%r13, %rcx
	movq	%rbx, %rdi
	movl	$12, %edx
	call	qsort@PLT
	movl	4(%rsp), %r13d
	movl	%r13d, %r10d
	subl	$1, %r10d
	js	.L7
	movslq	%r10d, %rax
	movl	%r10d, %edx
	leaq	(%rax,%rax,2), %rax
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rax
	salq	$2, %rdx
	leaq	(%rbx,%rax), %rbp
	leaq	(%r12,%rax), %r8
	subq	$12, %rax
	movq	%rax, %rcx
	movl	0(%rbp), %r11d
	leaq	(%rbx,%rax), %r9
	subq	%rdx, %rcx
	addq	%rcx, %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%r8), %r14d
	cmpl	%r14d, %r11d
	jle	.L12
	movq	%r9, %rax
	movl	%r10d, %ecx
	movq	%rbp, %rdx
	movl	$-1, %edi
	movl	$999, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$0, 8(%rdx)
	jne	.L9
	movl	4(%rdx), %edx
	cmpl	%edx, 4(%r8)
	jge	.L9
	cmpl	%esi, %edx
	setl	%r15b
	testb	%r15b, %r15b
	cmovne	%ecx, %edi
	cmovne	%edx, %esi
.L9:
	movq	%rax, %rdx
	subq	$12, %rax
	subl	$1, %ecx
	cmpl	%r14d, 12(%rax)
	jg	.L11
	testl	%edi, %edi
	js	.L12
	movslq	%edi, %rdi
	movb	$1, 8(%r8)
	leaq	(%rdi,%rdi,2), %rax
	movb	$1, 8(%rbx,%rax,4)
.L12:
	subq	$12, %r8
	cmpq	%r12, %r8
	jne	.L8
.L7:
	testl	%r13d, %r13d
	jle	.L19
	movl	%r10d, %r10d
	leaq	8(%rbx), %rax
	leaq	(%r10,%r10,2), %rdx
	leaq	20(%rbx,%rdx,4), %rcx
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L15:
	cmpb	$1, (%rax)
	sbbl	$-1, %edx
	addq	$12, %rax
	cmpq	%rax, %rcx
	jne	.L15
.L13:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$24, %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
.L19:
	.cfi_restore_state
	xorl	%edx, %edx
	jmp	.L13
.L31:
	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:

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

struct Point {
  int x;
  int y;
  bool paired;
};

int psort(const void *p1, const void *p2) {
  return ((struct Point*)p1)->x > ((struct Point*)p2)->x;
}

int main(void) {
  int N;
  int i, b, r, cnt = 0;
  struct Point *red, *blue;
  scanf("%d", &N);
  red = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  blue = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(red[i].x), &(red[i].y));
    red[i].paired = false;
  }
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(blue[i].x), &(blue[i].y));
    blue[i].paired = false;
  }

  qsort(red, N, sizeof(struct Point), psort);
  qsort(blue, N, sizeof(struct Point), psort);

  for (r = N - 1; r >= 0; r--) {
    int m = 999, mi = -1;
    for (b = N - 1; red[r].x < blue[b].x; b--) {
      if (!blue[b].paired && red[r].y < blue[b].y && m > blue[b].y) {
        m = blue[b].y;
        mi = b;
      }
    }
    if (mi >= 0) {
      blue[mi].paired = true;
      red[r].paired = true;
    }
  }

  for (i = 0; i < N; i++) {
    if (blue[i].paired) cnt++;
  }
  printf("%d\n", cnt);

  return 0;
}

2
2 2
3 5
0 0
1 1
 5
0 0
7 3
2 2
4 8
1 6
8 5
6 9
5 4
9 1
2 7
 5
0 0
1 1
5 5
6 6
7 11
2 2
3 3
4 4
8 8
9 9
 3
0 0
1 1
10 2
2 3
3 4
4 5
 5
0 0
4 1
5 5
6 6
13 11
2 2
3 3
2 4
8 8
9 16
 2
0 0
6 -1
0 0
1 1
 2
2 2
3 0
0 0
1 1

0
 5
 4
 2
 3
 1
 0

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

struct Point {
  int x;
  int y;
  bool paired;
};

int psort(const void *p1, const void *p2) {
  return ((struct Point*)p1)->x > ((struct Point*)p2)->x;
}

int main(void) {
  int N;
  int i, b, r, cnt = 0;
  struct Point *red, *blue;
  scanf("%d", &N);
  red = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  blue = (struct Point*)malloc(sizeof(struct Point) * 2 * N);
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(red[i].x), &(red[i].y));
    red[i].paired = false;
  }
  for (i = 0; i < N; i++) {
    scanf("%d %d", &(blue[i].x), &(blue[i].y));
    blue[i].paired = false;
  }

  qsort(red, N, sizeof(struct Point), psort);
  qsort(blue, N, sizeof(struct Point), psort);

  for (r = N - 1; r >= 0; r--) {
    int m = 999, mi = -1;
    for (b = N - 1; red[r].x < blue[b].x; b--) {
      if (!blue[b].paired && red[r].y < blue[b].y && m > blue[b].y) {
        m = blue[b].y;
        mi = b;
      }
    }
    if (mi >= 0) {
      blue[mi].paired = true;
      red[r].paired = true;
    }
  }

  for (i = 0; i < N; i++) {
    if (blue[i].paired) cnt++;
  }
  printf("%d\n", cnt);

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	psort
	.type	psort, @function
psort:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	psort, .-psort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	movl	$0, -36(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L5
	movl	$0, -48(%rbp)
	jmp	.L6
.L7:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-16(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L8
.L13:
	movl	$999, -32(%rbp)
	movl	$-1, -28(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L10
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %ecx
	jge	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L11
	cmpl	$0, -28(%rbp)
	js	.L12
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
.L12:
	subl	$1, -40(%rbp)
.L8:
	cmpl	$0, -40(%rbp)
	jns	.L13
	movl	$0, -48(%rbp)
	jmp	.L14
.L16:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	testb	%al, %al
	je	.L15
	addl	$1, -36(%rbp)
.L15:
	addl	$1, -48(%rbp)
.L14:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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	psort
	.type	psort, @function
psort:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	psort, .-psort
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.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
	movl	$0, -36(%rbp)
	leaq	-52(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -16(%rbp)
	movl	$0, -48(%rbp)
	jmp	.L4
.L5:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L4:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L5
	movl	$0, -48(%rbp)
	jmp	.L6
.L7:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-48(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	movq	-16(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$0, 8(%rax)
	addl	$1, -48(%rbp)
.L6:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L7
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-24(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	movslq	%eax, %rsi
	movq	-16(%rbp), %rax
	leaq	psort(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -40(%rbp)
	jmp	.L8
.L13:
	movl	$999, -32(%rbp)
	movl	$-1, -28(%rbp)
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -44(%rbp)
	jmp	.L9
.L11:
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	xorl	$1, %eax
	testb	%al, %al
	je	.L10
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, %ecx
	jge	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L10
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	4(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -28(%rbp)
.L10:
	subl	$1, -44(%rbp)
.L9:
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jl	.L11
	cmpl	$0, -28(%rbp)
	js	.L12
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movb	$1, 8(%rax)
.L12:
	subl	$1, -40(%rbp)
.L8:
	cmpl	$0, -40(%rbp)
	jns	.L13
	movl	$0, -48(%rbp)
	jmp	.L14
.L16:
	movl	-48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movq	-16(%rbp), %rax
	addq	%rdx, %rax
	movzbl	8(%rax), %eax
	testb	%al, %al
	je	.L15
	addl	$1, -36(%rbp)
.L15:
	addl	$1, -48(%rbp)
.L14:
	movl	-52(%rbp), %eax
	cmpl	%eax, -48(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
