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>
int main()
{
    long int a,b,c,d;
    long long int A,B,C,D;
    scanf("%ld %ld",&a,&b);
    scanf("%ld %ld",&c,&d);
    
    A=a*c;
    B=b*c;
    C=a*d;
    D=b*d;
    long int temp=A;
    if(A>B)
    {
        temp = A;
        A=B;
        B=temp;
    }
    if(B>C)
    {
        
        temp=B;
        B=C;
        C=temp;
    }
    if(C>D)
    {
        
        temp=C;
        C=D;
        D=temp;
    }
    if(D>A)
    {
        temp=D;
        D=A;
        A=temp;
    }
    if(A>B)
    {
        
        temp=A;
        A=B;
        B=temp;
    }
    printf("%ld\n",temp);
    return 0;
    
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-80(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L2
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L2:
	movq	-40(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L3
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L3:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L4:
	movq	-24(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jle	.L5
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
.L5:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L6
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L6:
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$48, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	24(%rsp), %rax
	movq	16(%rsp), %rsi
	movq	32(%rsp), %rdi
	movq	%rcx, %rdx
	imulq	%rax, %rdx
	imulq	%rsi, %rax
	imulq	%rdi, %rcx
	imulq	%rdi, %rsi
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	jle	.L2
	movq	%rax, %rdi
	movq	%rdx, %rax
.L2:
	cmpq	%rcx, %rax
	jle	.L3
	movq	%rax, %rdx
	movq	%rcx, %rax
	movq	%rdx, %rcx
.L3:
	cmpq	%rsi, %rcx
	jle	.L4
	movq	%rcx, %rdx
	movq	%rcx, %rsi
.L4:
	cmpq	%rsi, %rdi
	jge	.L5
	movq	%rsi, %rdx
	movq	%rsi, %rdi
.L5:
	cmpq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	cmovg	%rdi, %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rbp
	movq	%rbp, %rdi
	subq	$48, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	32(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rcx
	movq	24(%rsp), %rax
	movq	16(%rsp), %rsi
	movq	32(%rsp), %rdi
	movq	%rcx, %rdx
	imulq	%rax, %rdx
	imulq	%rsi, %rax
	imulq	%rdi, %rcx
	imulq	%rdi, %rsi
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	jle	.L2
	movq	%rax, %rdi
	movq	%rdx, %rax
.L2:
	cmpq	%rcx, %rax
	jle	.L3
	movq	%rax, %rdx
	movq	%rcx, %rax
	movq	%rdx, %rcx
.L3:
	cmpq	%rsi, %rcx
	jle	.L4
	movq	%rcx, %rdx
	movq	%rcx, %rsi
.L4:
	cmpq	%rsi, %rdi
	jge	.L5
	movq	%rsi, %rdx
	movq	%rsi, %rdi
.L5:
	cmpq	%rax, %rdi
	leaq	.LC1(%rip), %rsi
	cmovg	%rdi, %rdx
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L12
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>
int main()
{
    long int a,b,c,d;
    long long int A,B,C,D;
    scanf("%ld %ld",&a,&b);
    scanf("%ld %ld",&c,&d);
    
    A=a*c;
    B=b*c;
    C=a*d;
    D=b*d;
    long int temp=A;
    if(A>B)
    {
        temp = A;
        A=B;
        B=temp;
    }
    if(B>C)
    {
        
        temp=B;
        B=C;
        C=temp;
    }
    if(C>D)
    {
        
        temp=C;
        C=D;
        D=temp;
    }
    if(D>A)
    {
        temp=D;
        D=A;
        A=temp;
    }
    if(A>B)
    {
        
        temp=A;
        A=B;
        B=temp;
    }
    printf("%ld\n",temp);
    return 0;
    
}


-452063450 0 -1000000000 0
 1 0 1 1
 5 5 -4 -2
 -452063450 0 -1763699314 0
 5 5 -4 -4
 -452063450 0 -1612807650 0
 0 0 0 1
 -452063450 0 -1164863873 0
 5 5 -1 -4
 -452063450 -1 -2145079035 0

452063450000000000
 1
 -10
 797303996649473300
 -20
 729091390445392500
 0
 526592381208741850
 -5
 969711829084770750

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>
int main()
{
    long int a,b,c,d;
    long long int A,B,C,D;
    scanf("%ld %ld",&a,&b);
    scanf("%ld %ld",&c,&d);
    
    A=a*c;
    B=b*c;
    C=a*d;
    D=b*d;
    long int temp=A;
    if(A>B)
    {
        temp = A;
        A=B;
        B=temp;
    }
    if(B>C)
    {
        
        temp=B;
        B=C;
        C=temp;
    }
    if(C>D)
    {
        
        temp=C;
        C=D;
        D=temp;
    }
    if(D>A)
    {
        temp=D;
        D=A;
        A=temp;
    }
    if(A>B)
    {
        
        temp=A;
        A=B;
        B=temp;
    }
    printf("%ld\n",temp);
    return 0;
    
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-80(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L2
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L2:
	movq	-40(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L3
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L3:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L4:
	movq	-24(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jle	.L5
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
.L5:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L6
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L6:
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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	"%ld %ld"
.LC1:
	.string	"%ld\n"
	.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	$80, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-72(%rbp), %rdx
	leaq	-80(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-80(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -48(%rbp)
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -40(%rbp)
	movq	-80(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -32(%rbp)
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L2
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L2:
	movq	-40(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jle	.L3
	movq	-40(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -32(%rbp)
.L3:
	movq	-32(%rbp), %rax
	cmpq	-24(%rbp), %rax
	jle	.L4
	movq	-32(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -24(%rbp)
.L4:
	movq	-24(%rbp), %rax
	cmpq	-48(%rbp), %rax
	jle	.L5
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -48(%rbp)
.L5:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	jle	.L6
	movq	-48(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, -40(%rbp)
.L6:
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	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:
