	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_buffer_config_mmuv2    ## -- Begin function etnaviv_buffer_config_mmuv2
	.p2align	4, 0x90
_etnaviv_buffer_config_mmuv2:           ## @etnaviv_buffer_config_mmuv2
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	leaq	8(%rdi), %rbx
	addq	$4, %rdi
	callq	_lockdep_assert_held
	movl	$0, 8(%r12)
	movl	(%r12), %eax
	movq	_chipFeatures_PIPE_3D@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_VIVS_GL_PIPE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ETNA_PIPE_3D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VIVS_GL_PIPE_SELECT_PIPE
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_CMD_LOAD_STATE
	movq	_VIVS_MMUv2_CONFIGURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r15d, %edx
	movq	%rbx, %rdi
	callq	_CMD_LOAD_STATE
	movq	_VIVS_MMUv2_SAFE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_CMD_LOAD_STATE
	movq	_SYNC_RECIPIENT_FE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SYNC_RECIPIENT_PE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_CMD_SEM
	movq	_SYNC_RECIPIENT_FE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_CMD_STALL
	movl	(%r12), %eax
LBB0_2:
	movq	_chipFeatures_PIPE_2D@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_VIVS_GL_PIPE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_ETNA_PIPE_2D@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VIVS_GL_PIPE_SELECT_PIPE
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_CMD_LOAD_STATE
	movq	_VIVS_MMUv2_CONFIGURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_CMD_LOAD_STATE
	movq	_VIVS_MMUv2_SAFE_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_CMD_LOAD_STATE
	movq	_SYNC_RECIPIENT_FE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_SYNC_RECIPIENT_PE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_CMD_SEM
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_CMD_STALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_CMD_END
	movl	(%rbx), %edi
	movl	$8, %esi
	callq	_ALIGN
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%rbx)
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	sarl	$3, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_chipFeatures_PIPE_3D,4,2       ## @chipFeatures_PIPE_3D
	.comm	_VIVS_GL_PIPE_SELECT,4,2        ## @VIVS_GL_PIPE_SELECT
	.comm	_ETNA_PIPE_3D,4,2               ## @ETNA_PIPE_3D
	.comm	_VIVS_MMUv2_CONFIGURATION,4,2   ## @VIVS_MMUv2_CONFIGURATION
	.comm	_VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K,4,2 ## @VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K
	.comm	_VIVS_MMUv2_SAFE_ADDRESS,4,2    ## @VIVS_MMUv2_SAFE_ADDRESS
	.comm	_SYNC_RECIPIENT_FE,4,2          ## @SYNC_RECIPIENT_FE
	.comm	_SYNC_RECIPIENT_PE,4,2          ## @SYNC_RECIPIENT_PE
	.comm	_chipFeatures_PIPE_2D,4,2       ## @chipFeatures_PIPE_2D
	.comm	_ETNA_PIPE_2D,4,2               ## @ETNA_PIPE_2D
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_buffer_config_mmuv2    ; -- Begin function etnaviv_buffer_config_mmuv2
	.p2align	2
_etnaviv_buffer_config_mmuv2:           ; @etnaviv_buffer_config_mmuv2
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	x0, x0, #4
	bl	_lockdep_assert_held
	mov	x19, x22
	str	wzr, [x19, #8]!
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _chipFeatures_PIPE_3D@GOTPAGE
Lloh1:
	ldr	x9, [x9, _chipFeatures_PIPE_3D@GOTPAGEOFF]
Lloh2:
	adrp	x10, _VIVS_GL_PIPE_SELECT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VIVS_GL_PIPE_SELECT@GOTPAGEOFF]
Lloh4:
	adrp	x27, _VIVS_MMUv2_CONFIGURATION@GOTPAGE
Lloh5:
	ldr	x27, [x27, _VIVS_MMUv2_CONFIGURATION@GOTPAGEOFF]
