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(){
  int t1,n1,t2,n2,t3,n3,t4,n4;
  int s1,s2,s3,s4;
  scanf("%d %d %d %d %d %d %d %d",&t1,&n1,&t2,&n2,&t3,&n3,&t4,&n4);

  if(t1==1) s1=n1*6000;
  else if(t1==2) s1=n1*4000;
  else if(t1==3) s1=n1*3000;
  else if(t1==4) s1=n1*2000;
  if(t2==1) s2=n2*6000;
 else if(t2==2) s2=n2*4000;
 else if(t2==3) s2=n2*3000;
 else if(t2==4) s2=n2*2000;
  
  if(t3==1) s3=n3*6000;
 else if(t3==2) s3=n3*4000;
 else if(t3==3) s3=n3*3000;
 else if(t3==4) s3=n3*2000;
  
  if(t4==1) s4=n4*6000;
 else if(t4==2) s4=n4*4000;
 else if(t4==3) s4=n4*3000;
 else if(t4==4) s4=n4*2000;


  printf("%d\n",s1);
  printf("%d\n",s2);
  printf("%d\n",s3);
  printf("%d\n",s4);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d %d %d %d %d"
.LC1:
	.string	"%d\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%rbp), %rsi
	pushq	%rsi
	leaq	-32(%rbp), %rsi
	pushq	%rsi
	leaq	-36(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-56(%rbp), %eax
	cmpl	$1, %eax
	jne	.L2
	movl	-52(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L2:
	movl	-56(%rbp), %eax
	cmpl	$2, %eax
	jne	.L4
	movl	-52(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movl	-56(%rbp), %eax
	cmpl	$3, %eax
	jne	.L5
	movl	-52(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L5:
	movl	-56(%rbp), %eax
	cmpl	$4, %eax
	jne	.L3
	movl	-52(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -24(%rbp)
.L3:
	movl	-48(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-44(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	-44(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cmpl	$3, %eax
	jne	.L9
	movl	-44(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L9:
	movl	-48(%rbp), %eax
	cmpl	$4, %eax
	jne	.L7
	movl	-44(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -20(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-36(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-36(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cmpl	$3, %eax
	jne	.L13
	movl	-36(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L13:
	movl	-40(%rbp), %eax
	cmpl	$4, %eax
	jne	.L11
	movl	-36(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -16(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-28(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L14:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L16
	movl	-28(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L17
	movl	-28(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %eax
	cmpl	$4, %eax
	jne	.L15
	movl	-28(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"%d %d %d %d %d %d %d %d"
.LC1:
	.string	"%d\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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	leaq	44(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 112
	leaq	48(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 120
	leaq	52(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 128
	xorl	%eax, %eax
	leaq	56(%rsp), %r9
	leaq	52(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	addq	$32, %rsp
	.cfi_def_cfa_offset 96
	cmpl	$1, %eax
	je	.L21
	cmpl	$2, %eax
	je	.L22
	cmpl	$3, %eax
	je	.L23
	cmpl	$4, %eax
	jne	.L3
	imull	$2000, 12(%rsp), %r15d
	jmp	.L3
.L22:
	imull	$4000, 12(%rsp), %r15d
.L3:
	movl	16(%rsp), %eax
	cmpl	$1, %eax
	je	.L24
	cmpl	$2, %eax
	je	.L25
	cmpl	$3, %eax
	je	.L26
	cmpl	$4, %eax
	je	.L27
	.p2align 4,,10
	.p2align 3
.L7:
	movl	24(%rsp), %eax
	cmpl	$1, %eax
	je	.L28
	cmpl	$2, %eax
	je	.L29
	cmpl	$3, %eax
	je	.L30
	cmpl	$4, %eax
	je	.L31
	.p2align 4,,10
	.p2align 3
.L11:
	movl	32(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$2, %eax
	je	.L33
	cmpl	$3, %eax
	je	.L34
	cmpl	$4, %eax
	je	.L35
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	.LC1(%rip), %rbp
	movl	%r15d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%rbp, %rsi
	call	__printf_chk@PLT
	movl	%r14d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r13d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	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
.L32:
	.cfi_restore_state
	imull	$6000, 36(%rsp), %r12d
	jmp	.L15
.L28:
	imull	$6000, 28(%rsp), %r13d
	jmp	.L11
.L24:
	imull	$6000, 20(%rsp), %r14d
	jmp	.L7
.L21:
	imull	$6000, 12(%rsp), %r15d
	jmp	.L3
.L25:
	imull	$4000, 20(%rsp), %r14d
	jmp	.L7
.L33:
	imull	$4000, 36(%rsp), %r12d
	jmp	.L15
.L29:
	imull	$4000, 28(%rsp), %r13d
	jmp	.L11
.L35:
	imull	$2000, 36(%rsp), %r12d
	jmp	.L15
.L31:
	imull	$2000, 28(%rsp), %r13d
	jmp	.L11
.L27:
	imull	$2000, 20(%rsp), %r14d
	jmp	.L7
.L26:
	imull	$3000, 20(%rsp), %r14d
	jmp	.L7
.L34:
	imull	$3000, 36(%rsp), %r12d
	jmp	.L15
.L30:
	imull	$3000, 28(%rsp), %r13d
	jmp	.L11
.L23:
	imull	$3000, 12(%rsp), %r15d
	jmp	.L3
.L36:
	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	"%d %d %d %d %d %d %d %d"
.LC1:
	.string	"%d\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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rcx
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	leaq	44(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 112
	leaq	48(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 120
	leaq	52(%rsp), %rax
	pushq	%rax
	.cfi_def_cfa_offset 128
	xorl	%eax, %eax
	leaq	56(%rsp), %r9
	leaq	52(%rsp), %r8
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	addq	$32, %rsp
	.cfi_def_cfa_offset 96
	cmpl	$1, %eax
	je	.L21
	cmpl	$2, %eax
	je	.L22
	cmpl	$3, %eax
	je	.L23
	cmpl	$4, %eax
	jne	.L3
	imull	$2000, 12(%rsp), %r15d
	jmp	.L3
.L22:
	imull	$4000, 12(%rsp), %r15d
.L3:
	movl	16(%rsp), %eax
	cmpl	$1, %eax
	je	.L24
	cmpl	$2, %eax
	je	.L25
	cmpl	$3, %eax
	je	.L26
	cmpl	$4, %eax
	je	.L27
	.p2align 4,,10
	.p2align 3
.L7:
	movl	24(%rsp), %eax
	cmpl	$1, %eax
	je	.L28
	cmpl	$2, %eax
	je	.L29
	cmpl	$3, %eax
	je	.L30
	cmpl	$4, %eax
	je	.L31
	.p2align 4,,10
	.p2align 3
.L11:
	movl	32(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$2, %eax
	je	.L33
	cmpl	$3, %eax
	je	.L34
	cmpl	$4, %eax
	je	.L35
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	.LC1(%rip), %rbp
	movl	%r15d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%rbp, %rsi
	call	__printf_chk@PLT
	movl	%r14d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r13d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movl	%r12d, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	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
.L32:
	.cfi_restore_state
	imull	$6000, 36(%rsp), %r12d
	jmp	.L15
.L28:
	imull	$6000, 28(%rsp), %r13d
	jmp	.L11
.L24:
	imull	$6000, 20(%rsp), %r14d
	jmp	.L7
.L21:
	imull	$6000, 12(%rsp), %r15d
	jmp	.L3
.L25:
	imull	$4000, 20(%rsp), %r14d
	jmp	.L7
.L33:
	imull	$4000, 36(%rsp), %r12d
	jmp	.L15
.L29:
	imull	$4000, 28(%rsp), %r13d
	jmp	.L11
.L35:
	imull	$2000, 36(%rsp), %r12d
	jmp	.L15
.L31:
	imull	$2000, 28(%rsp), %r13d
	jmp	.L11
.L27:
	imull	$2000, 20(%rsp), %r14d
	jmp	.L7
.L26:
	imull	$3000, 20(%rsp), %r14d
	jmp	.L7
.L34:
	imull	$3000, 36(%rsp), %r12d
	jmp	.L15
.L30:
	imull	$3000, 28(%rsp), %r13d
	jmp	.L11
.L23:
	imull	$3000, 12(%rsp), %r15d
	jmp	.L3
.L36:
	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(){
  int t1,n1,t2,n2,t3,n3,t4,n4;
  int s1,s2,s3,s4;
  scanf("%d %d %d %d %d %d %d %d",&t1,&n1,&t2,&n2,&t3,&n3,&t4,&n4);

  if(t1==1) s1=n1*6000;
  else if(t1==2) s1=n1*4000;
  else if(t1==3) s1=n1*3000;
  else if(t1==4) s1=n1*2000;
  if(t2==1) s2=n2*6000;
 else if(t2==2) s2=n2*4000;
 else if(t2==3) s2=n2*3000;
 else if(t2==4) s2=n2*2000;
  
  if(t3==1) s3=n3*6000;
 else if(t3==2) s3=n3*4000;
 else if(t3==3) s3=n3*3000;
 else if(t3==4) s3=n3*2000;
  
  if(t4==1) s4=n4*6000;
 else if(t4==2) s4=n4*4000;
 else if(t4==3) s4=n4*3000;
 else if(t4==4) s4=n4*2000;


  printf("%d\n",s1);
  printf("%d\n",s2);
  printf("%d\n",s3);
  printf("%d\n",s4);

  return 0;
}
3 10
1 4
4 1
1 5
 3 13
1 4
4 1
1 5
 3 13
1 4
1 1
1 5
 3 13
1 4
1 2
1 5
 2 13
1 4
1 2
1 5
 2 13
1 4
1 2
1 3
 2 13
1 6
1 2
1 3
 3 10
1 0
4 1
2 5
 3 10
1 4
2 1
1 5
 3 16
1 4
1 1
1 5

30000
24000
2000
30000
 39000
24000
2000
30000
 39000
24000
6000
30000
 39000
24000
12000
30000
 52000
24000
12000
30000
 52000
24000
12000
18000
 52000
36000
12000
18000
 30000
0
2000
20000
 30000
24000
4000
30000
 48000
24000
6000
30000

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(){
  int t1,n1,t2,n2,t3,n3,t4,n4;
  int s1,s2,s3,s4;
  scanf("%d %d %d %d %d %d %d %d",&t1,&n1,&t2,&n2,&t3,&n3,&t4,&n4);

  if(t1==1) s1=n1*6000;
  else if(t1==2) s1=n1*4000;
  else if(t1==3) s1=n1*3000;
  else if(t1==4) s1=n1*2000;
  if(t2==1) s2=n2*6000;
 else if(t2==2) s2=n2*4000;
 else if(t2==3) s2=n2*3000;
 else if(t2==4) s2=n2*2000;
  
  if(t3==1) s3=n3*6000;
 else if(t3==2) s3=n3*4000;
 else if(t3==3) s3=n3*3000;
 else if(t3==4) s3=n3*2000;
  
  if(t4==1) s4=n4*6000;
 else if(t4==2) s4=n4*4000;
 else if(t4==3) s4=n4*3000;
 else if(t4==4) s4=n4*2000;


  printf("%d\n",s1);
  printf("%d\n",s2);
  printf("%d\n",s3);
  printf("%d\n",s4);

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d %d %d %d %d %d %d"
.LC1:
	.string	"%d\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%rbp), %rsi
	pushq	%rsi
	leaq	-32(%rbp), %rsi
	pushq	%rsi
	leaq	-36(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-56(%rbp), %eax
	cmpl	$1, %eax
	jne	.L2
	movl	-52(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L2:
	movl	-56(%rbp), %eax
	cmpl	$2, %eax
	jne	.L4
	movl	-52(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movl	-56(%rbp), %eax
	cmpl	$3, %eax
	jne	.L5
	movl	-52(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L5:
	movl	-56(%rbp), %eax
	cmpl	$4, %eax
	jne	.L3
	movl	-52(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -24(%rbp)
.L3:
	movl	-48(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-44(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	-44(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cmpl	$3, %eax
	jne	.L9
	movl	-44(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L9:
	movl	-48(%rbp), %eax
	cmpl	$4, %eax
	jne	.L7
	movl	-44(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -20(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-36(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-36(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cmpl	$3, %eax
	jne	.L13
	movl	-36(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L13:
	movl	-40(%rbp), %eax
	cmpl	$4, %eax
	jne	.L11
	movl	-36(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -16(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-28(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L14:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L16
	movl	-28(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L17
	movl	-28(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %eax
	cmpl	$4, %eax
	jne	.L15
	movl	-28(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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	"%d %d %d %d %d %d %d %d"
.LC1:
	.string	"%d\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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %r8
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %rdx
	leaq	-56(%rbp), %rax
	subq	$8, %rsp
	leaq	-28(%rbp), %rsi
	pushq	%rsi
	leaq	-32(%rbp), %rsi
	pushq	%rsi
	leaq	-36(%rbp), %rsi
	pushq	%rsi
	movq	%r8, %r9
	movq	%rdi, %r8
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	movl	-56(%rbp), %eax
	cmpl	$1, %eax
	jne	.L2
	movl	-52(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L2:
	movl	-56(%rbp), %eax
	cmpl	$2, %eax
	jne	.L4
	movl	-52(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movl	-56(%rbp), %eax
	cmpl	$3, %eax
	jne	.L5
	movl	-52(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L5:
	movl	-56(%rbp), %eax
	cmpl	$4, %eax
	jne	.L3
	movl	-52(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -24(%rbp)
.L3:
	movl	-48(%rbp), %eax
	cmpl	$1, %eax
	jne	.L6
	movl	-44(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L6:
	movl	-48(%rbp), %eax
	cmpl	$2, %eax
	jne	.L8
	movl	-44(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L8:
	movl	-48(%rbp), %eax
	cmpl	$3, %eax
	jne	.L9
	movl	-44(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -20(%rbp)
	jmp	.L7
.L9:
	movl	-48(%rbp), %eax
	cmpl	$4, %eax
	jne	.L7
	movl	-44(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -20(%rbp)
.L7:
	movl	-40(%rbp), %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-36(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L10:
	movl	-40(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-36(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L12:
	movl	-40(%rbp), %eax
	cmpl	$3, %eax
	jne	.L13
	movl	-36(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -16(%rbp)
	jmp	.L11
.L13:
	movl	-40(%rbp), %eax
	cmpl	$4, %eax
	jne	.L11
	movl	-36(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -16(%rbp)
.L11:
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L14
	movl	-28(%rbp), %eax
	imull	$6000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L14:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L16
	movl	-28(%rbp), %eax
	imull	$4000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L17
	movl	-28(%rbp), %eax
	imull	$3000, %eax, %eax
	movl	%eax, -12(%rbp)
	jmp	.L15
.L17:
	movl	-32(%rbp), %eax
	cmpl	$4, %eax
	jne	.L15
	movl	-28(%rbp), %eax
	imull	$2000, %eax, %eax
	movl	%eax, -12(%rbp)
.L15:
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	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:
