	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function expired_timedwait
_expired_timedwait:                     ## @expired_timedwait
	.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
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-16(%rbp), %rdx
	movl	$2500, %esi                     ## imm = 0x9C4
	callq	_timedwait
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	-16(%rbp), %edi
	movl	$2500, %esi                     ## imm = 0x9C4
	callq	_ELAPSED
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	-12(%rbp), %edi
	xorl	%esi, %esi
	callq	_checkvalue
	movq	%rax, %rbx
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
	testq	%rbx, %rbx
	js	LBB0_10
## %bb.7:
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	xorl	%eax, %eax
	callq	_pass
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_10
LBB0_5:
	movl	-16(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_fail_err
LBB0_3:
	movl	-12(%rbp), %edi
	callq	_ksem_destroy
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksem_init"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"ksem_timedwait() of locked sem took %ums instead of 2500ms"

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

	.no_dead_strip	_expired_timedwait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function expired_timedwait
_expired_timedwait:                     ; @expired_timedwait
	.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_6
; %bb.1:
	ldr	w0, [sp, #12]
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	add	x2, sp, #8
	mov	w1, #2500
	bl	_timedwait
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	w0, [sp, #8]
	mov	w1, #2500
	bl	_ELAPSED
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w0, [sp, #12]
	mov	w1, #0
	bl	_checkvalue
	mov	x19, x0
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
	tbnz	x19, #63, LBB0_9
; %bb.4:
	tbnz	x0, #63, LBB0_10
; %bb.5:
	bl	_pass
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fail_errno
	b	LBB0_9
LBB0_7:
	ldr	w1, [sp, #8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_fail_err
LBB0_8:
	ldr	w0, [sp, #12]
	bl	_ksem_destroy
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fail_errno
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksem_init"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"ksem_timedwait() of locked sem took %ums instead of 2500ms"

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

	.no_dead_strip	_expired_timedwait
.subsections_via_symbols
