	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen6_ring_get_irq
_gen6_ring_get_irq:                     ## @gen6_ring_get_irq
	.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	16(%rdi), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_gen6_gt_force_wake_get
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	12(%r12), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 12(%r12)
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	callq	_HAS_L3_GPU_CACHE
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%r12), %rax
	movq	_RCS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_GEN6_RENDER_L3_PARITY_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	8(%r12), %esi
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	movl	8(%r12), %esi
LBB0_7:
	notl	%esi
	movq	%r12, %rdi
	callq	_I915_WRITE_IMR
	movl	8(%r12), %esi
	notl	%esi
	andl	(%r15), %esi
	movl	%esi, (%r15)
	movq	_GTIMR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_POSTING_READ
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS,8,3                        ## @RCS
	.comm	_GEN6_RENDER_L3_PARITY_ERROR,4,2 ## @GEN6_RENDER_L3_PARITY_ERROR
	.comm	_GTIMR,4,2                      ## @GTIMR
	.no_dead_strip	_gen6_ring_get_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen6_ring_get_irq
_gen6_ring_get_irq:                     ; @gen6_ring_get_irq
	.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
	ldr	x22, [x0, #16]
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x21, [x22, #8]
	mov	x0, x21
	bl	_gen6_gt_force_wake_get
	add	x19, x21, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20, #12]
	add	w9, w8, #1
	str	w9, [x20, #12]
	cbnz	w8, LBB0_8
; %bb.2:
	mov	x0, x22
	bl	_HAS_L3_GPU_CACHE
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _RCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x20, #8]
Lloh3:
	adrp	x9, _GEN6_RENDER_L3_PARITY_ERROR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GEN6_RENDER_L3_PARITY_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_7
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	ldr	w8, [x20, #8]
LBB0_7:
	mvn	w1, w8
	mov	x0, x20
	bl	_I915_WRITE_IMR
	ldr	w8, [x20, #8]
	ldr	w9, [x21]
	bic	w1, w9, w8
	str	w1, [x21]
Lloh6:
	adrp	x20, _GTIMR@GOTPAGE
Lloh7:
	ldr	x20, [x20, _GTIMR@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_I915_WRITE
	ldr	w0, [x20]
	bl	_POSTING_READ
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #1
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.comm	_GEN6_RENDER_L3_PARITY_ERROR,4,2 ; @GEN6_RENDER_L3_PARITY_ERROR
	.comm	_GTIMR,4,2                      ; @GTIMR
	.no_dead_strip	_gen6_ring_get_irq
.subsections_via_symbols
