	.file	"916639.c"
	.intel_syntax noprefix
	.text
	.globl	rooms
	.data
	.align 16
	.type	rooms, @object
	.size	rooms, 16
rooms:
	.long	2
	.long	4
	.long	6
	.long	8
	.globl	energyCost
	.align 16
	.type	energyCost, @object
	.size	energyCost, 16
energyCost:
	.long	1
	.long	10
	.long	100
	.long	1000
	.globl	allowed
	.align 16
	.type	allowed, @object
	.size	allowed, 28
allowed:
	.long	0
	.long	1
	.long	3
	.long	5
	.long	7
	.long	9
	.long	10
	.text
	.type	initHeap, @function
initHeap:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	initHeap, .-initHeap
	.type	siftUp, @function
siftUp:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -12[rbp], eax
	jmp	.L4
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -12[rbp], eax
.L4:
	cmp	DWORD PTR -12[rbp], 0
	js	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jg	.L6
.L7:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	siftUp, .-siftUp
	.type	siftDown, @function
siftDown:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
	jmp	.L9
.L13:
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L10
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jge	.L10
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -16[rbp], eax
.L10:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 8[rax]
	cmp	edx, eax
	jge	.L14
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR [rcx]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L13
	jmp	.L15
.L14:
	nop
.L15:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	siftDown, .-siftDown
	.type	insertHeap, @function
