	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function strbuf_write
_strbuf_write:                          ## @strbuf_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movl	%edi, %r15d
	cmpl	$-1, %edx
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	_lstrlenW
	movl	%eax, %r14d
LBB0_2:
	movl	(%rbx), %ecx
	leal	(%rcx,%r14), %eax
	incl	%eax
	cmpl	4(%rbx), %eax
	jge	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	jmp	LBB0_5
LBB0_4:
	addl	%r14d, %ecx
	addl	%ecx, %ecx
	movl	%ecx, 4(%rbx)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	8(%rbx), %rdx
	movl	4(%rbx), %ecx
	shll	$2, %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	movq	%rax, 8(%rbx)
	movl	(%rbx), %ecx
LBB0_5:
	movslq	%ecx, %rdi
	addq	%rax, %rdi
	leal	(,%r14,4), %edx
	movl	%r15d, %esi
	callq	_memcpy
	movslq	(%rbx), %rax
	movslq	%r14d, %rcx
	addq	%rax, %rcx
	movl	%ecx, (%rbx)
	movq	8(%rbx), %rax
	movb	$0, (%rax,%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_strbuf_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function strbuf_write
_strbuf_write:                          ; @strbuf_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmn	w2, #1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_lstrlenW
	mov	x20, x0
LBB0_2:
	ldp	w8, w10, [x19]
	add	w9, w8, w20
	add	w11, w9, #1
	cmp	w11, w10
	b.ge	LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
	b	LBB0_5
LBB0_4:
	lsl	w8, w9, #1
	str	w8, [x19, #4]
	bl	_GetProcessHeap
	ldr	x2, [x19, #8]
	ldr	w8, [x19, #4]
	lsl	w3, w8, #2
	mov	w1, #0
	bl	_HeapReAlloc
	str	x0, [x19, #8]
	ldr	w8, [x19]
LBB0_5:
	lsl	w2, w20, #2
	add	x0, x0, w8, sxtw
	mov	x1, x21
	bl	_memcpy
	ldrsw	x8, [x19]
	add	x8, x8, w20, sxtw
	str	w8, [x19]
	ldr	x9, [x19, #8]
	strb	wzr, [x9, x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_strbuf_write
.subsections_via_symbols
