	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_mutex_initialize         ## -- Begin function __lwp_mutex_initialize
	.p2align	4, 0x90
___lwp_mutex_initialize:                ## @__lwp_mutex_initialize
	.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, %rbx
	movl	(%rsi), %eax
	movl	%eax, 32(%rdi)
	movq	%rdx, 24(%rdi)
	movq	$0, 16(%rdi)
	movq	_LWP_MUTEX_LOCKED@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jne	LBB0_4
## %bb.1:
	movl	$1, (%rbx)
	movq	__thr_executing@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	___lwp_mutex_isinheritprio
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	___lwp_mutex_isprioceiling
	testq	%rax, %rax
	je	LBB0_5
LBB0_3:
	movq	(%r15), %rax
	incl	(%rax)
	jmp	LBB0_5
LBB0_4:
	movl	$0, (%rbx)
	movq	$0, 8(%rbx)
LBB0_5:
	addq	$4, %rbx
	movq	%r14, %rdi
	callq	___lwp_mutex_isfifo
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_LWP_THREADQ_MODEPRIORITY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_LWP_THREADQ_MODEFIFO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	_LWP_STATES_WAITING_FOR_MUTEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_LWP_MUTEX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___lwp_threadqueue_init         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_MUTEX_LOCKED,8,3           ## @LWP_MUTEX_LOCKED
	.comm	__thr_executing,8,3             ## @_thr_executing
	.comm	_LWP_THREADQ_MODEFIFO,4,2       ## @LWP_THREADQ_MODEFIFO
	.comm	_LWP_THREADQ_MODEPRIORITY,4,2   ## @LWP_THREADQ_MODEPRIORITY
	.comm	_LWP_STATES_WAITING_FOR_MUTEX,4,2 ## @LWP_STATES_WAITING_FOR_MUTEX
	.comm	_LWP_MUTEX_TIMEOUT,4,2          ## @LWP_MUTEX_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_mutex_initialize         ; -- Begin function __lwp_mutex_initialize
	.p2align	2
___lwp_mutex_initialize:                ; @__lwp_mutex_initialize
	.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	w8, [x1]
	str	w8, [x0, #32]
	stp	xzr, x2, [x0, #16]
Lloh0:
	adrp	x8, _LWP_MUTEX_LOCKED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_MUTEX_LOCKED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	b.ne	LBB0_4
; %bb.1:
	mov	w8, #1
	str	w8, [x20]
Lloh3:
	adrp	x21, __thr_executing@GOTPAGE
Lloh4:
	ldr	x21, [x21, __thr_executing@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x20, #8]
	mov	x0, x19
	bl	___lwp_mutex_isinheritprio
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	___lwp_mutex_isprioceiling
	cbz	x0, LBB0_5
LBB0_3:
	ldr	x8, [x21]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_5
LBB0_4:
	str	wzr, [x20]
	str	xzr, [x20, #8]
LBB0_5:
	add	x20, x20, #4
	mov	x0, x19
	bl	___lwp_mutex_isfifo
Lloh5:
	adrp	x8, _LWP_THREADQ_MODEFIFO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LWP_THREADQ_MODEFIFO@GOTPAGEOFF]
Lloh7:
	adrp	x9, _LWP_THREADQ_MODEPRIORITY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LWP_THREADQ_MODEPRIORITY@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _LWP_STATES_WAITING_FOR_MUTEX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LWP_STATES_WAITING_FOR_MUTEX@GOTPAGEOFF]
Lloh11:
	adrp	x9, _LWP_MUTEX_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LWP_MUTEX_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	ldr	w3, [x9]
	mov	x0, x20
	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
	b	___lwp_threadqueue_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_MUTEX_LOCKED,8,3           ; @LWP_MUTEX_LOCKED
	.comm	__thr_executing,8,3             ; @_thr_executing
	.comm	_LWP_THREADQ_MODEFIFO,4,2       ; @LWP_THREADQ_MODEFIFO
	.comm	_LWP_THREADQ_MODEPRIORITY,4,2   ; @LWP_THREADQ_MODEPRIORITY
	.comm	_LWP_STATES_WAITING_FOR_MUTEX,4,2 ; @LWP_STATES_WAITING_FOR_MUTEX
	.comm	_LWP_MUTEX_TIMEOUT,4,2          ; @LWP_MUTEX_TIMEOUT
.subsections_via_symbols
