	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function evo_wait
_evo_wait:                              ## @evo_wait
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	xorl	%esi, %esi
	callq	_nv_ro32
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$2, %ebx
	leaq	12(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	addl	%ebx, %r12d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	addl	$-8, %ecx
	cmpl	%ecx, %r12d
	jge	LBB0_3
## %bb.1:
	movslq	%ebx, %rbx
	jmp	LBB0_2
LBB0_3:
	movq	(%r15), %rax
	movslq	%ebx, %rcx
	movl	$536870912, (%rax,%rcx,4)       ## imm = 0x20000000
	movl	8(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movl	8(%r15), %edi
	movl	$4, %esi
	movl	$-1, %edx
	xorl	%ecx, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	je	LBB0_4
LBB0_2:
	shlq	$2, %rbx
	addq	(%r15), %rbx
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_NV_ERROR
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel stalled\n"

	.no_dead_strip	_evo_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evo_wait
_evo_wait:                              ; @evo_wait
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	mov	w1, #0
	bl	_nv_ro32
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w22, w8, #2
	add	x20, x19, #12
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	sub	w8, w8, #8
	add	w9, w22, w21
	cmp	w9, w8
	b.ge	LBB0_2
; %bb.1:
	sxtw	x8, w22
	b	LBB0_4
LBB0_2:
	ldr	x8, [x19]
	mov	w9, #536870912
	str	w9, [x8, w22, sxtw #2]
	ldr	w0, [x19, #8]
	mov	w1, #0
	mov	w2, #0
	bl	_nv_wo32
	ldr	w0, [x19, #8]
	mov	w1, #4
	mov	w2, #-1
	mov	w3, #0
	bl	_nv_wait
	cbz	w0, LBB0_5
; %bb.3:
	mov	x8, #0
LBB0_4:
	ldr	x9, [x19]
	add	x0, x9, x8, lsl #2
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_NV_ERROR
	mov	x0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel stalled\n"

	.no_dead_strip	_evo_wait
.subsections_via_symbols
