	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exhaust_named_sems
_exhaust_named_sems:                    ## @exhaust_named_sems
	.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	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	$4, -128(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-116(%rbp), %rsi
	leaq	-128(%rbp), %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_exhaust_named_child@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	-116(%rbp), %rsi
	leaq	-120(%rbp), %rdx
	callq	_child_worker
	testq	%rax, %rax
	js	LBB0_14
## %bb.3:
	movl	-120(%rbp), %edi
	callq	_CSTAT_ERROR
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	-120(%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_14
LBB0_8:
	movl	-116(%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	-120(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
LBB0_10:
	callq	_fail_err
LBB0_11:
	cmpl	$0, -116(%rbp)
	js	LBB0_14
## %bb.12:
	movl	$-1, %ebx
	movq	_TEST_PATH@GOTPCREL(%rip), %r12
	leaq	L_.str.5(%rip), %r14
	leaq	-112(%rbp), %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	(%r12), %rcx
	movq	%r15, %rdi
	movl	$64, %esi
	movq	%r14, %rdx
	movl	%ebx, %r8d
	callq	_snprintf
	movq	%r15, %rdi
	callq	_ksem_unlink
	cmpl	-116(%rbp), %ebx
	jl	LBB0_13
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.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_named_child,4,2        ## @exhaust_named_child
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"ksem_open"

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

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

L_.str.5:                               ## @.str.5
	.asciz	"%s%d"

	.comm	_TEST_PATH,8,3                  ## @TEST_PATH
	.no_dead_strip	_exhaust_named_sems
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exhaust_named_sems
_exhaust_named_sems:                    ; @exhaust_named_sems
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w8, #4
	str	x8, [sp, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #12
	add	x2, sp, #16
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	tbnz	x0, #63, LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, _exhaust_named_child@GOTPAGE
Lloh6:
	ldr	x8, [x8, _exhaust_named_child@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldrsw	x1, [sp, #12]
	add	x2, sp, #8
	bl	_child_worker
	tbnz	x0, #63, LBB0_14
; %bb.2:
	ldr	w0, [sp, #8]
	bl	_CSTAT_ERROR
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	str	w0, [x8]
	ldr	w0, [sp, #8]
	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:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_errno
	b	LBB0_14
LBB0_7:
	ldr	w1, [sp, #12]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fail_errno
	b	LBB0_11
LBB0_9:
	ldr	w1, [sp, #8]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_10:
	bl	_fail_err
LBB0_11:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_14
; %bb.12:
	mov	w19, #-1
Lloh19:
	adrp	x21, _TEST_PATH@GOTPAGE
Lloh20:
	ldr	x21, [x21, _TEST_PATH@GOTPAGEOFF]
Lloh21:
	adrp	x20, l_.str.5@PAGE
Lloh22:
	add	x20, x20, l_.str.5@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	ldr	x3, [x21]
	add	x0, sp, #24
	mov	w1, #64
	mov	x2, x20
	mov	x4, x19
	bl	_snprintf
	add	x0, sp, #24
	bl	_ksem_unlink
	ldr	w8, [sp, #12]
	cmp	w19, w8
	b.lt	LBB0_13
LBB0_14:
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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_named_child,4,2        ; @exhaust_named_child
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"ksem_open"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"%s%d"

	.comm	_TEST_PATH,8,3                  ; @TEST_PATH
	.no_dead_strip	_exhaust_named_sems
.subsections_via_symbols
