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

```c
// AOJ 2614: Almost Same Substring
// 2017.12.31 bal4u@uu

#include <stdio.h>
#include <string.h>

int slen, tlen, diff;
char s[300005];
char t[300005];
int zf[600005];
int zr[600005];
char buf[600005];

void Zalgo(int *z, char *s, int n)
{
	int i, j, k;

	z[0] = n;
    i = 1, j = 0;
    while (i < n) {
		while (i+j < n && s[j] == s[i+j]) ++j;
        z[i] = j;
        if (j == 0) { ++i; continue;}
        k = 1;
        while (i+k < n && k+z[k] < j) z[i+k] = z[k], ++k;
        i += k; j -= k;
    }
}

int main()
{
	int i, w, ans;
	char *p, *q;

	fgets(s, sizeof(s), stdin);
	slen = strlen(s)-1;
	if (*(s+slen) < ' ') *(s+slen) = 0;	else slen++;
	fgets(t, sizeof(t), stdin);
	tlen = strlen(t)-1;
	if (*(t+tlen) < ' ') *(t+tlen) = 0;	else tlen++;

	memcpy(buf, t, tlen);
	memcpy(buf+tlen, s, slen);
	Zalgo(zf, buf, slen+tlen+1);

	p = buf, q = t+tlen;
	while (q > t) *p++ = *--q;
	q = s+slen;
	while (q > s) *p++ = *--q;
	Zalgo(zr, buf, slen+tlen+1);

	ans = 0, w = tlen-1;
	for (i = tlen; i <= slen; i++) {
		ans += (zf[i]+ zr[slen+tlen-i] == w);
	}
	printf("%d\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	slen
	.bss
	.align 4
	.type	slen, @object
	.size	slen, 4
slen:
	.zero	4
	.globl	tlen
	.align 4
	.type	tlen, @object
	.size	tlen, 4
tlen:
	.zero	4
	.globl	diff
	.align 4
	.type	diff, @object
	.size	diff, 4
diff:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 300005
s:
	.zero	300005
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 300005
t:
	.zero	300005
	.globl	zf
	.align 32
	.type	zf, @object
	.size	zf, 2400020
zf:
	.zero	2400020
	.globl	zr
	.align 32
	.type	zr, @object
	.size	zr, 2400020
zr:
	.zero	2400020
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 600005
buf:
	.zero	600005
	.text
	.globl	Zalgo
	.type	Zalgo, @function
Zalgo:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movl	$1, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -8(%rbp)
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L2
.L6:
	movl	$1, -4(%rbp)
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L7:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jg	.L9
.L8:
	movl	-4(%rbp), %eax
	addl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Zalgo, .-Zalgo
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, slen(%rip)
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L12
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L13
.L12:
	movl	slen(%rip), %eax
	addl	$1, %eax
	movl	%eax, slen(%rip)
.L13:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, tlen(%rip)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L14
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L15
.L14:
	movl	tlen(%rip), %eax
	addl	$1, %eax
	movl	%eax, tlen(%rip)
.L15:
	movl	tlen(%rip), %eax
	cltq
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %eax
	cltq
	movl	tlen(%rip), %edx
	movslq	%edx, %rdx
	leaq	buf(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zf(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	leaq	buf(%rip), %rax
	movq	%rax, -16(%rbp)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L16
.L17:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L16:
	leaq	t(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L17
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L18
.L19:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L18:
	leaq	s(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L19
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zr(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	movl	$0, -24(%rbp)
	movl	tlen(%rip), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	tlen(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L20
.L21:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zf(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zr(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cmpl	%eax, -20(%rbp)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L20:
	movl	slen(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	Zalgo
	.type	Zalgo, @function
Zalgo:
.LFB35:
	.cfi_startproc
	endbr64
	movq	%rdi, %r9
	movl	%edx, %edi
	movl	%edx, (%r9)
	cmpl	$1, %edx
	jle	.L21
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %r10
	xorl	%edx, %edx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L2:
	leal	(%rsi,%rdx), %r8d
	cmpl	%r8d, %edi
	jle	.L4
	movslq	%edx, %r11
	movslq	%r8d, %r8
	leaq	(%r10,%r11), %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %edx
	addq	$1, %rax
	leal	(%rsi,%rdx), %ecx
	cmpl	%edi, %ecx
	jge	.L4
.L9:
	movq	%rax, %rcx
	subq	%r11, %rcx
	movzbl	(%rcx,%r8), %ebx
	cmpb	%bl, (%rax)
	je	.L5
.L4:
	movslq	%esi, %rax
	movl	%edx, (%r9,%rax,4)
	leal	1(%rsi), %eax
	testl	%edx, %edx
	jne	.L22
	movl	%eax, %esi
.L6:
	cmpl	%edi, %esi
	jl	.L2
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	cmpl	%eax, %edi
	jle	.L13
	movl	4(%r9), %r8d
	leal	1(%r8), %ecx
	cmpl	%edx, %ecx
	jge	.L13
	leal	2(%rsi), %eax
	movl	$2, %ecx
	cltq
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	movl	(%r9,%rcx,4), %r8d
	addq	$1, %rax
	addq	$1, %rcx
	leal	(%r8,%r11), %ebx
	cmpl	%edx, %ebx
	jge	.L7
.L8:
	movl	%r8d, -4(%r9,%rax,4)
	movl	%ecx, %r11d
	movl	%eax, %esi
	cmpl	%eax, %edi
	jg	.L23
.L7:
	subl	%r11d, %edx
	jmp	.L6
.L13:
	movl	$1, %r11d
	movl	%eax, %esi
	subl	%r11d, %edx
	jmp	.L6
.L21:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	ret
	.cfi_endproc
.LFE35:
	.size	Zalgo, .-Zalgo
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$300005, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	s(%rip), %rbx
	movq	%rbx, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	call	fgets@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%edx, slen(%rip)
	movslq	%edx, %rdx
	addq	%rbx, %rdx
	cmpb	$31, (%rdx)
	jg	.L25
	movb	$0, (%rdx)
.L26:
	movq	stdin(%rip), %rdx
	leaq	t(%rip), %r13
	movl	$300005, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%edx, tlen(%rip)
	movslq	%edx, %rdx
	addq	%r13, %rdx
	cmpb	$31, (%rdx)
	jg	.L27
	movb	$0, (%rdx)
.L28:
	movslq	tlen(%rip), %rbp
	leaq	buf(%rip), %r12
	movl	$600005, %ecx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movq	%rbp, %rdx
	call	__memcpy_chk@PLT
	movslq	slen(%rip), %rdx
	leaq	(%r12,%rbp), %rdi
	movq	%rbx, %rsi
	movq	%rdx, %r14
	call	memcpy@PLT
	leal	1(%rbp,%r14), %edx
	movq	%r12, %rsi
	leaq	zf(%rip), %rbp
	movq	%rbp, %rdi
	call	Zalgo
	movslq	tlen(%rip), %rdi
	movq	%r12, %rdx
	leaq	0(%r13,%rdi), %rax
	movq	%rdi, %rsi
	cmpq	%r13, %rax
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	movzbl	-1(%rax), %ecx
	subq	$1, %rax
	addq	$1, %rdx
	movb	%cl, -1(%rdx)
	cmpq	%r13, %rax
	jne	.L30
	leaq	(%r12,%rdi), %rdx
.L29:
	movslq	slen(%rip), %rax
	movq	%rax, %rdi
	addq	%rbx, %rax
	cmpq	%rbx, %rax
	jbe	.L34
	.p2align 4,,10
	.p2align 3
.L31:
	movzbl	-1(%rax), %ecx
	subq	$1, %rax
	addq	$1, %rdx
	movb	%cl, -1(%rdx)
	cmpq	%rbx, %rax
	jne	.L31
.L34:
	leaq	zr(%rip), %rbx
	leal	1(%rsi,%rdi), %edx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	Zalgo
	movl	tlen(%rip), %ecx
	movl	slen(%rip), %r8d
	xorl	%edx, %edx
	leal	-1(%rcx), %r10d
	cmpl	%r8d, %ecx
	jg	.L33
	movl	%r8d, %eax
	leal	(%rcx,%r8), %r9d
	subl	%ecx, %eax
	leal	1(%rax), %r11d
	cmpl	$2, %eax
	jbe	.L40
	movslq	%ecx, %rax
	movd	%r10d, %xmm5
	pxor	%xmm2, %xmm2
	leaq	0(%rbp,%rax,4), %rsi
	movslq	%r8d, %rax
	pshufd	$0, %xmm5, %xmm3
	leaq	-12(%rbx,%rax,4), %rdx
	movl	%r11d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %edi
	leaq	16(%rsi), %rax
	salq	$4, %rdi
	addq	%rax, %rdi
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$16, %rax
.L36:
	movdqu	(%rdx), %xmm4
	movdqu	(%rsi), %xmm0
	subq	$16, %rdx
	movq	%rax, %rsi
	pshufd	$27, %xmm4, %xmm1
	paddd	%xmm1, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rdi, %rax
	jne	.L47
	movdqa	%xmm2, %xmm0
	movl	%r11d, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	addl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	cmpl	%r11d, %eax
	je	.L33
.L35:
	movl	%r9d, %esi
	movslq	%ecx, %rax
	subl	%ecx, %esi
	movl	0(%rbp,%rax,4), %eax
	movslq	%esi, %rsi
	addl	(%rbx,%rsi,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%r8d, %eax
	jg	.L33
	movl	%r9d, %esi
	subl	%eax, %esi
	cltq
	movslq	%esi, %rsi
	movl	0(%rbp,%rax,4), %eax
	addl	(%rbx,%rsi,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	addl	$2, %ecx
	movzbl	%al, %eax
	addl	%eax, %edx
	cmpl	%ecx, %r8d
	jl	.L33
	subl	%ecx, %r9d
	movslq	%ecx, %rcx
	movslq	%r9d, %r9
	movl	0(%rbp,%rcx,4), %eax
	addl	(%rbx,%r9,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
.L33:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L27:
	.cfi_restore_state
	movl	%eax, tlen(%rip)
	jmp	.L28
.L25:
	movl	%eax, slen(%rip)
	jmp	.L26
.L40:
	xorl	%edx, %edx
	jmp	.L35
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 600005
buf:
	.zero	600005
	.globl	zr
	.align 32
	.type	zr, @object
	.size	zr, 2400020
zr:
	.zero	2400020
	.globl	zf
	.align 32
	.type	zf, @object
	.size	zf, 2400020
zf:
	.zero	2400020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 300005
t:
	.zero	300005
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 300005
s:
	.zero	300005
	.globl	diff
	.align 4
	.type	diff, @object
	.size	diff, 4
diff:
	.zero	4
	.globl	tlen
	.align 4
	.type	tlen, @object
	.size	tlen, 4
tlen:
	.zero	4
	.globl	slen
	.align 4
	.type	slen, @object
	.size	slen, 4
slen:
	.zero	4
	.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
	.p2align 4
	.globl	Zalgo
	.type	Zalgo, @function
Zalgo:
.LFB35:
	.cfi_startproc
	endbr64
	movq	%rdi, %r9
	movl	%edx, %edi
	movl	%edx, (%r9)
	cmpl	$1, %edx
	jle	.L21
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %r10
	xorl	%edx, %edx
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L2:
	leal	(%rsi,%rdx), %r8d
	cmpl	%r8d, %edi
	jle	.L4
	movslq	%edx, %r11
	movslq	%r8d, %r8
	leaq	(%r10,%r11), %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %edx
	addq	$1, %rax
	leal	(%rsi,%rdx), %ecx
	cmpl	%edi, %ecx
	jge	.L4
.L9:
	movq	%rax, %rcx
	subq	%r11, %rcx
	movzbl	(%rcx,%r8), %ebx
	cmpb	%bl, (%rax)
	je	.L5
.L4:
	movslq	%esi, %rax
	movl	%edx, (%r9,%rax,4)
	leal	1(%rsi), %eax
	testl	%edx, %edx
	jne	.L22
	movl	%eax, %esi
.L6:
	cmpl	%edi, %esi
	jl	.L2
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	cmpl	%eax, %edi
	jle	.L13
	movl	4(%r9), %r8d
	leal	1(%r8), %ecx
	cmpl	%edx, %ecx
	jge	.L13
	leal	2(%rsi), %eax
	movl	$2, %ecx
	cltq
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	movl	(%r9,%rcx,4), %r8d
	addq	$1, %rax
	addq	$1, %rcx
	leal	(%r8,%r11), %ebx
	cmpl	%edx, %ebx
	jge	.L7
.L8:
	movl	%r8d, -4(%r9,%rax,4)
	movl	%ecx, %r11d
	movl	%eax, %esi
	cmpl	%eax, %edi
	jg	.L23
.L7:
	subl	%r11d, %edx
	jmp	.L6
.L13:
	movl	$1, %r11d
	movl	%eax, %esi
	subl	%r11d, %edx
	jmp	.L6
.L21:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	ret
	.cfi_endproc
.LFE35:
	.size	Zalgo, .-Zalgo
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$300005, %esi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	s(%rip), %rbx
	movq	%rbx, %rdi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	movq	stdin(%rip), %rdx
	call	fgets@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%edx, slen(%rip)
	movslq	%edx, %rdx
	addq	%rbx, %rdx
	cmpb	$31, (%rdx)
	jg	.L25
	movb	$0, (%rdx)
.L26:
	movq	stdin(%rip), %rdx
	leaq	t(%rip), %r13
	movl	$300005, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	leal	-1(%rax), %edx
	movl	%edx, tlen(%rip)
	movslq	%edx, %rdx
	addq	%r13, %rdx
	cmpb	$31, (%rdx)
	jg	.L27
	movb	$0, (%rdx)
.L28:
	movslq	tlen(%rip), %rbp
	leaq	buf(%rip), %r12
	movl	$600005, %ecx
	movq	%r13, %rsi
	movq	%r12, %rdi
	movq	%rbp, %rdx
	call	__memcpy_chk@PLT
	movslq	slen(%rip), %rdx
	leaq	(%r12,%rbp), %rdi
	movq	%rbx, %rsi
	movq	%rdx, %r14
	call	memcpy@PLT
	leal	1(%rbp,%r14), %edx
	movq	%r12, %rsi
	leaq	zf(%rip), %rbp
	movq	%rbp, %rdi
	call	Zalgo
	movslq	tlen(%rip), %rdi
	movq	%r12, %rdx
	leaq	0(%r13,%rdi), %rax
	movq	%rdi, %rsi
	cmpq	%r13, %rax
	jbe	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	movzbl	-1(%rax), %ecx
	subq	$1, %rax
	addq	$1, %rdx
	movb	%cl, -1(%rdx)
	cmpq	%r13, %rax
	jne	.L30
	leaq	(%r12,%rdi), %rdx
.L29:
	movslq	slen(%rip), %rax
	movq	%rax, %rdi
	addq	%rbx, %rax
	cmpq	%rbx, %rax
	jbe	.L34
	.p2align 4,,10
	.p2align 3
.L31:
	movzbl	-1(%rax), %ecx
	subq	$1, %rax
	addq	$1, %rdx
	movb	%cl, -1(%rdx)
	cmpq	%rbx, %rax
	jne	.L31
.L34:
	leaq	zr(%rip), %rbx
	leal	1(%rsi,%rdi), %edx
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	Zalgo
	movl	tlen(%rip), %ecx
	movl	slen(%rip), %r8d
	xorl	%edx, %edx
	leal	-1(%rcx), %r10d
	cmpl	%r8d, %ecx
	jg	.L33
	movl	%r8d, %eax
	leal	(%rcx,%r8), %r9d
	subl	%ecx, %eax
	leal	1(%rax), %r11d
	cmpl	$2, %eax
	jbe	.L40
	movslq	%ecx, %rax
	movd	%r10d, %xmm5
	pxor	%xmm2, %xmm2
	leaq	0(%rbp,%rax,4), %rsi
	movslq	%r8d, %rax
	pshufd	$0, %xmm5, %xmm3
	leaq	-12(%rbx,%rax,4), %rdx
	movl	%r11d, %eax
	shrl	$2, %eax
	leal	-1(%rax), %edi
	leaq	16(%rsi), %rax
	salq	$4, %rdi
	addq	%rax, %rdi
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L47:
	addq	$16, %rax
.L36:
	movdqu	(%rdx), %xmm4
	movdqu	(%rsi), %xmm0
	subq	$16, %rdx
	movq	%rax, %rsi
	pshufd	$27, %xmm4, %xmm1
	paddd	%xmm1, %xmm0
	pcmpeqd	%xmm3, %xmm0
	psubd	%xmm0, %xmm2
	cmpq	%rdi, %rax
	jne	.L47
	movdqa	%xmm2, %xmm0
	movl	%r11d, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddd	%xmm0, %xmm2
	addl	%eax, %ecx
	movdqa	%xmm2, %xmm0
	psrldq	$4, %xmm0
	paddd	%xmm0, %xmm2
	movd	%xmm2, %edx
	cmpl	%r11d, %eax
	je	.L33
.L35:
	movl	%r9d, %esi
	movslq	%ecx, %rax
	subl	%ecx, %esi
	movl	0(%rbp,%rax,4), %eax
	movslq	%esi, %rsi
	addl	(%rbx,%rsi,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	leal	1(%rcx), %eax
	cmpl	%r8d, %eax
	jg	.L33
	movl	%r9d, %esi
	subl	%eax, %esi
	cltq
	movslq	%esi, %rsi
	movl	0(%rbp,%rax,4), %eax
	addl	(%rbx,%rsi,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	addl	$2, %ecx
	movzbl	%al, %eax
	addl	%eax, %edx
	cmpl	%ecx, %r8d
	jl	.L33
	subl	%ecx, %r9d
	movslq	%ecx, %rcx
	movslq	%r9d, %r9
	movl	0(%rbp,%rcx,4), %eax
	addl	(%rbx,%r9,4), %eax
	cmpl	%r10d, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
.L33:
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %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
.L27:
	.cfi_restore_state
	movl	%eax, tlen(%rip)
	jmp	.L28
.L25:
	movl	%eax, slen(%rip)
	jmp	.L26
.L40:
	xorl	%edx, %edx
	jmp	.L35
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 600005
buf:
	.zero	600005
	.globl	zr
	.align 32
	.type	zr, @object
	.size	zr, 2400020
zr:
	.zero	2400020
	.globl	zf
	.align 32
	.type	zf, @object
	.size	zf, 2400020
zf:
	.zero	2400020
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 300005
t:
	.zero	300005
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 300005
s:
	.zero	300005
	.globl	diff
	.align 4
	.type	diff, @object
	.size	diff, 4
diff:
	.zero	4
	.globl	tlen
	.align 4
	.type	tlen, @object
	.size	tlen, 4
tlen:
	.zero	4
	.globl	slen
	.align 4
	.type	slen, @object
	.size	slen, 4
slen:
	.zero	4
	.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:

// AOJ 2614: Almost Same Substring
// 2017.12.31 bal4u@uu

#include <stdio.h>
#include <string.h>

int slen, tlen, diff;
char s[300005];
char t[300005];
int zf[600005];
int zr[600005];
char buf[600005];

void Zalgo(int *z, char *s, int n)
{
	int i, j, k;

	z[0] = n;
    i = 1, j = 0;
    while (i < n) {
		while (i+j < n && s[j] == s[i+j]) ++j;
        z[i] = j;
        if (j == 0) { ++i; continue;}
        k = 1;
        while (i+k < n && k+z[k] < j) z[i+k] = z[k], ++k;
        i += k; j -= k;
    }
}

int main()
{
	int i, w, ans;
	char *p, *q;

	fgets(s, sizeof(s), stdin);
	slen = strlen(s)-1;
	if (*(s+slen) < ' ') *(s+slen) = 0;	else slen++;
	fgets(t, sizeof(t), stdin);
	tlen = strlen(t)-1;
	if (*(t+tlen) < ' ') *(t+tlen) = 0;	else tlen++;

	memcpy(buf, t, tlen);
	memcpy(buf+tlen, s, slen);
	Zalgo(zf, buf, slen+tlen+1);

	p = buf, q = t+tlen;
	while (q > t) *p++ = *--q;
	q = s+slen;
	while (q > s) *p++ = *--q;
	Zalgo(zr, buf, slen+tlen+1);

	ans = 0, w = tlen-1;
	for (i = tlen; i <= slen; i++) {
		ans += (zf[i]+ zr[slen+tlen-i] == w);
	}
	printf("%d\n", ans);

	return 0;
}
aaaaaa
aaaaab
 bbcbcdbc
abc
 aaaaaa
bbaaaa
 bbcbcdbc
bca
 aaaaaa
baaaaa
 bbcbcdbc
acb
 aaaaaa
bbaa`a
 cbdcbcbb
