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

```c
o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	o
	.bss
	.align 32
	.type	o, @object
	.size	o, 524288
o:
	.zero	524288
	.globl	e
	.align 32
	.type	e, @object
	.size	e, 524288
e:
	.zero	524288
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%.f"
	.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)
	jmp	.L2
.L14:
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	je	.L2
	movl	i(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L5
	movl	f(%rip), %eax
	movl	%eax, s(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, f(%rip)
	jmp	.L2
.L5:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	f(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, s(%rip)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	movl	g(%rip), %eax
	movl	%eax, t(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, g(%rip)
	jmp	.L2
.L10:
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	g(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, t(%rip)
	nop
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L14
	movl	i(%rip), %eax
	subl	$1, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -16(%rbp)
	movl	f(%rip), %edx
	movl	g(%rip), %eax
	cmpl	%eax, %edx
	je	.L15
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L16
.L15:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
.L16:
	movsd	-16(%rbp), %xmm2
	subsd	%xmm0, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	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	"%d"
.LC1:
	.string	"%.f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	e(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	o(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	jne	.L27
.L3:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	movl	i(%rip), %eax
	jne	.L11
	subl	$1, %eax
	pxor	%xmm2, %xmm2
	movslq	f(%rip), %rsi
	cvtsi2sdl	%eax, %xmm2
	movslq	g(%rip), %rax
	movq	%rsi, %rcx
	movl	0(%r13,%rsi,4), %esi
	movq	%rax, %rdx
	movl	(%r12,%rax,4), %eax
	cmpl	%edx, %ecx
	je	.L12
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
.L13:
	subsd	%xmm0, %xmm2
	leaq	.LC1(%rip), %rdi
	movl	$1, %eax
	movapd	%xmm2, %xmm0
	call	printf@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movl	12(%rsp), %eax
	andl	$1, %edx
	movslq	%eax, %rcx
	je	.L4
	movl	0(%r13,%rcx,4), %edi
	movslq	f(%rip), %rsi
	leal	1(%rdi), %edx
	movl	%edx, 0(%r13,%rcx,4)
	movq	%rsi, %rcx
	cmpl	0(%r13,%rsi,4), %edx
	jle	.L5
	movl	%esi, s(%rip)
	movl	%eax, f(%rip)
	jmp	.L3
.L4:
	movl	(%r12,%rcx,4), %edi
	movslq	g(%rip), %rsi
	leal	1(%rdi), %edx
	movl	%edx, (%r12,%rcx,4)
	movq	%rsi, %rcx
	cmpl	(%r12,%rsi,4), %edx
	jle	.L9
	movl	%esi, t(%rip)
	movl	%eax, g(%rip)
	jmp	.L3
.L12:
	movslq	s(%rip), %rdx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movsd	%xmm2, (%rsp)
	addl	0(%r13,%rdx,4), %eax
	movslq	t(%rip), %rdx
	cvtsi2sdl	%eax, %xmm1
	addl	(%r12,%rdx,4), %esi
	cvtsi2sdl	%esi, %xmm0
	call	fmax@PLT
	movsd	(%rsp), %xmm2
	jmp	.L13
.L9:
	movslq	t(%rip), %rsi
	cmpl	(%r12,%rsi,4), %edx
	jle	.L3
	cmpl	%eax, %ecx
	je	.L3
	movl	%eax, t(%rip)
	jmp	.L3
.L5:
	movslq	s(%rip), %rsi
	cmpl	0(%r13,%rsi,4), %edx
	jle	.L3
	cmpl	%eax, %ecx
	je	.L3
	movl	%eax, s(%rip)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	t
	.bss
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	e
	.align 32
	.type	e, @object
	.size	e, 524288
e:
	.zero	524288
	.globl	o
	.align 32
	.type	o, @object
	.size	o, 524288
o:
	.zero	524288
	.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	"%d"
.LC1:
	.string	"%.f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	e(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	o(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	jne	.L27
.L3:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	cmpl	$-1, %eax
	movl	i(%rip), %eax
	jne	.L11
	subl	$1, %eax
	pxor	%xmm2, %xmm2
	movslq	f(%rip), %rsi
	cvtsi2sdl	%eax, %xmm2
	movslq	g(%rip), %rax
	movq	%rsi, %rcx
	movl	0(%r13,%rsi,4), %esi
	movq	%rax, %rdx
	movl	(%r12,%rax,4), %eax
	cmpl	%edx, %ecx
	je	.L12
	addl	%esi, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
.L13:
	subsd	%xmm0, %xmm2
	leaq	.LC1(%rip), %rdi
	movl	$1, %eax
	movapd	%xmm2, %xmm0
	call	printf@PLT
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movl	12(%rsp), %eax
	andl	$1, %edx
	movslq	%eax, %rcx
	je	.L4
	movl	0(%r13,%rcx,4), %edi
	movslq	f(%rip), %rsi
	leal	1(%rdi), %edx
	movl	%edx, 0(%r13,%rcx,4)
	movq	%rsi, %rcx
	cmpl	0(%r13,%rsi,4), %edx
	jle	.L5
	movl	%esi, s(%rip)
	movl	%eax, f(%rip)
	jmp	.L3
.L4:
	movl	(%r12,%rcx,4), %edi
	movslq	g(%rip), %rsi
	leal	1(%rdi), %edx
	movl	%edx, (%r12,%rcx,4)
	movq	%rsi, %rcx
	cmpl	(%r12,%rsi,4), %edx
	jle	.L9
	movl	%esi, t(%rip)
	movl	%eax, g(%rip)
	jmp	.L3
.L12:
	movslq	s(%rip), %rdx
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	movsd	%xmm2, (%rsp)
	addl	0(%r13,%rdx,4), %eax
	movslq	t(%rip), %rdx
	cvtsi2sdl	%eax, %xmm1
	addl	(%r12,%rdx,4), %esi
	cvtsi2sdl	%esi, %xmm0
	call	fmax@PLT
	movsd	(%rsp), %xmm2
	jmp	.L13
.L9:
	movslq	t(%rip), %rsi
	cmpl	(%r12,%rsi,4), %edx
	jle	.L3
	cmpl	%eax, %ecx
	je	.L3
	movl	%eax, t(%rip)
	jmp	.L3
.L5:
	movslq	s(%rip), %rsi
	cmpl	0(%r13,%rsi,4), %edx
	jle	.L3
	cmpl	%eax, %ecx
	je	.L3
	movl	%eax, s(%rip)
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	t
	.bss
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	e
	.align 32
	.type	e, @object
	.size	e, 524288
e:
	.zero	524288
	.globl	o
	.align 32
	.type	o, @object
	.size	o, 524288
o:
	.zero	524288
	.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:

o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}
4
3 1 3 2

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

```c
o[1<<17];e[1<<17];i;f;s;g;t;main(a,b){for(;~scanf("%d",&a);)i++?i%2?b=++e[a],b>e[f]?s=f,f=a:b>e[s]&&f-a?s=a:0:(b=++o[a],b>o[g]?t=g,g=a:b>o[t]&&g-a?t=a:0):0;printf("%.f",i-1-(f-g?e[f]+o[g]:fmax(e[f]+o[t],e[s]+o[g])));}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	o
	.bss
	.align 32
	.type	o, @object
	.size	o, 524288
