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(void){
	char ope[20]={0},x;
	int num[20]={0},ltr=0,i=0,j=0,mode=0,bob,cnt=0,ans=0;
	while(1){
		scanf("%c",&x);
		if(x=='\n'){
			break;
		}
		cnt++;
		if(mode==0&&x!='*'&&x!='+'){
			ltr+=x-48;
		}
		else if(x!='*'&&x!='+'){
			ltr=ltr*(x-48);
		}
		if(x=='*'||x=='+'){
			ope[i]=x;
			if(x=='*'){
				mode=1;
			}
			else{
				mode=0;
			}
			i++;
		}
		else{
			num[j]=x-48;
			j++;
		}
	}
	i=0;
	while(i<j){
		if(ope[i]=='*'){
			num[i+1]=num[i+1]*num[i];
			num[i]=0;
		}
		i++;
	}
	for(i=0;i<=cnt;i++){
		ans+=num[i];
	}
	scanf("%d",&bob);
	if(bob==ans&&bob==ltr){
		printf("U\n");
	}
	else if(bob==ans){
		printf("M\n");
	}
	else if(bob==ltr){
		printf("L\n");
	}
	else{
		printf("I\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%c"
.LC1:
	.string	"%d"
.LC2:
	.string	"U"
.LC3:
	.string	"M"
.LC4:
	.string	"L"
.LC5:
	.string	"I"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
.L11:
	leaq	-141(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-141(%rbp), %eax
	cmpb	$10, %al
	je	.L24
	addl	$1, -120(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -136(%rbp)
	jmp	.L5
.L4:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-136(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -136(%rbp)
.L5:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L6
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	jne	.L7
.L6:
	movzbl	-141(%rbp), %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$1, -124(%rbp)
	jmp	.L9
.L8:
	movl	$0, -124(%rbp)
.L9:
	addl	$1, -132(%rbp)
	jmp	.L10
.L7:
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-128(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	addl	$1, -128(%rbp)
.L10:
	jmp	.L11
.L24:
	nop
	movl	$0, -132(%rbp)
	jmp	.L12
.L14:
	movl	-132(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$42, %al
	jne	.L13
	movl	-132(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	-132(%rbp), %ecx
	addl	$1, %ecx
	imull	%eax, %edx
	movslq	%ecx, %rax
	movl	%edx, -112(%rbp,%rax,4)
	movl	-132(%rbp), %eax
	cltq
	movl	$0, -112(%rbp,%rax,4)
.L13:
	addl	$1, -132(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	-128(%rbp), %eax
	jl	.L14
	movl	$0, -132(%rbp)
	jmp	.L15
.L16:
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	addl	%eax, -116(%rbp)
	addl	$1, -132(%rbp)
.L15:
	movl	-132(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L16
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L17
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L19:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L20
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"%c"
.LC1:
	.string	"%d"
.LC2:
	.string	"U"
.LC3:
	.string	"M"
.LC4:
	.string	"L"
.LC5:
	.string	"I"
	.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
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	movl	$0, 12(%rsp)
	leaq	27(%rsp), %r15
	movl	$0, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	27(%rsp), %eax
	cmpb	$10, %al
	je	.L40
	addl	$1, %ebx
	leal	-42(%rax), %edx
	testl	%r13d, %r13d
	jne	.L8
	cmpb	$1, %dl
	ja	.L41
.L10:
	movslq	12(%rsp), %rdx
	xorl	%r13d, %r13d
	cmpb	$42, %al
	sete	%r13b
	movq	%rdx, %rcx
	movb	%al, 112(%rsp,%rdx)
	addl	$1, %ecx
	movl	%ecx, 12(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$1, %dl
	jbe	.L10
	subl	$48, %eax
	imull	%eax, %r12d
.L9:
	movslq	%ebp, %rdx
	addl	$1, %ebp
	movl	%eax, 32(%rsp,%rdx,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L41:
	subl	$48, %eax
	addl	%eax, %r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%ebp, %ebp
	je	.L14
	leal	-1(%rbp), %ecx
	leaq	112(%rsp), %rdx
	leaq	32(%rsp), %rax
	leaq	36(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	cmpb	$42, (%rdx)
	jne	.L12
	movl	4(%rax), %ecx
	imull	(%rax), %ecx
	movl	$0, (%rax)
	movl	%ecx, 4(%rax)
.L12:
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L13
.L14:
	leal	1(%rbx), %edx
	cmpl	$2, %ebx
	jle	.L21
	movl	%edx, %eax
	movdqa	32(%rsp), %xmm0
	shrl	$2, %eax
	cmpl	$1, %eax
	je	.L6
	paddd	48(%rsp), %xmm0
	cmpl	$2, %eax
	je	.L6
	paddd	64(%rsp), %xmm0
	cmpl	$3, %eax
	je	.L6
	paddd	80(%rsp), %xmm0
	cmpl	$4, %eax
	je	.L6
	paddd	96(%rsp), %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebp
	je	.L15
.L5:
	movslq	%eax, %rdx
	addl	32(%rsp,%rdx,4), %ebp
	leal	1(%rax), %edx
	cmpl	%edx, %ebx
	jl	.L15
	movslq	%edx, %rdx
	addl	$2, %eax
	addl	32(%rsp,%rdx,4), %ebp
	cmpl	%eax, %ebx
	jl	.L15
	cltq
	addl	32(%rsp,%rax,4), %ebp
.L15:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	cmpl	%ebp, %eax
	je	.L42
	cmpl	%r12d, %eax
	je	.L43
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L18:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
.L43:
	.cfi_restore_state
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L42:
	cmpl	%r12d, %ebp
	je	.L45
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L21:
	xorl	%ebp, %ebp
	xorl	%eax, %eax
	jmp	.L5
.L45:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L44:
	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	"%c"
.LC1:
	.string	"%d"
.LC2:
	.string	"U"
.LC3:
	.string	"M"
.LC4:
	.string	"L"
.LC5:
	.string	"I"
	.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
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	movl	$0, 12(%rsp)
	leaq	27(%rsp), %r15
	movl	$0, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movsbl	27(%rsp), %eax
	cmpb	$10, %al
	je	.L40
	addl	$1, %ebx
	leal	-42(%rax), %edx
	testl	%r13d, %r13d
	jne	.L8
	cmpb	$1, %dl
	ja	.L41
.L10:
	movslq	12(%rsp), %rdx
	xorl	%r13d, %r13d
	cmpb	$42, %al
	sete	%r13b
	movq	%rdx, %rcx
	movb	%al, 112(%rsp,%rdx)
	addl	$1, %ecx
	movl	%ecx, 12(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$1, %dl
	jbe	.L10
	subl	$48, %eax
	imull	%eax, %r12d
.L9:
	movslq	%ebp, %rdx
	addl	$1, %ebp
	movl	%eax, 32(%rsp,%rdx,4)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L41:
	subl	$48, %eax
	addl	%eax, %r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L40:
	testl	%ebp, %ebp
	je	.L14
	leal	-1(%rbp), %ecx
	leaq	112(%rsp), %rdx
	leaq	32(%rsp), %rax
	leaq	36(%rsp,%rcx,4), %rsi
	.p2align 4,,10
	.p2align 3
.L13:
	cmpb	$42, (%rdx)
	jne	.L12
	movl	4(%rax), %ecx
	imull	(%rax), %ecx
	movl	$0, (%rax)
	movl	%ecx, 4(%rax)
.L12:
	addq	$4, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	jne	.L13
.L14:
	leal	1(%rbx), %edx
	cmpl	$2, %ebx
	jle	.L21
	movl	%edx, %eax
	movdqa	32(%rsp), %xmm0
	shrl	$2, %eax
	cmpl	$1, %eax
	je	.L6
	paddd	48(%rsp), %xmm0
	cmpl	$2, %eax
	je	.L6
	paddd	64(%rsp), %xmm0
	cmpl	$3, %eax
	je	.L6
	paddd	80(%rsp), %xmm0
	cmpl	$4, %eax
	je	.L6
	paddd	96(%rsp), %xmm0
.L6:
	movdqa	%xmm0, %xmm1
	movl	%edx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	andl	$3, %edx
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %ebp
	je	.L15
.L5:
	movslq	%eax, %rdx
	addl	32(%rsp,%rdx,4), %ebp
	leal	1(%rax), %edx
	cmpl	%edx, %ebx
	jl	.L15
	movslq	%edx, %rdx
	addl	$2, %eax
	addl	32(%rsp,%rdx,4), %ebp
	cmpl	%eax, %ebx
	jl	.L15
	cltq
	addl	32(%rsp,%rax,4), %ebp
.L15:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	cmpl	%ebp, %eax
	je	.L42
	cmpl	%r12d, %eax
	je	.L43
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
.L18:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L44
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	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
.L43:
	.cfi_restore_state
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L42:
	cmpl	%r12d, %ebp
	je	.L45
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L21:
	xorl	%ebp, %ebp
	xorl	%eax, %eax
	jmp	.L5
.L45:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
.L44:
	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(void){
	char ope[20]={0},x;
	int num[20]={0},ltr=0,i=0,j=0,mode=0,bob,cnt=0,ans=0;
	while(1){
		scanf("%c",&x);
		if(x=='\n'){
			break;
		}
		cnt++;
		if(mode==0&&x!='*'&&x!='+'){
			ltr+=x-48;
		}
		else if(x!='*'&&x!='+'){
			ltr=ltr*(x-48);
		}
		if(x=='*'||x=='+'){
			ope[i]=x;
			if(x=='*'){
				mode=1;
			}
			else{
				mode=0;
			}
			i++;
		}
		else{
			num[j]=x-48;
			j++;
		}
	}
	i=0;
	while(i<j){
		if(ope[i]=='*'){
			num[i+1]=num[i+1]*num[i];
			num[i]=0;
		}
		i++;
	}
	for(i=0;i<=cnt;i++){
		ans+=num[i];
	}
	scanf("%d",&bob);
	if(bob==ans&&bob==ltr){
		printf("U\n");
	}
	else if(bob==ans){
		printf("M\n");
	}
	else if(bob==ltr){
		printf("L\n");
	}
	else{
		printf("I\n");
	}
	return 0;
}
1+2*3+4
9
 0+1*3+4
7
 4+3*0+4
8
 3*1+0*4
12
 1+2*3+4
7
 0+2*3+4
7
 1+2+3+4
11
 0+2*3+4
9
 1+2*3+4
14
 4+3+2+1
11

I
 U
 M
 L
 I
 I
 I
 I
 I
 I

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(void){
	char ope[20]={0},x;
	int num[20]={0},ltr=0,i=0,j=0,mode=0,bob,cnt=0,ans=0;
	while(1){
		scanf("%c",&x);
		if(x=='\n'){
			break;
		}
		cnt++;
		if(mode==0&&x!='*'&&x!='+'){
			ltr+=x-48;
		}
		else if(x!='*'&&x!='+'){
			ltr=ltr*(x-48);
		}
		if(x=='*'||x=='+'){
			ope[i]=x;
			if(x=='*'){
				mode=1;
			}
			else{
				mode=0;
			}
			i++;
		}
		else{
			num[j]=x-48;
			j++;
		}
	}
	i=0;
	while(i<j){
		if(ope[i]=='*'){
			num[i+1]=num[i+1]*num[i];
			num[i]=0;
		}
		i++;
	}
	for(i=0;i<=cnt;i++){
		ans+=num[i];
	}
	scanf("%d",&bob);
	if(bob==ans&&bob==ltr){
		printf("U\n");
	}
	else if(bob==ans){
		printf("M\n");
	}
	else if(bob==ltr){
		printf("L\n");
	}
	else{
		printf("I\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%c"
.LC1:
	.string	"%d"
.LC2:
	.string	"U"
.LC3:
	.string	"M"
.LC4:
	.string	"L"
.LC5:
	.string	"I"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
.L11:
	leaq	-141(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-141(%rbp), %eax
	cmpb	$10, %al
	je	.L24
	addl	$1, -120(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -136(%rbp)
	jmp	.L5
.L4:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-136(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -136(%rbp)
.L5:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L6
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	jne	.L7
.L6:
	movzbl	-141(%rbp), %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$1, -124(%rbp)
	jmp	.L9
.L8:
	movl	$0, -124(%rbp)
.L9:
	addl	$1, -132(%rbp)
	jmp	.L10
.L7:
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-128(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	addl	$1, -128(%rbp)
.L10:
	jmp	.L11
.L24:
	nop
	movl	$0, -132(%rbp)
	jmp	.L12
.L14:
	movl	-132(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$42, %al
	jne	.L13
	movl	-132(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	-132(%rbp), %ecx
	addl	$1, %ecx
	imull	%eax, %edx
	movslq	%ecx, %rax
	movl	%edx, -112(%rbp,%rax,4)
	movl	-132(%rbp), %eax
	cltq
	movl	$0, -112(%rbp,%rax,4)
.L13:
	addl	$1, -132(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	-128(%rbp), %eax
	jl	.L14
	movl	$0, -132(%rbp)
	jmp	.L15
.L16:
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	addl	%eax, -116(%rbp)
	addl	$1, -132(%rbp)
.L15:
	movl	-132(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L16
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L17
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L19:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L20
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"%c"
.LC1:
	.string	"%d"
.LC2:
	.string	"U"
.LC3:
	.string	"M"
.LC4:
	.string	"L"
.LC5:
	.string	"I"
	.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	$144, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -88(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$0, -136(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
.L11:
	leaq	-141(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-141(%rbp), %eax
	cmpb	$10, %al
	je	.L24
	addl	$1, -120(%rbp)
	cmpl	$0, -124(%rbp)
	jne	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L4
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	addl	%eax, -136(%rbp)
	jmp	.L5
.L4:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	je	.L5
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-136(%rbp), %eax
	imull	%edx, %eax
	movl	%eax, -136(%rbp)
.L5:
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	je	.L6
	movzbl	-141(%rbp), %eax
	cmpb	$43, %al
	jne	.L7
.L6:
	movzbl	-141(%rbp), %edx
	movl	-132(%rbp), %eax
	cltq
	movb	%dl, -32(%rbp,%rax)
	movzbl	-141(%rbp), %eax
	cmpb	$42, %al
	jne	.L8
	movl	$1, -124(%rbp)
	jmp	.L9
.L8:
	movl	$0, -124(%rbp)
.L9:
	addl	$1, -132(%rbp)
	jmp	.L10
.L7:
	movzbl	-141(%rbp), %eax
	movsbl	%al, %eax
	leal	-48(%rax), %edx
	movl	-128(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	addl	$1, -128(%rbp)
.L10:
	jmp	.L11
.L24:
	nop
	movl	$0, -132(%rbp)
	jmp	.L12
.L14:
	movl	-132(%rbp), %eax
	cltq
	movzbl	-32(%rbp,%rax), %eax
	cmpb	$42, %al
	jne	.L13
	movl	-132(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	-132(%rbp), %ecx
	addl	$1, %ecx
	imull	%eax, %edx
	movslq	%ecx, %rax
	movl	%edx, -112(%rbp,%rax,4)
	movl	-132(%rbp), %eax
	cltq
	movl	$0, -112(%rbp,%rax,4)
.L13:
	addl	$1, -132(%rbp)
.L12:
	movl	-132(%rbp), %eax
	cmpl	-128(%rbp), %eax
	jl	.L14
	movl	$0, -132(%rbp)
	jmp	.L15
.L16:
	movl	-132(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	addl	%eax, -116(%rbp)
	addl	$1, -132(%rbp)
.L15:
	movl	-132(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jle	.L16
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L17
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L17
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L17:
	movl	-140(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jne	.L19
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L19:
	movl	-140(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jne	.L20
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L18
.L20:
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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:
