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(){
    int X,Y;
    int sum = 0;
    scanf("%d %d",&X,&Y);

    if(X==3){
        sum+=100000;
    }
    if(Y==3){
        sum+=100000;
    }
    if(X==2){
        sum+=200000;
    }
    if(Y==2){
        sum+=200000;
    }
    if(X==1){
        sum+=300000;
    }
    if(Y==1){
        sum+=300000;
    }
    if(sum==600000){
        sum+=400000;
    }

    printf("%d\n",sum);
}```

Assembly Code:

```assembly
	.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), %edx
	movl	4(%rsp), %ecx
	cmpl	$3, %edx
	je	.L2
	cmpl	$3, %ecx
	je	.L31
	cmpl	$2, %edx
	je	.L6
	xorl	%eax, %eax
.L11:
	cmpl	$2, %ecx
	je	.L7
	subl	$1, %edx
	jne	.L8
	addl	$300000, %eax
	subl	$1, %ecx
	je	.L12
	jmp	.L9
.L31:
	movl	$300000, %eax
	cmpl	$2, %edx
	jne	.L32
.L14:
	movl	%eax, %r8d
.L10:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$2, %ecx
	je	.L19
	movl	$200000, %eax
.L8:
	subl	$1, %ecx
	jne	.L14
.L12:
	addl	$300000, %eax
.L9:
	movl	$1000000, %r8d
	cmpl	$600000, %eax
	je	.L10
	jmp	.L14
.L2:
	cmpl	$3, %ecx
	je	.L18
	movl	$100000, %eax
	jmp	.L11
.L7:
	subl	$1, %edx
	leal	200000(%rax), %r8d
	jne	.L10
	addl	$500000, %eax
	jmp	.L9
.L32:
	subl	$1, %edx
	movl	$400000, %eax
	je	.L14
	movl	$100000, %eax
	jmp	.L14
.L19:
	movl	$400000, %eax
	jmp	.L14
.L18:
	movl	$200000, %eax
	jmp	.L14
.L33:
	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	"%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), %edx
	movl	4(%rsp), %ecx
	cmpl	$3, %edx
	je	.L2
	cmpl	$3, %ecx
	je	.L31
	cmpl	$2, %edx
	je	.L6
	xorl	%eax, %eax
.L11:
	cmpl	$2, %ecx
	je	.L7
	subl	$1, %edx
	jne	.L8
	addl	$300000, %eax
	subl	$1, %ecx
	je	.L12
	jmp	.L9
.L31:
	movl	$300000, %eax
	cmpl	$2, %edx
	jne	.L32
.L14:
	movl	%eax, %r8d
.L10:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$2, %ecx
	je	.L19
	movl	$200000, %eax
.L8:
	subl	$1, %ecx
	jne	.L14
.L12:
	addl	$300000, %eax
.L9:
	movl	$1000000, %r8d
	cmpl	$600000, %eax
	je	.L10
	jmp	.L14
.L2:
	cmpl	$3, %ecx
	je	.L18
	movl	$100000, %eax
	jmp	.L11
.L7:
	subl	$1, %edx
	leal	200000(%rax), %r8d
	jne	.L10
	addl	$500000, %eax
	jmp	.L9
.L32:
	subl	$1, %edx
	movl	$400000, %eax
	je	.L14
	movl	$100000, %eax
	jmp	.L14
.L19:
	movl	$400000, %eax
	jmp	.L14
.L18:
	movl	$200000, %eax
	jmp	.L14
.L33:
	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	"%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), %edx
	movl	4(%rsp), %ecx
	cmpl	$3, %edx
	je	.L2
	cmpl	$3, %ecx
	je	.L31
	cmpl	$2, %edx
	je	.L6
	xorl	%eax, %eax
.L11:
	cmpl	$2, %ecx
	je	.L7
	subl	$1, %edx
	jne	.L8
	addl	$300000, %eax
	subl	$1, %ecx
	je	.L12
	jmp	.L9
.L31:
	movl	$300000, %eax
	cmpl	$2, %edx
	jne	.L32
.L14:
	movl	%eax, %r8d
.L10:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$2, %ecx
	je	.L19
	movl	$200000, %eax
.L8:
	subl	$1, %ecx
	jne	.L14
.L12:
	addl	$300000, %eax
.L9:
	movl	$1000000, %r8d
	cmpl	$600000, %eax
	je	.L10
	jmp	.L14
.L2:
	cmpl	$3, %ecx
	je	.L18
	movl	$100000, %eax
	jmp	.L11
.L7:
	subl	$1, %edx
	leal	200000(%rax), %r8d
	jne	.L10
	addl	$500000, %eax
	jmp	.L9
