	.file	"984996.c"
	.intel_syntax noprefix
	.text
	.globl	heap_empty
	.type	heap_empty, @function
heap_empty:
.LFB6:
	.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	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	sete	al
	movzx	eax, al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	heap_empty, .-heap_empty
	.globl	heap_swap
	.type	heap_swap, @function
heap_swap:
.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	DWORD PTR -32[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -28[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 -32[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 -28[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 -32[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	heap_swap, .-heap_swap
	.globl	heap_hold
	.type	heap_hold, @function
heap_hold:
.LFB8:
	.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 -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	add	eax, eax
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L5
	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	edx, DWORD PTR 44[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 44[rax]
	cmp	edx, eax
	jge	.L5
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
.L5:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L6
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 44[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 44[rax]
	cmp	edx, eax
	jge	.L6
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
.L6:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	je	.L8
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	heap_swap
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	heap_hold
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	heap_hold, .-heap_hold
	.globl	init_heap
	.type	init_heap, @function
init_heap:
.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, 16
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 100
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[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
.LFE9:
	.size	init_heap, .-init_heap
	.globl	insert_heap
	.type	insert_heap, @function
insert_heap:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	DWORD PTR [rdx], ecx
	cdqe
	sal	rax, 3
	lea	rdx, [rsi+rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L12
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 44[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 44[rax]
	cmp	edx, eax
	jge	.L16
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, DWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	heap_swap
.L12:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L15
	jmp	.L17
.L16:
	nop
.L17:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	insert_heap, .-insert_heap
	.globl	delete_min
	.type	delete_min, @function
delete_min:
.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	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	heap_empty
	test	eax, eax
	je	.L19
	mov	eax, 0
	jmp	.L20
.L19:
	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	rcx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 3
	lea	rdx, [rcx+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	esi, 0
	mov	rdi, rax
	call	heap_hold
	mov	rax, QWORD PTR -8[rbp]
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	delete_min, .-delete_min
	.globl	cube_equal
	.type	cube_equal, @function
cube_equal:
.LFB12:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 1
	mov	DWORD PTR -12[rbp], 0
	jmp	.L22
.L28:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	mov	ecx, DWORD PTR [rdx+rax*4]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	ecx, eax
	je	.L24
	mov	DWORD PTR -4[rbp], 0
.L24:
	add	DWORD PTR -8[rbp], 1
.L23:
	cmp	DWORD PTR -8[rbp], 2
	jg	.L25
	cmp	DWORD PTR -4[rbp], 0
	jne	.L26
.L25:
	add	DWORD PTR -12[rbp], 1
.L22:
	cmp	DWORD PTR -12[rbp], 2
	jg	.L27
	cmp	DWORD PTR -4[rbp], 0
	jne	.L28
.L27:
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cube_equal, .-cube_equal
	.globl	cube_copy
	.type	cube_copy, @function
cube_copy:
.LFB13:
	.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L31
.L34:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	add	DWORD PTR -4[rbp], 1
.L32:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L33
	add	DWORD PTR -8[rbp], 1
.L31:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L34
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	cube_copy, .-cube_copy
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	cube_display
	.type	cube_display, @function
cube_display:
.LFB14:
	.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 -8[rbp], 0
	jmp	.L36
.L39:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L37
.L38:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L37:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L38
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L36:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L39
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cube_display, .-cube_display
	.globl	move_up
	.type	move_up, @function
move_up:
.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 -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, -12[rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, -12[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	move_up, .-move_up
	.globl	move_down
	.type	move_down, @function
move_down:
.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 -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	move_down, .-move_down
	.globl	move_left
	.type	move_left, @function
move_left:
.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 -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	edi, -1[rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	movsx	rax, edi
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cdqe
	mov	DWORD PTR [rdx+rax*4], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	move_left, .-move_left
	.globl	move_right
	.type	move_right, @function
move_right:
.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 -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	lea	edi, 1[rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, [rdx+rax]
	movsx	rax, edi
	mov	edx, DWORD PTR [rsi+rax*4]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, 1
	cdqe
	mov	DWORD PTR [rdx+rax*4], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	move_right, .-move_right
	.globl	calc_weight
	.type	calc_weight, @function
calc_weight:
.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L45
.L50:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L46
.L49:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	eax, -1
	je	.L52
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	ecx, DWORD PTR [rdx+rax*4]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	ecx, eax
	je	.L48
	add	DWORD PTR -12[rbp], 1
	jmp	.L48
.L52:
	nop
.L48:
	add	DWORD PTR -4[rbp], 1
.L46:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L49
	add	DWORD PTR -8[rbp], 1
.L45:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L50
	mov	eax, DWORD PTR -12[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	calc_weight, .-calc_weight
	.section	.rodata
.LC1:
	.string	"^"
	.text
	.globl	displayoutcome
	.type	displayoutcome, @function
displayoutcome:
.LFB20:
	.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	QWORD PTR -8[rbp], rdi
	jmp	.L54
.L55:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	cube_display
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 48[rax]
	mov	QWORD PTR -8[rbp], rax
.L54:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L55
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	displayoutcome, .-displayoutcome
	.globl	inme
	.type	inme, @function
inme:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L57
.L60:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_equal
	test	eax, eax
	je	.L58
	mov	DWORD PTR -4[rbp], 1
.L58:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 48[rax]
	mov	QWORD PTR -24[rbp], rax
.L57:
	cmp	QWORD PTR -24[rbp], 0
	je	.L59
	cmp	DWORD PTR -4[rbp], 0
	je	.L60
.L59:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	inme, .-inme
	.globl	insertsort
	.type	insertsort, @function
insertsort:
.LFB22:
	.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 -16[rbp], 1
	jmp	.L63
.L67:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	mov	DWORD PTR -12[rbp], eax
	jmp	.L64
.L66:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	add	rdx, 1
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	sub	DWORD PTR -12[rbp], 1
.L64:
	cmp	DWORD PTR -12[rbp], 0
	js	.L65
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR 44[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 44[rax]
	cmp	edx, eax
	jl	.L66
.L65:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -16[rbp], 1
.L63:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L67
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	insertsort, .-insertsort
	.globl	hillclimbing
	.type	hillclimbing, @function
hillclimbing:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	DWORD PTR -96[rbp], edx
	mov	QWORD PTR -104[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -92[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR -96[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR 48[rax], 0
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_weight
	mov	rdx, QWORD PTR -72[rbp]
	mov	DWORD PTR 44[rdx], eax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	call	init_heap
	mov	QWORD PTR -64[rbp], rax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert_heap
	jmp	.L69
.L75:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	delete_min
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_equal
	test	eax, eax
	je	.L70
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	displayoutcome
	jmp	.L71
.L70:
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	jle	.L72
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 36[rax]
	lea	rax, -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	move_up
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inme
	test	eax, eax
	jne	.L72
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 36[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_weight
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR 44[rdx], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert_heap
.L72:
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 36[rax]
	cmp	eax, 1
	jg	.L73
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 36[rax]
	lea	rax, -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	move_down
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inme
	test	eax, eax
	jne	.L73
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 36[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_weight
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR 44[rdx], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert_heap
.L73:
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 40[rax]
	test	eax, eax
	jle	.L74
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 36[rax]
	lea	rax, -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	move_left
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inme
	test	eax, eax
	jne	.L74
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 36[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 40[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_weight
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR 44[rdx], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert_heap
.L74:
	mov	rax, QWORD PTR -72[rbp]
	lea	rdx, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 40[rax]
	cmp	eax, 1
	jg	.L69
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 36[rax]
	lea	rax, -48[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	move_right
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inme
	test	eax, eax
	jne	.L69
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cube_copy
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 36[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 40[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	calc_weight
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR 44[rdx], eax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	insert_heap
.L69:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	heap_empty
	test	eax, eax
	je	.L75
.L71:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	hillclimbing, .-hillclimbing
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -96[rbp], 2
	mov	DWORD PTR -92[rbp], 3
	mov	DWORD PTR -88[rbp], -1
	mov	DWORD PTR -84[rbp], 1
	mov	DWORD PTR -80[rbp], 8
	mov	DWORD PTR -76[rbp], 5
	mov	DWORD PTR -72[rbp], 7
	mov	DWORD PTR -68[rbp], 4
	mov	DWORD PTR -64[rbp], 6
	mov	DWORD PTR -104[rbp], 0
	mov	DWORD PTR -100[rbp], 2
	mov	DWORD PTR -48[rbp], 1
	mov	DWORD PTR -44[rbp], 2
	mov	DWORD PTR -40[rbp], 3
	mov	DWORD PTR -36[rbp], 8
	mov	DWORD PTR -32[rbp], -1
	mov	DWORD PTR -28[rbp], 4
	mov	DWORD PTR -24[rbp], 7
	mov	DWORD PTR -20[rbp], 6
	mov	DWORD PTR -16[rbp], 5
	lea	rcx, -48[rbp]
	mov	edx, DWORD PTR -100[rbp]
	mov	esi, DWORD PTR -104[rbp]
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	hillclimbing
	mov	eax, 0
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.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	"984996.c"
	.text
	.align	2
	.global	heap_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	heap_empty, %function
heap_empty:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	heap_empty, .-heap_empty
	.align	2
	.global	heap_swap
	.syntax unified
	.arm
	.fpu softvfp
	.type	heap_swap, %function
heap_swap:
	@ 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, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	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, #-24]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-20]
	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, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	heap_swap, .-heap_swap
	.align	2
	.global	heap_hold
	.syntax unified
	.arm
	.fpu softvfp
	.type	heap_hold, %function
heap_hold:
	@ 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, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L5
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #44]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	cmp	r2, r3
	bge	.L5
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-16]
.L5:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L6
	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, #44]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	cmp	r2, r3
	bge	.L6
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
.L6:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	beq	.L8
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	heap_swap
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	heap_hold
.L8:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	heap_hold, .-heap_hold
	.align	2
	.global	init_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_heap, %function
init_heap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #100
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	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	init_heap, .-init_heap
	.align	2
	.global	insert_heap
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_heap, %function
insert_heap:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r0, r3, #1
	ldr	r1, [fp, #-16]
	str	r0, [r1]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	b	.L12
.L15:
	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, #44]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	cmp	r2, r3
	bge	.L16
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	heap_swap
.L12:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L15
	b	.L17
.L16:
	nop
.L17:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	insert_heap, .-insert_heap
	.align	2
	.global	delete_min
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_min, %function
delete_min:
	@ 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	r0, [fp, #-16]
	bl	heap_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	mov	r3, #0
	b	.L20
.L19:
	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]
	sub	r1, r3, #1
	ldr	r3, [fp, #-16]
	str	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [r2]
	str	r2, [r3]
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	heap_hold
	ldr	r3, [fp, #-8]
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	delete_min, .-delete_min
	.align	2
	.global	cube_equal
	.syntax unified
	.arm
	.fpu softvfp
	.type	cube_equal, %function
cube_equal:
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L22
.L28:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L23
.L26:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r1, r3
	beq	.L24
	mov	r3, #0
	str	r3, [fp, #-8]
.L24:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L23:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	bgt	.L25
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L26
.L25:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bgt	.L27
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L28
.L27:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cube_equal, .-cube_equal
	.align	2
	.global	cube_copy
	.syntax unified
	.arm
	.fpu softvfp
	.type	cube_copy, %function
cube_copy:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L31
.L34:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L32
.L33:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r1, r3, r2
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r1, [r1, r2, lsl #2]
	ldr	r2, [fp, #-8]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L32:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L33
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L31:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L34
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	cube_copy, .-cube_copy
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	cube_display
	.syntax unified
	.arm
	.fpu softvfp
	.type	cube_display, %function
cube_display:
	@ 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, #-12]
	b	.L36
.L39:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L37
.L38:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L40
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L37:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L38
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L36:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L39
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC2
	.size	cube_display, .-cube_display
	.align	2
	.global	move_up
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_up, %function
move_up:
	@ 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]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, #12
	ldr	r2, [fp, #-8]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	ldr	r1, [r1, r2, lsl #2]
	ldr	r2, [fp, #-16]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r3, r3, #12
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	mvn	r1, #0
	str	r1, [r3, r2, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	move_up, .-move_up
	.align	2
	.global	move_down
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_down, %function
move_down:
	@ 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]
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r1, r3, r2
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	ldr	r1, [r1, r2, lsl #2]
	ldr	r2, [fp, #-16]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	mvn	r1, #0
	str	r1, [r3, r2, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	move_down, .-move_down
	.align	2
	.global	move_left
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_left, %function
move_left:
	@ 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]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r1, r3, r2
	ldr	r3, [fp, #-16]
	sub	r0, r3, #1
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r1, [r1, r0, lsl #2]
	ldr	r2, [fp, #-16]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	sub	r2, r2, #1
	mvn	r1, #0
	str	r1, [r3, r2, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	move_left, .-move_left
	.align	2
	.global	move_right
	.syntax unified
	.arm
	.fpu softvfp
	.type	move_right, %function
move_right:
	@ 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]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r1, r3, r2
	ldr	r3, [fp, #-16]
	add	r0, r3, #1
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r1, [r1, r0, lsl #2]
	ldr	r2, [fp, #-16]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	ldr	r2, [fp, #-16]
	add	r2, r2, #1
	mvn	r1, #0
	str	r1, [r3, r2, lsl #2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	move_right, .-move_right
	.align	2
	.global	calc_weight
	.syntax unified
	.arm
	.fpu softvfp
	.type	calc_weight, %function
calc_weight:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L47
.L52:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L48
.L51:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmn	r3, #1
	beq	.L54
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-28]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r1, r3
	beq	.L50
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L50
.L54:
	nop
.L50:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L48:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L51
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L47:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L52
	ldr	r3, [fp, #-16]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	calc_weight, .-calc_weight
	.section	.rodata
	.align	2
.LC3:
	.ascii	"^\000"
	.text
	.align	2
	.global	displayoutcome
	.syntax unified
	.arm
	.fpu softvfp
	.type	displayoutcome, %function
displayoutcome:
	@ 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]
	b	.L56
.L57:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	cube_display
	ldr	r0, .L58
	bl	puts
	ldr	r0, .L58
	bl	puts
	ldr	r0, .L58
	bl	puts
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #48]
	str	r3, [fp, #-8]
.L56:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L57
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC3
	.size	displayoutcome, .-displayoutcome
	.align	2
	.global	inme
	.syntax unified
	.arm
	.fpu softvfp
	.type	inme, %function
inme:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L61
.L64:
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	cube_equal
	mov	r3, r0
	cmp	r3, #0
	beq	.L62
	mov	r3, #1
	str	r3, [fp, #-8]
.L62:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #48]
	str	r3, [fp, #-16]
.L61:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L64
.L63:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	inme, .-inme
	.align	2
	.global	insertsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertsort, %function
insertsort:
	@ 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]
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L67
.L71:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L68
.L70:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L68:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L69
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [r3, #44]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #44]
	cmp	r2, r3
	blt	.L70
.L69:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L67:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L71
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	insertsort, .-insertsort
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hillclimbing
	.syntax unified
	.arm
	.fpu softvfp
	.type	hillclimbing, %function
hillclimbing:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	str	r3, [fp, #-76]
	ldr	r3, .L81
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-68]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-72]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-56]
	mov	r2, #0
	str	r2, [r3, #48]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-76]
	bl	calc_weight
	mov	r2, r0
	ldr	r3, [fp, #-56]
	str	r2, [r3, #44]
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	cube_copy
	bl	init_heap
	str	r0, [fp, #-52]
	ldr	r1, [fp, #-56]
	ldr	r0, [fp, #-52]
	bl	insert_heap
	b	.L73
.L79:
	ldr	r0, [fp, #-52]
	bl	delete_min
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	cube_equal
	mov	r3, r0
	cmp	r3, #0
	beq	.L74
	ldr	r0, [fp, #-56]
	bl	displayoutcome
	b	.L75
.L74:
	ldr	r3, [fp, #-56]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #36]
	cmp	r3, #0
	ble	.L76
	ldr	r3, [fp, #-56]
	ldr	r1, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	sub	r3, fp, #44
	mov	r0, r3
	bl	move_up
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	inme
	mov	r3, r0
	cmp	r3, #0
	bne	.L76
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-48]
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #36]
	sub	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-56]
	str	r2, [r3, #48]
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	calc_weight
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	insert_heap
.L76:
	ldr	r3, [fp, #-56]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #36]
	cmp	r3, #1
	bgt	.L77
	ldr	r3, [fp, #-56]
	ldr	r1, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	sub	r3, fp, #44
	mov	r0, r3
	bl	move_down
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	inme
	mov	r3, r0
	cmp	r3, #0
	bne	.L77
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-48]
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #36]
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-56]
	str	r2, [r3, #48]
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	calc_weight
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	insert_heap
.L77:
	ldr	r3, [fp, #-56]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	ble	.L78
	ldr	r3, [fp, #-56]
	ldr	r1, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	sub	r3, fp, #44
	mov	r0, r3
	bl	move_left
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	inme
	mov	r3, r0
	cmp	r3, #0
	bne	.L78
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-48]
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #36]
	ldr	r3, [fp, #-48]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #40]
	sub	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-56]
	str	r2, [r3, #48]
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	calc_weight
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	insert_heap
.L78:
	ldr	r3, [fp, #-56]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #40]
	cmp	r3, #1
	bgt	.L73
	ldr	r3, [fp, #-56]
	ldr	r1, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #40]
	sub	r3, fp, #44
	mov	r0, r3
	bl	move_right
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, [fp, #-56]
	bl	inme
	mov	r3, r0
	cmp	r3, #0
	bne	.L73
	mov	r0, #52
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-48]
	sub	r3, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	cube_copy
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #36]
	ldr	r3, [fp, #-48]
	str	r2, [r3, #36]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #40]
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3, #40]
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-56]
	str	r2, [r3, #48]
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	calc_weight
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #44]
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	insert_heap
.L73:
	ldr	r0, [fp, #-52]
	bl	heap_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L79
.L75:
	nop
	ldr	r3, .L81
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L80
	bl	__stack_chk_fail
.L80:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L82:
	.align	2
.L81:
	.word	.LC4
	.size	hillclimbing, .-hillclimbing
	.section	.rodata
	.align	2
.LC0:
	.word	2
	.word	3
	.word	-1
	.word	1
	.word	8
	.word	5
	.word	7
	.word	4
	.word	6
	.align	2
.LC1:
	.word	1
	.word	2
	.word	3
	.word	8
	.word	-1
	.word	4
	.word	7
	.word	6
	.word	5
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L86
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L86+4
	sub	ip, fp, #80
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	mov	r3, #0
	str	r3, [fp, #-88]
	mov	r3, #2
	str	r3, [fp, #-84]
	ldr	r3, .L86+8
	sub	ip, fp, #44
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	sub	r3, fp, #44
	sub	r0, fp, #80
	ldr	r2, [fp, #-84]
	ldr	r1, [fp, #-88]
	bl	hillclimbing
	mov	r3, #0
	ldr	r2, .L86
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L85
	bl	__stack_chk_fail
.L85:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L87:
	.align	2
.L86:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