o:
	.zero	524288
	.globl	e
	.align 32
	.type	e, @object
	.size	e, 524288
e:
	.zero	524288
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%.f"
	.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)
	jmp	.L2
.L14:
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	je	.L2
	movl	i(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L5
	movl	f(%rip), %eax
	movl	%eax, s(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, f(%rip)
	jmp	.L2
.L5:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	f(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, s(%rip)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	movl	g(%rip), %eax
	movl	%eax, t(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, g(%rip)
	jmp	.L2
.L10:
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	g(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, t(%rip)
	nop
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L14
	movl	i(%rip), %eax
	subl	$1, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -16(%rbp)
	movl	f(%rip), %edx
	movl	g(%rip), %eax
	cmpl	%eax, %edx
	je	.L15
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L16
.L15:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
.L16:
	movsd	-16(%rbp), %xmm2
	subsd	%xmm0, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	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
	.globl	o
	.bss
	.align 32
	.type	o, @object
	.size	o, 524288
o:
	.zero	524288
	.globl	e
	.align 32
	.type	e, @object
	.size	e, 524288
e:
	.zero	524288
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	g
	.align 4
	.type	g, @object
	.size	g, 4
g:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%.f"
	.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)
	jmp	.L2
.L14:
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	testl	%eax, %eax
	je	.L2
	movl	i(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L4
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	e(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L5
	movl	f(%rip), %eax
	movl	%eax, s(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, f(%rip)
	jmp	.L2
.L5:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	f(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, s(%rip)
	jmp	.L2
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	leal	1(%rdx), %esi
	movslq	%eax, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	o(%rip), %rdx
	movl	%esi, (%rcx,%rdx)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L10
	movl	g(%rip), %eax
	movl	%eax, t(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, g(%rip)
	jmp	.L2
.L10:
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L2
	movl	g(%rip), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	je	.L2
	movl	-4(%rbp), %eax
	movl	%eax, t(%rip)
	nop
.L2:
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$-1, %eax
	jne	.L14
	movl	i(%rip), %eax
	subl	$1, %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movsd	%xmm3, -16(%rbp)
	movl	f(%rip), %edx
	movl	g(%rip), %eax
	cmpl	%eax, %edx
	je	.L15
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L16
.L15:
	movl	s(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	g(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	movl	f(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	e(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	t(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	o(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmax@PLT
.L16:
	movsd	-16(%rbp), %xmm2
	subsd	%xmm0, %xmm2
	movq	%xmm2, %rax
	movq	%rax, %xmm0
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	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:
