	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv84_graph_tlb_flush
_nv84_graph_tlb_flush:                  ## @nv84_graph_tlb_flush
	.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
	movq	%rdi, %r12
	callq	_nouveau_timer
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	movl	$4195584, %esi                  ## imm = 0x400500
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
	movq	%r14, %rdi
	callq	*(%r14)
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	%r12, %rdi
	movl	$4195200, %esi                  ## imm = 0x400380
	callq	_nv_rd32
	movl	$1, %ebx
	testl	%eax, %eax
	je	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %ecx
	andl	$7, %ecx
	cmpl	$1, %ecx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	%eax, %edx
	sarl	$3, %edx
	cmpl	$7, %eax
	movl	%edx, %eax
	ja	LBB0_2
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	setne	%bl
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movl	$4195204, %esi                  ## imm = 0x400384
	callq	_nv_rd32
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %ecx
	andl	$7, %ecx
	cmpl	$1, %ecx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, %edx
	sarl	$3, %edx
	cmpl	$7, %eax
	movl	%edx, %eax
	ja	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	cmpl	$1, %ecx
	setne	%bl
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movl	$4195208, %esi                  ## imm = 0x400388
	callq	_nv_rd32
	testl	%ebx, %ebx
	setne	%bl
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, %ecx
	andl	$7, %ecx
	cmpl	$1, %ecx
	setne	%bl
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	%eax, %ecx
	sarl	$3, %ecx
	cmpl	$7, %eax
	movl	%ecx, %eax
	ja	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	testb	%bl, %bl
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	*(%r14)
	subl	%r15d, %eax
	cmpl	$2000000001, %eax               ## imm = 0x77359401
	jl	LBB0_1
## %bb.16:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_nv_error
	movq	%r12, %rdi
	movl	$4196096, %esi                  ## imm = 0x400700
	callq	_nv_rd32
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nv_error
	movq	_nv50_pgraph_status@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_nouveau_bitfield_print
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_cont
	movq	_nv50_pgraph_vstatus_0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	$4195200, %esi                  ## imm = 0x400380
	callq	_nv_rd32
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_nouveau_pgraph_vstatus_print
	movq	_nv50_pgraph_vstatus_1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	$4195204, %esi                  ## imm = 0x400384
	callq	_nv_rd32
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_nouveau_pgraph_vstatus_print
	movq	_nv50_pgraph_vstatus_2@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	$4195208, %esi                  ## imm = 0x400388
	callq	_nv_rd32
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_nouveau_pgraph_vstatus_print
LBB0_17:
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_nv50_vm_flush_engine
	movq	%r12, %rdi
	movl	$4195584, %esi                  ## imm = 0x400500
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_mask
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testb	%bl, %bl
	cmovnel	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PGRAPH TLB flush idle timeout fail\n"

L_.str.1:                               ## @.str.1
	.asciz	"PGRAPH_STATUS  : 0x%08x"

	.comm	_nv50_pgraph_status,4,2         ## @nv50_pgraph_status
L_.str.2:                               ## @.str.2
	.asciz	"\n"

	.comm	_nv50_pgraph_vstatus_0,4,2      ## @nv50_pgraph_vstatus_0
	.comm	_nv50_pgraph_vstatus_1,4,2      ## @nv50_pgraph_vstatus_1
	.comm	_nv50_pgraph_vstatus_2,4,2      ## @nv50_pgraph_vstatus_2
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_nv84_graph_tlb_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv84_graph_tlb_flush
_nv84_graph_tlb_flush:                  ; @nv84_graph_tlb_flush
	.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	x19, x0
	mov	w22, #896
	movk	w22, #64, lsl #16
	bl	_nouveau_timer
	mov	x20, x0
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	w1, w22, #384
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_nv_mask
	ldr	x8, [x20]
	mov	x0, x20
	blr	x8
	mov	x21, x0
	mov	w24, #37889
	movk	w24, #30517, lsl #16
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x19
	mov	w1, #896
	movk	w1, #64, lsl #16
	bl	_nv_rd32
	cbz	w0, LBB0_4
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w8, w0, #0x7
	cmp	w8, #1
	ccmp	w0, #7, #0, ne
	asr	w0, w0, #3
	b.hi	LBB0_2
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, #1
	cset	w25, ne
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w25, #1
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w1, w22, #4
	mov	x0, x19
	bl	_nv_rd32
	cbz	w25, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_9
LBB0_7:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w8, w0, #0x7
	cmp	w8, #1
	ccmp	w0, #7, #0, ne
	asr	w0, w0, #3
	b.hi	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, #1
	cset	w25, ne
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w1, w22, #8
	mov	x0, x19
	bl	_nv_rd32
	cmp	w25, #0
	cset	w23, ne
	cbz	w25, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	cbz	w0, LBB0_13
LBB0_11:                                ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w8, w0, #0x7
	cmp	w8, #1
	cset	w23, ne
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	asr	w8, w0, #3
	cmp	w0, #7
	mov	x0, x8
	b.hi	LBB0_11
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	tbnz	w23, #0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	mov	x0, x20
	blr	x8
	sub	w8, w0, w21
	cmp	w8, w24
	b.lt	LBB0_1
; %bb.15:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
	add	w1, w22, #896
	mov	x0, x19
	bl	_nv_rd32
	mov	x20, x0
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nv_error
Lloh4:
	adrp	x8, _nv50_pgraph_status@GOTPAGE
Lloh5:
	ldr	x8, [x8, _nv50_pgraph_status@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_nouveau_bitfield_print
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_cont
Lloh9:
	adrp	x8, _nv50_pgraph_vstatus_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _nv50_pgraph_vstatus_0@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	x0, x19
	mov	w1, #896
	movk	w1, #64, lsl #16
	bl	_nv_rd32
	mov	x3, x0
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_nouveau_pgraph_vstatus_print
Lloh12:
	adrp	x8, _nv50_pgraph_vstatus_1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _nv50_pgraph_vstatus_1@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	add	w1, w22, #4
	mov	x0, x19
	bl	_nv_rd32
	mov	x3, x0
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_nouveau_pgraph_vstatus_print
Lloh15:
	adrp	x8, _nv50_pgraph_vstatus_2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _nv50_pgraph_vstatus_2@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	add	w1, w22, #8
	mov	x0, x19
	bl	_nv_rd32
	mov	x3, x0
	mov	x0, x19
	mov	w1, #2
	mov	x2, x20
	bl	_nouveau_pgraph_vstatus_print
LBB0_16:
	mov	x0, x19
	mov	w1, #0
	bl	_nv50_vm_flush_engine
	add	w1, w22, #384
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	bl	_nv_mask
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh18:
	adrp	x8, _EBUSY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w23, #0
	csneg	w0, wzr, w8, ne
	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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PGRAPH TLB flush idle timeout fail\n"

l_.str.1:                               ; @.str.1
	.asciz	"PGRAPH_STATUS  : 0x%08x"

	.comm	_nv50_pgraph_status,4,2         ; @nv50_pgraph_status
l_.str.2:                               ; @.str.2
	.asciz	"\n"

	.comm	_nv50_pgraph_vstatus_0,4,2      ; @nv50_pgraph_vstatus_0
	.comm	_nv50_pgraph_vstatus_1,4,2      ; @nv50_pgraph_vstatus_1
	.comm	_nv50_pgraph_vstatus_2,4,2      ; @nv50_pgraph_vstatus_2
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_nv84_graph_tlb_flush
.subsections_via_symbols
