	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resize_write_buffer
_resize_write_buffer:                   ## @resize_write_buffer
	.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
	movq	_new_file@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_cur_pos@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	movq	_cur_buffer_size@GOTPCREL(%rip), %r14
	cmpl	(%r14), %edi
	jle	LBB0_3
## %bb.2:
	decl	%edi
	movq	_WRITE_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	incl	%ebx
	imull	%ecx, %ebx
	movq	_write_buffer@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_realloc
	movl	%eax, (%r15)
	movl	%ebx, (%r14)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_new_file,4,2                   ## @new_file
	.comm	_cur_pos,8,3                    ## @cur_pos
	.comm	_cur_buffer_size,4,2            ## @cur_buffer_size
	.comm	_WRITE_BUFFER_SIZE,4,2          ## @WRITE_BUFFER_SIZE
	.comm	_write_buffer,4,2               ## @write_buffer
	.no_dead_strip	_resize_write_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resize_write_buffer
_resize_write_buffer:                   ; @resize_write_buffer
	.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
Lloh0:
	adrp	x8, _new_file@GOTPAGE
Lloh1:
	ldr	x8, [x8, _new_file@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _cur_pos@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cur_pos@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x20, _cur_buffer_size@GOTPAGE
Lloh7:
	ldr	x20, [x20, _cur_buffer_size@GOTPAGEOFF]
	ldr	w9, [x20]
	add	w8, w8, w0
	cmp	w8, w9
	b.le	LBB0_3
; %bb.2:
	sub	w8, w8, #1
Lloh8:
	adrp	x9, _WRITE_BUFFER_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WRITE_BUFFER_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	madd	w19, w9, w8, w9
Lloh11:
	adrp	x21, _write_buffer@GOTPAGE
Lloh12:
	ldr	x21, [x21, _write_buffer@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_realloc
	str	w0, [x21]
	str	w19, [x20]
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_new_file,4,2                   ; @new_file
	.comm	_cur_pos,8,3                    ; @cur_pos
	.comm	_cur_buffer_size,4,2            ; @cur_buffer_size
	.comm	_WRITE_BUFFER_SIZE,4,2          ; @WRITE_BUFFER_SIZE
	.comm	_write_buffer,4,2               ; @write_buffer
	.no_dead_strip	_resize_write_buffer
.subsections_via_symbols
