	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__Tthr_mutex_consistent         ## -- Begin function _Tthr_mutex_consistent
	.p2align	4, 0x90
__Tthr_mutex_consistent:                ## @_Tthr_mutex_consistent
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_2
## %bb.1:
	movq	_THR_MUTEX_DESTROYED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	ja	LBB0_4
	jmp	LBB0_7
LBB0_2:
	xorl	%esi, %esi
	callq	___thr_pshared_offpage
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_shared_mutex_init
LBB0_4:
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r14
	movl	(%rbx), %eax
	movq	_UMUTEX_ROBUST@GOTPCREL(%rip), %rcx
	movq	_UMUTEX_NONCONSISTENT@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%rcx), %edx
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_PMUTEX_OWNER_ID
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_TID
	cmpq	%rax, %r15
	jne	LBB0_10
## %bb.6:
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.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
	.comm	_UMUTEX_ROBUST,4,2              ## @UMUTEX_ROBUST
	.comm	_UMUTEX_NONCONSISTENT,4,2       ## @UMUTEX_NONCONSISTENT
	.comm	_EPERM,4,2                      ## @EPERM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__Tthr_mutex_consistent         ; -- Begin function _Tthr_mutex_consistent
	.p2align	2
__Tthr_mutex_consistent:                ; @_Tthr_mutex_consistent
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x8, _THR_PSHARED_PTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x19, x8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _THR_MUTEX_DESTROYED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _THR_MUTEX_DESTROYED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x19, x8
	b.hi	LBB0_4
	b	LBB0_7
LBB0_2:
	mov	w1, #0
	bl	___thr_pshared_offpage
	cbz	x0, LBB0_7
; %bb.3:
	mov	x19, x0
	mov	x1, #0
	bl	_shared_mutex_init
LBB0_4:
	bl	__get_curthread
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _UMUTEX_ROBUST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _UMUTEX_ROBUST@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x22, _UMUTEX_NONCONSISTENT@GOTPAGE
Lloh10:
	ldr	x22, [x22, _UMUTEX_NONCONSISTENT@GOTPAGEOFF]
	ldr	w10, [x22]
	orr	w9, w10, w9
	bics	wzr, w9, w8
	b.ne	LBB0_7
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_PMUTEX_OWNER_ID
	mov	x21, x0
	mov	x0, x20
	bl	_TID
	cmp	x21, x0
	b.ne	LBB0_10
; %bb.6:
	mov	w0, #0
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	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
LBB0_10:
Lloh13:
	adrp	x8, _EPERM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.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
	.comm	_UMUTEX_ROBUST,4,2              ; @UMUTEX_ROBUST
	.comm	_UMUTEX_NONCONSISTENT,4,2       ; @UMUTEX_NONCONSISTENT
	.comm	_EPERM,4,2                      ; @EPERM
.subsections_via_symbols
