	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_MutexInit                  ## -- Begin function LWP_MutexInit
	.p2align	4, 0x90
_LWP_MutexInit:                         ## @LWP_MutexInit
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movl	%esi, %r12d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	___lwp_mutex_allocate
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movq	_LWP_MUTEX_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	testl	%r12d, %r12d
	jne	LBB0_3
## %bb.4:
	movq	_LWP_MUTEX_NEST_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_LWP_MUTEX_NEST_ACQUIRE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$1, -48(%rbp)
	movq	%r15, %rdi
	addq	$4, %rdi
	movq	_LWP_MUTEX_UNLOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	callq	___lwp_mutex_initialize
	movq	_LWP_OBJTYPE_MUTEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_OBJMASKTYPE
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_LWP_OBJMASKID
	orl	%ebx, %eax
	cltq
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	___lwp_thread_dispatchunnest
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_MUTEX_FIFO,4,2             ## @LWP_MUTEX_FIFO
	.comm	_LWP_MUTEX_NEST_ACQUIRE,4,2     ## @LWP_MUTEX_NEST_ACQUIRE
	.comm	_LWP_MUTEX_NEST_ERROR,4,2       ## @LWP_MUTEX_NEST_ERROR
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_LWP_MUTEX_UNLOCKED,4,2         ## @LWP_MUTEX_UNLOCKED
	.comm	_LWP_OBJTYPE_MUTEX,4,2          ## @LWP_OBJTYPE_MUTEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_MutexInit                  ; -- Begin function LWP_MutexInit
	.p2align	2
_LWP_MutexInit:                         ; @LWP_MutexInit
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	bl	___lwp_mutex_allocate
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x8, _LWP_MUTEX_FIFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_MUTEX_FIFO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _LWP_MUTEX_NEST_ACQUIRE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LWP_MUTEX_NEST_ACQUIRE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _LWP_MUTEX_NEST_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LWP_MUTEX_NEST_ERROR@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh7:
	adrp	x8, _TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [sp]
	add	x0, x0, #4
Lloh10:
	adrp	x8, _LWP_MUTEX_UNLOCKED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LWP_MUTEX_UNLOCKED@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, sp
	bl	___lwp_mutex_initialize
Lloh13:
	adrp	x8, _LWP_OBJTYPE_MUTEX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LWP_OBJTYPE_MUTEX@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_LWP_OBJMASKTYPE
	mov	x21, x0
	ldr	w0, [x20]
	bl	_LWP_OBJMASKID
	orr	w8, w0, w21
	sxtw	x8, w8
	str	x8, [x19]
	bl	___lwp_thread_dispatchunnest
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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 AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_MUTEX_FIFO,4,2             ; @LWP_MUTEX_FIFO
	.comm	_LWP_MUTEX_NEST_ACQUIRE,4,2     ; @LWP_MUTEX_NEST_ACQUIRE
	.comm	_LWP_MUTEX_NEST_ERROR,4,2       ; @LWP_MUTEX_NEST_ERROR
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_LWP_MUTEX_UNLOCKED,4,2         ; @LWP_MUTEX_UNLOCKED
	.comm	_LWP_OBJTYPE_MUTEX,4,2          ; @LWP_OBJTYPE_MUTEX
.subsections_via_symbols
