	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mutex_lock_common
_mutex_lock_common:                     ## @mutex_lock_common
	.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
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r14
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.1:
	movq	_PMUTEX_FLAG_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_THR_CRITICAL_ENTER
LBB0_3:
	movl	%r15d, %ebx
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	__mutex_enter_robust
	movl	%eax, %r13d
LBB0_5:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	leaq	4(%r12), %r13
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_TID
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	__thr_umutex_trylock2
	movl	%eax, %r15d
	movq	_EOWNERDEAD@GOTPCREL(%rip), %r14
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	cmpl	(%r14), %r15d
	je	LBB0_7
## %bb.9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_mutex_lock_sleep
	movl	%eax, %r15d
	jmp	LBB0_10
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_enqueue_mutex
	movq	%r14, %rax
	cmpl	(%r14), %r15d
	jne	LBB0_10
## %bb.8:
	movq	_UMUTEX_NONCONSISTENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.11:
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	__mutex_leave_robust
LBB0_13:
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.14:
	cmpl	(%r14), %r15d
	je	LBB0_18
## %bb.15:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.16:
	movq	_PMUTEX_FLAG_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	je	LBB0_18
## %bb.17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_THR_CRITICAL_LEAVE
LBB0_18:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PMUTEX_FLAG_PRIVATE,4,2        ## @PMUTEX_FLAG_PRIVATE
	.comm	_EOWNERDEAD,4,2                 ## @EOWNERDEAD
	.comm	_UMUTEX_NONCONSISTENT,4,2       ## @UMUTEX_NONCONSISTENT
	.no_dead_strip	_mutex_lock_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mutex_lock_common
_mutex_lock_common:                     ; @mutex_lock_common
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x3
	mov	x21, x2
	mov	x25, x1
	mov	x20, x0
	bl	__get_curthread
	mov	x19, x0
	cbnz	w21, LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _PMUTEX_FLAG_PRIVATE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PMUTEX_FLAG_PRIVATE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_THR_CRITICAL_ENTER
LBB0_3:
	cbz	w22, LBB0_5
; %bb.4:
	mov	w24, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	bl	__mutex_enter_robust
	mov	x24, x0
LBB0_6:
	add	x26, x20, #4
	mov	x0, x19
	bl	_TID
	mov	x1, x0
	mov	x0, x26
	bl	__thr_umutex_trylock2
	mov	x23, x0
Lloh3:
	adrp	x27, _EOWNERDEAD@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EOWNERDEAD@GOTPAGEOFF]
	cbz	w0, LBB0_9
; %bb.7:
	ldr	w8, [x27]
	cmp	w23, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x25
	bl	_mutex_lock_sleep
	mov	x23, x0
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_enqueue_mutex
	ldr	w8, [x27]
	cmp	w23, w8
	b.ne	LBB0_11
; %bb.10:
Lloh5:
	adrp	x8, _UMUTEX_NONCONSISTENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UMUTEX_NONCONSISTENT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x26]
LBB0_11:
	cbnz	w22, LBB0_14
; %bb.12:
	cbz	w24, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	__mutex_leave_robust
LBB0_14:
	cbz	w23, LBB0_19
; %bb.15:
	ldr	w8, [x27]
	cmp	w23, w8
	b.eq	LBB0_19
; %bb.16:
	cbnz	w21, LBB0_19
; %bb.17:
	ldr	w8, [x20]
Lloh8:
	adrp	x9, _PMUTEX_FLAG_PRIVATE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PMUTEX_FLAG_PRIVATE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbz	w8, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_THR_CRITICAL_LEAVE
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PMUTEX_FLAG_PRIVATE,4,2        ; @PMUTEX_FLAG_PRIVATE
	.comm	_EOWNERDEAD,4,2                 ; @EOWNERDEAD
	.comm	_UMUTEX_NONCONSISTENT,4,2       ; @UMUTEX_NONCONSISTENT
	.no_dead_strip	_mutex_lock_common
.subsections_via_symbols
