	.file	"extr_vga16fb.c_vga16fb_update_fix.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vga16fb_update_fix, @function
vga16fb_update_fix:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR [rdi]
	mov	eax, DWORD PTR 4[rdi]
	cmp	edx, 4
	je	.L9
	test	edx, edx
	jne	.L5
	mov	rdx, QWORD PTR FB_TYPE_TEXT[rip]
	mov	QWORD PTR 24[rdi], rdx
	mov	edx, DWORD PTR FB_AUX_TEXT_CGA[rip]
.L7:
	test	eax, eax
	mov	DWORD PTR 32[rdi], edx
	lea	edx, 3[rax]
	cmovs	eax, edx
	sar	eax, 2
	mov	DWORD PTR 16[rdi], eax
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	QWORD PTR 8[rdi], 0
	je	.L6
	mov	rdx, QWORD PTR FB_TYPE_VGA_PLANES[rip]
	mov	QWORD PTR 24[rdi], rdx
	mov	edx, DWORD PTR FB_AUX_VGA_PLANES_CFB8[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	QWORD PTR 8[rdi], 0
	je	.L3
	mov	rdx, QWORD PTR FB_TYPE_PACKED_PIXELS[rip]
	mov	QWORD PTR 24[rdi], rdx
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR 16[rdi], eax
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR FB_TYPE_VGA_PLANES[rip]
	test	eax, eax
	mov	QWORD PTR 24[rdi], rdx
	mov	edx, DWORD PTR FB_AUX_VGA_PLANES_VGA4[rip]
	mov	DWORD PTR 32[rdi], edx
	lea	edx, 7[rax]
	cmovs	eax, edx
	sar	eax, 3
	mov	DWORD PTR 16[rdi], eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR FB_TYPE_PACKED_PIXELS[rip]
	mov	DWORD PTR 16[rdi], eax
	mov	QWORD PTR 24[rdi], rdx
	ret
	.cfi_endproc
.LFE0:
	.size	vga16fb_update_fix, .-vga16fb_update_fix
	.comm	FB_TYPE_VGA_PLANES,8,8
	.comm	FB_TYPE_TEXT,8,8
	.comm	FB_TYPE_PACKED_PIXELS,8,8
	.comm	FB_AUX_VGA_PLANES_VGA4,4,4
	.comm	FB_AUX_VGA_PLANES_CFB8,4,4
	.comm	FB_AUX_TEXT_CGA,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_vga16fb.c_vga16fb_update_fix.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vga16fb_update_fix, %function
vga16fb_update_fix:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	@ link register save eliminated.
	ldm	r0, {r2, r3}
	cmp	r2, #4
	beq	.L9
	cmp	r2, #0
	bne	.L5
	add	r2, r3, #3
	cmp	r3, #0
	movlt	r3, r2
	ldr	r1, .L10
	ldr	r2, .L10+4
.L7:
	ldr	r1, [r1]
	ldr	r2, [r2]
	asr	r3, r3, #2
	str	r3, [r0, #12]
	str	r1, [r0, #16]
	str	r2, [r0, #20]
	bx	lr
.L5:
	ldr	r2, [r0, #8]
	cmp	r2, #0
	beq	.L6
	add	r2, r3, #3
	cmp	r3, #0
	movlt	r3, r2
	ldr	r1, .L10+8
	ldr	r2, .L10+12
	b	.L7
.L9:
	ldr	r2, [r0, #8]
	cmp	r2, #0
	beq	.L3
	ldr	r2, .L10+16
	add	r3, r3, r3, lsr #31
	ldr	r2, [r2]
	asr	r3, r3, #1
	str	r3, [r0, #12]
	str	r2, [r0, #16]
	bx	lr
.L3:
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	ldr	r1, .L10+8
	ldr	r2, .L10+20
	ldr	r1, [r1]
	ldr	r2, [r2]
	asr	r3, r3, #3
	str	r3, [r0, #12]
	str	r1, [r0, #16]
	str	r2, [r0, #20]
	bx	lr
.L6:
	ldr	r2, .L10+16
	str	r3, [r0, #12]
	ldr	r3, [r2]
	str	r3, [r0, #16]
	bx	lr
.L11:
	.align	2
.L10:
	.word	FB_TYPE_TEXT
	.word	FB_AUX_TEXT_CGA
	.word	FB_TYPE_VGA_PLANES
	.word	FB_AUX_VGA_PLANES_CFB8
	.word	FB_TYPE_PACKED_PIXELS
	.word	FB_AUX_VGA_PLANES_VGA4
	.size	vga16fb_update_fix, .-vga16fb_update_fix
	.comm	FB_TYPE_VGA_PLANES,4,4
	.comm	FB_TYPE_TEXT,4,4
	.comm	FB_TYPE_PACKED_PIXELS,4,4
	.comm	FB_AUX_VGA_PLANES_VGA4,4,4
	.comm	FB_AUX_VGA_PLANES_CFB8,4,4
	.comm	FB_AUX_TEXT_CGA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
