	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfr_buf_grow                   ## -- Begin function pfr_buf_grow
	.p2align	4, 0x90
_pfr_buf_grow:                          ## @pfr_buf_grow
	.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
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	_PFRB_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_11
## %bb.3:
	xorl	%r14d, %r14d
	movl	8(%rbx), %r15d
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:
	cmpl	%esi, %r15d
	jge	LBB0_14
LBB0_5:
	movq	_buf_esize@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r12
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.6:
	addl	%r15d, %r15d
	testl	%esi, %esi
	cmovnel	%esi, %r15d
	testl	%r15d, %r15d
	js	LBB0_18
## %bb.7:
	movl	%r15d, %ecx
	movq	_SIZE_T_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %rdx
	orq	%r12, %rdx
	shrq	$32, %rdx
	je	LBB0_17
## %bb.8:
	xorl	%edx, %edx
	divq	%r12
	cmpq	%rcx, %rax
	jbe	LBB0_18
LBB0_9:
	movq	16(%rbx), %rdi
	movl	%r15d, %esi
	imull	%r12d, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rax, %r13
	movslq	8(%rbx), %rax
	movq	%r12, %rcx
	imulq	%rax, %rcx
	leaq	(,%rcx,4), %rdi
	addq	%r13, %rdi
	movl	%r15d, %esi
	subl	%eax, %esi
	imull	%r12d, %esi
	callq	_bzero
	movq	%r13, 16(%rbx)
	jmp	LBB0_16
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_13:
	movl	$-1, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	cmpl	$65, %esi
	movl	$64, %r15d
	cmovgel	%esi, %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_calloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_13
LBB0_16:
	movl	%r15d, 8(%rbx)
	jmp	LBB0_14
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rcx, %rax
	ja	LBB0_9
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_PFRB_MAX,8,3                   ## @PFRB_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_buf_esize,8,3                  ## @buf_esize
	.comm	_SIZE_T_MAX,8,3                 ## @SIZE_T_MAX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfr_buf_grow                   ; -- Begin function pfr_buf_grow
	.p2align	2
_pfr_buf_grow:                          ; @pfr_buf_grow
	.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
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PFRB_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PFRB_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #2, ne
	b.lo	LBB0_6
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _errno@GOTPAGE
Lloh6:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
LBB0_4:
	mov	w0, #-1
LBB0_5:
	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
LBB0_6:
	ldr	w9, [x19, #8]
	cbz	w1, LBB0_9
; %bb.7:
	cmp	w9, w1
	b.lt	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_5
LBB0_9:
Lloh8:
	adrp	x10, _buf_esize@GOTPAGE
Lloh9:
	ldr	x10, [x10, _buf_esize@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	ldr	x21, [x10, x8, lsl #3]
	cbz	w9, LBB0_15
; %bb.10:
	lsl	w8, w9, #1
	cmp	w1, #0
	csel	w20, w8, w1, eq
	tbnz	w20, #31, LBB0_14
; %bb.11:
Lloh11:
	adrp	x8, _SIZE_T_MAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SIZE_T_MAX@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	udiv	x8, x8, x21
	cmp	x8, w20, uxtw
	b.ls	LBB0_14
; %bb.12:
	ldr	x0, [x19, #16]
	mul	w1, w20, w21
	bl	_realloc
	cbz	x0, LBB0_4
; %bb.13:
	mov	x22, x0
	ldrsw	x8, [x19, #8]
	mul	x9, x21, x8
	add	x0, x0, x9, lsl #2
	sub	w8, w20, w8
	mul	w1, w8, w21
	bl	_bzero
	str	x22, [x19, #16]
	b	LBB0_16
LBB0_14:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_15:
	mov	w8, #64
	cmp	w1, #64
	csel	w20, w1, w8, gt
	mov	x0, x21
	mov	x1, x20
	bl	_calloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
LBB0_16:
	mov	w0, #0
	str	w20, [x19, #8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PFRB_MAX,8,3                   ; @PFRB_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_buf_esize,8,3                  ; @buf_esize
	.comm	_SIZE_T_MAX,8,3                 ; @SIZE_T_MAX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
