	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exhaust_unnamed_sems
_exhaust_unnamed_sems:                  ## @exhaust_unnamed_sems
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	$4, -16(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-8(%rbp), %rsi
	leaq	-16(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_exhaust_unnamed_child@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	-8(%rbp), %rsi
	leaq	-4(%rbp), %rdx
	callq	_child_worker
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	movl	-4(%rbp), %edi
	callq	_CSTAT_ERROR
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	-4(%rbp), %edi
	callq	_CSTAT_CLASS
	cmpl	$2, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$1, %eax
	je	LBB0_7
## %bb.5:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	xorl	%eax, %eax
	callq	_pass
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_11
LBB0_8:
	movl	-8(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_11
LBB0_9:
	movl	-4(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
LBB0_10:
	callq	_fail_err
LBB0_11:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p1003_1b.sem_nsems_max"

L_.str.1:                               ## @.str.1
	.asciz	"sysctl(p1003_1b.sem_nsems_max)"

	.comm	_exhaust_unnamed_child,4,2      ## @exhaust_unnamed_child
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"ksem_init"

L_.str.3:                               ## @.str.3
	.asciz	"Limit of %d semaphores not enforced"

L_.str.4:                               ## @.str.4
	.asciz	"bad child state %#x"

	.no_dead_strip	_exhaust_unnamed_sems
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exhaust_unnamed_sems
_exhaust_unnamed_sems:                  ; @exhaust_unnamed_sems
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w8, #4
	str	x8, [sp, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #4
	add	x2, sp, #8
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	tbnz	x0, #63, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _exhaust_unnamed_child@GOTPAGE
Lloh3:
	ldr	x8, [x8, _exhaust_unnamed_child@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldrsw	x1, [sp, #4]
	mov	x2, sp
	bl	_child_worker
	cbnz	x0, LBB0_11
; %bb.2:
	ldr	w0, [sp]
	bl	_CSTAT_ERROR
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	str	w0, [x8]
	ldr	w0, [sp]
	bl	_CSTAT_CLASS
	cmp	w0, #2
	b.eq	LBB0_7
; %bb.3:
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.4:
	cbnz	w0, LBB0_9
; %bb.5:
	bl	_pass
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_errno
	b	LBB0_11
LBB0_7:
	ldr	w1, [sp, #4]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fail_errno
	b	LBB0_11
LBB0_9:
	ldr	w1, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_10:
	bl	_fail_err
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p1003_1b.sem_nsems_max"

l_.str.1:                               ; @.str.1
	.asciz	"sysctl(p1003_1b.sem_nsems_max)"

	.comm	_exhaust_unnamed_child,4,2      ; @exhaust_unnamed_child
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"ksem_init"

l_.str.3:                               ; @.str.3
	.asciz	"Limit of %d semaphores not enforced"

l_.str.4:                               ; @.str.4
	.asciz	"bad child state %#x"

	.no_dead_strip	_exhaust_unnamed_sems
.subsections_via_symbols
