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 n, m, sz;
char str[13][11]; int len[13];
char tr[128];
char assign[10], not0[10];
char used[10];
int ans;

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

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i]; j = len[i];
		while (j--) {
			c = assign[tr[*p++]];
			a = (a<<3) + (a<<1) + c++;
		}
		s += a;
//printf("[%d], a %d, s %d\n", i, a, s);
	}

	a = 0, p = str[m]; j = len[m];
	while (j--) {
		c = assign[tr[*p++]];
		a = (a<<3) + (a<<1) + c++;
	}
//printf("[%d], a %d, s %d\n", i, a, s);
//exit(1);
	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[k] = 0, rec(k+1), used[0] = 0;
		}
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[k] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int 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++;
			}
			*p = 0, len[i] = p-str[i];
			if (len[i] > 1) 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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.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, 128
tr:
	.zero	128
	.globl	assign
	.align 8
	.type	assign, @object
	.size	assign, 10
assign:
	.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, -20(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	$0, -16(%rbp)
	movl	-28(%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)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L3:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L4
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -28(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	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)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L6:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	nop
	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	.L11
	movl	$0, %eax
	call	calc
	jmp	.L10
.L11:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L13
	movb	$1, used(%rip)
	movl	-20(%rbp), %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)
.L13:
	movl	$1, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	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	.L16
.L18:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	cmpl	$9, -4(%rbp)
	jle	.L17
.L10:
	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	.L20
.L28:
	movl	$0, sz(%rip)
	movl	$128, %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, n(%rip)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -36(%rbp)
	jmp	.L21
