	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i9xx_load_luts_internal
_i9xx_load_luts_internal:               ## @i9xx_load_luts_internal
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_to_i915
	movl	(%rbx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_HAS_GMCH
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_INTEL_OUTPUT_DSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_intel_crtc_has_type
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_assert_dsi_pll_enabled
LBB0_4:
	testq	%r12, %r12
	je	LBB0_10
LBB0_5:
	movq	(%r12), %r15
	addq	$8, %r15
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	callq	_LGC_PALETTE
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_I915_WRITE
	incq	%r13
	addq	$12, %r15
	cmpq	$256, %r13                      ## imm = 0x100
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	$8, %esi
	callq	_drm_color_lut_extract
	movl	%eax, %ebx
	shll	$16, %ebx
	movl	-4(%r15), %edi
	movl	$8, %esi
	callq	_drm_color_lut_extract
	movl	%eax, %r14d
	shll	$8, %r14d
	orl	%ebx, %r14d
	movl	-8(%r15), %edi
	movl	$8, %esi
	callq	_drm_color_lut_extract
	movl	%eax, %r12d
	orl	%r14d, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_HAS_GMCH
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	callq	_PALETTE
	jmp	LBB0_9
LBB0_3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_assert_pll_enabled
	testq	%r12, %r12
	jne	LBB0_5
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_DSI,4,2           ## @INTEL_OUTPUT_DSI
	.no_dead_strip	_i9xx_load_luts_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i9xx_load_luts_internal
_i9xx_load_luts_internal:               ; @i9xx_load_luts_internal
	.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	x22, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_intel_crtc
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x19, x0
	ldr	w20, [x20]
	bl	_HAS_GMCH
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _INTEL_OUTPUT_DSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_DSI@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_crtc_has_type
	cbz	x0, LBB0_9
; %bb.2:
	mov	x0, x19
	bl	_assert_dsi_pll_enabled
LBB0_3:
	cbz	x22, LBB0_10
LBB0_4:
	mov	x21, #0
	ldr	x8, [x22]
	add	x25, x8, #8
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_LGC_PALETTE
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	lsl	w8, w23, #8
	orr	w8, w8, w22, lsl #16
	orr	w1, w8, w24
	bl	_I915_WRITE
	add	x21, x21, #1
	add	x25, x25, #12
	cmp	x21, #256
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	mov	w1, #8
	bl	_drm_color_lut_extract
	mov	x22, x0
	ldur	w0, [x25, #-4]
	mov	w1, #8
	bl	_drm_color_lut_extract
	mov	x23, x0
	ldur	w0, [x25, #-8]
	mov	w1, #8
	bl	_drm_color_lut_extract
	mov	x24, x0
	mov	x0, x19
	bl	_HAS_GMCH
	cbz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_PALETTE
	b	LBB0_6
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_assert_pll_enabled
	cbnz	x22, LBB0_4
LBB0_10:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_DSI,4,2           ; @INTEL_OUTPUT_DSI
	.no_dead_strip	_i9xx_load_luts_internal
.subsections_via_symbols
