Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 1315
  Title:Gift from the Goddess of Programming
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define max(x,y) (((x)>(y))?(x):(y))

struct time_st {
  int hour;
  int min;
  int in_flag;} 
last_in[1000];
int acc[1000];

void dump()
{
  int i;
  for(i=0;i<1000;i++)
    if(acc[i])
      printf("acc[%d]=%d|",i,acc[i]);
  printf("\n");
}
main()
{
  int mm,d,h,m,p,i,j,n,max_;
  char e;

  while(scanf("%d",&n) && n)
    {
      memset(last_in,0,sizeof(last_in));
      memset(acc,0,sizeof(acc));
      for(i=0;i<n;i++)
	{
	  scanf("%d/%d %d:%d %c %d",&mm,&d,&h,&m,&e,&p);
#ifdef DEBUG
	  printf("%02d %02d %c %03d:",h,m,e,p);
#endif
	  if(e=='I')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=1;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			last_in[j].hour=h;
			last_in[j].min =m;
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      last_in[p].hour=h;
		      last_in[p].min =m;
		    }
		  last_in[p].in_flag=1;
		}
	    }
	  if(e=='O')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=0;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			acc[j] += 60*(h - last_in[j].hour)+(m-last_in[j].min);
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      acc[p] += 60*(h-last_in[p].hour)+(m-last_in[p].min);
		    }
		  last_in[p].in_flag=0;
		}
	    }
#ifdef DEBUG
	  dump();
#endif
	}
      max_=0;
      for(i=1;i<1000;i++)
	max_=max(max_,acc[i]);
      printf("%d\n",max_);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	last_in
	.bss
	.align 32
	.type	last_in, @object
	.size	last_in, 12000
last_in:
	.zero	12000
	.globl	acc
	.align 32
	.type	acc, @object
	.size	acc, 4000
acc:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"acc[%d]=%d|"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$999, -4(%rbp)
	jle	.L4
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dump, .-dump
	.section	.rodata
