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

```c
#include <stdio.h>

int main(){
	int K,N,i,j;
	double a,sum;
	scanf("%d",&N);
	scanf("%d",&K);
	sum=0;
	for(i=1;i<=N;i++){
		a=(double)1/N;
		for(j=i;j<K;){
			j=j*2;
			a=a/2;
		}
	sum=sum+a;
	}
	printf("%.10lf",sum);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC4:
	.string	"%.10lf"
	.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	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L9
	pxor	%xmm0, %xmm0
	movsd	.LC2(%rip), %xmm3
	movl	(%rsp), %edx
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm0, %xmm3
	cmpl	$1, %edx
	jle	.L10
	leal	1(%rsi), %edi
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	movsd	.LC3(%rip), %xmm1
	cmpl	%edx, %edi
	cmovg	%edx, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movapd	%xmm3, %xmm0
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	mulsd	%xmm1, %xmm0
	addl	%eax, %eax
	cmpl	%edx, %eax
	jl	.L4
	addl	$1, %ecx
	addsd	%xmm0, %xmm2
	cmpl	%edi, %ecx
	jl	.L5
	cmpl	%esi, %ecx
	jg	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %ecx
	addsd	%xmm3, %xmm2
	cmpl	%ecx, %esi
	jge	.L6
.L2:
	movapd	%xmm2, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	jmp	.L6
.L9:
	pxor	%xmm2, %xmm2
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC4:
	.string	"%.10lf"
	.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	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L9
	pxor	%xmm0, %xmm0
	movsd	.LC2(%rip), %xmm3
	movl	(%rsp), %edx
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm0, %xmm3
	cmpl	$1, %edx
	jle	.L10
	leal	1(%rsi), %edi
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	movsd	.LC3(%rip), %xmm1
	cmpl	%edx, %edi
	cmovg	%edx, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movapd	%xmm3, %xmm0
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	mulsd	%xmm1, %xmm0
	addl	%eax, %eax
	cmpl	%edx, %eax
	jl	.L4
	addl	$1, %ecx
	addsd	%xmm0, %xmm2
	cmpl	%edi, %ecx
	jl	.L5
	cmpl	%esi, %ecx
	jg	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %ecx
	addsd	%xmm3, %xmm2
	cmpl	%ecx, %esi
	jge	.L6
.L2:
	movapd	%xmm2, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	jmp	.L6
.L9:
	pxor	%xmm2, %xmm2
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC4:
	.string	"%.10lf"
	.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	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L9
	pxor	%xmm0, %xmm0
	movsd	.LC2(%rip), %xmm3
	movl	(%rsp), %edx
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm0, %xmm3
	cmpl	$1, %edx
	jle	.L10
	leal	1(%rsi), %edi
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	movsd	.LC3(%rip), %xmm1
	cmpl	%edx, %edi
	cmovg	%edx, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movapd	%xmm3, %xmm0
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	mulsd	%xmm1, %xmm0
	addl	%eax, %eax
	cmpl	%edx, %eax
	jl	.L4
	addl	$1, %ecx
	addsd	%xmm0, %xmm2
	cmpl	%edi, %ecx
	jl	.L5
	cmpl	%esi, %ecx
	jg	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %ecx
	addsd	%xmm3, %xmm2
	cmpl	%ecx, %esi
	jge	.L6
.L2:
	movapd	%xmm2, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	jmp	.L6
.L9:
	pxor	%xmm2, %xmm2
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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:
```
```c
#include <stdio.h>

int main(){
	int K,N,i,j;
	double a,sum;
	scanf("%d",&N);
	scanf("%d",&K);
	sum=0;
	for(i=1;i<=N;i++){
		a=(double)1/N;
		for(j=i;j<K;){
			j=j*2;
			a=a/2;
		}
	sum=sum+a;
	}
	printf("%.10lf",sum);
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(){
	int K,N,i,j;
	double a,sum;
	scanf("%d",&N);
	scanf("%d",&K);
	sum=0;
	for(i=1;i<=N;i++){
		a=(double)1/N;
		for(j=i;j<K;){
			j=j*2;
			a=a/2;
		}
	sum=sum+a;
	}
	printf("%.10lf",sum);
	return 0;
}
```

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.
Optimized Assembly Code:

3 4
 100000 8
 3 7
 100000 7
 6 7
 100100 7
 4 7
 100100 6
 110100 7
 111100 7

0.4166666667 0.9999562500 0.2083333333 0.9999612500 0.3541666667 0.9999612887 0.2812500000 0.9999687812 0.9999648047 0.9999651215
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(){
	int K,N,i,j;
	double a,sum;
	scanf("%d",&N);
	scanf("%d",&K);
	sum=0;
	for(i=1;i<=N;i++){
		a=(double)1/N;
		for(j=i;j<K;){
			j=j*2;
			a=a/2;
		}
	sum=sum+a;
	}
	printf("%.10lf",sum);
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC4:
	.string	"%.10lf"
	.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	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L9
	pxor	%xmm0, %xmm0
	movsd	.LC2(%rip), %xmm3
	movl	(%rsp), %edx
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm0, %xmm3
	cmpl	$1, %edx
	jle	.L10
	leal	1(%rsi), %edi
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	movsd	.LC3(%rip), %xmm1
	cmpl	%edx, %edi
	cmovg	%edx, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movapd	%xmm3, %xmm0
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	mulsd	%xmm1, %xmm0
	addl	%eax, %eax
	cmpl	%edx, %eax
	jl	.L4
	addl	$1, %ecx
	addsd	%xmm0, %xmm2
	cmpl	%edi, %ecx
	jl	.L5
	cmpl	%esi, %ecx
	jg	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %ecx
	addsd	%xmm3, %xmm2
	cmpl	%ecx, %esi
	jge	.L6
.L2:
	movapd	%xmm2, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	jmp	.L6
.L9:
	pxor	%xmm2, %xmm2
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC4:
	.string	"%.10lf"
	.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	.LC1(%rip), %rbp
	movq	%rbp, %rdi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %esi
	testl	%esi, %esi
	jle	.L9
	pxor	%xmm0, %xmm0
	movsd	.LC2(%rip), %xmm3
	movl	(%rsp), %edx
	cvtsi2sdl	%esi, %xmm0
	divsd	%xmm0, %xmm3
	cmpl	$1, %edx
	jle	.L10
	leal	1(%rsi), %edi
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	movsd	.LC3(%rip), %xmm1
	cmpl	%edx, %edi
	cmovg	%edx, %edi
	.p2align 4,,10
	.p2align 3
.L5:
	movapd	%xmm3, %xmm0
	movl	%ecx, %eax
	.p2align 4,,10
	.p2align 3
.L4:
	mulsd	%xmm1, %xmm0
	addl	%eax, %eax
	cmpl	%edx, %eax
	jl	.L4
	addl	$1, %ecx
	addsd	%xmm0, %xmm2
	cmpl	%edi, %ecx
	jl	.L5
	cmpl	%esi, %ecx
	jg	.L2
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %ecx
	addsd	%xmm3, %xmm2
	cmpl	%ecx, %esi
	jge	.L6
.L2:
	movapd	%xmm2, %xmm0
	movl	$1, %edi
	movl	$1, %eax
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L16
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	pxor	%xmm2, %xmm2
	movl	$1, %ecx
	jmp	.L6
.L9:
	pxor	%xmm2, %xmm2
	jmp	.L2
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1071644672
	.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:
```