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

int main(void) {

  long s;
  scanf("%ld", &s);
  long pow9 = pow(10,9);
  long pow18 = pow(10,18);
  if (s == pow18) {
    printf("0 0 %ld 0 0 %ld\n", pow9, pow9);
    return 0;
  }
  long a,b;
  a = pow9-s%pow9;
  b = s/pow9+1;
  printf("0 0 %ld 1 %ld %ld\n", pow9, a, b);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"0 0 %ld 0 0 %ld\n"
.LC2:
	.string	"0 0 %ld 1 %ld %ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1000000000, -40(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jne	.L2
	movq	-40(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	-40(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	addq	$1, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movq	-24(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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"
.LC1:
	.string	"0 0 %ld 0 0 %ld\n"
.LC2:
	.string	"0 0 %ld 1 %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rcx
	movabsq	$1000000000000000000, %rax
	cmpq	%rax, %rcx
	je	.L7
	movq	%rcx, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movabsq	$1237940039285380275, %rdx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$1000000000, %rdx, %rax
	leaq	1(%rdx), %r8
	movl	$1000000000, %edx
	subq	%rcx, %rax
	leaq	1000000000(%rax), %rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	$1000000000, %ecx
	movl	$1000000000, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L3
.L8:
	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"
.LC1:
	.string	"0 0 %ld 0 0 %ld\n"
.LC2:
	.string	"0 0 %ld 1 %ld %ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rcx
	movabsq	$1000000000000000000, %rax
	cmpq	%rax, %rcx
	je	.L7
	movq	%rcx, %rax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movabsq	$1237940039285380275, %rdx
	imulq	%rdx
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$26, %rdx
	subq	%rax, %rdx
	imulq	$1000000000, %rdx, %rax
	leaq	1(%rdx), %r8
	movl	$1000000000, %edx
	subq	%rcx, %rax
	leaq	1000000000(%rax), %rcx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L3:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L8
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	$1000000000, %ecx
	movl	$1000000000, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	jmp	.L3
.L8:
	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>
#include <math.h>

int main(void) {

  long s;
  scanf("%ld", &s);
  long pow9 = pow(10,9);
  long pow18 = pow(10,18);
  if (s == pow18) {
    printf("0 0 %ld 0 0 %ld\n", pow9, pow9);
    return 0;
  }
  long a,b;
  a = pow9-s%pow9;
  b = s/pow9+1;
  printf("0 0 %ld 1 %ld %ld\n", pow9, a, b);

  return 0;
}
80182456107003087
 5
 158461871566595116
 10
 186455597317386972
 20
 181678330976250080
 39
 93932089064978059
 70

0 0 1000000000 1 892996913 80182457
 0 0 1000000000 1 999999995 1
 0 0 1000000000 1 433404884 158461872
 0 0 1000000000 1 999999990 1
 0 0 1000000000 1 682613028 186455598
 0 0 1000000000 1 999999980 1
 0 0 1000000000 1 23749920 181678331
 0 0 1000000000 1 999999961 1
 0 0 1000000000 1 935021941 93932090
 0 0 1000000000 1 999999930 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>
#include <math.h>

int main(void) {

  long s;
  scanf("%ld", &s);
  long pow9 = pow(10,9);
  long pow18 = pow(10,18);
  if (s == pow18) {
    printf("0 0 %ld 0 0 %ld\n", pow9, pow9);
    return 0;
  }
  long a,b;
  a = pow9-s%pow9;
  b = s/pow9+1;
  printf("0 0 %ld 1 %ld %ld\n", pow9, a, b);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%ld"
.LC1:
	.string	"0 0 %ld 0 0 %ld\n"
.LC2:
	.string	"0 0 %ld 1 %ld %ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1000000000, -40(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jne	.L2
	movq	-40(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	-40(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	addq	$1, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movq	-24(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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"
.LC1:
	.string	"0 0 %ld 0 0 %ld\n"
.LC2:
	.string	"0 0 %ld 1 %ld %ld\n"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-48(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$1000000000, -40(%rbp)
	movabsq	$1000000000000000000, %rax
	movq	%rax, -32(%rbp)
	movq	-48(%rbp), %rax
	cmpq	%rax, -32(%rbp)
	jne	.L2
	movq	-40(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L4
.L2:
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	movq	-40(%rbp), %rax
	subq	%rdx, %rax
	movq	%rax, -24(%rbp)
	movq	-48(%rbp), %rax
	cqto
	idivq	-40(%rbp)
	addq	$1, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rcx
	movq	-24(%rbp), %rdx
	movq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L4:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	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:
