	.file	"40594.c"
	.intel_syntax noprefix
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 42436
a:
	.zero	42436
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	vis
	.align 32
	.type	vis, @object
	.size	vis, 42436
vis:
	.zero	42436
	.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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rdx, n[rip]
	lea	rsi, m[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, 42436
	mov	esi, 0
	lea	rdi, vis[rip]
	call	memset@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L6:
	nop
.L3:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L3
	mov	DWORD PTR -4[rbp], 0
	jmp	.L4
.L5:
	call	getchar@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	imul	rdx, rdx, 103
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, a[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -4[rbp], 1
.L4:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L5
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L6
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L11:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	imul	rax, rax, 103
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L9
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	imul	rax, rax, 103
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 48
	je	.L9
	mov	eax, DWORD PTR ans[rip]
	add	eax, 1
	mov	DWORD PTR ans[rip], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dfs
.L9:
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L10
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L11
	mov	eax, DWORD PTR ans[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 103
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L17
	cmp	DWORD PTR -4[rbp], 0
	js	.L17
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L17
	cmp	DWORD PTR -8[rbp], 0
	js	.L17
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 103
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, a[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 48
	je	.L17
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	imul	rax, rax, 103
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, edx
	call	dfs
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dfs
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, edx
	call	dfs
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	dfs
	jmp	.L13
.L17:
	nop
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dfs, .-dfs
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"40594.c"
	.text
	.comm	a,42436,4
	.comm	ans,4,4
	.comm	vis,42436,4
	.comm	m,4,4
	.comm	n,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d%d\000"
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r2, .L13
	ldr	r1, .L13+4
	ldr	r0, .L13+8
	bl	__isoc99_scanf
	ldr	r2, .L13+12
	mov	r1, #0
	ldr	r0, .L13+16
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L6:
	nop
.L3:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L3
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L5:
	bl	getchar
	ldr	ip, .L13+20
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	str	r0, [ip, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r3, .L13
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L5
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L6
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L11:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L10:
	ldr	r0, .L13+16
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L13+20
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #48
	beq	.L9
	ldr	r3, .L13+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+24
	str	r3, [r2]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	dfs
.L9:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, .L13
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L10
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L11
	ldr	r3, .L13+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+28
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	n
	.word	m
	.word	.LC0
	.word	42436
	.word	vis
	.word	a
	.word	ans
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	dfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	dfs, %function
dfs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r0, .L20
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L19
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L19
	ldr	r3, .L20+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L19
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L19
	ldr	r0, .L20+12
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #48
	beq	.L19
	ldr	r0, .L20
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r1, r3, #4
	add	r3, r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	mov	r2, #1
	str	r2, [r0, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	dfs
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	dfs
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	dfs
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	dfs
	b	.L15
.L19:
	nop
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	vis
	.word	m
	.word	n
	.word	a
	.size	dfs, .-dfs
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
