	.file	"143963.c"
	.intel_syntax noprefix
	.text
	.globl	totmem
	.bss
	.align 8
	.type	totmem, @object
	.size	totmem, 8
totmem:
	.zero	8
	.local	base
	.comm	base,16,16
	.local	freep
	.comm	freep,8,8
	.section	.rodata
.LC0:
	.string	"start"
.LC1:
	.string	"free(the last char)"
.LC2:
	.string	"free(lot of long's)"
.LC3:
	.string	"free(string)"
.LC4:
	.string	"free(less long's)"
.LC5:
	.string	"free(first char)"
.LC6:
	.string	"free(second char)"
	.align 8
.LC7:
	.string	"--- Memory claimed  : %ld chunks (%ld bytes)\n"
	.align 8
.LC8:
	.string	"    Free memory now : %ld chunks (%ld bytes)\n"
.LC9:
	.string	"    No memory leaks detected."
	.align 8
.LC10:
	.string	"    (!) Leaking memory: %ld chunks (%ld bytes).\n"
.LC11:
	.string	"// Done.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -72[rbp], 100
	mov	DWORD PTR -68[rbp], 50
	lea	rdi, .LC0[rip]
	call	visualize
	mov	edi, 1
	call	mmalloc
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	test	rax, rax
	jne	.L2
	mov	eax, -1
	jmp	.L11
.L2:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	rdi, rax
	call	mmalloc
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	test	rax, rax
	jne	.L4
	mov	eax, -1
	jmp	.L11
.L4:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	mmalloc
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	test	rax, rax
	jne	.L5
	mov	eax, -1
	jmp	.L11
.L5:
	mov	eax, DWORD PTR -68[rbp]
	add	eax, eax
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	mmalloc
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	jne	.L6
	mov	eax, -1
	jmp	.L11
.L6:
	mov	edi, 1
	call	mmalloc
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	test	rax, rax
	jne	.L7
	mov	eax, -1
	jmp	.L11
.L7:
	mov	edi, 1
	call	mmalloc
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	jne	.L8
	mov	eax, -1
	jmp	.L11
.L8:
	mov	edi, 10
	call	putchar@PLT
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC1[rip]
	call	visualize
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC2[rip]
	call	visualize
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC3[rip]
	call	visualize
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC4[rip]
	call	visualize
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC5[rip]
	call	visualize
	lea	rax, -56[rbp]
	mov	rdi, rax
	call	_mfree
	lea	rdi, .LC6[rip]
	call	visualize
	call	getfreem
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR totmem[rip]
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR totmem[rip]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR totmem[rip]
	cmp	QWORD PTR -16[rbp], rax
	jne	.L9
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L10
.L9:
	mov	rax, QWORD PTR totmem[rip]
	sub	rax, QWORD PTR -16[rbp]
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR totmem[rip]
	sub	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC12:
	.string	"--- Free list after \"%s\":\n"
.LC13:
	.string	"\tList does not exist\n"
.LC14:
	.string	"\tList is empty\n"
.LC15:
	.string	"  ptr: %10p size: %-3lu -->  "
.LC16:
	.string	"ptr: %10p size: %-3lu -->  "
.LC17:
	.string	"end\n"
	.text
	.globl	visualize
	.type	visualize, @function