.L32:
	subl	$1, %edx
	movl	$400000, %eax
	je	.L14
	movl	$100000, %eax
	jmp	.L14
.L19:
	movl	$400000, %eax
	jmp	.L14
.L18:
	movl	$200000, %eax
	jmp	.L14
.L33:
	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(){
    int X,Y;
    int sum = 0;
    scanf("%d %d",&X,&Y);

    if(X==3){
        sum+=100000;
    }
    if(Y==3){
        sum+=100000;
    }
    if(X==2){
        sum+=200000;
    }
    if(Y==2){
        sum+=200000;
    }
    if(X==1){
        sum+=300000;
    }
    if(Y==1){
        sum+=300000;
    }
    if(sum==600000){
        sum+=400000;
    }

    printf("%d\n",sum);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
    int X,Y;
    int sum = 0;
    scanf("%d %d",&X,&Y);

    if(X==3){
        sum+=100000;
    }
    if(Y==3){
        sum+=100000;
    }
    if(X==2){
        sum+=200000;
    }
    if(Y==2){
        sum+=200000;
    }
    if(X==1){
        sum+=300000;
    }
    if(Y==1){
        sum+=300000;
    }
    if(sum==600000){
        sum+=400000;
    }

    printf("%d\n",sum);
}```

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 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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(){
    int X,Y;
    int sum = 0;
    scanf("%d %d",&X,&Y);

    if(X==3){
        sum+=100000;
    }
    if(Y==3){
        sum+=100000;
    }
    if(X==2){
        sum+=200000;
    }
    if(Y==2){
        sum+=200000;
    }
    if(X==1){
        sum+=300000;
    }
    if(Y==1){
        sum+=300000;
    }
    if(sum==600000){
        sum+=400000;
    }

    printf("%d\n",sum);
}```

Assembly Code:

```assembly
	.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), %edx
	movl	4(%rsp), %ecx
	cmpl	$3, %edx
	je	.L2
	cmpl	$3, %ecx
	je	.L31
	cmpl	$2, %edx
	je	.L6
	xorl	%eax, %eax
.L11:
	cmpl	$2, %ecx
	je	.L7
	subl	$1, %edx
	jne	.L8
	addl	$300000, %eax
	subl	$1, %ecx
	je	.L12
	jmp	.L9
.L31:
	movl	$300000, %eax
	cmpl	$2, %edx
	jne	.L32
.L14:
	movl	%eax, %r8d
.L10:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$2, %ecx
	je	.L19
	movl	$200000, %eax
.L8:
	subl	$1, %ecx
	jne	.L14
.L12:
	addl	$300000, %eax
.L9:
	movl	$1000000, %r8d
	cmpl	$600000, %eax
	je	.L10
	jmp	.L14
.L2:
	cmpl	$3, %ecx
	je	.L18
	movl	$100000, %eax
	jmp	.L11
.L7:
	subl	$1, %edx
	leal	200000(%rax), %r8d
	jne	.L10
	addl	$500000, %eax
	jmp	.L9
.L32:
	subl	$1, %edx
	movl	$400000, %eax
	je	.L14
	movl	$100000, %eax
	jmp	.L14
.L19:
	movl	$400000, %eax
	jmp	.L14
.L18:
	movl	$200000, %eax
	jmp	.L14
.L33:
	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	"%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), %edx
	movl	4(%rsp), %ecx
	cmpl	$3, %edx
	je	.L2
	cmpl	$3, %ecx
	je	.L31
	cmpl	$2, %edx
	je	.L6
	xorl	%eax, %eax
.L11:
	cmpl	$2, %ecx
	je	.L7
	subl	$1, %edx
	jne	.L8
	addl	$300000, %eax
	subl	$1, %ecx
	je	.L12
	jmp	.L9
.L31:
	movl	$300000, %eax
	cmpl	$2, %edx
	jne	.L32
.L14:
	movl	%eax, %r8d
.L10:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L33
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	cmpl	$2, %ecx
	je	.L19
	movl	$200000, %eax
.L8:
	subl	$1, %ecx
	jne	.L14
.L12:
	addl	$300000, %eax
.L9:
	movl	$1000000, %r8d
	cmpl	$600000, %eax
	je	.L10
	jmp	.L14
.L2:
	cmpl	$3, %ecx
	je	.L18
	movl	$100000, %eax
	jmp	.L11
.L7:
	subl	$1, %edx
	leal	200000(%rax), %r8d
	jne	.L10
	addl	$500000, %eax
	jmp	.L9
.L32:
	subl	$1, %edx
	movl	$400000, %eax
	je	.L14
	movl	$100000, %eax
	jmp	.L14
.L19:
	movl	$400000, %eax
	jmp	.L14
.L18:
	movl	$200000, %eax
	jmp	.L14
.L33:
	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:
```