	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function use_after_unlink_test
_use_after_unlink_test:                 ## @use_after_unlink_test
	.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
	movq	_O_EXCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-12(%rbp), %rdi
	movl	$511, %ecx                      ## imm = 0x1FF
	movl	$1, %r8d
	callq	_ksem_open
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	movl	(%rbx), %edi
	callq	_ksem_unlink
	testq	%rax, %rax
	js	LBB0_10
## %bb.2:
	movl	-12(%rbp), %edi
	movl	$1, %esi
	callq	_checkvalue
	movl	-12(%rbp), %edi
	testq	%rax, %rax
	js	LBB0_16
## %bb.3:
	callq	_ksem_post
	testq	%rax, %rax
	js	LBB0_12
## %bb.4:
	movl	-12(%rbp), %edi
	movl	$2, %esi
	callq	_checkvalue
	movl	-12(%rbp), %edi
	testq	%rax, %rax
	js	LBB0_16
## %bb.5:
	callq	_ksem_wait
	testq	%rax, %rax
	js	LBB0_14
## %bb.6:
	movl	-12(%rbp), %edi
	movl	$1, %esi
	callq	_checkvalue
	movq	%rax, %rbx
	movl	-12(%rbp), %edi
	callq	_ksem_close
	testq	%rbx, %rbx
	js	LBB0_17
## %bb.7:
	testq	%rax, %rax
	js	LBB0_18
## %bb.8:
	xorl	%eax, %eax
	callq	_pass
	jmp	LBB0_17
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_17
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	callq	_fail_errno
	movl	-12(%rbp), %edi
LBB0_16:
	callq	_ksem_close
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.4(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_TEST_PATH,4,2                  ## @TEST_PATH
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksem_open(O_CREAT | O_EXCL)"

L_.str.1:                               ## @.str.1
	.asciz	"ksem_unlink"

L_.str.2:                               ## @.str.2
	.asciz	"ksem_post"

L_.str.3:                               ## @.str.3
	.asciz	"ksem_wait"

L_.str.4:                               ## @.str.4
	.asciz	"ksem_close"

	.no_dead_strip	_use_after_unlink_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function use_after_unlink_test
_use_after_unlink_test:                 ; @use_after_unlink_test
	.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]
Lloh2:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x0, sp, #12
	mov	w3, #511
	mov	w4, #1
	bl	_ksem_open
	tbnz	x0, #63, LBB0_9
; %bb.1:
	ldr	w0, [x19]
	bl	_ksem_unlink
	tbnz	x0, #63, LBB0_10
; %bb.2:
	ldr	w0, [sp, #12]
	mov	w1, #1
	bl	_checkvalue
	mov	x8, x0
	ldr	w0, [sp, #12]
	tbnz	x8, #63, LBB0_14
; %bb.3:
	bl	_ksem_post
	tbnz	x0, #63, LBB0_11
; %bb.4:
	ldr	w0, [sp, #12]
	mov	w1, #2
	bl	_checkvalue
	mov	x8, x0
	ldr	w0, [sp, #12]
	tbnz	x8, #63, LBB0_14
; %bb.5:
	bl	_ksem_wait
	tbnz	x0, #63, LBB0_12
; %bb.6:
	ldr	w0, [sp, #12]
	mov	w1, #1
	bl	_checkvalue
	mov	x19, x0
	ldr	w0, [sp, #12]
	bl	_ksem_close
	tbnz	x19, #63, LBB0_15
; %bb.7:
	tbnz	x0, #63, LBB0_16
; %bb.8:
	bl	_pass
	b	LBB0_15
LBB0_9:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_errno
	b	LBB0_15
LBB0_10:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_fail_errno
	ldr	w0, [sp, #12]
LBB0_14:
	bl	_ksem_close
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_16:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_fail_errno
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TEST_PATH,4,2                  ; @TEST_PATH
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksem_open(O_CREAT | O_EXCL)"

l_.str.1:                               ; @.str.1
	.asciz	"ksem_unlink"

l_.str.2:                               ; @.str.2
	.asciz	"ksem_post"

l_.str.3:                               ; @.str.3
	.asciz	"ksem_wait"

l_.str.4:                               ; @.str.4
	.asciz	"ksem_close"

	.no_dead_strip	_use_after_unlink_test
.subsections_via_symbols
