	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_fence_wait_uevent
_nouveau_fence_wait_uevent:             ## @nouveau_fence_wait_uevent
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	(%rbx), %rax
	movl	8(%rax), %edi
	callq	_nouveau_fifo
	movq	(%rbx), %rcx
	movq	(%rcx), %r12
	movq	_nouveau_fence_wait_uevent_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -72(%rbp)
	movq	%r12, -64(%rbp)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	xorl	%r13d, %r13d
	leaq	-72(%rbp), %rdx
	xorl	%esi, %esi
	callq	_nouveau_event_get
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.1:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	subl	%r14d, %ebx
	movslq	%ebx, %r13
	movl	(%r12), %ebx
	movq	%r15, %rdi
	callq	_nouveau_fence_done
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_wait_event_interruptible_timeout
	jmp	LBB0_5
LBB0_8:
	movl	(%r12), %ebx
	movq	%r15, %rdi
	callq	_nouveau_fence_done
	movl	%ebx, %edi
	movl	%eax, %esi
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	callq	_wait_event_interruptible
	movl	%eax, %r13d
	jmp	LBB0_11
LBB0_4:
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_wait_event_timeout
LBB0_5:
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_11
LBB0_6:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r13d, %esi
	movl	%esi, (%r15)
	movl	(%rax), %edi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_10:
	callq	_wait_event
	xorl	%r13d, %r13d
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %rdx
	xorl	%esi, %esi
	callq	_nouveau_event_put
	movl	%r13d, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	cmovel	%ebx, %r13d
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nouveau_fence_wait_uevent_handler,4,2 ## @nouveau_fence_wait_uevent_handler
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_nouveau_fence_wait_uevent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_fence_wait_uevent
_nouveau_fence_wait_uevent:             ; @nouveau_fence_wait_uevent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	x8, [x22]
	ldr	w0, [x8, #8]
	bl	_nouveau_fifo
	mov	x19, x0
	ldr	x8, [x22]
	ldr	x25, [x8]
Lloh0:
	adrp	x8, _nouveau_fence_wait_uevent_handler@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nouveau_fence_wait_uevent_handler@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp]
	str	x25, [sp, #8]
	ldr	w0, [x0]
	mov	x2, sp
	mov	w1, #0
	bl	_nouveau_event_get
	ldr	w22, [x20]
	cbz	w22, LBB0_4
; %bb.1:
Lloh3:
	adrp	x24, _jiffies@GOTPAGE
Lloh4:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	w23, [x24]
	mov	x0, x23
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_6
; %bb.2:
	sub	w8, w22, w23
	sxtw	x22, w8
	ldr	w23, [x25]
	mov	x0, x20
	bl	_nouveau_fence_done
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	cbz	w21, LBB0_7
; %bb.3:
	bl	_wait_event_interruptible_timeout
	mov	x21, x0
	tbz	w0, #31, LBB0_8
	b	LBB0_11
LBB0_4:
	ldr	w22, [x25]
	mov	x0, x20
	bl	_nouveau_fence_done
	mov	x1, x0
	cbz	w21, LBB0_10
; %bb.5:
	mov	x0, x22
	bl	_wait_event_interruptible
	mov	x21, x0
	b	LBB0_11
LBB0_6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	bl	_wait_event_timeout
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
LBB0_8:
	ldr	w8, [x24]
	add	w1, w8, w21
	str	w1, [x20]
	ldr	w0, [x24]
	bl	_time_after_eq
	cbz	x0, LBB0_11
; %bb.9:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_10:
	mov	x0, x22
	bl	_wait_event
LBB0_11:
	ldr	w0, [x19]
	mov	x2, sp
	mov	w1, #0
	bl	_nouveau_event_put
	lsr	w0, w21, #31
	bl	_unlikely
	cmp	x0, #0
	csel	w0, wzr, w21, eq
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_nouveau_fence_wait_uevent_handler,4,2 ; @nouveau_fence_wait_uevent_handler
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_nouveau_fence_wait_uevent
.subsections_via_symbols
