	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DynBuf_Write                   ## -- Begin function DynBuf_Write
	.p2align	4, 0x90
_DynBuf_Write:                          ## @DynBuf_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	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	subq	%rax, %rcx
	cmpq	%rdx, %rcx
	jae	LBB0_6
## %bb.1:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	addq	%r14, %rax
	movq	%rax, %r15
	shrq	$2, %r15
	addq	%rax, %r15
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_ISzAlloc_Alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	%r15, (%rbx)
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	movq	16(%rbx), %rsi
	movq	%r13, %rdi
	callq	_memcpy
LBB0_5:
	movq	16(%rbx), %rsi
	movl	%r12d, %edi
	callq	_ISzAlloc_Free
	movq	%r13, 16(%rbx)
	movq	8(%rbx), %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_6:
	testq	%r14, %r14
	je	LBB0_9
## %bb.7:
	movq	16(%rbx), %r13
LBB0_8:
	leaq	(,%rax,4), %rdi
	addq	%r13, %rdi
	movq	%r14, %rdx
	callq	_memcpy
	addq	%r14, 8(%rbx)
LBB0_9:
	movl	$1, %eax
	jmp	LBB0_10
LBB0_2:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DynBuf_Write                   ; -- Begin function DynBuf_Write
	.p2align	2
_DynBuf_Write:                          ; @DynBuf_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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldp	x9, x8, [x0]
	sub	x9, x9, x8
	cmp	x9, x2
	b.hs	LBB0_5
; %bb.1:
	mov	x22, x3
	add	x8, x8, x19
	add	x24, x8, x8, lsr #2
	mov	x0, x3
	mov	x1, x24
	bl	_ISzAlloc_Alloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x23, x0
	str	x24, [x20]
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_4
; %bb.3:
	ldr	x1, [x20, #16]
	mov	x0, x23
	bl	_memcpy
LBB0_4:
	ldr	x1, [x20, #16]
	mov	x0, x22
	bl	_ISzAlloc_Free
	str	x23, [x20, #16]
	ldr	x8, [x20, #8]
	b	LBB0_7
LBB0_5:
	cbz	x19, LBB0_8
; %bb.6:
	ldr	x23, [x20, #16]
LBB0_7:
	add	x0, x23, x8, lsl #2
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x20, #8]
	add	x8, x8, x19
	str	x8, [x20, #8]
LBB0_8:
	mov	w0, #1
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
