	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fence_wait             ## -- Begin function nouveau_fence_wait
	.p2align	4, 0x90
_nouveau_fence_wait:                    ## @nouveau_fence_wait
	.cfi_startproc
## %bb.0:
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %eax
	leal	(%rax,%rax,2), %eax
	movl	%edx, %esi
	movl	%eax, %edx
	callq	_dma_fence_wait_timeout
	movq	%rax, %rcx
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.5:
	popq	%rbp
	retq
LBB0_6:
	movl	%edx, %esi
	jmp	_nouveau_fence_wait_busy        ## TAILCALL
LBB0_2:
	movl	%ecx, %eax
	popq	%rbp
	retq
LBB0_4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_fence_wait             ; -- Begin function nouveau_fence_wait
	.p2align	2
_nouveau_fence_wait:                    ; @nouveau_fence_wait
	.cfi_startproc
; %bb.0:
	mov	x8, x2
	cbz	w1, LBB0_5
; %bb.1:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_remember_state
Lloh0:
	adrp	x9, _HZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w10, w9, #4
	sub	w2, w10, w9
	mov	x1, x8
	bl	_dma_fence_wait_timeout
	tbnz	x0, #63, LBB0_4
; %bb.2:
	cbz	x0, LBB0_6
; %bb.3:
	mov	w0, #0
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	mov	x1, x8
	b	_nouveau_fence_wait_busy
LBB0_6:
	.cfi_restore_state
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
