	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sem_clockwait_np              ## -- Begin function _sem_clockwait_np
	.p2align	4, 0x90
__sem_clockwait_np:                     ## @_sem_clockwait_np
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_sem_check_validity
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	__pthread_testcancel
	movl	%r13d, %r12d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r15d
	movl	%r15d, %edi
	callq	_USEM_COUNT
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%r15), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_atomic_cmpset_acq_int
	testq	%rax, %rax
	je	LBB0_2
	jmp	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%r13, %r13
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1000000000, (%r13)             ## imm = 0x3B9ACA00
	jae	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	__pthread_cancel_enter
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r13, %rcx
	movq	%r15, %r8
	callq	_usem_wait
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	__pthread_cancel_leave
	jmp	LBB0_2
LBB0_4:
	xorl	%r14d, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	callq	__pthread_testcancel
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sem_clockwait_np              ; -- Begin function _sem_clockwait_np
	.p2align	2
__sem_clockwait_np:                     ; @_sem_clockwait_np
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_sem_check_validity
	cbz	x0, LBB0_2
LBB0_1:
	mov	w24, #-1
	b	LBB0_10
LBB0_2:
	bl	__pthread_testcancel
	mov	w24, #0
	mov	w26, #51712
	movk	w26, #15258, lsl #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x23]
	mov	x0, x25
	bl	_USEM_COUNT
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w2, w25, #1
	mov	x0, x23
	mov	x1, x25
	bl	_atomic_cmpset_acq_int
	cbz	x0, LBB0_3
	b	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w24, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x20, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	cmp	w8, w26
	b.hs	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	__pthread_cancel_enter
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_usem_wait
	mov	x24, x0
	mov	w0, #0
	bl	__pthread_cancel_leave
	b	LBB0_3
LBB0_9:
	mov	w24, #0
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	__pthread_testcancel
	b	LBB0_10
LBB0_12:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	b	LBB0_1
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
