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>

int main(void){

  long n,k,s;
  scanf("%ld %ld %ld", &n, &k, &s);

  long other = s+1;
  if (other > 1000000000) {
    other = 1;
  }

  if (k != 0) {
    printf("%ld", s);
    for (long i = 1; i < k; i++) {
      printf(" %ld", s);
    }
    for (long i = k; i < n; i++) {
      printf(" %ld", other);
    }
  } else {
    printf("%ld", other);
    for (long i = 1; i < n; i++) {
      printf(" %ld", other);
    }
  }

  printf("\n");

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	" %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	cmpq	$1000000000, -40(%rbp)
	jle	.L2
	movq	$1, -40(%rbp)
.L2:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L3
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -32(%rbp)
	jmp	.L4
.L5:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -32(%rbp)
.L4:
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	movq	-56(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -24(%rbp)
.L6:
	movq	-64(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jl	.L7
	jmp	.L8
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -16(%rbp)
	jmp	.L9
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L9:
	movq	-64(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L10
.L8:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	" %ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movl	$1, %eax
	leaq	1(%rdx), %r12
	cmpq	$1000000001, %r12
	cmovge	%rax, %r12
	cmpq	$0, 8(%rsp)
	je	.L3
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rbx
	cmpq	$1, %rbx
	jle	.L4
	movl	$1, %r13d
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movq	8(%rsp), %rbx
	cmpq	%r13, %rbx
	jg	.L5
.L4:
	cmpq	%rbx, (%rsp)
	jle	.L6
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jg	.L7
.L6:
	movl	$10, %edi
	call	putchar@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$40, %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
.L3:
	.cfi_restore_state
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	cmpq	$1, (%rsp)
	jle	.L6
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jg	.L8
	jmp	.L6
.L15:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	" %ld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$40, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rdx
	movl	$1, %eax
	leaq	1(%rdx), %r12
	cmpq	$1000000001, %r12
	cmovge	%rax, %r12
	cmpq	$0, 8(%rsp)
	je	.L3
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rsp), %rbx
	cmpq	$1, %rbx
	jle	.L4
	movl	$1, %r13d
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %r13
	call	__printf_chk@PLT
	movq	8(%rsp), %rbx
	cmpq	%r13, %rbx
	jg	.L5
.L4:
	cmpq	%rbx, (%rsp)
	jle	.L6
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jg	.L7
.L6:
	movl	$10, %edi
	call	putchar@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$40, %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
.L3:
	.cfi_restore_state
	xorl	%eax, %eax
	movq	%r12, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	cmpq	$1, (%rsp)
	jle	.L6
	movl	$1, %ebx
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpq	%rbx, (%rsp)
	jg	.L8
	jmp	.L6
.L15:
	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:

#include <stdio.h>

int main(void){

  long n,k,s;
  scanf("%ld %ld %ld", &n, &k, &s);

  long other = s+1;
  if (other > 1000000000) {
    other = 1;
  }

  if (k != 0) {
    printf("%ld", s);
    for (long i = 1; i < k; i++) {
      printf(" %ld", s);
    }
    for (long i = k; i < n; i++) {
      printf(" %ld", other);
    }
  } else {
    printf("%ld", other);
    for (long i = 1; i < n; i++) {
      printf(" %ld", other);
    }
  }

  printf("\n");

  return 0;
}
5 3 000
 5 0 100
 4 1 3
 5 3 010
 4 0 3
 10 3 010
 8 0 3
 10 5 010
 8 1 3
 10 5 000

0 0 0 1 1
 101 101 101 101 101
 3 4 4 4
 10 10 10 11 11
 4 4 4 4
 10 10 10 11 11 11 11 11 11 11
 4 4 4 4 4 4 4 4
 10 10 10 10 10 11 11 11 11 11
 3 4 4 4 4 4 4 4
 0 0 0 0 0 1 1 1 1 1

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>

int main(void){

  long n,k,s;
  scanf("%ld %ld %ld", &n, &k, &s);

  long other = s+1;
  if (other > 1000000000) {
    other = 1;
  }

  if (k != 0) {
    printf("%ld", s);
    for (long i = 1; i < k; i++) {
      printf(" %ld", s);
    }
    for (long i = k; i < n; i++) {
      printf(" %ld", other);
    }
  } else {
    printf("%ld", other);
    for (long i = 1; i < n; i++) {
      printf(" %ld", other);
    }
  }

  printf("\n");

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	" %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	cmpq	$1000000000, -40(%rbp)
	jle	.L2
	movq	$1, -40(%rbp)
.L2:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L3
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -32(%rbp)
	jmp	.L4
.L5:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -32(%rbp)
.L4:
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	movq	-56(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -24(%rbp)
.L6:
	movq	-64(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jl	.L7
	jmp	.L8
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -16(%rbp)
	jmp	.L9
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L9:
	movq	-64(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L10
.L8:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld %ld %ld"
.LC1:
	.string	"%ld"
.LC2:
	.string	" %ld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rcx
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-48(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -40(%rbp)
	cmpq	$1000000000, -40(%rbp)
	jle	.L2
	movq	$1, -40(%rbp)
.L2:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	.L3
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -32(%rbp)
	jmp	.L4
.L5:
	movq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -32(%rbp)
.L4:
	movq	-56(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jl	.L5
	movq	-56(%rbp), %rax
	movq	%rax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -24(%rbp)
.L6:
	movq	-64(%rbp), %rax
	cmpq	%rax, -24(%rbp)
	jl	.L7
	jmp	.L8
.L3:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	$1, -16(%rbp)
	jmp	.L9
.L10:
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L9:
	movq	-64(%rbp), %rax
	cmpq	%rax, -16(%rbp)
	jl	.L10
.L8:
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
