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

```c
// Aizu Vol-1 0163: Highway Toll
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int d[7][7] = {
	{  0,  6, 13, 18, 23, 43, 58 },
	{  6,  0,  7, 12, 17, 37, 52 },
	{ 13,  7,  0,  5, 10, 30, 45 },
	{ 18, 12,  5,  0,  5, 25, 40 },
	{ 23, 17, 10,  5,  0, 20, 35 },
	{ 43, 37, 30, 25, 20,  0, 15 },
	{ 58, 52, 45, 40, 35, 15,  0 } };

int f[7][7] = {
	{    0,  300,  500,  600,  700, 1350, 1650 },
	{  300,    0,  350,  450,  600, 1150, 1500 },
	{  500,  350,    0,  250,  400, 1000, 1350 },
	{  600,  450,  250,    0,  250,  850, 1300 },
	{  700,  600,  400,  250,    0,  600, 1150 },
	{ 1350, 1150, 1000,  850,  600,    0,  500 },
	{ 1650, 1500, 1350, 1300, 1150,  500,    0 } };

int main()
{
	int in, out, ti, to;;
	int fee;

	while (1) {
		gets(buf);
		if (!(in = atoi(buf))) break;
		gets(p = buf), ti = getInt() * 100 + getInt();
		gets(buf), out = atoi(buf);
		gets(p = buf), to = getInt() * 100 + getInt();
		fee = f[--in][--out];
		if (d[in][out] <= 40 && ((1730 <= ti && ti <= 1930) || (1730 <= to && to <= 1930)))
			fee = ((fee/2 - 1) / 50 + 1) * 50;
		printf("%d\n", fee);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.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
.L3:
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L3
	jmp	.L4
.L5:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L4:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	d
	.data
	.align 32
	.type	d, @object
	.size	d, 196
d:
	.long	0
	.long	6
	.long	13
	.long	18
	.long	23
	.long	43
	.long	58
	.long	6
	.long	0
	.long	7
	.long	12
	.long	17
	.long	37
	.long	52
	.long	13
	.long	7
	.long	0
	.long	5
	.long	10
	.long	30
	.long	45
	.long	18
	.long	12
	.long	5
	.long	0
	.long	5
	.long	25
	.long	40
	.long	23
	.long	17
	.long	10
	.long	5
	.long	0
	.long	20
	.long	35
	.long	43
	.long	37
	.long	30
	.long	25
	.long	20
	.long	0
	.long	15
	.long	58
	.long	52
	.long	45
	.long	40
	.long	35
	.long	15
	.long	0
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 196
f:
	.long	0
	.long	300
	.long	500
	.long	600
	.long	700
	.long	1350
	.long	1650
	.long	300
	.long	0
	.long	350
	.long	450
	.long	600
	.long	1150
	.long	1500
	.long	500
	.long	350
	.long	0
	.long	250
	.long	400
	.long	1000
	.long	1350
	.long	600
	.long	450
	.long	250
	.long	0
	.long	250
	.long	850
	.long	1300
	.long	700
	.long	600
	.long	400
	.long	250
	.long	0
	.long	600
	.long	1150
	.long	1350
	.long	1150
	.long	1000
	.long	850
	.long	600
	.long	0
	.long	500
	.long	1650
	.long	1500
	.long	1350
	.long	1300
	.long	1150
	.long	500
	.long	0
	.section	.rodata
.LC0:
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L16
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -28(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -24(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -20(%rbp)
	subl	$1, -32(%rbp)
	subl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$40, %eax
	jg	.L10
	cmpl	$1729, -28(%rbp)
	jle	.L11
	cmpl	$1930, -28(%rbp)
	jle	.L12
.L11:
	cmpl	$1729, -20(%rbp)
	jle	.L10
	cmpl	$1930, -20(%rbp)
	jg	.L10
.L12:
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	imull	$50, %eax, %eax
	movl	%eax, -36(%rbp)
.L10:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%rbp, %rdi
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rax, %rbx
	testl	%eax, %eax
	je	.L41
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	%rax, %r14
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L17
.L16:
	andb	$8, %dh
	je	.L33
	addq	$1, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rax, p(%rip)
	leal	(%rcx,%rcx,4), %edi
	movsbl	-1(%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %ecx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L19
	imull	$100, %ecx, %r13d
	testw	$8192, %di
	je	.L21
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rdi
	addq	$1, %rdx
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L21
	movq	%rdx, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rax, %rdi
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %r9d
	movsbl	-1(%rax), %edx
	movsbq	(%rdi), %rdi
	addq	$1, %rax
	leal	-48(%rdx,%r9,2), %edx
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L22
	addl	%edx, %r13d
.L21:
	movq	%rbp, %rdi
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	movq	%rax, %r15
	call	gets@PLT
	movq	p(%rip), %rax
	movq	(%r14), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edi
	testw	$8192, %di
	je	.L23
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rdi
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L24
.L23:
	testw	$2048, %di
	je	.L34
	addq	$1, %rax
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rax, p(%rip)
	leal	(%rdi,%rdi,4), %r8d
	movsbl	-1(%rax), %edi
	addq	$1, %rax
	leal	-48(%rdi,%r8,2), %edi
	movsbq	-1(%rax), %r8
	movzwl	(%rsi,%r8,2), %r8d
	testw	$2048, %r8w
	jne	.L26
	imull	$100, %edi, %edi
	testw	$8192, %r8w
	je	.L28
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %r8
	addq	$1, %rdx
	movzwl	(%rsi,%r8,2), %r8d
	testw	$8192, %r8w
	jne	.L27
	testw	$2048, %r8w
	je	.L28
	movq	%rdx, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%rax, %r8
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %r9d
	movsbl	-1(%rax), %edx
	movsbq	(%r8), %r8
	addq	$1, %rax
	leal	-48(%rdx,%r9,2), %edx
	testb	$8, 1(%rsi,%r8,2)
	jne	.L29
	addl	%edx, %edi
.L28:
	subl	$1, %ebx
	subl	$1, %r15d
	movslq	%ebx, %rbx
	movslq	%r15d, %r15
	leaq	(%r15,%rbx,8), %rax
	subq	%rbx, %rax
	leaq	f(%rip), %rbx
	movl	(%rbx,%rax,4), %edx
	leaq	d(%rip), %rbx
	cmpl	$40, (%rbx,%rax,4)
	jg	.L30
	leal	-1730(%r13), %ecx
	cmpl	$200, %ecx
	jbe	.L31
	subl	$1730, %edi
	cmpl	$200, %edi
	ja	.L30
.L31:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1374389535, %rdx, %rdx
	sarq	$36, %rdx
	subl	%eax, %edx
	addl	$1, %edx
	imull	$50, %edx, %edx
.L30:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L41:
	addq	$8, %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
.L34:
	.cfi_restore_state
	xorl	%edi, %edi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%r13d, %r13d
	jmp	.L21
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	f
	.data
	.align 32
	.type	f, @object
	.size	f, 196
f:
	.long	0
	.long	300
	.long	500
	.long	600
	.long	700
	.long	1350
	.long	1650
	.long	300
	.long	0
	.long	350
	.long	450
	.long	600
	.long	1150
	.long	1500
	.long	500
	.long	350
	.long	0
	.long	250
	.long	400
	.long	1000
	.long	1350
	.long	600
	.long	450
	.long	250
	.long	0
	.long	250
	.long	850
	.long	1300
	.long	700
	.long	600
	.long	400
	.long	250
	.long	0
	.long	600
	.long	1150
	.long	1350
	.long	1150
	.long	1000
	.long	850
	.long	600
	.long	0
	.long	500
	.long	1650
	.long	1500
	.long	1350
	.long	1300
	.long	1150
	.long	500
	.long	0
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 196
d:
	.long	0
	.long	6
	.long	13
	.long	18
	.long	23
	.long	43
	.long	58
	.long	6
	.long	0
	.long	7
	.long	12
	.long	17
	.long	37
	.long	52
	.long	13
	.long	7
	.long	0
	.long	5
	.long	10
	.long	30
	.long	45
	.long	18
	.long	12
	.long	5
	.long	0
	.long	5
	.long	25
	.long	40
	.long	23
	.long	17
	.long	10
	.long	5
	.long	0
	.long	20
	.long	35
	.long	43
	.long	37
	.long	30
	.long	25
	.long	20
	.long	0
	.long	15
	.long	58
	.long	52
	.long	45
	.long	40
	.long	35
	.long	15
	.long	0
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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	getInt
	.type	getInt, @function
getInt:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %ecx
	testb	$32, %ch
	je	.L2
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rcx
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rcx,2), %ecx
	testb	$32, %ch
	jne	.L3
.L2:
	andb	$8, %ch
	je	.L6
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %edi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %r8d
	testb	$8, 1(%rsi,%rdx,2)
	jne	.L5
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB42:
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%rbp, %rdi
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rax, %rbx
	testl	%eax, %eax
	je	.L41
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	call	__ctype_b_loc@PLT
	movq	(%rax), %rsi
	movq	%rax, %r14
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	je	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rax
	movq	%rax, p(%rip)
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edx
	testb	$32, %dh
	jne	.L17
.L16:
	andb	$8, %dh
	je	.L33
	addq	$1, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movq	%rax, p(%rip)
	leal	(%rcx,%rcx,4), %edi
	movsbl	-1(%rax), %ecx
	addq	$1, %rax
	leal	-48(%rcx,%rdi,2), %ecx
	movsbq	-1(%rax), %rdi
	movzwl	(%rsi,%rdi,2), %edi
	testw	$2048, %di
	jne	.L19
	imull	$100, %ecx, %r13d
	testw	$8192, %di
	je	.L21
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rdi
	addq	$1, %rdx
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L20
	testw	$2048, %di
	je	.L21
	movq	%rdx, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L22:
	movq	%rax, %rdi
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %r9d
	movsbl	-1(%rax), %edx
	movsbq	(%rdi), %rdi
	addq	$1, %rax
	leal	-48(%rdx,%r9,2), %edx
	testb	$8, 1(%rsi,%rdi,2)
	jne	.L22
	addl	%edx, %r13d
.L21:
	movq	%rbp, %rdi
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	strtol@PLT
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	movq	%rax, %r15
	call	gets@PLT
	movq	p(%rip), %rax
	movq	(%r14), %rsi
	movsbq	(%rax), %rdx
	movzwl	(%rsi,%rdx,2), %edi
	testw	$8192, %di
	je	.L23
	leaq	1(%rax), %rdx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %rdi
	movq	%rdx, %rax
	addq	$1, %rdx
	movzwl	(%rsi,%rdi,2), %edi
	testw	$8192, %di
	jne	.L24
.L23:
	testw	$2048, %di
	je	.L34
	addq	$1, %rax
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%rax, p(%rip)
	leal	(%rdi,%rdi,4), %r8d
	movsbl	-1(%rax), %edi
	addq	$1, %rax
	leal	-48(%rdi,%r8,2), %edi
	movsbq	-1(%rax), %r8
	movzwl	(%rsi,%r8,2), %r8d
	testw	$2048, %r8w
	jne	.L26
	imull	$100, %edi, %edi
	testw	$8192, %r8w
	je	.L28
	movq	%rax, %rdx
	.p2align 4,,10
	.p2align 3
.L27:
	movq	%rdx, p(%rip)
	movsbq	(%rdx), %r8
	addq	$1, %rdx
	movzwl	(%rsi,%r8,2), %r8d
	testw	$8192, %r8w
	jne	.L27
	testw	$2048, %r8w
	je	.L28
	movq	%rdx, %rax
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%rax, %r8
	movq	%rax, p(%rip)
	leal	(%rdx,%rdx,4), %r9d
	movsbl	-1(%rax), %edx
	movsbq	(%r8), %r8
	addq	$1, %rax
	leal	-48(%rdx,%r9,2), %edx
	testb	$8, 1(%rsi,%r8,2)
	jne	.L29
	addl	%edx, %edi
.L28:
	subl	$1, %ebx
	subl	$1, %r15d
	movslq	%ebx, %rbx
	movslq	%r15d, %r15
	leaq	(%r15,%rbx,8), %rax
	subq	%rbx, %rax
	leaq	f(%rip), %rbx
	movl	(%rbx,%rax,4), %edx
	leaq	d(%rip), %rbx
	cmpl	$40, (%rbx,%rax,4)
	jg	.L30
	leal	-1730(%r13), %ecx
	cmpl	$200, %ecx
	jbe	.L31
	subl	$1730, %edi
	cmpl	$200, %edi
	ja	.L30
.L31:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	movslq	%eax, %rdx
	sarl	$31, %eax
	imulq	$1374389535, %rdx, %rdx
	sarq	$36, %rdx
	subl	%eax, %edx
	addl	$1, %edx
	imull	$50, %edx, %edx
.L30:
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L41:
	addq	$8, %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
.L34:
	.cfi_restore_state
	xorl	%edi, %edi
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%r13d, %r13d
	jmp	.L21
	.cfi_endproc
.LFE42:
	.size	main, .-main
	.globl	f
	.data
	.align 32
	.type	f, @object
	.size	f, 196
f:
	.long	0
	.long	300
	.long	500
	.long	600
	.long	700
	.long	1350
	.long	1650
	.long	300
	.long	0
	.long	350
	.long	450
	.long	600
	.long	1150
	.long	1500
	.long	500
	.long	350
	.long	0
	.long	250
	.long	400
	.long	1000
	.long	1350
	.long	600
	.long	450
	.long	250
	.long	0
	.long	250
	.long	850
	.long	1300
	.long	700
	.long	600
	.long	400
	.long	250
	.long	0
	.long	600
	.long	1150
	.long	1350
	.long	1150
	.long	1000
	.long	850
	.long	600
	.long	0
	.long	500
	.long	1650
	.long	1500
	.long	1350
	.long	1300
	.long	1150
	.long	500
	.long	0
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 196
d:
	.long	0
	.long	6
	.long	13
	.long	18
	.long	23
	.long	43
	.long	58
	.long	6
	.long	0
	.long	7
	.long	12
	.long	17
	.long	37
	.long	52
	.long	13
	.long	7
	.long	0
	.long	5
	.long	10
	.long	30
	.long	45
	.long	18
	.long	12
	.long	5
	.long	0
	.long	5
	.long	25
	.long	40
	.long	23
	.long	17
	.long	10
	.long	5
	.long	0
	.long	20
	.long	35
	.long	43
	.long	37
	.long	30
	.long	25
	.long	20
	.long	0
	.long	15
	.long	58
	.long	52
	.long	45
	.long	40
	.long	35
	.long	15
	.long	0
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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:

// Aizu Vol-1 0163: Highway Toll
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int d[7][7] = {
	{  0,  6, 13, 18, 23, 43, 58 },
	{  6,  0,  7, 12, 17, 37, 52 },
	{ 13,  7,  0,  5, 10, 30, 45 },
	{ 18, 12,  5,  0,  5, 25, 40 },
	{ 23, 17, 10,  5,  0, 20, 35 },
	{ 43, 37, 30, 25, 20,  0, 15 },
	{ 58, 52, 45, 40, 35, 15,  0 } };

int f[7][7] = {
	{    0,  300,  500,  600,  700, 1350, 1650 },
	{  300,    0,  350,  450,  600, 1150, 1500 },
	{  500,  350,    0,  250,  400, 1000, 1350 },
	{  600,  450,  250,    0,  250,  850, 1300 },
	{  700,  600,  400,  250,    0,  600, 1150 },
	{ 1350, 1150, 1000,  850,  600,    0,  500 },
	{ 1650, 1500, 1350, 1300, 1150,  500,    0 } };

int main()
{
	int in, out, ti, to;;
	int fee;

	while (1) {
		gets(buf);
		if (!(in = atoi(buf))) break;
		gets(p = buf), ti = getInt() * 100 + getInt();
		gets(buf), out = atoi(buf);
		gets(p = buf), to = getInt() * 100 + getInt();
		fee = f[--in][--out];
		if (d[in][out] <= 40 && ((1730 <= ti && ti <= 1930) || (1730 <= to && to <= 1930)))
			fee = ((fee/2 - 1) / 50 + 1) * 50;
		printf("%d\n", fee);
	}
	return 0;
}
2
17 25
4
17 45
4
17 25
7
1 35
0
 2
19 25
4
17 37
4
17 47
7
0 63
0
 2
14 25
4
3 37
4
17 47
7
0 63
0
 2
13 25
3
17 45
4
17 25
7
1 35
0
 2
14 25
4
17 37
0
17 47
7
0 63
0
 2
13 25
3
17 45
4
17 47
7
1 35
0
 2
19 25
4
23 37
3
17 25
7
1 63
0
 2
14 25
6
17 37
0
17 47
7
0 63
0
 2
14 25
4
3 57
6
17 47
7
0 63
0
 2
19 25
5
17 37
4
17 2
7
-1 63
0

250
1300
 250
650
 450
650
 200
1300
 250
 200
650
 250
1350
 600
 450
250
 300
1300

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

```c
// Aizu Vol-1 0163: Highway Toll
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	int n = 0;
	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int d[7][7] = {
	{  0,  6, 13, 18, 23, 43, 58 },
	{  6,  0,  7, 12, 17, 37, 52 },
	{ 13,  7,  0,  5, 10, 30, 45 },
	{ 18, 12,  5,  0,  5, 25, 40 },
	{ 23, 17, 10,  5,  0, 20, 35 },
	{ 43, 37, 30, 25, 20,  0, 15 },
	{ 58, 52, 45, 40, 35, 15,  0 } };

