	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___thr_pshared_offpage          ## -- Begin function __thr_pshared_offpage
	.p2align	4, 0x90
___thr_pshared_offpage:                 ## @__thr_pshared_offpage
	.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
	movl	%esi, %r12d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pshared_rlock
	movq	%r14, %rdi
	callq	_pshared_lookup
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_pshared_unlock
	testq	%rbx, %rbx
	je	LBB0_1
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_UMTX_OP_SHM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%r12d, %r12d
	jne	LBB0_2
## %bb.3:
	movq	_UMTX_SHM_LOOKUP@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_UMTX_SHM_CREAT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	__umtx_op
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r12d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	%r12d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %r13
	movq	%rax, -48(%rbp)
	movl	%r12d, %edi
	callq	_close
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_pshared_wlock
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_pshared_insert
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_pshared_unlock
	movq	-48(%rbp), %rbx
	testl	%r12d, %r12d
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pshared_clean
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_UMTX_OP_SHM,4,2                ## @UMTX_OP_SHM
	.comm	_UMTX_SHM_CREAT,4,2             ## @UMTX_SHM_CREAT
	.comm	_UMTX_SHM_LOOKUP,4,2            ## @UMTX_SHM_LOOKUP
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___thr_pshared_offpage          ; -- Begin function __thr_pshared_offpage
	.p2align	2
___thr_pshared_offpage:                 ; @__thr_pshared_offpage
	.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	x21, x1
	mov	x19, x0
	bl	__get_curthread
	mov	x20, x0
	bl	_pshared_rlock
	mov	x0, x19
	bl	_pshared_lookup
	mov	x22, x0
	mov	x0, x20
	bl	_pshared_unlock
	cbnz	x22, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _UMTX_OP_SHM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UMTX_OP_SHM@GOTPAGEOFF]
Lloh2:
	adrp	x9, _UMTX_SHM_CREAT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UMTX_SHM_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _UMTX_SHM_LOOKUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UMTX_SHM_LOOKUP@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, #0
	mov	x3, x19
	mov	x4, #0
	bl	__umtx_op
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:
	mov	x21, x0
Lloh7:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh12:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh16:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x4, x21
	mov	w5, #0
	bl	_mmap
	mov	x22, x0
	str	x0, [sp, #8]
	mov	x0, x21
	bl	_close
Lloh19:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	cmp	x22, x8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_pshared_wlock
	add	x1, sp, #8
	mov	x0, x19
	bl	_pshared_insert
	mov	x21, x0
	mov	x0, x20
	bl	_pshared_unlock
	ldr	x22, [sp, #8]
	cbnz	w21, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x22
	bl	_pshared_clean
LBB0_5:
	mov	x22, #0
LBB0_6:
	mov	x0, x22
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_UMTX_OP_SHM,4,2                ; @UMTX_OP_SHM
	.comm	_UMTX_SHM_CREAT,4,2             ; @UMTX_SHM_CREAT
	.comm	_UMTX_SHM_LOOKUP,4,2            ; @UMTX_SHM_LOOKUP
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
.subsections_via_symbols