insertHeap:
.LFB9:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L17
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rdx], rax
.L17:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L20
.L18:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rdx], ecx
	cdqe
	sal	rax, 3
	lea	rdx, [rsi+rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	siftUp
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	insertHeap, .-insertHeap
	.type	popHeap, @function
popHeap:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L22
	mov	eax, 0
	jmp	.L23
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	siftDown
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	popHeap, .-popHeap
	.type	freeHeap, @function
freeHeap:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L25:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	freeHeap, .-freeHeap
	.type	burrowDup, @function
burrowDup:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	burrowDup, .-burrowDup
	.type	initBurrow, @function
initBurrow:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -23[rbp]
	mov	esi, 15
	mov	rdi, rax
	call	fgets@PLT
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -23[rbp]
	mov	esi, 15
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -23[rbp]
	add	rax, 1
	mov	rcx, QWORD PTR -32[rbp]
	mov	edx, 12
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR 11[rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 28[rax], 0
.L34:
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -23[rbp]
	mov	esi, 15
	mov	rdi, rax
	call	fgets@PLT
	mov	eax, DWORD PTR rooms[rip]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -23[rbp+rax]
	cmp	al, 35
	je	.L37
	mov	DWORD PTR -36[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 28[rax]
	lea	ecx, 0[0+rax*4]
	mov	eax, DWORD PTR -36[rbp]
	lea	esi, [rcx+rax]
	movsx	rax, edx
	movzx	ecx, BYTE PTR -23[rbp+rax]
	mov	rdx, QWORD PTR -32[rbp]
	movsx	rax, esi
	mov	BYTE PTR 12[rdx+rax], cl
	add	DWORD PTR -36[rbp], 1
.L32:
	cmp	DWORD PTR -36[rbp], 3
	jle	.L33
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 28[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 28[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 28[rax]
	cmp	eax, 3
	jle	.L34
	jmp	.L31
.L37:
	nop
.L31:
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	initBurrow, .-initBurrow
	.type	isHallwayEmpty, @function
isHallwayEmpty:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	DWORD PTR -20[rbp], ecx
	cmp	DWORD PTR -20[rbp], 0
	je	.L39
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jne	.L39
	mov	eax, 0
	jmp	.L40
.L39:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jle	.L41
	mov	eax, DWORD PTR -20[rbp]
	add	DWORD PTR -12[rbp], eax
	jmp	.L42
.L44:
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 46
	je	.L43
	mov	eax, 0
	jmp	.L40
.L43:
	add	DWORD PTR -12[rbp], 1
.L42:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jle	.L44
	jmp	.L45
.L41:
	mov	eax, DWORD PTR -20[rbp]
	sub	DWORD PTR -12[rbp], eax
	jmp	.L46
.L48:
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 46
	je	.L47
	mov	eax, 0
	jmp	.L40
.L47:
	sub	DWORD PTR -12[rbp], 1
.L46:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jge	.L48
.L45:
	mov	eax, 1
.L40:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	isHallwayEmpty, .-isHallwayEmpty
	.type	canMoveFromRoom, @function
canMoveFromRoom:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	mov	BYTE PTR -1[rbp], al
	movsx	eax, BYTE PTR -1[rbp]
	sub	eax, 65
	cmp	DWORD PTR -32[rbp], eax
	je	.L54
	jmp	.L51
.L53:
	sub	DWORD PTR -28[rbp], 1
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 46
	je	.L51
	mov	eax, 0
	jmp	.L52
.L51:
	cmp	DWORD PTR -28[rbp], 0
	jne	.L53
	mov	eax, 1
	jmp	.L52
.L56:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	BYTE PTR -1[rbp], al
	je	.L55
	mov	eax, 1
	jmp	.L52
.L55:
	add	DWORD PTR -28[rbp], 1
.L54:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L56
	mov	eax, 0
.L52:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	canMoveFromRoom, .-canMoveFromRoom
	.type	moveFromRoomToRoom, @function
moveFromRoomToRoom:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	mov	BYTE PTR -5[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	lea	ecx, 1[rax]
	movsx	eax, BYTE PTR -5[rbp]
	lea	edx, -65[rax]
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	add	eax, eax
	add	eax, ecx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	mov	BYTE PTR 12[rdx+rax], 46
	movsx	eax, BYTE PTR -5[rbp]
	sub	eax, 65
	mov	DWORD PTR -32[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	sub	eax, 1
	mov	DWORD PTR -28[rbp], eax
	jmp	.L58
.L61:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 46
	jne	.L59
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	ecx, BYTE PTR -5[rbp]
	mov	BYTE PTR 12[rdx+rax], cl
	jmp	.L60
.L59:
	sub	DWORD PTR -28[rbp], 1
.L58:
	cmp	DWORD PTR -28[rbp], 0
	jns	.L61
.L60:
	movsx	eax, BYTE PTR -5[rbp]
	sub	eax, 65
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, energyCost[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	ecx, DWORD PTR -4[rbp]
	mov	edx, DWORD PTR -28[rbp]
	add	edx, ecx
	add	edx, 1
	imul	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	moveFromRoomToRoom, .-moveFromRoomToRoom
	.type	canMoveToRoom, @function
canMoveToRoom:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -28[rbp], al
	movsx	eax, BYTE PTR -28[rbp]
	sub	eax, 65
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L64
.L68:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 46
	jne	.L65
	mov	eax, 1
	jmp	.L66
.L65:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	BYTE PTR -28[rbp], al
	je	.L67
	mov	eax, 0
	jmp	.L66
.L67:
	sub	DWORD PTR -8[rbp], 1
.L64:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L68
	mov	eax, 1
.L66:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	canMoveToRoom, .-canMoveToRoom
	.type	moveToRoom, @function
moveToRoom:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR -9[rbp], al
	movsx	eax, BYTE PTR -9[rbp]
	sub	eax, 65
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L70
.L73:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 46
	jne	.L71
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	ecx, BYTE PTR -9[rbp]
	mov	BYTE PTR 12[rdx+rax], cl
	jmp	.L72
.L71:
	sub	DWORD PTR -8[rbp], 1
.L70:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L73
.L72:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	mov	BYTE PTR [rdx+rax], 46
	movsx	eax, BYTE PTR -9[rbp]
	sub	eax, 65
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, energyCost[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	ecx, DWORD PTR [rcx+rax]
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, ecx
	mov	ecx, eax
	sar	ecx, 31
	xor	eax, ecx
	sub	eax, ecx
	mov	ecx, DWORD PTR -8[rbp]
	add	eax, ecx
	add	eax, 1
	imul	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	moveToRoom, .-moveToRoom
	.type	moveFromRoomToHallway, @function
moveFromRoomToHallway:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	mov	BYTE PTR -1[rbp], al
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	mov	BYTE PTR 12[rdx+rax], 46
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	ecx, BYTE PTR -1[rbp]
	mov	BYTE PTR [rdx+rax], cl
	movsx	eax, BYTE PTR -1[rbp]
	sub	eax, 65
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, energyCost[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -28[rbp]
	lea	esi, 1[rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	ecx, DWORD PTR [rcx+rax]
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, ecx
	mov	ecx, eax
	sar	ecx, 31
	xor	eax, ecx
	sub	eax, ecx
	add	eax, esi
	imul	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	moveFromRoomToHallway, .-moveFromRoomToHallway
	.type	isSolved, @function
isSolved:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L78
.L83:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L79
.L82:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -24[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	movsx	eax, al
	mov	edx, DWORD PTR -8[rbp]
	add	edx, 65
	cmp	eax, edx
	je	.L80
	mov	eax, 0
	jmp	.L81
.L80:
	add	DWORD PTR -4[rbp], 1
.L79:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L82
	add	DWORD PTR -8[rbp], 1
.L78:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L83
	mov	eax, 1
.L81:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	isSolved, .-isSolved
	.globl	solve
	.type	solve, @function
solve:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -28[rbp], 0
	mov	edi, 100
	call	initHeap
	mov	QWORD PTR -24[rbp], rax
	mov	edx, DWORD PTR -28[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insertHeap
	jmp	.L85
.L102:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	popHeap
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	isSolved
	test	eax, eax
	je	.L86
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	freeHeap
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -28[rbp]
	jmp	.L87
.L86:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L88
.L91:
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 65
	je	.L89
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 66
	je	.L89
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 67
	je	.L89
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 68
	jne	.L90
.L89:
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	canMoveToRoom
	test	eax, eax
	je	.L90
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	movzx	eax, BYTE PTR [rdx+rax]
	movsx	eax, al
	sub	eax, 65
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	esi, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	ecx, 1
	mov	rdi, rax
	call	isHallwayEmpty
	test	eax, eax
	je	.L90
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	burrowDup
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	moveToRoom
	mov	edx, DWORD PTR -28[rbp]
	add	edx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insertHeap
.L90:
	add	DWORD PTR -36[rbp], 1
.L88:
	cmp	DWORD PTR -36[rbp], 10
	jle	.L91
	mov	DWORD PTR -40[rbp], 0
	jmp	.L92
.L101:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L93
.L100:
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 65
	je	.L94
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 66
	je	.L94
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 67
	je	.L94
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	cmp	al, 68
	jne	.L95
.L94:
	mov	edx, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	canMoveFromRoom
	test	eax, eax
	je	.L95
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	movsx	edx, al
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	canMoveToRoom
	test	eax, eax
	je	.L96
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, edx
	mov	rdx, QWORD PTR -56[rbp]
	cdqe
	movzx	eax, BYTE PTR 12[rdx+rax]
	movsx	eax, al
	sub	eax, 65
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	esi, DWORD PTR [rcx+rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	ecx, 0
	mov	rdi, rax
	call	isHallwayEmpty
	test	eax, eax
	je	.L96
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	burrowDup
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	moveFromRoomToRoom
	mov	edx, DWORD PTR -28[rbp]
	add	edx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insertHeap
	jmp	.L95
.L96:
	mov	DWORD PTR -36[rbp], 0
	jmp	.L97
.L99:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, allowed[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, rooms[rip]
	mov	esi, DWORD PTR [rcx+rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	ecx, 0
	mov	rdi, rax
	call	isHallwayEmpty
	test	eax, eax
	je	.L98
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	burrowDup
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, allowed[rip]
	mov	ecx, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	moveFromRoomToHallway
	mov	edx, DWORD PTR -28[rbp]
	add	edx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insertHeap
.L98:
	add	DWORD PTR -36[rbp], 1
.L97:
	cmp	DWORD PTR -36[rbp], 6
	jle	.L99
.L95:
	add	DWORD PTR -32[rbp], 1
.L93:
	cmp	DWORD PTR -32[rbp], 3
	jle	.L100
	add	DWORD PTR -40[rbp], 1
.L92:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 28[rax]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L101
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
.L85:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L102
	mov	eax, -1
.L87:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"Result: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB22:
	.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	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	initBurrow
	mov	rdi, rax
	call	solve
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.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	"916639.c"
	.text
	.global	rooms
	.data
	.align	2
	.type	rooms, %object
	.size	rooms, 16
rooms:
	.word	2
	.word	4
	.word	6
	.word	8
	.global	energyCost
	.align	2
	.type	energyCost, %object
	.size	energyCost, 16
energyCost:
	.word	1
	.word	10
	.word	100
	.word	1000
	.global	allowed
	.align	2
	.type	allowed, %object
	.size	allowed, 28
allowed:
	.word	0
	.word	1
	.word	3
	.word	5
	.word	7
	.word	9
	.word	10
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	initHeap, %function
initHeap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	initHeap, .-initHeap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	siftUp, %function
siftUp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L4
.L6:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L7
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bgt	.L6
.L7:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	siftUp, .-siftUp
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	siftDown, %function
siftDown:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L9
.L13:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L10:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bge	.L14
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L9:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L13
	b	.L15
.L14:
	nop
.L15:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	siftDown, .-siftDown
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertHeap, %function
insertHeap:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L17
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
.L17:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	b	.L20
.L18:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	add	r0, r3, #1
	ldr	r1, [fp, #-16]
	str	r0, [r1, #4]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	siftUp
.L20:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insertHeap, .-insertHeap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	popHeap, %function
popHeap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L22
	mov	r3, #0
	b	.L23
.L22:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	siftDown
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	popHeap, .-popHeap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	freeHeap, %function
freeHeap:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L25
.L26:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L26
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	freeHeap, .-freeHeap
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	burrowDup, %function
burrowDup:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #32
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r2, #32
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	burrowDup, .-burrowDup
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	initBurrow, %function
initBurrow:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #32
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	sub	r3, fp, #24
	ldr	r2, [fp, #-40]
	mov	r1, #15
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #24
	ldr	r2, [fp, #-40]
	mov	r1, #15
	mov	r0, r3
	bl	fgets
	ldr	r0, [fp, #-28]
	sub	r3, fp, #24
	add	r3, r3, #1
	mov	r2, #12
	mov	r1, r3
	bl	memcpy
	ldr	r3, [fp, #-28]
	mov	r2, #0
	strb	r2, [r3, #11]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3, #28]
.L34:
	sub	r3, fp, #24
	ldr	r2, [fp, #-40]
	mov	r1, #15
	mov	r0, r3
	bl	fgets
	ldr	r3, .L38+4
	ldr	r3, [r3]
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-20]	@ zero_extendqisi2
	cmp	r3, #35
	beq	.L37
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L32
.L33:
	ldr	r2, .L38+4
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #28]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-32]
	add	r3, r1, r3
	sub	r1, fp, #4
	add	r2, r1, r2
	ldrb	r1, [r2, #-20]	@ zero_extendqisi2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L32:
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	ble	.L33
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #28]
	add	r2, r3, #1
	ldr	r3, [fp, #-28]
	str	r2, [r3, #28]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #28]
	cmp	r3, #3
	ble	.L34
	b	.L31
.L37:
	nop
.L31:
	ldr	r3, [fp, #-28]
	ldr	r2, .L38
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	rooms
	.size	initBurrow, .-initBurrow
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isHallwayEmpty, %function
isHallwayEmpty:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L41
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L41
	mov	r3, #0
	b	.L42
.L41:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L43
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	b	.L44
.L46:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L45
	mov	r3, #0
	b	.L42
.L45:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L44:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L46
	b	.L47
.L43:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	b	.L48
.L50:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L49
	mov	r3, #0
	b	.L42
.L49:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L48:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bge	.L50
.L47:
	mov	r3, #1
.L42:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isHallwayEmpty, .-isHallwayEmpty
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	canMoveFromRoom, %function
canMoveFromRoom:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	beq	.L56
	b	.L53
.L55:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L53
	mov	r3, #0
	b	.L54
.L53:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L55
	mov	r3, #1
	b	.L54
.L58:
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L57
	mov	r3, #1
	b	.L54
.L57:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L56:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L58
	mov	r3, #0
.L54:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	canMoveFromRoom, .-canMoveFromRoom
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	moveFromRoomToRoom, %function
moveFromRoomToRoom:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r1, [fp, #-24]
	sub	r3, r1, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	lsl	r3, r3, #1
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #46
	strb	r2, [r3, #12]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #65
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L60
.L63:
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L61
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [fp, #-9]
	strb	r2, [r3, #12]
	b	.L62
.L61:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L60:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L63
.L62:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, .L65
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r2, r1, r2
	add	r2, r2, #1
	mul	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L66:
	.align	2
.L65:
	.word	energyCost
	.size	moveFromRoomToRoom, .-moveFromRoomToRoom
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	canMoveToRoom, %function
canMoveToRoom:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	sub	r3, r3, #65
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L68
.L72:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L69
	mov	r3, #1
	b	.L70
.L69:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L71
	mov	r3, #0
	b	.L70
.L71:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L68:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L72
	mov	r3, #1
.L70:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	canMoveToRoom, .-canMoveToRoom
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	moveToRoom, %function
moveToRoom:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #65
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #28]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L74
.L77:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L75
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3, #12]
	b	.L76
.L75:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L74:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L77
.L76:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #46
	strb	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, .L79
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, .L79+4
	ldr	r2, [fp, #-8]
	ldr	r2, [r1, r2, lsl #2]
	ldr	r1, [fp, #-28]
	sub	r2, r1, r2
	eor	r1, r2, r2, asr #31
	sub	r1, r1, r2, asr #31
	ldr	r2, [fp, #-12]
	add	r2, r1, r2
	add	r2, r2, #1
	mul	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L80:
	.align	2
.L79:
	.word	energyCost
	.word	rooms
	.size	moveToRoom, .-moveToRoom
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	moveFromRoomToHallway, %function
moveFromRoomToHallway:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #46
	strb	r2, [r3, #12]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r2, [fp, #-5]
	strb	r2, [r3]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, .L83
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	add	r1, r2, #1
	ldr	r0, .L83+4
	ldr	r2, [fp, #-24]
	ldr	r2, [r0, r2, lsl #2]
	ldr	r0, [fp, #-28]
	sub	r2, r0, r2
	cmp	r2, #0
	rsblt	r2, r2, #0
	add	r2, r1, r2
	mul	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L84:
	.align	2
.L83:
	.word	energyCost
	.word	rooms
	.size	moveFromRoomToHallway, .-moveFromRoomToHallway
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isSolved, %function
isSolved:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L86
.L91:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L87
.L90:
	ldr	r3, [fp, #-8]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, #65
	cmp	r2, r3
	beq	.L88
	mov	r3, #0
	b	.L89
.L88:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L87:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L90
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L86:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L91
	mov	r3, #1
.L89:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isSolved, .-isSolved
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r0, #100
	bl	initHeap
	str	r0, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-16]
	bl	insertHeap
	b	.L93
.L110:
	ldr	r0, [fp, #-16]
	bl	popHeap
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r0, [fp, #-40]
	bl	isSolved
	mov	r3, r0
	cmp	r3, #0
	beq	.L94
	ldr	r0, [fp, #-16]
	bl	freeHeap
	ldr	r0, [fp, #-40]
	bl	free
	ldr	r3, [fp, #-20]
	b	.L95
.L94:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L96
.L99:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #65
	beq	.L97
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L97
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #67
	beq	.L97
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #68
	bne	.L98
.L97:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	canMoveToRoom
	mov	r3, r0
	cmp	r3, #0
	beq	.L98
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, .L111
	ldr	r2, [r2, r3, lsl #2]
	mov	r3, #1
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-40]
	bl	isHallwayEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L98
	ldr	r0, [fp, #-40]
	bl	burrowDup
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-8]
	bl	moveToRoom
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	insertHeap
.L98:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L96:
	ldr	r3, [fp, #-28]
	cmp	r3, #10
	ble	.L99
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L100
.L109:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L101
.L108:
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #65
	beq	.L102
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L102
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #67
	beq	.L102
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #68
	bne	.L103
.L102:
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-40]
	bl	canMoveFromRoom
	mov	r3, r0
	cmp	r3, #0
	beq	.L103
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	canMoveToRoom
	mov	r3, r0
	cmp	r3, #0
	beq	.L104
	ldr	r2, .L111
	ldr	r3, [fp, #-24]
	ldr	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-32]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	sub	r3, r3, #65
	ldr	r2, .L111
	ldr	r2, [r2, r3, lsl #2]
	mov	r3, #0
	ldr	r0, [fp, #-40]
	bl	isHallwayEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L104
	ldr	r0, [fp, #-40]
	bl	burrowDup
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-8]
	bl	moveFromRoomToRoom
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	insertHeap
	b	.L103
.L104:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L105
.L107:
	ldr	r2, .L111
	ldr	r3, [fp, #-24]
	ldr	r1, [r2, r3, lsl #2]
	ldr	r2, .L111+4
	ldr	r3, [fp, #-28]
	ldr	r2, [r2, r3, lsl #2]
	mov	r3, #0
	ldr	r0, [fp, #-40]
	bl	isHallwayEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L106
	ldr	r0, [fp, #-40]
	bl	burrowDup
	str	r0, [fp, #-8]
	ldr	r2, .L111+4
	ldr	r3, [fp, #-28]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-8]
	bl	moveFromRoomToHallway
	mov	r2, r0
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	insertHeap
.L106:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L105:
	ldr	r3, [fp, #-28]
	cmp	r3, #6
	ble	.L107
.L103:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L101:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	ble	.L108
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L100:
	ldr	r3, [fp, #-40]
	ldr	r3, [r3, #28]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L109
	ldr	r0, [fp, #-40]
	bl	free
.L93:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L110
	mvn	r3, #0
.L95:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L112:
	.align	2
.L111:
	.word	rooms
	.word	allowed
	.size	solve, .-solve
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Result: %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	r3, .L115
	ldr	r3, [r3]
	mov	r0, r3
	bl	initBurrow
	mov	r3, r0
	mov	r0, r3
	bl	solve
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L115+4
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L116:
	.align	2
.L115:
	.word	stdin
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