bca
 aaaaaa
baba`a
 cbdcbcbb
bda

1
 3
 0
 2
 1
 1
 0
 1
 0
 1

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

```c
// AOJ 2614: Almost Same Substring
// 2017.12.31 bal4u@uu

#include <stdio.h>
#include <string.h>

int slen, tlen, diff;
char s[300005];
char t[300005];
int zf[600005];
int zr[600005];
char buf[600005];

void Zalgo(int *z, char *s, int n)
{
	int i, j, k;

	z[0] = n;
    i = 1, j = 0;
    while (i < n) {
		while (i+j < n && s[j] == s[i+j]) ++j;
        z[i] = j;
        if (j == 0) { ++i; continue;}
        k = 1;
        while (i+k < n && k+z[k] < j) z[i+k] = z[k], ++k;
        i += k; j -= k;
    }
}

int main()
{
	int i, w, ans;
	char *p, *q;

	fgets(s, sizeof(s), stdin);
	slen = strlen(s)-1;
	if (*(s+slen) < ' ') *(s+slen) = 0;	else slen++;
	fgets(t, sizeof(t), stdin);
	tlen = strlen(t)-1;
	if (*(t+tlen) < ' ') *(t+tlen) = 0;	else tlen++;

	memcpy(buf, t, tlen);
	memcpy(buf+tlen, s, slen);
	Zalgo(zf, buf, slen+tlen+1);

	p = buf, q = t+tlen;
	while (q > t) *p++ = *--q;
	q = s+slen;
	while (q > s) *p++ = *--q;
	Zalgo(zr, buf, slen+tlen+1);

	ans = 0, w = tlen-1;
	for (i = tlen; i <= slen; i++) {
		ans += (zf[i]+ zr[slen+tlen-i] == w);
	}
	printf("%d\n", ans);

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	slen
	.bss
	.align 4
	.type	slen, @object
	.size	slen, 4
slen:
	.zero	4
	.globl	tlen
	.align 4
	.type	tlen, @object
	.size	tlen, 4
tlen:
	.zero	4
	.globl	diff
	.align 4
	.type	diff, @object
	.size	diff, 4
diff:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 300005
s:
	.zero	300005
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 300005
t:
	.zero	300005
	.globl	zf
	.align 32
	.type	zf, @object
	.size	zf, 2400020
zf:
	.zero	2400020
	.globl	zr
	.align 32
	.type	zr, @object
	.size	zr, 2400020
zr:
	.zero	2400020
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 600005
buf:
	.zero	600005
	.text
	.globl	Zalgo
	.type	Zalgo, @function
Zalgo:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movl	$1, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -8(%rbp)
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L2
.L6:
	movl	$1, -4(%rbp)
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L7:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jg	.L9
.L8:
	movl	-4(%rbp), %eax
	addl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Zalgo, .-Zalgo
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, slen(%rip)
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L12
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L13
.L12:
	movl	slen(%rip), %eax
	addl	$1, %eax
	movl	%eax, slen(%rip)
.L13:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, tlen(%rip)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L14
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L15
.L14:
	movl	tlen(%rip), %eax
	addl	$1, %eax
	movl	%eax, tlen(%rip)
.L15:
	movl	tlen(%rip), %eax
	cltq
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %eax
	cltq
	movl	tlen(%rip), %edx
	movslq	%edx, %rdx
	leaq	buf(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zf(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	leaq	buf(%rip), %rax
	movq	%rax, -16(%rbp)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L16
.L17:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L16:
	leaq	t(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L17
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L18
.L19:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L18:
	leaq	s(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L19
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zr(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	movl	$0, -24(%rbp)
	movl	tlen(%rip), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	tlen(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L20
.L21:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zf(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zr(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cmpl	%eax, -20(%rbp)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L20:
	movl	slen(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	slen
	.bss
	.align 4
	.type	slen, @object
	.size	slen, 4
slen:
	.zero	4
	.globl	tlen
	.align 4
	.type	tlen, @object
	.size	tlen, 4
tlen:
	.zero	4
	.globl	diff
	.align 4
	.type	diff, @object
	.size	diff, 4
diff:
	.zero	4
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 300005
s:
	.zero	300005
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 300005
t:
	.zero	300005
	.globl	zf
	.align 32
	.type	zf, @object
	.size	zf, 2400020
zf:
	.zero	2400020
	.globl	zr
	.align 32
	.type	zr, @object
	.size	zr, 2400020
zr:
	.zero	2400020
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 600005
buf:
	.zero	600005
	.text
	.globl	Zalgo
	.type	Zalgo, @function
Zalgo:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movl	$1, -12(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	-12(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L4
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L5
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	cmpl	$0, -8(%rbp)
	jne	.L6
	addl	$1, -12(%rbp)
	jmp	.L2
.L6:
	movl	$1, -4(%rbp)
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-12(%rbp), %ecx
	movl	-4(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	addl	$1, -4(%rbp)
.L7:
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -36(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jg	.L9
.L8:
	movl	-4(%rbp), %eax
	addl	%eax, -12(%rbp)
	movl	-4(%rbp), %eax
	subl	%eax, -8(%rbp)
.L2:
	movl	-12(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L3
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Zalgo, .-Zalgo
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, slen(%rip)
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L12
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L13
.L12:
	movl	slen(%rip), %eax
	addl	$1, %eax
	movl	%eax, slen(%rip)
.L13:
	movq	stdin(%rip), %rax
	movq	%rax, %rdx
	movl	$300005, %esi
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	fgets@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	subl	$1, %eax
	movl	%eax, tlen(%rip)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$31, %al
	jg	.L14
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L15
.L14:
	movl	tlen(%rip), %eax
	addl	$1, %eax
	movl	%eax, tlen(%rip)
.L15:
	movl	tlen(%rip), %eax
	cltq
	movq	%rax, %rdx
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	buf(%rip), %rax
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %eax
	cltq
	movl	tlen(%rip), %edx
	movslq	%edx, %rdx
	leaq	buf(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	movq	%rcx, %rdi
	call	memcpy@PLT
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zf(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	leaq	buf(%rip), %rax
	movq	%rax, -16(%rbp)
	movl	tlen(%rip), %eax
	cltq
	leaq	t(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L16
.L17:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L16:
	leaq	t(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L17
	movl	slen(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L18
.L19:
	subq	$1, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -16(%rbp)
	movq	-8(%rbp), %rdx
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
.L18:
	leaq	s(%rip), %rax
	cmpq	%rax, -8(%rbp)
	ja	.L19
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	addl	$1, %eax
	movl	%eax, %edx
	leaq	buf(%rip), %rax
	movq	%rax, %rsi
	leaq	zr(%rip), %rax
	movq	%rax, %rdi
	call	Zalgo
	movl	$0, -24(%rbp)
	movl	tlen(%rip), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	tlen(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L20
.L21:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zf(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	slen(%rip), %edx
	movl	tlen(%rip), %eax
	addl	%edx, %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	zr(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%ecx, %eax
	cmpl	%eax, -20(%rbp)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, -24(%rbp)
	addl	$1, -28(%rbp)
.L20:
	movl	slen(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L21
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