int f[7][7] = {
	{    0,  300,  500,  600,  700, 1350, 1650 },
	{  300,    0,  350,  450,  600, 1150, 1500 },
	{  500,  350,    0,  250,  400, 1000, 1350 },
	{  600,  450,  250,    0,  250,  850, 1300 },
	{  700,  600,  400,  250,    0,  600, 1150 },
	{ 1350, 1150, 1000,  850,  600,    0,  500 },
	{ 1650, 1500, 1350, 1300, 1150,  500,    0 } };

int main()
{
	int in, out, ti, to;;
	int fee;

	while (1) {
		gets(buf);
		if (!(in = atoi(buf))) break;
		gets(p = buf), ti = getInt() * 100 + getInt();
		gets(buf), out = atoi(buf);
		gets(p = buf), to = getInt() * 100 + getInt();
		fee = f[--in][--out];
		if (d[in][out] <= 40 && ((1730 <= ti && ti <= 1930) || (1730 <= to && to <= 1930)))
			fee = ((fee/2 - 1) / 50 + 1) * 50;
		printf("%d\n", fee);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.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
.L3:
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L3
	jmp	.L4
.L5:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L4:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	d
	.data
	.align 32
	.type	d, @object
	.size	d, 196
d:
	.long	0
	.long	6
	.long	13
	.long	18
	.long	23
	.long	43
	.long	58
	.long	6
	.long	0
	.long	7
	.long	12
	.long	17
	.long	37
	.long	52
	.long	13
	.long	7
	.long	0
	.long	5
	.long	10
	.long	30
	.long	45
	.long	18
	.long	12
	.long	5
	.long	0
	.long	5
	.long	25
	.long	40
	.long	23
	.long	17
	.long	10
	.long	5
	.long	0
	.long	20
	.long	35
	.long	43
	.long	37
	.long	30
	.long	25
	.long	20
	.long	0
	.long	15
	.long	58
	.long	52
	.long	45
	.long	40
	.long	35
	.long	15
	.long	0
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 196
f:
	.long	0
	.long	300
	.long	500
	.long	600
	.long	700
	.long	1350
	.long	1650
	.long	300
	.long	0
	.long	350
	.long	450
	.long	600
	.long	1150
	.long	1500
	.long	500
	.long	350
	.long	0
	.long	250
	.long	400
	.long	1000
	.long	1350
	.long	600
	.long	450
	.long	250
	.long	0
	.long	250
	.long	850
	.long	1300
	.long	700
	.long	600
	.long	400
	.long	250
	.long	0
	.long	600
	.long	1150
	.long	1350
	.long	1150
	.long	1000
	.long	850
	.long	600
	.long	0
	.long	500
	.long	1650
	.long	1500
	.long	1350
	.long	1300
	.long	1150
	.long	500
	.long	0
	.section	.rodata
.LC0:
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L16
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -28(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -24(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -20(%rbp)
	subl	$1, -32(%rbp)
	subl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$40, %eax
	jg	.L10
	cmpl	$1729, -28(%rbp)
	jle	.L11
	cmpl	$1930, -28(%rbp)
	jle	.L12
.L11:
	cmpl	$1729, -20(%rbp)
	jle	.L10
	cmpl	$1930, -20(%rbp)
	jg	.L10
.L12:
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	imull	$50, %eax, %eax
	movl	%eax, -36(%rbp)
.L10:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.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
.L3:
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L3
	jmp	.L4
.L5:
	movl	-4(%rbp), %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L4:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L5
	movl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	d
	.data
	.align 32
	.type	d, @object
	.size	d, 196
d:
	.long	0
	.long	6
	.long	13
	.long	18
	.long	23
	.long	43
	.long	58
	.long	6
	.long	0
	.long	7
	.long	12
	.long	17
	.long	37
	.long	52
	.long	13
	.long	7
	.long	0
	.long	5
	.long	10
	.long	30
	.long	45
	.long	18
	.long	12
	.long	5
	.long	0
	.long	5
	.long	25
	.long	40
	.long	23
	.long	17
	.long	10
	.long	5
	.long	0
	.long	20
	.long	35
	.long	43
	.long	37
	.long	30
	.long	25
	.long	20
	.long	0
	.long	15
	.long	58
	.long	52
	.long	45
	.long	40
	.long	35
	.long	15
	.long	0
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 196
f:
	.long	0
	.long	300
	.long	500
	.long	600
	.long	700
	.long	1350
	.long	1650
	.long	300
	.long	0
	.long	350
	.long	450
	.long	600
	.long	1150
	.long	1500
	.long	500
	.long	350
	.long	0
	.long	250
	.long	400
	.long	1000
	.long	1350
	.long	600
	.long	450
	.long	250
	.long	0
	.long	250
	.long	850
	.long	1300
	.long	700
	.long	600
	.long	400
	.long	250
	.long	0
	.long	600
	.long	1150
	.long	1350
	.long	1150
	.long	1000
	.long	850
	.long	600
	.long	0
	.long	500
	.long	1650
	.long	1500
	.long	1350
	.long	1300
	.long	1150
	.long	500
	.long	0
	.section	.rodata
.LC0:
	.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
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -32(%rbp)
	cmpl	$0, -32(%rbp)
	je	.L16
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -28(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -24(%rbp)
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	imull	$100, %eax, %ebx
	call	getInt
	addl	%ebx, %eax
	movl	%eax, -20(%rbp)
	subl	$1, -32(%rbp)
	subl	$1, -24(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -36(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$40, %eax
	jg	.L10
	cmpl	$1729, -28(%rbp)
	jle	.L11
	cmpl	$1930, -28(%rbp)
	jle	.L12
.L11:
	cmpl	$1729, -20(%rbp)
	jle	.L10
	cmpl	$1930, -20(%rbp)
	jg	.L10
.L12:
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	subl	$1, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$4, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	$1, %eax
	imull	$50, %eax, %eax
	movl	%eax, -36(%rbp)
.L10:
	movl	-36(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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:
