	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function locked_trywait
_locked_trywait:                        ## @locked_trywait
	.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
	leaq	-12(%rbp), %rdi
	xorl	%esi, %esi
	callq	_ksem_init
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-12(%rbp), %edi
	callq	_ksem_trywait
	testq	%rax, %rax
	js	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_fail_err
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_11
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movl	-12(%rbp), %edi
	xorl	%esi, %esi
	callq	_checkvalue
	movq	%rax, %rbx
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
	testq	%rbx, %rbx
	js	LBB0_11
## %bb.8:
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	xorl	%eax, %eax
	callq	_pass
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	callq	_fail_errno
LBB0_4:
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.3(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksem_init"

L_.str.1:                               ## @.str.1
	.asciz	"ksem_trywait() didn't fail"

	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"wrong error from ksem_trywait()"

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

	.no_dead_strip	_locked_trywait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function locked_trywait
_locked_trywait:                        ; @locked_trywait
	.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
	add	x0, sp, #12
	mov	w1, #0
	bl	_ksem_init
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w0, [sp, #12]
	bl	_ksem_trywait
	tbnz	x0, #63, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_err
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_errno
	b	LBB0_10
LBB0_4:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w0, [sp, #12]
	mov	w1, #0
	bl	_checkvalue
	mov	x19, x0
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
	tbnz	x19, #63, LBB0_10
; %bb.6:
	tbnz	x0, #63, LBB0_11
; %bb.7:
	bl	_pass
	b	LBB0_10
LBB0_8:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fail_errno
LBB0_9:
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fail_errno
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksem_init"

l_.str.1:                               ; @.str.1
	.asciz	"ksem_trywait() didn't fail"

	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"wrong error from ksem_trywait()"

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

	.no_dead_strip	_locked_trywait
.subsections_via_symbols
