	.file	"extr_tvnv04.c_nv04_tv_bind.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nv04_tv_bind, @function
nv04_tv_bind:
.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	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movsx	rbx, esi
	mov	r13, rbx
	sal	rbx, 4
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	nv04_display@PLT
	mov	rdx, QWORD PTR NV_CIO_CRE_49[rip]
	add	rbx, QWORD PTR [rax]
	mov	QWORD PTR 8[rbx], 0
	mov	rax, QWORD PTR [rbx]
	test	ebp, ebp
	je	.L2
	or	DWORD PTR [rax+rdx*4], 16
.L3:
	mov	rdx, QWORD PTR NV_CIO_CRE_LCD__INDEX[rip]
	mov	esi, r13d
	mov	rdi, r12
	mov	ecx, DWORD PTR [rax+rdx*4]
	call	NVWriteVgaCrtc@PLT
	mov	rax, QWORD PTR [rbx]
	mov	esi, r13d
	mov	rdi, r12
	mov	rdx, QWORD PTR NV_CIO_CRE_49[rip]
	mov	ecx, DWORD PTR [rax+rdx*4]
	call	NVWriteVgaCrtc@PLT
	mov	rcx, QWORD PTR 8[rbx]
	mov	esi, r13d
	mov	rdi, r12
	mov	edx, DWORD PTR NV_PRAMDAC_TV_SETUP[rip]
	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
	jmp	NVWriteRAMDAC@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	and	DWORD PTR [rax+rdx*4], -17
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	nv04_tv_bind, .-nv04_tv_bind
	.comm	NV_PRAMDAC_TV_SETUP,4,4
	.comm	NV_CIO_CRE_LCD__INDEX,8,8
	.comm	NV_CIO_CRE_49,8,8
	.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_tvnv04.c_nv04_tv_bind.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv04_tv_bind, %function
nv04_tv_bind:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r5, r0
	mov	r7, r2
	bl	nv04_display
	mov	r3, #0
	ldr	r6, [r0]
	ldr	r8, .L6
	cmp	r7, r3
	add	r7, r6, r4, lsl #3
	ldr	r1, [r8]
	str	r3, [r7, #4]
	ldr	r3, [r6, r4, lsl #3]
	mov	r0, r5
	ldr	r2, [r3, r1, lsl #2]
	orrne	r2, r2, #16
	biceq	r2, r2, #16
	str	r2, [r3, r1, lsl #2]
	ldr	r2, .L6+4
	mov	r1, r4
	ldr	r2, [r2]
	ldr	r3, [r3, r2, lsl #2]
	bl	NVWriteVgaCrtc
	ldr	r2, [r8]
	ldr	r3, [r6, r4, lsl #3]
	mov	r1, r4
	ldr	r3, [r3, r2, lsl #2]
	mov	r0, r5
	bl	NVWriteVgaCrtc
	ldr	r2, .L6+8
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [r7, #4]
	ldr	r2, [r2]
	pop	{r4, r5, r6, r7, r8, lr}
	b	NVWriteRAMDAC
.L7:
	.align	2
.L6:
	.word	NV_CIO_CRE_49
	.word	NV_CIO_CRE_LCD__INDEX
	.word	NV_PRAMDAC_TV_SETUP
	.size	nv04_tv_bind, .-nv04_tv_bind
	.comm	NV_PRAMDAC_TV_SETUP,4,4
	.comm	NV_CIO_CRE_LCD__INDEX,4,4
	.comm	NV_CIO_CRE_49,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
