	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tbm_prepare_shared_iterate     ## -- Begin function tbm_prepare_shared_iterate
	.p2align	4, 0x90
_tbm_prepare_shared_iterate:            ## @tbm_prepare_shared_iterate
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpq	$0, 32(%r14)
	setne	%dil
	callq	_Assert
	movq	(%r14), %rax
	movq	_TBM_ITERATING_PRIVATE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_Assert
	movq	32(%r14), %rdi
	movl	$72, %esi
	callq	_dsa_allocate0
	movq	%rax, %r15
	movq	32(%r14), %rdi
	movq	%rax, %rsi
	callq	_dsa_get_address
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	_TBM_NOT_ITERATING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_24
## %bb.1:
	movl	8(%r14), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	32(%r14), %rdi
	leal	16(,%rax,4), %esi
	callq	_dsa_allocate
	movq	%rax, 40(%r14)
	movq	32(%r14), %rdi
	movq	%rax, %rsi
	callq	_dsa_get_address
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %rdi
	xorl	%esi, %esi
	callq	_pg_atomic_init_u32
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_4:
	movl	12(%r14), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	32(%r14), %rdi
	leal	16(,%rax,4), %esi
	callq	_dsa_allocate
	movq	%rax, 24(%r14)
	movq	32(%r14), %rdi
	movq	%rax, %rsi
	callq	_dsa_get_address
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %rdi
	xorl	%esi, %esi
	callq	_pg_atomic_init_u32
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_7:
	movq	16(%r14), %rax
	movq	_TBM_HASH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.8:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	32(%r14), %rdi
	movq	48(%r14), %rsi
	callq	_dsa_get_address
	movq	%rax, %r15
	movl	68(%r14), %edi
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_pagetable_start_iterate
	movl	68(%r14), %edi
	movq	%rbx, %rsi
	callq	_pagetable_iterate
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	xorl	%r12d, %r12d
	leaq	-60(%rbp), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r13d, %eax
	leal	1(%r13), %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%esi, %r13d
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rdx), %rdx
	cltq
	movl	%ecx, (%rdx,%rax,4)
	movl	68(%r14), %edi
	movq	%rbx, %rsi
	callq	_pagetable_iterate
	testq	%rax, %rax
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rcx
	subq	8(%r15), %rcx
	shrq	$3, %rcx
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%r12d, %eax
	leal	1(%r12), %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%esi, %r12d
	jmp	LBB0_14
LBB0_17:
	movq	_TBM_ONE_PAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.18:
	movq	32(%r14), %rdi
	movl	$24, %esi
	callq	_dsa_allocate
	movq	%rax, 48(%r14)
	movq	32(%r14), %rdi
	movq	%rax, %rsi
	callq	_dsa_get_address
	movq	%rax, %r15
	movq	8(%rax), %rdi
	leaq	64(%r14), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	$0, (%rax)
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_9:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
LBB0_15:
	xorl	%edi, %edi
	cmpl	8(%r14), %r13d
	sete	%dil
	callq	_Assert
	xorl	%edi, %edi
	cmpl	12(%r14), %r12d
	sete	%dil
	callq	_Assert
	testq	%r15, %r15
	je	LBB0_31
## %bb.16:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pg_atomic_init_u32
	cmpl	$2, %r13d
	jl	LBB0_22
LBB0_21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_tbm_shared_comparator@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%r15), %r8
	movl	%r13d, %esi
	movl	$4, %edx
	callq	_qsort_arg
LBB0_22:
	cmpl	$2, %r12d
	jl	LBB0_24
