	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_l3_remap              ## -- Begin function i915_gem_l3_remap
	.p2align	4, 0x90
_i915_gem_l3_remap:                     ## @i915_gem_l3_remap
	.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
	movq	(%rdi), %rbx
	callq	_HAS_L3_GPU_CACHE
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.2:
	movq	_GEN7_MISCCPCTL@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_I915_READ
	movq	(%r14), %rdi
	movq	_GEN7_DOP_CLOCK_GATE_ENABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	notq	%rsi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	andq	%rax, %rsi
	callq	_I915_WRITE
	movq	(%r14), %rdi
	callq	_POSTING_READ
	movq	_GEN7_L3LOG_SIZE@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_10
## %bb.3:
	xorl	%r13d, %r13d
	movq	_GEN7_L3LOG_BASE@GOTPCREL(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %r12
	shrq	$2, %r12
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	addq	%r13, %rdi
	movq	(%rbx), %rax
	movq	(%rax,%r12,8), %rsi
	callq	_I915_WRITE
	addq	$4, %r13
	cmpl	%r13d, (%r15)
	jle	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	%r13, %rdi
	callq	_I915_READ
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rcx
	movq	%r13, %r12
	shrq	$2, %r12
	cmpq	(%rcx,%r13,2), %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rsi
	addq	%r13, %rsi
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rdx
	callq	_DRM_DEBUG
	movq	(%rbx), %rax
	cmpq	$0, (%rax,%r12,8)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_9
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_GEN7_L3LOG_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_POSTING_READ
	movq	_GEN7_MISCCPCTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GEN7_MISCCPCTL,8,3             ## @GEN7_MISCCPCTL
	.comm	_GEN7_DOP_CLOCK_GATE_ENABLE,8,3 ## @GEN7_DOP_CLOCK_GATE_ENABLE
	.comm	_GEN7_L3LOG_SIZE,4,2            ## @GEN7_L3LOG_SIZE
	.comm	_GEN7_L3LOG_BASE,8,3            ## @GEN7_L3LOG_BASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"0x%x was already programmed to %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Clearing remapped register\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_l3_remap              ; -- Begin function i915_gem_l3_remap
	.p2align	2
_i915_gem_l3_remap:                     ; @i915_gem_l3_remap
	.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
	ldr	x22, [x0]
	bl	_HAS_L3_GPU_CACHE
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.2:
Lloh0:
	adrp	x23, _GEN7_MISCCPCTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GEN7_MISCCPCTL@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_I915_READ
	mov	x19, x0
	ldr	x0, [x23]
Lloh2:
	adrp	x8, _GEN7_DOP_CLOCK_GATE_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GEN7_DOP_CLOCK_GATE_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	bic	x1, x19, x8
	bl	_I915_WRITE
	ldr	x0, [x23]
	bl	_POSTING_READ
Lloh5:
	adrp	x24, _GEN7_L3LOG_SIZE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GEN7_L3LOG_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh7:
	adrp	x25, _GEN7_L3LOG_BASE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _GEN7_L3LOG_BASE@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x26, #0
	mov	x27, #0
Lloh9:
	adrp	x20, l_.str@PAGE
Lloh10:
	add	x20, x20, l_.str@PAGEOFF
Lloh11:
	adrp	x21, l_.str.1@PAGE
Lloh12:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x25]
	add	x0, x27, x8
	ldr	x8, [x22]
	ldr	x1, [x8, x28, lsl #3]
	bl	_I915_WRITE
	add	x27, x27, #4
	ldr	w8, [x24]
	add	x26, x26, #1
	cmp	w8, w27
	b.le	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x0, x27, x8
	bl	_I915_READ
	mov	x28, x26
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x0
	ldr	x8, [x22]
	lsr	x28, x27, #2
	ldr	x8, [x8, x26, lsl #3]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x25]
	add	x1, x27, x8
	mov	x0, x20
	bl	_DRM_DEBUG
	ldr	x8, [x22]
	ldr	x8, [x8, x26, lsl #3]
	cbnz	x8, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_DRM_DEBUG_DRIVER
	b	LBB0_4
LBB0_9:
	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
LBB0_10:
	ldr	x0, [x25]
	bl	_POSTING_READ
	ldr	x0, [x23]
	mov	x1, x19
	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
	b	_I915_WRITE
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GEN7_MISCCPCTL,8,3             ; @GEN7_MISCCPCTL
	.comm	_GEN7_DOP_CLOCK_GATE_ENABLE,8,3 ; @GEN7_DOP_CLOCK_GATE_ENABLE
	.comm	_GEN7_L3LOG_SIZE,4,2            ; @GEN7_L3LOG_SIZE
	.comm	_GEN7_L3LOG_BASE,8,3            ; @GEN7_L3LOG_BASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"0x%x was already programmed to %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Clearing remapped register\n"

.subsections_via_symbols
