	.file	"354504.c"
	.intel_syntax noprefix
	.text
	.globl	free_mem
	.bss
	.align 32
	.type	free_mem, @object
	.size	free_mem, 67108864
free_mem:
	.zero	67108864
	.globl	malloc_inited
	.align 4
	.type	malloc_inited, @object
	.size	malloc_inited, 4
malloc_inited:
	.zero	4
	.globl	heap_size
	.align 4
	.type	heap_size, @object
	.size	heap_size, 4
heap_size:
	.zero	4
	.globl	num_blocks
	.align 4
	.type	num_blocks, @object
	.size	num_blocks, 4
num_blocks:
	.zero	4
	.globl	first_block_addr
	.align 8
	.type	first_block_addr, @object
	.size	first_block_addr, 8
first_block_addr:
	.zero	8
	.globl	used_flags
	.align 8
	.type	used_flags, @object
	.size	used_flags, 8
used_flags:
	.zero	8
	.section	.rodata
.LC0:
	.string	"Invalid pointer: %p\n"
	.text
	.globl	get_block_index_from_pointer
	.type	get_block_index_from_pointer, @function
get_block_index_from_pointer:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR first_block_addr[rip]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	and	eax, 16383
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	mov	eax, 0
	call	assert@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR first_block_addr[rip]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	shr	eax, 14
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_block_index_from_pointer, .-get_block_index_from_pointer
	.globl	malloc_init
	.type	malloc_init, @function