.L26:
	movq	stdin(%rip), %rcx
	movl	-36(%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	-36(%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	.L22
.L24:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L23
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
.L23:
	addq	$1, -32(%rbp)
.L22:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L24
	movq	-32(%rbp), %rax
	movb	$0, (%rax)
	movl	-36(%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
	movl	%eax, %ecx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L25
	movl	-36(%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)
.L25:
	addl	$1, -36(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L26
	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
.L20:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L27
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movslq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	testl	%r12d, %r12d
	jle	.L2
	leaq	len(%rip), %r13
	leaq	str(%rip), %r9
	xorl	%ebx, %ebx
	leal	-1(%r12), %eax
	leaq	4(%r13), %rdx
	movq	%r13, %r10
	movq	%r9, %r11
	leaq	(%rdx,%rax,4), %rbp
	leaq	assign(%rip), %r8
	leaq	tr(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%r10), %esi
	movq	%r11, %rax
	testl	%esi, %esi
	je	.L3
	addq	%r11, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %rax
	leal	(%rdx,%rdx,4), %ecx
	movsbq	-1(%rax), %rdx
	movsbq	(%rdi,%rdx), %rdx
	movsbl	(%r8,%rdx), %edx
	leal	(%rdx,%rcx,2), %edx
	cmpq	%rsi, %rax
	jne	.L4
	addl	%edx, %ebx
.L3:
	addq	$4, %r10
	addq	$11, %r11
	cmpq	%r10, %rbp
	jne	.L5
	leaq	(%r12,%r12,4), %rax
	leaq	(%r12,%rax,2), %rax
	addq	%rax, %r9
	movl	0(%r13,%r12,4), %eax
	testl	%eax, %eax
	je	.L6
.L9:
	leaq	(%r9,%rax), %rdi
	leaq	assign(%rip), %rsi
	xorl	%eax, %eax
	leaq	tr(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %r9
	leal	(%rax,%rax,4), %edx
	movsbq	-1(%r9), %rax
	movsbq	(%rcx,%rax), %rax
	movsbl	(%rsi,%rax), %eax
	leal	(%rax,%rdx,2), %eax
	cmpq	%rdi, %r9
	jne	.L7
.L6:
	cmpl	%eax, %ebx
	je	.L10
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	(%r12,%r12,4), %rax
	xorl	%ebx, %ebx
	leaq	(%r12,%rax,2), %r9
	leaq	str(%rip), %rax
	addq	%rax, %r9
	leaq	len(%rip), %rax
	movl	(%rax,%r12,4), %eax
	testl	%eax, %eax
	jne	.L9
.L10:
	popq	%rbx
	.cfi_def_cfa_offset 32
	addl	$1, ans(%rip)
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	calc, .-calc
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L37
	cmpb	$0, used(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	jne	.L25
	movslq	%edi, %rax
	leaq	not0(%rip), %rdx
	cmpb	$0, (%rdx,%rax)
	je	.L38
.L25:
	cmpb	$0, 1+used(%rip)
	je	.L39
.L26:
	cmpb	$0, 2+used(%rip)
	je	.L40
.L27:
	cmpb	$0, 3+used(%rip)
	je	.L41
.L28:
	cmpb	$0, 4+used(%rip)
	je	.L42
.L29:
	cmpb	$0, 5+used(%rip)
	je	.L43
.L30:
	cmpb	$0, 6+used(%rip)
	je	.L44
.L31:
	cmpb	$0, 7+used(%rip)
	je	.L45
.L32:
	cmpb	$0, 8+used(%rip)
	je	.L46
.L33:
	cmpb	$0, 9+used(%rip)
	je	.L47
.L23:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 9+used(%rip)
	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
.L39:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 1+used(%rip)
	movb	$1, (%rdx,%rax)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L40:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 2+used(%rip)
	movb	$2, (%rdx,%rax)
	call	rec
	cmpb	$0, 3+used(%rip)
	movb	$0, 2+used(%rip)
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 3+used(%rip)
	movb	$3, (%rdx,%rax)
	call	rec
	cmpb	$0, 4+used(%rip)
	movb	$0, 3+used(%rip)
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 4+used(%rip)
	movb	$4, (%rdx,%rax)
	call	rec
	cmpb	$0, 5+used(%rip)
	movb	$0, 4+used(%rip)
	jne	.L30
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 5+used(%rip)
	movb	$5, (%rdx,%rax)
	call	rec
	cmpb	$0, 6+used(%rip)
	movb	$0, 5+used(%rip)
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 6+used(%rip)
	movb	$6, (%rdx,%rax)
	call	rec
	cmpb	$0, 7+used(%rip)
	movb	$0, 6+used(%rip)
	jne	.L32
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 7+used(%rip)
	movb	$7, (%rdx,%rax)
	call	rec
	cmpb	$0, 8+used(%rip)
	movb	$0, 7+used(%rip)
	jne	.L33
	.p2align 4,,10
	.p2align 3
.L46:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 8+used(%rip)
	movb	$8, (%rdx,%rax)
	call	rec
	cmpb	$0, 9+used(%rip)
	movb	$0, 8+used(%rip)
	jne	.L23
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L38:
	leaq	assign(%rip), %rdx
	leal	1(%rdi), %edi
	movb	$1, used(%rip)
	movb	$0, (%rdx,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L26
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L37:
	.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
	leaq	used(%rip), %r13
	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
	movl	$1, %ebx
	movl	%ebx, %r14d
	subl	%r13d, %r14d
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	46(%rsp), %rax
	movq	%rax, 24(%rsp)
.L49:
	movq	stdin(%rip), %rdx
	movq	24(%rsp), %rdi
	movl	$10, %esi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L193
	cmpb	$48, 46(%rsp)
	je	.L193
	xorl	%edx, %edx
	movq	24(%rsp), %rdi
	pcmpeqd	%xmm0, %xmm0
	xorl	%esi, %esi
	movw	%dx, 8+not0(%rip)
	movl	$10, %edx
	leaq	str(%rip), %rbp
	xorl	%r15d, %r15d
	movaps	%xmm0, tr(%rip)
	leaq	tr(%rip), %r12
	movl	$0, sz(%rip)
	movq	$0, not0(%rip)
	movaps	%xmm0, 16+tr(%rip)
	movaps	%xmm0, 32+tr(%rip)
	movaps	%xmm0, 48+tr(%rip)
	movaps	%xmm0, 64+tr(%rip)
	movaps	%xmm0, 80+tr(%rip)
	movaps	%xmm0, 96+tr(%rip)
	movaps	%xmm0, 112+tr(%rip)
	call	strtol@PLT
	leal	-1(%rax), %edx
	movl	%eax, n(%rip)
	movl	%edx, m(%rip)
	testl	%eax, %eax
	jle	.L62
.L61:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	movsbq	0(%rbp), %rax
	cmpb	$32, %al
	jle	.L53
	movl	sz(%rip), %esi
	movq	%rbp, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L58:
	cmpb	$0, (%r12,%rax)
	js	.L225
	movsbq	1(%rdx), %rax
	addq	$1, %rdx
	cmpb	$32, %al
	jg	.L58
	testb	%dil, %dil
	jne	.L226
.L59:
	movb	$0, (%rdx)
	leaq	len(%rip), %rax
	subq	%rbp, %rdx
	movl	%edx, (%rax,%r15,4)
	cmpl	$1, %edx
	jle	.L60
	movsbq	0(%rbp), %rax
	leaq	not0(%rip), %rcx
	movsbq	(%r12,%rax), %rax
	movb	$1, (%rcx,%rax)
.L60:
	addq	$1, %r15
	addq	$11, %rbp
	cmpl	%r15d, n(%rip)
	jg	.L61
.L62:
	movl	$0, ans(%rip)
	xorl	%eax, %eax
	movw	%ax, 8+used(%rip)
	movl	sz(%rip), %eax
	movq	$0, used(%rip)
	testl	%eax, %eax
	je	.L227
	cmpb	$0, not0(%rip)
	je	.L228
.L64:
	leaq	9+used(%rip), %rbp
	leaq	-9(%rbp), %rax
	movq	%rax, 8(%rsp)
	jmp	.L192
.L77:
	cmpb	$0, 1+used(%rip)
	jne	.L184
	movl	$2, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 1+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L184:
	cmpb	$0, 2+used(%rip)
	jne	.L185
	movl	$2, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 1+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L185:
	cmpb	$0, 3+used(%rip)
	jne	.L186
	movl	$2, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 1+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L186:
	cmpb	$0, 4+used(%rip)
	jne	.L187
	movl	$2, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 1+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L187:
	cmpb	$0, 5+used(%rip)
	jne	.L188
	movl	$2, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 1+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L188:
	cmpb	$0, 6+used(%rip)
	jne	.L189
	movl	$2, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 1+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L189:
	cmpb	$0, 7+used(%rip)
	jne	.L190
	movl	$2, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 1+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L190:
	cmpb	$0, 8+used(%rip)
	jne	.L191
	movl	$2, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 1+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L191:
	cmpb	$0, 9+used(%rip)
	jne	.L76
	movl	$2, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 1+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L76:
	movq	8(%rsp), %rax
	movb	$0, 1(%rax)
.L74:
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rax
	cmpq	%rax, %rbp
	je	.L63
.L192:
	movq	8(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L74
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$1, %eax
	je	.L229
	movzbl	0(%r13), %edx
	orb	1+not0(%rip), %dl
	jne	.L77
	movb	%bl, used(%rip)
	movb	$0, 1+assign(%rip)
	movq	%r13, 16(%rsp)
	cmpl	$2, %eax
	je	.L230
.L78:
	movq	16(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L80
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, 2+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$3, %eax
	je	.L231
	movzbl	0(%r13), %edx
	orb	3+not0(%rip), %dl
	je	.L232
.L83:
	movq	%r13, (%rsp)
	.p2align 4,,10
	.p2align 3
.L183:
	movq	(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L127
	movl	sz(%rip), %edx
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, 3+assign(%rip)
	cmpl	$4, %edx
	je	.L233
	movzbl	0(%r13), %eax
	orb	4+not0(%rip), %al
	je	.L234
.L130:
	movq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L182:
	cmpb	$0, 1(%r12)
	jne	.L155
	movl	sz(%rip), %edx
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 4+assign(%rip)
	cmpl	$5, %edx
	je	.L235
	movzbl	0(%r13), %eax
	orb	5+not0(%rip), %al
	je	.L236
.L158:
	movq	%r13, %r15
	jmp	.L181
	.p2align 4,,10
	.p2align 3
.L172:
	cmpb	$0, 1+used(%rip)
	jne	.L173
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L173:
	cmpb	$0, 2+used(%rip)
	jne	.L174
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L174:
	cmpb	$0, 3+used(%rip)
	jne	.L175
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L175:
	cmpb	$0, 4+used(%rip)
	jne	.L176
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L176:
	cmpb	$0, 5+used(%rip)
	jne	.L177
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L177:
	cmpb	$0, 6+used(%rip)
	jne	.L178
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L178:
	cmpb	$0, 7+used(%rip)
	jne	.L179
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L179:
	cmpb	$0, 8+used(%rip)
	jne	.L180
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L180:
	cmpb	$0, 9+used(%rip)
	jne	.L171
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L171:
	movb	$0, 1(%r15)
.L169:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L157
.L181:
	cmpb	$0, 1(%r15)
	jne	.L169
	leal	(%r14,%r15), %eax
	cmpl	$6, sz(%rip)
	movb	$1, 1(%r15)
	movb	%al, 5+assign(%rip)
	je	.L237
	movzbl	0(%r13), %eax
	orb	6+not0(%rip), %al
	jne	.L172
	movl	$7, %edi
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	call	rec
	movb	$0, used(%rip)
	jmp	.L172
.L235:
	xorl	%eax, %eax
	call	calc
	.p2align 4,,10
	.p2align 3
.L157:
	movb	$0, 1(%r12)
.L155:
	addq	$1, %r12
	cmpq	%rbp, %r12
	jne	.L182
.L129:
	movq	(%rsp), %rax
	movb	$0, 1(%rax)
.L127:
	addq	$1, (%rsp)
	movq	(%rsp), %rax
	cmpq	%rbp, %rax
	jne	.L183
.L82:
	movq	16(%rsp), %rax
	movb	$0, 1(%rax)
.L80:
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	cmpq	%rax, %rbp
	jne	.L78
.L79:
	movb	$0, used(%rip)
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L225:
	addq	$1, %rdx
	movb	%sil, (%r12,%rax)
	leal	1(%rsi), %edi
	movsbq	(%rdx), %rax
	cmpb	$32, %al
	jle	.L56
	movl	%edi, %esi
	movl	$1, %edi
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L237:
	xorl	%eax, %eax
	call	calc
	jmp	.L171
.L236:
	movb	%bl, used(%rip)
	movb	$0, 5+assign(%rip)
	cmpl	$6, %edx
	je	.L238
	cmpb	$0, 1+used(%rip)
	jne	.L161
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L161:
	cmpb	$0, 2+used(%rip)
	jne	.L162
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L162:
	cmpb	$0, 3+used(%rip)
	jne	.L163
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L163:
	cmpb	$0, 4+used(%rip)
	jne	.L164
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L164:
	cmpb	$0, 5+used(%rip)
	jne	.L165
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L165:
	cmpb	$0, 6+used(%rip)
	jne	.L166
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L166:
	cmpb	$0, 7+used(%rip)
	jne	.L167
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L167:
	cmpb	$0, 8+used(%rip)
	jne	.L168
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L168:
	cmpb	$0, 9+used(%rip)
	jne	.L160
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L160:
	movb	$0, used(%rip)
	jmp	.L158
.L226:
	movl	%esi, %edi
.L56:
	movl	%edi, sz(%rip)
	jmp	.L59
.L234:
	movb	%bl, used(%rip)
	movq	%r13, %r12
	movb	$0, 4+assign(%rip)
	cmpl	$5, %edx
	jne	.L131
	jmp	.L239
.L136:
	cmpb	$0, 1+used(%rip)
	jne	.L147
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L147:
	cmpb	$0, 2+used(%rip)
	jne	.L148
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L148:
	cmpb	$0, 3+used(%rip)
	jne	.L149
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L149:
	cmpb	$0, 4+used(%rip)
	jne	.L150
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L150:
	cmpb	$0, 5+used(%rip)
	jne	.L151
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L151:
	cmpb	$0, 6+used(%rip)
	jne	.L152
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L152:
	cmpb	$0, 7+used(%rip)
	jne	.L153
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L153:
	cmpb	$0, 8+used(%rip)
	jne	.L154
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L154:
	cmpb	$0, 9+used(%rip)
	jne	.L135
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L135:
	movb	$0, 1(%r12)
.L133:
	addq	$1, %r12
	cmpq	%rbp, %r12
	je	.L132
.L131:
	cmpb	$0, 1(%r12)
	jne	.L133
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 5+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$6, %eax
	je	.L240
	movzbl	0(%r13), %edx
	orb	6+not0(%rip), %dl
	jne	.L136
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	cmpl	$7, %eax
	je	.L241
	cmpb	$0, 1+used(%rip)
	jne	.L139
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L139:
	cmpb	$0, 2+used(%rip)
	jne	.L140
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L140:
	cmpb	$0, 3+used(%rip)
	jne	.L141
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L141:
	cmpb	$0, 4+used(%rip)
	jne	.L142
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L142:
	cmpb	$0, 5+used(%rip)
	jne	.L143
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L143:
	cmpb	$0, 6+used(%rip)
	jne	.L144
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L144:
	cmpb	$0, 7+used(%rip)
	jne	.L145
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L145:
	cmpb	$0, 8+used(%rip)
	jne	.L146
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L146:
	cmpb	$0, 9+used(%rip)
	jne	.L138
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L138:
	movb	$0, used(%rip)
	jmp	.L136
.L239:
	xorl	%eax, %eax
	call	calc
.L132:
	movb	$0, used(%rip)
	jmp	.L130
.L233:
	xorl	%eax, %eax
	call	calc
	jmp	.L129
.L227:
	xorl	%eax, %eax
	call	calc
.L63:
	movl	ans(%rip), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L49
.L53:
	leaq	len(%rip), %rax
	movb	$0, 0(%rbp)
	movl	$0, (%rax,%r15,4)
	jmp	.L60
.L238:
	xorl	%eax, %eax
	call	calc
	jmp	.L160
.L240:
	xorl	%eax, %eax
	call	calc
	jmp	.L135
.L229:
	xorl	%eax, %eax
	call	calc
	jmp	.L76
.L232:
	movb	%bl, used(%rip)
	movq	%r13, %r12
	movb	$0, 3+assign(%rip)
	cmpl	$4, %eax
	je	.L242
.L84:
	cmpb	$0, 1(%r12)
	jne	.L86
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 4+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$5, %eax
	je	.L243
	movzbl	0(%r13), %edx
	orb	5+not0(%rip), %dl
	je	.L244
.L89:
	movq	%r13, %r15
	jmp	.L126
.L107:
	cmpb	$0, 1+used(%rip)
	jne	.L118
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L118:
	cmpb	$0, 2+used(%rip)
	jne	.L119
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L119:
	cmpb	$0, 3+used(%rip)
	jne	.L120
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L120:
	cmpb	$0, 4+used(%rip)
	jne	.L121
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L121:
	cmpb	$0, 5+used(%rip)
	jne	.L122
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L122:
	cmpb	$0, 6+used(%rip)
	jne	.L123
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L123:
	cmpb	$0, 7+used(%rip)
	jne	.L124
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L124:
	cmpb	$0, 8+used(%rip)
	jne	.L125
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L125:
	cmpb	$0, 9+used(%rip)
	jne	.L106
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L106:
	movb	$0, 1(%r15)
.L104:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L88
.L126:
	cmpb	$0, 1(%r15)
	jne	.L104
	leal	(%r14,%r15), %eax
	movb	$1, 1(%r15)
	movb	%al, 5+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$6, %eax
	je	.L245
	movzbl	0(%r13), %edx
	orb	6+not0(%rip), %dl
	jne	.L107
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	cmpl	$7, %eax
	je	.L246
	cmpb	$0, 1+used(%rip)
	jne	.L110
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L110:
	cmpb	$0, 2+used(%rip)
	jne	.L111
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L111:
	cmpb	$0, 3+used(%rip)
	jne	.L112
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L112:
	cmpb	$0, 4+used(%rip)
	jne	.L113
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L113:
	cmpb	$0, 5+used(%rip)
	jne	.L114
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L114:
	cmpb	$0, 6+used(%rip)
	jne	.L115
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L115:
	cmpb	$0, 7+used(%rip)
	jne	.L116
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L116:
	cmpb	$0, 8+used(%rip)
	jne	.L117
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L117:
	cmpb	$0, 9+used(%rip)
	jne	.L109
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L109:
	movb	$0, used(%rip)
	jmp	.L107
.L243:
	xorl	%eax, %eax
	call	calc
.L88:
	movb	$0, 1(%r12)
.L86:
	addq	$1, %r12
	cmpq	%r12, %rbp
	jne	.L84
.L85:
	movb	$0, used(%rip)
	jmp	.L83
.L245:
	xorl	%eax, %eax
	call	calc
	jmp	.L106
.L244:
	movb	%bl, used(%rip)
	movq	%r13, %r15
	movb	$0, 5+assign(%rip)
	cmpl	$6, %eax
	jne	.L90
	jmp	.L247
	.p2align 4,,10
	.p2align 3
.L95:
	cmpb	$0, 1+used(%rip)
	jne	.L96
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L96:
	cmpb	$0, 2+used(%rip)
	jne	.L97
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L97:
	cmpb	$0, 3+used(%rip)
	jne	.L98
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L98:
	cmpb	$0, 4+used(%rip)
	jne	.L99
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L99:
	cmpb	$0, 5+used(%rip)
	jne	.L100
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L100:
	cmpb	$0, 6+used(%rip)
	jne	.L101
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L101:
	cmpb	$0, 7+used(%rip)
	jne	.L102
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L102:
	cmpb	$0, 8+used(%rip)
	jne	.L103
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L103:
	cmpb	$0, 9+used(%rip)
	jne	.L94
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L94:
	movb	$0, 1(%r15)
.L92:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L91
.L90:
	cmpb	$0, 1(%r15)
	jne	.L92
	leal	(%r14,%r15), %eax
	cmpl	$7, sz(%rip)
	movb	$1, 1(%r15)
	movb	%al, 6+assign(%rip)
	je	.L248
	movzbl	0(%r13), %eax
	orb	7+not0(%rip), %al
	jne	.L95
	movl	$8, %edi
	movb	%bl, used(%rip)
	movb	$0, 7+assign(%rip)
	call	rec
	movb	$0, used(%rip)
	jmp	.L95
.L247:
	xorl	%eax, %eax
	call	calc
.L91:
	movb	$0, used(%rip)
	jmp	.L89
.L231:
	xorl	%eax, %eax
	call	calc
	jmp	.L82
.L246:
	xorl	%eax, %eax
	call	calc
	jmp	.L109
.L248:
	xorl	%eax, %eax
	call	calc
	jmp	.L94
.L193:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L249
	addq	$72, %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
.L230:
	.cfi_restore_state
	xorl	%eax, %eax
	call	calc
	jmp	.L79
.L241:
	xorl	%eax, %eax
	call	calc
	jmp	.L138
.L228:
	movb	%bl, used(%rip)
	movb	$0, assign(%rip)
	cmpl	$1, %eax
	je	.L250
	movl	$2, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 1+assign(%rip)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L67
	movl	$2, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 1+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L67:
	cmpb	$0, 3+used(%rip)
	jne	.L68
	movl	$2, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 1+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L68:
	cmpb	$0, 4+used(%rip)
	jne	.L69
	movl	$2, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 1+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L69:
	cmpb	$0, 5+used(%rip)
	jne	.L70
	movl	$2, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 1+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L70:
	cmpb	$0, 6+used(%rip)
	jne	.L71
	movl	$2, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 1+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L71:
	cmpb	$0, 7+used(%rip)
	jne	.L72
	movl	$2, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 1+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L72:
	cmpb	$0, 8+used(%rip)
	jne	.L73
	movl	$2, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 1+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L73:
	cmpb	$0, 9+used(%rip)
	jne	.L66
	movl	$2, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 1+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L66:
	movb	$0, used(%rip)
	jmp	.L64
.L242:
	xorl	%eax, %eax
	call	calc
	jmp	.L85
.L250:
	xorl	%eax, %eax
	call	calc
	jmp	.L66
.L249:
	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	assign
	.align 8
	.type	assign, @object
	.size	assign, 10
assign:
	.zero	10
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.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
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movslq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	testl	%r12d, %r12d
	jle	.L2
	leaq	len(%rip), %r13
	leaq	str(%rip), %r9
	xorl	%ebx, %ebx
	leal	-1(%r12), %eax
	leaq	4(%r13), %rdx
	movq	%r13, %r10
	movq	%r9, %r11
	leaq	(%rdx,%rax,4), %rbp
	leaq	assign(%rip), %r8
	leaq	tr(%rip), %rdi
	.p2align 4,,10
	.p2align 3
.L5:
	movl	(%r10), %esi
	movq	%r11, %rax
	testl	%esi, %esi
	je	.L3
	addq	%r11, %rsi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %rax
	leal	(%rdx,%rdx,4), %ecx
	movsbq	-1(%rax), %rdx
	movsbq	(%rdi,%rdx), %rdx
	movsbl	(%r8,%rdx), %edx
	leal	(%rdx,%rcx,2), %edx
	cmpq	%rsi, %rax
	jne	.L4
	addl	%edx, %ebx
.L3:
	addq	$4, %r10
	addq	$11, %r11
	cmpq	%r10, %rbp
	jne	.L5
	leaq	(%r12,%r12,4), %rax
	leaq	(%r12,%rax,2), %rax
	addq	%rax, %r9
	movl	0(%r13,%r12,4), %eax
	testl	%eax, %eax
	je	.L6
.L9:
	leaq	(%r9,%rax), %rdi
	leaq	assign(%rip), %rsi
	xorl	%eax, %eax
	leaq	tr(%rip), %rcx
	.p2align 4,,10
	.p2align 3
.L7:
	addq	$1, %r9
	leal	(%rax,%rax,4), %edx
	movsbq	-1(%r9), %rax
	movsbq	(%rcx,%rax), %rax
	movsbl	(%rsi,%rax), %eax
	leal	(%rax,%rdx,2), %eax
	cmpq	%rdi, %r9
	jne	.L7
.L6:
	cmpl	%eax, %ebx
	je	.L10
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	leaq	(%r12,%r12,4), %rax
	xorl	%ebx, %ebx
	leaq	(%r12,%rax,2), %r9
	leaq	str(%rip), %rax
	addq	%rax, %r9
	leaq	len(%rip), %rax
	movl	(%rax,%r12,4), %eax
	testl	%eax, %eax
	jne	.L9
.L10:
	popq	%rbx
	.cfi_def_cfa_offset 32
	addl	$1, ans(%rip)
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE51:
	.size	calc, .-calc
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB52:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L37
	cmpb	$0, used(%rip)
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	jne	.L25
	movslq	%edi, %rax
	leaq	not0(%rip), %rdx
	cmpb	$0, (%rdx,%rax)
	je	.L38
.L25:
	cmpb	$0, 1+used(%rip)
	je	.L39
.L26:
	cmpb	$0, 2+used(%rip)
	je	.L40
.L27:
	cmpb	$0, 3+used(%rip)
	je	.L41
.L28:
	cmpb	$0, 4+used(%rip)
	je	.L42
.L29:
	cmpb	$0, 5+used(%rip)
	je	.L43
.L30:
	cmpb	$0, 6+used(%rip)
	je	.L44
.L31:
	cmpb	$0, 7+used(%rip)
	je	.L45
.L32:
	cmpb	$0, 8+used(%rip)
	je	.L46
.L33:
	cmpb	$0, 9+used(%rip)
	je	.L47
.L23:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 9+used(%rip)
	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
.L39:
	.cfi_restore_state
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 1+used(%rip)
	movb	$1, (%rdx,%rax)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L27
	.p2align 4,,10
	.p2align 3
.L40:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 2+used(%rip)
	movb	$2, (%rdx,%rax)
	call	rec
	cmpb	$0, 3+used(%rip)
	movb	$0, 2+used(%rip)
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L41:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 3+used(%rip)
	movb	$3, (%rdx,%rax)
	call	rec
	cmpb	$0, 4+used(%rip)
	movb	$0, 3+used(%rip)
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 4+used(%rip)
	movb	$4, (%rdx,%rax)
	call	rec
	cmpb	$0, 5+used(%rip)
	movb	$0, 4+used(%rip)
	jne	.L30
	.p2align 4,,10
	.p2align 3
.L43:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 5+used(%rip)
	movb	$5, (%rdx,%rax)
	call	rec
	cmpb	$0, 6+used(%rip)
	movb	$0, 5+used(%rip)
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L44:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 6+used(%rip)
	movb	$6, (%rdx,%rax)
	call	rec
	cmpb	$0, 7+used(%rip)
	movb	$0, 6+used(%rip)
	jne	.L32
	.p2align 4,,10
	.p2align 3
.L45:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 7+used(%rip)
	movb	$7, (%rdx,%rax)
	call	rec
	cmpb	$0, 8+used(%rip)
	movb	$0, 7+used(%rip)
	jne	.L33
	.p2align 4,,10
	.p2align 3
.L46:
	movslq	%ebx, %rax
	leaq	assign(%rip), %rdx
	leal	1(%rbx), %edi
	movb	$1, 8+used(%rip)
	movb	$8, (%rdx,%rax)
	call	rec
	cmpb	$0, 9+used(%rip)
	movb	$0, 8+used(%rip)
	jne	.L23
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L38:
	leaq	assign(%rip), %rdx
	leal	1(%rdi), %edi
	movb	$1, used(%rip)
	movb	$0, (%rdx,%rax)
	call	rec
	cmpb	$0, 1+used(%rip)
	movb	$0, used(%rip)
	jne	.L26
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L37:
	.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
	leaq	used(%rip), %r13
	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
	movl	$1, %ebx
	movl	%ebx, %r14d
	subl	%r13d, %r14d
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	46(%rsp), %rax
	movq	%rax, 24(%rsp)
.L49:
	movq	stdin(%rip), %rdx
	movq	24(%rsp), %rdi
	movl	$10, %esi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L193
	cmpb	$48, 46(%rsp)
	je	.L193
	xorl	%edx, %edx
	movq	24(%rsp), %rdi
	pcmpeqd	%xmm0, %xmm0
	xorl	%esi, %esi
	movw	%dx, 8+not0(%rip)
	movl	$10, %edx
	leaq	str(%rip), %rbp
	xorl	%r15d, %r15d
	movaps	%xmm0, tr(%rip)
	leaq	tr(%rip), %r12
	movl	$0, sz(%rip)
	movq	$0, not0(%rip)
	movaps	%xmm0, 16+tr(%rip)
	movaps	%xmm0, 32+tr(%rip)
	movaps	%xmm0, 48+tr(%rip)
	movaps	%xmm0, 64+tr(%rip)
	movaps	%xmm0, 80+tr(%rip)
	movaps	%xmm0, 96+tr(%rip)
	movaps	%xmm0, 112+tr(%rip)
	call	strtol@PLT
	leal	-1(%rax), %edx
	movl	%eax, n(%rip)
	movl	%edx, m(%rip)
	testl	%eax, %eax
	jle	.L62
.L61:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%rbp, %rdi
	call	fgets@PLT
	movsbq	0(%rbp), %rax
	cmpb	$32, %al
	jle	.L53
	movl	sz(%rip), %esi
	movq	%rbp, %rdx
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L58:
	cmpb	$0, (%r12,%rax)
	js	.L225
	movsbq	1(%rdx), %rax
	addq	$1, %rdx
	cmpb	$32, %al
	jg	.L58
	testb	%dil, %dil
	jne	.L226
.L59:
	movb	$0, (%rdx)
	leaq	len(%rip), %rax
	subq	%rbp, %rdx
	movl	%edx, (%rax,%r15,4)
	cmpl	$1, %edx
	jle	.L60
	movsbq	0(%rbp), %rax
	leaq	not0(%rip), %rcx
	movsbq	(%r12,%rax), %rax
	movb	$1, (%rcx,%rax)
.L60:
	addq	$1, %r15
	addq	$11, %rbp
	cmpl	%r15d, n(%rip)
	jg	.L61
.L62:
	movl	$0, ans(%rip)
	xorl	%eax, %eax
	movw	%ax, 8+used(%rip)
	movl	sz(%rip), %eax
	movq	$0, used(%rip)
	testl	%eax, %eax
	je	.L227
	cmpb	$0, not0(%rip)
	je	.L228
.L64:
	leaq	9+used(%rip), %rbp
	leaq	-9(%rbp), %rax
	movq	%rax, 8(%rsp)
	jmp	.L192
.L77:
	cmpb	$0, 1+used(%rip)
	jne	.L184
	movl	$2, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 1+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L184:
	cmpb	$0, 2+used(%rip)
	jne	.L185
	movl	$2, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 1+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L185:
	cmpb	$0, 3+used(%rip)
	jne	.L186
	movl	$2, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 1+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L186:
	cmpb	$0, 4+used(%rip)
	jne	.L187
	movl	$2, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 1+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L187:
	cmpb	$0, 5+used(%rip)
	jne	.L188
	movl	$2, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 1+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L188:
	cmpb	$0, 6+used(%rip)
	jne	.L189
	movl	$2, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 1+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L189:
	cmpb	$0, 7+used(%rip)
	jne	.L190
	movl	$2, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 1+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L190:
	cmpb	$0, 8+used(%rip)
	jne	.L191
	movl	$2, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 1+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L191:
	cmpb	$0, 9+used(%rip)
	jne	.L76
	movl	$2, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 1+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L76:
	movq	8(%rsp), %rax
	movb	$0, 1(%rax)
.L74:
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rax
	cmpq	%rax, %rbp
	je	.L63
.L192:
	movq	8(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L74
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$1, %eax
	je	.L229
	movzbl	0(%r13), %edx
	orb	1+not0(%rip), %dl
	jne	.L77
	movb	%bl, used(%rip)
	movb	$0, 1+assign(%rip)
	movq	%r13, 16(%rsp)
	cmpl	$2, %eax
	je	.L230
.L78:
	movq	16(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L80
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, 2+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$3, %eax
	je	.L231
	movzbl	0(%r13), %edx
	orb	3+not0(%rip), %dl
	je	.L232
.L83:
	movq	%r13, (%rsp)
	.p2align 4,,10
	.p2align 3
.L183:
	movq	(%rsp), %rax
	cmpb	$0, 1(%rax)
	jne	.L127
	movl	sz(%rip), %edx
	movb	$1, 1(%rax)
	addl	%r14d, %eax
	movb	%al, 3+assign(%rip)
	cmpl	$4, %edx
	je	.L233
	movzbl	0(%r13), %eax
	orb	4+not0(%rip), %al
	je	.L234
.L130:
	movq	%r13, %r12
	.p2align 4,,10
	.p2align 3
.L182:
	cmpb	$0, 1(%r12)
	jne	.L155
	movl	sz(%rip), %edx
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 4+assign(%rip)
	cmpl	$5, %edx
	je	.L235
	movzbl	0(%r13), %eax
	orb	5+not0(%rip), %al
	je	.L236
.L158:
	movq	%r13, %r15
	jmp	.L181
	.p2align 4,,10
	.p2align 3
.L172:
	cmpb	$0, 1+used(%rip)
	jne	.L173
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L173:
	cmpb	$0, 2+used(%rip)
	jne	.L174
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L174:
	cmpb	$0, 3+used(%rip)
	jne	.L175
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L175:
	cmpb	$0, 4+used(%rip)
	jne	.L176
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L176:
	cmpb	$0, 5+used(%rip)
	jne	.L177
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L177:
	cmpb	$0, 6+used(%rip)
	jne	.L178
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L178:
	cmpb	$0, 7+used(%rip)
	jne	.L179
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L179:
	cmpb	$0, 8+used(%rip)
	jne	.L180
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L180:
	cmpb	$0, 9+used(%rip)
	jne	.L171
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L171:
	movb	$0, 1(%r15)
.L169:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L157
.L181:
	cmpb	$0, 1(%r15)
	jne	.L169
	leal	(%r14,%r15), %eax
	cmpl	$6, sz(%rip)
	movb	$1, 1(%r15)
	movb	%al, 5+assign(%rip)
	je	.L237
	movzbl	0(%r13), %eax
	orb	6+not0(%rip), %al
	jne	.L172
	movl	$7, %edi
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	call	rec
	movb	$0, used(%rip)
	jmp	.L172
.L235:
	xorl	%eax, %eax
	call	calc
	.p2align 4,,10
	.p2align 3
.L157:
	movb	$0, 1(%r12)
.L155:
	addq	$1, %r12
	cmpq	%rbp, %r12
	jne	.L182
.L129:
	movq	(%rsp), %rax
	movb	$0, 1(%rax)
.L127:
	addq	$1, (%rsp)
	movq	(%rsp), %rax
	cmpq	%rbp, %rax
	jne	.L183
.L82:
	movq	16(%rsp), %rax
	movb	$0, 1(%rax)
.L80:
	addq	$1, 16(%rsp)
	movq	16(%rsp), %rax
	cmpq	%rax, %rbp
	jne	.L78
.L79:
	movb	$0, used(%rip)
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L225:
	addq	$1, %rdx
	movb	%sil, (%r12,%rax)
	leal	1(%rsi), %edi
	movsbq	(%rdx), %rax
	cmpb	$32, %al
	jle	.L56
	movl	%edi, %esi
	movl	$1, %edi
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L237:
	xorl	%eax, %eax
	call	calc
	jmp	.L171
.L236:
	movb	%bl, used(%rip)
	movb	$0, 5+assign(%rip)
	cmpl	$6, %edx
	je	.L238
	cmpb	$0, 1+used(%rip)
	jne	.L161
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L161:
	cmpb	$0, 2+used(%rip)
	jne	.L162
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L162:
	cmpb	$0, 3+used(%rip)
	jne	.L163
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L163:
	cmpb	$0, 4+used(%rip)
	jne	.L164
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L164:
	cmpb	$0, 5+used(%rip)
	jne	.L165
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L165:
	cmpb	$0, 6+used(%rip)
	jne	.L166
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L166:
	cmpb	$0, 7+used(%rip)
	jne	.L167
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L167:
	cmpb	$0, 8+used(%rip)
	jne	.L168
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L168:
	cmpb	$0, 9+used(%rip)
	jne	.L160
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L160:
	movb	$0, used(%rip)
	jmp	.L158
.L226:
	movl	%esi, %edi
.L56:
	movl	%edi, sz(%rip)
	jmp	.L59
.L234:
	movb	%bl, used(%rip)
	movq	%r13, %r12
	movb	$0, 4+assign(%rip)
	cmpl	$5, %edx
	jne	.L131
	jmp	.L239
.L136:
	cmpb	$0, 1+used(%rip)
	jne	.L147
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L147:
	cmpb	$0, 2+used(%rip)
	jne	.L148
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L148:
	cmpb	$0, 3+used(%rip)
	jne	.L149
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L149:
	cmpb	$0, 4+used(%rip)
	jne	.L150
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L150:
	cmpb	$0, 5+used(%rip)
	jne	.L151
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L151:
	cmpb	$0, 6+used(%rip)
	jne	.L152
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L152:
	cmpb	$0, 7+used(%rip)
	jne	.L153
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L153:
	cmpb	$0, 8+used(%rip)
	jne	.L154
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L154:
	cmpb	$0, 9+used(%rip)
	jne	.L135
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L135:
	movb	$0, 1(%r12)
.L133:
	addq	$1, %r12
	cmpq	%rbp, %r12
	je	.L132
.L131:
	cmpb	$0, 1(%r12)
	jne	.L133
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 5+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$6, %eax
	je	.L240
	movzbl	0(%r13), %edx
	orb	6+not0(%rip), %dl
	jne	.L136
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	cmpl	$7, %eax
	je	.L241
	cmpb	$0, 1+used(%rip)
	jne	.L139
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L139:
	cmpb	$0, 2+used(%rip)
	jne	.L140
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L140:
	cmpb	$0, 3+used(%rip)
	jne	.L141
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L141:
	cmpb	$0, 4+used(%rip)
	jne	.L142
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L142:
	cmpb	$0, 5+used(%rip)
	jne	.L143
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L143:
	cmpb	$0, 6+used(%rip)
	jne	.L144
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L144:
	cmpb	$0, 7+used(%rip)
	jne	.L145
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L145:
	cmpb	$0, 8+used(%rip)
	jne	.L146
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L146:
	cmpb	$0, 9+used(%rip)
	jne	.L138
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L138:
	movb	$0, used(%rip)
	jmp	.L136
.L239:
	xorl	%eax, %eax
	call	calc
.L132:
	movb	$0, used(%rip)
	jmp	.L130
.L233:
	xorl	%eax, %eax
	call	calc
	jmp	.L129
.L227:
	xorl	%eax, %eax
	call	calc
.L63:
	movl	ans(%rip), %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L49
.L53:
	leaq	len(%rip), %rax
	movb	$0, 0(%rbp)
	movl	$0, (%rax,%r15,4)
	jmp	.L60
.L238:
	xorl	%eax, %eax
	call	calc
	jmp	.L160
.L240:
	xorl	%eax, %eax
	call	calc
	jmp	.L135
.L229:
	xorl	%eax, %eax
	call	calc
	jmp	.L76
.L232:
	movb	%bl, used(%rip)
	movq	%r13, %r12
	movb	$0, 3+assign(%rip)
	cmpl	$4, %eax
	je	.L242
.L84:
	cmpb	$0, 1(%r12)
	jne	.L86
	leal	(%r14,%r12), %eax
	movb	$1, 1(%r12)
	movb	%al, 4+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$5, %eax
	je	.L243
	movzbl	0(%r13), %edx
	orb	5+not0(%rip), %dl
	je	.L244
.L89:
	movq	%r13, %r15
	jmp	.L126
.L107:
	cmpb	$0, 1+used(%rip)
	jne	.L118
	movl	$7, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 6+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L118:
	cmpb	$0, 2+used(%rip)
	jne	.L119
	movl	$7, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 6+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L119:
	cmpb	$0, 3+used(%rip)
	jne	.L120
	movl	$7, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 6+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L120:
	cmpb	$0, 4+used(%rip)
	jne	.L121
	movl	$7, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 6+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L121:
	cmpb	$0, 5+used(%rip)
	jne	.L122
	movl	$7, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 6+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L122:
	cmpb	$0, 6+used(%rip)
	jne	.L123
	movl	$7, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 6+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L123:
	cmpb	$0, 7+used(%rip)
	jne	.L124
	movl	$7, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 6+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L124:
	cmpb	$0, 8+used(%rip)
	jne	.L125
	movl	$7, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 6+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L125:
	cmpb	$0, 9+used(%rip)
	jne	.L106
	movl	$7, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 6+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L106:
	movb	$0, 1(%r15)
.L104:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L88
.L126:
	cmpb	$0, 1(%r15)
	jne	.L104
	leal	(%r14,%r15), %eax
	movb	$1, 1(%r15)
	movb	%al, 5+assign(%rip)
	movl	sz(%rip), %eax
	cmpl	$6, %eax
	je	.L245
	movzbl	0(%r13), %edx
	orb	6+not0(%rip), %dl
	jne	.L107
	movb	%bl, used(%rip)
	movb	$0, 6+assign(%rip)
	cmpl	$7, %eax
	je	.L246
	cmpb	$0, 1+used(%rip)
	jne	.L110
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L110:
	cmpb	$0, 2+used(%rip)
	jne	.L111
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L111:
	cmpb	$0, 3+used(%rip)
	jne	.L112
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L112:
	cmpb	$0, 4+used(%rip)
	jne	.L113
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L113:
	cmpb	$0, 5+used(%rip)
	jne	.L114
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L114:
	cmpb	$0, 6+used(%rip)
	jne	.L115
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L115:
	cmpb	$0, 7+used(%rip)
	jne	.L116
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L116:
	cmpb	$0, 8+used(%rip)
	jne	.L117
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L117:
	cmpb	$0, 9+used(%rip)
	jne	.L109
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L109:
	movb	$0, used(%rip)
	jmp	.L107
.L243:
	xorl	%eax, %eax
	call	calc
.L88:
	movb	$0, 1(%r12)
.L86:
	addq	$1, %r12
	cmpq	%r12, %rbp
	jne	.L84
.L85:
	movb	$0, used(%rip)
	jmp	.L83
.L245:
	xorl	%eax, %eax
	call	calc
	jmp	.L106
.L244:
	movb	%bl, used(%rip)
	movq	%r13, %r15
	movb	$0, 5+assign(%rip)
	cmpl	$6, %eax
	jne	.L90
	jmp	.L247
	.p2align 4,,10
	.p2align 3
.L95:
	cmpb	$0, 1+used(%rip)
	jne	.L96
	movl	$8, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 7+assign(%rip)
	call	rec
	movb	$0, 1+used(%rip)
.L96:
	cmpb	$0, 2+used(%rip)
	jne	.L97
	movl	$8, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 7+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L97:
	cmpb	$0, 3+used(%rip)
	jne	.L98
	movl	$8, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 7+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L98:
	cmpb	$0, 4+used(%rip)
	jne	.L99
	movl	$8, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 7+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L99:
	cmpb	$0, 5+used(%rip)
	jne	.L100
	movl	$8, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 7+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L100:
	cmpb	$0, 6+used(%rip)
	jne	.L101
	movl	$8, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 7+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L101:
	cmpb	$0, 7+used(%rip)
	jne	.L102
	movl	$8, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 7+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L102:
	cmpb	$0, 8+used(%rip)
	jne	.L103
	movl	$8, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 7+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L103:
	cmpb	$0, 9+used(%rip)
	jne	.L94
	movl	$8, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 7+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L94:
	movb	$0, 1(%r15)
.L92:
	addq	$1, %r15
	cmpq	%rbp, %r15
	je	.L91
.L90:
	cmpb	$0, 1(%r15)
	jne	.L92
	leal	(%r14,%r15), %eax
	cmpl	$7, sz(%rip)
	movb	$1, 1(%r15)
	movb	%al, 6+assign(%rip)
	je	.L248
	movzbl	0(%r13), %eax
	orb	7+not0(%rip), %al
	jne	.L95
	movl	$8, %edi
	movb	%bl, used(%rip)
	movb	$0, 7+assign(%rip)
	call	rec
	movb	$0, used(%rip)
	jmp	.L95
.L247:
	xorl	%eax, %eax
	call	calc
.L91:
	movb	$0, used(%rip)
	jmp	.L89
.L231:
	xorl	%eax, %eax
	call	calc
	jmp	.L82
.L246:
	xorl	%eax, %eax
	call	calc
	jmp	.L109
.L248:
	xorl	%eax, %eax
	call	calc
	jmp	.L94
.L193:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L249
	addq	$72, %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
.L230:
	.cfi_restore_state
	xorl	%eax, %eax
	call	calc
	jmp	.L79
.L241:
	xorl	%eax, %eax
	call	calc
	jmp	.L138
.L228:
	movb	%bl, used(%rip)
	movb	$0, assign(%rip)
	cmpl	$1, %eax
	je	.L250
	movl	$2, %edi
	movb	%bl, 1+used(%rip)
	movb	%bl, 1+assign(%rip)
	call	rec
	cmpb	$0, 2+used(%rip)
	movb	$0, 1+used(%rip)
	jne	.L67
	movl	$2, %edi
	movb	%bl, 2+used(%rip)
	movb	$2, 1+assign(%rip)
	call	rec
	movb	$0, 2+used(%rip)
.L67:
	cmpb	$0, 3+used(%rip)
	jne	.L68
	movl	$2, %edi
	movb	%bl, 3+used(%rip)
	movb	$3, 1+assign(%rip)
	call	rec
	movb	$0, 3+used(%rip)
.L68:
	cmpb	$0, 4+used(%rip)
	jne	.L69
	movl	$2, %edi
	movb	%bl, 4+used(%rip)
	movb	$4, 1+assign(%rip)
	call	rec
	movb	$0, 4+used(%rip)
.L69:
	cmpb	$0, 5+used(%rip)
	jne	.L70
	movl	$2, %edi
	movb	%bl, 5+used(%rip)
	movb	$5, 1+assign(%rip)
	call	rec
	movb	$0, 5+used(%rip)
.L70:
	cmpb	$0, 6+used(%rip)
	jne	.L71
	movl	$2, %edi
	movb	%bl, 6+used(%rip)
	movb	$6, 1+assign(%rip)
	call	rec
	movb	$0, 6+used(%rip)
.L71:
	cmpb	$0, 7+used(%rip)
	jne	.L72
	movl	$2, %edi
	movb	%bl, 7+used(%rip)
	movb	$7, 1+assign(%rip)
	call	rec
	movb	$0, 7+used(%rip)
.L72:
	cmpb	$0, 8+used(%rip)
	jne	.L73
	movl	$2, %edi
	movb	%bl, 8+used(%rip)
	movb	$8, 1+assign(%rip)
	call	rec
	movb	$0, 8+used(%rip)
.L73:
	cmpb	$0, 9+used(%rip)
	jne	.L66
	movl	$2, %edi
	movb	%bl, 9+used(%rip)
	movb	$9, 1+assign(%rip)
	call	rec
	movb	$0, 9+used(%rip)
.L66:
	movb	$0, used(%rip)
	jmp	.L64
.L242:
	xorl	%eax, %eax
	call	calc
	jmp	.L85
.L250:
	xorl	%eax, %eax
	call	calc
	jmp	.L66
.L249:
	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	assign
	.align 8
	.type	assign, @object
	.size	assign, 10
assign:
	.zero	10
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.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
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.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 n, m, sz;
char str[13][11]; int len[13];
char tr[128];
char assign[10], not0[10];
char used[10];
int ans;

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

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i]; j = len[i];
		while (j--) {
			c = assign[tr[*p++]];
			a = (a<<3) + (a<<1) + c++;
		}
		s += a;
//printf("[%d], a %d, s %d\n", i, a, s);
	}

	a = 0, p = str[m]; j = len[m];
	while (j--) {
		c = assign[tr[*p++]];
		a = (a<<3) + (a<<1) + c++;
	}
//printf("[%d], a %d, s %d\n", i, a, s);
//exit(1);
	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[k] = 0, rec(k+1), used[0] = 0;
		}
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[k] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int 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++;
			}
			*p = 0, len[i] = p-str[i];
			if (len[i] > 1) 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 n, m, sz;
char str[13][11]; int len[13];
char tr[128];
char assign[10], not0[10];
char used[10];
int ans;

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

	s = 0;
	for (i = 0; i < m; i++) {
		a = 0, p = str[i]; j = len[i];
		while (j--) {
			c = assign[tr[*p++]];
			a = (a<<3) + (a<<1) + c++;
		}
		s += a;
//printf("[%d], a %d, s %d\n", i, a, s);
	}

	a = 0, p = str[m]; j = len[m];
	while (j--) {
		c = assign[tr[*p++]];
		a = (a<<3) + (a<<1) + c++;
	}
//printf("[%d], a %d, s %d\n", i, a, s);
//exit(1);
	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[k] = 0, rec(k+1), used[0] = 0;
		}
	}
	for (i = 1; i < 10; i++) {
		if (used[i]) continue;
		used[i] = 1, assign[k] = i, rec(k+1), used[i] = 0;
	}
}

int main()
{
	int 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++;
			}
			*p = 0, len[i] = p-str[i];
			if (len[i] > 1) 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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.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, 128
tr:
	.zero	128
	.globl	assign
	.align 8
	.type	assign, @object
	.size	assign, 10
assign:
	.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, -20(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	$0, -16(%rbp)
	movl	-28(%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)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L3:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L4
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -28(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	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)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L6:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	nop
	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	.L11
	movl	$0, %eax
	call	calc
	jmp	.L10
.L11:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L13
	movb	$1, used(%rip)
	movl	-20(%rbp), %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)
.L13:
	movl	$1, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	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	.L16
.L18:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	cmpl	$9, -4(%rbp)
	jle	.L17
.L10:
	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	.L20
.L28:
	movl	$0, sz(%rip)
	movl	$128, %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, n(%rip)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -36(%rbp)
	jmp	.L21
.L26:
	movq	stdin(%rip), %rcx
	movl	-36(%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	-36(%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	.L22
.L24:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L23
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
.L23:
	addq	$1, -32(%rbp)
.L22:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L24
	movq	-32(%rbp), %rax
	movb	$0, (%rax)
	movl	-36(%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
	movl	%eax, %ecx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L25
	movl	-36(%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)
.L25:
	addl	$1, -36(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L26
	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
.L20:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L27
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.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, 128
tr:
	.zero	128
	.globl	assign
	.align 8
	.type	assign, @object
	.size	assign, 10
assign:
	.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, -20(%rbp)
	movl	$0, -28(%rbp)
	jmp	.L2
.L5:
	movl	$0, -16(%rbp)
	movl	-28(%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)
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L3:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L4
	movl	-16(%rbp), %eax
	addl	%eax, -20(%rbp)
	addl	$1, -28(%rbp)
.L2:
	movl	m(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L5
	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)
	movl	m(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -24(%rbp)
	jmp	.L6
.L7:
	movq	-8(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -8(%rbp)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cltq
	leaq	assign(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-16(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-16(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movl	-12(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -12(%rbp)
	addl	%ecx, %eax
	movl	%eax, -16(%rbp)
.L6:
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -24(%rbp)
	testl	%eax, %eax
	jne	.L7
	movl	-16(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jne	.L9
	movl	ans(%rip), %eax
	addl	$1, %eax
	movl	%eax, ans(%rip)
.L9:
	nop
	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	.L11
	movl	$0, %eax
	call	calc
	jmp	.L10
.L11:
	movzbl	used(%rip), %eax
	testb	%al, %al
	jne	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	not0(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L13
	movb	$1, used(%rip)
	movl	-20(%rbp), %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)
.L13:
	movl	$1, -4(%rbp)
	jmp	.L14
.L17:
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L18
	movl	-4(%rbp), %eax
	cltq
	leaq	used(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-4(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	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	.L16
.L18:
	nop
.L16:
	addl	$1, -4(%rbp)
.L14:
	cmpl	$9, -4(%rbp)
	jle	.L17
.L10:
	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	.L20
.L28:
	movl	$0, sz(%rip)
	movl	$128, %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, n(%rip)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, m(%rip)
	movl	$0, -36(%rbp)
	jmp	.L21
.L26:
	movq	stdin(%rip), %rcx
	movl	-36(%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	-36(%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	.L22
.L24:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jns	.L23
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movq	-32(%rbp), %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
.L23:
	addq	$1, -32(%rbp)
.L22:
	movq	-32(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	$32, %al
	jg	.L24
	movq	-32(%rbp), %rax
	movb	$0, (%rax)
	movl	-36(%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
	movl	%eax, %ecx
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-36(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	len(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	jle	.L25
	movl	-36(%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)
.L25:
	addl	$1, -36(%rbp)
.L21:
	movl	n(%rip), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L26
	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
.L20:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	testq	%rax, %rax
	je	.L27
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L28
.L27:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	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:
