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>

#define N 10000
#define INT(X) \
  ( *( (const int *)(X) ) )
#define MAX(A,B) \
  ( (A) > (B) ? (A) : (B) )

int compare (
  const void  * a,
  const void  * b
  )
{
  return ( INT( a ) - INT( b ) );
}

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    int ev[ N * 2 ];
    int nanikaka = 0;
    int res = 0;
    int n;

    scanf ( " %d", &n );
    if ( !( n ) ) break ;

    for ( i = 0; i < n * 2; ++i )
    {
      int h, m, s;

      scanf ( " %d:%d:%d", &h, &m, &s );
      ev[ i ] = ( ( h * 3600 + m * 60 + s ) << 1 ) + !( i % 2 );
    }

    qsort ( ev, n * 2, sizeof ( int ), compare );

    for ( i = 0; i < n * 2; ++i )
    {
      nanikaka += 2 * ( ev[ i ] & 1 ) - 1;
      res = MAX( res, nanikaka );
    }

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

  return ( 0 );
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
.LC1:
	.string	" %d:%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), %r13
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	leaq	28(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	addl	%esi, %esi
	leaq	32(%rsp), %rbx
	testl	%esi, %esi
	jle	.L5
	xorl	%r15d, %r15d
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	imull	$60, 24(%rsp), %edx
	imull	$3600, 20(%rsp), %eax
	addl	%edx, %eax
	movl	%r15d, %edx
	addl	28(%rsp), %eax
	notl	%edx
	andl	$1, %edx
	leal	(%rdx,%rax,2), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	16(%rsp), %eax
	addq	$1, %r15
	leal	(%rax,%rax), %esi
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movslq	%esi, %rsi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	addl	%eax, %eax
	testl	%eax, %eax
	jle	.L11
	subl	$1, %eax
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx), %edx
	andl	$1, %edx
	leal	-1(%rax,%rdx,2), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rbx
	cmpq	%rbx, %rcx
	jne	.L8
.L7:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L17:
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
.LC1:
	.string	" %d:%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), %r13
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	leaq	28(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	addl	%esi, %esi
	leaq	32(%rsp), %rbx
	testl	%esi, %esi
	jle	.L5
	xorl	%r15d, %r15d
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	imull	$60, 24(%rsp), %edx
	imull	$3600, 20(%rsp), %eax
	addl	%edx, %eax
	movl	%r15d, %edx
	addl	28(%rsp), %eax
	notl	%edx
	andl	$1, %edx
	leal	(%rdx,%rax,2), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	16(%rsp), %eax
	addq	$1, %r15
	leal	(%rax,%rax), %esi
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movslq	%esi, %rsi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	addl	%eax, %eax
	testl	%eax, %eax
	jle	.L11
	subl	$1, %eax
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx), %edx
	andl	$1, %edx
	leal	-1(%rax,%rdx,2), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rbx
	cmpq	%rbx, %rcx
	jne	.L8
.L7:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L17:
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
.LC1:
	.string	" %d:%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), %r13
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	leaq	28(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	addl	%esi, %esi
	leaq	32(%rsp), %rbx
	testl	%esi, %esi
	jle	.L5
	xorl	%r15d, %r15d
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	imull	$60, 24(%rsp), %edx
	imull	$3600, 20(%rsp), %eax
	addl	%edx, %eax
	movl	%r15d, %edx
	addl	28(%rsp), %eax
	notl	%edx
	andl	$1, %edx
	leal	(%rdx,%rax,2), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	16(%rsp), %eax
	addq	$1, %r15
	leal	(%rax,%rax), %esi
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movslq	%esi, %rsi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	addl	%eax, %eax
	testl	%eax, %eax
	jle	.L11
	subl	$1, %eax
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx), %edx
	andl	$1, %edx
	leal	-1(%rax,%rdx,2), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rbx
	cmpq	%rbx, %rcx
	jne	.L8
.L7:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L17:
	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>

#define N 10000
#define INT(X) \
  ( *( (const int *)(X) ) )
#define MAX(A,B) \
  ( (A) > (B) ? (A) : (B) )

