	.file	"extr_tdfxfb.c_tdfxfb_check_var.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"depth not supported: %u\n"
.LC1:
	.string	"xoffset not supported\n"
.LC2:
	.string	"interlace not supported\n"
.LC3:
	.string	"mode outside monitor's specs\n"
.LC4:
	.string	"width not supported: %u\n"
.LC5:
	.string	"height not supported: %u\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC6:
	.string	"no memory for screen (%ux%ux%u)\n"
	.section	.rodata.str1.1
.LC7:
	.string	"pixclock too high (%ldKHz)\n"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"Checking graphics mode at %dx%d depth %d\n"
	.text
	.p2align 4
	.type	tdfxfb_check_var, @function
tdfxfb_check_var:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r8d, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	r12, QWORD PTR 32[rsi]
	lea	eax, -16[r8]
	and	eax, -17
	je	.L2
	mov	eax, r8d
	and	eax, -17
	cmp	eax, 8
	jne	.L31
.L2:
	mov	eax, DWORD PTR 4[rbx]
	cmp	eax, DWORD PTR 8[rbx]
	je	.L4
	mov	DWORD PTR 8[rbx], eax
.L4:
	mov	edx, DWORD PTR 12[rbx]
	cmp	edx, DWORD PTR 16[rbx]
	jg	.L32
	cmp	QWORD PTR 80[rbx], 0
	jne	.L33
.L6:
	mov	edx, DWORD PTR 20[rbx]
	and	edx, DWORD PTR FB_VMODE_MASK[rip]
	mov	QWORD PTR 72[rbx], 0
	cmp	edx, DWORD PTR FB_VMODE_INTERLACED[rip]
	je	.L34
.L7:
	cmp	QWORD PTR 24[rbp], 0
	jne	.L35
.L8:
	lea	esi, 15[rax]
	and	esi, -16
	lea	eax, -320[rsi]
	mov	DWORD PTR 4[rbx], esi
	cmp	eax, 1728
	ja	.L36
	mov	r9d, DWORD PTR 12[rbx]
	lea	eax, -200[r9]
	cmp	eax, 1848
	ja	.L37
	lea	ecx, 7[r8]
	mov	edx, DWORD PTR 16[rbx]
	mov	eax, DWORD PTR 0[rbp]
	sar	ecx, 3
	imul	ecx, esi
	imul	edx, ecx
	cmp	edx, eax
	jle	.L12
	cdq
	idiv	ecx
	mov	DWORD PTR 16[rbx], eax
	cmp	r9d, eax
	jg	.L38
.L12:
	mov	edi, DWORD PTR 68[rbx]
	call	PICOS2KHZ@PLT
	cmp	rax, QWORD PTR [r12]
	jg	.L39
	mov	ecx, DWORD PTR [rbx]
	mov	QWORD PTR 60[rbx], 0
	cmp	ecx, 24
	je	.L14
	jg	.L15
	cmp	ecx, 8
	je	.L16
	cmp	ecx, 16
	jne	.L18
	movabs	rax, 21474836486
	mov	QWORD PTR 36[rbx], 5
	mov	QWORD PTR 44[rbx], rax
	movabs	rax, 47244640261
	mov	QWORD PTR 52[rbx], rax
	.p2align 4,,10
	.p2align 3
.L18:
	mov	eax, DWORD PTR FB_ACCELF_TEXT[rip]
	mov	edx, DWORD PTR 12[rbx]
	mov	QWORD PTR 24[rbx], -1
	lea	rdi, .LC8[rip]
	mov	esi, DWORD PTR 4[rbx]
	mov	DWORD PTR 32[rbx], eax
	xor	eax, eax
	call	DPRINTK@PLT
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	cmp	QWORD PTR 80[rbx], 0
	mov	DWORD PTR 16[rbx], edx
	je	.L6
