	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tbm_get_pageentry
_tbm_get_pageentry:                     ## @tbm_get_pageentry
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	_TBM_EMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	24(%r15), %rbx
	movl	$0, -36(%rbp)
	movq	_TBM_ONE_PAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_7
LBB0_2:
	movq	_TBM_ONE_PAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	cmpq	%r14, 24(%r15)
	jne	LBB0_5
## %bb.4:
	addq	$24, %r15
	movq	%r15, %rbx
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_tbm_create_pagetable
LBB0_6:
	movl	16(%r15), %edi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rsi
	callq	_pagetable_insert
	movq	%rax, %rbx
	cmpl	$0, -36(%rbp)
	jne	LBB0_8
LBB0_7:
	movb	8(%rbx), %r12b
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_MemSet
	movb	%r12b, 8(%rbx)
	movq	%r14, (%rbx)
	incl	12(%r15)
	incl	8(%r15)
LBB0_8:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TBM_EMPTY,8,3                  ## @TBM_EMPTY
	.comm	_TBM_ONE_PAGE,8,3               ## @TBM_ONE_PAGE
	.no_dead_strip	_tbm_get_pageentry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tbm_get_pageentry
_tbm_get_pageentry:                     ; @tbm_get_pageentry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _TBM_EMPTY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TBM_EMPTY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _TBM_ONE_PAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TBM_ONE_PAGE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	x21, x19
	str	x8, [x21], #24
	str	wzr, [sp, #12]
	b	LBB0_6
LBB0_2:
Lloh6:
	adrp	x9, _TBM_ONE_PAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TBM_ONE_PAGE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	mov	x21, x19
	ldr	x8, [x21, #24]!
	cmp	x8, x20
	b.eq	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_tbm_create_pagetable
LBB0_5:
	ldr	w0, [x19, #16]
	add	x2, sp, #12
	mov	x1, x20
	bl	_pagetable_insert
	mov	x21, x0
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_7
LBB0_6:
	ldrb	w22, [x21, #8]
	mov	x0, x21
	mov	w1, #0
	mov	w2, #16
	bl	_MemSet
	strb	w22, [x21, #8]
	str	x20, [x21]
	ldr	d0, [x19, #8]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	str	d0, [x19, #8]
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TBM_EMPTY,8,3                  ; @TBM_EMPTY
	.comm	_TBM_ONE_PAGE,8,3               ; @TBM_ONE_PAGE
	.no_dead_strip	_tbm_get_pageentry
.subsections_via_symbols
