	.file	"212644470.c"
	.intel_syntax noprefix
	.text
	.globl	HEAP_START
	.data
	.align 8
	.type	HEAP_START, @object
	.size	HEAP_START, 8
HEAP_START:
	.quad	4194304
	.globl	HEAP_SIZE
	.align 4
	.type	HEAP_SIZE, @object
	.size	HEAP_SIZE, 4
HEAP_SIZE:
	.long	805306368
	.globl	HEAP_END
	.bss
	.align 8
	.type	HEAP_END, @object
	.size	HEAP_END, 8
HEAP_END:
	.zero	8
	.local	freeptr
	.comm	freeptr,8,8
	.local	bytes_allocated
	.comm	bytes_allocated,4,4
	.text
	.globl	mem_init
	.type	mem_init, @function
mem_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	rax, QWORD PTR HEAP_START[rip]
	and	eax, 7
	test	rax, rax
	je	.L2
	mov	rcx, QWORD PTR HEAP_START[rip]
	mov	rax, QWORD PTR HEAP_START[rip]
	mov	rdx, rax
	mov	rax, rdx
	sar	rax, 63
	shr	rax, 61
	mov	rsi, rax
	lea	rax, [rdx+rsi]
	and	eax, 7
	sub	rax, rsi
	mov	rdx, rax
	mov	eax, 8
	sub	rax, rdx
	add	rax, rcx
	mov	QWORD PTR HEAP_START[rip], rax
.L2:
	mov	rax, QWORD PTR HEAP_START[rip]
	mov	edx, DWORD PTR HEAP_SIZE[rip]
	mov	edx, edx
	add	rax, rdx
	mov	QWORD PTR HEAP_END[rip], rax
	mov	rax, QWORD PTR HEAP_START[rip]
	mov	QWORD PTR freeptr[rip], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	mem_init, .-mem_init
	.globl	malloc
	.type	malloc, @function
malloc:
.LFB1:
	.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 -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	je	.L4
	mov	rax, QWORD PTR freeptr[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 7
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	cqo
	shr	rdx, 61
	add	rax, rdx
	and	eax, 7
	sub	rax, rdx
	mov	rdx, rax
	mov	eax, 8
	sub	rax, rdx
	add	QWORD PTR -8[rbp], rax
.L5:
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR HEAP_END[rip]
	cmp	rdx, rax
	jbe	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	rdx, QWORD PTR freeptr[rip]
	mov	eax, DWORD PTR -20[rbp]
	add	rax, rdx
	mov	QWORD PTR freeptr[rip], rax
	mov	edx, DWORD PTR bytes_allocated[rip]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR bytes_allocated[rip], eax
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L7
.L4:
	mov	eax, 0
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	malloc, .-malloc
	.globl	free
	.type	free, @function
free:
.LFB2:
	.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
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"212644470.c"
	.text
	.global	HEAP_START
	.data
	.align	2
	.type	HEAP_START, %object
	.size	HEAP_START, 4
HEAP_START:
	.word	4194304
	.global	HEAP_SIZE
	.align	2
	.type	HEAP_SIZE, %object
	.size	HEAP_SIZE, 4
HEAP_SIZE:
	.word	805306368
	.comm	HEAP_END,4,4
	.local	freeptr
	.comm	freeptr,4,4
	.local	bytes_allocated
	.comm	bytes_allocated,4,4
	.text
	.align	2
	.global	mem_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	mem_init, %function
mem_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L3
	ldr	r3, [r3]
	and	r3, r3, #7
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, .L3
	ldr	r3, [r3]
	rsbs	r1, r3, #0
	and	r3, r3, #7
	and	r1, r1, #7
	rsbpl	r3, r1, #0
	rsb	r3, r3, #8
	add	r3, r2, r3
	ldr	r2, .L3
	str	r3, [r2]
.L2:
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, .L3+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L3+8
	str	r3, [r2]
	ldr	r3, .L3
	ldr	r3, [r3]
	ldr	r2, .L3+12
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L4:
	.align	2
.L3:
	.word	HEAP_START
	.word	HEAP_SIZE
	.word	HEAP_END
	.word	freeptr
	.size	mem_init, .-mem_init
	.align	2
	.global	malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	malloc, %function
malloc:
	@ 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]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #7
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-8]
	rsbs	r2, r3, #0
	and	r3, r3, #7
	and	r2, r2, #7
	rsbpl	r3, r2, #0
	rsb	r3, r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
.L7:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, .L10+4
	ldr	r3, [r3]
	cmp	r2, r3
	bls	.L8
	mov	r3, #0
	b	.L9
.L8:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, .L10
	str	r3, [r2]
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, .L10+8
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	b	.L9
.L6:
	mov	r3, #0
.L9:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L11:
	.align	2
.L10:
	.word	freeptr
	.word	HEAP_END
	.word	bytes_allocated
	.size	malloc, .-malloc
	.align	2
	.global	free
	.syntax unified
	.arm
	.fpu softvfp
	.type	free, %function
free:
	@ 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]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	free, .-free
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
