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 {
	long a;
	long b;
} S_BRIDGE;

int cmpAscVal(const void * n1, const void * n2)
{
	if (((S_BRIDGE *)n1)->a > ((S_BRIDGE *)n2)->a)
	{
		return 1;
	}
	else if (((S_BRIDGE *)n1)->a < ((S_BRIDGE *)n2)->a)
	{
		return -1;
	}
	else
	{
    if (((S_BRIDGE *)n1)->b > ((S_BRIDGE *)n2)->b)
  	{
  		return 1;
  	}
  	else if (((S_BRIDGE *)n1)->b < ((S_BRIDGE *)n2)->b)
  	{
  		return -1;
  	}
    else
  	{
  		return 0;
  	}
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_BRIDGE bridge[m];
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld", &bridge[i].a, &bridge[i].b);
  }
  qsort(bridge, m, sizeof(S_BRIDGE), cmpAscVal);
  long ans = 1;
  long prev_a = bridge[0].a;
  long prev_b = bridge[0].b;
  for (long i = 1; i < m; i++) {
    if (bridge[i].a == prev_a) {
      continue;
    }
    if (bridge[i].a < prev_b) {
      prev_a = bridge[i].a;
      if (bridge[i].b < prev_b) {
        prev_b = bridge[i].b;
      }
      continue;
    }
    ans++;
    prev_a = bridge[i].a;
    prev_b = bridge[i].b;
  }
  printf("%ld\n", ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpAscVal
	.type	cmpAscVal, @function
cmpAscVal:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscVal, .-cmpAscVal
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L11
.L12:
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L11:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L12
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpAscVal(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -104(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L13
.L18:
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -96(%rbp)
	je	.L21
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L16
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L22
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L22
.L16:
	addq	$1, -104(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L15
.L21:
	nop
	jmp	.L15
.L22:
	nop
.L15:
	addq	$1, -80(%rbp)
.L13:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L18
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	cmpAscVal
	.type	cmpAscVal, @function
cmpAscVal:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	movl	$-1, %eax
	jl	.L1
	movq	8(%rsi), %rcx
	movl	$1, %eax
	cmpq	%rcx, 8(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpAscVal, .-cmpAscVal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L9
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L25
.L9:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L26
.L10:
	leaq	7(%rsp), %rax
	movq	%rax, %r15
	andq	$-8, %rax
	shrq	$3, %r15
	movq	%rax, %rbx
	testq	%rsi, %rsi
	jle	.L11
	movq	%rax, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L12
.L11:
	movq	%rbx, %rdi
	leaq	cmpAscVal(%rip), %rcx
	movl	$16, %edx
	call	qsort@PLT
	movq	-64(%rbp), %r9
	movq	0(,%r15,8), %rdi
	movq	8(,%r15,8), %rsi
	cmpq	$1, %r9
	jle	.L18
	leaq	16(%rbx), %rax
	movl	$1, %ecx
	movl	$1, %r8d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rdi, %rsi
	addq	$1, %r8
	movq	%rdx, %rdi
.L14:
	addq	$1, %rcx
	addq	$16, %rax
	cmpq	%rcx, %r9
	je	.L13
.L16:
	movq	(%rax), %rdx
	cmpq	%rdx, %rdi
	je	.L14
	movq	8(%rax), %rdi
	cmpq	%rdx, %rsi
	jle	.L15
	cmpq	%rdi, %rsi
	cmovg	%rdi, %rsi
	addq	$1, %rcx
	movq	%rdx, %rdi
	addq	$16, %rax
	cmpq	%rcx, %r9
	jne	.L16
.L13:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L26:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L10
.L18:
	movl	$1, %r8d
	jmp	.L13
.L27:
	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	cmpAscVal
	.type	cmpAscVal, @function
cmpAscVal:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	movl	$-1, %eax
	jl	.L1
	movq	8(%rsi), %rcx
	movl	$1, %eax
	cmpq	%rcx, 8(%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpAscVal, .-cmpAscVal
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	leaq	.LC0(%rip), %r14
	leaq	-64(%rbp), %rdx
	pushq	%r13
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$4, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L9
.L25:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L25
.L9:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L26
.L10:
	leaq	7(%rsp), %rax
	movq	%rax, %r15
	andq	$-8, %rax
	shrq	$3, %r15
	movq	%rax, %rbx
	testq	%rsi, %rsi
	jle	.L11
	movq	%rax, %r12
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r12, %rsi
	leaq	8(%r12), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rsi
	addq	$1, %r13
	addq	$16, %r12
	cmpq	%r13, %rsi
	jg	.L12
.L11:
	movq	%rbx, %rdi
	leaq	cmpAscVal(%rip), %rcx
	movl	$16, %edx
	call	qsort@PLT
	movq	-64(%rbp), %r9
	movq	0(,%r15,8), %rdi
	movq	8(,%r15,8), %rsi
	cmpq	$1, %r9
	jle	.L18
	leaq	16(%rbx), %rax
	movl	$1, %ecx
	movl	$1, %r8d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rdi, %rsi
	addq	$1, %r8
	movq	%rdx, %rdi
.L14:
	addq	$1, %rcx
	addq	$16, %rax
	cmpq	%rcx, %r9
	je	.L13
.L16:
	movq	(%rax), %rdx
	cmpq	%rdx, %rdi
	je	.L14
	movq	8(%rax), %rdi
	cmpq	%rdx, %rsi
	jle	.L15
	cmpq	%rdi, %rsi
	cmovg	%rdi, %rsi
	addq	$1, %rcx
	movq	%rdx, %rdi
	addq	$16, %rax
	cmpq	%rcx, %r9
	jne	.L16
.L13:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L27
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L26:
	.cfi_restore_state
	orq	$0, -8(%rsp,%rax)
	jmp	.L10
.L18:
	movl	$1, %r8d
	jmp	.L13
.L27:
	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>

typedef struct {
	long a;
	long b;
} S_BRIDGE;

int cmpAscVal(const void * n1, const void * n2)
{
	if (((S_BRIDGE *)n1)->a > ((S_BRIDGE *)n2)->a)
	{
		return 1;
	}
	else if (((S_BRIDGE *)n1)->a < ((S_BRIDGE *)n2)->a)
	{
		return -1;
	}
	else
	{
    if (((S_BRIDGE *)n1)->b > ((S_BRIDGE *)n2)->b)
  	{
  		return 1;
  	}
  	else if (((S_BRIDGE *)n1)->b < ((S_BRIDGE *)n2)->b)
  	{
  		return -1;
  	}
    else
  	{
  		return 0;
  	}
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_BRIDGE bridge[m];
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld", &bridge[i].a, &bridge[i].b);
  }
  qsort(bridge, m, sizeof(S_BRIDGE), cmpAscVal);
  long ans = 1;
  long prev_a = bridge[0].a;
  long prev_b = bridge[0].b;
  for (long i = 1; i < m; i++) {
    if (bridge[i].a == prev_a) {
      continue;
    }
    if (bridge[i].a < prev_b) {
      prev_a = bridge[i].a;
      if (bridge[i].b < prev_b) {
        prev_b = bridge[i].b;
      }
      continue;
    }
    ans++;
    prev_a = bridge[i].a;
    prev_b = bridge[i].b;
  }
  printf("%ld\n", ans);

  return 0;
}
5 2
2 4
2 5
 9 5
1 8
2 7
3 5
4 6
7 5
 5 10
1 2
1 4
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
 5 10
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 5
3 5
4 5
 5 2
1 5
2 5
 5 1
1 5
2 5
 5 1
0 5
2 5
 5 2
1 4
2 8
 9 5
2 8
2 7
3 5
4 6
7 5
 5 2
0 5
2 5

1
 2
 4
 3
 1
 1
 1
 1
 2
 1

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 {
	long a;
	long b;
} S_BRIDGE;

int cmpAscVal(const void * n1, const void * n2)
{
	if (((S_BRIDGE *)n1)->a > ((S_BRIDGE *)n2)->a)
	{
		return 1;
	}
	else if (((S_BRIDGE *)n1)->a < ((S_BRIDGE *)n2)->a)
	{
		return -1;
	}
	else
	{
    if (((S_BRIDGE *)n1)->b > ((S_BRIDGE *)n2)->b)
  	{
  		return 1;
  	}
  	else if (((S_BRIDGE *)n1)->b < ((S_BRIDGE *)n2)->b)
  	{
  		return -1;
  	}
    else
  	{
  		return 0;
  	}
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_BRIDGE bridge[m];
  for (long i = 0; i < m; i++) {
    scanf("%ld %ld", &bridge[i].a, &bridge[i].b);
  }
  qsort(bridge, m, sizeof(S_BRIDGE), cmpAscVal);
  long ans = 1;
  long prev_a = bridge[0].a;
  long prev_b = bridge[0].b;
  for (long i = 1; i < m; i++) {
    if (bridge[i].a == prev_a) {
      continue;
    }
    if (bridge[i].a < prev_b) {
      prev_a = bridge[i].a;
      if (bridge[i].b < prev_b) {
        prev_b = bridge[i].b;
      }
      continue;
    }
    ans++;
    prev_a = bridge[i].a;
    prev_b = bridge[i].b;
  }
  printf("%ld\n", ans);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpAscVal
	.type	cmpAscVal, @function
cmpAscVal:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscVal, .-cmpAscVal
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L11
.L12:
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L11:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L12
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpAscVal(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -104(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L13
.L18:
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -96(%rbp)
	je	.L21
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L16
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L22
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L22
.L16:
	addq	$1, -104(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L15
.L21:
	nop
	jmp	.L15
.L22:
	nop
.L15:
	addq	$1, -80(%rbp)
.L13:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L18
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	cmpAscVal
	.type	cmpAscVal, @function
cmpAscVal:
.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
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscVal, .-cmpAscVal
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-120(%rbp), %rdx
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -72(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$4, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -64(%rbp)
	movq	$0, -112(%rbp)
	jmp	.L11
.L12:
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	leaq	8(%rax), %rdx
	movq	-112(%rbp), %rax
	salq	$4, %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -112(%rbp)
.L11:
	movq	-120(%rbp), %rax
	cmpq	%rax, -112(%rbp)
	jl	.L12
	movq	-120(%rbp), %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rax
	leaq	cmpAscVal(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -104(%rbp)
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -88(%rbp)
	movq	$1, -80(%rbp)
	jmp	.L13
.L18:
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -96(%rbp)
	je	.L21
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L16
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, -88(%rbp)
	jle	.L22
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L22
.L16:
	addq	$1, -104(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movq	-64(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)
	jmp	.L15
.L21:
	nop
	jmp	.L15
.L22:
	nop
.L15:
	addq	$1, -80(%rbp)
.L13:
	movq	-120(%rbp), %rax
	cmpq	%rax, -80(%rbp)
	jl	.L18
	movq	-104(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
