Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
struct tbl_t {
	int c;
	int l;
	unsigned char b; // LSB aligned
} tbl[]= {
	{'A', 6, 0x25},
	{'B', 8, 0x9a},
	{'C', 4, 0x05},
	{'D', 4, 0x01},
	{'E', 3, 0x06},
	{'F', 5, 0x09},
	{'G', 8, 0x9b},
	{'H', 6, 0x10},
	{'I', 4, 0x07},
	{'J', 8, 0x98},
	{'K', 4, 0x06},
	{'L', 5, 0x04},
	{'M', 8, 0x99},
	{'N', 8, 0x9e},
	{'O', 5, 0x05},
	{'P', 3, 0x07},
	{'Q', 8, 0x9f},
	{'R', 4, 0x08},
	{'S', 5, 0x06},
	{'T', 5, 0x07},
	{'U', 8, 0x9c},
	{'V', 8, 0x9d},
	{'W', 6, 0x02},
	{'X', 8, 0x92},
	{'Y', 8, 0x93},
	{'Z', 8, 0x90},
	{' ', 3, 0x05},
	{'.', 6, 0x11},
	{',', 6, 0x03},
	{'-', 8, 0x91},
	{'\'',6, 0x00},
	{'?', 6, 0x01},
};
c,b,l,i,r,f;
main(){
	for(;c=getchar(),c+1;){
		for(i=0;i<32;i++){
			r=l-tbl[i].l;
			if(r>=0&&b>>r==tbl[i].b){
				putchar(tbl[i].c);
				b&=(1<<r)-1;
				l-=tbl[i].l;
				i=-1;
			}
		}
		if(c=='\n'){
			putchar(c);
			b=l=0;
		}else{
			for(i=0;i<32;i++)
				if(tbl[i].c==c){
					b=b<<5|i;
					l+=5;
				}
		}
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 384
tbl:
	.long	65
	.long	6
	.byte	37
	.zero	3
	.long	66
	.long	8
	.byte	-102
	.zero	3
	.long	67
	.long	4
	.byte	5
	.zero	3
	.long	68
	.long	4
	.byte	1
	.zero	3
	.long	69
	.long	3
	.byte	6
	.zero	3
	.long	70
	.long	5
	.byte	9
	.zero	3
	.long	71
	.long	8
	.byte	-101
	.zero	3
	.long	72
	.long	6
	.byte	16
	.zero	3
	.long	73
	.long	4
	.byte	7
	.zero	3
	.long	74
	.long	8
	.byte	-104
	.zero	3
	.long	75
	.long	4
	.byte	6
	.zero	3
	.long	76
	.long	5
	.byte	4
	.zero	3
	.long	77
	.long	8
	.byte	-103
	.zero	3
	.long	78
	.long	8
	.byte	-98
	.zero	3
	.long	79
	.long	5
	.byte	5
	.zero	3
	.long	80
	.long	3
	.byte	7
	.zero	3
	.long	81
	.long	8
	.byte	-97
	.zero	3
	.long	82
	.long	4
	.byte	8
	.zero	3
	.long	83
	.long	5
	.byte	6
	.zero	3
	.long	84
	.long	5
	.byte	7
	.zero	3
	.long	85
	.long	8
	.byte	-100
	.zero	3
	.long	86
	.long	8
	.byte	-99
	.zero	3
	.long	87
	.long	6
	.byte	2
	.zero	3
	.long	88
	.long	8
	.byte	-110
	.zero	3
	.long	89
	.long	8
	.byte	-109
	.zero	3
	.long	90
	.long	8
	.byte	-112
	.zero	3
	.long	32
	.long	3
	.byte	5
	.zero	3
	.long	46
	.long	6
	.byte	17
	.zero	3
	.long	44
	.long	6
	.byte	3
	.zero	3
	.long	45
	.long	8
	.byte	-111
	.zero	3
	.long	39
	.long	6
	.byte	0
	.zero	3
	.long	63
	.long	6
	.byte	1
	.zero	3
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.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
	jmp	.L2
.L10:
	movl	$0, i(%rip)
	jmp	.L3
.L5:
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, r(%rip)
	movl	r(%rip), %eax
	testl	%eax, %eax
	js	.L4
	movl	b(%rip), %edx
	movl	r(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+tbl(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movzbl	%al, %eax
	cmpl	%eax, %ecx
	jne	.L4
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	r(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	b(%rip), %eax
	andl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, l(%rip)
	movl	$-1, i(%rip)
.L4:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$10, %eax
	jne	.L6
	movl	c(%rip), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, b(%rip)
	jmp	.L2
.L6:
	movl	$0, i(%rip)
	jmp	.L7
.L9:
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	b(%rip), %eax
	sall	$5, %eax
	movl	%eax, %edx
	movl	i(%rip), %eax
	orl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %eax
	addl	$5, %eax
	movl	%eax, l(%rip)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L9
.L2:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	tbl(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	$1, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	call	getchar@PLT
	movl	%eax, c(%rip)
	cmpl	$-1, %eax
	je	.L21
	movl	$0, i(%rip)
	movl	l(%rip), %esi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%eax, %rdx
	movl	%esi, %ecx
	leaq	(%rdx,%rdx,2), %rdx
	leaq	0(%rbp,%rdx,4), %rdx
	subl	4(%rdx), %ecx
	movl	%ecx, r(%rip)
	js	.L19
	movl	b(%rip), %edi
	sarl	%cl, %edi
	movl	%edi, %ecx
	movzbl	8(%rdx), %edi
	cmpl	%edi, %ecx
	je	.L5
.L19:
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	$31, %eax
	jle	.L8
	movl	c(%rip), %edi
	cmpl	$10, %edi
	je	.L22
	movl	b(%rip), %ecx
	leaq	tbl(%rip), %rdx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	(%rdx), %edi
	jne	.L11
	sall	$5, %ecx
	addl	$5, %esi
	movl	$1, %r8d
	orl	%eax, %ecx
.L11:
	addq	$1, %rax
	addq	$12, %rdx
	cmpq	$32, %rax
	jne	.L12
	movl	$32, i(%rip)
	testb	%r8b, %r8b
	je	.L2
	movl	%esi, l(%rip)
	movl	%ecx, b(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rdx), %edi
	call	putchar@PLT
	movl	r(%rip), %ecx
	movl	%ebx, %eax
	movl	l(%rip), %esi
	sall	%cl, %eax
	subl	$1, %eax
	andl	%eax, b(%rip)
	movslq	i(%rip), %rax
	movl	$0, i(%rip)
	leaq	(%rax,%rax,2), %rax
	subl	4(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	movl	%esi, l(%rip)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	call	putchar@PLT
	movl	$0, l(%rip)
	movl	$0, b(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	f
	.bss
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 384
tbl:
	.long	65
	.long	6
	.byte	37
	.zero	3
	.long	66
	.long	8
	.byte	-102
	.zero	3
	.long	67
	.long	4
	.byte	5
	.zero	3
	.long	68
	.long	4
	.byte	1
	.zero	3
	.long	69
	.long	3
	.byte	6
	.zero	3
	.long	70
	.long	5
	.byte	9
	.zero	3
	.long	71
	.long	8
	.byte	-101
	.zero	3
	.long	72
	.long	6
	.byte	16
	.zero	3
	.long	73
	.long	4
	.byte	7
	.zero	3
	.long	74
	.long	8
	.byte	-104
	.zero	3
	.long	75
	.long	4
	.byte	6
	.zero	3
	.long	76
	.long	5
	.byte	4
	.zero	3
	.long	77
	.long	8
	.byte	-103
	.zero	3
	.long	78
	.long	8
	.byte	-98
	.zero	3
	.long	79
	.long	5
	.byte	5
	.zero	3
	.long	80
	.long	3
	.byte	7
	.zero	3
	.long	81
	.long	8
	.byte	-97
	.zero	3
	.long	82
	.long	4
	.byte	8
	.zero	3
	.long	83
	.long	5
	.byte	6
	.zero	3
	.long	84
	.long	5
	.byte	7
	.zero	3
	.long	85
	.long	8
	.byte	-100
	.zero	3
	.long	86
	.long	8
	.byte	-99
	.zero	3
	.long	87
	.long	6
	.byte	2
	.zero	3
	.long	88
	.long	8
	.byte	-110
	.zero	3
	.long	89
	.long	8
	.byte	-109
	.zero	3
	.long	90
	.long	8
	.byte	-112
	.zero	3
	.long	32
	.long	3
	.byte	5
	.zero	3
	.long	46
	.long	6
	.byte	17
	.zero	3
	.long	44
	.long	6
	.byte	3
	.zero	3
	.long	45
	.long	8
	.byte	-111
	.zero	3
	.long	39
	.long	6
	.byte	0
	.zero	3
	.long	63
	.long	6
	.byte	1
	.zero	3
	.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	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	tbl(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	$1, %ebx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	call	getchar@PLT
	movl	%eax, c(%rip)
	cmpl	$-1, %eax
	je	.L21
	movl	$0, i(%rip)
	movl	l(%rip), %esi
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movslq	%eax, %rdx
	movl	%esi, %ecx
	leaq	(%rdx,%rdx,2), %rdx
	leaq	0(%rbp,%rdx,4), %rdx
	subl	4(%rdx), %ecx
	movl	%ecx, r(%rip)
	js	.L19
	movl	b(%rip), %edi
	sarl	%cl, %edi
	movl	%edi, %ecx
	movzbl	8(%rdx), %edi
	cmpl	%edi, %ecx
	je	.L5
.L19:
	addl	$1, %eax
	movl	%eax, i(%rip)
	cmpl	$31, %eax
	jle	.L8
	movl	c(%rip), %edi
	cmpl	$10, %edi
	je	.L22
	movl	b(%rip), %ecx
	leaq	tbl(%rip), %rdx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	(%rdx), %edi
	jne	.L11
	sall	$5, %ecx
	addl	$5, %esi
	movl	$1, %r8d
	orl	%eax, %ecx
.L11:
	addq	$1, %rax
	addq	$12, %rdx
	cmpq	$32, %rax
	jne	.L12
	movl	$32, i(%rip)
	testb	%r8b, %r8b
	je	.L2
	movl	%esi, l(%rip)
	movl	%ecx, b(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%rdx), %edi
	call	putchar@PLT
	movl	r(%rip), %ecx
	movl	%ebx, %eax
	movl	l(%rip), %esi
	sall	%cl, %eax
	subl	$1, %eax
	andl	%eax, b(%rip)
	movslq	i(%rip), %rax
	movl	$0, i(%rip)
	leaq	(%rax,%rax,2), %rax
	subl	4(%rbp,%rax,4), %esi
	xorl	%eax, %eax
	movl	%esi, l(%rip)
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	call	putchar@PLT
	movl	$0, l(%rip)
	movl	$0, b(%rip)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	f
	.bss
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	c
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 384
tbl:
	.long	65
	.long	6
	.byte	37
	.zero	3
	.long	66
	.long	8
	.byte	-102
	.zero	3
	.long	67
	.long	4
	.byte	5
	.zero	3
	.long	68
	.long	4
	.byte	1
	.zero	3
	.long	69
	.long	3
	.byte	6
	.zero	3
	.long	70
	.long	5
	.byte	9
	.zero	3
	.long	71
	.long	8
	.byte	-101
	.zero	3
	.long	72
	.long	6
	.byte	16
	.zero	3
	.long	73
	.long	4
	.byte	7
	.zero	3
	.long	74
	.long	8
	.byte	-104
	.zero	3
	.long	75
	.long	4
	.byte	6
	.zero	3
	.long	76
	.long	5
	.byte	4
	.zero	3
	.long	77
	.long	8
	.byte	-103
	.zero	3
	.long	78
	.long	8
	.byte	-98
	.zero	3
	.long	79
	.long	5
	.byte	5
	.zero	3
	.long	80
	.long	3
	.byte	7
	.zero	3
	.long	81
	.long	8
	.byte	-97
	.zero	3
	.long	82
	.long	4
	.byte	8
	.zero	3
	.long	83
	.long	5
	.byte	6
	.zero	3
	.long	84
	.long	5
	.byte	7
	.zero	3
	.long	85
	.long	8
	.byte	-100
	.zero	3
	.long	86
	.long	8
	.byte	-99
	.zero	3
	.long	87
	.long	6
	.byte	2
	.zero	3
	.long	88
	.long	8
	.byte	-110
	.zero	3
	.long	89
	.long	8
	.byte	-109
	.zero	3
	.long	90
	.long	8
	.byte	-112
	.zero	3
	.long	32
	.long	3
	.byte	5
	.zero	3
	.long	46
	.long	6
	.byte	17
	.zero	3
	.long	44
	.long	6
	.byte	3
	.zero	3
	.long	45
	.long	8
	.byte	-111
	.zero	3
	.long	39
	.long	6
	.byte	0
	.zero	3
	.long	63
	.long	6
	.byte	1
	.zero	3
	.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:

struct tbl_t {
	int c;
	int l;
	unsigned char b; // LSB aligned
} tbl[]= {
	{'A', 6, 0x25},
	{'B', 8, 0x9a},
	{'C', 4, 0x05},
	{'D', 4, 0x01},
	{'E', 3, 0x06},
	{'F', 5, 0x09},
	{'G', 8, 0x9b},
	{'H', 6, 0x10},
	{'I', 4, 0x07},
	{'J', 8, 0x98},
	{'K', 4, 0x06},
	{'L', 5, 0x04},
	{'M', 8, 0x99},
	{'N', 8, 0x9e},
	{'O', 5, 0x05},
	{'P', 3, 0x07},
	{'Q', 8, 0x9f},
	{'R', 4, 0x08},
	{'S', 5, 0x06},
	{'T', 5, 0x07},
	{'U', 8, 0x9c},
	{'V', 8, 0x9d},
	{'W', 6, 0x02},
	{'X', 8, 0x92},
	{'Y', 8, 0x93},
	{'Z', 8, 0x90},
	{' ', 3, 0x05},
	{'.', 6, 0x11},
	{',', 6, 0x03},
	{'-', 8, 0x91},
	{'\'',6, 0x00},
	{'?', 6, 0x01},
};
c,b,l,i,r,f;
main(){
	for(;c=getchar(),c+1;){
		for(i=0;i<32;i++){
			r=l-tbl[i].l;
			if(r>=0&&b>>r==tbl[i].b){
				putchar(tbl[i].c);
				b&=(1<<r)-1;
				l-=tbl[i].l;
				i=-1;
			}
		}
		if(c=='\n'){
			putchar(c);
			b=l=0;
		}else{
			for(i=0;i<32;i++)
				if(tbl[i].c==c){
					b=b<<5|i;
					l+=5;
				}
		}
	}
	exit(0);
}
?D-C'KOQUA
 ?D-B'KOQUA
 AUQOK'B-D?
 -UQOK'BAD?
 -UQOK'BBD?
 -UQNK'BBD?
 ?DBB'KNQU-
 .UQNK'BBD?
 .UPNK'BBD?
 .UPNK'BCD?

PETER POTH '
 PETERIECTH '
 ?F?ECIRT DPP
 PKZIOIRL'PP
 PKZIOIRLLIP
 PKZK CP?WTP
 PESD,POSEDFE
 EPF? CIRLLIP
 EP.PK CP?WTP
 EP.PK CP?D,P

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
struct tbl_t {
	int c;
	int l;
	unsigned char b; // LSB aligned
} tbl[]= {
	{'A', 6, 0x25},
	{'B', 8, 0x9a},
	{'C', 4, 0x05},
	{'D', 4, 0x01},
	{'E', 3, 0x06},
	{'F', 5, 0x09},
	{'G', 8, 0x9b},
	{'H', 6, 0x10},
	{'I', 4, 0x07},
	{'J', 8, 0x98},
	{'K', 4, 0x06},
	{'L', 5, 0x04},
	{'M', 8, 0x99},
	{'N', 8, 0x9e},
	{'O', 5, 0x05},
	{'P', 3, 0x07},
	{'Q', 8, 0x9f},
	{'R', 4, 0x08},
	{'S', 5, 0x06},
	{'T', 5, 0x07},
	{'U', 8, 0x9c},
	{'V', 8, 0x9d},
	{'W', 6, 0x02},
	{'X', 8, 0x92},
	{'Y', 8, 0x93},
	{'Z', 8, 0x90},
	{' ', 3, 0x05},
	{'.', 6, 0x11},
	{',', 6, 0x03},
	{'-', 8, 0x91},
	{'\'',6, 0x00},
	{'?', 6, 0x01},
};
c,b,l,i,r,f;
main(){
	for(;c=getchar(),c+1;){
		for(i=0;i<32;i++){
			r=l-tbl[i].l;
			if(r>=0&&b>>r==tbl[i].b){
				putchar(tbl[i].c);
				b&=(1<<r)-1;
				l-=tbl[i].l;
				i=-1;
			}
		}
		if(c=='\n'){
			putchar(c);
			b=l=0;
		}else{
			for(i=0;i<32;i++)
				if(tbl[i].c==c){
					b=b<<5|i;
					l+=5;
				}
		}
	}
	exit(0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 384
tbl:
	.long	65
	.long	6
	.byte	37
	.zero	3
	.long	66
	.long	8
	.byte	-102
	.zero	3
	.long	67
	.long	4
	.byte	5
	.zero	3
	.long	68
	.long	4
	.byte	1
	.zero	3
	.long	69
	.long	3
	.byte	6
	.zero	3
	.long	70
	.long	5
	.byte	9
	.zero	3
	.long	71
	.long	8
	.byte	-101
	.zero	3
	.long	72
	.long	6
	.byte	16
	.zero	3
	.long	73
	.long	4
	.byte	7
	.zero	3
	.long	74
	.long	8
	.byte	-104
	.zero	3
	.long	75
	.long	4
	.byte	6
	.zero	3
	.long	76
	.long	5
	.byte	4
	.zero	3
	.long	77
	.long	8
	.byte	-103
	.zero	3
	.long	78
	.long	8
	.byte	-98
	.zero	3
	.long	79
	.long	5
	.byte	5
	.zero	3
	.long	80
	.long	3
	.byte	7
	.zero	3
	.long	81
	.long	8
	.byte	-97
	.zero	3
	.long	82
	.long	4
	.byte	8
	.zero	3
	.long	83
	.long	5
	.byte	6
	.zero	3
	.long	84
	.long	5
	.byte	7
	.zero	3
	.long	85
	.long	8
	.byte	-100
	.zero	3
	.long	86
	.long	8
	.byte	-99
	.zero	3
	.long	87
	.long	6
	.byte	2
	.zero	3
	.long	88
	.long	8
	.byte	-110
	.zero	3
	.long	89
	.long	8
	.byte	-109
	.zero	3
	.long	90
	.long	8
	.byte	-112
	.zero	3
	.long	32
	.long	3
	.byte	5
	.zero	3
	.long	46
	.long	6
	.byte	17
	.zero	3
	.long	44
	.long	6
	.byte	3
	.zero	3
	.long	45
	.long	8
	.byte	-111
	.zero	3
	.long	39
	.long	6
	.byte	0
	.zero	3
	.long	63
	.long	6
	.byte	1
	.zero	3
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.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
	jmp	.L2
.L10:
	movl	$0, i(%rip)
	jmp	.L3
.L5:
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, r(%rip)
	movl	r(%rip), %eax
	testl	%eax, %eax
	js	.L4
	movl	b(%rip), %edx
	movl	r(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+tbl(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movzbl	%al, %eax
	cmpl	%eax, %ecx
	jne	.L4
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	r(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	b(%rip), %eax
	andl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, l(%rip)
	movl	$-1, i(%rip)
.L4:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$10, %eax
	jne	.L6
	movl	c(%rip), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, b(%rip)
	jmp	.L2
.L6:
	movl	$0, i(%rip)
	jmp	.L7
.L9:
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	b(%rip), %eax
	sall	$5, %eax
	movl	%eax, %edx
	movl	i(%rip), %eax
	orl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %eax
	addl	$5, %eax
	movl	%eax, l(%rip)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L9
.L2:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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
	.globl	tbl
	.data
	.align 32
	.type	tbl, @object
	.size	tbl, 384
tbl:
	.long	65
	.long	6
	.byte	37
	.zero	3
	.long	66
	.long	8
	.byte	-102
	.zero	3
	.long	67
	.long	4
	.byte	5
	.zero	3
	.long	68
	.long	4
	.byte	1
	.zero	3
	.long	69
	.long	3
	.byte	6
	.zero	3
	.long	70
	.long	5
	.byte	9
	.zero	3
	.long	71
	.long	8
	.byte	-101
	.zero	3
	.long	72
	.long	6
	.byte	16
	.zero	3
	.long	73
	.long	4
	.byte	7
	.zero	3
	.long	74
	.long	8
	.byte	-104
	.zero	3
	.long	75
	.long	4
	.byte	6
	.zero	3
	.long	76
	.long	5
	.byte	4
	.zero	3
	.long	77
	.long	8
	.byte	-103
	.zero	3
	.long	78
	.long	8
	.byte	-98
	.zero	3
	.long	79
	.long	5
	.byte	5
	.zero	3
	.long	80
	.long	3
	.byte	7
	.zero	3
	.long	81
	.long	8
	.byte	-97
	.zero	3
	.long	82
	.long	4
	.byte	8
	.zero	3
	.long	83
	.long	5
	.byte	6
	.zero	3
	.long	84
	.long	5
	.byte	7
	.zero	3
	.long	85
	.long	8
	.byte	-100
	.zero	3
	.long	86
	.long	8
	.byte	-99
	.zero	3
	.long	87
	.long	6
	.byte	2
	.zero	3
	.long	88
	.long	8
	.byte	-110
	.zero	3
	.long	89
	.long	8
	.byte	-109
	.zero	3
	.long	90
	.long	8
	.byte	-112
	.zero	3
	.long	32
	.long	3
	.byte	5
	.zero	3
	.long	46
	.long	6
	.byte	17
	.zero	3
	.long	44
	.long	6
	.byte	3
	.zero	3
	.long	45
	.long	8
	.byte	-111
	.zero	3
	.long	39
	.long	6
	.byte	0
	.zero	3
	.long	63
	.long	6
	.byte	1
	.zero	3
	.globl	c
	.bss
	.align 4
	.type	c, @object
	.size	c, 4
c:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	r
	.align 4
	.type	r, @object
	.size	r, 4
r:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.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
	jmp	.L2
.L10:
	movl	$0, i(%rip)
	jmp	.L3
.L5:
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, r(%rip)
	movl	r(%rip), %eax
	testl	%eax, %eax
	js	.L4
	movl	b(%rip), %edx
	movl	r(%rip), %eax
	movl	%eax, %ecx
	sarl	%cl, %edx
	movl	%edx, %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+tbl(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movzbl	%al, %eax
	cmpl	%eax, %ecx
	jne	.L4
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	r(%rip), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	leal	-1(%rax), %edx
	movl	b(%rip), %eax
	andl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %ecx
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, l(%rip)
	movl	$-1, i(%rip)
.L4:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L5
	movl	c(%rip), %eax
	cmpl	$10, %eax
	jne	.L6
	movl	c(%rip), %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, b(%rip)
	jmp	.L2
.L6:
	movl	$0, i(%rip)
	jmp	.L7
.L9:
	movl	i(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	tbl(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	c(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	b(%rip), %eax
	sall	$5, %eax
	movl	%eax, %edx
	movl	i(%rip), %eax
	orl	%edx, %eax
	movl	%eax, b(%rip)
	movl	l(%rip), %eax
	addl	$5, %eax
	movl	%eax, l(%rip)
.L8:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$31, %eax
	jle	.L9
.L2:
	movl	$0, %eax
	call	getchar@PLT
	movl	%eax, c(%rip)
	movl	c(%rip), %eax
	cmpl	$-1, %eax
	jne	.L10
	movl	$0, %edi
	call	exit@PLT
	.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:
