	.file	"extr_gma_display.c_gma_crtc_restore.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No crtc state\n"
	.text
	.p2align 4
	.globl	gma_crtc_restore
	.type	gma_crtc_restore, @function
gma_crtc_restore:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12, QWORD PTR [rdi]
	mov	rbx, QWORD PTR 8[r12]
	call	to_gma_crtc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rbp, QWORD PTR 8[rax]
	mov	rax, rdx
	sal	rax, 4
	add	rax, rdx
	mov	rdx, QWORD PTR [rbx]
	lea	rbx, [rdx+rax*8]
	test	rbp, rbp
	je	.L11
	mov	esi, DWORD PTR 0[rbp]
	mov	eax, DWORD PTR DPLL_VCO_ENABLE[rip]
	test	esi, eax
	jne	.L12
.L3:
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, QWORD PTR 128[rbx]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 128[rbx]
	call	REG_READ@PLT
	mov	esi, DWORD PTR 8[rbp]
	mov	rdi, QWORD PTR 120[rbx]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 120[rbx]
	call	REG_READ@PLT
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, QWORD PTR 112[rbx]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 112[rbx]
	call	REG_READ@PLT
	mov	edi, 150
	call	udelay@PLT
	mov	rdi, QWORD PTR 104[rbx]
	mov	esi, DWORD PTR 12[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 96[rbx]
	mov	esi, DWORD PTR 16[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 88[rbx]
	mov	esi, DWORD PTR 20[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 80[rbx]
	mov	esi, DWORD PTR 24[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 72[rbx]
	mov	esi, DWORD PTR 28[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 64[rbx]
	mov	esi, DWORD PTR 32[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 56[rbx]
	mov	esi, DWORD PTR 36[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 48[rbx]
	mov	esi, DWORD PTR 40[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 40[rbx]
	mov	esi, DWORD PTR 44[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 32[rbx]
	mov	esi, DWORD PTR 48[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR 52[rbp]
	call	REG_WRITE@PLT
	mov	esi, DWORD PTR 56[rbp]
	mov	rdi, QWORD PTR 24[rbx]
	call	REG_WRITE@PLT
	mov	rdi, r12
	call	gma_wait_for_vblank@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR 60[rbp]
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, DWORD PTR 52[rbp]
	call	REG_WRITE@PLT
	mov	rdi, r12
	call	gma_wait_for_vblank@PLT
	mov	r12, QWORD PTR [rbx]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 64[rbp]
	lea	rdi, [r12+rbx]
	mov	esi, DWORD PTR [rax+rbx]
	add	rbx, 4
	call	REG_WRITE@PLT
	cmp	rbx, 1024
	jne	.L4
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	mov	rdi, QWORD PTR 112[rbx]
	not	eax
	and	esi, eax
	call	REG_WRITE@PLT
	mov	rdi, QWORD PTR 112[rbx]
	call	REG_READ@PLT
	mov	edi, 150
	call	udelay@PLT
	jmp	.L3
.L11:
	mov	edi, DWORD PTR [r12]
	pop	rbx
	.cfi_def_cfa_offset 24
	lea	rsi, .LC0[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	dev_err@PLT
	.cfi_endproc
.LFE0:
	.size	gma_crtc_restore, .-gma_crtc_restore
	.comm	DPLL_VCO_ENABLE,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_gma_display.c_gma_crtc_restore.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"No crtc state\012\000"
	.text
	.align	2
	.global	gma_crtc_restore
	.syntax unified
	.arm
	.fpu softvfp
	.type	gma_crtc_restore, %function
gma_crtc_restore:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0]
	ldr	r4, [r8, #4]
	bl	to_gma_crtc
	ldr	r9, [r4]
	ldm	r0, {r3, r5}
	add	r3, r3, r3, lsl #4
	cmp	r5, #0
	add	r6, r9, r3, lsl #2
	beq	.L12
	ldr	r2, .L14
	lsl	r7, r3, #2
	ldr	r1, [r2]
	ldr	r3, [r5]
	tst	r3, r1
	bne	.L13
.L3:
	mov	r4, #0
	ldr	r1, [r5, #4]
	ldr	r0, [r6, #64]
	bl	REG_WRITE
	ldr	r0, [r6, #64]
	bl	REG_READ
	ldr	r1, [r5, #8]
	ldr	r0, [r6, #60]
	bl	REG_WRITE
	ldr	r0, [r6, #60]
	bl	REG_READ
	ldr	r1, [r5]
	ldr	r0, [r6, #56]
	bl	REG_WRITE
	ldr	r0, [r6, #56]
	bl	REG_READ
	mov	r0, #150
	bl	udelay
	ldr	r1, [r5, #12]
	ldr	r0, [r6, #52]
	bl	REG_WRITE
	ldr	r1, [r5, #16]
	ldr	r0, [r6, #48]
	bl	REG_WRITE
	ldr	r1, [r5, #20]
	ldr	r0, [r6, #44]
	bl	REG_WRITE
	ldr	r1, [r5, #24]
	ldr	r0, [r6, #40]
	bl	REG_WRITE
	ldr	r1, [r5, #28]
	ldr	r0, [r6, #36]
	bl	REG_WRITE
	ldr	r1, [r5, #32]
	ldr	r0, [r6, #32]
	bl	REG_WRITE
	ldr	r1, [r5, #36]
	ldr	r0, [r6, #28]
	bl	REG_WRITE
	ldr	r1, [r5, #40]
	ldr	r0, [r6, #24]
	bl	REG_WRITE
	ldr	r1, [r5, #44]
	ldr	r0, [r6, #20]
	bl	REG_WRITE
	ldr	r1, [r5, #48]
	ldr	r0, [r6, #16]
	bl	REG_WRITE
	ldr	r1, [r5, #52]
	ldr	r0, [r6, #4]
	bl	REG_WRITE
	ldr	r1, [r5, #56]
	ldr	r0, [r6, #12]
	bl	REG_WRITE
	mov	r0, r8
	bl	gma_wait_for_vblank
	ldr	r1, [r5, #60]
	ldr	r0, [r6, #8]
	bl	REG_WRITE
	ldr	r0, [r6, #4]
	ldr	r1, [r5, #52]
	bl	REG_WRITE
	mov	r0, r8
	bl	gma_wait_for_vblank
	ldr	r6, [r9, r7]
.L4:
	ldr	r3, [r5, #64]
	add	r0, r6, r4
	ldr	r1, [r3, r4]
	add	r4, r4, #4
	bl	REG_WRITE
	cmp	r4, #1024
	bne	.L4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	bic	r1, r3, r1
	ldr	r0, [r6, #56]
	bl	REG_WRITE
	ldr	r0, [r6, #56]
	bl	REG_READ
	mov	r0, #150
	bl	udelay
	b	.L3
.L12:
	ldr	r0, [r8]
	ldr	r1, .L14+4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	dev_err
.L15:
	.align	2
.L14:
	.word	DPLL_VCO_ENABLE
	.word	.LC0
	.size	gma_crtc_restore, .-gma_crtc_restore
	.comm	DPLL_VCO_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
