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

```c
// AOJ 2002: X-Ray Screening System
// 2017.11.23 bal4u@uu

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

char m[51][52];
char tbl['Z'+1]; int sz;
int  rmin[7], rmax[7], cmin[7], cmax[7];
char f[7];

int rec(int k)
{
	int i, r, c, ii;
	char tmp[51][52];

	if (k == sz) return 1;
	for (ii = 1, i = 0; i < sz; i++, ii <<= 1) {
		if (f[i]) continue;
		f[i] = 1;
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			if (!(m[r][c] & ii)) goto next;
		}
		memcpy(tmp, m, sizeof(tmp));
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			m[r][c] = 0xff;
		}
		if (rec(k+1)) return 1;
		memcpy(m, tmp, sizeof(tmp));
next:	f[i] = 0;
	}
	return 0;
}

int main()
{
	int T, H, W, r, c, i, a;

	scanf("%d", &T);
	while (T--) {
		sz = 0, memset(tbl, -1, sizeof(tbl));
		for (i = 0; i < 7; i++) rmin[i] = cmin[i] = 50, rmax[i] = cmax[i] = 0, 
		scanf("%d%d", &H, &W);
		for (r = 0; r < H; r++) {
			scanf("%s", m[r]);
			for (c = 0; c < W; c++) {
				if (m[r][c] == '.') m[r][c] = 0;
				else {
					a = m[r][c];
					if ((i = tbl[a]) < 0) i = tbl[a] = sz++;
					m[r][c] = 1 << i;
					if (rmin[i] > r) rmin[i] = r;
					if (rmax[i] < r) rmax[i] = r;
					if (cmin[i] > c) cmin[i] = c;
					if (cmax[i] < c) cmax[i] = c;
				}
			}
		}
		memset(f, 0, sz);
		puts(rec(0) ? "SAFE" : "SUSPICIOUS");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2652
m:
	.zero	2652
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 91
tbl:
	.zero	91
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	rmin
	.align 16
	.type	rmin, @object
	.size	rmin, 28
rmin:
	.zero	28
	.globl	rmax
	.align 16
	.type	rmax, @object
	.size	rmax, 28
rmax:
	.zero	28
	.globl	cmin
	.align 16
	.type	cmin, @object
	.size	cmin, 28
cmin:
	.zero	28
	.globl	cmax
	.align 16
	.type	cmax, @object
	.size	cmax, 28
cmax:
	.zero	28
	.globl	f
	.type	f, @object
	.size	f, 7
f:
	.zero	7
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2704, %rsp
	movl	%edi, -2692(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	sz(%rip), %eax
	cmpl	%eax, -2692(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -2676(%rbp)
	movl	$0, -2688(%rbp)
	jmp	.L4
.L18:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L7
.L12:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L8
.L11:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	-2676(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	addl	$1, -2680(%rbp)
.L8:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L11
	addl	$1, -2684(%rbp)
.L7:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L12
	leaq	-2672(%rbp), %rax
	leaq	m(%rip), %rdx
	movl	$331, %ecx
	movq	%rax, %rdi
	movq	%rdx, %rsi
	rep movsq
	movq	%rsi, %rdx
	movq	%rdi, %rax
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L13
.L16:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L14
.L15:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$-1, (%rax)
	addl	$1, -2680(%rbp)
.L14:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L15
	addl	$1, -2684(%rbp)
.L13:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L16
	movl	-2692(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L17
	movl	$1, %eax
	jmp	.L19
.L17:
	leaq	m(%rip), %rdx
	leaq	-2672(%rbp), %rax
	movl	$331, %ecx
	movq	%rdx, %rdi
	movq	%rax, %rsi
	rep movsq
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	jmp	.L10
.L22:
	nop
.L10:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L6
.L21:
	nop
.L6:
	addl	$1, -2688(%rbp)
	sall	-2676(%rbp)
.L4:
	movl	sz(%rip), %eax
	cmpl	%eax, -2688(%rbp)
	jl	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"SAFE"
.LC4:
	.string	"SUSPICIOUS"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L24
.L39:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tbl(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -16(%rbp)
	jmp	.L25
.L26:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	$50, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L25:
	cmpl	$6, -16(%rbp)
	jle	.L26
	movl	$0, -24(%rbp)
	jmp	.L27
.L36:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	m(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L28
.L35:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L29
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jns	.L31
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
.L31:
	movl	-16(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	%cl, (%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L32
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L33
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L33:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L34
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmin(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L34:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L30
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmax(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L30:
	addl	$1, -20(%rbp)
.L28:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	addl	$1, -24(%rbp)
.L27:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L36
	movl	sz(%rip), %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	f(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	testl	%eax, %eax
	je	.L37
	leaq	.LC3(%rip), %rax
	jmp	.L38
.L37:
	leaq	.LC4(%rip), %rax
.L38:
	movq	%rax, %rdi
	call	puts@PLT
.L24:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jne	.L39
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.type	rec.part.0, @function
rec.part.0:
.LFB37:
	.cfi_startproc
	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
	subq	$2696, %rsp
	.cfi_def_cfa_offset 2752
	movl	sz(%rip), %r14d
	movl	%edi, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 2680(%rsp)
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jle	.L15
	leaq	f(%rip), %r15
	xorl	%r12d, %r12d
	movl	$1, %ebx
	movl	%r14d, %r9d
	leaq	m(%rip), %r13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %r12
	addl	%ebx, %ebx
	addq	$1, %r15
	cmpl	%r12d, %r9d
	jle	.L15
.L14:
	cmpb	$0, (%r15)
	jne	.L4
	leaq	rmin(%rip), %rax
	movb	$1, (%r15)
	movl	(%rax,%r12,4), %r10d
	leaq	rmax(%rip), %rax
	movl	(%rax,%r12,4), %ebp
	cmpl	%ebp, %r10d
	jg	.L5
	movslq	%r10d, %r11
	leaq	cmin(%rip), %rax
	movl	%r10d, %r14d
	leaq	(%r11,%r11,2), %rdx
	movl	(%rax,%r12,4), %r8d
	leaq	cmax(%rip), %rax
	leaq	(%r11,%rdx,4), %rdx
	movl	(%rax,%r12,4), %eax
	salq	$2, %rdx
	leaq	0(%r13,%rdx), %rdi
.L9:
	cmpl	%eax, %r8d
	jg	.L6
	movslq	%r8d, %rcx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L32:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jl	.L6
.L8:
	movsbl	(%rdi,%rcx), %esi
	testl	%ebx, %esi
	jne	.L32
.L7:
	movb	$0, (%r15)
.L34:
	addq	$1, %r12
	addl	%ebx, %ebx
	addq	$1, %r15
	cmpl	%r12d, %r9d
	jg	.L14
.L15:
	xorl	%eax, %eax
.L1:
	movq	2680(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L33
	addq	$2696, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	addl	$1, %r14d
	addq	$52, %rdi
	cmpl	%ebp, %r14d
	jle	.L9
	leaq	16(%rsp), %rdi
	movl	$331, %ecx
	movq	%r13, %rsi
	movq	%rdi, (%rsp)
	rep movsq
	movl	(%rsi), %ecx
	movl	%ecx, (%rdi)
	cmpl	%eax, %r8d
	jg	.L17
	movslq	%r8d, %rsi
	subl	%r10d, %ebp
	movl	%r9d, 12(%rsp)
	subl	%r8d, %eax
	addq	%rsi, %rdx
	leaq	0(%r13,%rdx), %rcx
	leaq	0(%rbp,%r11), %rdx
	leaq	(%rdx,%rdx,2), %rdi
	leaq	1(%rax), %rbp
	leaq	(%rdx,%rdi,4), %rdi
	leaq	52+m(%rip), %rdx
	addq	%rsi, %rdx
	leaq	(%rdx,%rdi,4), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rcx, %rdi
	movq	%rbp, %rdx
	movl	$255, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$52, %rcx
	cmpq	%r14, %rcx
	jne	.L11
	movl	12(%rsp), %r9d
.L17:
	movl	8(%rsp), %eax
	leal	1(%rax), %edi
	cmpl	%r9d, %edi
	je	.L13
	call	rec.part.0
	testl	%eax, %eax
	jne	.L13
	movq	(%rsp), %rsi
	movl	$331, %ecx
	movq	%r13, %rdi
	movb	$0, (%r15)
	rep movsq
	movl	sz(%rip), %r9d
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	jmp	.L34
.L13:
	movl	$1, %eax
	jmp	.L1
.L5:
	leaq	16(%rsp), %rdi
	movl	$331, %ecx
	movq	%r13, %rsi
	movq	%rdi, (%rsp)
	rep movsq
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	jmp	.L17
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	rec.part.0, .-rec.part.0
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L36
	jmp	rec.part.0
.L36:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SAFE"
.LC1:
	.string	"SUSPICIOUS"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d"
.LC4:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %rdi
	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
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L56
	leaq	52(%rsp), %rax
	leaq	cmin(%rip), %r14
	movl	$1, %r15d
	movq	%rax, 24(%rsp)
	leaq	48(%rsp), %rax
	leaq	rmin(%rip), %r13
	movq	%rax, 16(%rsp)
	leaq	cmax(%rip), %r12
	leaq	rmax(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$-1, %edx
	movb	$-1, 90+tbl(%rip)
	pcmpeqd	%xmm0, %xmm0
	xorl	%ebx, %ebx
	movl	$0, sz(%rip)
	movq	$-1, 80+tbl(%rip)
	movw	%dx, 88+tbl(%rip)
	movaps	%xmm0, tbl(%rip)
	movaps	%xmm0, 16+tbl(%rip)
	movaps	%xmm0, 32+tbl(%rip)
	movaps	%xmm0, 48+tbl(%rip)
	movaps	%xmm0, 64+tbl(%rip)
	.p2align 4,,10
	.p2align 3
.L39:
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	xorl	%eax, %eax
	movl	$50, (%r14,%rbx)
	movl	$50, 0(%r13,%rbx)
	leaq	.LC3(%rip), %rdi
	movl	$0, (%r12,%rbx)
	movl	$0, 0(%rbp,%rbx)
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	$28, %rbx
	jne	.L39
	movl	48(%rsp), %eax
	leaq	m(%rip), %r9
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%r9, %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	movq	%r9, 8(%rsp)
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %edi
	movq	8(%rsp), %r9
	leaq	tbl(%rip), %r8
	testl	%edi, %edi
	jle	.L44
	movl	sz(%rip), %esi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L45:
	movsbq	%cl, %r11
	movsbq	(%r8,%r11), %rcx
	testl	%ecx, %ecx
	jns	.L47
	movb	%sil, (%r8,%r11)
	movsbq	%sil, %rcx
	movl	$1, %r10d
	addl	$1, %esi
.L47:
	movl	%r15d, %r11d
	sall	%cl, %r11d
	movb	%r11b, (%rdx)
	cmpl	%ebx, 0(%r13,%rcx,4)
	jle	.L48
	movl	%ebx, 0(%r13,%rcx,4)
.L48:
	cmpl	%ebx, 0(%rbp,%rcx,4)
	jge	.L49
	movl	%ebx, 0(%rbp,%rcx,4)
.L49:
	cmpl	%eax, (%r14,%rcx,4)
	jle	.L50
	movl	%eax, (%r14,%rcx,4)
.L50:
	cmpl	%eax, (%r12,%rcx,4)
	jge	.L46
	movl	%eax, (%r12,%rcx,4)
.L46:
	addl	$1, %eax
	addq	$1, %rdx
	cmpl	%edi, %eax
	je	.L76
.L51:
	movzbl	(%rdx), %ecx
	cmpb	$46, %cl
	jne	.L45
	addl	$1, %eax
	movb	$0, (%rdx)
	addq	$1, %rdx
	cmpl	%edi, %eax
	jne	.L51
.L76:
	testb	%r10b, %r10b
	je	.L44
	movl	%esi, sz(%rip)
.L44:
	addl	$1, %ebx
	addq	$52, %r9
	cmpl	%ebx, 48(%rsp)
	jg	.L53
.L54:
	movslq	sz(%rip), %rdx
	xorl	%esi, %esi
	movl	$7, %ecx
	leaq	f(%rip), %rdi
	movq	%rdx, %rbx
	call	__memset_chk@PLT
	testl	%ebx, %ebx
	je	.L41
	xorl	%edi, %edi
	call	rec.part.0
	leaq	.LC1(%rip), %rdi
	testl	%eax, %eax
	je	.L55
.L41:
	leaq	.LC0(%rip), %rdi
.L55:
	call	puts@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	jne	.L38
.L56:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L77
	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
.L77:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	f
	.bss
	.type	f, @object
	.size	f, 7
f:
	.zero	7
	.globl	cmax
	.align 16
	.type	cmax, @object
	.size	cmax, 28
cmax:
	.zero	28
	.globl	cmin
	.align 16
	.type	cmin, @object
	.size	cmin, 28
cmin:
	.zero	28
	.globl	rmax
	.align 16
	.type	rmax, @object
	.size	rmax, 28
rmax:
	.zero	28
	.globl	rmin
	.align 16
	.type	rmin, @object
	.size	rmin, 28
rmin:
	.zero	28
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 91
tbl:
	.zero	91
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 2652
m:
	.zero	2652
	.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
	.type	rec.part.0, @function
rec.part.0:
.LFB37:
	.cfi_startproc
	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
	subq	$2696, %rsp
	.cfi_def_cfa_offset 2752
	movl	sz(%rip), %r14d
	movl	%edi, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 2680(%rsp)
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jle	.L15
	leaq	f(%rip), %r15
	xorl	%r12d, %r12d
	movl	$1, %ebx
	movl	%r14d, %r9d
	leaq	m(%rip), %r13
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	addq	$1, %r12
	addl	%ebx, %ebx
	addq	$1, %r15
	cmpl	%r12d, %r9d
	jle	.L15
.L14:
	cmpb	$0, (%r15)
	jne	.L4
	leaq	rmin(%rip), %rax
	movb	$1, (%r15)
	movl	(%rax,%r12,4), %r10d
	leaq	rmax(%rip), %rax
	movl	(%rax,%r12,4), %ebp
	cmpl	%ebp, %r10d
	jg	.L5
	movslq	%r10d, %r11
	leaq	cmin(%rip), %rax
	movl	%r10d, %r14d
	leaq	(%r11,%r11,2), %rdx
	movl	(%rax,%r12,4), %r8d
	leaq	cmax(%rip), %rax
	leaq	(%r11,%rdx,4), %rdx
	movl	(%rax,%r12,4), %eax
	salq	$2, %rdx
	leaq	0(%r13,%rdx), %rdi
.L9:
	cmpl	%eax, %r8d
	jg	.L6
	movslq	%r8d, %rcx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L32:
	addq	$1, %rcx
	cmpl	%ecx, %eax
	jl	.L6
.L8:
	movsbl	(%rdi,%rcx), %esi
	testl	%ebx, %esi
	jne	.L32
.L7:
	movb	$0, (%r15)
.L34:
	addq	$1, %r12
	addl	%ebx, %ebx
	addq	$1, %r15
	cmpl	%r12d, %r9d
	jg	.L14
.L15:
	xorl	%eax, %eax
.L1:
	movq	2680(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L33
	addq	$2696, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	addl	$1, %r14d
	addq	$52, %rdi
	cmpl	%ebp, %r14d
	jle	.L9
	leaq	16(%rsp), %rdi
	movl	$331, %ecx
	movq	%r13, %rsi
	movq	%rdi, (%rsp)
	rep movsq
	movl	(%rsi), %ecx
	movl	%ecx, (%rdi)
	cmpl	%eax, %r8d
	jg	.L17
	movslq	%r8d, %rsi
	subl	%r10d, %ebp
	movl	%r9d, 12(%rsp)
	subl	%r8d, %eax
	addq	%rsi, %rdx
	leaq	0(%r13,%rdx), %rcx
	leaq	0(%rbp,%r11), %rdx
	leaq	(%rdx,%rdx,2), %rdi
	leaq	1(%rax), %rbp
	leaq	(%rdx,%rdi,4), %rdi
	leaq	52+m(%rip), %rdx
	addq	%rsi, %rdx
	leaq	(%rdx,%rdi,4), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rcx, %rdi
	movq	%rbp, %rdx
	movl	$255, %esi
	call	memset@PLT
	movq	%rax, %rcx
	addq	$52, %rcx
	cmpq	%r14, %rcx
	jne	.L11
	movl	12(%rsp), %r9d
.L17:
	movl	8(%rsp), %eax
	leal	1(%rax), %edi
	cmpl	%r9d, %edi
	je	.L13
	call	rec.part.0
	testl	%eax, %eax
	jne	.L13
	movq	(%rsp), %rsi
	movl	$331, %ecx
	movq	%r13, %rdi
	movb	$0, (%r15)
	rep movsq
	movl	sz(%rip), %r9d
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	jmp	.L34
.L13:
	movl	$1, %eax
	jmp	.L1
.L5:
	leaq	16(%rsp), %rdi
	movl	$331, %ecx
	movq	%r13, %rsi
	movq	%rdi, (%rsp)
	rep movsq
	movl	(%rsi), %eax
	movl	%eax, (%rdi)
	jmp	.L17
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	rec.part.0, .-rec.part.0
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB35:
	.cfi_startproc
	endbr64
	cmpl	%edi, sz(%rip)
	je	.L36
	jmp	rec.part.0
.L36:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"SAFE"
.LC1:
	.string	"SUSPICIOUS"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d"
.LC4:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %rdi
	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
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L56
	leaq	52(%rsp), %rax
	leaq	cmin(%rip), %r14
	movl	$1, %r15d
	movq	%rax, 24(%rsp)
	leaq	48(%rsp), %rax
	leaq	rmin(%rip), %r13
	movq	%rax, 16(%rsp)
	leaq	cmax(%rip), %r12
	leaq	rmax(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L38:
	movl	$-1, %edx
	movb	$-1, 90+tbl(%rip)
	pcmpeqd	%xmm0, %xmm0
	xorl	%ebx, %ebx
	movl	$0, sz(%rip)
	movq	$-1, 80+tbl(%rip)
	movw	%dx, 88+tbl(%rip)
	movaps	%xmm0, tbl(%rip)
	movaps	%xmm0, 16+tbl(%rip)
	movaps	%xmm0, 32+tbl(%rip)
	movaps	%xmm0, 48+tbl(%rip)
	movaps	%xmm0, 64+tbl(%rip)
	.p2align 4,,10
	.p2align 3
.L39:
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	xorl	%eax, %eax
	movl	$50, (%r14,%rbx)
	movl	$50, 0(%r13,%rbx)
	leaq	.LC3(%rip), %rdi
	movl	$0, (%r12,%rbx)
	movl	$0, 0(%rbp,%rbx)
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	$28, %rbx
	jne	.L39
	movl	48(%rsp), %eax
	leaq	m(%rip), %r9
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	.L54
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%r9, %rsi
	leaq	.LC4(%rip), %rdi
	xorl	%eax, %eax
	movq	%r9, 8(%rsp)
	call	__isoc99_scanf@PLT
	movl	52(%rsp), %edi
	movq	8(%rsp), %r9
	leaq	tbl(%rip), %r8
	testl	%edi, %edi
	jle	.L44
	movl	sz(%rip), %esi
	movq	%r9, %rdx
	xorl	%r10d, %r10d
	xorl	%eax, %eax
	jmp	.L51
	.p2align 4,,10
	.p2align 3
.L45:
	movsbq	%cl, %r11
	movsbq	(%r8,%r11), %rcx
	testl	%ecx, %ecx
	jns	.L47
	movb	%sil, (%r8,%r11)
	movsbq	%sil, %rcx
	movl	$1, %r10d
	addl	$1, %esi
.L47:
	movl	%r15d, %r11d
	sall	%cl, %r11d
	movb	%r11b, (%rdx)
	cmpl	%ebx, 0(%r13,%rcx,4)
	jle	.L48
	movl	%ebx, 0(%r13,%rcx,4)
.L48:
	cmpl	%ebx, 0(%rbp,%rcx,4)
	jge	.L49
	movl	%ebx, 0(%rbp,%rcx,4)
.L49:
	cmpl	%eax, (%r14,%rcx,4)
	jle	.L50
	movl	%eax, (%r14,%rcx,4)
.L50:
	cmpl	%eax, (%r12,%rcx,4)
	jge	.L46
	movl	%eax, (%r12,%rcx,4)
.L46:
	addl	$1, %eax
	addq	$1, %rdx
	cmpl	%edi, %eax
	je	.L76
.L51:
	movzbl	(%rdx), %ecx
	cmpb	$46, %cl
	jne	.L45
	addl	$1, %eax
	movb	$0, (%rdx)
	addq	$1, %rdx
	cmpl	%edi, %eax
	jne	.L51
.L76:
	testb	%r10b, %r10b
	je	.L44
	movl	%esi, sz(%rip)
.L44:
	addl	$1, %ebx
	addq	$52, %r9
	cmpl	%ebx, 48(%rsp)
	jg	.L53
.L54:
	movslq	sz(%rip), %rdx
	xorl	%esi, %esi
	movl	$7, %ecx
	leaq	f(%rip), %rdi
	movq	%rdx, %rbx
	call	__memset_chk@PLT
	testl	%ebx, %ebx
	je	.L41
	xorl	%edi, %edi
	call	rec.part.0
	leaq	.LC1(%rip), %rdi
	testl	%eax, %eax
	je	.L55
.L41:
	leaq	.LC0(%rip), %rdi
.L55:
	call	puts@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	jne	.L38
.L56:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L77
	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
.L77:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	f
	.bss
	.type	f, @object
	.size	f, 7
f:
	.zero	7
	.globl	cmax
	.align 16
	.type	cmax, @object
	.size	cmax, 28
cmax:
	.zero	28
	.globl	cmin
	.align 16
	.type	cmin, @object
	.size	cmin, 28
cmin:
	.zero	28
	.globl	rmax
	.align 16
	.type	rmax, @object
	.size	rmax, 28
rmax:
	.zero	28
	.globl	rmin
	.align 16
	.type	rmin, @object
	.size	rmin, 28
rmin:
	.zero	28
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 91
tbl:
	.zero	91
	.globl	m
	.align 32
	.type	m, @object
	.size	m, 2652
m:
	.zero	2652
	.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 2002: X-Ray Screening System
// 2017.11.23 bal4u@uu

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

char m[51][52];
char tbl['Z'+1]; int sz;
int  rmin[7], rmax[7], cmin[7], cmax[7];
char f[7];

int rec(int k)
{
	int i, r, c, ii;
	char tmp[51][52];

	if (k == sz) return 1;
	for (ii = 1, i = 0; i < sz; i++, ii <<= 1) {
		if (f[i]) continue;
		f[i] = 1;
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			if (!(m[r][c] & ii)) goto next;
		}
		memcpy(tmp, m, sizeof(tmp));
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			m[r][c] = 0xff;
		}
		if (rec(k+1)) return 1;
		memcpy(m, tmp, sizeof(tmp));
next:	f[i] = 0;
	}
	return 0;
}

int main()
{
	int T, H, W, r, c, i, a;

	scanf("%d", &T);
	while (T--) {
		sz = 0, memset(tbl, -1, sizeof(tbl));
		for (i = 0; i < 7; i++) rmin[i] = cmin[i] = 50, rmax[i] = cmax[i] = 0, 
		scanf("%d%d", &H, &W);
		for (r = 0; r < H; r++) {
			scanf("%s", m[r]);
			for (c = 0; c < W; c++) {
				if (m[r][c] == '.') m[r][c] = 0;
				else {
					a = m[r][c];
					if ((i = tbl[a]) < 0) i = tbl[a] = sz++;
					m[r][c] = 1 << i;
					if (rmin[i] > r) rmin[i] = r;
					if (rmax[i] < r) rmax[i] = r;
					if (cmin[i] > c) cmin[i] = c;
					if (cmax[i] < c) cmax[i] = c;
				}
			}
		}
		memset(f, 0, sz);
		puts(rec(0) ? "SAFE" : "SUSPICIOUS");
	}
	return 0;
}
6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBBAAA
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBBAAA
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBBAAA
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAABAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBAAAB
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAABAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBAAAB
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDCDDCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAABAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
..........
..DDDDD..D
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBBAAA
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEFEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBBAAA
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAABAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAABAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM............................
 6
1 1
.
3 3
...
.W.
...
10 10
..........
.DDDDCCC..
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA..CCC..
..CBBBAAAB
AAABBBB...
..BBBBB...
..........
10 10
..........
.DDDDDD...
.DDDDCCC..
.DDDDCCC..
ADDDDCCC..
AAA.-CCC..
AAABBBBC..
AAABBBB...
..BBBBB...
..........
10 10
R..E..C.T.
R.EEE.C.T.
.EEEEE....
EEEEEEE...
.EEEEEEE..
..EEEEEEE.
...EEEEEEE
....EEEEE.
.....EEE..
......E...
16 50
..................................................
.........AAAAAAAAAAAAAAAA.........................
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.-...
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.....
....PPP...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....
....PPP..............AAAAA.AAAAAAAAAAAAAAAA.......
....PPP................A....AAA.AAAAAAAAAA........
....PPP...........IIIIIAAIIAIII.AAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIAAAAAAAAAAAAAAAAAA........
..CCCCCCCCCCCCC...IIIIIIIIIIIII...AAAAAAAAAA......
....PPP............................AAAAAAAAAA.....
MMMMPPPMMMMMMMMMMMMMMM.............AAAAAAAAAAA....
MMMMPPPMMMMMMMMMMMMMMM..............AAAAABAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMMMMMMMMMMMMMMMMMMM...............AAAAAAAAAA...
MMMMNMMMMMMMMMMMMMMMMM............................

SAFE
SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
 SAFE
SAFE
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS
SUSPICIOUS

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

```c
// AOJ 2002: X-Ray Screening System
// 2017.11.23 bal4u@uu

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

