	.file	"668824.c"
	.intel_syntax noprefix
	.text
	.globl	row
	.bss
	.align 4
	.type	row, @object
	.size	row, 4
row:
	.zero	4
	.globl	col
	.align 4
	.type	col, @object
	.size	col, 4
col:
	.zero	4
	.globl	h
	.align 32
	.type	h, @object
	.size	h, 40000
h:
	.zero	40000
	.globl	vis
	.align 32
	.type	vis, @object
	.size	vis, 40000
vis:
	.zero	40000
	.globl	dx
	.data
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	dy
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	0
	.long	1
	.long	0
	.long	-1
	.text
	.globl	getL
	.type	getL, @function
getL:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, vis[rip]
	mov	eax, DWORD PTR [rdx+rax]
	jmp	.L3
.L2:
	mov	DWORD PTR -16[rbp], 1
	mov	DWORD PTR -20[rbp], 0
	jmp	.L4
.L8:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dx[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dy[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	js	.L9
	mov	eax, DWORD PTR row[rip]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L9
	cmp	DWORD PTR -8[rbp], 0
	js	.L9
	mov	eax, DWORD PTR col[rip]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L9
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, h[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, h[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	ecx, eax
	jle	.L7
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, eax
	call	getL
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L7
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L7
.L9:
	nop
.L7:
	add	DWORD PTR -20[rbp], 1
.L4:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 15
	jbe	.L8
	mov	eax, DWORD PTR -40[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rdx, vis[rip]
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -16[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	getL, .-getL
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	lea	rdx, col[rip]
	lea	rsi, row[rip]
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -16[rbp], 0
	jmp	.L11
.L14:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, h[rip]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -12[rbp], 1
.L12:
	mov	eax, DWORD PTR col[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L13
	add	DWORD PTR -16[rbp], 1
.L11:
	mov	eax, DWORD PTR row[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L14
	mov	DWORD PTR -8[rbp], 1
	mov	DWORD PTR -16[rbp], 0
	jmp	.L15
.L19:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L16
.L18:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	getL
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L17
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
.L17:
	add	DWORD PTR -12[rbp], 1
.L16:
	mov	eax, DWORD PTR col[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L18
	add	DWORD PTR -16[rbp], 1
.L15:
	mov	eax, DWORD PTR row[rip]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L19
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.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	"668824.c"
	.text
	.comm	row,4,4
	.comm	col,4,4
	.comm	h,40000,4
	.comm	vis,40000,4
	.global	dx
	.data
	.align	2
	.type	dx, %object
	.size	dx, 16
dx:
	.word	-1
	.word	0
	.word	1
	.word	0
	.global	dy
	.align	2
	.type	dy, %object
	.size	dy, 16
dy:
	.word	0
	.word	1
	.word	0
	.word	-1
	.text
	.align	2
	.global	getL
	.syntax unified
	.arm
	.fpu softvfp
	.type	getL, %function
getL:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r1, .L10
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L2
	ldr	r1, .L10
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	b	.L3
.L2:
	mov	r3, #1
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L4
.L8:
	ldr	r2, .L10+4
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, .L10+8
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L9
	ldr	r3, .L10+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L9
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L9
	ldr	r3, .L10+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L9
	ldr	r1, .L10+20
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r3, r2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r0, .L10+20
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	ldr	r3, [r0, r3, lsl #2]
	cmp	r1, r3
	ble	.L7
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	getL
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	b	.L7
.L9:
	nop
.L7:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #15
	bls	.L8
	ldr	r1, .L10
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r3, r2
	ldr	r2, [fp, #-20]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-20]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	vis
	.word	dx
	.word	dy
	.word	row
	.word	col
	.word	h
	.size	getL, .-getL
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d %d\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r2, .L23
	ldr	r1, .L23+4
	ldr	r0, .L23+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L13
.L16:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L14
.L15:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r3, r2
	lsl	r3, r3, #2
	ldr	r2, .L23+12
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L23+16
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L14:
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L15
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L13:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L16
	mov	r3, #1
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L17
.L21:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L18
.L20:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	getL
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L19
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L18:
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L20
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L17:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L21
	ldr	r1, [fp, #-12]
	ldr	r0, .L23+20
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	col
	.word	row
	.word	.LC0
	.word	h
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
