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>
#include<stdlib.h>
#define rep(index,num) for(int index=0;index<num;index++)
#define scan(argument) scanf("%d",&argument)
#define prin(argument) printf("%d\n",argument)
#define eps 1e-15
typedef long long ll;
int main(){
	int n,m,d;
	long double heikin;
	scanf("%d %d %d",&n,&m,&d);
	if(d!=0) heikin=(long double)2.0*(n-d)*(m-1)/pow(n,2.0);
	else heikin=(long double)(n-d)*(m-1)/pow(n,2.0);
	printf("%.10Lf\n",heikin);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC2:
	.string	"%.10Lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fld	%st(0)
	faddp	%st, %st(1)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
	jmp	.L3
.L2:
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
.L3:
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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 %d %d"
.LC1:
	.string	"%.10Lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	32(%rsp), %rdx
	leaq	36(%rsp), %rcx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	movl	28(%rsp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	subl	%edx, %eax
	movl	%eax, 8(%rsp)
	movl	32(%rsp), %eax
	fildl	8(%rsp)
	subl	$1, %eax
	mulsd	%xmm0, %xmm0
	movl	%eax, 8(%rsp)
	fadd	%st(0), %st
	fildl	8(%rsp)
	fmulp	%st, %st(1)
	movsd	%xmm0, 8(%rsp)
	fdivl	8(%rsp)
.L3:
	subq	$16, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	fstpt	(%rsp)
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 72
	popq	%rdx
	.cfi_def_cfa_offset 64
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L7
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	movl	32(%rsp), %eax
	cvtsi2sdl	28(%rsp), %xmm0
	subl	$1, %eax
	movl	%eax, 8(%rsp)
	fildl	8(%rsp)
	mulsd	%xmm0, %xmm0
	fildl	28(%rsp)
	fmulp	%st, %st(1)
	movsd	%xmm0, 8(%rsp)
	fdivl	8(%rsp)
	jmp	.L3
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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	"%d %d %d"
.LC1:
	.string	"%.10Lf\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	32(%rsp), %rdx
	leaq	36(%rsp), %rcx
	leaq	28(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edx
	testl	%edx, %edx
	je	.L2
	movl	28(%rsp), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	subl	%edx, %eax
	movl	%eax, 8(%rsp)
	movl	32(%rsp), %eax
	fildl	8(%rsp)
	subl	$1, %eax
	mulsd	%xmm0, %xmm0
	movl	%eax, 8(%rsp)
	fadd	%st(0), %st
	fildl	8(%rsp)
	fmulp	%st, %st(1)
	movsd	%xmm0, 8(%rsp)
	fdivl	8(%rsp)
.L3:
	subq	$16, %rsp
	.cfi_def_cfa_offset 80
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	fstpt	(%rsp)
	call	__printf_chk@PLT
	popq	%rax
	.cfi_def_cfa_offset 72
	popq	%rdx
	.cfi_def_cfa_offset 64
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L7
	xorl	%eax, %eax
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	pxor	%xmm0, %xmm0
	movl	32(%rsp), %eax
	cvtsi2sdl	28(%rsp), %xmm0
	subl	$1, %eax
	movl	%eax, 8(%rsp)
	fildl	8(%rsp)
	mulsd	%xmm0, %xmm0
	fildl	28(%rsp)
	fmulp	%st, %st(1)
	movsd	%xmm0, 8(%rsp)
	fdivl	8(%rsp)
	jmp	.L3
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>
#include<stdlib.h>
#define rep(index,num) for(int index=0;index<num;index++)
#define scan(argument) scanf("%d",&argument)
#define prin(argument) printf("%d\n",argument)
#define eps 1e-15
typedef long long ll;
int main(){
	int n,m,d;
	long double heikin;
	scanf("%d %d %d",&n,&m,&d);
	if(d!=0) heikin=(long double)2.0*(n-d)*(m-1)/pow(n,2.0);
	else heikin=(long double)(n-d)*(m-1)/pow(n,2.0);
	printf("%.10Lf\n",heikin);
	return 0;
}

1000000000 180707 1
 1000000000 241440 1
 1001000000 241440 5
 1001000000 353960 8
 0001000000 353960 8
 0001000000 353960 15
 1001100000 353960 15
 1001100100 149885 23
 1001101100 149885 23
 1011101100 149885 23

0.0003614120
 0.0004828780
 0.0004823956
 0.0007072108
 0.7079123367
 0.7079073812
 0.0007071401
 0.0002994386
 0.0002994383
 0.0002964768

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>
#include<stdlib.h>
#define rep(index,num) for(int index=0;index<num;index++)
#define scan(argument) scanf("%d",&argument)
#define prin(argument) printf("%d\n",argument)
#define eps 1e-15
typedef long long ll;
int main(){
	int n,m,d;
	long double heikin;
	scanf("%d %d %d",&n,&m,&d);
	if(d!=0) heikin=(long double)2.0*(n-d)*(m-1)/pow(n,2.0);
	else heikin=(long double)(n-d)*(m-1)/pow(n,2.0);
	printf("%.10Lf\n",heikin);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC2:
	.string	"%.10Lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fld	%st(0)
	faddp	%st, %st(1)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
	jmp	.L3
.L2:
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
.L3:
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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	"%d %d %d"
.LC2:
	.string	"%.10Lf\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	-36(%rbp), %rcx
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L2
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fld	%st(0)
	faddp	%st, %st(1)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movq	%xmm2, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
	jmp	.L3
.L2:
	movl	-44(%rbp), %eax
	movl	-36(%rbp), %edx
	subl	%edx, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	movl	-40(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -64(%rbp)
	fildl	-64(%rbp)
	fmulp	%st, %st(1)
	fstpt	-64(%rbp)
	movl	-44(%rbp), %eax
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	.LC1(%rip), %xmm0
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	pow@PLT
	movsd	%xmm0, -72(%rbp)
	fldl	-72(%rbp)
	fldt	-64(%rbp)
	fdivp	%st, %st(1)
	fstpt	-32(%rbp)
.L3:
	pushq	-24(%rbp)
	pushq	-32(%rbp)
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$16, %rsp
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1073741824
	.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:
