	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dyn_buf_write
_dyn_buf_write:                         ## @dyn_buf_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %ecx
	movl	%ecx, %r13d
	movl	$-1, %eax
	addl	%edx, %r13d
	jb	LBB0_12
## %bb.1:
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	_INT_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	cmpl	%esi, %r13d
	ja	LBB0_12
## %bb.2:
	movq	%rdi, %r12
	movl	4(%rdi), %eax
	cmpl	%eax, %r13d
	jbe	LBB0_9
## %bb.3:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edx
	shrl	%edx
	testl	%ebx, %ebx
	leal	1(%rbx,%rdx), %ebx
	cmovel	%r13d, %ebx
	cmpl	%ebx, %r13d
	ja	LBB0_4
## %bb.5:
	cmpl	%eax, %ebx
	jbe	LBB0_9
## %bb.6:
	leaq	16(%r12), %rdi
	movl	%ebx, %esi
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:
	movl	%ebx, 4(%r12)
	movl	(%r12), %ecx
LBB0_9:
	movslq	%ecx, %rdi
	addq	16(%r12), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movl	%r13d, (%r12)
	cmpl	8(%r12), %r13d
	jbe	LBB0_11
## %bb.10:
	movl	%r13d, 8(%r12)
LBB0_11:
	movl	%r14d, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	$0, 4(%r12)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_dyn_buf_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dyn_buf_write
_dyn_buf_write:                         ; @dyn_buf_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0]
	adds	w23, w8, w2
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #0
	cinc	w9, w9, lt
	cmp	w23, w9, asr #1
	b.ls	LBB0_4
LBB0_2:
	mov	w19, #-1
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w9, [x0, #4]
	cmp	w23, w9
	b.ls	LBB0_10
; %bb.5:
	mov	x22, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w10, w22, w22, lsr #1
	cmp	w22, #0
	csinc	w22, w23, w10, eq
	cmp	w23, w22
	b.hi	LBB0_6
; %bb.7:
	cmp	w22, w9
	b.ls	LBB0_10
; %bb.8:
	add	x0, x20, #16
	mov	x1, x22
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_12
; %bb.9:
	str	w22, [x20, #4]
	ldr	w8, [x20]
LBB0_10:
	ldr	x9, [x20, #16]
	add	x0, x9, w8, sxtw
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	str	w23, [x20]
	ldr	w8, [x20, #8]
	cmp	w23, w8
	b.ls	LBB0_3
; %bb.11:
	str	w23, [x20, #8]
	b	LBB0_3
LBB0_12:
	stp	wzr, wzr, [x20, #4]
	mov	x19, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_dyn_buf_write
.subsections_via_symbols