## %bb.23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	_tbm_shared_comparator@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%r15), %r8
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_qsort_arg
LBB0_24:
	movl	60(%r14), %eax
	movl	%eax, 68(%rbx)
	movl	56(%r14), %eax
	movl	%eax, 64(%rbx)
	movl	8(%r14), %eax
	movl	%eax, (%rbx)
	movl	12(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	48(%r14), %rsi
	movups	40(%r14), %xmm0
	movups	%xmm0, 48(%rbx)
	movq	24(%r14), %rax
	movq	%rbx, %r13
	movq	%rax, 40(%rbx)
	movq	32(%r14), %rdi
	callq	_dsa_get_address
	movq	%rax, %r12
	movq	32(%r14), %rdi
	movq	40(%r14), %rsi
	callq	_dsa_get_address
	movq	%rax, %rbx
	movq	24(%r14), %rsi
	movq	32(%r14), %rdi
	callq	_dsa_get_address
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_26
## %bb.25:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_pg_atomic_add_fetch_u32
LBB0_26:
	testq	%rbx, %rbx
	je	LBB0_28
## %bb.27:
	addq	$8, %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pg_atomic_add_fetch_u32
LBB0_28:
	testq	%r15, %r15
	je	LBB0_30
## %bb.29:
	addq	$8, %r15
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pg_atomic_add_fetch_u32
LBB0_30:
	movq	%r13, %rdi
	addq	$32, %rdi
	movq	_LWTRANCHE_TBM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockInitialize
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r13)
	movq	$0, 24(%r13)
	movq	_TBM_ITERATING_SHARED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	xorl	%r15d, %r15d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$2, %r13d
	jge	LBB0_21
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_TBM_ITERATING_PRIVATE,8,3      ## @TBM_ITERATING_PRIVATE
	.comm	_TBM_NOT_ITERATING,8,3          ## @TBM_NOT_ITERATING
	.comm	_TBM_HASH,8,3                   ## @TBM_HASH
	.comm	_TBM_ONE_PAGE,8,3               ## @TBM_ONE_PAGE
	.comm	_tbm_shared_comparator,4,2      ## @tbm_shared_comparator
	.comm	_LWTRANCHE_TBM,4,2              ## @LWTRANCHE_TBM
	.comm	_TBM_ITERATING_SHARED,8,3       ## @TBM_ITERATING_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tbm_prepare_shared_iterate     ; -- Begin function tbm_prepare_shared_iterate
	.p2align	2
_tbm_prepare_shared_iterate:            ; @tbm_prepare_shared_iterate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #32]
	cmp	x8, #0
	cset	w0, ne
	bl	_Assert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TBM_ITERATING_PRIVATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TBM_ITERATING_PRIVATE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_Assert
	ldr	x0, [x19, #32]
	mov	w1, #72
	bl	_dsa_allocate0
	mov	x20, x0
	ldr	x0, [x19, #32]
	mov	x1, x20
	bl	_dsa_get_address
	mov	x21, x0
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _TBM_NOT_ITERATING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TBM_NOT_ITERATING@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	x0, [x19, #32]
	lsl	w8, w8, #2
	add	w1, w8, #16
	bl	_dsa_allocate
	mov	x1, x0
	str	x0, [x19, #40]
	ldr	x0, [x19, #32]
	bl	_dsa_get_address
	mov	x22, x0
	add	x0, x0, #8
	mov	w1, #0
	bl	_pg_atomic_init_u32
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_5
LBB0_3:
	ldr	x0, [x19, #32]
	lsl	w8, w8, #2
	add	w1, w8, #16
	bl	_dsa_allocate
	mov	x1, x0
	str	x0, [x19, #24]
	ldr	x0, [x19, #32]
	bl	_dsa_get_address
	mov	x23, x0
	add	x0, x0, #8
	mov	w1, #0
	bl	_pg_atomic_init_u32
	b	LBB0_6
LBB0_4:
	mov	x22, #0
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_3
LBB0_5:
	mov	x23, #0
LBB0_6:
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _TBM_HASH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TBM_HASH@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:
	ldr	x0, [x19, #32]
	ldr	x1, [x19, #48]
	bl	_dsa_get_address
	mov	x24, x0
	ldr	w0, [x19, #68]
	add	x1, sp, #12
	bl	_pagetable_start_iterate
	ldr	w0, [x19, #68]
	add	x1, sp, #12
	bl	_pagetable_iterate
	cbz	x0, LBB0_12
; %bb.8:
	mov	w25, #0
	mov	w26, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	sub	x8, x0, x8
	lsr	x8, x8, #3
	ldr	x9, [x0]
	cmp	x9, #0
	csel	x9, x22, x23, eq
	csel	w10, w26, w25, eq
	cinc	w26, w26, eq
	cinc	w25, w25, ne
	ldr	x9, [x9]
	str	w8, [x9, w10, sxtw #2]
	ldr	w0, [x19, #68]
	add	x1, sp, #12
	bl	_pagetable_iterate
	cbnz	x0, LBB0_9
	b	LBB0_13
LBB0_10:
Lloh9:
	adrp	x9, _TBM_ONE_PAGE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TBM_ONE_PAGE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.11:
	ldr	x0, [x19, #32]
	mov	w1, #24
	bl	_dsa_allocate
	mov	x1, x0
	str	x0, [x19, #48]
	ldr	x0, [x19, #32]
	bl	_dsa_get_address
	mov	x24, x0
	ldr	x0, [x0, #8]
	add	x1, x19, #64
	mov	w2, #8
	bl	_memcpy
	mov	w25, #0
	mov	w26, #0
	ldr	x8, [x22]
	str	wzr, [x8]
	b	LBB0_14
LBB0_12:
	mov	w26, #0
	mov	w25, #0
LBB0_13:
	ldr	w8, [x19, #8]
	cmp	w26, w8
	cset	w0, eq
	bl	_Assert
	ldr	w8, [x19, #12]
	cmp	w25, w8
	cset	w0, eq
	bl	_Assert
	cbz	x24, LBB0_15
LBB0_14:
	mov	x0, x24
	mov	w1, #0
	bl	_pg_atomic_init_u32
LBB0_15:
Lloh12:
	adrp	x27, _tbm_shared_comparator@GOTPAGE
Lloh13:
	ldr	x27, [x27, _tbm_shared_comparator@GOTPAGEOFF]
	cmp	w26, #2
	b.lt	LBB0_17
; %bb.16:
	ldr	x0, [x22]
	ldr	w3, [x27]
	ldr	x4, [x24, #8]
	mov	x1, x26
	mov	w2, #4
	bl	_qsort_arg
LBB0_17:
	cmp	w25, #2
	b.lt	LBB0_19
; %bb.18:
	ldr	x0, [x23]
	ldr	w3, [x27]
	ldr	x4, [x24, #8]
	mov	x1, x25
	mov	w2, #4
	bl	_qsort_arg
LBB0_19:
	ldr	d0, [x19, #56]
	str	d0, [x21, #64]
	ldr	d0, [x19, #8]
	str	d0, [x21]
	ldp	x8, x1, [x19, #40]
	str	x1, [x21, #56]
	ldp	x9, x0, [x19, #24]
	stp	x9, x8, [x21, #40]
	bl	_dsa_get_address
	mov	x24, x0
	ldp	x0, x1, [x19, #32]
	bl	_dsa_get_address
	mov	x23, x0
	ldp	x1, x0, [x19, #24]
	bl	_dsa_get_address
	mov	x22, x0
	cbz	x24, LBB0_21
; %bb.20:
	mov	x0, x24
	mov	w1, #1
	bl	_pg_atomic_add_fetch_u32
LBB0_21:
	cbz	x23, LBB0_23
; %bb.22:
	add	x0, x23, #8
	mov	w1, #1
	bl	_pg_atomic_add_fetch_u32
LBB0_23:
	cbz	x22, LBB0_25
; %bb.24:
	add	x0, x22, #8
	mov	w1, #1
	bl	_pg_atomic_add_fetch_u32
LBB0_25:
	add	x0, x21, #32
Lloh14:
	adrp	x8, _LWTRANCHE_TBM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LWTRANCHE_TBM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_LWLockInitialize
	stp	xzr, xzr, [x21, #16]
	str	xzr, [x21, #8]
Lloh17:
	adrp	x8, _TBM_ITERATING_SHARED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TBM_ITERATING_SHARED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TBM_ITERATING_PRIVATE,8,3      ; @TBM_ITERATING_PRIVATE
	.comm	_TBM_NOT_ITERATING,8,3          ; @TBM_NOT_ITERATING
	.comm	_TBM_HASH,8,3                   ; @TBM_HASH
	.comm	_TBM_ONE_PAGE,8,3               ; @TBM_ONE_PAGE
	.comm	_tbm_shared_comparator,4,2      ; @tbm_shared_comparator
	.comm	_LWTRANCHE_TBM,4,2              ; @LWTRANCHE_TBM
	.comm	_TBM_ITERATING_SHARED,8,3       ; @TBM_ITERATING_SHARED
.subsections_via_symbols