int compare (
  const void  * a,
  const void  * b
  )
{
  return ( INT( a ) - INT( b ) );
}

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    int ev[ N * 2 ];
    int nanikaka = 0;
    int res = 0;
    int n;

    scanf ( " %d", &n );
    if ( !( n ) ) break ;

    for ( i = 0; i < n * 2; ++i )
    {
      int h, m, s;

      scanf ( " %d:%d:%d", &h, &m, &s );
      ev[ i ] = ( ( h * 3600 + m * 60 + s ) << 1 ) + !( i % 2 );
    }

    qsort ( ev, n * 2, sizeof ( int ), compare );

    for ( i = 0; i < n * 2; ++i )
    {
      nanikaka += 2 * ( ev[ i ] & 1 ) - 1;
      res = MAX( res, nanikaka );
    }

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

  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>

#define N 10000
#define INT(X) \
  ( *( (const int *)(X) ) )
#define MAX(A,B) \
  ( (A) > (B) ? (A) : (B) )

int compare (
  const void  * a,
  const void  * b
  )
{
  return ( INT( a ) - INT( b ) );
}

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    int ev[ N * 2 ];
    int nanikaka = 0;
    int res = 0;
    int n;

    scanf ( " %d", &n );
    if ( !( n ) ) break ;

    for ( i = 0; i < n * 2; ++i )
    {
      int h, m, s;

      scanf ( " %d:%d:%d", &h, &m, &s );
      ev[ i ] = ( ( h * 3600 + m * 60 + s ) << 1 ) + !( i % 2 );
    }

    qsort ( ev, n * 2, sizeof ( int ), compare );

    for ( i = 0; i < n * 2; ++i )
    {
      nanikaka += 2 * ( ev[ i ] & 1 ) - 1;
      res = MAX( res, nanikaka );
    }

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

  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:

3
05:47:15 04:45:90
12:12:59 12:13:00
16:30:20 21:18:53
6
00:00:00 03:00:00
01:00:00 03:00:00
02:00:00 03:00:00
03:00:00 04:00:00
03:00:00 05:00:00
03:00:00 06:00:00
0
 3
05:47:15 09:54:40
12:12:59 12:13:00
16:30:20 21:18:53
6
00:00:00 03:00:00
01:00:00 03:00:00
02:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
03:00:00 06:00:00
0
 3
05:67:15 09:54:40
12:12:59 12:13:00
02:03:61 21:18:53
6
00:00:00 03:00:00
01:00:00 03:00:00
02:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
03:00:00 06:00:00
0
 3
05:67:15 09:54:40
12:12:59 12:13:00
16:30:20 21:18:53
6
00:00:00 03:00:00
01:00:00 03:00:00
02:00:00 03:00:00
02:00:00 04:00:00
00:30:00 05:00:00
03:00:00 06:00:00
0
 3
05:57:15 09:54:40
12:12:59 12:13:00
16:30:20 21:18:53
6
00:00:00 00:00:30
01:00:00 00:00:30
02:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
00:01:30 00:00:70
0
 3
05:57:15 09:54:40
12:12:59 12:13:00
02:03:61 21:18:53
6
00:00:00 00:00:30
01:00:00 03:00:00
02:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
03:10:00 06:00:00
0
 3
05:57:15 19:54:40
12:12:59 12:13:00
16:30:20 21:18:53
6
00:00:00 00:00:30
01:00:00 00:00:30
02:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
00:01:30 00:00:70
0
 3
05:67:15 09:54:40
12:12:59 12:13:00
02:03:61 21:18:63
6
00:00:00 03:00:00
00:00:10 03:00:00
02:00:00 03:00:00
02:00:00 04:00:00
00:30:00 05:00:00
03:00:00 06:00:00
0
 3
05:67:15 09:54:41
11:12:59 00:31:21
15:40:20 21:18:53
0
00:00:00 03:00:00
00:00:10 00:00:30
20:00:00 03:00:00
03:00:00 04:00:00
00:30:00 05:00:00
00:10:30 06:00:00
0
 3
