	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sem_init                      ## -- Begin function _sem_init
	.p2align	4, 0x90
__sem_init:                             ## @_sem_init
	.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	_SEM_VALUE_MAX@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_5
LBB0_2:
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$24, %esi
	callq	_bzero
	movq	_SEM_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movl	%ebx, %eax
	movq	%rax, 8(%r15)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_USYNC_PROCESS_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_4:
	movl	%r14d, (%r15)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEM_VALUE_MAX,4,2              ## @SEM_VALUE_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_SEM_MAGIC,4,2                  ## @SEM_MAGIC
	.comm	_USYNC_PROCESS_SHARED,4,2       ## @USYNC_PROCESS_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sem_init                      ; -- Begin function _sem_init
	.p2align	2
__sem_init:                             ; @_sem_init
	.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
Lloh0:
	adrp	x8, _SEM_VALUE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEM_VALUE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_3
LBB0_2:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w1, #24
	bl	_bzero
	mov	w0, #0
Lloh9:
	adrp	x8, _SEM_MAGIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEM_MAGIC@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	w8, w21
	str	x8, [x19, #8]
Lloh12:
	adrp	x8, _USYNC_PROCESS_SHARED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USYNC_PROCESS_SHARED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w8, wzr, w8, eq
	str	w8, [x19]
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SEM_VALUE_MAX,4,2              ; @SEM_VALUE_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_SEM_MAGIC,4,2                  ; @SEM_MAGIC
	.comm	_USYNC_PROCESS_SHARED,4,2       ; @USYNC_PROCESS_SHARED
.subsections_via_symbols
