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 x,y,i,j,a=0;
	scanf("%d%d", &x, &y);
	switch (x)
	{
		case 1: i = 300000; break;
		case 2: i = 200000; break;
		case 3: i = 100000; break;
		default : i = 0; break;
	}
	switch (y)
	{
		case 1: j = 300000; break;
		case 2: j = 200000; break;
		case 3: j = 100000; break;
		default : j = 0; break;
	}
	if ( x == 1 && y == 1 )
		a = 400000;
	printf("%d\n",j+i+a);
	
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$3, %eax
	je	.L2
	cmpl	$3, %eax
	jg	.L3
	cmpl	$1, %eax
	je	.L4
	cmpl	$2, %eax
	je	.L5
	jmp	.L3
.L4:
	movl	$300000, -20(%rbp)
	jmp	.L6
.L5:
	movl	$200000, -20(%rbp)
	jmp	.L6
.L2:
	movl	$100000, -20(%rbp)
	jmp	.L6
.L3:
	movl	$0, -20(%rbp)
	nop
.L6:
	movl	-24(%rbp), %eax
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L8
	cmpl	$1, %eax
	je	.L9
	cmpl	$2, %eax
	je	.L10
	jmp	.L8
.L9:
	movl	$300000, -16(%rbp)
	jmp	.L11
.L10:
	movl	$200000, -16(%rbp)
	jmp	.L11
.L7:
	movl	$100000, -16(%rbp)
	jmp	.L11
.L8:
	movl	$0, -16(%rbp)
	nop
.L11:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	$400000, -12(%rbp)
.L12:
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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"
.LC1:
	.string	"%d\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
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	xorl	%edx, %edx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	ja	.L2
	imull	$-100000, %ecx, %edx
	addl	$400000, %edx
.L2:
	movl	4(%rsp), %esi
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	ja	.L6
	imull	$-100000, %esi, %eax
	addl	$400000, %eax
	subl	$1, %ecx
	jne	.L7
	subl	$1, %esi
	movl	$400000, %ecx
	je	.L3
.L7:
	xorl	%ecx, %ecx
	jmp	.L3
.L6:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
.L3:
	addl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	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"
.LC1:
	.string	"%d\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
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %ecx
	xorl	%edx, %edx
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	ja	.L2
	imull	$-100000, %ecx, %edx
	addl	$400000, %edx
.L2:
	movl	4(%rsp), %esi
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	ja	.L6
	imull	$-100000, %esi, %eax
	addl	$400000, %eax
	subl	$1, %ecx
	jne	.L7
	subl	$1, %esi
	movl	$400000, %ecx
	je	.L3
.L7:
	xorl	%ecx, %ecx
	jmp	.L3
.L6:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
.L3:
	addl	%eax, %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	addl	%ecx, %edx
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	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 x,y,i,j,a=0;
	scanf("%d%d", &x, &y);
	switch (x)
	{
		case 1: i = 300000; break;
		case 2: i = 200000; break;
		case 3: i = 100000; break;
		default : i = 0; break;
	}
	switch (y)
	{
		case 1: j = 300000; break;
		case 2: j = 200000; break;
		case 3: j = 100000; break;
		default : j = 0; break;
	}
	if ( x == 1 && y == 1 )
		a = 400000;
	printf("%d\n",j+i+a);
	
    return 0;
}
3 001
 1 2
 4 5
 5 001
 57 3
 4 2
 1 001
 2 2
 4 10
 10 001

400000
 500000
 0
 300000
 100000
 200000
 1000000
 400000
 0
 300000

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 x,y,i,j,a=0;
	scanf("%d%d", &x, &y);
	switch (x)
	{
		case 1: i = 300000; break;
		case 2: i = 200000; break;
		case 3: i = 100000; break;
		default : i = 0; break;
	}
	switch (y)
	{
		case 1: j = 300000; break;
		case 2: j = 200000; break;
		case 3: j = 100000; break;
		default : j = 0; break;
	}
	if ( x == 1 && y == 1 )
		a = 400000;
	printf("%d\n",j+i+a);
	
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$3, %eax
	je	.L2
	cmpl	$3, %eax
	jg	.L3
	cmpl	$1, %eax
	je	.L4
	cmpl	$2, %eax
	je	.L5
	jmp	.L3
.L4:
	movl	$300000, -20(%rbp)
	jmp	.L6
.L5:
	movl	$200000, -20(%rbp)
	jmp	.L6
.L2:
	movl	$100000, -20(%rbp)
	jmp	.L6
.L3:
	movl	$0, -20(%rbp)
	nop
.L6:
	movl	-24(%rbp), %eax
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L8
	cmpl	$1, %eax
	je	.L9
	cmpl	$2, %eax
	je	.L10
	jmp	.L8
.L9:
	movl	$300000, -16(%rbp)
	jmp	.L11
.L10:
	movl	$200000, -16(%rbp)
	jmp	.L11
.L7:
	movl	$100000, -16(%rbp)
	jmp	.L11
.L8:
	movl	$0, -16(%rbp)
	nop
.L11:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	$400000, -12(%rbp)
.L12:
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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"
.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	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -12(%rbp)
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	cmpl	$3, %eax
	je	.L2
	cmpl	$3, %eax
	jg	.L3
	cmpl	$1, %eax
	je	.L4
	cmpl	$2, %eax
	je	.L5
	jmp	.L3
.L4:
	movl	$300000, -20(%rbp)
	jmp	.L6
.L5:
	movl	$200000, -20(%rbp)
	jmp	.L6
.L2:
	movl	$100000, -20(%rbp)
	jmp	.L6
.L3:
	movl	$0, -20(%rbp)
	nop
.L6:
	movl	-24(%rbp), %eax
	cmpl	$3, %eax
	je	.L7
	cmpl	$3, %eax
	jg	.L8
	cmpl	$1, %eax
	je	.L9
	cmpl	$2, %eax
	je	.L10
	jmp	.L8
.L9:
	movl	$300000, -16(%rbp)
	jmp	.L11
.L10:
	movl	$200000, -16(%rbp)
	jmp	.L11
.L7:
	movl	$100000, -16(%rbp)
	jmp	.L11
.L8:
	movl	$0, -16(%rbp)
	nop
.L11:
	movl	-28(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L12
	movl	$400000, -12(%rbp)
.L12:
	movl	-16(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	-12(%rbp), %eax
	addl	%edx, %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	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
