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

```c
k,x;main(n){for(;scanf("%d",&n),n;printf("%d %d\n",n/k-k+1>>1,k))for(k=sqrt(n*=2);n%k|1&~(k|n/k);k--);}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC2(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r13d
	testl	%r13d, %r13d
	je	.L17
	addl	%r13d, %r13d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r13d, %xmm0
	movl	%r13d, 12(%rsp)
	ucomisd	%xmm0, %xmm1
	ja	.L14
	sqrtsd	%xmm0, %xmm0
.L5:
	cvttsd2sil	%xmm0, %r8d
	movl	%r13d, %eax
	cltd
	idivl	%r8d
	movl	%r8d, k(%rip)
	movl	%r8d, %ecx
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	je	.L6
	leal	-1(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r13d, %eax
	movl	%esi, %r8d
	cltd
	movl	%r8d, %ecx
	idivl	%esi
	leal	-1(%rsi), %esi
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	jne	.L7
	movl	%r8d, k(%rip)
.L6:
	subl	%r8d, %eax
	movl	%r8d, %edx
	movq	%r12, %rdi
	leal	1(%rax), %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.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 %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC2(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r13d
	testl	%r13d, %r13d
	je	.L17
	addl	%r13d, %r13d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r13d, %xmm0
	movl	%r13d, 12(%rsp)
	ucomisd	%xmm0, %xmm1
	ja	.L14
	sqrtsd	%xmm0, %xmm0
.L5:
	cvttsd2sil	%xmm0, %r8d
	movl	%r13d, %eax
	cltd
	idivl	%r8d
	movl	%r8d, k(%rip)
	movl	%r8d, %ecx
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	je	.L6
	leal	-1(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r13d, %eax
	movl	%esi, %r8d
	cltd
	movl	%r8d, %ecx
	idivl	%esi
	leal	-1(%rsi), %esi
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	jne	.L7
	movl	%r8d, k(%rip)
.L6:
	subl	%r8d, %eax
	movl	%r8d, %edx
	movq	%r12, %rdi
	leal	1(%rax), %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.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 %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC2(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r13d
	testl	%r13d, %r13d
	je	.L17
	addl	%r13d, %r13d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r13d, %xmm0
	movl	%r13d, 12(%rsp)
	ucomisd	%xmm0, %xmm1
	ja	.L14
	sqrtsd	%xmm0, %xmm0
.L5:
	cvttsd2sil	%xmm0, %r8d
	movl	%r13d, %eax
	cltd
	idivl	%r8d
	movl	%r8d, k(%rip)
	movl	%r8d, %ecx
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	je	.L6
	leal	-1(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r13d, %eax
	movl	%esi, %r8d
	cltd
	movl	%r8d, %ecx
	idivl	%esi
	leal	-1(%rsi), %esi
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	jne	.L7
	movl	%r8d, k(%rip)
.L6:
	subl	%r8d, %eax
	movl	%r8d, %edx
	movq	%r12, %rdi
	leal	1(%rax), %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.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
k,x;main(n){for(;scanf("%d",&n),n;printf("%d %d\n",n/k-k+1>>1,k))for(k=sqrt(n*=2);n%k|1&~(k|n/k);k--);}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
k,x;main(n){for(;scanf("%d",&n),n;printf("%d %d\n",n/k-k+1>>1,k))for(k=sqrt(n*=2);n%k|1&~(k|n/k);k--);}
```

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:

15
16
2
3
9699690
116276261
847288609
900660121
987698769
999999999
0
 15
16
2
3
9699690
223092870
869854515
900660121
987698769
999999999
0
 15
26
2
3
9699690
223092870
869854515
900660121
987698769
999999999
0
 15
26
3
3
9699690
223092870
869854515
900660121
987698769
999999999
0
 15
26
3
3
6561145
223092870
869854515
900660121
987698769
999999999
0
 15
26
3
5
6561145
223092870
869854515
900660121
987698769
999999999
0
 15
16
4
3
9699690
223092870
847288609
900660121
987698769
999999999
0
 15
16
2
3
9699690
116276261
932780910
900660121
987698769
999999999
0
 15
26
3
3
9699690
219653957
869854515
900660121
987698769
999999999
0
 15
26
3
5
6561145
223092870
151086107
900660121
987698769
999999999
0

1 5
16 1
2 1
1 2
16 4389
1236935 94
4112949 206
15006 30011
46887 17718
163837 5994
 1 5
16 1
2 1
1 2
16 4389
129 20995
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
5 4
2 1
1 2
16 4389
129 20995
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
5 4
1 2
1 2
16 4389
129 20995
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
5 4
1 2
1 2
656110 10
129 20995
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
5 4
1 2
2 2
656110 10
129 20995
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
16 1
4 1
1 2
16 4389
129 20995
4112949 206
15006 30011
46887 17718
163837 5994
 1 5
16 1
2 1
1 2
16 4389
1236935 94
342 42852
15006 30011
46887 17718
163837 5994
 1 5
5 4
1 2
1 2
16 4389
6460394 34
28995136 30
15006 30011
46887 17718
163837 5994
 1 5
5 4
1 2
2 2
656110 10
129 20995
1842473 82
15006 30011
46887 17718
163837 5994

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

```c
k,x;main(n){for(;scanf("%d",&n),n;printf("%d %d\n",n/k-k+1>>1,k))for(k=sqrt(n*=2);n%k|1&~(k|n/k);k--);}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC2(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r13d
	testl	%r13d, %r13d
	je	.L17
	addl	%r13d, %r13d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r13d, %xmm0
	movl	%r13d, 12(%rsp)
	ucomisd	%xmm0, %xmm1
	ja	.L14
	sqrtsd	%xmm0, %xmm0
.L5:
	cvttsd2sil	%xmm0, %r8d
	movl	%r13d, %eax
	cltd
	idivl	%r8d
	movl	%r8d, k(%rip)
	movl	%r8d, %ecx
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	je	.L6
	leal	-1(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r13d, %eax
	movl	%esi, %r8d
	cltd
	movl	%r8d, %ecx
	idivl	%esi
	leal	-1(%rsi), %esi
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	jne	.L7
	movl	%r8d, k(%rip)
.L6:
	subl	%r8d, %eax
	movl	%r8d, %edx
	movq	%r12, %rdi
	leal	1(%rax), %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.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 %d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	leaq	.LC2(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r13d
	testl	%r13d, %r13d
	je	.L17
	addl	%r13d, %r13d
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%r13d, %xmm0
	movl	%r13d, 12(%rsp)
	ucomisd	%xmm0, %xmm1
	ja	.L14
	sqrtsd	%xmm0, %xmm0
.L5:
	cvttsd2sil	%xmm0, %r8d
	movl	%r13d, %eax
	cltd
	idivl	%r8d
	movl	%r8d, k(%rip)
	movl	%r8d, %ecx
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	je	.L6
	leal	-1(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%r13d, %eax
	movl	%esi, %r8d
	cltd
	movl	%r8d, %ecx
	idivl	%esi
	leal	-1(%rsi), %esi
	orl	%eax, %ecx
	notl	%ecx
	andl	$1, %ecx
	orl	%edx, %ecx
	jne	.L7
	movl	%r8d, k(%rip)
.L6:
	subl	%r8d, %eax
	movl	%r8d, %edx
	movq	%r12, %rdi
	leal	1(%rax), %esi
	xorl	%eax, %eax
	sarl	%esi
	call	printf@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	sqrt@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.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:
```