	.file	"extr_realloc.c_realloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No hunk found"
.LC1:
	.string	"realloc"
.LC2:
	.string	"Found hunk"
	.text
	.p2align 4
	.globl	realloc
	.type	realloc, @function
realloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movsx	rbp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rbp, 4
	test	esi, esi
	je	.L26
	mov	r12d, esi
	test	rdi, rdi
	je	.L4
	mov	rbx, QWORD PTR malloc_first[rip]
	mov	rax, QWORD PTR MALLOC_MAGIC[rip]
	test	rbx, rbx
	jne	.L6
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rbx, QWORD PTR 24[rbx]
	test	rbx, rbx
	je	.L9
.L6:
	cmp	QWORD PTR [rbx], rax
	jne	.L9
	cmp	rbx, rbp
	jne	.L7
	lea	rsi, .LC2[rip]
	lea	rdi, .LC1[rip]
	call	debug@PLT
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, r12d
	je	.L12
	jg	.L27
	mov	rax, QWORD PTR 24[rbx]
	test	rax, rax
	jne	.L28
.L9:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	xor	r14d, r14d
	call	debug@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r14
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	call	free@PLT
	xor	r14d, r14d
	jmp	.L1
.L4:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, esi
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	malloc@PLT
.L12:
	.cfi_restore_state
	mov	r14, r13
	jmp	.L1
.L27:
	movsx	rdx, r12d
	movsx	rcx, eax
	mov	r14, r13
	add	rdx, 4
	cmp	rcx, rdx
	jbe	.L1
	movsx	rcx, ebx
	sub	eax, r12d
	add	rdx, rcx
	sub	eax, 4
	mov	rcx, QWORD PTR MALLOC_FREE[rip]
	mov	DWORD PTR 8[rdx], eax
	mov	rax, QWORD PTR MALLOC_MAGIC[rip]
	mov	QWORD PTR 16[rdx], rcx
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR 24[rbx]
	mov	QWORD PTR 24[rdx], rax
	mov	QWORD PTR 24[rbx], rdx
	mov	DWORD PTR 8[rbx], r12d
	jmp	.L1
.L28:
	mov	rcx, QWORD PTR MALLOC_FREE[rip]
	cmp	QWORD PTR 16[rax], rcx
	je	.L29
.L10:
	mov	edi, r12d
	call	malloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L1
	mov	edx, DWORD PTR 8[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	memcpy@PLT
	mov	rdi, r13
	call	free@PLT
	jmp	.L1
.L29:
	xor	eax, eax
	call	malloc_gc@PLT
	mov	rcx, QWORD PTR 24[rbx]
	movsx	rsi, r12d
	mov	eax, DWORD PTR 8[rcx]
	add	eax, DWORD PTR 8[rbx]
	movsx	rdx, eax
	add	rdx, 4
	cmp	rdx, rsi
	jb	.L10
	mov	rcx, QWORD PTR 24[rcx]
	movsx	rdx, ebx
	sub	eax, r12d
	mov	r14, r13
	lea	rdx, 4[rsi+rdx]
	sub	eax, 4
	mov	QWORD PTR 24[rdx], rcx
	mov	rcx, QWORD PTR MALLOC_FREE[rip]
	mov	DWORD PTR 8[rdx], eax
	mov	rax, QWORD PTR MALLOC_MAGIC[rip]
	mov	QWORD PTR 16[rdx], rcx
	mov	QWORD PTR [rdx], rax
	mov	QWORD PTR 24[rbx], rdx
	mov	DWORD PTR 8[rbx], r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	realloc, .-realloc
	.comm	malloc_first,8,8
	.comm	MALLOC_MAGIC,8,8
	.comm	MALLOC_FREE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_realloc.c_realloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"No hunk found\000"
	.align	2
.LC1:
	.ascii	"realloc\000"
	.align	2
.LC2:
	.ascii	"Found hunk\000"
	.text
	.align	2
	.global	realloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	realloc, %function
realloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r6, r1, #0
	beq	.L25
	cmp	r0, #0
	mov	r7, r0
	beq	.L4
	ldr	r3, .L30
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L9
	ldr	r8, .L30+4
	sub	r5, r0, #4
	ldr	r2, [r8]
	b	.L6
.L7:
	ldr	r4, [r4, #12]
	cmp	r4, #0
	beq	.L9
.L6:
	ldr	r3, [r4]
	cmp	r3, r2
	bne	.L9
	cmp	r4, r5
	bne	.L7
	ldr	r1, .L30+8
	ldr	r0, .L30+12
	bl	debug
	ldr	r3, [r4, #4]
	cmp	r3, r6
	beq	.L13
	bgt	.L26
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L27
.L9:
	ldr	r1, .L30+16
	ldr	r0, .L30+12
	bl	debug
	mov	r8, #0
.L1:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	bl	free
	mov	r8, r6
	b	.L1
.L4:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	malloc
.L26:
	add	r2, r6, #4
	cmp	r3, r2
	bhi	.L28
.L13:
	mov	r8, r7
	b	.L1
.L27:
	ldr	r9, .L30+20
	ldr	r2, [r3, #8]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L29
.L10:
	mov	r0, r6
	bl	malloc
	subs	r8, r0, #0
	beq	.L1
	mov	r1, r7
	ldr	r2, [r5, #4]
	bl	memcpy
	mov	r0, r7
	bl	free
	b	.L1
.L28:
	ldr	r1, .L30+20
	sub	r3, r3, r6
	ldr	ip, [r1]
	sub	r3, r3, #4
	add	r1, r4, r2
	str	r3, [r1, #4]
	ldr	r0, [r8]
	ldr	r3, [r4, #12]
	mov	r8, r7
	str	ip, [r1, #8]
	str	r0, [r4, r2]
	str	r3, [r1, #12]
	str	r1, [r4, #12]
	str	r6, [r4, #4]
	b	.L1
.L29:
	bl	malloc_gc
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #4]
	ldr	r1, [r2, #4]
	add	r3, r3, r1
	add	r1, r3, #4
	cmp	r1, r6
	bcc	.L10
	ldr	lr, [r2, #12]
	ldr	ip, [r9]
	ldr	r0, [r8]
	add	r1, r6, #4
	sub	r3, r3, r6
	add	r2, r1, r4
	sub	r3, r3, #4
	stmib	r2, {r3, ip, lr}
	mov	r8, r7
	str	r0, [r1, r4]
	str	r2, [r4, #12]
	str	r6, [r4, #4]
	b	.L1
.L31:
	.align	2
.L30:
	.word	malloc_first
	.word	MALLOC_MAGIC
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	MALLOC_FREE
	.size	realloc, .-realloc
	.comm	malloc_first,4,4
	.comm	MALLOC_MAGIC,4,4
	.comm	MALLOC_FREE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