visualize:
.LFB1:
	.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	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR freep[rip]
	test	rax, rax
	jne	.L14
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L14:
	mov	rax, QWORD PTR freep[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR freep[rip]
	cmp	rdx, rax
	jne	.L16
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L13
.L16:
	mov	rax, QWORD PTR freep[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR freep[rip]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR freep[rip]
	cmp	rdx, rax
	ja	.L18
	lea	rdi, .LC17[rip]
	call	puts@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	visualize, .-visualize
	.globl	getfreem
	.type	getfreem, @function
getfreem:
.LFB2:
	.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 freep[rip]
	test	rax, rax
	jne	.L20
	mov	eax, 0
	jmp	.L21
.L20:
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L22
.L23:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	add	QWORD PTR -8[rbp], rax
.L22:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -16[rbp], rax
	jb	.L23
	mov	rax, QWORD PTR -8[rbp]
.L21:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getfreem, .-getfreem
	.section	.rodata
.LC18:
	.string	"Memory limit overflow!"
	.text
	.globl	mmalloc
	.type	mmalloc, @function
mmalloc:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 15
	shr	rax, 4
	add	rax, 1
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR totmem[rip]
	mov	rax, QWORD PTR -24[rbp]
	lea	rbx, [rdx+rax]
	call	getfreem
	add	rax, rbx
	sal	rax, 4
	cmp	rax, 2048
	jbe	.L25
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L26
.L25:
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L27
	lea	rax, base[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR freep[rip], rax
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR base[rip], rax
	mov	QWORD PTR base[rip+8], 0
.L27:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
.L32:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -24[rbp], rax
	ja	.L28
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -24[rbp], rax
	jne	.L29
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L30
.L29:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	sub	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	sal	rax, 4
	add	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
.L30:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR freep[rip], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 16
	jmp	.L26
.L28:
	mov	rax, QWORD PTR freep[rip]
	cmp	QWORD PTR -40[rbp], rax
	jne	.L31
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	morecore
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L31
	mov	eax, 0
	jmp	.L26
.L31:
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L32
.L26:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	mmalloc, .-mmalloc
	.section	.rodata
	.align 8
.LC19:
	.string	"... (sbrk) claimed %ld chunks.\n"
	.text
	.type	morecore, @function
morecore:
.LFB4:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L34
	mov	QWORD PTR -40[rbp], 1
.L34:
	mov	rax, QWORD PTR -40[rbp]
	sal	rax, 4
	mov	rdi, rax
	call	sbrk@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], -1
	jne	.L35
	mov	eax, 0
	jmp	.L37
.L35:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR totmem[rip]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR totmem[rip], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	mov	QWORD PTR -32[rbp], rax
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	_mfree
	mov	rax, QWORD PTR freep[rip]
.L37:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	morecore, .-morecore
	.section	.rodata
	.align 8
.LC20:
	.string	"_mfree: impossible value for size"
	.text
	.globl	_mfree
	.type	_mfree, @function
_mfree:
.LFB5:
	.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	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L52
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	sub	rax, 16
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L42
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR totmem[rip]
	cmp	rdx, rax
	jbe	.L43
.L42:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	jmp	.L39
.L43:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L44
.L47:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -16[rbp], rax
	jb	.L45
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	ja	.L46
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -8[rbp], rax
	jb	.L46
.L45:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
.L44:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jbe	.L47
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -8[rbp], rax
	jnb	.L47
.L46:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rdx, rax
	jne	.L48
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L49
.L48:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L49:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	cmp	QWORD PTR -8[rbp], rax
	jne	.L50
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L51
.L50:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L51:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR freep[rip], rax
	jmp	.L39
.L52:
	nop
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	_mfree, .-_mfree
	.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	"143963.c"
	.text
	.global	totmem
	.bss
	.align	2
	.type	totmem, %object
	.size	totmem, 4
totmem:
	.space	4
	.local	base
	.comm	base,8,4
	.local	freep
	.comm	freep,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"start\000"
	.align	2
.LC1:
	.ascii	"free(the last char)\000"
	.align	2
.LC2:
	.ascii	"free(lot of long's)\000"
	.align	2
.LC3:
	.ascii	"free(string)\000"
	.align	2
.LC4:
	.ascii	"free(less long's)\000"
	.align	2
.LC5:
	.ascii	"free(first char)\000"
	.align	2
.LC6:
	.ascii	"free(second char)\000"
	.align	2
.LC7:
	.ascii	"--- Memory claimed  : %ld chunks (%ld bytes)\012\000"
	.align	2
.LC8:
	.ascii	"    Free memory now : %ld chunks (%ld bytes)\012\000"
	.align	2
.LC9:
	.ascii	"    No memory leaks detected.\000"
	.align	2
.LC10:
	.ascii	"    (!) Leaking memory: %ld chunks (%ld bytes).\012"
	.ascii	"\000"
	.align	2
.LC11:
	.ascii	"// Done.\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #100
	str	r3, [fp, #-20]
	mov	r3, #50
	str	r3, [fp, #-16]
	ldr	r0, .L13+4
	bl	visualize
	mov	r0, #1
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L2
	mvn	r3, #0
	b	.L11
.L2:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L11
.L4:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L5
	mvn	r3, #0
	b	.L11
.L5:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L6
	mvn	r3, #0
	b	.L11
.L6:
	mov	r0, #1
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L7
	mvn	r3, #0
	b	.L11
.L7:
	mov	r0, #1
	bl	mmalloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L8
	mvn	r3, #0
	b	.L11
.L8:
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #36
	mov	r0, r3
	bl	_mfree
	sub	r3, fp, #36
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+8
	bl	visualize
	sub	r3, fp, #24
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+12
	bl	visualize
	sub	r3, fp, #32
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+16
	bl	visualize
	sub	r3, fp, #28
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+20
	bl	visualize
	sub	r3, fp, #44
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+24
	bl	visualize
	sub	r3, fp, #40
	mov	r0, r3
	bl	_mfree
	ldr	r0, .L13+28
	bl	visualize
	bl	getfreem
	str	r0, [fp, #-12]
	mov	r0, #10
	bl	putchar
	ldr	r3, .L13+32
	ldr	r1, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r0, .L13+36
	bl	printf
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L13+40
	bl	printf
	ldr	r3, .L13+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L9
	ldr	r0, .L13+44
	bl	puts
	b	.L10
.L9:
	ldr	r3, .L13+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r1, r2, r3
	ldr	r3, .L13+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r0, .L13+48
	bl	printf
.L10:
	ldr	r0, .L13+52
	bl	puts
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	totmem
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.section	.rodata
	.align	2
.LC13:
	.ascii	"--- Free list after \"%s\":\012\000"
	.align	2
.LC14:
	.ascii	"\011List does not exist\012\000"
	.align	2
.LC15:
	.ascii	"\011List is empty\012\000"
	.align	2
.LC16:
	.ascii	"  ptr: %10p size: %-3lu -->  \000"
	.align	2
.LC17:
	.ascii	"ptr: %10p size: %-3lu -->  \000"
	.align	2
.LC18:
	.ascii	"end\012\000"
	.text
	.align	2
	.global	visualize
	.syntax unified
	.arm
	.fpu softvfp
	.type	visualize, %function
visualize:
	@ 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	r1, [fp, #-16]
	ldr	r0, .L21
	bl	printf
	ldr	r3, .L21+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L21+8
	bl	puts
	b	.L15
.L16:
	ldr	r3, .L21+4
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L21+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L18
	ldr	r0, .L21+12
	bl	puts
	b	.L15
.L18:
	ldr	r3, .L21+4
	ldr	r1, [r3]
	ldr	r3, .L21+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L21+16
	bl	printf
	ldr	r3, .L21+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L19
.L20:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L21+20
	bl	printf
.L19:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, .L21+4
	ldr	r3, [r3]
	cmp	r2, r3
	bhi	.L20
	ldr	r0, .L21+24
	bl	puts
.L15:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC13
	.word	freep
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	visualize, .-visualize
	.align	2
	.global	getfreem
	.syntax unified
	.arm
	.fpu softvfp
	.type	getfreem, %function
getfreem:
	@ 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, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L24
	mov	r3, #0
	b	.L25
.L24:
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	b	.L26
.L27:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
.L26:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcc	.L27
	ldr	r3, [fp, #-8]
.L25:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L29:
	.align	2
.L28:
	.word	freep
	.size	getfreem, .-getfreem
	.section	.rodata
	.align	2
.LC19:
	.ascii	"Memory limit overflow!\000"
	.text
	.align	2
	.global	mmalloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmalloc, %function
mmalloc:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	add	r3, r3, #7
	lsr	r3, r3, #3
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r4, r2, r3
	bl	getfreem
	mov	r3, r0
	add	r3, r4, r3
	lsl	r3, r3, #3
	cmp	r3, #2048
	bls	.L31
	ldr	r0, .L39+4
	bl	puts
	mov	r3, #0
	b	.L32
.L31:
	ldr	r3, .L39+8
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L33
	ldr	r3, .L39+12
	str	r3, [fp, #-20]
	ldr	r2, .L39+8
	ldr	r3, [fp, #-20]
	str	r3, [r2]
	ldr	r3, .L39+8
	ldr	r3, [r3]
	ldr	r2, .L39+12
	str	r3, [r2]
	ldr	r3, .L39+12
	mov	r2, #0
	str	r2, [r3, #4]
.L33:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
.L38:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bhi	.L34
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L35
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	b	.L36
.L35:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
.L36:
	ldr	r2, .L39+8
	ldr	r3, [fp, #-20]
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	b	.L32
.L34:
	ldr	r3, .L39+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L37
	ldr	r0, [fp, #-16]
	bl	morecore
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L37
	mov	r3, #0
	b	.L32
.L37:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	b	.L38
.L32:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L40:
	.align	2
.L39:
	.word	totmem
	.word	.LC19
	.word	freep
	.word	base
	.size	mmalloc, .-mmalloc
	.section	.rodata
	.align	2
.LC20:
	.ascii	"... (sbrk) claimed %ld chunks.\012\000"
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	morecore, %function
morecore:
	@ 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, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L42
	mov	r3, #1
	str	r3, [fp, #-24]
.L42:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	sbrk
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L43
	mov	r3, #0
	b	.L45
.L43:
	ldr	r1, [fp, #-24]
	ldr	r0, .L47+4
	bl	printf
	ldr	r3, .L47+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, .L47+8
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	str	r3, [fp, #-20]
	sub	r3, fp, #20
	mov	r0, r3
	bl	_mfree
	ldr	r3, .L47+12
	ldr	r3, [r3]
.L45:
	ldr	r2, .L47
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L46
	bl	__stack_chk_fail
.L46:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC21
	.word	.LC20
	.word	totmem
	.word	freep
	.size	morecore, .-morecore
	.section	.rodata
	.align	2
.LC22:
	.ascii	"_mfree: impossible value for size\000"
	.text
	.align	2
	.global	_mfree
	.syntax unified
	.arm
	.fpu softvfp
	.type	_mfree, %function
_mfree:
	@ 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]
	cmp	r3, #0
	beq	.L62
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	sub	r3, r3, #8
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L52
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, .L63
	ldr	r3, [r3]
	cmp	r2, r3
	bls	.L53
.L52:
	ldr	r0, .L63+4
	bl	puts
	b	.L49
.L53:
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L63+8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L54
.L57:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcc	.L55
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L56
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L56
.L55:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
.L54:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L57
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcs	.L57
.L56:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L58
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L59
.L58:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L59:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L60
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	b	.L61
.L60:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L61:
	ldr	r2, .L63+8
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	b	.L49
.L62:
	nop
.L49:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	totmem
	.word	.LC22
	.word	freep
	.size	_mfree, .-_mfree
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
