	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen2_render_ring_flush
_gen2_render_ring_flush:                ## @gen2_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	%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	%esi, %r15d
	movq	%rdi, %r13
	movq	_MI_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_EMIT_INVALIDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MI_READ_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_EMIT_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%esi, %r14d
	movl	$2, %eax
	movl	$14, %esi
	cmovel	%eax, %esi
	callq	_intel_ring_begin
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r13, %rcx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%r15d, %eax
	cmovel	%eax, %r12d
	orl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r12d, (%rbx)
	testl	%r15d, %r14d
	je	LBB0_2
## %bb.3:
	movq	_MI_STORE_DWORD_IMM@GOTPCREL(%rip), %r12
	movq	_MI_MEM_VIRTUAL@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	orl	(%r12), %eax
	movl	%eax, 4(%rbx)
	movq	%rcx, %r14
	movq	(%rcx), %rax
	movl	(%rax), %edi
	movq	_INTEL_GT_SCRATCH_FIELD_DEFAULT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_intel_gt_scratch_offset
	movl	%eax, 8(%rbx)
	movl	$0, 12(%rbx)
	movl	(%r13), %eax
	orl	(%r12), %eax
	movl	%eax, 16(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_intel_gt_scratch_offset
	movl	%eax, 20(%rbx)
	movl	$0, 24(%rbx)
	movl	(%r13), %eax
	orl	(%r12), %eax
	movl	%eax, 28(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_intel_gt_scratch_offset
	movl	%eax, 32(%rbx)
	movl	$0, 36(%rbx)
	movl	(%r13), %eax
	orl	(%r12), %eax
	movl	%eax, 40(%rbx)
	movq	(%r14), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_intel_gt_scratch_offset
	movl	%eax, 44(%rbx)
	movl	$0, 48(%rbx)
	addq	$52, %rbx
	jmp	LBB0_4
LBB0_2:
	addq	$4, %rbx
	movq	%rcx, %r14
LBB0_4:
	movq	_MI_FLUSH@GOTPCREL(%rip), %rcx
	movq	_MI_NO_WRITE_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	addq	$4, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_intel_ring_advance
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MI_FLUSH,4,2                   ## @MI_FLUSH
	.comm	_EMIT_INVALIDATE,4,2            ## @EMIT_INVALIDATE
	.comm	_MI_READ_FLUSH,4,2              ## @MI_READ_FLUSH
	.comm	_EMIT_FLUSH,4,2                 ## @EMIT_FLUSH
	.comm	_MI_STORE_DWORD_IMM,4,2         ## @MI_STORE_DWORD_IMM
	.comm	_MI_MEM_VIRTUAL,4,2             ## @MI_MEM_VIRTUAL
	.comm	_INTEL_GT_SCRATCH_FIELD_DEFAULT,4,2 ## @INTEL_GT_SCRATCH_FIELD_DEFAULT
	.comm	_MI_NO_WRITE_FLUSH,4,2          ## @MI_NO_WRITE_FLUSH
	.no_dead_strip	_gen2_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 gen2_render_ring_flush
_gen2_render_ring_flush:                ; @gen2_render_ring_flush
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _MI_FLUSH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MI_FLUSH@GOTPAGEOFF]
Lloh2:
	adrp	x8, _EMIT_INVALIDATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EMIT_INVALIDATE@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh4:
	ldr	w25, [x8]
Lloh5:
	adrp	x8, _MI_READ_FLUSH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MI_READ_FLUSH@GOTPAGEOFF]
Lloh7:
	adrp	x9, _EMIT_FLUSH@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EMIT_FLUSH@GOTPAGEOFF]
Lloh9:
	ldr	w26, [x8]
Lloh10:
	ldr	w8, [x9]
	ands	w24, w8, w1
	mov	w8, #14
	mov	w9, #2
	csel	w1, w9, w8, eq
	bl	_intel_ring_begin
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	tst	w25, w21
	csel	w8, wzr, w26, eq
	orr	w8, w8, w23
	mov	x1, x20
	str	w8, [x1], #4
	cbz	w24, LBB0_4
; %bb.3:
Lloh11:
	adrp	x21, _MI_STORE_DWORD_IMM@GOTPAGE
Lloh12:
	ldr	x21, [x21, _MI_STORE_DWORD_IMM@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh13:
	adrp	x23, _MI_MEM_VIRTUAL@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MI_MEM_VIRTUAL@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x20, #4]
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh15:
	adrp	x24, _INTEL_GT_SCRATCH_FIELD_DEFAULT@GOTPAGE
Lloh16:
	ldr	x24, [x24, _INTEL_GT_SCRATCH_FIELD_DEFAULT@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_intel_gt_scratch_offset
	stp	w0, wzr, [x20, #8]
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w1, [x24]
	bl	_intel_gt_scratch_offset
	stp	w0, wzr, [x20, #20]
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x20, #28]
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w1, [x24]
	bl	_intel_gt_scratch_offset
	stp	w0, wzr, [x20, #32]
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x20, #40]
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	w1, [x24]
	bl	_intel_gt_scratch_offset
	add	x1, x20, #52
	stp	w0, wzr, [x20, #44]
LBB0_4:
	ldr	w8, [x22]
Lloh17:
	adrp	x9, _MI_NO_WRITE_FLUSH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MI_NO_WRITE_FLUSH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x1], #4
	mov	x0, x19
	bl	_intel_ring_advance
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MI_FLUSH,4,2                   ; @MI_FLUSH
	.comm	_EMIT_INVALIDATE,4,2            ; @EMIT_INVALIDATE
	.comm	_MI_READ_FLUSH,4,2              ; @MI_READ_FLUSH
	.comm	_EMIT_FLUSH,4,2                 ; @EMIT_FLUSH
	.comm	_MI_STORE_DWORD_IMM,4,2         ; @MI_STORE_DWORD_IMM
	.comm	_MI_MEM_VIRTUAL,4,2             ; @MI_MEM_VIRTUAL
	.comm	_INTEL_GT_SCRATCH_FIELD_DEFAULT,4,2 ; @INTEL_GT_SCRATCH_FIELD_DEFAULT
	.comm	_MI_NO_WRITE_FLUSH,4,2          ; @MI_NO_WRITE_FLUSH
	.no_dead_strip	_gen2_render_ring_flush
.subsections_via_symbols