.L33:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	cmp	QWORD PTR 16[rbp], 0
	je	.L8
	cmp	QWORD PTR 8[rbp], 0
	je	.L8
	mov	rsi, rbp
	mov	rdi, rbx
	call	fb_validate_mode@PLT
	test	rax, rax
	js	.L9
	mov	eax, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR [rbx]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rcx, QWORD PTR VOODOO3_MAX_PIXCLOCK[rip]
	cmp	QWORD PTR [r12], rcx
	jge	.L7
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	ecx, 32
	jne	.L18
	movabs	rax, 34359738392
	mov	QWORD PTR 60[rbx], rax
.L14:
	movabs	rax, 34359738376
	mov	QWORD PTR 36[rbx], 8
	mov	QWORD PTR 44[rbx], rax
	movabs	rax, 68719476744
	mov	QWORD PTR 52[rbx], rax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	mov	QWORD PTR 52[rbx], 8
	mov	QWORD PTR 44[rbx], 8
	mov	QWORD PTR 36[rbx], 8
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L31:
	mov	esi, r8d
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	mov	esi, r9d
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	mov	edi, DWORD PTR 68[rbx]
	call	PICOS2KHZ@PLT
	lea	rdi, .LC7[rip]
	mov	rsi, rax
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L38:
	mov	edx, eax
	mov	ecx, r8d
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
.L9:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	DPRINTK@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	tdfxfb_check_var, .-tdfxfb_check_var
	.comm	VOODOO3_MAX_PIXCLOCK,8,8
	.comm	FB_VMODE_MASK,4,4
	.comm	FB_VMODE_INTERLACED,4,4
	.comm	FB_ACCELF_TEXT,4,4
	.comm	EINVAL,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_tdfxfb.c_tdfxfb_check_var.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"depth not supported: %u\012\000"
	.align	2
.LC1:
	.ascii	"xoffset not supported\012\000"
	.align	2
.LC2:
	.ascii	"interlace not supported\012\000"
	.align	2
.LC3:
	.ascii	"mode outside monitor's specs\012\000"
	.align	2
.LC4:
	.ascii	"width not supported: %u\012\000"
	.align	2
.LC5:
	.ascii	"height not supported: %u\012\000"
	.global	__aeabi_idiv
	.align	2
.LC6:
	.ascii	"no memory for screen (%ux%ux%u)\012\000"
	.align	2
.LC7:
	.ascii	"pixclock too high (%ldKHz)\012\000"
	.align	2
.LC8:
	.ascii	"Checking graphics mode at %dx%d depth %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tdfxfb_check_var, %function
