	.file	"extr_init301.c_SiS_EnableBridge.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	SiS_EnableBridge, @function
SiS_EnableBridge:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR VB_SISVB[rip], eax
	je	.L23
	test	DWORD PTR VB_SIS30xBLV[rip], eax
	je	.L27
.L23:
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rax, QWORD PTR SIS_315H[rip]
	cmp	QWORD PTR 8[rdi], rax
	jl	.L28
.L6:
	mov	edi, DWORD PTR 64[rbp]
	mov	esi, 50
	call	SiS_GetReg@PLT
	mov	rdi, rbp
	mov	ebx, eax
	and	bx, 223
	call	SiS_BridgeInSlavemode@PLT
	test	rax, rax
	jne	.L29
.L8:
	mov	edi, DWORD PTR 64[rbp]
	movzx	edx, bx
	mov	esi, 50
	call	SiS_SetReg@PLT
	mov	edi, DWORD PTR 64[rbp]
	mov	edx, 32
	mov	esi, 30
	call	SiS_SetRegOR@PLT
	mov	rax, QWORD PTR SIS_315H[rip]
	cmp	QWORD PTR 8[rbp], rax
	jge	.L30
.L10:
	mov	edi, DWORD PTR 68[rbp]
	mov	ecx, 32
	mov	edx, 31
	xor	esi, esi
	call	SiS_SetRegANDOR@PLT
	mov	rdi, rbp
	call	SiS_VBLongWait@PLT
	mov	rdi, rbp
	call	SiS_DisplayOn@PLT
	mov	rax, QWORD PTR SIS_315H[rip]
	cmp	QWORD PTR 8[rbp], rax
	jge	.L31
.L12:
	mov	rdi, rbp
	call	SiS_VBLongWait@PLT
	mov	rax, QWORD PTR SIS_315H[rip]
	cmp	QWORD PTR 8[rbp], rax
	jl	.L32
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	rdi, rbp
	call	SiS_CRT2IsLCD@PLT
	test	rax, rax
	je	.L1
	mov	rdi, rbp
	mov	esi, 1
	call	SiS_PanelDelay@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	xor	edx, edx
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	mov	esi, 247
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	SiS_SetRegSR11ANDOR@PLT
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	edi, DWORD PTR 60[rbp]
	mov	edx, 127
	xor	esi, esi
	call	SiS_SetRegAND@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR 60[rbp]
	mov	esi, 46
	call	SiS_GetReg@PLT
	test	al, -128
	jne	.L10
	mov	edi, DWORD PTR 60[rbp]
	mov	edx, 128
	mov	esi, 46
	call	SiS_SetRegOR@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR 72[rbp]
	mov	esi, 48
	call	SiS_GetReg@PLT
	mov	r8d, eax
	mov	eax, ebx
	or	eax, 32
	test	WORD PTR SetCRT2ToRAMDAC[rip], r8w
	cmove	ebx, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	call	SiS_CRT2IsLCD@PLT
	test	rax, rax
	je	.L6
	mov	rdi, rbp
	xor	edx, edx
	mov	esi, 251
	call	SiS_SetRegSR11ANDOR@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	SiS_PanelDelay@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	SiS_EnableBridge, .-SiS_EnableBridge
	.comm	VB_SISVB,4,4
	.comm	VB_SISPOWER,4,4
	.comm	VB_SISLVDS,4,4
	.comm	VB_SISEMI,4,4
	.comm	VB_SIS30xBLV,4,4
	.comm	VB_NoLCD,4,4
	.comm	SetCRT2ToRAMDAC,2,2
	.comm	SIS_740,8,8
	.comm	SIS_730,8,8
	.comm	SIS_550,8,8
	.comm	SIS_315H,8,8
	.comm	IS_SIS740,8,8
	.comm	CUT_COMPAQ1280,8,8
	.comm	CUT_COMPAL1400_2,8,8
	.comm	CUT_CLEVO1400,8,8
	.comm	CUT_CLEVO1024,8,8
	.comm	CUT_ASUSA2H_2,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_init301.c_SiS_EnableBridge.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SiS_EnableBridge, %function
