	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_and_init_mutex
_check_and_init_mutex:                  ## @check_and_init_mutex
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	%rax, (%rsi)
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.4:
	movq	_THR_MUTEX_DESTROYED@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setbe	%dil
	callq	___predict_false
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	je	LBB0_2
## %bb.6:
	xorl	%eax, %eax
	callq	__get_curthread
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_init_static
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	(%r15), %rax
	movq	%rax, (%r14)
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	___thr_pshared_offpage
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_shared_mutex_init
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_THR_PSHARED_PTR,8,3            ## @THR_PSHARED_PTR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_THR_MUTEX_DESTROYED,8,3        ## @THR_MUTEX_DESTROYED
	.no_dead_strip	_check_and_init_mutex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_and_init_mutex
_check_and_init_mutex:                  ; @check_and_init_mutex
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
	str	x8, [x1]
Lloh0:
	adrp	x9, _THR_PSHARED_PTR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.1:
Lloh3:
	adrp	x21, _THR_MUTEX_DESTROYED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _THR_MUTEX_DESTROYED@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, ls
	bl	___predict_false
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.3:
	bl	__get_curthread
	mov	x1, x20
	bl	_init_static
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [x20]
	str	x8, [x19]
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	mov	w1, #0
	bl	___thr_pshared_offpage
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.6:
	mov	x1, #0
	bl	_shared_mutex_init
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_8:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_THR_PSHARED_PTR,8,3            ; @THR_PSHARED_PTR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_THR_MUTEX_DESTROYED,8,3        ; @THR_MUTEX_DESTROYED
	.no_dead_strip	_check_and_init_mutex
.subsections_via_symbols