malloc_init:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR heap_size[rip], 67108864
	mov	eax, DWORD PTR heap_size[rip]
	mov	edx, eax
	mov	rax, rdx
	sal	rax, 12
	sub	rax, rdx
	sal	rax, 12
	add	rax, rdx
	shr	rax, 32
	shr	eax, 6
	mov	DWORD PTR num_blocks[rip], eax
	lea	rax, free_mem[rip]
	mov	QWORD PTR used_flags[rip], rax
	mov	eax, DWORD PTR num_blocks[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, free_mem[rip]
	add	rax, rdx
	mov	QWORD PTR first_block_addr[rip], rax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR num_blocks[rip]
	cmp	DWORD PTR -4[rbp], eax
	jb	.L6
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	malloc_init, .-malloc_init
	.globl	malloc
	.type	malloc, @function
malloc:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	cmp	QWORD PTR -40[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -40[rbp]
	and	eax, 16383
	test	rax, rax
	setne	al
	movzx	edx, al
	mov	rax, QWORD PTR -40[rbp]
	shr	rax, 14
	add	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR malloc_inited[rip]
	test	eax, eax
	jne	.L9
	call	malloc_init
	mov	DWORD PTR malloc_inited[rip], 1
.L9:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L10
.L19:
	mov	DWORD PTR -16[rbp], 1
	mov	DWORD PTR -20[rbp], 0
	jmp	.L11
.L14:
	mov	rax, QWORD PTR used_flags[rip]
	mov	ecx, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -20[rbp]
	add	edx, ecx
	mov	edx, edx
	sal	rdx, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L12
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	add	DWORD PTR -24[rbp], eax
	jmp	.L13
.L12:
	add	DWORD PTR -20[rbp], 1
.L11:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jb	.L14
.L13:
	cmp	DWORD PTR -16[rbp], 0
	je	.L15
	mov	DWORD PTR -20[rbp], 0
	jmp	.L16
.L17:
	mov	rax, QWORD PTR used_flags[rip]
	mov	ecx, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -20[rbp]
	add	edx, ecx
	mov	edx, edx
	sal	rdx, 2
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -20[rbp], 1
.L16:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jb	.L17
	mov	rax, QWORD PTR first_block_addr[rip]
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	sal	eax, 14
	add	eax, edx
	mov	eax, eax
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L7
.L15:
	add	DWORD PTR -24[rbp], 1
.L10:
	mov	edx, DWORD PTR num_blocks[rip]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	sub	eax, 1
	cmp	DWORD PTR -24[rbp], eax
	jb	.L19
	mov	edi, 0
	mov	eax, 0
	call	assert@PLT
	jmp	.L7
.L8:
	mov	eax, 0
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	malloc, .-malloc
	.globl	realloc
	.type	realloc, @function
realloc:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	cmp	QWORD PTR -72[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	get_block_index_from_pointer
	mov	DWORD PTR -48[rbp], eax
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -48[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	sal	eax, 14
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	mov	eax, 0
	call	assert@PLT
	mov	eax, DWORD PTR -40[rbp]
	cmp	QWORD PTR -80[rbp], rax
	jbe	.L23
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	malloc
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_block_index_from_pointer
	mov	DWORD PTR -36[rbp], eax
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -36[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR -32[rbp], eax
	cmovbe	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -52[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -52[rbp]
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -52[rbp], 1
.L24:
	mov	eax, DWORD PTR -28[rbp]
	sal	eax, 14
	shr	eax, 2
	cmp	DWORD PTR -52[rbp], eax
	jb	.L25
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	free
	mov	rax, QWORD PTR -24[rbp]
	jmp	.L26
.L23:
	mov	rax, QWORD PTR -72[rbp]
	jmp	.L26
.L22:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	malloc
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	realloc, .-realloc
	.section	.rodata
.LC1:
	.string	"Malloc not inited."
	.text
	.globl	free
	.type	free, @function
free:
.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
	cmp	QWORD PTR -24[rbp], 0
	je	.L27
	mov	eax, DWORD PTR malloc_inited[rip]
	test	eax, eax
	jne	.L29
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L27
.L29:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	get_block_index_from_pointer
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR num_blocks[rip]
	cmp	DWORD PTR -8[rbp], eax
	jnb	.L30
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L31
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L32
.L33:
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	sub	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	mov	eax, 0
	call	assert@PLT
	mov	rdx, QWORD PTR used_flags[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -12[rbp], 1
.L32:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jb	.L33
	jmp	.L27
.L31:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, 0
	mov	eax, 0
	call	assert@PLT
	jmp	.L27
.L30:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	mov	edi, 0
	mov	eax, 0
	call	assert@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	free, .-free
	.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	"354504.c"
	.text
	.comm	free_mem,67108864,4
	.global	malloc_inited
	.bss
	.align	2
	.type	malloc_inited, %object
	.size	malloc_inited, 4
malloc_inited:
	.space	4
	.comm	heap_size,4,4
	.comm	num_blocks,4,4
	.comm	first_block_addr,4,4
	.comm	used_flags,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Invalid pointer: %p\012\000"
	.text
	.align	2
	.global	get_block_index_from_pointer
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_block_index_from_pointer, %function
get_block_index_from_pointer:
	@ 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]
	ldr	r3, [fp, #-8]
	ldr	r2, .L4
	ldr	r2, [r2]
	sub	r3, r3, r2
	lsl	r3, r3, #18
	lsr	r3, r3, #18
	cmp	r3, #0
	beq	.L2
	ldr	r1, [fp, #-8]
	ldr	r0, .L4+4
	bl	printf
	mov	r0, #0
	bl	assert
.L2:
	ldr	r3, [fp, #-8]
	ldr	r2, .L4
	ldr	r2, [r2]
	sub	r3, r3, r2
	lsr	r3, r3, #14
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	first_block_addr
	.word	.LC0
	.size	get_block_index_from_pointer, .-get_block_index_from_pointer
	.align	2
	.global	malloc_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc_init, %function
malloc_init:
	@ 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
	ldr	r3, .L9
	mov	r2, #67108864
	str	r2, [r3]
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+4
	umull	r1, r3, r2, r3
	lsr	r3, r3, #6
	ldr	r2, .L9+8
	str	r3, [r2]
	ldr	r3, .L9+12
	ldr	r2, .L9+16
	str	r2, [r3]
	ldr	r3, .L9+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, .L9+16
	add	r3, r3, r2
	ldr	r2, .L9+20
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r3, .L9+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, .L9+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L8
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L10:
	.align	2
.L9:
	.word	heap_size
	.word	16773121
	.word	num_blocks
	.word	used_flags
	.word	free_mem
	.word	first_block_addr
	.size	malloc_init, .-malloc_init
	.align	2
	.global	malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc, %function
malloc:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #18
	lsr	r3, r3, #18
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-32]
	lsr	r3, r3, #14
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, .L25
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	bl	malloc_init
	ldr	r3, .L25
	mov	r2, #1
	str	r2, [r3]
.L13:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L14
.L23:
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L15
.L18:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	b	.L17
.L16:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L15:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bcc	.L18
.L17:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L19
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L20
.L21:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [fp, #-12]
	ldr	r2, [fp, #-20]
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bcc	.L21
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #14
	ldr	r2, .L25+8
	ldr	r2, [r2]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	b	.L11
.L19:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r3, .L25+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bcc	.L23
	mov	r0, #0
	bl	assert
	b	.L11
.L12:
	mov	r3, #0
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	malloc_inited
	.word	used_flags
	.word	first_block_addr
	.word	num_blocks
	.size	malloc, .-malloc
	.align	2
	.global	realloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	realloc, %function
realloc:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L28
	ldr	r0, [fp, #-48]
	bl	get_block_index_from_pointer
	str	r0, [fp, #-40]
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #14
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-36]
	bl	assert
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bls	.L29
	ldr	r0, [fp, #-52]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	get_block_index_from_pointer
	str	r0, [fp, #-16]
	ldr	r3, .L33
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	movcc	r3, r2
	movcs	r3, r3
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L30
.L31:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L30:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #14
	lsr	r3, r3, #2
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bcc	.L31
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r3, [fp, #-28]
	b	.L32
.L29:
	ldr	r3, [fp, #-48]
	b	.L32
.L28:
	ldr	r0, [fp, #-52]
	bl	malloc
	mov	r3, r0
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	used_flags
	.size	realloc, .-realloc
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Malloc not inited.\000"
	.text
	.align	2
	.global	free
	.syntax unified
	.arm
	.fpu softvfp
	.type	free, %function
free:
	@ 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]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L35
	ldr	r3, .L42
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L37
	ldr	r0, .L42+4
	bl	puts
	b	.L35
.L37:
	ldr	r0, [fp, #-24]
	bl	get_block_index_from_pointer
	str	r0, [fp, #-12]
	ldr	r3, .L42+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcs	.L38
	ldr	r3, .L42+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L42+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L40
.L41:
	ldr	r3, .L42+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [fp, #-8]
	ldr	r2, [fp, #-16]
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	assert
	ldr	r3, .L42+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L40:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L41
	b	.L35
.L39:
	ldr	r1, [fp, #-12]
	mov	r0, #0
	bl	assert
	b	.L35
.L38:
	ldr	r1, [fp, #-12]
	mov	r0, #0
	bl	assert
.L35:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	malloc_inited
	.word	.LC1
	.word	num_blocks
	.word	used_flags
	.size	free, .-free
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
