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

```c
main(i,h,m){for(;~scanf("%*d%d:%d"+!i*3,&h,&m);i=!puts(h<60?"alert":h<180?"warning":"safe"))h=(abs(h*60-m*11)-60)%481+60;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"warning"
.LC1:
	.string	"safe"
.LC2:
	.string	"alert"
.LC3:
	.string	"%*d%d:%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	imull	$60, %eax, %edx
	movl	-12(%rbp), %eax
	imull	$-11, %eax, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	subl	$60, %eax
	movslq	%eax, %rdx
	imulq	$-2009080335, %rdx, %rdx
	shrq	$32, %rdx
	addl	%eax, %edx
	sarl	$8, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$481, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	leal	60(%rdx), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	$59, %eax
	jle	.L3
	movl	-8(%rbp), %eax
	cmpl	$179, %eax
	jg	.L4
	leaq	.LC0(%rip), %rax
	jmp	.L6
.L4:
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L3:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jne	.L7
	leaq	3+.LC3(%rip), %rax
	jmp	.L8
.L7:
	leaq	.LC3(%rip), %rax
.L8:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"safe"
.LC1:
	.string	"alert"
.LC2:
	.string	"warning"
.LC3:
	.string	"%*d%d:%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	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	3+.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3(%rbp), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%esi, 12(%rsp)
	leaq	8(%rsp), %r13
	leaq	12(%rsp), %r12
	movl	%edx, 8(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	imull	$60, 12(%rsp), %edx
	movq	%r14, %rdi
	imull	$-11, 8(%rsp), %eax
	addl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	subl	$60, %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$-2009080335, %rdx, %rdx
	sarl	$31, %ecx
	shrq	$32, %rdx
	addl	%eax, %edx
	sarl	$8, %edx
	subl	%ecx, %edx
	imull	$481, %edx, %edx
	subl	%edx, %eax
	addl	$60, %eax
	movl	%eax, 12(%rsp)
	cmpl	$59, %eax
	jle	.L3
	cmpl	$180, %eax
	leaq	.LC0(%rip), %rdi
	cmovl	%r15, %rdi
.L3:
	call	puts@PLT
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
.L2:
	testl	%edi, %edi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	cmove	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L5
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"safe"
.LC1:
	.string	"alert"
.LC2:
	.string	"warning"
.LC3:
	.string	"%*d%d:%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC1(%rip), %r14
	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	3+.LC3(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-3(%rbp), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%esi, 12(%rsp)
	leaq	8(%rsp), %r13
	leaq	12(%rsp), %r12
	movl	%edx, 8(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	imull	$60, 12(%rsp), %edx
	movq	%r14, %rdi
	imull	$-11, 8(%rsp), %eax
	addl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	subl	$60, %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$-2009080335, %rdx, %rdx
	sarl	$31, %ecx
	shrq	$32, %rdx
	addl	%eax, %edx
	sarl	$8, %edx
	subl	%ecx, %edx
	imull	$481, %edx, %edx
	subl	%edx, %eax
	addl	$60, %eax
	movl	%eax, 12(%rsp)
	cmpl	$59, %eax
	jle	.L3
	cmpl	$180, %eax
	leaq	.LC0(%rip), %rdi
	cmovl	%r15, %rdi
.L3:
	call	puts@PLT
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
.L2:
	testl	%edi, %edi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	%r12, %rsi
	cmove	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L5
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE0:
	.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:

main(i,h,m){for(;~scanf("%*d%d:%d"+!i*3,&h,&m);i=!puts(h<60?"alert":h<180?"warning":"safe"))h=(abs(h*60-m*11)-60)%481+60;}
4
02:15
05:01
11:55
10:40
 4
02:15
05:01
11:54
10:40
 4
12:15
05:01
11:54
10:40
 4
02:15
05:01
11:55
11:40
 4
12:05
05:01
11:44
00:41
 4
02:15
10:50
11:54
10:40
 4
03:05
06:11
11:55
10:41
 4
03:15
11:60
11:55
00:40
 4
12:05
05:01
12:44
10:40
 4
02:15
10:60
11:55
11:40

alert
safe
alert
warning
 alert
safe
warning
warning
 warning
safe
warning
warning
 alert
safe
alert
safe
 safe
safe
warning
safe
 alert
alert
warning
warning
 warning
safe
alert
warning
 alert
alert
alert
safe
 safe
safe
safe
warning
 alert
warning
alert
safe

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

```c
main(i,h,m){for(;~scanf("%*d%d:%d"+!i*3,&h,&m);i=!puts(h<60?"alert":h<180?"warning":"safe"))h=(abs(h*60-m*11)-60)%481+60;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"warning"
.LC1:
	.string	"safe"
.LC2:
	.string	"alert"
.LC3:
	.string	"%*d%d:%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	imull	$60, %eax, %edx
	movl	-12(%rbp), %eax
	imull	$-11, %eax, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	subl	$60, %eax
	movslq	%eax, %rdx
	imulq	$-2009080335, %rdx, %rdx
	shrq	$32, %rdx
	addl	%eax, %edx
	sarl	$8, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$481, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	leal	60(%rdx), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	$59, %eax
	jle	.L3
	movl	-8(%rbp), %eax
	cmpl	$179, %eax
	jg	.L4
	leaq	.LC0(%rip), %rax
	jmp	.L6
.L4:
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L3:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jne	.L7
	leaq	3+.LC3(%rip), %rax
	jmp	.L8
.L7:
	leaq	.LC3(%rip), %rax
.L8:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"warning"
.LC1:
	.string	"safe"
.LC2:
	.string	"alert"
.LC3:
	.string	"%*d%d:%d"
	.text
	.globl	main
	.type	main, @function
main:
.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	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	jmp	.L2
.L9:
	movl	-8(%rbp), %eax
	imull	$60, %eax, %edx
	movl	-12(%rbp), %eax
	imull	$-11, %eax, %eax
	addl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	subl	$60, %eax
	movslq	%eax, %rdx
	imulq	$-2009080335, %rdx, %rdx
	shrq	$32, %rdx
	addl	%eax, %edx
	sarl	$8, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$481, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	leal	60(%rdx), %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	cmpl	$59, %eax
	jle	.L3
	movl	-8(%rbp), %eax
	cmpl	$179, %eax
	jg	.L4
	leaq	.LC0(%rip), %rax
	jmp	.L6
.L4:
	leaq	.LC1(%rip), %rax
	jmp	.L6
.L3:
	leaq	.LC2(%rip), %rax
.L6:
	movq	%rax, %rdi
	call	puts@PLT
	testl	%eax, %eax
	sete	%al
	movzbl	%al, %eax
	movl	%eax, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jne	.L7
	leaq	3+.LC3(%rip), %rax
	jmp	.L8
.L7:
	leaq	.LC3(%rip), %rax
.L8:
	leaq	-12(%rbp), %rdx
	leaq	-8(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L9
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
