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];
	long long  k;
	int start = 1;
	int last = 1;
	int i = 0;
	int len;
	long long kousa;

	scanf("%s", s);
	scanf("%lld", &k);

	kousa = 0;
	while (s[i] != '\0') {

		if (s[i] == s[i + 1]) {
			kousa++;
			i++;
		}

		i++;
	}

	len = i;

	if (s[0] == s[i - 1]) {

		while (s[i - 1] == s[i - 2]) {
			last++;
			i--;
		}

		i = 0;
		while (s[i] == s[i + 1]) {
			start++;
			i++;
		}

		if (start % 2 == 1 && last % 2 == 1 && start != len) {
				printf("%lld", k*kousa+k-1);


		}
		else if (start % 2 == 1 && last % 2 == 1 && start == len) {
			printf("%lld", len*k / 2);
		}
		else {
				printf("%lld", k*kousa);

		}
	}

	else {
			printf("%lld", k*kousa);

	}

}
 



```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld"
	.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
	movl	$1, -144(%rbp)
	movl	$1, -140(%rbp)
	movl	$0, -136(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -120(%rbp)
	jmp	.L2
.L4:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L3
	addq	$1, -120(%rbp)
	addl	$1, -136(%rbp)
.L3:
	addl	$1, -136(%rbp)
.L2:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L4
	movl	-136(%rbp), %eax
	movl	%eax, -132(%rbp)
	movzbl	-112(%rbp), %edx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	jmp	.L6
.L7:
	addl	$1, -140(%rbp)
	subl	$1, -136(%rbp)
.L6:
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L7
	movl	$0, -136(%rbp)
	jmp	.L8
.L9:
	addl	$1, -144(%rbp)
	addl	$1, -136(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L9
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	je	.L10
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	jne	.L12
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movq	-128(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L5:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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"
.LC1:
	.string	"%lld"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$136, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	16(%rsp), %r10d
	testb	%r10b, %r10b
	je	.L2
	movl	%r10d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	testb	%al, %al
	je	.L40
.L4:
	movslq	%edi, %rcx
	movl	%eax, %esi
.L6:
	leal	1(%rcx), %edi
	movslq	%edi, %rax
	movzbl	16(%rsp,%rax), %eax
	cmpb	%sil, %al
	jne	.L3
	leal	2(%rcx), %r8d
	addq	$1, %rdx
	movslq	%r8d, %rax
	movzbl	16(%rsp,%rax), %eax
	testb	%al, %al
	je	.L41
	movl	%r8d, %edi
	jmp	.L4
.L40:
	movl	%edi, %r8d
.L5:
	movq	8(%rsp), %r9
	cmpb	%sil, %r10b
	jne	.L7
	leal	-2(%r8), %eax
	cltq
	cmpb	%sil, 16(%rsp,%rax)
	jne	.L18
	leal	-1(%rcx), %eax
	movl	$1, %edi
	addq	%rbx, %rcx
	cltq
	movzbl	16(%rsp,%rax), %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %r10d
	movzbl	-2(%rcx), %eax
	addl	$1, %edi
	subq	$1, %rcx
	cmpb	%r10b, %al
	je	.L9
.L8:
	cmpb	%sil, 17(%rsp)
	jne	.L19
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%esi, %ecx
	movzbl	(%rbx,%rax), %esi
	movl	%eax, %r10d
	addq	$1, %rax
	cmpb	%cl, %sil
	je	.L11
	testb	$1, %r10b
	jne	.L10
.L7:
	imulq	%r9, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L14:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L42
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore_state
	movslq	%edi, %rcx
	jmp	.L5
.L19:
	movl	$1, %r10d
.L10:
	andl	$1, %edi
	cmpl	%r8d, %r10d
	je	.L37
	testb	%dil, %dil
	jne	.L43
	cmpl	%r8d, %r10d
	jne	.L7
.L37:
	testb	%dil, %dil
	je	.L7
	movslq	%r8d, %rax
	movl	$2, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	imulq	%r9, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L18:
	movl	$1, %edi
	jmp	.L8
.L2:
	movzbl	15(%rsp), %esi
	orq	$-1, %rcx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	jmp	.L5
.L43:
	imulq	%r9, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	-1(%r9,%rdx), %rdx
	call	__printf_chk@PLT
	jmp	.L14
.L42:
	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"
.LC1:
	.string	"%lld"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$136, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	leaq	8(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	16(%rsp), %r10d
	testb	%r10b, %r10b
	je	.L2
	movl	%r10d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	testb	%al, %al
	je	.L40
.L4:
	movslq	%edi, %rcx
	movl	%eax, %esi
.L6:
	leal	1(%rcx), %edi
	movslq	%edi, %rax
	movzbl	16(%rsp,%rax), %eax
	cmpb	%sil, %al
	jne	.L3
	leal	2(%rcx), %r8d
	addq	$1, %rdx
	movslq	%r8d, %rax
	movzbl	16(%rsp,%rax), %eax
	testb	%al, %al
	je	.L41
	movl	%r8d, %edi
	jmp	.L4
.L40:
	movl	%edi, %r8d
.L5:
	movq	8(%rsp), %r9
	cmpb	%sil, %r10b
	jne	.L7
	leal	-2(%r8), %eax
	cltq
	cmpb	%sil, 16(%rsp,%rax)
	jne	.L18
	leal	-1(%rcx), %eax
	movl	$1, %edi
	addq	%rbx, %rcx
	cltq
	movzbl	16(%rsp,%rax), %eax
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%eax, %r10d
	movzbl	-2(%rcx), %eax
	addl	$1, %edi
	subq	$1, %rcx
	cmpb	%r10b, %al
	je	.L9
.L8:
	cmpb	%sil, 17(%rsp)
	jne	.L19
	movl	$2, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%esi, %ecx
	movzbl	(%rbx,%rax), %esi
	movl	%eax, %r10d
	addq	$1, %rax
	cmpb	%cl, %sil
	je	.L11
	testb	$1, %r10b
	jne	.L10
.L7:
	imulq	%r9, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L14:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L42
	addq	$136, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore_state
	movslq	%edi, %rcx
	jmp	.L5
.L19:
	movl	$1, %r10d
.L10:
	andl	$1, %edi
	cmpl	%r8d, %r10d
	je	.L37
	testb	%dil, %dil
	jne	.L43
	cmpl	%r8d, %r10d
	jne	.L7
.L37:
	testb	%dil, %dil
	je	.L7
	movslq	%r8d, %rax
	movl	$2, %ecx
	movq	%rbp, %rsi
	movl	$1, %edi
	imulq	%r9, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L14
.L18:
	movl	$1, %edi
	jmp	.L8
.L2:
	movzbl	15(%rsp), %esi
	orq	$-1, %rcx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	jmp	.L5
.L43:
	imulq	%r9, %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	-1(%r9,%rdx), %rdx
	call	__printf_chk@PLT
	jmp	.L14
.L42:
	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];
	long long  k;
	int start = 1;
	int last = 1;
	int i = 0;
	int len;
	long long kousa;

	scanf("%s", s);
	scanf("%lld", &k);

	kousa = 0;
	while (s[i] != '\0') {

		if (s[i] == s[i + 1]) {
			kousa++;
			i++;
		}

		i++;
	}

	len = i;

	if (s[0] == s[i - 1]) {

		while (s[i - 1] == s[i - 2]) {
			last++;
			i--;
		}

		i = 0;
		while (s[i] == s[i + 1]) {
			start++;
			i++;
		}

		if (start % 2 == 1 && last % 2 == 1 && start != len) {
				printf("%lld", k*kousa+k-1);


		}
		else if (start % 2 == 1 && last % 2 == 1 && start == len) {
			printf("%lld", len*k / 2);
		}
		else {
				printf("%lld", k*kousa);

		}
	}

	else {
			printf("%lld", k*kousa);

	}

}
 




cooooooooonteeeeeeeedest
999993333
 issih
2
 rq
81
 hssih
2
 cooooooooonteeeeeeeedest
1894324309
 hssih
3
 hssih
6
 tsedeeeeeeeetnoooooonooc
54816478
 tsedeeeeeeeetnoooooonooc
93364260
 rr
552

7999946664 2 0 3 15154594472 5 11 438531824 746914080 552
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];
	long long  k;
	int start = 1;
	int last = 1;
	int i = 0;
	int len;
	long long kousa;

	scanf("%s", s);
	scanf("%lld", &k);

	kousa = 0;
	while (s[i] != '\0') {

		if (s[i] == s[i + 1]) {
			kousa++;
			i++;
		}

		i++;
	}

	len = i;

	if (s[0] == s[i - 1]) {

		while (s[i - 1] == s[i - 2]) {
			last++;
			i--;
		}

		i = 0;
		while (s[i] == s[i + 1]) {
			start++;
			i++;
		}

		if (start % 2 == 1 && last % 2 == 1 && start != len) {
				printf("%lld", k*kousa+k-1);


		}
		else if (start % 2 == 1 && last % 2 == 1 && start == len) {
			printf("%lld", len*k / 2);
		}
		else {
				printf("%lld", k*kousa);

		}
	}

	else {
			printf("%lld", k*kousa);

	}

}
 



```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld"
	.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
	movl	$1, -144(%rbp)
	movl	$1, -140(%rbp)
	movl	$0, -136(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -120(%rbp)
	jmp	.L2
.L4:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L3
	addq	$1, -120(%rbp)
	addl	$1, -136(%rbp)
.L3:
	addl	$1, -136(%rbp)
.L2:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L4
	movl	-136(%rbp), %eax
	movl	%eax, -132(%rbp)
	movzbl	-112(%rbp), %edx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	jmp	.L6
.L7:
	addl	$1, -140(%rbp)
	subl	$1, -136(%rbp)
.L6:
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L7
	movl	$0, -136(%rbp)
	jmp	.L8
.L9:
	addl	$1, -144(%rbp)
	addl	$1, -136(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L9
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	je	.L10
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	jne	.L12
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movq	-128(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L5:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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"
.LC1:
	.string	"%lld"
	.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
	movl	$1, -144(%rbp)
	movl	$1, -140(%rbp)
	movl	$0, -136(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -120(%rbp)
	jmp	.L2
.L4:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L3
	addq	$1, -120(%rbp)
	addl	$1, -136(%rbp)
.L3:
	addl	$1, -136(%rbp)
.L2:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L4
	movl	-136(%rbp), %eax
	movl	%eax, -132(%rbp)
	movzbl	-112(%rbp), %edx
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L5
	jmp	.L6
.L7:
	addl	$1, -140(%rbp)
	subl	$1, -136(%rbp)
.L6:
	movl	-136(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	subl	$2, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L7
	movl	$0, -136(%rbp)
	jmp	.L8
.L9:
	addl	$1, -144(%rbp)
	addl	$1, -136(%rbp)
.L8:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %edx
	movl	-136(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L9
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L10
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	je	.L10
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rdx
	movq	-128(%rbp), %rax
	addq	%rdx, %rax
	subq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L10:
	movl	-144(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-140(%rbp), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L12
	movl	-144(%rbp), %eax
	cmpl	-132(%rbp), %eax
	jne	.L12
	movl	-132(%rbp), %eax
	movslq	%eax, %rdx
	movq	-128(%rbp), %rax
	imulq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L12:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L5:
	movq	-128(%rbp), %rax
	imulq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	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:
