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

```c
// AOJ 1161: Verbal Arithmetic
// 2018.1.9 bal4u@uu

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

int m, sz;
char str[13][11]; int len[13];
char tr['Z'+1], assign['Z'+1];
char idx[10], not0[10], used[10];
int ans;

void calc()
{
	int i, a, s;
	char *p;

	// 下一桁の合計で枝刈りしてみる
	s = 0; for (i = 0; i < m; i++) s += assign[str[i][len[i]]];
	a = assign[str[m][len[m]]];
	if (s % 10 != a) return;

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i];
		while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
		s += a;
	}

	a = 0, p = str[m];
	while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
	if (a == s) ans++;
}

void rec(int k)
{
	int i;

	if (k == sz) { calc(); return; }
	if (!used[0]) {
		if (!not0[k]) used[0] = 1, assign[idx[k]] = 0, rec(k+1), used[0] = 0;
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[idx[k]] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int n, i;
	char buf[10], *p;

	while (fgets(buf, 10, stdin) && *buf != '0') {
		sz = 0, memset(tr, -1, sizeof(tr));
		memset(not0, 0, sizeof(not0));
		n = atoi(buf), m = n - 1;
		for (i = 0; i < n; i++) {
			fgets(str[i], 15, stdin);
			for (p = str[i]; *p > ' '; p++) {
				if (tr[*p] < 0) tr[*p] = sz, idx[sz++] = *p;
			}
			*p = -1; len[i] = p-str[i]-1;
			if (len[i] > 0) not0[tr[*str[i]]] = 1;
		}
		ans = 0;
		memset(used, 0, sizeof(used));
		rec(0);
		printf("%d\n", ans);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 143
str:
	.zero	143
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 52
len:
	.zero	52
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 91
tr:
	.zero	91
	.globl	assign
	.align 32
	.type	assign, @object
	.size	assign, 91
assign:
	.zero	91
	.globl	idx
	.align 8
	.type	idx, @object
	.size	idx, 10
idx:
	.zero	10
	.globl	not0
	.align 8
	.type	not0, @object
	.size	not0, 10
not0:
	.zero	10
	.globl	used
	.align 8
	.type	used, @object
	.size	used, 10
used:
	.zero	10
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L3
	movl	m(%rip), %eax
	movl	m(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	%edx, -16(%rbp)
	jne	.L12
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L6
.L9:
	movl	$0, -16(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L7:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L8
	movl	-16(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -16(%rbp)
	movl	m(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L11
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jne	.L1
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	calc, .-calc
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	sz(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L14
	movl	$0, %eax
	call	calc
	jmp	.L13
.L14:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L16
	movb	$1, used(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movb	$0, used(%rip)
.L16:
	movl	$1, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	cltq
	leaq	assign(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L19
.L21:
	nop
.L19:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$9, -4(%rbp)
	jle	.L20
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L31:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tr(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$10, %edx
	movl	$0, %esi
	leaq	not0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-18(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -40(%rbp)
	jmp	.L24
.L29:
	movq	stdin(%rip), %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rdx
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L25
.L27:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L26
	movl	sz(%rip), %edx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	leaq	idx(%rip), %rcx
	movb	%dl, (%rax,%rcx)
.L26:
	addq	$1, -32(%rbp)
.L25:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L27
	movq	-32(%rbp), %rax
	movb	$-1, (%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	subq	%rdx, %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L28
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	leaq	str(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	not0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L28:
	addl	$1, -40(%rbp)
.L24:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$0, ans(%rip)
	movl	$10, %edx
	movl	$0, %esi
	leaq	used(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L30
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L31
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	calc
	.type	calc, @function
calc:
.LFB51:
	.cfi_startproc
	endbr64
	movslq	m(%rip), %r10
	leaq	len(%rip), %rax
	leaq	str(%rip), %r8
	leaq	assign(%rip), %rsi
	leaq	(%r10,%r10,4), %rdx
	movslq	(%rax,%r10,4), %rax
	movq	%r10, %rcx
	leaq	(%r10,%rdx,2), %rdx
	addq	%r8, %rdx
	movsbq	(%rdx,%rax), %rax
	movsbl	(%rsi,%rax), %edi
	testl	%r10d, %r10d
	jle	.L2
	movslq	len(%rip), %rax
	movsbq	(%r8,%rax), %rax
	movsbl	(%rsi,%rax), %eax
	cmpl	$1, %r10d
	je	.L3
	movslq	4+len(%rip), %rdx
	movsbq	11(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$2, %r10d
	je	.L3
	movslq	8+len(%rip), %rdx
	movsbq	22(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$3, %r10d
	je	.L3
	movslq	12+len(%rip), %rdx
	movsbq	33(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$4, %r10d
	je	.L3
	movslq	16+len(%rip), %rdx
	movsbq	44(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$5, %r10d
	je	.L3
	movslq	20+len(%rip), %rdx
	movsbq	55(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$6, %r10d
	je	.L3
	movslq	24+len(%rip), %rdx
	movsbq	66(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$7, %r10d
	je	.L3
	movslq	28+len(%rip), %rdx
	movsbq	77(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$8, %r10d
	je	.L3
	movslq	32+len(%rip), %rdx
	movsbq	88(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$9, %r10d
	je	.L3
	movslq	36+len(%rip), %rdx
	movsbq	99(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$10, %r10d
	je	.L3
	movslq	40+len(%rip), %rdx
	movsbq	110(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$11, %r10d
	je	.L3
	movslq	44+len(%rip), %rdx
	movsbq	121(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$12, %r10d
	je	.L3
	movslq	48+len(%rip), %rdx
	movsbq	132(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
.L3:
	movslq	%eax, %rdx
	movl	%eax, %r9d
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %r9d
	sarq	$34, %rdx
	subl	%r9d, %edx
	leal	(%rdx,%rdx,4), %edx
	addl	%edx, %edx
	subl	%edx, %eax
	cmpl	%edi, %eax
	jne	.L1
	leal	-1(%rcx), %eax
	leaq	str(%rip), %rdi
	xorl	%r9d, %r9d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %r11
	leaq	11(%rdi), %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movsbq	(%rdi), %rax
	movq	%rdi, %rcx
	testb	%al, %al
	js	.L4
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	movsbl	(%rsi,%rax), %eax
	leal	(%rdx,%rdx,4), %edx
	addq	$1, %rcx
	leal	(%rax,%rdx,2), %edx
	movsbq	(%rcx), %rax
	testb	%al, %al
	jns	.L5
	addl	%edx, %r9d
.L4:
	addq	$11, %rdi
	cmpq	%rdi, %r11
	jne	.L6
	leaq	(%r10,%r10,4), %rax
	leaq	(%r10,%rax,2), %rdx
	addq	%r8, %rdx
	movsbq	(%rdx), %rax
	testb	%al, %al
	js	.L14
.L12:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	movsbl	(%rsi,%rax), %eax
	leal	(%rcx,%rcx,4), %ecx
	addq	$1, %rdx
	leal	(%rax,%rcx,2), %ecx
	movsbq	(%rdx), %rax
	testb	%al, %al
	jns	.L8
.L7:
	cmpl	%r9d, %ecx
	je	.L13
.L1:
	ret
.L2:
	testb	%dil, %dil
	jne	.L1
	movsbq	(%rdx), %rax
	xorl	%r9d, %r9d
	testb	%al, %al
	jns	.L12
.L13:
	addl	$1, ans(%rip)
	ret
.L14:
	xorl	%ecx, %ecx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	calc, .-calc
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L72
	cmpb	$0, used(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	jne	.L60
	movslq	%edi, %rax
	leaq	not0(%rip), %rdx
	cmpb	$0, (%rdx,%rax)
	je	.L73
.L60:
	cmpb	$0, 1+used(%rip)
	je	.L74
.L61:
	cmpb	$0, 2+used(%rip)
	je	.L75
.L62:
	cmpb	$0, 3+used(%rip)
	je	.L76
.L63:
	cmpb	$0, 4+used(%rip)
	je	.L77
.L64:
	cmpb	$0, 5+used(%rip)
	je	.L78
.L65:
	cmpb	$0, 6+used(%rip)
	je	.L79
.L66:
	cmpb	$0, 7+used(%rip)
	je	.L80
.L67:
	cmpb	$0, 8+used(%rip)
	je	.L81
.L68:
	cmpb	$0, 9+used(%rip)
	je	.L82
.L58:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L82:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	idx(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 9+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$9, (%rdx,%rax)
	call	rec
	movb	$0, 9+used(%rip)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L74:
	.cfi_restore_state
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 1+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$1, (%rdx,%rax)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L62
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 2+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$2, (%rdx,%rax)
	call	rec
	cmpb	$0, 3+used(%rip)
	movb	$0, 2+used(%rip)
	jne	.L63
	.p2align 4,,10
	.p2align 3
.L76:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 3+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$3, (%rdx,%rax)
	call	rec
	cmpb	$0, 4+used(%rip)
	movb	$0, 3+used(%rip)
	jne	.L64
	.p2align 4,,10
	.p2align 3
.L77:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 4+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$4, (%rdx,%rax)
	call	rec
	cmpb	$0, 5+used(%rip)
	movb	$0, 4+used(%rip)
	jne	.L65
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 5+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$5, (%rdx,%rax)
	call	rec
	cmpb	$0, 6+used(%rip)
	movb	$0, 5+used(%rip)
	jne	.L66
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 6+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$6, (%rdx,%rax)
	call	rec
	cmpb	$0, 7+used(%rip)
	movb	$0, 6+used(%rip)
	jne	.L67
	.p2align 4,,10
	.p2align 3
.L80:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 7+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$7, (%rdx,%rax)
	call	rec
	cmpb	$0, 8+used(%rip)
	movb	$0, 7+used(%rip)
	jne	.L68
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 8+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$8, (%rdx,%rax)
	call	rec
	cmpb	$0, 9+used(%rip)
	movb	$0, 8+used(%rip)
	jne	.L58
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L73:
	leaq	idx(%rip), %rdx
	leal	1(%rdi), %edi
	movb	$1, used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$0, (%rdx,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L61
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L72:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	xorl	%eax, %eax
	jmp	calc
	.cfi_endproc
.LFE52:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	idx(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	30(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L84:
	movq	stdin(%rip), %rdx
	movq	8(%rsp), %rdi
	movl	$10, %esi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L108
	cmpb	$48, 30(%rsp)
	je	.L108
	xorl	%esi, %esi
	movq	8(%rsp), %rdi
	pcmpeqd	%xmm0, %xmm0
	movl	$-1, %ecx
	movw	%si, 8+not0(%rip)
	movl	$10, %edx
	xorl	%esi, %esi
	leaq	len(%rip), %r14
	movw	%cx, 88+tr(%rip)
	leaq	str(%rip), %r13
	leaq	tr(%rip), %r15
	movb	$-1, 90+tr(%rip)
	leaq	not0(%rip), %r12
	movl	$0, sz(%rip)
	movq	$-1, 80+tr(%rip)
	movq	$0, not0(%rip)
	movaps	%xmm0, tr(%rip)
	movaps	%xmm0, 16+tr(%rip)
	movaps	%xmm0, 32+tr(%rip)
	movaps	%xmm0, 48+tr(%rip)
	movaps	%xmm0, 64+tr(%rip)
	call	strtol@PLT
	leaq	4(%r14), %rcx
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	leaq	(%rcx,%rdx,4), %rbp
	testl	%eax, %eax
	jle	.L97
	.p2align 4,,10
	.p2align 3
.L96:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movzbl	0(%r13), %edx
	cmpb	$32, %dl
	jle	.L88
	movslq	sz(%rip), %rsi
	movq	%r13, %rax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L93:
	movsbq	%dl, %r8
	cmpb	$0, (%r15,%r8)
	js	.L124
	movzbl	1(%rax), %edx
	addq	$1, %rax
	cmpb	$32, %dl
	jg	.L93
	testb	%r9b, %r9b
	jne	.L125
.L94:
	movb	$-1, (%rax)
	subq	%r13, %rax
	subl	$1, %eax
	movl	%eax, (%r14)
	testl	%eax, %eax
	jle	.L95
	movsbq	0(%r13), %rax
	movsbq	(%r15,%rax), %rax
	movb	$1, (%r12,%rax)
.L95:
	addq	$4, %r14
	addq	$11, %r13
	cmpq	%r14, %rbp
	jne	.L96
.L97:
	movl	sz(%rip), %edx
	xorl	%eax, %eax
	movl	$0, ans(%rip)
	movq	$0, used(%rip)
	movw	%ax, 8+used(%rip)
	testl	%edx, %edx
	je	.L126
	cmpb	$0, not0(%rip)
	leaq	assign(%rip), %rbp
	je	.L127
.L99:
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 1+used(%rip)
	movb	$1, 0(%rbp,%rax)
	call	rec
	movb	$0, 1+used(%rip)
.L100:
	cmpb	$0, 2+used(%rip)
	jne	.L101
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 2+used(%rip)
	movb	$2, 0(%rbp,%rax)
	call	rec
	movb	$0, 2+used(%rip)
.L101:
	cmpb	$0, 3+used(%rip)
	jne	.L102
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 3+used(%rip)
	movb	$3, 0(%rbp,%rax)
	call	rec
	movb	$0, 3+used(%rip)
.L102:
	cmpb	$0, 4+used(%rip)
	jne	.L103
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 4+used(%rip)
	movb	$4, 0(%rbp,%rax)
	call	rec
	movb	$0, 4+used(%rip)
.L103:
	cmpb	$0, 5+used(%rip)
	jne	.L104
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 5+used(%rip)
	movb	$5, 0(%rbp,%rax)
	call	rec
	movb	$0, 5+used(%rip)
.L104:
	cmpb	$0, 6+used(%rip)
	jne	.L105
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 6+used(%rip)
	movb	$6, 0(%rbp,%rax)
	call	rec
	movb	$0, 6+used(%rip)
.L105:
	cmpb	$0, 7+used(%rip)
	jne	.L106
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 7+used(%rip)
	movb	$7, 0(%rbp,%rax)
	call	rec
	movb	$0, 7+used(%rip)
.L106:
	cmpb	$0, 8+used(%rip)
	jne	.L107
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 8+used(%rip)
	movb	$8, 0(%rbp,%rax)
	call	rec
	movb	$0, 8+used(%rip)
.L107:
	cmpb	$0, 9+used(%rip)
	jne	.L98
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 9+used(%rip)
	movb	$9, 0(%rbp,%rax)
	call	rec
	movb	$0, 9+used(%rip)
.L98:
	movl	ans(%rip), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L124:
	addq	$1, %rax
	movb	%dl, (%rbx,%rsi)
	movzbl	(%rax), %edx
	movb	%sil, (%r15,%r8)
	leal	1(%rsi), %r8d
	cmpb	$32, %dl
	jle	.L91
	movslq	%r8d, %rsi
	movl	$1, %r9d
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L125:
	movl	%esi, %r8d
.L91:
	movl	%r8d, sz(%rip)
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L88:
	movb	$-1, 0(%r13)
	movl	$-1, (%r14)
	jmp	.L95
.L127:
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, used(%rip)
	movb	$0, 0(%rbp,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L100
	jmp	.L99
.L108:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L128
	addq	$56, %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
.L126:
	.cfi_restore_state
	xorl	%eax, %eax
	call	calc
	jmp	.L98
.L128:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	used
	.align 8
	.type	used, @object
	.size	used, 10
used:
	.zero	10
	.globl	not0
	.align 8
	.type	not0, @object
	.size	not0, 10
not0:
	.zero	10
	.globl	idx
	.align 8
	.type	idx, @object
	.size	idx, 10
idx:
	.zero	10
	.globl	assign
	.align 32
	.type	assign, @object
	.size	assign, 91
assign:
	.zero	91
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 91
tr:
	.zero	91
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 52
len:
	.zero	52
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 143
str:
	.zero	143
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.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	calc
	.type	calc, @function
calc:
.LFB51:
	.cfi_startproc
	endbr64
	movslq	m(%rip), %r10
	leaq	len(%rip), %rax
	leaq	str(%rip), %r8
	leaq	assign(%rip), %rsi
	leaq	(%r10,%r10,4), %rdx
	movslq	(%rax,%r10,4), %rax
	movq	%r10, %rcx
	leaq	(%r10,%rdx,2), %rdx
	addq	%r8, %rdx
	movsbq	(%rdx,%rax), %rax
	movsbl	(%rsi,%rax), %edi
	testl	%r10d, %r10d
	jle	.L2
	movslq	len(%rip), %rax
	movsbq	(%r8,%rax), %rax
	movsbl	(%rsi,%rax), %eax
	cmpl	$1, %r10d
	je	.L3
	movslq	4+len(%rip), %rdx
	movsbq	11(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$2, %r10d
	je	.L3
	movslq	8+len(%rip), %rdx
	movsbq	22(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$3, %r10d
	je	.L3
	movslq	12+len(%rip), %rdx
	movsbq	33(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$4, %r10d
	je	.L3
	movslq	16+len(%rip), %rdx
	movsbq	44(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$5, %r10d
	je	.L3
	movslq	20+len(%rip), %rdx
	movsbq	55(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$6, %r10d
	je	.L3
	movslq	24+len(%rip), %rdx
	movsbq	66(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$7, %r10d
	je	.L3
	movslq	28+len(%rip), %rdx
	movsbq	77(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$8, %r10d
	je	.L3
	movslq	32+len(%rip), %rdx
	movsbq	88(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$9, %r10d
	je	.L3
	movslq	36+len(%rip), %rdx
	movsbq	99(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$10, %r10d
	je	.L3
	movslq	40+len(%rip), %rdx
	movsbq	110(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$11, %r10d
	je	.L3
	movslq	44+len(%rip), %rdx
	movsbq	121(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
	cmpl	$12, %r10d
	je	.L3
	movslq	48+len(%rip), %rdx
	movsbq	132(%r8,%rdx), %rdx
	movsbl	(%rsi,%rdx), %edx
	addl	%edx, %eax
.L3:
	movslq	%eax, %rdx
	movl	%eax, %r9d
	imulq	$1717986919, %rdx, %rdx
	sarl	$31, %r9d
	sarq	$34, %rdx
	subl	%r9d, %edx
	leal	(%rdx,%rdx,4), %edx
	addl	%edx, %edx
	subl	%edx, %eax
	cmpl	%edi, %eax
	jne	.L1
	leal	-1(%rcx), %eax
	leaq	str(%rip), %rdi
	xorl	%r9d, %r9d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,2), %r11
	leaq	11(%rdi), %rax
	addq	%rax, %r11
	.p2align 4,,10
	.p2align 3
.L6:
	movsbq	(%rdi), %rax
	movq	%rdi, %rcx
	testb	%al, %al
	js	.L4
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L5:
	movsbl	(%rsi,%rax), %eax
	leal	(%rdx,%rdx,4), %edx
	addq	$1, %rcx
	leal	(%rax,%rdx,2), %edx
	movsbq	(%rcx), %rax
	testb	%al, %al
	jns	.L5
	addl	%edx, %r9d
.L4:
	addq	$11, %rdi
	cmpq	%rdi, %r11
	jne	.L6
	leaq	(%r10,%r10,4), %rax
	leaq	(%r10,%rax,2), %rdx
	addq	%r8, %rdx
	movsbq	(%rdx), %rax
	testb	%al, %al
	js	.L14
.L12:
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L8:
	movsbl	(%rsi,%rax), %eax
	leal	(%rcx,%rcx,4), %ecx
	addq	$1, %rdx
	leal	(%rax,%rcx,2), %ecx
	movsbq	(%rdx), %rax
	testb	%al, %al
	jns	.L8
.L7:
	cmpl	%r9d, %ecx
	je	.L13
.L1:
	ret
.L2:
	testb	%dil, %dil
	jne	.L1
	movsbq	(%rdx), %rax
	xorl	%r9d, %r9d
	testb	%al, %al
	jns	.L12
.L13:
	addl	$1, ans(%rip)
	ret
.L14:
	xorl	%ecx, %ecx
	jmp	.L7
	.cfi_endproc
.LFE51:
	.size	calc, .-calc
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L72
	cmpb	$0, used(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	jne	.L60
	movslq	%edi, %rax
	leaq	not0(%rip), %rdx
	cmpb	$0, (%rdx,%rax)
	je	.L73
.L60:
	cmpb	$0, 1+used(%rip)
	je	.L74
.L61:
	cmpb	$0, 2+used(%rip)
	je	.L75
.L62:
	cmpb	$0, 3+used(%rip)
	je	.L76
.L63:
	cmpb	$0, 4+used(%rip)
	je	.L77
.L64:
	cmpb	$0, 5+used(%rip)
	je	.L78
.L65:
	cmpb	$0, 6+used(%rip)
	je	.L79
.L66:
	cmpb	$0, 7+used(%rip)
	je	.L80
.L67:
	cmpb	$0, 8+used(%rip)
	je	.L81
.L68:
	cmpb	$0, 9+used(%rip)
	je	.L82
.L58:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L82:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	idx(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 9+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$9, (%rdx,%rax)
	call	rec
	movb	$0, 9+used(%rip)
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L74:
	.cfi_restore_state
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 1+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$1, (%rdx,%rax)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L62
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 2+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$2, (%rdx,%rax)
	call	rec
	cmpb	$0, 3+used(%rip)
	movb	$0, 2+used(%rip)
	jne	.L63
	.p2align 4,,10
	.p2align 3
.L76:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 3+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$3, (%rdx,%rax)
	call	rec
	cmpb	$0, 4+used(%rip)
	movb	$0, 3+used(%rip)
	jne	.L64
	.p2align 4,,10
	.p2align 3
.L77:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 4+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$4, (%rdx,%rax)
	call	rec
	cmpb	$0, 5+used(%rip)
	movb	$0, 4+used(%rip)
	jne	.L65
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 5+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$5, (%rdx,%rax)
	call	rec
	cmpb	$0, 6+used(%rip)
	movb	$0, 5+used(%rip)
	jne	.L66
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 6+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$6, (%rdx,%rax)
	call	rec
	cmpb	$0, 7+used(%rip)
	movb	$0, 6+used(%rip)
	jne	.L67
	.p2align 4,,10
	.p2align 3
.L80:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 7+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$7, (%rdx,%rax)
	call	rec
	cmpb	$0, 8+used(%rip)
	movb	$0, 7+used(%rip)
	jne	.L68
	.p2align 4,,10
	.p2align 3
.L81:
	leaq	idx(%rip), %rdx
	movslq	%ebx, %rax
	leal	1(%rbx), %edi
	movb	$1, 8+used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$8, (%rdx,%rax)
	call	rec
	cmpb	$0, 9+used(%rip)
	movb	$0, 8+used(%rip)
	jne	.L58
	jmp	.L82
	.p2align 4,,10
	.p2align 3
.L73:
	leaq	idx(%rip), %rdx
	leal	1(%rdi), %edi
	movb	$1, used(%rip)
	movsbq	(%rdx,%rax), %rax
	leaq	assign(%rip), %rdx
	movb	$0, (%rdx,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L61
	jmp	.L74
	.p2align 4,,10
	.p2align 3
.L72:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	xorl	%eax, %eax
	jmp	calc
	.cfi_endproc
.LFE52:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	idx(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	30(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L84:
	movq	stdin(%rip), %rdx
	movq	8(%rsp), %rdi
	movl	$10, %esi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L108
	cmpb	$48, 30(%rsp)
	je	.L108
	xorl	%esi, %esi
	movq	8(%rsp), %rdi
	pcmpeqd	%xmm0, %xmm0
	movl	$-1, %ecx
	movw	%si, 8+not0(%rip)
	movl	$10, %edx
	xorl	%esi, %esi
	leaq	len(%rip), %r14
	movw	%cx, 88+tr(%rip)
	leaq	str(%rip), %r13
	leaq	tr(%rip), %r15
	movb	$-1, 90+tr(%rip)
	leaq	not0(%rip), %r12
	movl	$0, sz(%rip)
	movq	$-1, 80+tr(%rip)
	movq	$0, not0(%rip)
	movaps	%xmm0, tr(%rip)
	movaps	%xmm0, 16+tr(%rip)
	movaps	%xmm0, 32+tr(%rip)
	movaps	%xmm0, 48+tr(%rip)
	movaps	%xmm0, 64+tr(%rip)
	call	strtol@PLT
	leaq	4(%r14), %rcx
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	leaq	(%rcx,%rdx,4), %rbp
	testl	%eax, %eax
	jle	.L97
	.p2align 4,,10
	.p2align 3
.L96:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%r13, %rdi
	call	fgets@PLT
	movzbl	0(%r13), %edx
	cmpb	$32, %dl
	jle	.L88
	movslq	sz(%rip), %rsi
	movq	%r13, %rax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L93:
	movsbq	%dl, %r8
	cmpb	$0, (%r15,%r8)
	js	.L124
	movzbl	1(%rax), %edx
	addq	$1, %rax
	cmpb	$32, %dl
	jg	.L93
	testb	%r9b, %r9b
	jne	.L125
.L94:
	movb	$-1, (%rax)
	subq	%r13, %rax
	subl	$1, %eax
	movl	%eax, (%r14)
	testl	%eax, %eax
	jle	.L95
	movsbq	0(%r13), %rax
	movsbq	(%r15,%rax), %rax
	movb	$1, (%r12,%rax)
.L95:
	addq	$4, %r14
	addq	$11, %r13
	cmpq	%r14, %rbp
	jne	.L96
.L97:
	movl	sz(%rip), %edx
	xorl	%eax, %eax
	movl	$0, ans(%rip)
	movq	$0, used(%rip)
	movw	%ax, 8+used(%rip)
	testl	%edx, %edx
	je	.L126
	cmpb	$0, not0(%rip)
	leaq	assign(%rip), %rbp
	je	.L127
.L99:
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 1+used(%rip)
	movb	$1, 0(%rbp,%rax)
	call	rec
	movb	$0, 1+used(%rip)
.L100:
	cmpb	$0, 2+used(%rip)
	jne	.L101
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 2+used(%rip)
	movb	$2, 0(%rbp,%rax)
	call	rec
	movb	$0, 2+used(%rip)
.L101:
	cmpb	$0, 3+used(%rip)
	jne	.L102
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 3+used(%rip)
	movb	$3, 0(%rbp,%rax)
	call	rec
	movb	$0, 3+used(%rip)
.L102:
	cmpb	$0, 4+used(%rip)
	jne	.L103
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 4+used(%rip)
	movb	$4, 0(%rbp,%rax)
	call	rec
	movb	$0, 4+used(%rip)
.L103:
	cmpb	$0, 5+used(%rip)
	jne	.L104
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 5+used(%rip)
	movb	$5, 0(%rbp,%rax)
	call	rec
	movb	$0, 5+used(%rip)
.L104:
	cmpb	$0, 6+used(%rip)
	jne	.L105
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 6+used(%rip)
	movb	$6, 0(%rbp,%rax)
	call	rec
	movb	$0, 6+used(%rip)
.L105:
	cmpb	$0, 7+used(%rip)
	jne	.L106
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 7+used(%rip)
	movb	$7, 0(%rbp,%rax)
	call	rec
	movb	$0, 7+used(%rip)
.L106:
	cmpb	$0, 8+used(%rip)
	jne	.L107
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 8+used(%rip)
	movb	$8, 0(%rbp,%rax)
	call	rec
	movb	$0, 8+used(%rip)
.L107:
	cmpb	$0, 9+used(%rip)
	jne	.L98
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, 9+used(%rip)
	movb	$9, 0(%rbp,%rax)
	call	rec
	movb	$0, 9+used(%rip)
.L98:
	movl	ans(%rip), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L84
	.p2align 4,,10
	.p2align 3
.L124:
	addq	$1, %rax
	movb	%dl, (%rbx,%rsi)
	movzbl	(%rax), %edx
	movb	%sil, (%r15,%r8)
	leal	1(%rsi), %r8d
	cmpb	$32, %dl
	jle	.L91
	movslq	%r8d, %rsi
	movl	$1, %r9d
	jmp	.L93
	.p2align 4,,10
	.p2align 3
.L125:
	movl	%esi, %r8d
.L91:
	movl	%r8d, sz(%rip)
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L88:
	movb	$-1, 0(%r13)
	movl	$-1, (%r14)
	jmp	.L95
.L127:
	movsbq	(%rbx), %rax
	movl	$1, %edi
	movb	$1, used(%rip)
	movb	$0, 0(%rbp,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L100
	jmp	.L99
.L108:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L128
	addq	$56, %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
.L126:
	.cfi_restore_state
	xorl	%eax, %eax
	call	calc
	jmp	.L98
.L128:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	used
	.align 8
	.type	used, @object
	.size	used, 10
used:
	.zero	10
	.globl	not0
	.align 8
	.type	not0, @object
	.size	not0, 10
not0:
	.zero	10
	.globl	idx
	.align 8
	.type	idx, @object
	.size	idx, 10
idx:
	.zero	10
	.globl	assign
	.align 32
	.type	assign, @object
	.size	assign, 91
assign:
	.zero	91
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 91
tr:
	.zero	91
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 52
len:
	.zero	52
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 143
str:
	.zero	143
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.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 1161: Verbal Arithmetic
// 2018.1.9 bal4u@uu

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

int m, sz;
char str[13][11]; int len[13];
char tr['Z'+1], assign['Z'+1];
char idx[10], not0[10], used[10];
int ans;

void calc()
{
	int i, a, s;
	char *p;

	// 下一桁の合計で枝刈りしてみる
	s = 0; for (i = 0; i < m; i++) s += assign[str[i][len[i]]];
	a = assign[str[m][len[m]]];
	if (s % 10 != a) return;

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i];
		while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
		s += a;
	}

	a = 0, p = str[m];
	while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
	if (a == s) ans++;
}

void rec(int k)
{
	int i;

	if (k == sz) { calc(); return; }
	if (!used[0]) {
		if (!not0[k]) used[0] = 1, assign[idx[k]] = 0, rec(k+1), used[0] = 0;
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[idx[k]] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int n, i;
	char buf[10], *p;

	while (fgets(buf, 10, stdin) && *buf != '0') {
		sz = 0, memset(tr, -1, sizeof(tr));
		memset(not0, 0, sizeof(not0));
		n = atoi(buf), m = n - 1;
		for (i = 0; i < n; i++) {
			fgets(str[i], 15, stdin);
			for (p = str[i]; *p > ' '; p++) {
				if (tr[*p] < 0) tr[*p] = sz, idx[sz++] = *p;
			}
			*p = -1; len[i] = p-str[i]-1;
			if (len[i] > 0) not0[tr[*str[i]]] = 1;
		}
		ans = 0;
		memset(used, 0, sizeof(used));
		rec(0);
		printf("%d\n", ans);
	}
	return 0;
}

3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TWO
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
G
G
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
G
H
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BSET
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TWO
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
G
G
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BSET
GAMER
4
A
B
B
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TWO
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
F
G
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
FIVE
3
MOV
POP
IDV
9
A
B
C
D
E
E
G
I
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
FIVE
3
MOV
POP
IDV
9
A
B
C
C
E
E
G
H
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
FIVE
3
MOV
POP
IDV
9
A
B
C
C
E
E
H
H
IJ
0
 3
MCA
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
EVIF
3
MOV
POP
IDV
9
A
B
C
C
E
E
H
H
IJ
0
 3
MCA
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TWO
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
G
G
IJ
0
 3
ACM
IBM
ICPC
3
GAME
BEST
GAMER
4
A
B
C
AB
3
A
B
CD
3
ONE
TWO
THREE
3
TOW
THREE
FIVE
3
MOV
POP
DIV
9
A
B
C
D
E
F
G
H
HJ
0

4
1
8
30
0
0
0
32400
 4
1
8
30
0
0
0
40320
 4
0
8
30
0
0
0
32400
 4
0
1
30
0
0
0
32400
 4
1
8
30
0
0
0
19200
 4
1
8
30
0
0
0
16512
 4
1
8
30
0
0
0
5712
 0
1
8
30
0
0
0
5712
 0
1
8
30
0
0
0
32400
 4
1
8
30
0
0
0
35280

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

```c
// AOJ 1161: Verbal Arithmetic
// 2018.1.9 bal4u@uu

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

