	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sem_trywait                   ## -- Begin function _sem_trywait
	.p2align	4, 0x90
__sem_trywait:                          ## @_sem_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_sem_check_validity
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	leal	-1(%rbx), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_atomic_cmpset_acq_int
	testq	%rax, %rax
	jne	LBB0_3
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	movl	%ebx, %edi
	callq	_USEM_COUNT
	testq	%rax, %rax
	jg	LBB0_2
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.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_trywait                   ; -- Begin function _sem_trywait
	.p2align	2
__sem_trywait:                          ; @_sem_trywait
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_sem_check_validity
	cbnz	x0, LBB0_4
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w2, w20, #1
	mov	x0, x19
	mov	x1, x20
	bl	_atomic_cmpset_acq_int
	cbnz	x0, LBB0_6
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x19]
	mov	x0, x20
	bl	_USEM_COUNT
	cmp	x0, #1
	b.ge	LBB0_1
; %bb.3:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