05:67:15 09:53:40
11:12:59 00:31:21
15:30:20 21:18:53
6
00:00:00 03:00:00
01:00:00 03:00:00
02:00:00 03:00:00
00:00:30 04:00:00
00:30:00 05:00:00
00:00:30 06:00:00
0

1
3
 1
4
 2
4
 1
5
 1
2
 2
3
 2
2
 2
5
 1
 1
6

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>

#define N 10000
#define INT(X) \
  ( *( (const int *)(X) ) )
#define MAX(A,B) \
  ( (A) > (B) ? (A) : (B) )

int compare (
  const void  * a,
  const void  * b
  )
{
  return ( INT( a ) - INT( b ) );
}

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  int i;

  for ( ; ; )
  {
    int ev[ N * 2 ];
    int nanikaka = 0;
    int res = 0;
    int n;

    scanf ( " %d", &n );
    if ( !( n ) ) break ;

    for ( i = 0; i < n * 2; ++i )
    {
      int h, m, s;

      scanf ( " %d:%d:%d", &h, &m, &s );
      ev[ i ] = ( ( h * 3600 + m * 60 + s ) << 1 ) + !( i % 2 );
    }

    qsort ( ev, n * 2, sizeof ( int ), compare );

    for ( i = 0; i < n * 2; ++i )
    {
      nanikaka += 2 * ( ev[ i ] & 1 ) - 1;
      res = MAX( res, nanikaka );
    }

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

  return ( 0 );
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
.LC1:
	.string	" %d:%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), %r13
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	leaq	28(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	addl	%esi, %esi
	leaq	32(%rsp), %rbx
	testl	%esi, %esi
	jle	.L5
	xorl	%r15d, %r15d
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	imull	$60, 24(%rsp), %edx
	imull	$3600, 20(%rsp), %eax
	addl	%edx, %eax
	movl	%r15d, %edx
	addl	28(%rsp), %eax
	notl	%edx
	andl	$1, %edx
	leal	(%rdx,%rax,2), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	16(%rsp), %eax
	addq	$1, %r15
	leal	(%rax,%rax), %esi
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movslq	%esi, %rsi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	addl	%eax, %eax
	testl	%eax, %eax
	jle	.L11
	subl	$1, %eax
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx), %edx
	andl	$1, %edx
	leal	-1(%rax,%rdx,2), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rbx
	cmpq	%rbx, %rcx
	jne	.L8
.L7:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L17:
	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	compare
	.type	compare, @function
compare:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	compare, .-compare
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
.LC1:
	.string	" %d:%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), %r13
	movq	%fs:40, %rax
	movq	%rax, 80040(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	leaq	28(%rsp), %r14
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	8(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	addl	%esi, %esi
	leaq	32(%rsp), %rbx
	testl	%esi, %esi
	jle	.L5
	xorl	%r15d, %r15d
	leaq	24(%rsp), %r12
	leaq	20(%rsp), %rbp
	leaq	32(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rcx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	imull	$60, 24(%rsp), %edx
	imull	$3600, 20(%rsp), %eax
	addl	%edx, %eax
	movl	%r15d, %edx
	addl	28(%rsp), %eax
	notl	%edx
	andl	$1, %edx
	leal	(%rdx,%rax,2), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	16(%rsp), %eax
	addq	$1, %r15
	leal	(%rax,%rax), %esi
	cmpl	%r15d, %esi
	jg	.L6
.L5:
	movslq	%esi, %rsi
	leaq	compare(%rip), %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	16(%rsp), %eax
	addl	%eax, %eax
	testl	%eax, %eax
	jle	.L11
	subl	$1, %eax
	xorl	%r8d, %r8d
	leaq	36(%rsp,%rax,4), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movl	(%rbx), %edx
	andl	$1, %edx
	leal	-1(%rax,%rdx,2), %eax
	cmpl	%eax, %r8d
	cmovl	%eax, %r8d
	addq	$4, %rbx
	cmpq	%rbx, %rcx
	jne	.L8
.L7:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movq	80040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L7
.L17:
	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:
```