tdfxfb_check_var:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0]
	ldr	r9, [r1, #16]
	sub	r2, r8, #16
	bic	r2, r2, #16
	bic	r3, r8, #16
	cmp	r3, #8
	cmpne	r2, #0
	bne	.L31
	ldmib	r0, {r2, r3}
	mov	r6, r1
	cmp	r2, r3
	ldr	r1, [r0, #16]
	ldr	r3, [r0, #12]
	ldr	r7, [r0, #76]
	strne	r2, [r0, #8]
	cmp	r3, r1
	strgt	r3, [r0, #16]
	cmp	r7, #0
	mov	r4, r0
	bne	.L32
	ldr	r3, .L39
	ldr	r1, .L39+4
	ldr	r0, [r3]
	ldr	r3, [r4, #20]
	ldr	r1, [r1]
	and	r3, r3, r0
	cmp	r3, r1
	str	r7, [r4, #72]
	beq	.L33
.L7:
	ldr	r3, [r6, #12]
	cmp	r3, #0
	bne	.L34
.L8:
	add	r2, r2, #15
	bic	r5, r2, #15
	sub	r3, r5, #320
	cmp	r3, #1728
	str	r5, [r4, #4]
	bhi	.L35
	ldr	r10, [r4, #12]
	ldr	r3, .L39+8
	sub	r2, r10, #200
	cmp	r2, r3
	bhi	.L36
	add	r1, r8, #7
	asr	r1, r1, #3
	mul	r1, r5, r1
	ldr	r3, [r4, #16]
	ldr	r0, [r6]
	mul	r3, r1, r3
	cmp	r3, r0
	ble	.L12
	bl	__aeabi_idiv
	cmp	r10, r0
	str	r0, [r4, #16]
	bgt	.L37
.L12:
	ldr	r0, [r4, #68]
	bl	PICOS2KHZ
	ldr	r3, [r9]
	cmp	r0, r3
	bgt	.L38
	mov	r1, #0
	ldr	r3, [r4]
	str	r1, [r4, #60]
	sub	r2, r3, #8
	str	r1, [r4, #64]
	cmp	r2, #24
	ldrls	pc, [pc, r2, asl #2]
	b	.L14
.L16:
	.word	.L19
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L18
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L17
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L15
.L34:
	ldr	r3, [r6, #8]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L8
	mov	r1, r6
	mov	r0, r4
	bl	fb_validate_mode
	cmp	r0, #0
	blt	.L9
	ldr	r2, [r4, #4]
	ldr	r8, [r4]
	b	.L8
.L33:
	ldr	r3, .L39+12
	ldr	r1, [r9]
	ldr	r3, [r3]
	cmp	r1, r3
	bge	.L7
	ldr	r0, .L39+16
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L1
.L15:
	mov	r1, #24
	mov	r2, #8
	str	r1, [r4, #60]
	str	r2, [r4, #64]
.L17:
	mov	r2, #8
	mov	r0, #16
	mov	r1, #0
	str	r0, [r4, #56]
	str	r2, [r4, #48]
	str	r2, [r4, #36]
	str	r2, [r4, #44]
	str	r2, [r4, #52]
	str	r1, [r4, #40]
.L14:
	mvn	r2, #0
	ldr	r1, .L39+24
	str	r2, [r4, #24]
	ldr	r1, [r1]
	str	r2, [r4, #28]
	str	r1, [r4, #32]
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #4]
	ldr	r0, .L39+28
	bl	DPRINTK
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L36:
	mov	r1, r10
	ldr	r0, .L39+32
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L18:
	mov	r2, #5
	mov	ip, #11
	mov	r0, #6
	mov	r1, #0
	str	ip, [r4, #56]
	str	r2, [r4, #52]
	str	r2, [r4, #48]
	str	r2, [r4, #36]
	str	r0, [r4, #44]
	str	r1, [r4, #40]
	b	.L14
.L19:
	mov	r1, #8
	mov	r2, #0
	str	r1, [r4, #52]
	str	r2, [r4, #56]
	add	ip, r4, #44
	add	r2, r4, #52
	ldm	r2, {r0, r1}
	stm	ip, {r0, r1}
	add	ip, r4, #36
	ldm	r2, {r0, r1}
	stm	ip, {r0, r1}
	b	.L14
.L32:
	ldr	r0, .L39+36
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L35:
	mov	r1, r5
	ldr	r0, .L39+40
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L31:
	mov	r1, r8
	ldr	r0, .L39+44
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L38:
	ldr	r0, [r4, #68]
	bl	PICOS2KHZ
	mov	r1, r0
	ldr	r0, .L39+48
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L1
.L37:
	mov	r3, r8
	mov	r2, r0
	mov	r1, r5
	ldr	r0, .L39+52
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L1
.L9:
	ldr	r0, .L39+56
	bl	DPRINTK
	ldr	r3, .L39+20
	ldr	r7, [r3]
	rsb	r7, r7, #0
	b	.L1
.L40:
	.align	2
.L39:
	.word	FB_VMODE_MASK
	.word	FB_VMODE_INTERLACED
	.word	1848
	.word	VOODOO3_MAX_PIXCLOCK
	.word	.LC2
	.word	EINVAL
	.word	FB_ACCELF_TEXT
	.word	.LC8
	.word	.LC5
	.word	.LC1
	.word	.LC4
	.word	.LC0
	.word	.LC7
	.word	.LC6
	.word	.LC3
	.size	tdfxfb_check_var, .-tdfxfb_check_var
	.comm	VOODOO3_MAX_PIXCLOCK,4,4
	.comm	FB_VMODE_MASK,4,4
	.comm	FB_VMODE_INTERLACED,4,4
	.comm	FB_ACCELF_TEXT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
