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

```c
#include<stdio.h>
#include<math.h>
long long int Min(long long int a, long long int b) { if (a < b) { return a; }return b; }
int main()
{
	long long int Q, H, S, D, N;
	scanf("%lld%lld%lld%lld%lld", &Q, &H, &S, &D, &N);

	long long int tmp1, tmp2;
	long long int ans;
	tmp1 = Min(Min(8 * Q, 4 * H), Min(2 * S, D));
	tmp2 = Min(Min(4 * Q, 2 * H), S);
	ans = N / 2 * tmp1 + N % 2 * tmp2;
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Min
	.type	Min, @function
Min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	leaq	-72(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-72(%rbp), %rdx
	addq	%rdx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	Min
	movq	%rax, %rbx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rbx
	movq	-80(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	imulq	-48(%rbp), %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	imulq	-40(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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	Min
	.type	Min, @function
Min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	Min, .-Min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	24(%rsp), %r8
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %r8
	movq	8(%rsp), %rax
	movq	(%rsp), %rsi
	movq	32(%rsp), %rcx
	leaq	0(,%rax,4), %rdi
	leaq	(%r8,%r8), %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	movq	24(%rsp), %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	leaq	0(,%rsi,8), %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	movq	%rcx, %rdi
	salq	$2, %rsi
	addq	%rax, %rax
	shrq	$63, %rdi
	addq	%rcx, %rdi
	sarq	%rdi
	imulq	%rdi, %rdx
	cmpq	%rsi, %rax
	movl	$1, %edi
	cmovg	%rsi, %rax
	movq	%rcx, %rsi
	cmpq	%r8, %rax
	cmovg	%r8, %rax
	shrq	$63, %rsi
	addq	%rsi, %rcx
	andl	$1, %ecx
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	imulq	%rcx, %rax
	addq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L6
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	Min
	.type	Min, @function
Min:
.LFB23:
	.cfi_startproc
	endbr64
	cmpq	%rsi, %rdi
	movq	%rsi, %rax
	cmovle	%rdi, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	Min, .-Min
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	subq	$56, %rsp
	.cfi_def_cfa_offset 64
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	8(%rsp), %rdx
	movq	%rsp, %rsi
	leaq	24(%rsp), %r8
	leaq	32(%rsp), %r9
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %r8
	movq	8(%rsp), %rax
	movq	(%rsp), %rsi
	movq	32(%rsp), %rcx
	leaq	0(,%rax,4), %rdi
	leaq	(%r8,%r8), %rdx
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	movq	24(%rsp), %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	leaq	0(,%rsi,8), %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	movq	%rcx, %rdi
	salq	$2, %rsi
	addq	%rax, %rax
	shrq	$63, %rdi
	addq	%rcx, %rdi
	sarq	%rdi
	imulq	%rdi, %rdx
	cmpq	%rsi, %rax
	movl	$1, %edi
	cmovg	%rsi, %rax
	movq	%rcx, %rsi
	cmpq	%r8, %rax
	cmovg	%r8, %rax
	shrq	$63, %rsi
	addq	%rsi, %rcx
	andl	$1, %ecx
	subq	%rsi, %rcx
	leaq	.LC1(%rip), %rsi
	imulq	%rcx, %rax
	addq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L6
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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:

#include<stdio.h>
#include<math.h>
long long int Min(long long int a, long long int b) { if (a < b) { return a; }return b; }
int main()
{
	long long int Q, H, S, D, N;
	scanf("%lld%lld%lld%lld%lld", &Q, &H, &S, &D, &N);

	long long int tmp1, tmp2;
	long long int ans;
	tmp1 = Min(Min(8 * Q, 4 * H), Min(2 * S, D));
	tmp2 = Min(Min(4 * Q, 2 * H), S);
	ans = N / 2 * tmp1 + N % 2 * tmp2;
	printf("%lld\n", ans);
	return 0;
}
10 100 1010 10000
1
 20 30 70 129
3
 10000 1001 100 10
1
 12345678 87654321 12345678 87654321
226515686
 20 30 70 83
3
 10000 1001 100 10
0
 12345678 87654321 12873114 87654321
226515686
 20 30 70 63
3
 10000 1001 100 10
-1
 1103255 87654321 12873114 87654321
226515686

40
 180
 100
 2796489721305108
 143
 0
 2915962248666204
 123
 -100
 999618252631720

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

```c
#include<stdio.h>
#include<math.h>
long long int Min(long long int a, long long int b) { if (a < b) { return a; }return b; }
int main()
{
	long long int Q, H, S, D, N;
	scanf("%lld%lld%lld%lld%lld", &Q, &H, &S, &D, &N);

	long long int tmp1, tmp2;
	long long int ans;
	tmp1 = Min(Min(8 * Q, 4 * H), Min(2 * S, D));
	tmp2 = Min(Min(4 * Q, 2 * H), S);
	ans = N / 2 * tmp1 + N % 2 * tmp2;
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Min
	.type	Min, @function
Min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	leaq	-72(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-72(%rbp), %rdx
	addq	%rdx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	Min
	movq	%rax, %rbx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rbx
	movq	-80(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	imulq	-48(%rbp), %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	imulq	-40(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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	Min
	.type	Min, @function
Min:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jge	.L2
	movq	-8(%rbp), %rax
	jmp	.L3
.L2:
	movq	-16(%rbp), %rax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Min, .-Min
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld%lld%lld"
.LC1:
	.string	"%lld\n"
	.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	$88, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	leaq	-72(%rbp), %rcx
	leaq	-80(%rbp), %rdx
	leaq	-88(%rbp), %rax
	movq	%rdi, %r9
	movq	%rsi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	-72(%rbp), %rdx
	addq	%rdx, %rdx
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	Min
	movq	%rax, %rbx
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	movq	-88(%rbp), %rax
	salq	$3, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rbx
	movq	-80(%rbp), %rax
	leaq	(%rax,%rax), %rdx
	movq	-88(%rbp), %rax
	salq	$2, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	Min
	movq	%rax, -40(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	imulq	-48(%rbp), %rax
	movq	%rax, %rcx
	movq	-56(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	imulq	-40(%rbp), %rax
	addq	%rcx, %rax
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	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:
