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>
double max(double a, double b)
{
    if (a > b)
        return a;
    else
        return b;
}
double min(double a, double b)
{
    if (a < b)
        return a;
    else
        return b;
}
double abs(double a)
{
    if (a >= 0)
        return a;
    else
        return -a;
}
int main()
{
    long long int h, w;
    scanf("%lld %lld", &h, &w);
    if (h % 3 == 0 || w % 3 == 0)
    {
        printf("0\n");
        return 0;
    }
    long long int i;
    unsigned long long int ans = 2000000000;
    i = h / 3;
    ans = min(ans, min(w*(h + 1 - i) / 2, (h - i)*((w + 1) / 2)) - (i*w));
    i++;
    ans = min(ans, (w*i) - max(w*((h - i) / 2), (h - i)*(w / 2)));
    i = w / 3;
    ans = min(ans, min(h*(w + 1 - i) / 2, (w - i)*((h + 1) / 2)) - (i*h));
    i++;
    ans = min(ans, (h*i) - max(h*((w - i) / 2), (w - i)*(h / 2)));
    printf("%lld\n", ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L6
	movsd	-8(%rbp), %xmm0
	jmp	.L4
.L6:
	movsd	-16(%rbp), %xmm0
.L4:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L12
	movsd	-8(%rbp), %xmm0
	jmp	.L10
.L12:
	movsd	-16(%rbp), %xmm0
.L10:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L18
	movsd	-8(%rbp), %xmm0
	jmp	.L16
.L18:
	movsd	-8(%rbp), %xmm0
	movq	.LC1(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L16:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	abs, .-abs
	.section	.rodata
.LC2:
	.string	"%lld %lld"
.LC3:
	.string	"0"
.LC5:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L20
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	jne	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L39
.L21:
	movq	$2000000000, -24(%rbp)
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-32(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L23
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L24
.L23:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L24:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L25
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L26:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movsd	%xmm2, -56(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm6, %xmm6
	cvtsi2sdq	%rax, %xmm6
	movq	%xmm6, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L27
	pxor	%xmm7, %xmm7
	cvtsi2sdq	%rax, %xmm7
	movq	%xmm7, %rax
	jmp	.L28
.L27:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L28:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L29
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L30
.L29:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L30:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L31
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	%xmm3, %rax
	jmp	.L32
.L31:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L32:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L33
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L34
.L33:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L34:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movsd	%xmm3, -56(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L35
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L36
.L35:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L36:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L37
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L38
.L37:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L38:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L39:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	0
	.long	1138753536
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	maxsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	minsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.p2align 4
	.globl	abs
	.type	abs, @function
abs:
.LFB25:
	.cfi_startproc
	endbr64
	comisd	.LC0(%rip), %xmm0
	jb	.L8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	xorpd	.LC1(%rip), %xmm0
	ret
	.cfi_endproc
.LFE25:
	.size	abs, .-abs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%lld %lld"
.LC4:
	.string	"0"
.LC6:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC3(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movabsq	$-6148914691236517205, %rax
	movabsq	$3074457345618258602, %r8
	movabsq	$6148914691236517204, %rdi
	movq	%rsi, %rdx
	imulq	%rax, %rdx
	addq	%r8, %rdx
	cmpq	%rdi, %rdx
	jbe	.L10
	movq	16(%rsp), %rcx
	imulq	%rcx, %rax
	addq	%r8, %rax
	cmpq	%rdi, %rax
	jbe	.L10
	movq	%rsi, %rax
	movl	$3, %edi
	pxor	%xmm1, %xmm1
	movq	%rsi, %r9
	cqto
	movl	$2, %r10d
	pxor	%xmm0, %xmm0
	idivq	%rdi
	leaq	1(%rcx), %rdi
	movq	%rax, %r8
	subq	%rax, %r9
	movq	%rdi, %rax
	cqto
	idivq	%r10
	imulq	%rax, %r9
	cvtsi2sdq	%r9, %xmm1
	leaq	1(%rsi), %r9
	movq	%r9, %rax
	subq	%r8, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r10
	cvtsi2sdq	%rax, %xmm0
	movq	%rcx, %rax
	imulq	%r8, %rax
	minsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC2(%rip), %xmm1
	minsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	comisd	%xmm1, %xmm0
	jnb	.L15
	cvttsd2siq	%xmm0, %r10
.L16:
	pxor	%xmm2, %xmm2
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	addq	%rcx, %rax
	cvtsi2sdq	%rax, %xmm2
	leaq	1(%r8), %rax
	movq	%rsi, %r8
	movl	$2, %r11d
	subq	%rax, %r8
	movq	%rcx, %rax
	cqto
	idivq	%r11
	imulq	%r8, %rax
	cvtsi2sdq	%rax, %xmm3
	movq	%r8, %rax
	cqto
	idivq	%r11
	movq	%rax, %r8
	imulq	%rcx, %r8
	cvtsi2sdq	%r8, %xmm0
	maxsd	%xmm3, %xmm0
	subsd	%xmm0, %xmm2
	testq	%r10, %r10
	js	.L18
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%r10, %xmm0
.L19:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L21
	cvttsd2siq	%xmm0, %r10
.L22:
	movq	%rcx, %rax
	movl	$3, %r8d
	pxor	%xmm2, %xmm2
	movq	%rcx, %rbx
	cqto
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	movl	$2, %r11d
	idivq	%r8
	movq	%rax, %r8
	subq	%rax, %rbx
	movq	%r9, %rax
	cqto
	idivq	%r11
	imulq	%rax, %rbx
	movq	%rdi, %rax
	subq	%r8, %rax
	imulq	%rsi, %rax
	cvtsi2sdq	%rbx, %xmm2
	cqto
	idivq	%r11
	cvtsi2sdq	%rax, %xmm0
	movq	%rsi, %rax
	imulq	%r8, %rax
	cvtsi2sdq	%rax, %xmm3
	minsd	%xmm2, %xmm0
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	testq	%r10, %r10
	js	.L24
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%r10, %xmm0
.L25:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L27
	cvttsd2siq	%xmm0, %rdi
.L28:
	addq	%rsi, %rax
	pxor	%xmm2, %xmm2
	pxor	%xmm3, %xmm3
	addq	$1, %r8
	cvtsi2sdq	%rax, %xmm2
	movq	%rsi, %rax
	pxor	%xmm0, %xmm0
	subq	%r8, %rcx
	cqto
	movl	$2, %r8d
	idivq	%r8
	imulq	%rcx, %rax
	cvtsi2sdq	%rax, %xmm3
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rcx
	imulq	%rsi, %rcx
	cvtsi2sdq	%rcx, %xmm0
	maxsd	%xmm3, %xmm0
	subsd	%xmm0, %xmm2
	testq	%rdi, %rdi
	js	.L30
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdi, %xmm0
.L31:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L33
	cvttsd2siq	%xmm0, %rdx
.L34:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L12:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %r10
	btcq	$63, %r10
	jmp	.L16
.L10:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L12
.L33:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rdx
	btcq	$63, %rdx
	jmp	.L34
.L27:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rdi
	btcq	$63, %rdi
	jmp	.L28
.L21:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %r10
	btcq	$63, %r10
	jmp	.L22
.L18:
	movq	%r10, %rax
	andl	$1, %r10d
	pxor	%xmm0, %xmm0
	shrq	%rax
	orq	%r10, %rax
	cvtsi2sdq	%rax, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L19
.L30:
	movq	%rdi, %rax
	andl	$1, %edi
	pxor	%xmm0, %xmm0
	shrq	%rax
	orq	%rdi, %rax
	cvtsi2sdq	%rax, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L31
.L24:
	movq	%r10, %rdx
	andl	$1, %r10d
	pxor	%xmm0, %xmm0
	shrq	%rdx
	orq	%r10, %rdx
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L25
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.set	.LC0,.LC1+8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1105055077
	.align 8
.LC5:
	.long	0
	.long	1138753536
	.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	max
	.type	max, @function
max:
.LFB23:
	.cfi_startproc
	endbr64
	maxsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE23:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB24:
	.cfi_startproc
	endbr64
	minsd	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE24:
	.size	min, .-min
	.p2align 4
	.globl	abs
	.type	abs, @function
abs:
.LFB25:
	.cfi_startproc
	endbr64
	comisd	.LC0(%rip), %xmm0
	jb	.L8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	xorpd	.LC1(%rip), %xmm0
	ret
	.cfi_endproc
.LFE25:
	.size	abs, .-abs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"%lld %lld"
.LC4:
	.string	"0"
.LC6:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	.LC3(%rip), %rdi
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rsi
	movabsq	$-6148914691236517205, %rax
	movabsq	$3074457345618258602, %r8
	movabsq	$6148914691236517204, %rdi
	movq	%rsi, %rdx
	imulq	%rax, %rdx
	addq	%r8, %rdx
	cmpq	%rdi, %rdx
	jbe	.L10
	movq	16(%rsp), %rcx
	imulq	%rcx, %rax
	addq	%r8, %rax
	cmpq	%rdi, %rax
	jbe	.L10
	movq	%rsi, %rax
	movl	$3, %edi
	pxor	%xmm1, %xmm1
	movq	%rsi, %r9
	cqto
	movl	$2, %r10d
	pxor	%xmm0, %xmm0
	idivq	%rdi
	leaq	1(%rcx), %rdi
	movq	%rax, %r8
	subq	%rax, %r9
	movq	%rdi, %rax
	cqto
	idivq	%r10
	imulq	%rax, %r9
	cvtsi2sdq	%r9, %xmm1
	leaq	1(%rsi), %r9
	movq	%r9, %rax
	subq	%r8, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r10
	cvtsi2sdq	%rax, %xmm0
	movq	%rcx, %rax
	imulq	%r8, %rax
	minsd	%xmm1, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdq	%rax, %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC2(%rip), %xmm1
	minsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	movsd	.LC5(%rip), %xmm1
	comisd	%xmm1, %xmm0
	jnb	.L15
	cvttsd2siq	%xmm0, %r10
.L16:
	pxor	%xmm2, %xmm2
	pxor	%xmm3, %xmm3
	pxor	%xmm0, %xmm0
	addq	%rcx, %rax
	cvtsi2sdq	%rax, %xmm2
	leaq	1(%r8), %rax
	movq	%rsi, %r8
	movl	$2, %r11d
	subq	%rax, %r8
	movq	%rcx, %rax
	cqto
	idivq	%r11
	imulq	%r8, %rax
	cvtsi2sdq	%rax, %xmm3
	movq	%r8, %rax
	cqto
	idivq	%r11
	movq	%rax, %r8
	imulq	%rcx, %r8
	cvtsi2sdq	%r8, %xmm0
	maxsd	%xmm3, %xmm0
	subsd	%xmm0, %xmm2
	testq	%r10, %r10
	js	.L18
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%r10, %xmm0
.L19:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L21
	cvttsd2siq	%xmm0, %r10
.L22:
	movq	%rcx, %rax
	movl	$3, %r8d
	pxor	%xmm2, %xmm2
	movq	%rcx, %rbx
	cqto
	pxor	%xmm0, %xmm0
	pxor	%xmm3, %xmm3
	movl	$2, %r11d
	idivq	%r8
	movq	%rax, %r8
	subq	%rax, %rbx
	movq	%r9, %rax
	cqto
	idivq	%r11
	imulq	%rax, %rbx
	movq	%rdi, %rax
	subq	%r8, %rax
	imulq	%rsi, %rax
	cvtsi2sdq	%rbx, %xmm2
	cqto
	idivq	%r11
	cvtsi2sdq	%rax, %xmm0
	movq	%rsi, %rax
	imulq	%r8, %rax
	cvtsi2sdq	%rax, %xmm3
	minsd	%xmm2, %xmm0
	movapd	%xmm0, %xmm2
	subsd	%xmm3, %xmm2
	testq	%r10, %r10
	js	.L24
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%r10, %xmm0
.L25:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L27
	cvttsd2siq	%xmm0, %rdi
.L28:
	addq	%rsi, %rax
	pxor	%xmm2, %xmm2
	pxor	%xmm3, %xmm3
	addq	$1, %r8
	cvtsi2sdq	%rax, %xmm2
	movq	%rsi, %rax
	pxor	%xmm0, %xmm0
	subq	%r8, %rcx
	cqto
	movl	$2, %r8d
	idivq	%r8
	imulq	%rcx, %rax
	cvtsi2sdq	%rax, %xmm3
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rcx
	imulq	%rsi, %rcx
	cvtsi2sdq	%rcx, %xmm0
	maxsd	%xmm3, %xmm0
	subsd	%xmm0, %xmm2
	testq	%rdi, %rdi
	js	.L30
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdi, %xmm0
.L31:
	minsd	%xmm2, %xmm0
	comisd	%xmm1, %xmm0
	jnb	.L33
	cvttsd2siq	%xmm0, %rdx
.L34:
	leaq	.LC6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L12:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %r10
	btcq	$63, %r10
	jmp	.L16
.L10:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L12
.L33:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rdx
	btcq	$63, %rdx
	jmp	.L34
.L27:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rdi
	btcq	$63, %rdi
	jmp	.L28
.L21:
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %r10
	btcq	$63, %r10
	jmp	.L22
.L18:
	movq	%r10, %rax
	andl	$1, %r10d
	pxor	%xmm0, %xmm0
	shrq	%rax
	orq	%r10, %rax
	cvtsi2sdq	%rax, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L19
.L30:
	movq	%rdi, %rax
	andl	$1, %edi
	pxor	%xmm0, %xmm0
	shrq	%rax
	orq	%rdi, %rax
	cvtsi2sdq	%rax, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L31
.L24:
	movq	%r10, %rdx
	andl	$1, %r10d
	pxor	%xmm0, %xmm0
	shrq	%rdx
	orq	%r10, %rdx
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	jmp	.L25
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.set	.LC0,.LC1+8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1105055077
	.align 8
.LC5:
	.long	0
	.long	1138753536
	.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>
double max(double a, double b)
{
    if (a > b)
        return a;
    else
        return b;
}
double min(double a, double b)
{
    if (a < b)
        return a;
    else
        return b;
}
double abs(double a)
{
    if (a >= 0)
        return a;
    else
        return -a;
}
int main()
{
    long long int h, w;
    scanf("%lld %lld", &h, &w);
    if (h % 3 == 0 || w % 3 == 0)
    {
        printf("0\n");
        return 0;
    }
    long long int i;
    unsigned long long int ans = 2000000000;
    i = h / 3;
    ans = min(ans, min(w*(h + 1 - i) / 2, (h - i)*((w + 1) / 2)) - (i*w));
    i++;
    ans = min(ans, (w*i) - max(w*((h - i) / 2), (h - i)*(w / 2)));
    i = w / 3;
    ans = min(ans, min(h*(w + 1 - i) / 2, (w - i)*((h + 1) / 2)) - (i*h));
    i++;
    ans = min(ans, (h*i) - max(h*((w - i) / 2), (w - i)*(h / 2)));
    printf("%lld\n", ans);
    return 0;
}
100100 100000
 000000 2
 5 1
 100100 110000
 100111 100001
 100111 000101
 000011 001100
 000010 011000
 010010 011110
 011000 110111

50000
 0
 1
 50050
 83371
 101
 11
 5
 5005
 5500

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>
double max(double a, double b)
{
    if (a > b)
        return a;
    else
        return b;
}
double min(double a, double b)
{
    if (a < b)
        return a;
    else
        return b;
}
double abs(double a)
{
    if (a >= 0)
        return a;
    else
        return -a;
}
int main()
{
    long long int h, w;
    scanf("%lld %lld", &h, &w);
    if (h % 3 == 0 || w % 3 == 0)
    {
        printf("0\n");
        return 0;
    }
    long long int i;
    unsigned long long int ans = 2000000000;
    i = h / 3;
    ans = min(ans, min(w*(h + 1 - i) / 2, (h - i)*((w + 1) / 2)) - (i*w));
    i++;
    ans = min(ans, (w*i) - max(w*((h - i) / 2), (h - i)*(w / 2)));
    i = w / 3;
    ans = min(ans, min(h*(w + 1 - i) / 2, (w - i)*((h + 1) / 2)) - (i*h));
    i++;
    ans = min(ans, (h*i) - max(h*((w - i) / 2), (w - i)*(h / 2)));
    printf("%lld\n", ans);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L6
	movsd	-8(%rbp), %xmm0
	jmp	.L4
.L6:
	movsd	-16(%rbp), %xmm0
.L4:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L12
	movsd	-8(%rbp), %xmm0
	jmp	.L10
.L12:
	movsd	-16(%rbp), %xmm0
.L10:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L18
	movsd	-8(%rbp), %xmm0
	jmp	.L16
.L18:
	movsd	-8(%rbp), %xmm0
	movq	.LC1(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L16:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	abs, .-abs
	.section	.rodata
.LC2:
	.string	"%lld %lld"
.LC3:
	.string	"0"
.LC5:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L20
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	jne	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L39
.L21:
	movq	$2000000000, -24(%rbp)
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-32(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L23
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L24
.L23:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L24:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L25
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L26:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movsd	%xmm2, -56(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm6, %xmm6
	cvtsi2sdq	%rax, %xmm6
	movq	%xmm6, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L27
	pxor	%xmm7, %xmm7
	cvtsi2sdq	%rax, %xmm7
	movq	%xmm7, %rax
	jmp	.L28
.L27:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L28:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L29
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L30
.L29:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L30:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L31
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	%xmm3, %rax
	jmp	.L32
.L31:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L32:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L33
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L34
.L33:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L34:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movsd	%xmm3, -56(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L35
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L36
.L35:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L36:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L37
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L38
.L37:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L38:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L39:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	0
	.long	1138753536
	.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	max
	.type	max, @function
max:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-8(%rbp), %xmm0
	comisd	-16(%rbp), %xmm0
	jbe	.L6
	movsd	-8(%rbp), %xmm0
	jmp	.L4
.L6:
	movsd	-16(%rbp), %xmm0
.L4:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	%xmm1, -16(%rbp)
	movsd	-16(%rbp), %xmm0
	comisd	-8(%rbp), %xmm0
	jbe	.L12
	movsd	-8(%rbp), %xmm0
	jmp	.L10
.L12:
	movsd	-16(%rbp), %xmm0
.L10:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	min, .-min
	.globl	abs
	.type	abs, @function
abs:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movsd	%xmm0, -8(%rbp)
	movsd	-8(%rbp), %xmm0
	pxor	%xmm1, %xmm1
	comisd	%xmm1, %xmm0
	jb	.L18
	movsd	-8(%rbp), %xmm0
	jmp	.L16
.L18:
	movsd	-8(%rbp), %xmm0
	movq	.LC1(%rip), %xmm1
	xorpd	%xmm1, %xmm0
.L16:
	movq	%xmm0, %rax
	movq	%rax, %xmm0
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	abs, .-abs
	.section	.rodata
.LC2:
	.string	"%lld %lld"
.LC3:
	.string	"0"
.LC5:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	je	.L20
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rcx, %rsi
	sarq	$63, %rsi
	movq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rdx
	addq	%rdx, %rdx
	addq	%rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	testq	%rax, %rax
	jne	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L39
.L21:
	movq	$2000000000, -24(%rbp)
	movq	-40(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-32(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-32(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L23
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L24
.L23:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L24:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L25
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L26
.L25:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L26:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-32(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movsd	%xmm2, -56(%rbp)
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-40(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm6, %xmm6
	cvtsi2sdq	%rax, %xmm6
	movq	%xmm6, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L27
	pxor	%xmm7, %xmm7
	cvtsi2sdq	%rax, %xmm7
	movq	%xmm7, %rax
	jmp	.L28
.L27:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L28:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L29
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L30
.L29:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L30:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rcx
	movabsq	$6148914691236517206, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	sarq	$63, %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	movq	%rax, -16(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	-40(%rbp), %rdx
	addq	$1, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rdx
	sarq	%rdx
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	addq	$1, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	pxor	%xmm2, %xmm2
	cvtsi2sdq	%rax, %xmm2
	movq	%xmm2, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	min
	movq	%xmm0, %rax
	movq	-40(%rbp), %rdx
	imulq	-16(%rbp), %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	movq	%rax, %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L31
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movq	%xmm3, %rax
	jmp	.L32
.L31:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L32:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L33
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L34
.L33:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L34:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	addq	$1, -16(%rbp)
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	pxor	%xmm3, %xmm3
	cvtsi2sdq	%rax, %xmm3
	movsd	%xmm3, -56(%rbp)
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rcx, %rax
	sarq	%rax
	imulq	%rdx, %rax
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rax, %xmm0
	movq	-32(%rbp), %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rdx
	movq	-40(%rbp), %rax
	imulq	%rdx, %rax
	pxor	%xmm4, %xmm4
	cvtsi2sdq	%rax, %xmm4
	movq	%xmm4, %rax
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	max
	movsd	-56(%rbp), %xmm1
	subsd	%xmm0, %xmm1
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	js	.L35
	pxor	%xmm5, %xmm5
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rax
	jmp	.L36
.L35:
	movq	%rax, %rdx
	shrq	%rdx
	andl	$1, %eax
	orq	%rax, %rdx
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rdx, %xmm0
	addsd	%xmm0, %xmm0
	movq	%xmm0, %rax
.L36:
	movq	%rax, %xmm0
	call	min
	comisd	.LC4(%rip), %xmm0
	jnb	.L37
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	jmp	.L38
.L37:
	movsd	.LC4(%rip), %xmm1
	subsd	%xmm1, %xmm0
	cvttsd2siq	%xmm0, %rax
	movq	%rax, -24(%rbp)
	movabsq	$-9223372036854775808, %rax
	xorq	%rax, -24(%rbp)
.L38:
	movq	-24(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L39:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	main, .-main
	.section	.rodata
	.align 16
.LC1:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 8
.LC4:
	.long	0
	.long	1138753536
	.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:
