	.file	"extr_init301.c_SiS_GetCRT2Data301.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	SiS_GetCRT2Data301, @function
SiS_GetCRT2Data301:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movzx	eax, dx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rdi
	xor	edi, edi
	cmp	si, 19
	ja	.L2
	mov	rcx, QWORD PTR 368[rbp]
	lea	rax, [rcx+rax*4]
	movzx	r12d, WORD PTR [rax]
	movzx	r13d, WORD PTR 2[rax]
.L3:
	mov	QWORD PTR 32[rbp], 0
	movzx	r15d, dx
	movzx	r14d, si
	mov	rdi, rbp
	movabs	rax, 214748364800
	mov	DWORD PTR 48[rbp], 0
	mov	edx, r15d
	mov	esi, r14d
	mov	QWORD PTR 24[rbp], rax
	mov	QWORD PTR 40[rbp], 0
	call	SiS_GetCRT2ResInfo@PLT
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR SetCRT2ToRAMDAC[rip], eax
	je	.L5
	cmp	QWORD PTR 240[rbp], 0
	je	.L6
	movabs	rax, 4294967297
	mov	QWORD PTR 52[rbp], rax
.L149:
	movzx	eax, WORD PTR 62[rbp]
	test	WORD PTR HalfDCLK[rip], r12w
	mov	WORD PTR 60[rbp], ax
	movzx	eax, WORD PTR 66[rbp]
	mov	WORD PTR 64[rbp], ax
	movzx	eax, WORD PTR 68[rbp]
	lea	edx, [rax+rax]
	cmovne	eax, edx
	mov	WORD PTR 72[rbp], ax
	mov	WORD PTR 70[rbp], ax
	movzx	eax, BYTE PTR 76[rbp]
	mov	BYTE PTR 75[rbp], al
	mov	BYTE PTR 74[rbp], al
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L154
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	QWORD PTR 240[rbp], 0
	je	.L4
	movzx	r12d, WORD PTR 0[rbp]
	xor	r13d, r13d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	test	DWORD PTR SetCRT2ToTV[rip], eax
	jne	.L155
	test	DWORD PTR SetCRT2ToLCD[rip], eax
	je	.L1
	movabs	rax, 4294967297
	cmp	QWORD PTR 240[rbp], 0
	mov	QWORD PTR 52[rbp], rax
	jne	.L149
	mov	edx, DWORD PTR 84[rbp]
	mov	eax, edx
	and	eax, DWORD PTR DontExpandLCD[rip]
	je	.L44
	test	DWORD PTR LCDPass11[rip], edx
	jne	.L44
	movzx	edx, BYTE PTR 90[rbp]
	movzx	ecx, WORD PTR 88[rbp]
	movzx	esi, WORD PTR 92[rbp]
	mov	BYTE PTR 74[rbp], dl
	mov	BYTE PTR 75[rbp], dl
	mov	edx, DWORD PTR 96[rbp]
	mov	WORD PTR 70[rbp], cx
	mov	WORD PTR 72[rbp], cx
	movzx	ecx, WORD PTR 94[rbp]
	cmp	edx, 137
	je	.L45
	jg	.L46
	cmp	edx, 129
	je	.L47
	cmp	edx, 131
	movzx	edx, WORD PTR 66[rbp]
	jne	.L49
	cmp	dx, 350
	je	.L49
	cmp	dx, 400
	je	.L49
.L81:
	cmp	dx, 1024
	mov	edx, 960
	cmove	ecx, edx
	.p2align 4,,10
	.p2align 3
.L75:
	test	eax, eax
	jne	.L148
.L77:
	mov	WORD PTR 60[rbp], si
	mov	WORD PTR 64[rbp], cx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rcx, [rax+rax*2]
	mov	rax, QWORD PTR 360[rbp]
	lea	rax, [rax+rcx*2]
	movzx	r12d, WORD PTR [rax]
	movzx	r13d, WORD PTR 2[rax]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	movzx	ecx, bx
	mov	edx, r15d
	mov	esi, r14d
	mov	rdi, rbp
	call	SiS_GetRAMDAC2DATA@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L155:
	movzx	ecx, bx
	lea	r9, 6[rsp]
	lea	r8, 4[rsp]
	mov	edx, r15d
	mov	esi, r14d
	mov	rdi, rbp
	call	SiS_GetCRT2Ptr@PLT
	cmp	WORD PTR 4[rsp], 14
	ja	.L10
	movzx	eax, WORD PTR 4[rsp]
	lea	rdx, .L12[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L12:
	.long	.L10-.L12
	.long	.L10-.L12
	.long	.L23-.L12
	.long	.L22-.L12
	.long	.L21-.L12
	.long	.L20-.L12
	.long	.L19-.L12
	.long	.L18-.L12
	.long	.L10-.L12
	.long	.L17-.L12
	.long	.L16-.L12
	.long	.L15-.L12
	.long	.L14-.L12
	.long	.L13-.L12
	.long	.L11-.L12
	.text
	.p2align 4,,10
	.p2align 3
.L44:
	movzx	ecx, bx
	lea	r9, 6[rsp]
	lea	r8, 4[rsp]
	mov	edx, r15d
	mov	esi, r14d
	mov	rdi, rbp
	call	SiS_GetCRT2Ptr@PLT
	movzx	eax, WORD PTR 4[rsp]
	sub	eax, 100
	cmp	ax, 70
	ja	.L51
	lea	rdx, .L53[rip]
	movzx	eax, ax
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L53:
	.long	.L69-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L63-.L53
	.long	.L68-.L53
	.long	.L67-.L53
	.long	.L60-.L53
	.long	.L59-.L53
	.long	.L58-.L53
	.long	.L57-.L53
	.long	.L66-.L53
	.long	.L55-.L53
	.long	.L65-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L51-.L53
	.long	.L63-.L53
	.long	.L62-.L53
	.long	.L61-.L53
	.long	.L60-.L53
	.long	.L59-.L53
	.long	.L58-.L53
	.long	.L57-.L53
	.long	.L56-.L53
	.long	.L55-.L53
	.long	.L54-.L53
	.long	.L52-.L53
	.text
	.p2align 4,,10
	.p2align 3
.L51:
	mov	rdx, QWORD PTR 104[rbp]
	.p2align 4,,10
	.p2align 3
.L70:
	movzx	eax, WORD PTR 6[rsp]
	movzx	esi, WORD PTR 92[rbp]
	movzx	ecx, WORD PTR 94[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	DWORD PTR 52[rbp], edx
	mov	edx, DWORD PTR 4[rax]
	mov	DWORD PTR 56[rbp], edx
	movzx	edx, WORD PTR 8[rax]
	mov	WORD PTR 70[rbp], dx
	movzx	edx, BYTE PTR 10[rax]
	mov	BYTE PTR 74[rbp], dl
	movzx	edx, WORD PTR 12[rax]
	mov	WORD PTR 72[rbp], dx
	mov	edx, DWORD PTR 96[rbp]
	movzx	eax, BYTE PTR 14[rax]
	mov	BYTE PTR 75[rbp], al
	mov	eax, DWORD PTR 84[rbp]
	and	eax, DWORD PTR DontExpandLCD[rip]
	cmp	edx, 137
	je	.L71
	jg	.L72
	cmp	edx, 129
	je	.L73
	cmp	edx, 131
	jne	.L75
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 350
	je	.L90
	cmp	dx, 400
	jne	.L81
.L93:
	mov	ecx, 800
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rcx, QWORD PTR 344[rbp]
	.p2align 4,,10
	.p2align 3
.L24:
	movzx	edx, WORD PTR 6[rsp]
	lea	rax, [rdx+rdx*2]
	sal	rax, 4
	add	rax, rcx
	mov	edx, DWORD PTR [rax]
	mov	DWORD PTR 52[rbp], edx
	mov	edx, DWORD PTR 4[rax]
	mov	DWORD PTR 56[rbp], edx
	movzx	edx, WORD PTR 8[rax]
	mov	WORD PTR 70[rbp], dx
	movzx	edx, BYTE PTR 10[rax]
	mov	BYTE PTR 74[rbp], dl
	movzx	edx, WORD PTR 12[rax]
	mov	ecx, DWORD PTR 16[rax]
	mov	WORD PTR 60[rbp], dx
	movzx	edx, WORD PTR 14[rax]
	mov	WORD PTR 64[rbp], dx
	mov	edx, ecx
	and	edx, 4095
	mov	DWORD PTR 48[rbp], edx
	and	r12w, WORD PTR HalfDCLK[rip]
	je	.L25
	mov	esi, DWORD PTR 20[rax]
	mov	DWORD PTR 28[rbp], esi
	test	edx, edx
	je	.L26
	add	edx, 3
	mov	esi, ecx
	sar	edx
	sar	esi, 12
	sub	edx, 3
	and	esi, 7
	lea	edi, [rdx+rsi]
	sub	edx, esi
	and	ch, -128
	cmove	edx, edi
	mov	DWORD PTR 48[rbp], edx
.L26:
	mov	edx, DWORD PTR 28[rax]
	sal	edx, 7
	mov	DWORD PTR 24[rbp], edx
	mov	edx, DWORD PTR 4[rbp]
	test	DWORD PTR SetCRT2ToHiVision[rip], edx
	je	.L28
	cmp	WORD PTR SIS_RI_960x600[rip], r13w
	je	.L29
	cmp	WORD PTR SIS_RI_1024x768[rip], r13w
	je	.L29
	cmp	WORD PTR SIS_RI_1280x1024[rip], r13w
	je	.L29
	cmp	WORD PTR SIS_RI_1280x720[rip], r13w
	je	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	cmp	WORD PTR 66[rbp], 350
	jne	.L31
	mov	eax, DWORD PTR TVSetTVSimuMode[rip]
	or	DWORD PTR 80[rbp], eax
.L31:
	movzx	eax, WORD PTR ExtHiTVHT[rip]
	mov	WORD PTR 72[rbp], ax
	movzx	eax, BYTE PTR ExtHiTVVT[rip]
	mov	BYTE PTR 75[rbp], al
	test	DWORD PTR SetInSlaveMode[rip], edx
	je	.L1
	mov	eax, DWORD PTR 80[rbp]
	test	DWORD PTR TVSetTVSimuMode[rip], eax
	je	.L1
	movzx	eax, WORD PTR StHiTVHT[rip]
	mov	WORD PTR 72[rbp], ax
	movzx	eax, BYTE PTR StHiTVVT[rip]
	mov	BYTE PTR 75[rbp], al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rcx, QWORD PTR 312[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rcx, QWORD PTR 320[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rcx, QWORD PTR 328[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rcx, QWORD PTR 336[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rcx, QWORD PTR 280[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rcx, QWORD PTR 288[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rcx, QWORD PTR 296[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rcx, QWORD PTR 304[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rcx, QWORD PTR 264[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rcx, QWORD PTR 272[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rcx, QWORD PTR 256[rbp]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rcx, QWORD PTR 248[rbp]
	jmp	.L24
.L55:
	mov	rdx, QWORD PTR 224[rbp]
	jmp	.L70
.L57:
	mov	rdx, QWORD PTR 200[rbp]
	jmp	.L70
.L58:
	mov	rdx, QWORD PTR 192[rbp]
	jmp	.L70
.L59:
	mov	rdx, QWORD PTR 184[rbp]
	jmp	.L70
.L60:
	mov	rdx, QWORD PTR 176[rbp]
	jmp	.L70
.L63:
	mov	rdx, QWORD PTR 128[rbp]
	jmp	.L70
.L69:
	mov	rdx, QWORD PTR 120[rbp]
	jmp	.L70
.L67:
	mov	rdx, QWORD PTR 160[rbp]
	jmp	.L70
.L68:
	mov	rdx, QWORD PTR 144[rbp]
	jmp	.L70
.L66:
	mov	rdx, QWORD PTR 216[rbp]
	jmp	.L70
.L52:
	mov	rdx, QWORD PTR 232[rbp]
	jmp	.L70
.L65:
	mov	rdx, QWORD PTR 168[rbp]
	jmp	.L70
.L54:
	mov	rdx, QWORD PTR 112[rbp]
	jmp	.L70
.L56:
	mov	rdx, QWORD PTR 208[rbp]
	jmp	.L70
.L61:
	mov	rdx, QWORD PTR 152[rbp]
	jmp	.L70
.L62:
	mov	rdx, QWORD PTR 136[rbp]
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L28:
	mov	ecx, DWORD PTR 80[rbp]
	test	DWORD PTR SetCRT2ToYPbPr525750[rip], edx
	je	.L34
	test	DWORD PTR TVSetYPbPr750p[rip], ecx
	je	.L35
	mov	eax, 1650
	mov	BYTE PTR 75[rbp], -18
	mov	WORD PTR 72[rbp], ax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edx, DWORD PTR 24[rax]
	mov	DWORD PTR 28[rbp], edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L29:
	mov	DWORD PTR 24[rbp], 64
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L72:
	cmp	edx, 138
	jne	.L75
.L50:
	mov	edx, DWORD PTR 8[rbp]
	test	DWORD PTR LCDVESATiming[rip], edx
	je	.L76
	mov	ebx, DWORD PTR SIS_315H[rip]
	cmp	DWORD PTR 100[rbp], ebx
	jge	.L75
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 350
	je	.L89
.L147:
	cmp	dx, 400
	mov	edx, 640
	cmove	ecx, edx
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L46:
	cmp	edx, 138
	je	.L50
.L148:
	movzx	edx, WORD PTR 66[rbp]
.L49:
	movzx	esi, WORD PTR 62[rbp]
	mov	ecx, edx
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L34:
	mov	edx, DWORD PTR 32[rax]
	mov	DWORD PTR 32[rbp], edx
	mov	edx, DWORD PTR 36[rax]
	mov	DWORD PTR 36[rbp], edx
	mov	edx, DWORD PTR 40[rax]
	mov	eax, DWORD PTR 44[rax]
	mov	DWORD PTR 40[rbp], edx
	mov	DWORD PTR 44[rbp], eax
	test	r12w, r12w
	je	.L39
	movabs	rax, 1047972020224
	mov	QWORD PTR 32[rbp], rax
	movabs	rax, 240518168592
	mov	QWORD PTR 40[rbp], rax
.L39:
	test	DWORD PTR TVSetPAL[rip], ecx
	jne	.L40
	mov	rax, QWORD PTR NTSCHT[rip]
	mov	WORD PTR 72[rbp], ax
.L152:
	test	DWORD PTR TVSetNTSC1024[rip], ecx
	je	.L41
.L150:
	mov	rax, QWORD PTR NTSC2HT[rip]
	mov	WORD PTR 72[rbp], ax
.L41:
	mov	rax, QWORD PTR NTSCVT[rip]
	mov	BYTE PTR 75[rbp], al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	mov	eax, DWORD PTR PALHT[rip]
	mov	WORD PTR 72[rbp], ax
	mov	eax, DWORD PTR PALVT[rip]
	mov	BYTE PTR 75[rbp], al
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rax, QWORD PTR NTSCHT[rip]
	test	DWORD PTR TVSetYPbPr525p[rip], ecx
	mov	WORD PTR 72[rbp], ax
	je	.L152
	test	DWORD PTR TVSet525p1024[rip], ecx
	je	.L41
	jmp	.L150
	.p2align 4,,10
	.p2align 3
.L47:
	mov	edx, DWORD PTR LCDVESATiming[rip]
	test	DWORD PTR 8[rbp], edx
	jne	.L148
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 350
	je	.L49
.L82:
	cmp	dx, 400
	mov	edx, 1000
	cmove	ecx, edx
	jmp	.L75
	.p2align 4,,10
	.p2align 3
.L71:
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 360
	je	.L92
	cmp	dx, 375
	je	.L93
.L83:
	cmp	dx, 405
	mov	edx, 864
	cmove	ecx, edx
	jmp	.L75
.L76:
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 357
	je	.L86
	cmp	dx, 420
	je	.L87
	cmp	dx, 525
	je	.L88
	cmp	dx, 600
	je	.L88
	cmp	dx, 350
	jne	.L147
.L89:
	mov	ecx, 560
	jmp	.L75
.L45:
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 360
	je	.L49
	cmp	dx, 375
	jne	.L83
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L73:
	mov	edx, DWORD PTR 8[rbp]
	test	DWORD PTR LCDVESATiming[rip], edx
	jne	.L75
	movzx	edx, WORD PTR 66[rbp]
	cmp	dx, 350
	jne	.L82
	mov	ecx, 875
	jmp	.L75
.L92:
	mov	ecx, 768
	jmp	.L75
.L86:
	mov	ecx, 527
	jmp	.L75
.L88:
	mov	ecx, 775
	jmp	.L75
.L87:
	mov	ecx, 620
	jmp	.L75
.L154:
	call	__stack_chk_fail@PLT
.L90:
	mov	ecx, 700
	jmp	.L75
	.cfi_endproc
.LFE0:
	.size	SiS_GetCRT2Data301, .-SiS_GetCRT2Data301
	.comm	X_INFO,4,4
	.comm	TVSetYPbPr750p,4,4
	.comm	TVSetYPbPr525p,4,4
	.comm	TVSetTVSimuMode,4,4
	.comm	TVSetPAL,4,4
	.comm	TVSetNTSC1024,4,4
	.comm	TVSet525p1024,4,4
	.comm	StHiTVVT,1,1
	.comm	StHiTVHT,2,2
	.comm	SiS310_ExtCompaq1280x1024Data,8,8
	.comm	SetInSlaveMode,4,4
	.comm	SetCRT2ToYPbPr525750,4,4
	.comm	SetCRT2ToTV,4,4
	.comm	SetCRT2ToRAMDAC,4,4
	.comm	SetCRT2ToLCD,4,4
	.comm	SetCRT2ToHiVision,4,4
	.comm	SIS_RI_960x600,2,2
	.comm	SIS_RI_1280x720,2,2
	.comm	SIS_RI_1280x1024,2,2
	.comm	SIS_RI_1024x768,2,2
	.comm	SIS_315H,4,4
	.comm	PALVT,4,4
	.comm	PALHT,4,4
	.comm	NTSCVT,8,8
	.comm	NTSCHT,8,8
	.comm	NTSC2HT,8,8
	.comm	LCDVESATiming,4,4
	.comm	LCDPass11,4,4
	.comm	HalfDCLK,2,2
	.comm	ExtHiTVVT,1,1
	.comm	ExtHiTVHT,2,2
	.comm	DontExpandLCD,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_init301.c_SiS_GetCRT2Data301.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SiS_GetCRT2Data301, %function
SiS_GetCRT2Data301:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, r3
	ldr	r3, .L127
	sub	sp, sp, #20
	cmp	r1, #19
	mov	r6, r1
	mov	r4, r0
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bhi	.L2
	ldr	r2, [r0, #228]
	lsl	r3, r5, #2
	add	r1, r2, r5, lsl #2
	ldrh	r9, [r1, #2]
	ldrh	r8, [r2, r3]
.L3:
	mov	r0, #0
	mov	r3, #50
	mov	r2, r5
	str	r0, [r4, #16]
	str	r0, [r4, #24]
	str	r0, [r4, #28]
	str	r0, [r4, #32]
	str	r0, [r4, #36]
	str	r0, [r4, #40]
	str	r3, [r4, #20]
	mov	r1, r6
	mov	r0, r4
	bl	SiS_GetCRT2ResInfo
	ldr	r2, .L127+4
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L5
	ldr	r3, [r4, #164]
	cmp	r3, #0
	beq	.L6
	mov	r3, #1
	ldr	r2, .L127+8
	ldrh	r1, [r4, #54]
	ldrh	r0, [r2]
	ldrh	r2, [r4, #58]
	tst	r8, r0
	str	r3, [r4, #44]
	str	r3, [r4, #48]
	strh	r1, [r4, #52]	@ movhi
	ldrh	r3, [r4, #60]
	strh	r2, [r4, #56]	@ movhi
	beq	.L43
.L122:
	lsl	r3, r3, #17
	lsr	r3, r3, #16
.L43:
	ldrb	r2, [r4, #68]	@ zero_extendqisi2
	strh	r3, [r4, #64]	@ movhi
	strh	r3, [r4, #62]	@ movhi
	strb	r2, [r4, #67]
	strb	r2, [r4, #66]
.L1:
	ldr	r3, .L127
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L125
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, [r0, #164]
	cmp	r3, #0
	ldreq	r2, [r0, #224]
	addeq	r3, r5, r5, lsl #1
	addeq	r1, r2, r3, lsl #1
	lsleq	r3, r3, #1
	movne	r9, #0
	ldrhne	r8, [r0]
	ldrheq	r9, [r1, #2]
	ldrheq	r8, [r2, r3]
	b	.L3
.L5:
	ldr	r2, .L127+12
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L126
	ldr	r2, .L127+16
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L1
	mov	r3, #1
	ldr	r2, [r4, #164]
	str	r3, [r4, #44]
	cmp	r2, #0
	str	r3, [r4, #48]
	beq	.L42
	ldr	r3, .L127+8
	ldrh	r2, [r4, #54]
	ldrh	r1, [r3]
	ldrh	r3, [r4, #58]
	tst	r8, r1
	strh	r3, [r4, #56]	@ movhi
	strh	r2, [r4, #52]	@ movhi
	ldrh	r3, [r4, #60]
	beq	.L43
	b	.L122
.L6:
	mov	r3, r7
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	bl	SiS_GetRAMDAC2DATA
	b	.L1
.L126:
	add	ip, sp, #10
	add	r0, sp, #8
	mov	r3, r7
	stm	sp, {r0, ip}
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	bl	SiS_GetCRT2Ptr
	ldrh	r3, [sp, #8]
	sub	r3, r3, #2
	cmp	r3, #12
	ldrls	pc, [pc, r3, asl #2]
	b	.L10
.L12:
	.word	.L23
	.word	.L22
	.word	.L21
	.word	.L20
	.word	.L19
	.word	.L18
	.word	.L10
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L13
	.word	.L11
.L42:
	ldr	r8, .L127+20
	ldr	r3, [r4, #76]
	ldr	r2, [r8]
	ands	r1, r3, r2
	beq	.L44
	ldr	r2, .L127+24
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L44
	ldr	r2, [r4, #88]
	ldrh	r0, [r4, #80]
	ldrb	r3, [r4, #82]	@ zero_extendqisi2
	sub	r2, r2, #129
	strh	r0, [r4, #62]	@ movhi
	strh	r0, [r4, #64]	@ movhi
	strb	r3, [r4, #66]
	strb	r3, [r4, #67]
	ldrh	r0, [r4, #84]
	ldrh	r3, [r4, #86]
	cmp	r2, #9
	ldrls	pc, [pc, r2, asl #2]
	b	.L45
.L47:
	.word	.L50
	.word	.L45
	.word	.L49
	.word	.L45
	.word	.L45
	.word	.L45
	.word	.L45
	.word	.L45
	.word	.L48
	.word	.L46
.L44:
	add	ip, sp, #10
	add	r0, sp, #8
	mov	r3, r7
	stm	sp, {r0, ip}
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	bl	SiS_GetCRT2Ptr
	ldrh	r3, [sp, #8]
	sub	r3, r3, #100
	cmp	r3, #70
	ldrls	pc, [pc, r3, asl #2]
	b	.L51
.L53:
	.word	.L69
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L63
	.word	.L68
	.word	.L67
	.word	.L60
	.word	.L59
	.word	.L58
	.word	.L57
	.word	.L66
	.word	.L55
	.word	.L65
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L63
	.word	.L62
	.word	.L61
	.word	.L60
	.word	.L59
	.word	.L58
	.word	.L57
	.word	.L56
	.word	.L55
	.word	.L54
	.word	.L52
.L51:
	ldr	r0, [r4, #96]
.L70:
	ldrh	r1, [sp, #10]
	ldr	r2, [r4, #88]
	add	r3, r0, r1, lsl #4
	ldr	r1, [r0, r1, lsl #4]
	ldr	r0, [r3, #4]
	str	r1, [r4, #44]
	ldrh	r1, [r3, #8]
	str	r0, [r4, #48]
	strh	r1, [r4, #62]	@ movhi
	ldrb	r0, [r3, #10]	@ zero_extendqisi2
	ldr	r1, [r8]
	strb	r0, [r4, #66]
	ldrh	ip, [r3, #12]
	ldr	r0, [r4, #76]
	strh	ip, [r4, #64]	@ movhi
	ldrb	r3, [r3, #14]	@ zero_extendqisi2
	sub	r2, r2, #129
	and	r1, r1, r0
	strb	r3, [r4, #67]
	ldrh	r0, [r4, #84]
	ldrh	r3, [r4, #86]
	cmp	r2, #9
	ldrls	pc, [pc, r2, asl #2]
	b	.L71
.L72:
	.word	.L50
	.word	.L71
	.word	.L49
	.word	.L71
	.word	.L71
	.word	.L71
	.word	.L71
	.word	.L71
	.word	.L48
	.word	.L46
.L46:
	ldr	r2, .L127+28
	ldr	ip, [r4, #8]
	ldr	r2, [r2]
	tst	ip, r2
	beq	.L73
	ldr	r2, .L127+32
	ldr	ip, [r4, #92]
	ldr	r2, [r2]
	cmp	ip, r2
	bge	.L71
	ldrh	r2, [r4, #58]
.L123:
	ldr	ip, .L127+36
	cmp	r2, ip
	moveq	r3, #560
	beq	.L71
	cmp	r2, #400
	moveq	r3, #640
.L71:
	cmp	r1, #0
	bne	.L45
.L74:
	strh	r0, [r4, #52]	@ movhi
	strh	r3, [r4, #56]	@ movhi
	b	.L1
.L18:
	ldr	r1, [r4, #196]
.L24:
	ldrh	r2, [sp, #10]
	ldr	r0, .L127+8
	add	r2, r2, r2, lsl #1
	add	r3, r1, r2, lsl #4
	ldr	ip, [r1, r2, lsl #4]
	ldr	r1, [r3, #4]
	ldrh	r2, [r3, #8]
	str	ip, [r4, #44]
	str	r1, [r4, #48]
	strh	r2, [r4, #62]	@ movhi
	ldrb	r2, [r3, #10]	@ zero_extendqisi2
	ldrh	r0, [r0]
	strb	r2, [r4, #66]
	ldr	r1, [r3, #16]
	ldrh	ip, [r3, #12]
	lsl	r2, r1, #20
	ands	r8, r8, r0
	ldrh	r0, [r3, #14]
	lsr	r2, r2, #20
	strh	ip, [r4, #52]	@ movhi
	str	r2, [r4, #40]
	strh	r0, [r4, #56]	@ movhi
	beq	.L25
	ldr	r0, [r3, #20]
	cmp	r2, #0
	str	r0, [r4, #20]
	beq	.L26
	add	r2, r2, #3
	tst	r1, #32768
	asr	r2, r2, #1
	lsr	r1, r1, #12
	sub	r2, r2, #3
	and	r1, r1, #7
	subne	r2, r2, r1
	addeq	r2, r2, r1
	str	r2, [r4, #40]
.L26:
	ldr	r1, .L127+40
	ldr	r2, [r4, #4]
	ldr	r0, [r1]
	ldr	r1, [r3, #28]
	tst	r2, r0
	lsl	r1, r1, #7
	str	r1, [r4, #16]
	beq	.L28
	ldr	r3, .L127+44
	ldrh	r3, [r3]
	cmp	r3, r9
	beq	.L29
	ldr	r3, .L127+48
	ldrh	r3, [r3]
	cmp	r3, r9
	beq	.L29
	ldr	r3, .L127+52
	ldrh	r3, [r3]
	cmp	r3, r9
	beq	.L29
	ldr	r3, .L127+56
	ldrh	r3, [r3]
	cmp	r3, r9
	beq	.L29
.L30:
	ldrh	r1, [r4, #58]
	ldr	r3, .L127+36
	ldr	r0, .L127+60
	cmp	r1, r3
	ldreq	r1, .L127+64
	ldreq	r3, [r4, #72]
	ldreq	r1, [r1]
	ldr	r0, [r0]
	orreq	r3, r3, r1
	streq	r3, [r4, #72]
	ldr	r1, .L127+68
	ldr	r3, .L127+72
	ldrh	r1, [r1]
	ldrb	r3, [r3]	@ zero_extendqisi2
	tst	r2, r0
	strh	r1, [r4, #64]	@ movhi
	strb	r3, [r4, #67]
	beq	.L1
	ldr	r3, .L127+64
	ldr	r2, [r4, #72]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L1
	ldr	r2, .L127+76
	ldr	r3, .L127+80
	ldrh	r2, [r2]
	ldrb	r3, [r3]	@ zero_extendqisi2
	strh	r2, [r4, #64]	@ movhi
	strb	r3, [r4, #67]
	b	.L1
.L19:
	ldr	r1, [r4, #200]
	b	.L24
.L14:
	ldr	r1, [r4, #180]
	b	.L24
.L15:
	ldr	r1, [r4, #184]
	b	.L24
.L16:
	ldr	r1, [r4, #188]
	b	.L24
.L17:
	ldr	r1, [r4, #192]
	b	.L24
.L11:
	ldr	r1, [r4, #172]
	b	.L24
.L13:
	ldr	r1, [r4, #176]
	b	.L24
.L22:
	ldr	r1, [r4, #212]
	b	.L24
.L23:
	ldr	r1, [r4, #216]
	b	.L24
.L20:
	ldr	r1, [r4, #204]
	b	.L24
.L21:
	ldr	r1, [r4, #208]
	b	.L24
.L45:
	ldrh	r0, [r4, #54]
	ldrh	r3, [r4, #58]
	b	.L74
.L50:
	ldr	r2, .L127+28
	ldr	ip, [r4, #8]
	ldr	r2, [r2]
	tst	ip, r2
	bne	.L71
	ldrh	r2, [r4, #58]
	ldr	ip, .L127+36
	cmp	r2, ip
	beq	.L85
	cmp	r2, #400
	moveq	r3, #1000
	b	.L71
.L48:
	ldrh	r2, [r4, #58]
	cmp	r2, #360
	moveq	r3, #768
	beq	.L71
	ldr	ip, .L127+84
	cmp	r2, ip
	beq	.L84
	add	ip, ip, #30
	cmp	r2, ip
	moveq	r3, #864
	b	.L71
.L49:
	ldrh	r2, [r4, #58]
	ldr	ip, .L127+36
	cmp	r2, ip
	moveq	r3, #700
	beq	.L71
	cmp	r2, #400
	beq	.L84
	cmp	r2, #1024
	moveq	r3, #960
	b	.L71
.L10:
	ldr	r1, [r4, #168]
	b	.L24
.L55:
	ldr	r0, [r4, #156]
	b	.L70
.L57:
	ldr	r0, [r4, #144]
	b	.L70
.L58:
	ldr	r0, [r4, #140]
	b	.L70
.L59:
	ldr	r0, [r4, #136]
	b	.L70
.L60:
	ldr	r0, [r4, #132]
	b	.L70
.L63:
	ldr	r0, [r4, #108]
	b	.L70
.L69:
	ldr	r0, [r4, #104]
	b	.L70
.L67:
	ldr	r0, [r4, #124]
	b	.L70
.L68:
	ldr	r0, [r4, #116]
	b	.L70
.L66:
	ldr	r0, [r4, #152]
	b	.L70
.L52:
	ldr	r0, [r4, #160]
	b	.L70
.L65:
	ldr	r0, [r4, #128]
	b	.L70
.L54:
	ldr	r0, [r4, #100]
	b	.L70
.L56:
	ldr	r0, [r4, #148]
	b	.L70
.L61:
	ldr	r0, [r4, #120]
	b	.L70
.L62:
	ldr	r0, [r4, #112]
	b	.L70
.L28:
	ldr	r1, .L127+88
	ldr	r0, [r4, #72]
	ldr	r1, [r1]
	ands	r2, r2, r1
	beq	.L34
	ldr	r3, .L127+92
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L35
	mvn	r2, #17
	ldr	r3, .L127+96
	strb	r2, [r4, #67]
	strh	r3, [r4, #64]	@ movhi
	b	.L1
.L25:
	ldr	r2, [r3, #24]
	str	r2, [r4, #20]
	b	.L26
.L29:
	mov	r3, #64
	str	r3, [r4, #16]
	b	.L30
.L34:
	ldr	r1, [r3, #32]
	ldr	ip, [r3, #36]
	str	r1, [r4, #24]
	ldr	r1, [r3, #40]
	ldr	r3, [r3, #44]
	cmp	r8, #0
	str	ip, [r4, #28]
	str	r1, [r4, #32]
	str	r3, [r4, #36]
	beq	.L39
	mov	ip, #244
	mov	r1, #16
	mov	r3, #56
	str	r2, [r4, #24]
	str	ip, [r4, #28]
	str	r1, [r4, #32]
	str	r3, [r4, #36]
.L39:
	ldr	r3, .L127+100
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L40
	ldr	r2, .L127+104
	ldr	r3, .L127+108
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r0, r2
	strh	r3, [r4, #64]	@ movhi
	beq	.L41
.L121:
	ldr	r3, .L127+112
	ldr	r3, [r3]
	strh	r3, [r4, #64]	@ movhi
.L41:
	ldr	r3, .L127+116
	ldr	r3, [r3]
	strb	r3, [r4, #67]
	b	.L1
.L40:
	ldr	r2, .L127+120
	ldr	r3, .L127+124
	ldr	r2, [r2]
	ldr	r3, [r3]
	strh	r2, [r4, #64]	@ movhi
	strb	r3, [r4, #67]
	b	.L1
.L35:
	ldr	r2, .L127+128
	ldr	r3, .L127+108
	ldr	r2, [r2]
	ldrh	r3, [r3]
	tst	r0, r2
	beq	.L36
	ldr	r2, .L127+132
	strh	r3, [r4, #64]	@ movhi
	ldr	r3, [r2]
	tst	r0, r3
	beq	.L41
	b	.L121
.L36:
	ldr	r2, .L127+104
	strh	r3, [r4, #64]	@ movhi
	ldr	r3, [r2]
	tst	r0, r3
	beq	.L41
	b	.L121
.L73:
	ldrh	r2, [r4, #58]
	ldr	ip, .L127+136
	cmp	r2, ip
	beq	.L77
	cmp	r2, #420
	moveq	r3, #620
	beq	.L71
	add	ip, ip, #168
	cmp	r2, #600
	cmpne	r2, ip
	ldreq	r3, .L127+140
	beq	.L71
	b	.L123
.L84:
	mov	r3, #800
	b	.L71
.L85:
	ldr	r3, .L127+144
	b	.L71
.L77:
	ldr	r3, .L127+148
	b	.L71
.L125:
	bl	__stack_chk_fail
.L128:
	.align	2
.L127:
	.word	.LC0
	.word	SetCRT2ToRAMDAC
	.word	HalfDCLK
	.word	SetCRT2ToTV
	.word	SetCRT2ToLCD
	.word	DontExpandLCD
	.word	LCDPass11
	.word	LCDVESATiming
	.word	SIS_315H
	.word	350
	.word	SetCRT2ToHiVision
	.word	SIS_RI_960x600
	.word	SIS_RI_1024x768
	.word	SIS_RI_1280x1024
	.word	SIS_RI_1280x720
	.word	SetInSlaveMode
	.word	TVSetTVSimuMode
	.word	ExtHiTVHT
	.word	ExtHiTVVT
	.word	StHiTVHT
	.word	StHiTVVT
	.word	375
	.word	SetCRT2ToYPbPr525750
	.word	TVSetYPbPr750p
	.word	1650
	.word	TVSetPAL
	.word	TVSetNTSC1024
	.word	NTSCHT
	.word	NTSC2HT
	.word	NTSCVT
	.word	PALHT
	.word	PALVT
	.word	TVSetYPbPr525p
	.word	TVSet525p1024
	.word	357
	.word	775
	.word	875
	.word	527
	.size	SiS_GetCRT2Data301, .-SiS_GetCRT2Data301
	.comm	X_INFO,4,4
	.comm	TVSetYPbPr750p,4,4
	.comm	TVSetYPbPr525p,4,4
	.comm	TVSetTVSimuMode,4,4
	.comm	TVSetPAL,4,4
	.comm	TVSetNTSC1024,4,4
	.comm	TVSet525p1024,4,4
	.comm	StHiTVVT,1,1
	.comm	StHiTVHT,2,2
	.comm	SiS310_ExtCompaq1280x1024Data,4,4
	.comm	SetInSlaveMode,4,4
	.comm	SetCRT2ToYPbPr525750,4,4
	.comm	SetCRT2ToTV,4,4
	.comm	SetCRT2ToRAMDAC,4,4
	.comm	SetCRT2ToLCD,4,4
	.comm	SetCRT2ToHiVision,4,4
	.comm	SIS_RI_960x600,2,2
	.comm	SIS_RI_1280x720,2,2
	.comm	SIS_RI_1280x1024,2,2
	.comm	SIS_RI_1024x768,2,2
	.comm	SIS_315H,4,4
	.comm	PALVT,4,4
	.comm	PALHT,4,4
	.comm	NTSCVT,4,4
	.comm	NTSCHT,4,4
	.comm	NTSC2HT,4,4
	.comm	LCDVESATiming,4,4
	.comm	LCDPass11,4,4
	.comm	HalfDCLK,2,2
	.comm	ExtHiTVVT,1,1
	.comm	ExtHiTVHT,2,2
	.comm	DontExpandLCD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
