	.file	"extr_crtc.c_nv_crtc_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nv_crtc_prepare, @function
nv_crtc_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r12, QWORD PTR 8[rdi]
	mov	rdi, r12
	call	nouveau_drm@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	nouveau_crtc@PLT
	mov	rdi, r12
	mov	r14, QWORD PTR 0[rbp]
	mov	rbx, rax
	call	nv_two_heads@PLT
	test	rax, rax
	jne	.L9
.L2:
	mov	rdi, rbp
	call	drm_crtc_vblank_off@PLT
	mov	esi, DWORD PTR DRM_MODE_DPMS_OFF[rip]
	mov	rdi, rbp
	call	[QWORD PTR [r14]]
	mov	esi, DWORD PTR [rbx]
	mov	edx, 1
	mov	rdi, r12
	call	NVBlankScreen@PLT
	mov	ecx, DWORD PTR NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA[rip]
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r12
	mov	edx, DWORD PTR NV_PCRTC_CONFIG[rip]
	call	NVWriteCRTC@PLT
	mov	rax, QWORD PTR NV_DEVICE_INFO_V0_CURIE[rip]
	cmp	QWORD PTR 0[r13], rax
	je	.L10
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r12
	call	NVSetOwner@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, DWORD PTR [rbx]
	mov	edx, DWORD PTR NV_PRAMDAC_900[rip]
	mov	rdi, r12
	call	NVReadRAMDAC@PLT
	mov	esi, DWORD PTR [rbx]
	mov	edx, DWORD PTR NV_PRAMDAC_900[rip]
	mov	rdi, r12
	and	eax, -65537
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	ecx, eax
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	NVWriteRAMDAC@PLT
	.cfi_endproc
.LFE0:
	.size	nv_crtc_prepare, .-nv_crtc_prepare
	.comm	NV_PRAMDAC_900,4,4
	.comm	NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA,4,4
	.comm	NV_PCRTC_CONFIG,4,4
	.comm	NV_DEVICE_INFO_V0_CURIE,8,8
	.comm	DRM_MODE_DPMS_OFF,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_crtc.c_nv_crtc_prepare.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv_crtc_prepare, %function
nv_crtc_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0, #4]
	mov	r4, r0
	mov	r0, r5
	bl	nouveau_drm
	mov	r7, r0
	mov	r0, r4
	bl	nouveau_crtc
	mov	r6, r0
	mov	r0, r5
	ldr	r8, [r4]
	bl	nv_two_heads
	cmp	r0, #0
	bne	.L9
.L2:
	mov	r0, r4
	bl	drm_crtc_vblank_off
	ldr	r2, .L10
	ldr	r3, [r8]
	ldr	r1, [r2]
	mov	r0, r4
	blx	r3
	mov	r2, #1
	ldr	r1, [r6]
	mov	r0, r5
	bl	NVBlankScreen
	ldr	r3, .L10+4
	ldr	r2, .L10+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r5
	ldr	r1, [r6]
	bl	NVWriteCRTC
	ldr	r3, .L10+12
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, r3
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r4, .L10+16
	ldr	r1, [r6]
	ldr	r2, [r4]
	mov	r0, r5
	bl	NVReadRAMDAC
	ldr	r2, [r4]
	ldr	r1, [r6]
	bic	r3, r0, #65536
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	NVWriteRAMDAC
.L9:
	mov	r0, r5
	ldr	r1, [r6]
	bl	NVSetOwner
	b	.L2
.L11:
	.align	2
.L10:
	.word	DRM_MODE_DPMS_OFF
	.word	NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA
	.word	NV_PCRTC_CONFIG
	.word	NV_DEVICE_INFO_V0_CURIE
	.word	NV_PRAMDAC_900
	.size	nv_crtc_prepare, .-nv_crtc_prepare
	.comm	NV_PRAMDAC_900,4,4
	.comm	NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA,4,4
	.comm	NV_PCRTC_CONFIG,4,4
	.comm	NV_DEVICE_INFO_V0_CURIE,4,4
	.comm	DRM_MODE_DPMS_OFF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
