	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen7_render_ring_flush
_gen7_render_ring_flush:                ## @gen7_render_ring_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, %r15
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_PIPE_CONTROL_CS_STALL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	orq	%rax, %rbx
	movq	_PIPE_CONTROL_DEPTH_CACHE_FLUSH@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rbx
	testq	%rdx, %rdx
	cmoveq	%rax, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_PIPE_CONTROL_TLB_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_VF_CACHE_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_CONST_CACHE_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_STATE_CACHE_INVALIDATE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_QW_WRITE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_gen7_render_ring_cs_stall_wa
LBB0_2:
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_intel_ring_begin
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	subq	$-128, %r14
	movl	$4, %edi
	callq	_GFX_OP_PIPE_CONTROL
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_intel_ring_emit
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_intel_ring_emit
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_intel_ring_emit
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_intel_ring_emit
	movq	%r15, %rdi
	callq	_intel_ring_advance
LBB0_4:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPE_CONTROL_CS_STALL,8,3      ## @PIPE_CONTROL_CS_STALL
	.comm	_PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH,8,3 ## @PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH
	.comm	_PIPE_CONTROL_DEPTH_CACHE_FLUSH,8,3 ## @PIPE_CONTROL_DEPTH_CACHE_FLUSH
	.comm	_PIPE_CONTROL_TLB_INVALIDATE,8,3 ## @PIPE_CONTROL_TLB_INVALIDATE
	.comm	_PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,8,3 ## @PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE,8,3 ## @PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_VF_CACHE_INVALIDATE,8,3 ## @PIPE_CONTROL_VF_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_CONST_CACHE_INVALIDATE,8,3 ## @PIPE_CONTROL_CONST_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_STATE_CACHE_INVALIDATE,8,3 ## @PIPE_CONTROL_STATE_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_QW_WRITE,8,3      ## @PIPE_CONTROL_QW_WRITE
	.comm	_PIPE_CONTROL_GLOBAL_GTT_IVB,8,3 ## @PIPE_CONTROL_GLOBAL_GTT_IVB
	.no_dead_strip	_gen7_render_ring_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen7_render_ring_flush
_gen7_render_ring_flush:                ; @gen7_render_ring_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PIPE_CONTROL_CS_STALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PIPE_CONTROL_CS_STALL@GOTPAGEOFF]
	ldr	x22, [x8]
Lloh2:
	ldr	x8, [x9]
Lloh3:
	adrp	x9, _PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	orr	x9, x9, x8
Lloh6:
	adrp	x10, _PIPE_CONTROL_DEPTH_CACHE_FLUSH@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PIPE_CONTROL_DEPTH_CACHE_FLUSH@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	orr	x9, x9, x10
	cmp	x2, #0
	csel	x20, x8, x9, eq
	cbz	x1, LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _PIPE_CONTROL_TLB_INVALIDATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PIPE_CONTROL_TLB_INVALIDATE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	orr	x8, x8, x20
Lloh12:
	adrp	x9, _PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh15:
	adrp	x9, _PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh18:
	adrp	x9, _PIPE_CONTROL_VF_CACHE_INVALIDATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PIPE_CONTROL_VF_CACHE_INVALIDATE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh21:
	adrp	x9, _PIPE_CONTROL_CONST_CACHE_INVALIDATE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PIPE_CONTROL_CONST_CACHE_INVALIDATE@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh24:
	adrp	x9, _PIPE_CONTROL_STATE_CACHE_INVALIDATE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PIPE_CONTROL_STATE_CACHE_INVALIDATE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh27:
	adrp	x9, _PIPE_CONTROL_QW_WRITE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PIPE_CONTROL_QW_WRITE@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh30:
	adrp	x9, _PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PIPE_CONTROL_GLOBAL_GTT_IVB@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	orr	x20, x8, x9
	mov	x0, x19
	bl	_gen7_render_ring_cs_stall_wa
LBB0_2:
	mov	x0, x19
	mov	w1, #4
	bl	_intel_ring_begin
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.3:
	add	x22, x22, #128
	mov	w0, #4
	bl	_GFX_OP_PIPE_CONTROL
	mov	x1, x0
	mov	x0, x19
	bl	_intel_ring_emit
	mov	x0, x19
	mov	x1, x20
	bl	_intel_ring_emit
	mov	x0, x19
	mov	x1, x22
	bl	_intel_ring_emit
	mov	x0, x19
	mov	x1, #0
	bl	_intel_ring_emit
	mov	x0, x19
	bl	_intel_ring_advance
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPE_CONTROL_CS_STALL,8,3      ; @PIPE_CONTROL_CS_STALL
	.comm	_PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH,8,3 ; @PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH
	.comm	_PIPE_CONTROL_DEPTH_CACHE_FLUSH,8,3 ; @PIPE_CONTROL_DEPTH_CACHE_FLUSH
	.comm	_PIPE_CONTROL_TLB_INVALIDATE,8,3 ; @PIPE_CONTROL_TLB_INVALIDATE
	.comm	_PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,8,3 ; @PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE,8,3 ; @PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_VF_CACHE_INVALIDATE,8,3 ; @PIPE_CONTROL_VF_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_CONST_CACHE_INVALIDATE,8,3 ; @PIPE_CONTROL_CONST_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_STATE_CACHE_INVALIDATE,8,3 ; @PIPE_CONTROL_STATE_CACHE_INVALIDATE
	.comm	_PIPE_CONTROL_QW_WRITE,8,3      ; @PIPE_CONTROL_QW_WRITE
	.comm	_PIPE_CONTROL_GLOBAL_GTT_IVB,8,3 ; @PIPE_CONTROL_GLOBAL_GTT_IVB
	.no_dead_strip	_gen7_render_ring_flush
.subsections_via_symbols
