	.file	"extr_ctf.c_ctf_buf_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ctf_buf_write, @function
ctf_buf_write:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdx, rdx
	je	.L8
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR [rdi]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	sub	rdi, rax
	mov	rsi, r13
	call	MIN@PLT
	mov	rsi, QWORD PTR 0[rbp]
	mov	rdi, r12
	mov	rdx, rax
	mov	rbx, rax
	call	bcopy@PLT
	mov	rax, QWORD PTR 0[rbp]
	add	r12, rbx
	add	rax, rbx
	mov	QWORD PTR 0[rbp], rax
	sub	r13, rbx
	je	.L12
.L4:
	mov	rdi, QWORD PTR 8[rbp]
	cmp	rdi, rax
	jne	.L3
	mov	rdi, rbp
	call	ctf_buf_grow@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR 0[rbp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.cfi_endproc
.LFE0:
	.size	ctf_buf_write, .-ctf_buf_write
	.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_ctf.c_ctf_buf_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctf_buf_write, %function
ctf_buf_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r6, r2, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r5, r0
	mov	r7, r1
	ldr	r3, [r0]
	b	.L4
.L3:
	mov	r1, r6
	sub	r0, r0, r3
	bl	MIN
	mov	r4, r0
	mov	r2, r0
	ldr	r1, [r5]
	mov	r0, r7
	bl	bcopy
	ldr	r3, [r5]
	subs	r6, r6, r4
	add	r3, r4, r3
	add	r7, r7, r4
	str	r3, [r5]
	popeq	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r0, [r5, #4]
	cmp	r0, r3
	bne	.L3
	mov	r0, r5
	bl	ctf_buf_grow
	ldr	r0, [r5, #4]
	ldr	r3, [r5]
	b	.L3
	.size	ctf_buf_write, .-ctf_buf_write
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