.LC1:
	.string	"%d/%d %d:%d %c %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L24:
	movl	$12000, %edx
	movl	$0, %esi
	leaq	last_in(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$4000, %edx
	movl	$0, %esi
	leaq	acc(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L7
.L20:
	leaq	-45(%rbp), %r8
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%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
	movzbl	-45(%rbp), %eax
	cmpb	$73, %al
	jne	.L8
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$1, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L10
.L12:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	-36(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L11:
	addl	$1, -16(%rbp)
.L10:
	cmpl	$999, -16(%rbp)
	jle	.L12
	jmp	.L8
.L9:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L13
	movl	-28(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L13:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$1, (%rdx,%rax)
.L8:
	movzbl	-45(%rbp), %eax
	cmpb	$79, %al
	jne	.L14
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	movl	$0, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L16
.L18:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rdi,%rdx), %eax
	leal	(%rsi,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L17:
	addl	$1, -16(%rbp)
.L16:
	cmpl	$999, -16(%rbp)
	jle	.L18
	jmp	.L14
.L15:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edi, %edx
	movl	-28(%rbp), %eax
	leal	(%rsi,%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$0, (%rdx,%rax)
.L14:
	addl	$1, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L20
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L21
.L22:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L21:
	cmpl	$999, -20(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L23
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L24
.L23:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"acc[%d]=%d|"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	acc(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rbx
	cmpq	$1000, %rbx
	je	.L10
.L3:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edx
	testl	%ecx, %ecx
	je	.L2
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	$1000, %rbx
	jne	.L3
.L10:
	popq	%rbx
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.cfi_endproc
.LFE35:
	.size	dump, .-dump
	.section	.rodata.str1.1
.LC1:
	.string	"%d/%d %d:%d %c %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	12000+last_in(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	68(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L27
	leaq	last_in(%rip), %rdi
	movl	$12000, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	$500, %ecx
	xorl	%eax, %eax
	leaq	acc(%rip), %rdi
	rep stosq
	testl	%ebx, %ebx
	jle	.L13
	xorl	%ebx, %ebx
	leaq	60(%rsp), %r15
	leaq	47(%rsp), %r9
	leaq	64(%rsp), %rax
	movq	%r15, %r8
	leaq	56(%rsp), %r14
	movl	%ebx, %r15d
	movq	%rax, 16(%rsp)
	leaq	52(%rsp), %r13
	leaq	48(%rsp), %r12
	movq	%r9, %rbx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L14:
	cmpb	$79, %al
	jne	.L18
	movslq	64(%rsp), %rax
	testl	%eax, %eax
	je	.L41
	movl	8+last_in(%rip), %edx
	testl	%edx, %edx
	je	.L24
	leaq	(%rax,%rax,2), %rdx
	leaq	last_in(%rip), %rdi
	leaq	(%rdi,%rdx,4), %rcx
	leaq	acc(%rip), %rsi
	movl	56(%rsp), %edx
	subl	(%rcx), %edx
	imull	$60, %edx, %edx
	addl	60(%rsp), %edx
	subl	4(%rcx), %edx
	addl	%edx, (%rsi,%rax,4)
.L24:
	leaq	(%rax,%rax,2), %rax
	leaq	last_in(%rip), %rdi
	movl	$0, 8(%rdi,%rax,4)
.L18:
	addl	$1, %r15d
	cmpl	%r15d, 68(%rsp)
	jle	.L13
.L25:
	subq	$8, %rsp
	.cfi_def_cfa_offset 152
	movq	%rbx, %r9
	xorl	%eax, %eax
	movq	%r14, %rcx
	pushq	24(%rsp)
	.cfi_def_cfa_offset 160
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC1(%rip), %rdi
	movq	%r8, 24(%rsp)
	call	__isoc99_scanf@PLT
	movzbl	63(%rsp), %eax
	popq	%r8
	.cfi_def_cfa_offset 152
	popq	%r9
	.cfi_def_cfa_offset 144
	movq	8(%rsp), %r8
	cmpb	$73, %al
	jne	.L14
	movslq	64(%rsp), %rax
	testl	%eax, %eax
	je	.L42
	movl	8+last_in(%rip), %esi
	testl	%esi, %esi
	je	.L19
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm3
	leaq	(%rax,%rax,2), %rdx
	leaq	last_in(%rip), %rsi
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%rsi,%rdx,4)
.L19:
	leaq	(%rax,%rax,2), %rax
	leaq	last_in(%rip), %rsi
	addl	$1, %r15d
	movl	$1, 8(%rsi,%rax,4)
	cmpl	%r15d, 68(%rsp)
	jg	.L25
.L13:
	leaq	4+acc(%rip), %rax
	pxor	%xmm2, %xmm2
	leaq	3984(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L26:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L26
	movdqa	%xmm2, %xmm0
	movl	3992+acc(%rip), %ecx
	movl	3988+acc(%rip), %eax
	leaq	.LC2(%rip), %rsi
	psrldq	$8, %xmm0
	movl	$1, %edi
	movdqa	%xmm0, %xmm1
	cmpl	%ecx, %eax
	pcmpgtd	%xmm2, %xmm1
	cmovl	%ecx, %eax
	movl	3996+acc(%rip), %ecx
	cmpl	%ecx, %eax
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	cmovl	%ecx, %eax
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%edx, %eax
	cmovge	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L42:
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm4
	movl	$1, 8+last_in(%rip)
	leaq	12+last_in(%rip), %rax
	punpckldq	%xmm4, %xmm0
	.p2align 4,,10
	.p2align 3
.L17:
	movl	8(%rax), %edi
	testl	%edi, %edi
	je	.L16
	movq	%xmm0, (%rax)
.L16:
	addq	$12, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L18
.L41:
	movl	56(%rsp), %edi
	movl	60(%rsp), %esi
	movl	$0, 8+last_in(%rip)
	leaq	12+last_in(%rip), %rax
	leaq	4+acc(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L23:
	movl	8(%rax), %ecx
	testl	%ecx, %ecx
	je	.L22
	movl	%edi, %ecx
	subl	(%rax), %ecx
	movl	%esi, %r9d
	subl	4(%rax), %r9d
	imull	$60, %ecx, %ecx
	addl	%r9d, %ecx
	addl	%ecx, (%rdx)
.L22:
	addq	$12, %rax
	addq	$4, %rdx
	cmpq	%rbp, %rax
	jne	.L23
	jmp	.L18
.L27:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$88, %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
.L43:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	acc
	.bss
	.align 32
	.type	acc, @object
	.size	acc, 4000
acc:
	.zero	4000
	.globl	last_in
	.align 32
	.type	last_in, @object
	.size	last_in, 12000
last_in:
	.zero	12000
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"acc[%d]=%d|"
	.text
	.p2align 4
	.globl	dump
	.type	dump, @function
dump:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	acc(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	addq	$1, %rbx
	cmpq	$1000, %rbx
	je	.L10
.L3:
	movl	0(%rbp,%rbx,4), %ecx
	movl	%ebx, %edx
	testl	%ecx, %ecx
	je	.L2
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	$1000, %rbx
	jne	.L3
.L10:
	popq	%rbx
	.cfi_def_cfa_offset 24
	movl	$10, %edi
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	putchar@PLT
	.cfi_endproc
.LFE35:
	.size	dump, .-dump
	.section	.rodata.str1.1
.LC1:
	.string	"%d/%d %d:%d %c %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	12000+last_in(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	68(%rsp), %rax
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L12:
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L27
	movl	68(%rsp), %ebx
	testl	%ebx, %ebx
	je	.L27
	leaq	last_in(%rip), %rdi
	movl	$12000, %edx
	xorl	%esi, %esi
	call	memset@PLT
	movl	$500, %ecx
	xorl	%eax, %eax
	leaq	acc(%rip), %rdi
	rep stosq
	testl	%ebx, %ebx
	jle	.L13
	xorl	%ebx, %ebx
	leaq	60(%rsp), %r15
	leaq	47(%rsp), %r9
	leaq	64(%rsp), %rax
	movq	%r15, %r8
	leaq	56(%rsp), %r14
	movl	%ebx, %r15d
	movq	%rax, 16(%rsp)
	leaq	52(%rsp), %r13
	leaq	48(%rsp), %r12
	movq	%r9, %rbx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L14:
	cmpb	$79, %al
	jne	.L18
	movslq	64(%rsp), %rax
	testl	%eax, %eax
	je	.L41
	movl	8+last_in(%rip), %edx
	testl	%edx, %edx
	je	.L24
	leaq	(%rax,%rax,2), %rdx
	leaq	last_in(%rip), %rdi
	leaq	(%rdi,%rdx,4), %rcx
	leaq	acc(%rip), %rsi
	movl	56(%rsp), %edx
	subl	(%rcx), %edx
	imull	$60, %edx, %edx
	addl	60(%rsp), %edx
	subl	4(%rcx), %edx
	addl	%edx, (%rsi,%rax,4)
.L24:
	leaq	(%rax,%rax,2), %rax
	leaq	last_in(%rip), %rdi
	movl	$0, 8(%rdi,%rax,4)
.L18:
	addl	$1, %r15d
	cmpl	%r15d, 68(%rsp)
	jle	.L13
.L25:
	subq	$8, %rsp
	.cfi_def_cfa_offset 152
	movq	%rbx, %r9
	xorl	%eax, %eax
	movq	%r14, %rcx
	pushq	24(%rsp)
	.cfi_def_cfa_offset 160
	movq	%r13, %rdx
	movq	%r12, %rsi
	leaq	.LC1(%rip), %rdi
	movq	%r8, 24(%rsp)
	call	__isoc99_scanf@PLT
	movzbl	63(%rsp), %eax
	popq	%r8
	.cfi_def_cfa_offset 152
	popq	%r9
	.cfi_def_cfa_offset 144
	movq	8(%rsp), %r8
	cmpb	$73, %al
	jne	.L14
	movslq	64(%rsp), %rax
	testl	%eax, %eax
	je	.L42
	movl	8+last_in(%rip), %esi
	testl	%esi, %esi
	je	.L19
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm3
	leaq	(%rax,%rax,2), %rdx
	leaq	last_in(%rip), %rsi
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%rsi,%rdx,4)
.L19:
	leaq	(%rax,%rax,2), %rax
	leaq	last_in(%rip), %rsi
	addl	$1, %r15d
	movl	$1, 8(%rsi,%rax,4)
	cmpl	%r15d, 68(%rsp)
	jg	.L25
.L13:
	leaq	4+acc(%rip), %rax
	pxor	%xmm2, %xmm2
	leaq	3984(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L26:
	movdqu	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rdx, %rax
	jne	.L26
	movdqa	%xmm2, %xmm0
	movl	3992+acc(%rip), %ecx
	movl	3988+acc(%rip), %eax
	leaq	.LC2(%rip), %rsi
	psrldq	$8, %xmm0
	movl	$1, %edi
	movdqa	%xmm0, %xmm1
	cmpl	%ecx, %eax
	pcmpgtd	%xmm2, %xmm1
	cmovl	%ecx, %eax
	movl	3996+acc(%rip), %ecx
	cmpl	%ecx, %eax
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	cmovl	%ecx, %eax
	por	%xmm0, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %edx
	cmpl	%edx, %eax
	cmovge	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L12
.L42:
	movd	56(%rsp), %xmm0
	movd	60(%rsp), %xmm4
	movl	$1, 8+last_in(%rip)
	leaq	12+last_in(%rip), %rax
	punpckldq	%xmm4, %xmm0
	.p2align 4,,10
	.p2align 3
.L17:
	movl	8(%rax), %edi
	testl	%edi, %edi
	je	.L16
	movq	%xmm0, (%rax)
.L16:
	addq	$12, %rax
	cmpq	%rax, %rbp
	jne	.L17
	jmp	.L18
.L41:
	movl	56(%rsp), %edi
	movl	60(%rsp), %esi
	movl	$0, 8+last_in(%rip)
	leaq	12+last_in(%rip), %rax
	leaq	4+acc(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L23:
	movl	8(%rax), %ecx
	testl	%ecx, %ecx
	je	.L22
	movl	%edi, %ecx
	subl	(%rax), %ecx
	movl	%esi, %r9d
	subl	4(%rax), %r9d
	imull	$60, %ecx, %ecx
	addl	%r9d, %ecx
	addl	%ecx, (%rdx)
.L22:
	addq	$12, %rax
	addq	$4, %rdx
	cmpq	%rbp, %rax
	jne	.L23
	jmp	.L18
.L27:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	addq	$88, %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
.L43:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	acc
	.bss
	.align 32
	.type	acc, @object
	.size	acc, 4000
acc:
	.zero	4000
	.globl	last_in
	.align 32
	.type	last_in, @object
	.size	last_in, 12000
last_in:
	.zero	12000
	.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:

/*
  AOJ 1315
  Title:Gift from the Goddess of Programming
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define max(x,y) (((x)>(y))?(x):(y))

struct time_st {
  int hour;
  int min;
  int in_flag;} 
last_in[1000];
int acc[1000];

void dump()
{
  int i;
  for(i=0;i<1000;i++)
    if(acc[i])
      printf("acc[%d]=%d|",i,acc[i]);
  printf("\n");
}
main()
{
  int mm,d,h,m,p,i,j,n,max_;
  char e;

  while(scanf("%d",&n) && n)
    {
      memset(last_in,0,sizeof(last_in));
      memset(acc,0,sizeof(acc));
      for(i=0;i<n;i++)
	{
	  scanf("%d/%d %d:%d %c %d",&mm,&d,&h,&m,&e,&p);
#ifdef DEBUG
	  printf("%02d %02d %c %03d:",h,m,e,p);
#endif
	  if(e=='I')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=1;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			last_in[j].hour=h;
			last_in[j].min =m;
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      last_in[p].hour=h;
		      last_in[p].min =m;
		    }
		  last_in[p].in_flag=1;
		}
	    }
	  if(e=='O')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=0;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			acc[j] += 60*(h - last_in[j].hour)+(m-last_in[j].min);
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      acc[p] += 60*(h-last_in[p].hour)+(m-last_in[p].min);
		    }
		  last_in[p].in_flag=0;
		}
	    }
#ifdef DEBUG
	  dump();
#endif
	}
      max_=0;
      for(i=1;i<1000;i++)
	max_=max(max_,acc[i]);
      printf("%d\n",max_);
    }
  return(0);
}
14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/22 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:51 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/11 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 P 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 51:01 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 50:41 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/01 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
00/61 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 54:21 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/01 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/22 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
16/01 09:15 I 002
06/01 09:15 I 003
06/02 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/11 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 13:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
10/60 09:00 I 001
06/01 09:15 I 2
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:01 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
00/61 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 12:15 O 000
06/01 13:30 O 002
06/01 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
04/21 09:15 I 002
04/21 09:30 O 001
04/21 09:45 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/28 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
10/60 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 10:15 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 51:11 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/01 13:30 O 002
06/00 13:45 O 003
0
 14
04/21 09:00 I 000
04/21 09:00 I 001
24/01 09:15 I 002
04/21 09:30 O 001
04/21 09:55 O 000
04/21 10:00 O 002
04/28 09:00 I 003
04/28 09:15 I 000
04/18 09:30 I 004
04/28 09:45 O 004
04/28 10:00 O 000
04/28 10:15 O 003
04/29 20:00 I 002
04/29 21:30 O 002
20
06/01 09:00 I 001
06/01 09:15 I 002
06/01 09:15 I 003
06/01 09:30 O 002
06/01 10:00 I 000
06/01 51:10 O 001
06/01 10:30 I 002
06/01 10:45 O 002
06/01 11:00 I 001
06/01 11:15 O 000
06/01 11:30 I 002
06/01 11:45 O 001
06/01 12:00 O 002
06/01 12:15 I 000
06/01 12:30 I 002
06/01 12:45 O 000
06/01 13:00 I 000
06/01 13:15 O 000
06/11 13:30 O 002
06/01 13:45 N 003
0

45
120
 30
120
 45
2476
 45
2441
 45
2616
 45
180
 45
119
 45
60
 45
2516
 45
2485

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
  AOJ 1315
  Title:Gift from the Goddess of Programming
  @kankichi573
*/
#include <stdio.h>
#include <string.h>
#define max(x,y) (((x)>(y))?(x):(y))

struct time_st {
  int hour;
  int min;
  int in_flag;} 
last_in[1000];
int acc[1000];

void dump()
{
  int i;
  for(i=0;i<1000;i++)
    if(acc[i])
      printf("acc[%d]=%d|",i,acc[i]);
  printf("\n");
}
main()
{
  int mm,d,h,m,p,i,j,n,max_;
  char e;

  while(scanf("%d",&n) && n)
    {
      memset(last_in,0,sizeof(last_in));
      memset(acc,0,sizeof(acc));
      for(i=0;i<n;i++)
	{
	  scanf("%d/%d %d:%d %c %d",&mm,&d,&h,&m,&e,&p);
#ifdef DEBUG
	  printf("%02d %02d %c %03d:",h,m,e,p);
#endif
	  if(e=='I')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=1;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			last_in[j].hour=h;
			last_in[j].min =m;
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      last_in[p].hour=h;
		      last_in[p].min =m;
		    }
		  last_in[p].in_flag=1;
		}
	    }
	  if(e=='O')
	    {
	      if(p==0)
		{
		  last_in[0].in_flag=0;
		  for(j=1;j<1000;j++)
		    if(last_in[j].in_flag)
		      {
			acc[j] += 60*(h - last_in[j].hour)+(m-last_in[j].min);
		      }
		}
	      else
		{
		  if(last_in[0].in_flag)
		    {
		      acc[p] += 60*(h-last_in[p].hour)+(m-last_in[p].min);
		    }
		  last_in[p].in_flag=0;
		}
	    }
#ifdef DEBUG
	  dump();
#endif
	}
      max_=0;
      for(i=1;i<1000;i++)
	max_=max(max_,acc[i]);
      printf("%d\n",max_);
    }
  return(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	last_in
	.bss
	.align 32
	.type	last_in, @object
	.size	last_in, 12000
last_in:
	.zero	12000
	.globl	acc
	.align 32
	.type	acc, @object
	.size	acc, 4000
acc:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"acc[%d]=%d|"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$999, -4(%rbp)
	jle	.L4
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dump, .-dump
	.section	.rodata
.LC1:
	.string	"%d/%d %d:%d %c %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L24:
	movl	$12000, %edx
	movl	$0, %esi
	leaq	last_in(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$4000, %edx
	movl	$0, %esi
	leaq	acc(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L7
.L20:
	leaq	-45(%rbp), %r8
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%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
	movzbl	-45(%rbp), %eax
	cmpb	$73, %al
	jne	.L8
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$1, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L10
.L12:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	-36(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L11:
	addl	$1, -16(%rbp)
.L10:
	cmpl	$999, -16(%rbp)
	jle	.L12
	jmp	.L8
.L9:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L13
	movl	-28(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L13:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$1, (%rdx,%rax)
.L8:
	movzbl	-45(%rbp), %eax
	cmpb	$79, %al
	jne	.L14
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	movl	$0, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L16
.L18:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rdi,%rdx), %eax
	leal	(%rsi,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L17:
	addl	$1, -16(%rbp)
.L16:
	cmpl	$999, -16(%rbp)
	jle	.L18
	jmp	.L14
.L15:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edi, %edx
	movl	-28(%rbp), %eax
	leal	(%rsi,%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$0, (%rdx,%rax)
.L14:
	addl	$1, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L20
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L21
.L22:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L21:
	cmpl	$999, -20(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L23
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L24
.L23:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	last_in
	.bss
	.align 32
	.type	last_in, @object
	.size	last_in, 12000
last_in:
	.zero	12000
	.globl	acc
	.align 32
	.type	acc, @object
	.size	acc, 4000
acc:
	.zero	4000
	.section	.rodata
.LC0:
	.string	"acc[%d]=%d|"
	.text
	.globl	dump
	.type	dump, @function
dump:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L3
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	addl	$1, -4(%rbp)
.L2:
	cmpl	$999, -4(%rbp)
	jle	.L4
	movl	$10, %edi
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dump, .-dump
	.section	.rodata
.LC1:
	.string	"%d/%d %d:%d %c %d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L6
.L24:
	movl	$12000, %edx
	movl	$0, %esi
	leaq	last_in(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$4000, %edx
	movl	$0, %esi
	leaq	acc(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -20(%rbp)
	jmp	.L7
.L20:
	leaq	-45(%rbp), %r8
	leaq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%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
	movzbl	-45(%rbp), %eax
	cmpb	$73, %al
	jne	.L8
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L9
	movl	$1, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L10
.L12:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L11
	movl	-36(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L11:
	addl	$1, -16(%rbp)
.L10:
	cmpl	$999, -16(%rbp)
	jle	.L12
	jmp	.L8
.L9:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L13
	movl	-28(%rbp), %eax
	movl	-36(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-28(%rbp), %eax
	movl	-32(%rbp), %edx
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+last_in(%rip), %rax
	movl	%edx, (%rcx,%rax)
.L13:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$1, (%rdx,%rax)
.L8:
	movzbl	-45(%rbp), %eax
	cmpb	$79, %al
	jne	.L14
	movl	-28(%rbp), %eax
	testl	%eax, %eax
	jne	.L15
	movl	$0, 8+last_in(%rip)
	movl	$1, -16(%rbp)
	jmp	.L16
.L18:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L17
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	(%rdi,%rdx), %eax
	leal	(%rsi,%rax), %ecx
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L17:
	addl	$1, -16(%rbp)
.L16:
	cmpl	$999, -16(%rbp)
	jle	.L18
	jmp	.L14
.L15:
	movl	8+last_in(%rip), %eax
	testl	%eax, %eax
	je	.L19
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %esi
	movl	-36(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	last_in(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	imull	$60, %eax, %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+last_in(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	addl	%edi, %edx
	movl	-28(%rbp), %eax
	leal	(%rsi,%rdx), %ecx
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L19:
	movl	-28(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+last_in(%rip), %rax
	movl	$0, (%rdx,%rax)
.L14:
	addl	$1, -20(%rbp)
.L7:
	movl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L20
	movl	$0, -12(%rbp)
	movl	$1, -20(%rbp)
	jmp	.L21
.L22:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	acc(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L21:
	cmpl	$999, -20(%rbp)
	jle	.L22
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L6:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L23
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L24
.L23:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
