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 <limits.h>

int comp(const void *a, const void *b)
{
    int x, y;
    x = *(int *)a;
    y = *(int *)b;
    
    return (x - y);
}

int main(void)
{
    int n;
    int i, j;
    int groupA[16192], groupB[16192];
    int h, m, s, hh, mm, ss;
    int ans;
    int prev;
    
    while (1){
        scanf("%d", &n);
        
        if (n == 0){
            break;
        }
        
        for (i = 0; i < n; i++){
            scanf("%d:%d:%d %d:%d:%d", &h, &m, &s, &hh, &mm, &ss);
            groupA[i] = h * 3600 + m * 60 + s;
            groupB[i] = hh * 3600 + mm * 60 + ss;
        }
        groupA[n] = INT_MAX;
        groupB[n] = INT_MAX;
        
        qsort(groupA, n + 1, sizeof(int), comp);
        qsort(groupB, n + 1, sizeof(int), comp);
        
        ans = i = j = 0;
        prev = 0;
        
        while (groupA[i] != INT_MAX && groupB[j] != INT_MAX){
            if (groupA[i] < groupB[j]){
                i++;
                if (prev == 0){
                    ans++;
                }
                else {
                    prev--;
                }
            }
            else {
                j++;
                prev++;
            }
        }
        
        printf("%d\n", ans);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:%d:%d %d:%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
	leaq	-126976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-129596(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-129596(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	movl	$0, -129568(%rbp)
	jmp	.L6
.L7:
	leaq	-129576(%rbp), %r8
	leaq	-129580(%rbp), %rdi
	leaq	-129584(%rbp), %rcx
	leaq	-129588(%rbp), %rdx
	leaq	-129592(%rbp), %rax
	subq	$8, %rsp
	leaq	-129572(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	-129592(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129588(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129584(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -129552(%rbp,%rax,4)
	movl	-129580(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129576(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129572(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -64784(%rbp,%rax,4)
	addl	$1, -129568(%rbp)
.L6:
	movl	-129596(%rbp), %eax
	cmpl	%eax, -129568(%rbp)
	jl	.L7
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -129552(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -64784(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-129552(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-64784(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -129564(%rbp)
	movl	-129564(%rbp), %eax
	movl	%eax, -129568(%rbp)
	movl	-129568(%rbp), %eax
	movl	%eax, -129560(%rbp)
	movl	$0, -129556(%rbp)
	jmp	.L8
.L12:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %edx
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	addl	$1, -129568(%rbp)
	cmpl	$0, -129556(%rbp)
	jne	.L10
	addl	$1, -129560(%rbp)
	jmp	.L8
.L10:
	subl	$1, -129556(%rbp)
	jmp	.L8
.L9:
	addl	$1, -129564(%rbp)
	addl	$1, -129556(%rbp)
.L8:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	je	.L11
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	jne	.L12
.L11:
	movl	-129560(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:%d:%d %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	-126976(%rsp), %r11
	.cfi_def_cfa 11, 127032
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2648, %rsp
	.cfi_def_cfa_offset 129680
	movq	%fs:40, %rax
	movq	%rax, 129608(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rax
	leaq	56(%rsp), %rbp
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	jle	.L23
	leaq	60(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	52(%rsp), %r12
	movq	%rax, 16(%rsp)
	leaq	64(%rsp), %rax
	leaq	40(%rsp), %rbx
	movq	%rax, (%rsp)
	leaq	48(%rsp), %r15
	leaq	44(%rsp), %r14
	leaq	64832(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%rbp, %rax
	movq	%r12, %rbp
	movq	%r13, %r12
	movq	%rbx, %r13
	movq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	subq	$8, %rsp
	.cfi_def_cfa_offset 129688
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 129696
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %r9
	xorl	%eax, %eax
	movq	%rbp, %r8
	call	__isoc99_scanf@PLT
	imull	$60, 60(%rsp), %edx
	movq	16(%rsp), %rdi
	imull	$3600, 56(%rsp), %eax
	movq	24(%rsp), %rcx
	movl	52(%rsp), %esi
	addl	%edx, %eax
	imull	$60, 72(%rsp), %edx
	addl	64(%rsp), %eax
	movl	%eax, (%rdi,%r12,4)
	imull	$3600, 68(%rsp), %eax
	addl	%edx, %eax
	addl	76(%rsp), %eax
	movl	%eax, (%rcx,%r12,4)
	addq	$1, %r12
	popq	%rax
	.cfi_def_cfa_offset 129688
	popq	%rdx
	.cfi_def_cfa_offset 129680
	cmpl	%r12d, %esi
	jg	.L6
	movq	%rbx, %rbp
.L5:
	movslq	%esi, %rax
	movq	(%rsp), %rdi
	addl	$1, %esi
	leaq	comp(%rip), %rcx
	movslq	%esi, %rsi
	movl	$4, %edx
	movl	$2147483647, 64(%rsp,%rax,4)
	movl	$2147483647, 64832(%rsp,%rax,4)
	call	qsort@PLT
	movl	36(%rsp), %eax
	movq	8(%rsp), %rdi
	leaq	comp(%rip), %rcx
	movl	$4, %edx
	leal	1(%rax), %esi
	movslq	%esi, %rsi
	call	qsort@PLT
	movl	64(%rsp), %eax
	xorl	%r8d, %r8d
	cmpl	$2147483647, %eax
	je	.L8
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %esi
	testl	%edi, %edi
	jne	.L10
	addl	$1, %r8d
.L11:
	movslq	%esi, %rax
	movl	64(%rsp,%rax,4), %eax
	cmpl	$2147483647, %eax
	je	.L8
.L7:
	movslq	%ecx, %rdx
	movl	64832(%rsp,%rdx,4), %edx
	cmpl	$2147483647, %edx
	je	.L8
	cmpl	%eax, %edx
	jg	.L24
	movslq	%esi, %rax
	addl	$1, %ecx
	addl	$1, %edi
	movl	64(%rsp,%rax,4), %eax
	cmpl	$2147483647, %eax
	jne	.L7
.L8:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	subl	$1, %edi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	129608(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$129624, %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
.L23:
	.cfi_restore_state
	leaq	64(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	64832(%rsp), %rax
	movq	%rax, 8(%rsp)
	jmp	.L5
.L25:
	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	comp
	.type	comp, @function
comp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	comp, .-comp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:%d:%d %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	-126976(%rsp), %r11
	.cfi_def_cfa 11, 127032
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2648, %rsp
	.cfi_def_cfa_offset 129680
	movq	%fs:40, %rax
	movq	%rax, 129608(%rsp)
	xorl	%eax, %eax
	leaq	36(%rsp), %rax
	leaq	56(%rsp), %rbp
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L13:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %esi
	testl	%esi, %esi
	je	.L4
	jle	.L23
	leaq	60(%rsp), %rax
	xorl	%r13d, %r13d
	leaq	52(%rsp), %r12
	movq	%rax, 16(%rsp)
	leaq	64(%rsp), %rax
	leaq	40(%rsp), %rbx
	movq	%rax, (%rsp)
	leaq	48(%rsp), %r15
	leaq	44(%rsp), %r14
	leaq	64832(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%rbp, %rax
	movq	%r12, %rbp
	movq	%r13, %r12
	movq	%rbx, %r13
	movq	%rax, %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	subq	$8, %rsp
	.cfi_def_cfa_offset 129688
	movq	%r15, %rcx
	movq	%r14, %rdx
	movq	%r13, %rsi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 129696
	leaq	.LC1(%rip), %rdi
	movq	%rbx, %r9
	xorl	%eax, %eax
	movq	%rbp, %r8
	call	__isoc99_scanf@PLT
	imull	$60, 60(%rsp), %edx
	movq	16(%rsp), %rdi
	imull	$3600, 56(%rsp), %eax
	movq	24(%rsp), %rcx
	movl	52(%rsp), %esi
	addl	%edx, %eax
	imull	$60, 72(%rsp), %edx
	addl	64(%rsp), %eax
	movl	%eax, (%rdi,%r12,4)
	imull	$3600, 68(%rsp), %eax
	addl	%edx, %eax
	addl	76(%rsp), %eax
	movl	%eax, (%rcx,%r12,4)
	addq	$1, %r12
	popq	%rax
	.cfi_def_cfa_offset 129688
	popq	%rdx
	.cfi_def_cfa_offset 129680
	cmpl	%r12d, %esi
	jg	.L6
	movq	%rbx, %rbp
.L5:
	movslq	%esi, %rax
	movq	(%rsp), %rdi
	addl	$1, %esi
	leaq	comp(%rip), %rcx
	movslq	%esi, %rsi
	movl	$4, %edx
	movl	$2147483647, 64(%rsp,%rax,4)
	movl	$2147483647, 64832(%rsp,%rax,4)
	call	qsort@PLT
	movl	36(%rsp), %eax
	movq	8(%rsp), %rdi
	leaq	comp(%rip), %rcx
	movl	$4, %edx
	leal	1(%rax), %esi
	movslq	%esi, %rsi
	call	qsort@PLT
	movl	64(%rsp), %eax
	xorl	%r8d, %r8d
	cmpl	$2147483647, %eax
	je	.L8
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	addl	$1, %esi
	testl	%edi, %edi
	jne	.L10
	addl	$1, %r8d
.L11:
	movslq	%esi, %rax
	movl	64(%rsp,%rax,4), %eax
	cmpl	$2147483647, %eax
	je	.L8
.L7:
	movslq	%ecx, %rdx
	movl	64832(%rsp,%rdx,4), %edx
	cmpl	$2147483647, %edx
	je	.L8
	cmpl	%eax, %edx
	jg	.L24
	movslq	%esi, %rax
	addl	$1, %ecx
	addl	$1, %edi
	movl	64(%rsp,%rax,4), %eax
	cmpl	$2147483647, %eax
	jne	.L7
.L8:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L10:
	subl	$1, %edi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	movq	129608(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$129624, %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
.L23:
	.cfi_restore_state
	leaq	64(%rsp), %rax
	movq	%rax, (%rsp)
	leaq	64832(%rsp), %rax
	movq	%rax, 8(%rsp)
	jmp	.L5
.L25:
	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 <limits.h>

int comp(const void *a, const void *b)
{
    int x, y;
    x = *(int *)a;
    y = *(int *)b;
    
    return (x - y);
}

int main(void)
{
    int n;
    int i, j;
    int groupA[16192], groupB[16192];
    int h, m, s, hh, mm, ss;
    int ans;
    int prev;
    
    while (1){
        scanf("%d", &n);
        
        if (n == 0){
            break;
        }
        
        for (i = 0; i < n; i++){
            scanf("%d:%d:%d %d:%d:%d", &h, &m, &s, &hh, &mm, &ss);
            groupA[i] = h * 3600 + m * 60 + s;
            groupB[i] = hh * 3600 + mm * 60 + ss;
        }
        groupA[n] = INT_MAX;
        groupB[n] = INT_MAX;
        
        qsort(groupA, n + 1, sizeof(int), comp);
        qsort(groupB, n + 1, sizeof(int), comp);
        
        ans = i = j = 0;
        prev = 0;
        
        while (groupA[i] != INT_MAX && groupB[j] != INT_MAX){
            if (groupA[i] < groupB[j]){
                i++;
                if (prev == 0){
                    ans++;
                }
                else {
                    prev--;
                }
            }
            else {
                j++;
                prev++;
            }
        }
        
        printf("%d\n", ans);
    }
    
    return (0);
}
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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>

int comp(const void *a, const void *b)
{
    int x, y;
    x = *(int *)a;
    y = *(int *)b;
    
    return (x - y);
}

int main(void)
{
    int n;
    int i, j;
    int groupA[16192], groupB[16192];
    int h, m, s, hh, mm, ss;
    int ans;
    int prev;
    
    while (1){
        scanf("%d", &n);
        
        if (n == 0){
            break;
        }
        
        for (i = 0; i < n; i++){
            scanf("%d:%d:%d %d:%d:%d", &h, &m, &s, &hh, &mm, &ss);
            groupA[i] = h * 3600 + m * 60 + s;
            groupB[i] = hh * 3600 + mm * 60 + ss;
        }
        groupA[n] = INT_MAX;
        groupB[n] = INT_MAX;
        
        qsort(groupA, n + 1, sizeof(int), comp);
        qsort(groupB, n + 1, sizeof(int), comp);
        
        ans = i = j = 0;
        prev = 0;
        
        while (groupA[i] != INT_MAX && groupB[j] != INT_MAX){
            if (groupA[i] < groupB[j]){
                i++;
                if (prev == 0){
                    ans++;
                }
                else {
                    prev--;
                }
            }
            else {
                j++;
                prev++;
            }
        }
        
        printf("%d\n", ans);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	comp
	.type	comp, @function
comp:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:%d:%d %d:%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
	leaq	-126976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-129596(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-129596(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	movl	$0, -129568(%rbp)
	jmp	.L6
.L7:
	leaq	-129576(%rbp), %r8
	leaq	-129580(%rbp), %rdi
	leaq	-129584(%rbp), %rcx
	leaq	-129588(%rbp), %rdx
	leaq	-129592(%rbp), %rax
	subq	$8, %rsp
	leaq	-129572(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	-129592(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129588(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129584(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -129552(%rbp,%rax,4)
	movl	-129580(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129576(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129572(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -64784(%rbp,%rax,4)
	addl	$1, -129568(%rbp)
.L6:
	movl	-129596(%rbp), %eax
	cmpl	%eax, -129568(%rbp)
	jl	.L7
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -129552(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -64784(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-129552(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-64784(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -129564(%rbp)
	movl	-129564(%rbp), %eax
	movl	%eax, -129568(%rbp)
	movl	-129568(%rbp), %eax
	movl	%eax, -129560(%rbp)
	movl	$0, -129556(%rbp)
	jmp	.L8
.L12:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %edx
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	addl	$1, -129568(%rbp)
	cmpl	$0, -129556(%rbp)
	jne	.L10
	addl	$1, -129560(%rbp)
	jmp	.L8
.L10:
	subl	$1, -129556(%rbp)
	jmp	.L8
.L9:
	addl	$1, -129564(%rbp)
	addl	$1, -129556(%rbp)
.L8:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	je	.L11
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	jne	.L12
.L11:
	movl	-129560(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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	comp
	.type	comp, @function
comp:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	comp, .-comp
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d:%d:%d %d:%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
	leaq	-126976(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L13:
	leaq	-129596(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-129596(%rbp), %eax
	testl	%eax, %eax
	je	.L17
	movl	$0, -129568(%rbp)
	jmp	.L6
.L7:
	leaq	-129576(%rbp), %r8
	leaq	-129580(%rbp), %rdi
	leaq	-129584(%rbp), %rcx
	leaq	-129588(%rbp), %rdx
	leaq	-129592(%rbp), %rax
	subq	$8, %rsp
	leaq	-129572(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	-129592(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129588(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129584(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -129552(%rbp,%rax,4)
	movl	-129580(%rbp), %eax
	imull	$3600, %eax, %edx
	movl	-129576(%rbp), %eax
	imull	$60, %eax, %eax
	addl	%eax, %edx
	movl	-129572(%rbp), %eax
	addl	%eax, %edx
	movl	-129568(%rbp), %eax
	cltq
	movl	%edx, -64784(%rbp,%rax,4)
	addl	$1, -129568(%rbp)
.L6:
	movl	-129596(%rbp), %eax
	cmpl	%eax, -129568(%rbp)
	jl	.L7
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -129552(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	cltq
	movl	$2147483647, -64784(%rbp,%rax,4)
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-129552(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	-129596(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rsi
	leaq	-64784(%rbp), %rax
	leaq	comp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -129564(%rbp)
	movl	-129564(%rbp), %eax
	movl	%eax, -129568(%rbp)
	movl	-129568(%rbp), %eax
	movl	%eax, -129560(%rbp)
	movl	$0, -129556(%rbp)
	jmp	.L8
.L12:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %edx
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jge	.L9
	addl	$1, -129568(%rbp)
	cmpl	$0, -129556(%rbp)
	jne	.L10
	addl	$1, -129560(%rbp)
	jmp	.L8
.L10:
	subl	$1, -129556(%rbp)
	jmp	.L8
.L9:
	addl	$1, -129564(%rbp)
	addl	$1, -129556(%rbp)
.L8:
	movl	-129568(%rbp), %eax
	cltq
	movl	-129552(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	je	.L11
	movl	-129564(%rbp), %eax
	cltq
	movl	-64784(%rbp,%rax,4), %eax
	cmpl	$2147483647, %eax
	jne	.L12
.L11:
	movl	-129560(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L17:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
