	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen4_render_ring_flush
_gen4_render_ring_flush:                ## @gen4_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MI_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MI_NO_WRITE_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ebx
	orl	%ecx, %ebx
	orl	%esi, %edx
	movq	_I915_GEM_DOMAIN_RENDER@GOTPCREL(%rip), %r8
	notl	%eax
	andl	%ecx, %eax
	testl	%edx, (%r8)
	cmovel	%ebx, %eax
	movq	%rdi, %r14
	movq	_I915_GEM_DOMAIN_INSTRUCTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	%esi, %ebx
	je	LBB0_2
## %bb.1:
	movq	_MI_EXE_FLUSH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_2:
	orl	%eax, %ebx
	movq	_I915_GEM_DOMAIN_COMMAND@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_6
## %bb.3:
	movq	(%r14), %r15
	movq	%r15, %rdi
	callq	_IS_G4X
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_IS_GEN5
	testq	%rax, %rax
	je	LBB0_6
LBB0_5:
	movq	_MI_INVALIDATE_ISP@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_intel_ring_begin
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_intel_ring_emit
	movq	_MI_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_intel_ring_emit
	movq	%r14, %rdi
	callq	_intel_ring_advance
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MI_FLUSH,4,2                   ## @MI_FLUSH
	.comm	_MI_NO_WRITE_FLUSH,4,2          ## @MI_NO_WRITE_FLUSH
	.comm	_I915_GEM_DOMAIN_RENDER,4,2     ## @I915_GEM_DOMAIN_RENDER
	.comm	_I915_GEM_DOMAIN_INSTRUCTION,4,2 ## @I915_GEM_DOMAIN_INSTRUCTION
	.comm	_MI_EXE_FLUSH,4,2               ## @MI_EXE_FLUSH
	.comm	_I915_GEM_DOMAIN_COMMAND,4,2    ## @I915_GEM_DOMAIN_COMMAND
	.comm	_MI_INVALIDATE_ISP,4,2          ## @MI_INVALIDATE_ISP
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.no_dead_strip	_gen4_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 gen4_render_ring_flush
_gen4_render_ring_flush:                ; @gen4_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
Lloh0:
	adrp	x8, _MI_FLUSH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MI_FLUSH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MI_NO_WRITE_FLUSH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MI_NO_WRITE_FLUSH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w10, w9, w8
Lloh6:
	adrp	x11, _I915_GEM_DOMAIN_RENDER@GOTPAGE
Lloh7:
	ldr	x11, [x11, _I915_GEM_DOMAIN_RENDER@GOTPAGEOFF]
	orr	w12, w2, w1
Lloh8:
	ldr	w11, [x11]
	bic	w8, w8, w9
	tst	w11, w12
Lloh9:
	adrp	x9, _I915_GEM_DOMAIN_INSTRUCTION@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I915_GEM_DOMAIN_INSTRUCTION@GOTPAGEOFF]
	csel	w8, w10, w8, eq
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _MI_EXE_FLUSH@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MI_EXE_FLUSH@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w9, w1
	csel	w9, wzr, w10, eq
	orr	w20, w9, w8
Lloh15:
	adrp	x8, _I915_GEM_DOMAIN_COMMAND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I915_GEM_DOMAIN_COMMAND@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_4
; %bb.1:
	ldr	x21, [x19]
	mov	x0, x21
	bl	_IS_G4X
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_IS_GEN5
	cbz	x0, LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _MI_INVALIDATE_ISP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MI_INVALIDATE_ISP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_4:
	mov	x0, x19
	mov	w1, #2
	bl	_intel_ring_begin
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_intel_ring_emit
Lloh21:
	adrp	x8, _MI_NOOP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MI_NOOP@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_intel_ring_emit
	mov	x0, x19
	bl	_intel_ring_advance
LBB0_6:
	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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MI_FLUSH,4,2                   ; @MI_FLUSH
	.comm	_MI_NO_WRITE_FLUSH,4,2          ; @MI_NO_WRITE_FLUSH
	.comm	_I915_GEM_DOMAIN_RENDER,4,2     ; @I915_GEM_DOMAIN_RENDER
	.comm	_I915_GEM_DOMAIN_INSTRUCTION,4,2 ; @I915_GEM_DOMAIN_INSTRUCTION
	.comm	_MI_EXE_FLUSH,4,2               ; @MI_EXE_FLUSH
	.comm	_I915_GEM_DOMAIN_COMMAND,4,2    ; @I915_GEM_DOMAIN_COMMAND
	.comm	_MI_INVALIDATE_ISP,4,2          ; @MI_INVALIDATE_ISP
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.no_dead_strip	_gen4_render_ring_flush
.subsections_via_symbols
