	.file	"extr_i915_ums.c_i915_save_palette.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	i915_save_palette, @function
i915_save_palette:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	DWORD PTR PIPE_A[rip], esi
	mov	r13, QWORD PTR [rdi]
	mov	rbx, QWORD PTR _PALETTE_B[rip]
	jne	.L3
	mov	rbx, QWORD PTR _PALETTE_A[rip]
.L3:
	mov	esi, r12d
	mov	rdi, rbp
	call	i915_pipe_enabled@PLT
	test	eax, eax
	jne	.L15
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	mov	rdi, rbp
	call	HAS_PCH_SPLIT@PLT
	test	rax, rax
	je	.L5
	cmp	DWORD PTR PIPE_A[rip], r12d
	je	.L16
	mov	rbx, QWORD PTR _LGC_PALETTE_B[rip]
	mov	rbp, QWORD PTR 0[r13]
	jmp	.L7
.L5:
	mov	rbp, QWORD PTR 8[r13]
	cmp	DWORD PTR PIPE_A[rip], r12d
	cmovne	rbp, QWORD PTR 0[r13]
.L7:
	lea	r12, 1024[rbx]
	sub	rbp, rbx
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, rbx
	call	I915_READ@PLT
	mov	DWORD PTR 0[rbp+rbx], eax
	add	rbx, 4
	cmp	rbx, r12
	jne	.L8
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	mov	rbx, QWORD PTR _LGC_PALETTE_A[rip]
	mov	rbp, QWORD PTR 8[r13]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	i915_save_palette, .-i915_save_palette
	.comm	_PALETTE_B,8,8
	.comm	_PALETTE_A,8,8
	.comm	_LGC_PALETTE_B,8,8
	.comm	_LGC_PALETTE_A,8,8
	.comm	PIPE_A,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_i915_ums.c_i915_save_palette.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i915_save_palette, %function
i915_save_palette:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L15
	mov	r5, r1
	ldr	r3, [r7]
	mov	r6, r0
	cmp	r3, r1
	ldreq	r3, .L15+4
	ldrne	r3, .L15+8
	ldr	r8, [r0]
	ldr	r4, [r3]
	bl	i915_pipe_enabled
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r0, r6
	bl	HAS_PCH_SPLIT
	cmp	r0, #0
	beq	.L5
	ldr	r3, [r7]
	cmp	r3, r5
	ldreq	r3, .L15+12
	ldrne	r3, .L15+16
	ldreq	r6, [r8, #4]
	ldrne	r6, [r8]
	ldr	r4, [r3]
.L7:
	add	r4, r4, #4
	sub	r5, r4, r6
	sub	r4, r6, #4
	add	r6, r6, #1020
.L8:
	add	r0, r5, r4
	bl	I915_READ
	str	r0, [r4, #4]!
	cmp	r4, r6
	bne	.L8
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r2, [r7]
	ldm	r8, {r3, r6}
	cmp	r2, r5
	movne	r6, r3
	b	.L7
.L16:
	.align	2
.L15:
	.word	PIPE_A
	.word	_PALETTE_A
	.word	_PALETTE_B
	.word	_LGC_PALETTE_A
	.word	_LGC_PALETTE_B
	.size	i915_save_palette, .-i915_save_palette
	.comm	_PALETTE_B,4,4
	.comm	_PALETTE_A,4,4
	.comm	_LGC_PALETTE_B,4,4
	.comm	_LGC_PALETTE_A,4,4
	.comm	PIPE_A,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
