	.file	"190768888.c"
	.intel_syntax noprefix
	.text
	.local	base
	.comm	base,16,16
	.local	freep
	.comm	freep,8,8
	.globl	knr_malloc
	.type	knr_malloc, @function
knr_malloc:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR -36[rbp]
	add	rax, 15
	shr	rax, 4
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	lea	rax, base[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR freep[rip], rax
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR base[rip], rax
	mov	DWORD PTR base[rip+8], 0
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -20[rbp], eax
	ja	.L3
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L4
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	eax, eax
	sal	rax, 4
	add	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR freep[rip], rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	jmp	.L6
.L3:
	mov	rax, QWORD PTR freep[rip]
	cmp	QWORD PTR -16[rbp], rax
	jne	.L7
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	morecore
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L7
	mov	eax, 0
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L8
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	knr_malloc, .-knr_malloc
	.section	.rodata
.LC0:
	.string	"sbrk"
.LC1:
	.string	"current program break = %p\n"
	.text
	.globl	morecore
	.type	morecore, @function
morecore:
.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	DWORD PTR -20[rbp], edi
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	edi, 0
	call	sbrk@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L10
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -20[rbp], 1023
	ja	.L12
	mov	DWORD PTR -20[rbp], 1024
.L12:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	sal	rax, 4
	mov	rdi, rax
	call	sbrk@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L13
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	knr_free
	mov	rax, QWORD PTR freep[rip]
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	morecore, .-morecore
	.globl	knr_free
	.type	knr_free, @function
knr_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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, 16
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR freep[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L15
.L18:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -16[rbp], rax
	jb	.L16
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	ja	.L17
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -8[rbp], rax
	jb	.L17
.L16:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
.L15:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jbe	.L18
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -8[rbp], rax
	jnb	.L18
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	eax, eax
	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	.L19
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 8[rax]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	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	.L20
.L19:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L20:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	eax, eax
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	cmp	QWORD PTR -8[rbp], rax
	jne	.L21
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	add	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L22:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR freep[rip], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	knr_free, .-knr_free
	.section	.rodata
	.align 8
.LC2:
	.string	"The lone and level sands stretch far away."
.LC3:
	.string	"knr_malloc returned NULL"
.LC4:
	.string	"Done."
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.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
	lea	rax, .LC2[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 43
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	knr_malloc
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L24
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L25
.L24:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	knr_free
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"190768888.c"
	.text
	.local	base
	.comm	base,8,4
	.local	freep
	.comm	freep,4,4
	.align	2
	.global	knr_malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	knr_malloc, %function
knr_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, [fp, #-24]
	add	r3, r3, #7
	lsr	r3, r3, #3
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L9+4
	str	r3, [fp, #-12]
	ldr	r2, .L9
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+4
	str	r3, [r2]
	ldr	r3, .L9+4
	mov	r2, #0
	str	r2, [r3, #4]
.L2:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L8:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bhi	.L3
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L4
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	b	.L5
.L4:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	sub	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
.L5:
	ldr	r2, .L9
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	b	.L6
.L3:
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L7
	ldr	r0, [fp, #-8]
	bl	morecore
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L7
	mov	r3, #0
	b	.L6
.L7:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L8
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	freep
	.word	base
	.size	knr_malloc, .-knr_malloc
	.section	.rodata
	.align	2
.LC0:
	.ascii	"sbrk\000"
	.align	2
.LC1:
	.ascii	"current program break = %p\012\000"
	.text
	.align	2
	.global	morecore
	.syntax unified
	.arm
	.fpu softvfp
	.type	morecore, %function
morecore:
	@ 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]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	mov	r0, #0
	bl	sbrk
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L16
	bl	perror
	mov	r3, #0
	b	.L13
.L12:
	ldr	r1, [fp, #-12]
	ldr	r0, .L16+4
	bl	printf
	ldr	r3, [fp, #-16]
	cmp	r3, #1024
	bcs	.L14
	mov	r3, #1024
	str	r3, [fp, #-16]
.L14:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	mov	r0, r3
	bl	sbrk
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L16
	bl	perror
	mov	r3, #0
	b	.L13
.L15:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	knr_free
	ldr	r3, .L16+8
	ldr	r3, [r3]
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	.LC1
	.word	freep
	.size	morecore, .-morecore
	.align	2
	.global	knr_free
	.syntax unified
	.arm
	.fpu softvfp
	.type	knr_free, %function
knr_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, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L19
.L22:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bcc	.L20
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bhi	.L21
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L21
.L20:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
.L19:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L22
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcs	.L22
.L21:
	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	.L23
	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	.L24
.L23:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L24:
	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	.L25
	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	.L26
.L25:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L26:
	ldr	r2, .L27
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L28:
	.align	2
.L27:
	.word	freep
	.size	knr_free, .-knr_free
	.section	.rodata
	.align	2
.LC2:
	.ascii	"The lone and level sands stretch far away.\000"
	.align	2
.LC3:
	.ascii	"knr_malloc returned NULL\000"
	.align	2
.LC4:
	.ascii	"Done.\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L32
	str	r3, [fp, #-16]
	mov	r3, #43
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	knr_malloc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	ldr	r0, .L32+4
	bl	puts
	mov	r3, #1
	b	.L31
.L30:
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r0, [fp, #-8]
	bl	puts
	ldr	r0, [fp, #-8]
	bl	knr_free
	ldr	r0, .L32+8
	bl	puts
	mov	r3, #0
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