SiS_EnableBridge:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L31
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	bxeq	lr
	ldr	r3, .L31+4
	push	{r4, r5, r6, lr}
	ldr	r5, [r3]
	ands	r5, r2, r5
	popne	{r4, r5, r6, pc}
	ldr	r6, .L31+8
	ldr	r2, [r0, #4]
	ldr	r3, [r6]
	mov	r4, r0
	cmp	r2, r3
	blt	.L27
.L6:
	mov	r1, #50
	ldr	r0, [r4, #48]
	bl	SiS_GetReg
	mov	r5, r0
	mov	r0, r4
	bl	SiS_BridgeInSlavemode
	cmp	r0, #0
	and	r5, r5, #223
	bne	.L28
.L8:
	mov	r2, r5
	mov	r1, #50
	ldr	r0, [r4, #48]
	bl	SiS_SetReg
	mov	r2, #32
	mov	r1, #30
	ldr	r0, [r4, #48]
	bl	SiS_SetRegOR
	ldr	r2, [r4, #4]
	ldr	r3, [r6]
	cmp	r2, r3
	bge	.L29
.L10:
	mov	r3, #32
	mov	r2, #31
	mov	r1, #0
	ldr	r0, [r4, #52]
	bl	SiS_SetRegANDOR
	mov	r0, r4
	bl	SiS_VBLongWait
	mov	r0, r4
	bl	SiS_DisplayOn
	ldr	r2, [r4, #4]
	ldr	r3, [r6]
	cmp	r2, r3
	bge	.L30
.L12:
	mov	r0, r4
	bl	SiS_VBLongWait
	ldr	r3, [r6]
	ldr	r2, [r4, #4]
	cmp	r2, r3
	popge	{r4, r5, r6, pc}
	mov	r0, r4
	bl	SiS_CRT2IsLCD
	cmp	r0, #0
	popeq	{r4, r5, r6, pc}
	mov	r1, #1
	mov	r0, r4
	bl	SiS_PanelDelay
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	mov	r2, #0
	mov	r1, #247
	b	SiS_SetRegSR11ANDOR
.L30:
	mov	r2, #127
	mov	r1, #0
	ldr	r0, [r4, #44]
	bl	SiS_SetRegAND
	b	.L12
.L29:
	mov	r1, #46
	ldr	r0, [r4, #44]
	bl	SiS_GetReg
	tst	r0, #128
	bne	.L10
	mov	r2, #128
	mov	r1, #46
	ldr	r0, [r4, #44]
	bl	SiS_SetRegOR
	b	.L10
.L28:
	mov	r1, #48
	ldr	r0, [r4, #56]
	bl	SiS_GetReg
	ldr	r3, .L31+12
	ldrh	r3, [r3]
	tst	r3, r0
	orreq	r5, r5, #32
	b	.L8
.L27:
	bl	SiS_CRT2IsLCD
	cmp	r0, #0
	beq	.L6
	mov	r2, r5
	mov	r1, #251
	mov	r0, r4
	bl	SiS_SetRegSR11ANDOR
	mov	r1, r5
	mov	r0, r4
	bl	SiS_PanelDelay
	b	.L6
.L32:
	.align	2
.L31:
	.word	VB_SISVB
	.word	VB_SIS30xBLV
	.word	SIS_315H
	.word	SetCRT2ToRAMDAC
	.size	SiS_EnableBridge, .-SiS_EnableBridge
	.comm	VB_SISVB,4,4
	.comm	VB_SISPOWER,4,4
	.comm	VB_SISLVDS,4,4
	.comm	VB_SISEMI,4,4
	.comm	VB_SIS30xBLV,4,4
	.comm	VB_NoLCD,4,4
	.comm	SetCRT2ToRAMDAC,2,2
	.comm	SIS_740,4,4
	.comm	SIS_730,4,4
	.comm	SIS_550,4,4
	.comm	SIS_315H,4,4
	.comm	IS_SIS740,4,4
	.comm	CUT_COMPAQ1280,4,4
	.comm	CUT_COMPAL1400_2,4,4
	.comm	CUT_CLEVO1400,4,4
	.comm	CUT_CLEVO1024,4,4
	.comm	CUT_ASUSA2H_2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