char m[51][52];
char tbl['Z'+1]; int sz;
int  rmin[7], rmax[7], cmin[7], cmax[7];
char f[7];

int rec(int k)
{
	int i, r, c, ii;
	char tmp[51][52];

	if (k == sz) return 1;
	for (ii = 1, i = 0; i < sz; i++, ii <<= 1) {
		if (f[i]) continue;
		f[i] = 1;
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			if (!(m[r][c] & ii)) goto next;
		}
		memcpy(tmp, m, sizeof(tmp));
		for (r = rmin[i]; r <= rmax[i]; r++) for (c = cmin[i]; c <= cmax[i]; c++) {
			m[r][c] = 0xff;
		}
		if (rec(k+1)) return 1;
		memcpy(m, tmp, sizeof(tmp));
next:	f[i] = 0;
	}
	return 0;
}

int main()
{
	int T, H, W, r, c, i, a;

	scanf("%d", &T);
	while (T--) {
		sz = 0, memset(tbl, -1, sizeof(tbl));
		for (i = 0; i < 7; i++) rmin[i] = cmin[i] = 50, rmax[i] = cmax[i] = 0, 
		scanf("%d%d", &H, &W);
		for (r = 0; r < H; r++) {
			scanf("%s", m[r]);
			for (c = 0; c < W; c++) {
				if (m[r][c] == '.') m[r][c] = 0;
				else {
					a = m[r][c];
					if ((i = tbl[a]) < 0) i = tbl[a] = sz++;
					m[r][c] = 1 << i;
					if (rmin[i] > r) rmin[i] = r;
					if (rmax[i] < r) rmax[i] = r;
					if (cmin[i] > c) cmin[i] = c;
					if (cmax[i] < c) cmax[i] = c;
				}
			}
		}
		memset(f, 0, sz);
		puts(rec(0) ? "SAFE" : "SUSPICIOUS");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2652
m:
	.zero	2652
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 91
tbl:
	.zero	91
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	rmin
	.align 16
	.type	rmin, @object
	.size	rmin, 28
rmin:
	.zero	28
	.globl	rmax
	.align 16
	.type	rmax, @object
	.size	rmax, 28
rmax:
	.zero	28
	.globl	cmin
	.align 16
	.type	cmin, @object
	.size	cmin, 28
cmin:
	.zero	28
	.globl	cmax
	.align 16
	.type	cmax, @object
	.size	cmax, 28
cmax:
	.zero	28
	.globl	f
	.type	f, @object
	.size	f, 7
f:
	.zero	7
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2704, %rsp
	movl	%edi, -2692(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	sz(%rip), %eax
	cmpl	%eax, -2692(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -2676(%rbp)
	movl	$0, -2688(%rbp)
	jmp	.L4
.L18:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L7
.L12:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L8
.L11:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	-2676(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	addl	$1, -2680(%rbp)
.L8:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L11
	addl	$1, -2684(%rbp)
.L7:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L12
	leaq	-2672(%rbp), %rax
	leaq	m(%rip), %rdx
	movl	$331, %ecx
	movq	%rax, %rdi
	movq	%rdx, %rsi
	rep movsq
	movq	%rsi, %rdx
	movq	%rdi, %rax
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L13
.L16:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L14
.L15:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$-1, (%rax)
	addl	$1, -2680(%rbp)
.L14:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L15
	addl	$1, -2684(%rbp)
.L13:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L16
	movl	-2692(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L17
	movl	$1, %eax
	jmp	.L19
.L17:
	leaq	m(%rip), %rdx
	leaq	-2672(%rbp), %rax
	movl	$331, %ecx
	movq	%rdx, %rdi
	movq	%rax, %rsi
	rep movsq
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	jmp	.L10
.L22:
	nop
.L10:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L6
.L21:
	nop
.L6:
	addl	$1, -2688(%rbp)
	sall	-2676(%rbp)
.L4:
	movl	sz(%rip), %eax
	cmpl	%eax, -2688(%rbp)
	jl	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"SAFE"
.LC4:
	.string	"SUSPICIOUS"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L24
.L39:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tbl(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -16(%rbp)
	jmp	.L25
.L26:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	$50, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L25:
	cmpl	$6, -16(%rbp)
	jle	.L26
	movl	$0, -24(%rbp)
	jmp	.L27
.L36:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	m(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L28
.L35:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L29
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jns	.L31
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
.L31:
	movl	-16(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	%cl, (%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L32
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L33
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L33:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L34
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmin(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L34:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L30
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmax(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L30:
	addl	$1, -20(%rbp)
.L28:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	addl	$1, -24(%rbp)
.L27:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L36
	movl	sz(%rip), %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	f(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	testl	%eax, %eax
	je	.L37
	leaq	.LC3(%rip), %rax
	jmp	.L38
.L37:
	leaq	.LC4(%rip), %rax
.L38:
	movq	%rax, %rdi
	call	puts@PLT
.L24:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jne	.L39
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
val
	.file	"temp.c"
	.text
	.globl	m
	.bss
	.align 32
	.type	m, @object
	.size	m, 2652
m:
	.zero	2652
	.globl	tbl
	.align 32
	.type	tbl, @object
	.size	tbl, 91
tbl:
	.zero	91
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	rmin
	.align 16
	.type	rmin, @object
	.size	rmin, 28
rmin:
	.zero	28
	.globl	rmax
	.align 16
	.type	rmax, @object
	.size	rmax, 28
rmax:
	.zero	28
	.globl	cmin
	.align 16
	.type	cmin, @object
	.size	cmin, 28
cmin:
	.zero	28
	.globl	cmax
	.align 16
	.type	cmax, @object
	.size	cmax, 28
cmax:
	.zero	28
	.globl	f
	.type	f, @object
	.size	f, 7
f:
	.zero	7
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$2704, %rsp
	movl	%edi, -2692(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	sz(%rip), %eax
	cmpl	%eax, -2692(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -2676(%rbp)
	movl	$0, -2688(%rbp)
	jmp	.L4
.L18:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L21
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L7
.L12:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L8
.L11:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	-2676(%rbp), %eax
	testl	%eax, %eax
	je	.L22
	addl	$1, -2680(%rbp)
.L8:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L11
	addl	$1, -2684(%rbp)
.L7:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L12
	leaq	-2672(%rbp), %rax
	leaq	m(%rip), %rdx
	movl	$331, %ecx
	movq	%rax, %rdi
	movq	%rdx, %rsi
	rep movsq
	movq	%rsi, %rdx
	movq	%rdi, %rax
	movl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2684(%rbp)
	jmp	.L13
.L16:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -2680(%rbp)
	jmp	.L14
.L15:
	movl	-2680(%rbp), %eax
	movslq	%eax, %rcx
	movl	-2684(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$-1, (%rax)
	addl	$1, -2680(%rbp)
.L14:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2680(%rbp)
	jle	.L15
	addl	$1, -2684(%rbp)
.L13:
	movl	-2688(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -2684(%rbp)
	jle	.L16
	movl	-2692(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L17
	movl	$1, %eax
	jmp	.L19
.L17:
	leaq	m(%rip), %rdx
	leaq	-2672(%rbp), %rax
	movl	$331, %ecx
	movq	%rdx, %rdi
	movq	%rax, %rsi
	rep movsq
	movq	%rsi, %rax
	movq	%rdi, %rdx
	movl	(%rax), %ecx
	movl	%ecx, (%rdx)
	jmp	.L10
.L22:
	nop
.L10:
	movl	-2688(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L6
.L21:
	nop
.L6:
	addl	$1, -2688(%rbp)
	sall	-2676(%rbp)
.L4:
	movl	sz(%rip), %eax
	cmpl	%eax, -2688(%rbp)
	jl	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"SAFE"
.LC4:
	.string	"SUSPICIOUS"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L24
.L39:
	movl	$0, sz(%rip)
	movl	$91, %edx
	movl	$-1, %esi
	leaq	tbl(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -16(%rbp)
	jmp	.L25
.L26:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	$50, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -16(%rbp)
.L25:
	cmpl	$6, -16(%rbp)
	jle	.L26
	movl	$0, -24(%rbp)
	jmp	.L27
.L36:
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	m(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L28
.L35:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L29
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	$0, (%rax)
	jmp	.L30
.L29:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	jns	.L31
	movl	sz(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, sz(%rip)
	movl	%eax, %ecx
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	tbl(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, -16(%rbp)
.L31:
	movl	-16(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	movslq	%eax, %rsi
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	(%rax,%rsi), %rdx
	leaq	m(%rip), %rax
	addq	%rdx, %rax
	movb	%cl, (%rax)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jge	.L32
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmin(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L32:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	rmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L33
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	rmax(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L33:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmin(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L34
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmin(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L34:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cmax(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L30
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	cmax(%rip), %rdx
	movl	-20(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L30:
	addl	$1, -20(%rbp)
.L28:
	movl	-28(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L35
	addl	$1, -24(%rbp)
.L27:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L36
	movl	sz(%rip), %eax
	cltq
	movq	%rax, %rdx
	movl	$0, %esi
	leaq	f(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, %edi
	call	rec
	testl	%eax, %eax
	je	.L37
	leaq	.LC3(%rip), %rax
	jmp	.L38
.L37:
	leaq	.LC4(%rip), %rax
.L38:
	movq	%rax, %rdi
	call	puts@PLT
.L24:
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -36(%rbp)
	testl	%eax, %eax
	jne	.L39
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
