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>
#include <math.h>

int main(void)
{
  long int N;
  int divider = 1;
  scanf("%ld", &N);
  
  for(int i=1; i<=sqrt((double)N); i++){
    if(N%i == 0){
      divider = i;
    }
  }
  
  printf("%ld", divider + N/divider -2);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rbx, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L18
	sqrtsd	%xmm1, %xmm1
	movl	$1, %ecx
	movl	$1, %ebp
	comisd	.LC2(%rip), %xmm1
	jb	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movl	%ecx, %esi
	pxor	%xmm0, %xmm0
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	cmove	%ecx, %ebp
	addl	$1, %esi
	addq	$1, %rcx
	cvtsi2sdl	%esi, %xmm0
	comisd	%xmm0, %xmm1
	jnb	.L4
.L5:
	movq	%rbx, %rax
	movslq	%ebp, %rbp
	movq	%r12, %rsi
	movl	$1, %edi
	cqto
	idivq	%rbp
	leaq	-2(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movl	$1, %r13d
	movl	$1, %ebp
	jmp	.L2
.L22:
	movq	%rbx, %rax
	movsd	8(%rsp), %xmm1
	cqto
	idivq	%r13
	testq	%rdx, %rdx
	cmovne	%ebp, %r14d
	addq	$1, %r13
	movl	%r14d, %ebp
.L2:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	movl	%r13d, %r14d
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r13d, %xmm0
	comisd	%xmm0, %xmm2
	jnb	.L22
	jmp	.L5
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.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
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rbx, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L18
	sqrtsd	%xmm1, %xmm1
	movl	$1, %ecx
	movl	$1, %ebp
	comisd	.LC2(%rip), %xmm1
	jb	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movl	%ecx, %esi
	pxor	%xmm0, %xmm0
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	cmove	%ecx, %ebp
	addl	$1, %esi
	addq	$1, %rcx
	cvtsi2sdl	%esi, %xmm0
	comisd	%xmm0, %xmm1
	jnb	.L4
.L5:
	movq	%rbx, %rax
	movslq	%ebp, %rbp
	movq	%r12, %rsi
	movl	$1, %edi
	cqto
	idivq	%rbp
	leaq	-2(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movl	$1, %r13d
	movl	$1, %ebp
	jmp	.L2
.L22:
	movq	%rbx, %rax
	movsd	8(%rsp), %xmm1
	cqto
	idivq	%r13
	testq	%rdx, %rdx
	cmovne	%ebp, %r14d
	addq	$1, %r13
	movl	%r14d, %ebp
.L2:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	movl	%r13d, %r14d
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r13d, %xmm0
	comisd	%xmm0, %xmm2
	jnb	.L22
	jmp	.L5
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.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
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rbx, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L18
	sqrtsd	%xmm1, %xmm1
	movl	$1, %ecx
	movl	$1, %ebp
	comisd	.LC2(%rip), %xmm1
	jb	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movl	%ecx, %esi
	pxor	%xmm0, %xmm0
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	cmove	%ecx, %ebp
	addl	$1, %esi
	addq	$1, %rcx
	cvtsi2sdl	%esi, %xmm0
	comisd	%xmm0, %xmm1
	jnb	.L4
.L5:
	movq	%rbx, %rax
	movslq	%ebp, %rbp
	movq	%r12, %rsi
	movl	$1, %edi
	cqto
	idivq	%rbp
	leaq	-2(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movl	$1, %r13d
	movl	$1, %ebp
	jmp	.L2
.L22:
	movq	%rbx, %rax
	movsd	8(%rsp), %xmm1
	cqto
	idivq	%r13
	testq	%rdx, %rdx
	cmovne	%ebp, %r14d
	addq	$1, %r13
	movl	%r14d, %ebp
.L2:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	movl	%r13d, %r14d
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r13d, %xmm0
	comisd	%xmm0, %xmm2
	jnb	.L22
	jmp	.L5
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.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>
#include <math.h>

int main(void)
{
  long int N;
  int divider = 1;
  scanf("%ld", &N);
  
  for(int i=1; i<=sqrt((double)N); i++){
    if(N%i == 0){
      divider = i;
    }
  }
  
  printf("%ld", divider + N/divider -2);
  
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <math.h>

int main(void)
{
  long int N;
  int divider = 1;
  scanf("%ld", &N);
  
  for(int i=1; i<=sqrt((double)N); i++){
    if(N%i == 0){
      divider = i;
    }
  }
  
  printf("%ld", divider + N/divider -2);
  
  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:

6069423871
 83
 19
 605667865
 72
 33
 927082247
 40
 5
 223605823

23434326 82 18 82100 15 12 61750 11 4 31934
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>
#include <math.h>

int main(void)
{
  long int N;
  int divider = 1;
  scanf("%ld", &N);
  
  for(int i=1; i<=sqrt((double)N); i++){
    if(N%i == 0){
      divider = i;
    }
  }
  
  printf("%ld", divider + N/divider -2);
  
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rbx, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L18
	sqrtsd	%xmm1, %xmm1
	movl	$1, %ecx
	movl	$1, %ebp
	comisd	.LC2(%rip), %xmm1
	jb	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movl	%ecx, %esi
	pxor	%xmm0, %xmm0
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	cmove	%ecx, %ebp
	addl	$1, %esi
	addq	$1, %rcx
	cvtsi2sdl	%esi, %xmm0
	comisd	%xmm0, %xmm1
	jnb	.L4
.L5:
	movq	%rbx, %rax
	movslq	%ebp, %rbp
	movq	%r12, %rsi
	movl	$1, %edi
	cqto
	idivq	%rbp
	leaq	-2(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movl	$1, %r13d
	movl	$1, %ebp
	jmp	.L2
.L22:
	movq	%rbx, %rax
	movsd	8(%rsp), %xmm1
	cqto
	idivq	%r13
	testq	%rdx, %rdx
	cmovne	%ebp, %r14d
	addq	$1, %r13
	movl	%r14d, %ebp
.L2:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	movl	%r13d, %r14d
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r13d, %xmm0
	comisd	%xmm0, %xmm2
	jnb	.L22
	jmp	.L5
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.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
.LC0:
	.string	"%ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rbx
	pxor	%xmm1, %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2sdq	%rbx, %xmm1
	ucomisd	%xmm1, %xmm0
	ja	.L18
	sqrtsd	%xmm1, %xmm1
	movl	$1, %ecx
	movl	$1, %ebp
	comisd	.LC2(%rip), %xmm1
	jb	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rbx, %rax
	movl	%ecx, %esi
	pxor	%xmm0, %xmm0
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	cmove	%ecx, %ebp
	addl	$1, %esi
	addq	$1, %rcx
	cvtsi2sdl	%esi, %xmm0
	comisd	%xmm0, %xmm1
	jnb	.L4
.L5:
	movq	%rbx, %rax
	movslq	%ebp, %rbp
	movq	%r12, %rsi
	movl	$1, %edi
	cqto
	idivq	%rbp
	leaq	-2(%rbp,%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	movl	$1, %r13d
	movl	$1, %ebp
	jmp	.L2
.L22:
	movq	%rbx, %rax
	movsd	8(%rsp), %xmm1
	cqto
	idivq	%r13
	testq	%rdx, %rdx
	cmovne	%ebp, %r14d
	addq	$1, %r13
	movl	%r14d, %ebp
.L2:
	movapd	%xmm1, %xmm0
	movsd	%xmm1, 8(%rsp)
	movl	%r13d, %r14d
	call	sqrt@PLT
	movapd	%xmm0, %xmm2
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%r13d, %xmm0
	comisd	%xmm0, %xmm2
	jnb	.L22
	jmp	.L5
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.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:
```