	.file	"247114.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"pointer to x is %p\n"
.LC1:
	.string	"pointer to y is %p\n"
.LC2:
	.string	"about to free(0)"
.LC3:
	.string	"x = %p\n"
.LC4:
	.string	"Small string"
.LC5:
	.string	"0x%p test string1: %s\n"
	.align 8
.LC6:
	.string	"********** Larger string **********"
.LC7:
	.string	"0x%p test string2: %s\n"
	.align 8
.LC8:
	.string	"Allocate 100 nodes 500 bytes each"
.LC9:
	.string	"loop 1: malloc returned 0"
.LC10:
	.string	"freeing 100 nodes"
.LC11:
	.string	"try realloc 100 times "
.LC12:
	.string	"loop 3: realloc returned 0"
	.align 8
.LC13:
	.string	"Allocate another 100 nodes 600 bytes each"
.LC14:
	.string	"loop 2: malloc returned 0"
.LC15:
	.string	"alloc test PASSED"
	.align 8
.LC16:
	.string	"!!!!!!!!!!!! alloc test FAILED. !!!!!!!!!!!!!!!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -56[rbp], 999
	lea	rax, -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 400
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 13
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 13
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 36
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 36
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	jmp	.L2
.L5:
	mov	edi, 500
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L3
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	add	DWORD PTR -52[rbp], 1
.L2:
	cmp	DWORD PTR -52[rbp], 99
	jle	.L5
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
.L6:
	cmp	QWORD PTR -48[rbp], 0
	jne	.L7
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -52[rbp], 1
	jmp	.L8
.L10:
	mov	eax, DWORD PTR -52[rbp]
	imul	eax, eax, 200
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L9
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L4
.L9:
	add	DWORD PTR -52[rbp], 1
.L8:
	cmp	DWORD PTR -52[rbp], 100
	jle	.L10
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	jmp	.L11
.L13:
	mov	edi, 600
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L12
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L4
.L12:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -48[rbp], rax
	add	DWORD PTR -52[rbp], 1
.L11:
	cmp	DWORD PTR -52[rbp], 99
	jle	.L13
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L14
.L15:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
.L14:
	cmp	QWORD PTR -48[rbp], 0
	jne	.L15
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"247114.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"pointer to x is %p\012\000"
	.align	2
.LC1:
	.ascii	"pointer to y is %p\012\000"
	.align	2
.LC2:
	.ascii	"about to free(0)\000"
	.align	2
.LC3:
	.ascii	"x = %p\012\000"
	.align	2
.LC4:
	.ascii	"Small string\000"
	.align	2
.LC5:
	.ascii	"0x%p test string1: %s\012\000"
	.align	2
.LC6:
	.ascii	"********** Larger string **********\000"
	.align	2
.LC7:
	.ascii	"0x%p test string2: %s\012\000"
	.align	2
.LC8:
	.ascii	"Allocate 100 nodes 500 bytes each\000"
	.align	2
.LC9:
	.ascii	"loop 1: malloc returned 0\000"
	.align	2
.LC10:
	.ascii	"freeing 100 nodes\000"
	.align	2
.LC11:
	.ascii	"try realloc 100 times \000"
	.align	2
.LC12:
	.ascii	"loop 3: realloc returned 0\000"
	.align	2
.LC13:
	.ascii	"Allocate another 100 nodes 600 bytes each\000"
	.align	2
.LC14:
	.ascii	"loop 2: malloc returned 0\000"
	.align	2
.LC15:
	.ascii	"alloc test PASSED\000"
	.align	2
.LC16:
	.ascii	"!!!!!!!!!!!! alloc test FAILED. !!!!!!!!!!!!!!!\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	str	r3, [fp, #-36]
	sub	r3, fp, #36
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L17+8
	bl	printf
	ldr	r1, [fp, #-20]
	ldr	r0, .L17+12
	bl	printf
	mov	r0, #8000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L17+8
	bl	printf
	mov	r0, #400
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L17+12
	bl	printf
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r0, .L17+16
	bl	puts
	mov	r0, #13
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L17+20
	bl	printf
	mov	r2, #13
	ldr	r1, .L17+24
	ldr	r0, [fp, #-16]
	bl	memcpy
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-16]
	ldr	r0, .L17+28
	bl	printf
	mov	r1, #36
	ldr	r0, [fp, #-16]
	bl	realloc
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L17+28
	bl	printf
	mov	r2, #36
	ldr	r1, .L17+32
	ldr	r0, [fp, #-20]
	bl	memcpy
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L17+36
	bl	printf
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r0, .L17+40
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L5:
	mov	r0, #500
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L17+44
	bl	puts
	b	.L4
.L3:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #99
	ble	.L5
	ldr	r0, .L17+48
	bl	puts
	b	.L6
.L7:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	free
.L6:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L17+52
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L8
.L10:
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	realloc
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L17+56
	bl	puts
	b	.L4
.L9:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r3, [fp, #-24]
	cmp	r3, #100
	ble	.L10
	mov	r1, #0
	ldr	r0, [fp, #-28]
	bl	realloc
	str	r0, [fp, #-12]
	ldr	r0, .L17+60
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L11
.L13:
	mov	r0, #600
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L17+64
	bl	puts
	b	.L4
.L12:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L11:
	ldr	r3, [fp, #-24]
	cmp	r3, #99
	ble	.L13
	ldr	r0, .L17+48
	bl	puts
	b	.L14
.L15:
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	free
.L14:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L15
	ldr	r0, .L17+68
	bl	puts
	mov	r0, #0
	bl	exit
.L4:
	ldr	r0, .L17+72
	bl	puts
	mov	r0, #1
	bl	exit
.L18:
	.align	2
.L17:
	.word	.LC17
	.word	999
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
