	.file	"84106.c"
	.intel_syntax noprefix
	.text
	.globl	has_initialized
	.bss
	.align 4
	.type	has_initialized, @object
	.size	has_initialized, 4
has_initialized:
	.zero	4
	.globl	managed_memory_start
	.align 8
	.type	managed_memory_start, @object
	.size	managed_memory_start, 8
managed_memory_start:
	.zero	8
	.globl	last_valid_address
	.align 8
	.type	last_valid_address, @object
	.size	last_valid_address, 8
last_valid_address:
	.zero	8
	.text
	.globl	malloc_init
	.type	malloc_init, @function
malloc_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 0
	call	sbrk@PLT
	mov	QWORD PTR last_valid_address[rip], rax
	mov	rax, QWORD PTR last_valid_address[rip]
	mov	QWORD PTR managed_memory_start[rip], rax
	mov	DWORD PTR has_initialized[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	malloc_init, .-malloc_init
	.globl	free
	.type	free, @function
free:
.LFB1:
	.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	rax, QWORD PTR -24[rbp]
	sub	rax, 8
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	free, .-free
	.globl	malloc
	.type	malloc, @function
malloc:
.LFB2:
	.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
	mov	eax, DWORD PTR has_initialized[rip]
	test	eax, eax
	jne	.L5
	mov	eax, 0
	call	malloc_init
.L5:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	QWORD PTR -40[rbp], rax
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR managed_memory_start[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L6
.L9:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	cmp	QWORD PTR -40[rbp], rax
	jg	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cdqe
	add	QWORD PTR -24[rbp], rax
.L6:
	mov	rax, QWORD PTR last_valid_address[rip]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L9
.L8:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	sbrk@PLT
	mov	rax, QWORD PTR last_valid_address[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR last_valid_address[rip]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR last_valid_address[rip], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
.L10:
	add	QWORD PTR -16[rbp], 8
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	malloc, .-malloc
	.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	"84106.c"
	.text
	.global	has_initialized
	.bss
	.align	2
	.type	has_initialized, %object
	.size	has_initialized, 4
has_initialized:
	.space	4
	.comm	managed_memory_start,4,4
	.comm	last_valid_address,4,4
	.text
	.align	2
	.global	malloc_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc_init, %function
malloc_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	sbrk
	mov	r3, r0
	ldr	r2, .L2
	str	r3, [r2]
	ldr	r3, .L2
	ldr	r3, [r3]
	ldr	r2, .L2+4
	str	r3, [r2]
	ldr	r3, .L2+8
	mov	r2, #1
	str	r2, [r3]
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	last_valid_address
	.word	managed_memory_start
	.word	has_initialized
	.size	malloc_init, .-malloc_init
	.align	2
	.global	free
	.syntax unified
	.arm
	.fpu softvfp
	.type	free, %function
free:
	@ 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]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #8
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	free, .-free
	.align	2
	.global	malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc, %function
malloc:
	@ 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, .L14
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	bl	malloc_init
.L7:
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, .L14+4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L8
.L11:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bgt	.L9
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	b	.L10
.L9:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
.L8:
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L11
.L10:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L12
	ldr	r0, [fp, #-24]
	bl	sbrk
	ldr	r3, .L14+8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L14+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, .L14+8
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
.L12:
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	has_initialized
	.word	managed_memory_start
	.word	last_valid_address
	.size	malloc, .-malloc
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
