	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_bcache_alloc                ## -- Begin function pt_bcache_alloc
	.p2align	4, 0x90
_pt_bcache_alloc:                       ## @pt_bcache_alloc
	.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
	xorl	%r14d, %r14d
	testl	%edi, %edi
	je	LBB0_7
## %bb.1:
	movl	%edi, %ebx
	movq	_UINT32_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jl	LBB0_7
## %bb.2:
	leal	8(,%rbx,4), %eax
	movq	_SIZE_MAX@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jl	LBB0_6
## %bb.4:
	movslq	%eax, %r15
	movq	%r15, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %r14
	movslq	%ebx, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_memset
	movq	%rbx, (%r14)
	jmp	LBB0_7
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT32_MAX,4,2                 ## @UINT32_MAX
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_bcache_alloc                ; -- Begin function pt_bcache_alloc
	.p2align	2
_pt_bcache_alloc:                       ; @pt_bcache_alloc
	.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	x19, #0
	cbz	w0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _UINT32_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UINT32_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.lt	LBB0_6
; %bb.2:
	lsl	w8, w20, #2
	add	w8, w8, #8
Lloh3:
	adrp	x9, _SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ge	LBB0_4
; %bb.3:
	mov	x19, #0
	b	LBB0_6
LBB0_4:
	sxtw	x21, w8
	mov	x0, x21
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.5:
	sxtw	x20, w20
	mov	x0, x19
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	str	x20, [x19]
LBB0_6:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT32_MAX,4,2                 ; @UINT32_MAX
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
.subsections_via_symbols
