	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_mmu_flush_all
_v3d_mmu_flush_all:                     ## @v3d_mmu_flush_all
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_V3D_MMU_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_V3D_READ
	movq	_V3D_MMU_CTL_TLB_CLEARING@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	andl	(%r15), %eax
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_V3D_READ
	movq	_V3D_MMU_CTL_TLB_CLEAR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_V3D_WRITE
	movq	_V3D_MMUC_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_V3D_MMUC_CONTROL_FLUSH@GOTPCREL(%rip), %rax
	movq	_V3D_MMUC_CONTROL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_V3D_WRITE
	movl	(%r12), %edi
	callq	_V3D_READ
	xorl	%edi, %edi
	andl	(%r15), %eax
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_4:
	movl	(%r13), %edi
	callq	_V3D_READ
	movq	_V3D_MMUC_CONTROL_FLUSHING@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%dil
	movl	$100, %esi
	callq	_wait_for
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movl	(%r14), %edi
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_V3D_MMU_CTL,4,2                ## @V3D_MMU_CTL
	.comm	_V3D_MMU_CTL_TLB_CLEARING,4,2   ## @V3D_MMU_CTL_TLB_CLEARING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLB clear wait idle pre-wait failed\n"

	.comm	_V3D_MMU_CTL_TLB_CLEAR,4,2      ## @V3D_MMU_CTL_TLB_CLEAR
	.comm	_V3D_MMUC_CONTROL,4,2           ## @V3D_MMUC_CONTROL
	.comm	_V3D_MMUC_CONTROL_FLUSH,4,2     ## @V3D_MMUC_CONTROL_FLUSH
	.comm	_V3D_MMUC_CONTROL_ENABLE,4,2    ## @V3D_MMUC_CONTROL_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"TLB clear wait idle failed\n"

	.comm	_V3D_MMUC_CONTROL_FLUSHING,4,2  ## @V3D_MMUC_CONTROL_FLUSHING
L_.str.2:                               ## @.str.2
	.asciz	"MMUC flush wait idle failed\n"

	.no_dead_strip	_v3d_mmu_flush_all
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_mmu_flush_all
_v3d_mmu_flush_all:                     ; @v3d_mmu_flush_all
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _V3D_MMU_CTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _V3D_MMU_CTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_V3D_READ
Lloh2:
	adrp	x22, _V3D_MMU_CTL_TLB_CLEARING@GOTPAGE
Lloh3:
	ldr	x22, [x22, _V3D_MMU_CTL_TLB_CLEARING@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	ldr	w20, [x21]
	mov	x0, x20
	bl	_V3D_READ
Lloh6:
	adrp	x8, _V3D_MMU_CTL_TLB_CLEAR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V3D_MMU_CTL_TLB_CLEAR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x20
	bl	_V3D_WRITE
Lloh9:
	adrp	x23, _V3D_MMUC_CONTROL@GOTPAGE
Lloh10:
	ldr	x23, [x23, _V3D_MMUC_CONTROL@GOTPAGEOFF]
Lloh11:
	adrp	x8, _V3D_MMUC_CONTROL_FLUSH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V3D_MMUC_CONTROL_FLUSH@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _V3D_MMUC_CONTROL_ENABLE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V3D_MMUC_CONTROL_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_V3D_WRITE
	ldr	w0, [x21]
	bl	_V3D_READ
	ldr	w8, [x22]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w0, [x23]
	bl	_V3D_READ
Lloh19:
	adrp	x8, _V3D_MMUC_CONTROL_FLUSHING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _V3D_MMUC_CONTROL_FLUSHING@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	ldr	w0, [x19]
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_V3D_MMU_CTL,4,2                ; @V3D_MMU_CTL
	.comm	_V3D_MMU_CTL_TLB_CLEARING,4,2   ; @V3D_MMU_CTL_TLB_CLEARING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLB clear wait idle pre-wait failed\n"

	.comm	_V3D_MMU_CTL_TLB_CLEAR,4,2      ; @V3D_MMU_CTL_TLB_CLEAR
	.comm	_V3D_MMUC_CONTROL,4,2           ; @V3D_MMUC_CONTROL
	.comm	_V3D_MMUC_CONTROL_FLUSH,4,2     ; @V3D_MMUC_CONTROL_FLUSH
	.comm	_V3D_MMUC_CONTROL_ENABLE,4,2    ; @V3D_MMUC_CONTROL_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"TLB clear wait idle failed\n"

	.comm	_V3D_MMUC_CONTROL_FLUSHING,4,2  ; @V3D_MMUC_CONTROL_FLUSHING
l_.str.2:                               ; @.str.2
	.asciz	"MMUC flush wait idle failed\n"

	.no_dead_strip	_v3d_mmu_flush_all
.subsections_via_symbols
