	.file	"extr_init.c_SiS_SetCRTCRegs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	SiS_SetCRTCRegs, @function
SiS_SetCRTCRegs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, 127
	movzx	r13d, si
	mov	esi, 17
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	lea	r12, 0[0+r13*8]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 16[rdi]
	call	SiS_SetRegAND@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, ebx
	mov	rax, QWORD PTR [rax+r12]
	movzx	edx, BYTE PTR [rax+rbx]
	add	rbx, 1
	call	SiS_SetReg@PLT
	cmp	rbx, 25
	jne	.L2
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR SIS_661[rip]
	jge	.L16
	cmp	rax, QWORD PTR SIS_630[rip]
	je	.L4
	cmp	rax, QWORD PTR SIS_730[rip]
	je	.L4
.L1:
	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
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmp	DWORD PTR 8[rbp], 47
	jle	.L1
	mov	eax, DWORD PTR 12[rbp]
	test	DWORD PTR SetInSlaveMode[rip], eax
	je	.L1
	mov	edx, DWORD PTR SetCRT2ToLCD[rip]
	or	edx, DWORD PTR SetCRT2ToTV[rip]
	test	edx, eax
	je	.L1
	mov	edi, DWORD PTR 16[rbp]
	mov	edx, 254
	mov	esi, 24
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, rbp
	call	SiS_OpenCRTC@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, 19
	mov	rax, QWORD PTR [rax+r13*8]
	movzx	edx, BYTE PTR 19[rax]
	call	SiS_SetReg@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, 20
	mov	rax, QWORD PTR [rax+r13*8]
	movzx	edx, BYTE PTR 20[rax]
.L14:
	add	rsp, 8
	.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	SiS_SetReg@PLT
	.cfi_endproc
.LFE0:
	.size	SiS_SetCRTCRegs, .-SiS_SetCRTCRegs
	.comm	SetInSlaveMode,4,4
	.comm	SetCRT2ToTV,4,4
	.comm	SetCRT2ToLCD,4,4
	.comm	SIS_730,8,8
	.comm	SIS_661,8,8
	.comm	SIS_630,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_init.c_SiS_SetCRTCRegs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SiS_SetCRTCRegs, %function
SiS_SetCRTCRegs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r2, #127
	mov	r7, r1
	mov	r5, r0
	mov	r1, #17
	ldr	r0, [r0, #12]
	bl	SiS_SetRegAND
	mov	r4, #0
	lsl	r6, r7, #2
.L2:
	ldr	r3, [r5, #16]
	mov	r1, r4
	ldr	r3, [r3, r6]
	ldr	r0, [r5, #12]
	ldrb	r2, [r3, r4]	@ zero_extendqisi2
	add	r4, r4, #1
	bl	SiS_SetReg
	cmp	r4, #25
	bne	.L2
	ldr	r2, .L16
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	bge	.L15
	ldr	r2, .L16+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L16+8
	ldr	r2, [r2]
	cmp	r3, r2
	popne	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r3, [r5, #4]
	cmp	r3, #47
	pople	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L16+12
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	tst	r3, r2
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L16+16
	ldr	r1, .L16+20
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	tst	r2, r3
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r5, #12]
	mov	r2, #254
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r1, #24
	b	SiS_SetReg
.L15:
	mov	r0, r5
	bl	SiS_OpenCRTC
	ldr	r3, [r5, #16]
	mov	r1, #19
	ldr	r3, [r3, r7, lsl #2]
	ldr	r0, [r5, #12]
	ldrb	r2, [r3, #19]	@ zero_extendqisi2
	bl	SiS_SetReg
	ldr	r3, [r5, #16]
	ldr	r0, [r5, #12]
	ldr	r3, [r3, r7, lsl #2]
	mov	r1, #20
	pop	{r4, r5, r6, r7, r8, lr}
	ldrb	r2, [r3, #20]	@ zero_extendqisi2
	b	SiS_SetReg
.L17:
	.align	2
.L16:
	.word	SIS_661
	.word	SIS_630
	.word	SIS_730
	.word	SetInSlaveMode
	.word	SetCRT2ToLCD
	.word	SetCRT2ToTV
	.size	SiS_SetCRTCRegs, .-SiS_SetCRTCRegs
	.comm	SetInSlaveMode,4,4
	.comm	SetCRT2ToTV,4,4
	.comm	SetCRT2ToLCD,4,4
	.comm	SIS_730,4,4
	.comm	SIS_661,4,4
	.comm	SIS_630,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
