	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_SemInit                    ## -- Begin function LWP_SemInit
	.p2align	4, 0x90
_LWP_SemInit:                           ## @LWP_SemInit
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	___lwp_sema_allocate
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r12
	movl	%r13d, -44(%rbp)
	movq	_LWP_SEMA_MODEFIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	%r12, %rdi
	addq	$4, %rdi
	leaq	-48(%rbp), %rsi
	movl	%r14d, %edx
	callq	___lwp_sema_initialize
	movq	_LWP_OBJTYPE_SEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_OBJMASKTYPE
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_LWP_OBJMASKID
	orl	%ebx, %eax
	cltq
	movq	%rax, (%r15)
	xorl	%eax, %eax
	callq	___lwp_thread_dispatchenable
	xorl	%ebx, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LWP_SEMA_MODEFIFO,4,2          ## @LWP_SEMA_MODEFIFO
	.comm	_LWP_OBJTYPE_SEM,4,2            ## @LWP_OBJTYPE_SEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_SemInit                    ; -- Begin function LWP_SemInit
	.p2align	2
_LWP_SemInit:                           ; @LWP_SemInit
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	___lwp_sema_allocate
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x8, _LWP_SEMA_MODEFIFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LWP_SEMA_MODEFIFO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w22, [sp, #8]
	add	x0, x0, #4
	add	x1, sp, #8
	mov	x2, x21
	bl	___lwp_sema_initialize
Lloh3:
	adrp	x8, _LWP_OBJTYPE_SEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LWP_OBJTYPE_SEM@GOTPAGEOFF]
Lloh5:
	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_dispatchenable
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LWP_SEMA_MODEFIFO,4,2          ; @LWP_SEMA_MODEFIFO
	.comm	_LWP_OBJTYPE_SEM,4,2            ; @LWP_OBJTYPE_SEM
.subsections_via_symbols
