	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_save_palette
_i915_save_palette:                     ## @i915_save_palette
	.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, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PIPE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	__PALETTE_A@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	__PALETTE_B@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	callq	_i915_pipe_enabled
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_PIPE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r14d, %eax
	jne	LBB0_4
## %bb.5:
	movq	__LGC_PALETTE_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_2:
	cmpl	%r14d, %ebx
	cmoveq	%r13, %r15
	movq	_PIPE_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movq	__LGC_PALETTE_B@GOTPCREL(%rip), %rcx
LBB0_6:
	movq	(%rcx), %r15
LBB0_7:
	xorl	%ecx, %ecx
	cmpl	%r14d, %eax
	sete	%cl
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%rbx), %rdi
	callq	_I915_READ
	movl	%eax, (%r14,%rbx)
	addq	$4, %rbx
	cmpq	$1024, %rbx                     ## imm = 0x400
	jne	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPE_A,4,2                     ## @PIPE_A
	.comm	__PALETTE_A,8,3                 ## @_PALETTE_A
	.comm	__PALETTE_B,8,3                 ## @_PALETTE_B
	.comm	__LGC_PALETTE_A,8,3             ## @_LGC_PALETTE_A
	.comm	__LGC_PALETTE_B,8,3             ## @_LGC_PALETTE_B
	.no_dead_strip	_i915_save_palette
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_save_palette
_i915_save_palette:                     ; @i915_save_palette
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _PIPE_A@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PIPE_A@GOTPAGEOFF]
	ldr	w23, [x22]
Lloh2:
	adrp	x8, __PALETTE_A@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PALETTE_A@GOTPAGEOFF]
Lloh4:
	ldr	x24, [x8]
Lloh5:
	adrp	x8, __PALETTE_B@GOTPAGE
Lloh6:
	ldr	x8, [x8, __PALETTE_B@GOTPAGEOFF]
Lloh7:
	ldr	x25, [x8]
	bl	_i915_pipe_enabled
	cbz	w0, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_HAS_PCH_SPLIT
	cbz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x9, __LGC_PALETTE_A@GOTPAGE
Lloh9:
	ldr	x9, [x9, __LGC_PALETTE_A@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh10:
	adrp	x10, __LGC_PALETTE_B@GOTPAGE
Lloh11:
	ldr	x10, [x10, __LGC_PALETTE_B@GOTPAGEOFF]
	cmp	w8, w19
	csel	x9, x9, x10, eq
	ldr	x20, [x9]
	b	LBB0_4
LBB0_3:
	cmp	w23, w19
	csel	x20, x24, x25, eq
	ldr	w8, [x22]
LBB0_4:
	mov	x22, #0
	cmp	w8, w19
	cset	w8, eq
	ldr	x19, [x21, w8, uxtw #3]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, x22
	bl	_I915_READ
	str	w0, [x19, x22]
	add	x22, x22, #4
	cmp	x22, #1024
	b.ne	LBB0_5
LBB0_6:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPE_A,4,2                     ; @PIPE_A
	.comm	__PALETTE_A,8,3                 ; @_PALETTE_A
	.comm	__PALETTE_B,8,3                 ; @_PALETTE_B
	.comm	__LGC_PALETTE_A,8,3             ; @_LGC_PALETTE_A
	.comm	__LGC_PALETTE_B,8,3             ; @_LGC_PALETTE_B
	.no_dead_strip	_i915_save_palette
.subsections_via_symbols
