	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function destroy_named_semaphore
_destroy_named_semaphore:               ## @destroy_named_semaphore
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_TEST_PATH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rdi
	movl	$511, %ecx                      ## imm = 0x1FF
	movl	$1, %r8d
	callq	_ksem_open
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-12(%rbp), %edi
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ksem_destroy_should_fail
	movl	-12(%rbp), %edi
	callq	_ksem_close
	movl	(%rbx), %edi
	callq	_ksem_unlink
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_fail_errno
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEST_PATH,4,2                  ## @TEST_PATH
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksem_open(O_CREAT)"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_destroy_named_semaphore
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function destroy_named_semaphore
_destroy_named_semaphore:               ; @destroy_named_semaphore
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x19, _TEST_PATH@GOTPAGE
Lloh1:
	ldr	x19, [x19, _TEST_PATH@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh2:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x0, sp, #12
	mov	w3, #511
	mov	w4, #1
	bl	_ksem_open
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	w0, [sp, #12]
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ksem_destroy_should_fail
	ldr	w0, [sp, #12]
	bl	_ksem_close
	ldr	w0, [x19]
	bl	_ksem_unlink
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_errno
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TEST_PATH,4,2                  ; @TEST_PATH
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksem_open(O_CREAT)"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_destroy_named_semaphore
.subsections_via_symbols