int m, sz;
char str[13][11]; int len[13];
char tr['Z'+1], assign['Z'+1];
char idx[10], not0[10], used[10];
int ans;

void calc()
{
	int i, a, s;
	char *p;

	// 下一桁の合計で枝刈りしてみる
	s = 0; for (i = 0; i < m; i++) s += assign[str[i][len[i]]];
	a = assign[str[m][len[m]]];
	if (s % 10 != a) return;

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i];
		while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
		s += a;
	}

	a = 0, p = str[m];
	while (*p >= 0) a = (a<<3) + (a<<1) + assign[*p++];
	if (a == s) ans++;
}

void rec(int k)
{
	int i;

	if (k == sz) { calc(); return; }
	if (!used[0]) {
		if (!not0[k]) used[0] = 1, assign[idx[k]] = 0, rec(k+1), used[0] = 0;
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[idx[k]] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int n, i;
	char buf[10], *p;

	while (fgets(buf, 10, stdin) && *buf != '0') {
		sz = 0, memset(tr, -1, sizeof(tr));
		memset(not0, 0, sizeof(not0));
		n = atoi(buf), m = n - 1;
		for (i = 0; i < n; i++) {
			fgets(str[i], 15, stdin);
			for (p = str[i]; *p > ' '; p++) {
				if (tr[*p] < 0) tr[*p] = sz, idx[sz++] = *p;
			}
			*p = -1; len[i] = p-str[i]-1;
			if (len[i] > 0) not0[tr[*str[i]]] = 1;
		}
		ans = 0;
		memset(used, 0, sizeof(used));
		rec(0);
		printf("%d\n", ans);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 143
str:
	.zero	143
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 52
len:
	.zero	52
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 91
tr:
	.zero	91
	.globl	assign
	.align 32
	.type	assign, @object
	.size	assign, 91
assign:
	.zero	91
	.globl	idx
	.align 8
	.type	idx, @object
	.size	idx, 10
idx:
	.zero	10
	.globl	not0
	.align 8
	.type	not0, @object
	.size	not0, 10
not0:
	.zero	10
	.globl	used
	.align 8
	.type	used, @object
	.size	used, 10
used:
	.zero	10
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L3
	movl	m(%rip), %eax
	movl	m(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	%edx, -16(%rbp)
	jne	.L12
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L6
.L9:
	movl	$0, -16(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L7:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L8
	movl	-16(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -16(%rbp)
	movl	m(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L11
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jne	.L1
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	calc, .-calc
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	sz(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L14
	movl	$0, %eax
	call	calc
	jmp	.L13
.L14:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L16
	movb	$1, used(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movb	$0, used(%rip)
.L16:
	movl	$1, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	cltq
	leaq	assign(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L19
.L21:
	nop
.L19:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$9, -4(%rbp)
	jle	.L20
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L31:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tr(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$10, %edx
	movl	$0, %esi
	leaq	not0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-18(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -40(%rbp)
	jmp	.L24
.L29:
	movq	stdin(%rip), %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rdx
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L25
.L27:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L26
	movl	sz(%rip), %edx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	leaq	idx(%rip), %rcx
	movb	%dl, (%rax,%rcx)
.L26:
	addq	$1, -32(%rbp)
.L25:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L27
	movq	-32(%rbp), %rax
	movb	$-1, (%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	subq	%rdx, %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L28
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	leaq	str(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	not0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L28:
	addl	$1, -40(%rbp)
.L24:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$0, ans(%rip)
	movl	$10, %edx
	movl	$0, %esi
	leaq	used(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L30
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L31
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	m
	.bss
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	str
	.align 32
	.type	str, @object
	.size	str, 143
str:
	.zero	143
	.globl	len
	.align 32
	.type	len, @object
	.size	len, 52
len:
	.zero	52
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 91
tr:
	.zero	91
	.globl	assign
	.align 32
	.type	assign, @object
	.size	assign, 91
assign:
	.zero	91
	.globl	idx
	.align 8
	.type	idx, @object
	.size	idx, 10
idx:
	.zero	10
	.globl	not0
	.align 8
	.type	not0, @object
	.size	not0, 10
not0:
	.zero	10
	.globl	used
	.align 8
	.type	used, @object
	.size	used, 10
used:
	.zero	10
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	calc
	.type	calc, @function
calc:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L2
.L3:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L3
	movl	m(%rip), %eax
	movl	m(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	len(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	str(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	movl	-12(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	cmpl	%edx, -16(%rbp)
	jne	.L12
	movl	$0, -12(%rbp)
	movl	$0, -20(%rbp)
	jmp	.L6
.L9:
	movl	$0, -16(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L7
.L8:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L7:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L8
	movl	-16(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -20(%rbp)
.L6:
	movl	m(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, -16(%rbp)
	movl	m(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L10
.L11:
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L10:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jns	.L11
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jne	.L1
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
	jmp	.L1
.L12:
	nop
.L1:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	calc, .-calc
	.globl	rec
	.type	rec, @function
rec:
.LFB7:
	.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
	movl	%edi, -20(%rbp)
	movl	sz(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L14
	movl	$0, %eax
	call	calc
	jmp	.L13
.L14:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L16
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L16
	movb	$1, used(%rip)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movb	$0, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movb	$0, used(%rip)
.L16:
	movl	$1, -4(%rbp)
	jmp	.L17
.L20:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	idx(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movl	%edx, %ecx
	cltq
	leaq	assign(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L19
.L21:
	nop
.L19:
	addl	$1, -4(%rbp)
.L17:
	cmpl	$9, -4(%rbp)
	jle	.L20
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L23
.L31:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tr(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$10, %edx
	movl	$0, %esi
	leaq	not0(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-18(%rbp), %rax
	movq	%rax, %rdi
	call	atoi@PLT
	movl	%eax, -36(%rbp)
	movl	-36(%rbp), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -40(%rbp)
	jmp	.L24
.L29:
	movq	stdin(%rip), %rcx
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rcx, %rdx
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, -32(%rbp)
	jmp	.L25
.L27:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L26
	movl	sz(%rip), %edx
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	cltq
	leaq	idx(%rip), %rcx
	movb	%dl, (%rax,%rcx)
.L26:
	addq	$1, -32(%rbp)
.L25:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L27
	movq	-32(%rbp), %rax
	movb	$-1, (%rax)
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	str(%rip), %rdx
	addq	%rax, %rdx
	movq	-32(%rbp), %rax
	subq	%rdx, %rax
	subl	$1, %eax
	movl	%eax, %ecx
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-40(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jle	.L28
	movl	-40(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rax, %rdx
	leaq	str(%rip), %rax
	movzbl	(%rdx,%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	not0(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L28:
	addl	$1, -40(%rbp)
.L24:
	movl	-40(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jl	.L29
	movl	$0, ans(%rip)
	movl	$10, %edx
	movl	$0, %esi
	leaq	used(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L23:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L30
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L31
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