Lloh6:
	adrp	x28, _VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K@GOTPAGE
Lloh7:
	ldr	x28, [x28, _VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K@GOTPAGEOFF]
Lloh8:
	adrp	x23, _VIVS_MMUv2_SAFE_ADDRESS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _VIVS_MMUv2_SAFE_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x26, _SYNC_RECIPIENT_FE@GOTPAGE
Lloh12:
	ldr	x26, [x26, _SYNC_RECIPIENT_FE@GOTPAGEOFF]
Lloh13:
	adrp	x25, _SYNC_RECIPIENT_PE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _SYNC_RECIPIENT_PE@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x25, x26
	mov	x26, x28
	mov	x28, x27
	mov	x27, x23
	mov	x24, x10
	ldr	w23, [x10]
Lloh15:
	adrp	x8, _ETNA_PIPE_3D@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETNA_PIPE_3D@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_VIVS_GL_PIPE_SELECT_PIPE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	mov	x23, x27
	mov	x27, x28
	mov	x28, x26
	mov	x26, x25
Lloh18:
	adrp	x25, _SYNC_RECIPIENT_PE@GOTPAGE
Lloh19:
	ldr	x25, [x25, _SYNC_RECIPIENT_PE@GOTPAGEOFF]
	bl	_CMD_LOAD_STATE
	ldr	w1, [x27]
	ldr	w8, [x28]
	orr	w2, w8, w21
	mov	x0, x19
	bl	_CMD_LOAD_STATE
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x20
	bl	_CMD_LOAD_STATE
	ldr	w1, [x26]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_CMD_SEM
	ldr	w1, [x26]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_CMD_STALL
	ldr	w8, [x22]
	b	LBB0_3
LBB0_2:
	mov	x24, x10
LBB0_3:
Lloh20:
	adrp	x9, _chipFeatures_PIPE_2D@GOTPAGE
Lloh21:
	ldr	x9, [x9, _chipFeatures_PIPE_2D@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w22, [x24]
Lloh23:
	adrp	x8, _ETNA_PIPE_2D@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETNA_PIPE_2D@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_VIVS_GL_PIPE_SELECT_PIPE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_CMD_LOAD_STATE
	ldr	w1, [x27]
	ldr	w8, [x28]
	orr	w2, w8, w21
	mov	x0, x19
	bl	_CMD_LOAD_STATE
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x20
	bl	_CMD_LOAD_STATE
	ldr	w1, [x26]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_CMD_SEM
	ldr	w1, [x26]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_CMD_STALL
LBB0_5:
	mov	x0, x19
	bl	_CMD_END
	ldr	w0, [x19]
	mov	w1, #8
	bl	_ALIGN
	str	w0, [x19]
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w0, w8, #3
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_chipFeatures_PIPE_3D,4,2       ; @chipFeatures_PIPE_3D
	.comm	_VIVS_GL_PIPE_SELECT,4,2        ; @VIVS_GL_PIPE_SELECT
	.comm	_ETNA_PIPE_3D,4,2               ; @ETNA_PIPE_3D
	.comm	_VIVS_MMUv2_CONFIGURATION,4,2   ; @VIVS_MMUv2_CONFIGURATION
	.comm	_VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K,4,2 ; @VIVS_MMUv2_CONFIGURATION_MODE_MODE4_K
	.comm	_VIVS_MMUv2_SAFE_ADDRESS,4,2    ; @VIVS_MMUv2_SAFE_ADDRESS
	.comm	_SYNC_RECIPIENT_FE,4,2          ; @SYNC_RECIPIENT_FE
	.comm	_SYNC_RECIPIENT_PE,4,2          ; @SYNC_RECIPIENT_PE
	.comm	_chipFeatures_PIPE_2D,4,2       ; @chipFeatures_PIPE_2D
	.comm	_ETNA_PIPE_2D,4,2               ; @ETNA_PIPE_2D
.subsections_via_symbols
