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(){
  char S[100],T[100],U[100];
  int A,B;
  scanf("%s %s",S,T);
  scanf("%d %d",&A,&B);
  scanf("%s",U);
  if(S[0] == U[0])
	printf("%d %d",A-1,B);
  else if(T[0] == U[0])
    printf("%d %d",A,B-1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
	.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	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-224(%rbp), %rdx
	leaq	-336(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-340(%rbp), %rdx
	leaq	-344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-336(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L2
	movl	-340(%rbp), %eax
	movl	-344(%rbp), %edx
	leal	-1(%rdx), %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movzbl	-224(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L3
	movl	-340(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-344(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	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	"%s %s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %rbp
	subq	$352, %rsp
	.cfi_def_cfa_offset 368
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	128(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	240(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	240(%rsp), %eax
	cmpb	%al, 16(%rsp)
	je	.L7
	cmpb	128(%rsp), %al
	je	.L8
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$352, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L8:
	movl	12(%rsp), %eax
	movl	8(%rsp), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	leal	-1(%rax), %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L9:
	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	"%s %s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %rbp
	subq	$352, %rsp
	.cfi_def_cfa_offset 368
	movq	%fs:40, %rax
	movq	%rax, 344(%rsp)
	xorl	%eax, %eax
	leaq	128(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	12(%rsp), %rdx
	movq	%rbp, %rdi
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	leaq	240(%rsp), %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	240(%rsp), %eax
	cmpb	%al, 16(%rsp)
	je	.L7
	cmpb	128(%rsp), %al
	je	.L8
.L3:
	movq	344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	addq	$352, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	leal	-1(%rax), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L8:
	movl	12(%rsp), %eax
	movl	8(%rsp), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	leal	-1(%rax), %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L3
.L9:
	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(){
  char S[100],T[100],U[100];
  int A,B;
  scanf("%s %s",S,T);
  scanf("%d %d",&A,&B);
  scanf("%s",U);
  if(S[0] == U[0])
	printf("%d %d",A-1,B);
  else if(T[0] == U[0])
    printf("%d %d",A,B-1);
  return 0;
}
red blue
3 2
red
 red blte
3 0
red
 red blue
5 0
red
 red blue
7 0
red
 red blue
5 1
red
 red blue
0 0
red
 red blte
3 4
red
 red blue
1 0
red
 red blue
11 0
red
 red blue
-1 0
red

2 2 2 0 4 0 6 0 4 1 -1 0 2 4 0 0 10 0 -2 0
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(){
  char S[100],T[100],U[100];
  int A,B;
  scanf("%s %s",S,T);
  scanf("%d %d",&A,&B);
  scanf("%s",U);
  if(S[0] == U[0])
	printf("%d %d",A-1,B);
  else if(T[0] == U[0])
    printf("%d %d",A,B-1);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
	.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	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-224(%rbp), %rdx
	leaq	-336(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-340(%rbp), %rdx
	leaq	-344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-336(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L2
	movl	-340(%rbp), %eax
	movl	-344(%rbp), %edx
	leal	-1(%rdx), %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movzbl	-224(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L3
	movl	-340(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-344(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	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	"%s %s"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%s"
	.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	$352, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-224(%rbp), %rdx
	leaq	-336(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-340(%rbp), %rdx
	leaq	-344(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-336(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L2
	movl	-340(%rbp), %eax
	movl	-344(%rbp), %edx
	leal	-1(%rdx), %ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L3
.L2:
	movzbl	-224(%rbp), %edx
	movzbl	-112(%rbp), %eax
	cmpb	%al, %dl
	jne	.L3
	movl	-340(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-344(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %eax
	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:
