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(void) {

  long n;
  scanf("%ld", &n);
  long fraction[2];
  long k;
  for (long i = 1; i <= 3500; i++) {
    for (long j = 1; j <= 3500; j++) {
      fraction[0] = i+j;
      fraction[1] = i*j;
      if (4*fraction[1]-n*fraction[0] != 0 && n*fraction[1]%(4*fraction[1]-n*fraction[0]) == 0) {
        k = n*fraction[1]/(4*fraction[1]-n*fraction[0]);
        if (k <= 0) {
          continue;
        }
        printf("%ld %ld %ld\n", i, j, k);
        return 0;
      }
    }
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$4, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$4, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r11
	movq	%r13, %r8
	subq	%r11, %r8
	leaq	(%r11,%r11), %rax
	movq	%r11, %rbx
	subq	%rax, %r13
	movq	%r8, %r12
.L2:
	leaq	(%rbx,%r11), %r15
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdi
	movq	%r15, %r9
	movl	$1, %r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %r10
	addq	%rbp, %rdi
	addq	%r11, %r9
	addq	%rbx, %rcx
	addq	%r12, %rsi
	cmpq	$3501, %r10
	je	.L13
.L5:
	cmpq	%rdi, %r9
	je	.L3
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L3
	testq	%rax, %rax
	jle	.L3
	movq	%rax, %r8
	movq	%r10, %rcx
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	addq	$1, %r14
	addq	$4, %rbp
	addq	$4, %r12
	addq	%r8, %r13
	cmpq	$3501, %r14
	je	.L4
	movq	%r15, %rbx
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```

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"
.LC1:
	.string	"%ld %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$4, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$4, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r11
	movq	%r13, %r8
	subq	%r11, %r8
	leaq	(%r11,%r11), %rax
	movq	%r11, %rbx
	subq	%rax, %r13
	movq	%r8, %r12
.L2:
	leaq	(%rbx,%r11), %r15
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdi
	movq	%r15, %r9
	movl	$1, %r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %r10
	addq	%rbp, %rdi
	addq	%r11, %r9
	addq	%rbx, %rcx
	addq	%r12, %rsi
	cmpq	$3501, %r10
	je	.L13
.L5:
	cmpq	%rdi, %r9
	je	.L3
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L3
	testq	%rax, %rax
	jle	.L3
	movq	%rax, %r8
	movq	%r10, %rcx
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	addq	$1, %r14
	addq	$4, %rbp
	addq	$4, %r12
	addq	%r8, %r13
	cmpq	$3501, %r14
	je	.L4
	movq	%r15, %rbx
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$4, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$4, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r11
	movq	%r13, %r8
	subq	%r11, %r8
	leaq	(%r11,%r11), %rax
	movq	%r11, %rbx
	subq	%rax, %r13
	movq	%r8, %r12
.L2:
	leaq	(%rbx,%r11), %r15
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdi
	movq	%r15, %r9
	movl	$1, %r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %r10
	addq	%rbp, %rdi
	addq	%r11, %r9
	addq	%rbx, %rcx
	addq	%r12, %rsi
	cmpq	$3501, %r10
	je	.L13
.L5:
	cmpq	%rdi, %r9
	je	.L3
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L3
	testq	%rax, %rax
	jle	.L3
	movq	%rax, %r8
	movq	%r10, %rcx
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	addq	$1, %r14
	addq	$4, %rbp
	addq	$4, %r12
	addq	%r8, %r13
	cmpq	$3501, %r14
	je	.L4
	movq	%r15, %rbx
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include <stdio.h>

int main(void) {

  long n;
  scanf("%ld", &n);
  long fraction[2];
  long k;
  for (long i = 1; i <= 3500; i++) {
    for (long j = 1; j <= 3500; j++) {
      fraction[0] = i+j;
      fraction[1] = i*j;
      if (4*fraction[1]-n*fraction[0] != 0 && n*fraction[1]%(4*fraction[1]-n*fraction[0]) == 0) {
        k = n*fraction[1]/(4*fraction[1]-n*fraction[0]);
        if (k <= 0) {
          continue;
        }
        printf("%ld %ld %ld\n", i, j, k);
        return 0;
      }
    }
  }

  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(void) {

  long n;
  scanf("%ld", &n);
  long fraction[2];
  long k;
  for (long i = 1; i <= 3500; i++) {
    for (long j = 1; j <= 3500; j++) {
      fraction[0] = i+j;
      fraction[1] = i*j;
      if (4*fraction[1]-n*fraction[0] != 0 && n*fraction[1]%(4*fraction[1]-n*fraction[0]) == 0) {
        k = n*fraction[1]/(4*fraction[1]-n*fraction[0]);
        if (k <= 0) {
          continue;
        }
        printf("%ld %ld %ld\n", i, j, k);
        return 0;
      }
    }
  }

  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
 3492
 6
 3999
 10
 12
 4
 4141
 8
 7

1 4 12
 1164 3493 12197556
 2 7 42
 1400 3500 3999000
 3 16 240
 4 13 156
 2 3 6
 1476 3468 10770741
 3 7 42
 2 15 210

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(void) {

  long n;
  scanf("%ld", &n);
  long fraction[2];
  long k;
  for (long i = 1; i <= 3500; i++) {
    for (long j = 1; j <= 3500; j++) {
      fraction[0] = i+j;
      fraction[1] = i*j;
      if (4*fraction[1]-n*fraction[0] != 0 && n*fraction[1]%(4*fraction[1]-n*fraction[0]) == 0) {
        k = n*fraction[1]/(4*fraction[1]-n*fraction[0]);
        if (k <= 0) {
          continue;
        }
        printf("%ld %ld %ld\n", i, j, k);
        return 0;
      }
    }
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld"
.LC1:
	.string	"%ld %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$4, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$4, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r11
	movq	%r13, %r8
	subq	%r11, %r8
	leaq	(%r11,%r11), %rax
	movq	%r11, %rbx
	subq	%rax, %r13
	movq	%r8, %r12
.L2:
	leaq	(%rbx,%r11), %r15
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdi
	movq	%r15, %r9
	movl	$1, %r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %r10
	addq	%rbp, %rdi
	addq	%r11, %r9
	addq	%rbx, %rcx
	addq	%r12, %rsi
	cmpq	$3501, %r10
	je	.L13
.L5:
	cmpq	%rdi, %r9
	je	.L3
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L3
	testq	%rax, %rax
	jle	.L3
	movq	%rax, %r8
	movq	%r10, %rcx
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	addq	$1, %r14
	addq	$4, %rbp
	addq	$4, %r12
	addq	%r8, %r13
	cmpq	$3501, %r14
	je	.L4
	movq	%r15, %rbx
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```

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"
.LC1:
	.string	"%ld %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	$1, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	$4, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$4, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %r11
	movq	%r13, %r8
	subq	%r11, %r8
	leaq	(%r11,%r11), %rax
	movq	%r11, %rbx
	subq	%rax, %r13
	movq	%r8, %r12
.L2:
	leaq	(%rbx,%r11), %r15
	movq	%r13, %rsi
	movq	%rbx, %rcx
	movq	%rbp, %rdi
	movq	%r15, %r9
	movl	$1, %r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %r10
	addq	%rbp, %rdi
	addq	%r11, %r9
	addq	%rbx, %rcx
	addq	%r12, %rsi
	cmpq	$3501, %r10
	je	.L13
.L5:
	cmpq	%rdi, %r9
	je	.L3
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	.L3
	testq	%rax, %rax
	jle	.L3
	movq	%rax, %r8
	movq	%r10, %rcx
	movq	%r14, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	addq	$1, %r14
	addq	$4, %rbp
	addq	$4, %r12
	addq	%r8, %r13
	cmpq	$3501, %r14
	je	.L4
	movq	%r15, %rbx
	jmp	.L2
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```