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

```c
J(y,m,d){if(m<3)y--,m+=12;return 1461*y/4+y/400-y/100+3059*(m-2)/100+d-678912;}M,D,y,m,d;main(Y){for(;~scanf("%d%d%d%d%d%d",&Y,&M,&D,&y,&m,&d);)Y<0||printf("%d\n",J(y,m,d)-J(Y,M,D));}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	J
	.type	J, @function
J:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	cmpl	$2, -8(%rbp)
	jg	.L2
	subl	$1, -4(%rbp)
	addl	$12, -8(%rbp)
.L2:
	movl	-4(%rbp), %eax
	imull	$1461, %eax, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, %esi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$7, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	subl	%edx, %eax
	addl	%eax, %ecx
	movl	-8(%rbp), %eax
	subl	$2, %eax
	imull	$3059, %eax, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$678912, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	J, .-J
	.globl	M
	.bss
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	jmp	.L5
.L8:
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L5
	movl	d(%rip), %edx
	movl	m(%rip), %ecx
	movl	y(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %ebx
	movl	D(%rip), %edx
	movl	M(%rip), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L5:
	leaq	-20(%rbp), %rax
	subq	$8, %rsp
	leaq	d(%rip), %rdx
	pushq	%rdx
	leaq	m(%rip), %r9
	leaq	y(%rip), %r8
	leaq	D(%rip), %rdx
	movq	%rdx, %rcx
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	cmpl	$-1, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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
	.p2align 4
	.globl	J
	.type	J, @function
J:
.LFB0:
	.cfi_startproc
	endbr64
	movl	%esi, %eax
	movl	%edx, %esi
	cmpl	$2, %eax
	jg	.L2
	subl	$1, %edi
	addl	$12, %eax
.L2:
	imull	$1461, %edi, %ecx
	testl	%ecx, %ecx
	leal	3(%rcx), %edx
	cmovns	%ecx, %edx
	movslq	%edi, %rcx
	subl	$2, %eax
	sarl	$31, %edi
	imulq	$1374389535, %rcx, %rcx
	imull	$3059, %eax, %eax
	sarl	$2, %edx
	movq	%rcx, %r9
	sarq	$37, %rcx
	sarq	$39, %r9
	movq	%r9, %r8
	subl	%edi, %r8d
	subl	%ecx, %edi
	movslq	%eax, %rcx
	sarl	$31, %eax
	imulq	$1374389535, %rcx, %rcx
	addl	%r8d, %edx
	addl	%edi, %edx
	sarq	$37, %rcx
	subl	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	leal	-678912(%rsi,%rax), %eax
	ret
	.cfi_endproc
.LFE0:
	.size	J, .-J
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	leaq	d(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	D(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	M(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jns	.L12
.L6:
	subq	$8, %rsp
	.cfi_def_cfa_offset 88
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbx, %r9
	pushq	%r14
	.cfi_def_cfa_offset 96
	leaq	y(%rip), %r8
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 88
	popq	%rcx
	.cfi_def_cfa_offset 80
	cmpl	$-1, %eax
	jne	.L9
	addq	$24, %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
.L12:
	.cfi_restore_state
	movl	m(%rip), %edx
	movl	d(%rip), %edi
	movl	y(%rip), %ecx
	cmpl	$2, %edx
	jg	.L7
	subl	$1, %ecx
	addl	$12, %edx
.L7:
	imull	$1461, %ecx, %r8d
	testl	%r8d, %r8d
	leal	3(%r8), %esi
	cmovns	%r8d, %esi
	movslq	%ecx, %r8
	subl	$2, %edx
	sarl	$31, %ecx
	imulq	$1374389535, %r8, %r8
	imull	$3059, %edx, %edx
	sarl	$2, %esi
	movq	%r8, %r10
	sarq	$37, %r8
	sarq	$39, %r10
	movq	%r10, %r9
	subl	%ecx, %r9d
	subl	%r8d, %ecx
	addl	%r9d, %esi
	addl	%ecx, %esi
	movslq	%edx, %rcx
	sarl	$31, %edx
	imulq	$1374389535, %rcx, %rcx
	sarq	$37, %rcx
	subl	%edx, %ecx
	movl	M(%rip), %edx
	addl	%ecx, %esi
	addl	%edi, %esi
	movl	D(%rip), %edi
	cmpl	$2, %edx
	jg	.L8
	subl	$1, %eax
	addl	$12, %edx
.L8:
	imull	$1461, %eax, %ecx
	testl	%ecx, %ecx
	leal	3(%rcx), %r8d
	cmovns	%ecx, %r8d
	movslq	%eax, %rcx
	subl	$2, %edx
	sarl	$31, %eax
	imulq	$1374389535, %rcx, %rcx
	imull	$3059, %edx, %edx
	sarl	$2, %r8d
	movq	%rcx, %r11
	sarq	$37, %rcx
	sarq	$39, %r11
	movq	%r11, %r9
	subl	%eax, %r9d
	subl	%ecx, %eax
	movslq	%edx, %rcx
	sarl	$31, %edx
	imulq	$1374389535, %rcx, %rcx
	addl	%r9d, %r8d
	addl	%r8d, %eax
	sarq	$37, %rcx
	subl	%edx, %ecx
	addl	%ecx, %eax
	addl	%edi, %eax
	leaq	.LC0(%rip), %rdi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L6
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	d
	.bss
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.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	J
	.type	J, @function
J:
.LFB0:
	.cfi_startproc
	endbr64
	movl	%esi, %eax
	movl	%edx, %esi
	cmpl	$2, %eax
	jg	.L2
	subl	$1, %edi
	addl	$12, %eax
.L2:
	imull	$1461, %edi, %ecx
	testl	%ecx, %ecx
	leal	3(%rcx), %edx
	cmovns	%ecx, %edx
	movslq	%edi, %rcx
	subl	$2, %eax
	sarl	$31, %edi
	imulq	$1374389535, %rcx, %rcx
	imull	$3059, %eax, %eax
	sarl	$2, %edx
	movq	%rcx, %r9
	sarq	$37, %rcx
	sarq	$39, %r9
	movq	%r9, %r8
	subl	%edi, %r8d
	subl	%ecx, %edi
	movslq	%eax, %rcx
	sarl	$31, %eax
	imulq	$1374389535, %rcx, %rcx
	addl	%r8d, %edx
	addl	%edi, %edx
	sarq	$37, %rcx
	subl	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	leal	-678912(%rsi,%rax), %eax
	ret
	.cfi_endproc
.LFE0:
	.size	J, .-J
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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
	leaq	d(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	D(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	M(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	m(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jns	.L12
.L6:
	subq	$8, %rsp
	.cfi_def_cfa_offset 88
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbx, %r9
	pushq	%r14
	.cfi_def_cfa_offset 96
	leaq	y(%rip), %r8
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	popq	%rdx
	.cfi_def_cfa_offset 88
	popq	%rcx
	.cfi_def_cfa_offset 80
	cmpl	$-1, %eax
	jne	.L9
	addq	$24, %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
.L12:
	.cfi_restore_state
	movl	m(%rip), %edx
	movl	d(%rip), %edi
	movl	y(%rip), %ecx
	cmpl	$2, %edx
	jg	.L7
	subl	$1, %ecx
	addl	$12, %edx
.L7:
	imull	$1461, %ecx, %r8d
	testl	%r8d, %r8d
	leal	3(%r8), %esi
	cmovns	%r8d, %esi
	movslq	%ecx, %r8
	subl	$2, %edx
	sarl	$31, %ecx
	imulq	$1374389535, %r8, %r8
	imull	$3059, %edx, %edx
	sarl	$2, %esi
	movq	%r8, %r10
	sarq	$37, %r8
	sarq	$39, %r10
	movq	%r10, %r9
	subl	%ecx, %r9d
	subl	%r8d, %ecx
	addl	%r9d, %esi
	addl	%ecx, %esi
	movslq	%edx, %rcx
	sarl	$31, %edx
	imulq	$1374389535, %rcx, %rcx
	sarq	$37, %rcx
	subl	%edx, %ecx
	movl	M(%rip), %edx
	addl	%ecx, %esi
	addl	%edi, %esi
	movl	D(%rip), %edi
	cmpl	$2, %edx
	jg	.L8
	subl	$1, %eax
	addl	$12, %edx
.L8:
	imull	$1461, %eax, %ecx
	testl	%ecx, %ecx
	leal	3(%rcx), %r8d
	cmovns	%ecx, %r8d
	movslq	%eax, %rcx
	subl	$2, %edx
	sarl	$31, %eax
	imulq	$1374389535, %rcx, %rcx
	imull	$3059, %edx, %edx
	sarl	$2, %r8d
	movq	%rcx, %r11
	sarq	$37, %rcx
	sarq	$39, %r11
	movq	%r11, %r9
	subl	%eax, %r9d
	subl	%ecx, %eax
	movslq	%edx, %rcx
	sarl	$31, %edx
	imulq	$1374389535, %rcx, %rcx
	addl	%r9d, %r8d
	addl	%r8d, %eax
	sarq	$37, %rcx
	subl	%edx, %ecx
	addl	%ecx, %eax
	addl	%edi, %eax
	leaq	.LC0(%rip), %rdi
	subl	%eax, %esi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L6
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	d
	.bss
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.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:

J(y,m,d){if(m<3)y--,m+=12;return 1461*y/4+y/400-y/100+3059*(m-2)/100+d-678912;}M,D,y,m,d;main(Y){for(;~scanf("%d%d%d%d%d%d",&Y,&M,&D,&y,&m,&d);)Y<0||printf("%d\n",J(y,m,d)-J(Y,M,D));}
2006 9 2 522 9 3
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 2006 9 2
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 1 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 2006 9 2
2006 9 3 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 1 2006 11 11
2004 1 2 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 1 2006 11 11
2004 1 2 2005 1 1
1153 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 1 2006 11 11
2004 1 2 2005 1 1
218 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2703 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 2006 9 2
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
963 1 1 2101 1 1
-1 -1 -1 -1 -1 -1
 2006 9 2 522 9 3
2006 9 1 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 2 1
-1 -1 -1 -1 -1 -1

-542019
70
366
2192
36890
 0
70
366
2192
36890
 -542019
71
366
2192
36890
 0
69
366
2192
36890
 -542019
71
365
2192
36890
 -542019
71
365
311552
36890
 -542019
71
365
653054
36890
 -542019
70
366
2192
-219875
 0
70
366
2192
415646
 -542019
71
366
2192
36921

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

```c
J(y,m,d){if(m<3)y--,m+=12;return 1461*y/4+y/400-y/100+3059*(m-2)/100+d-678912;}M,D,y,m,d;main(Y){for(;~scanf("%d%d%d%d%d%d",&Y,&M,&D,&y,&m,&d);)Y<0||printf("%d\n",J(y,m,d)-J(Y,M,D));}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	J
	.type	J, @function
J:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	cmpl	$2, -8(%rbp)
	jg	.L2
	subl	$1, -4(%rbp)
	addl	$12, -8(%rbp)
.L2:
	movl	-4(%rbp), %eax
	imull	$1461, %eax, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, %esi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$7, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	subl	%edx, %eax
	addl	%eax, %ecx
	movl	-8(%rbp), %eax
	subl	$2, %eax
	imull	$3059, %eax, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$678912, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	J, .-J
	.globl	M
	.bss
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	jmp	.L5
.L8:
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L5
	movl	d(%rip), %edx
	movl	m(%rip), %ecx
	movl	y(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %ebx
	movl	D(%rip), %edx
	movl	M(%rip), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L5:
	leaq	-20(%rbp), %rax
	subq	$8, %rsp
	leaq	d(%rip), %rdx
	pushq	%rdx
	leaq	m(%rip), %r9
	leaq	y(%rip), %r8
	leaq	D(%rip), %rdx
	movq	%rdx, %rcx
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	cmpl	$-1, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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	J
	.type	J, @function
J:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	cmpl	$2, -8(%rbp)
	jg	.L2
	subl	$1, -4(%rbp)
	addl	$12, -8(%rbp)
.L2:
	movl	-4(%rbp), %eax
	imull	$1461, %eax, %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	sarl	$2, %eax
	movl	%eax, %esi
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$7, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	(%rsi,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	subl	%edx, %eax
	addl	%eax, %ecx
	movl	-8(%rbp), %eax
	subl	$2, %eax
	imull	$3059, %eax, %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %esi
	movl	%edx, %eax
	subl	%esi, %eax
	leal	(%rcx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%edx, %eax
	subl	$678912, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	J, .-J
	.globl	M
	.bss
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	D
	.align 4
	.type	D, @object
	.size	D, 4
D:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d\n"
.LC1:
	.string	"%d%d%d%d%d%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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	jmp	.L5
.L8:
	movl	-20(%rbp), %eax
	testl	%eax, %eax
	js	.L5
	movl	d(%rip), %edx
	movl	m(%rip), %ecx
	movl	y(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %ebx
	movl	D(%rip), %edx
	movl	M(%rip), %ecx
	movl	-20(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	J
	movl	%eax, %edx
	movl	%ebx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	testl	%eax, %eax
.L5:
	leaq	-20(%rbp), %rax
	subq	$8, %rsp
	leaq	d(%rip), %rdx
	pushq	%rdx
	leaq	m(%rip), %r9
	leaq	y(%rip), %r8
	leaq	D(%rip), %rdx
	movq	%rdx, %rcx
	leaq	M(%rip), %rdx
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addq	$16, %rsp
	cmpl	$-1, %eax
	jne	.L8
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	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:
