	.file	"extr_vidsoft.c_Vdp2DrawBackScreen.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	Vdp2DrawBackScreen, @function
Vdp2DrawBackScreen:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR Vdp2Regs[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	DWORD PTR [rdi], 33024
	jne	.L2
	mov	ecx, DWORD PTR vdp2height[rip]
	xor	ebx, ebx
	test	ecx, ecx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	xor	esi, esi
	mov	edi, 63
	call	COLSAT2YAB32@PLT
	mov	edi, ebx
	add	ebx, 1
	mov	esi, eax
	call	TitanPutBackHLine@PLT
	cmp	DWORD PTR vdp2height[rip], ebx
	jg	.L3
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 40
	.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
.L2:
	.cfi_restore_state
	mov	r12, rsp
	pxor	xmm0, xmm0
	xor	ecx, ecx
	mov	edx, 32
	mov	rsi, r12
	movaps	XMMWORD PTR [rsp], xmm0
	call	ReadVdp2ColorOffset@PLT
	mov	rax, QWORD PTR Vdp2Regs[rip]
	mov	ebx, DWORD PTR 8[rax]
	test	BYTE PTR 5[rax], -128
	mov	ebp, ebx
	jne	.L23
	sal	ebp, 16
	and	ebp, 196608
	or	ebp, DWORD PTR 12[rax]
	add	ebp, ebp
	and	ebx, 32768
	je	.L8
.L24:
	mov	edx, DWORD PTR vdp2height[rip]
	xor	ebx, ebx
	test	edx, edx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR Vdp2Ram[rip]
	mov	esi, ebp
	add	ebp, 2
	call	T1ReadWord@PLT
	mov	edi, 63
	mov	r13, QWORD PTR [rsp]
	mov	esi, eax
	call	COLSAT2YAB16@PLT
	mov	rdi, r12
	mov	esi, eax
	call	r13
	mov	edi, ebx
	add	ebx, 1
	mov	esi, eax
	call	TitanPutBackHLine@PLT
	cmp	DWORD PTR vdp2height[rip], ebx
	jg	.L9
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	sal	ebp, 16
	and	ebp, 458752
	or	ebp, DWORD PTR 12[rax]
	add	ebp, ebp
	and	ebx, 32768
	jne	.L24
.L8:
	mov	edi, DWORD PTR Vdp2Ram[rip]
	mov	esi, ebp
	call	T1ReadWord@PLT
	mov	ebp, eax
	mov	eax, DWORD PTR vdp2height[rip]
	test	eax, eax
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, ebp
	mov	edi, 63
	mov	r13, QWORD PTR [rsp]
	call	COLSAT2YAB16@PLT
	mov	rdi, r12
	mov	esi, eax
	call	r13
	mov	edi, ebx
	add	ebx, 1
	mov	esi, eax
	call	TitanPutBackHLine@PLT
	cmp	DWORD PTR vdp2height[rip], ebx
	jg	.L11
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Vdp2DrawBackScreen, .-Vdp2DrawBackScreen
	.comm	vdp2height,4,4
	.comm	Vdp2Regs,8,8
	.comm	Vdp2Ram,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_vidsoft.c_Vdp2DrawBackScreen.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Vdp2DrawBackScreen, %function
Vdp2DrawBackScreen:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L21
	ldr	r3, .L21+4
	ldr	r0, [r5]
	sub	sp, sp, #16
	ldr	r4, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ands	r4, r4, #33024
	bne	.L2
	ldr	r5, .L21+8
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
.L3:
	mov	r1, #0
	mov	r0, #63
	bl	COLSAT2YAB32
	mov	r1, r0
	mov	r0, r4
	bl	TitanPutBackHLine
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r3, #0
	mov	r2, #32
	add	r1, sp, #4
	str	r3, [sp, #4]
	str	r3, [sp, #8]
	bl	ReadVdp2ColorOffset
	ldr	r3, [r5]
	ldmib	r3, {r2, r6}
	ldr	r3, [r3, #12]
	lsl	r4, r6, #16
	tst	r2, #32768
	andne	r4, r4, #458752
	andeq	r4, r4, #196608
	orr	r4, r4, r3
	ands	r6, r6, #32768
	lsl	r4, r4, #1
	beq	.L8
	ldr	r5, .L21+8
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
	mov	r6, #0
	ldr	r8, .L21+12
.L9:
	mov	r1, r4
	ldr	r0, [r8]
	bl	T1ReadWord
	mov	r1, r0
	mov	r0, #63
	ldr	r7, [sp, #4]
	bl	COLSAT2YAB16
	mov	r1, r0
	add	r0, sp, #4
	blx	r7
	mov	r1, r0
	mov	r0, r6
	bl	TitanPutBackHLine
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	add	r4, r4, #2
	bgt	.L9
	b	.L1
.L8:
	ldr	r3, .L21+12
	mov	r1, r4
	ldr	r0, [r3]
	bl	T1ReadWord
	ldr	r5, .L21+8
	mov	r7, r0
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
.L11:
	mov	r1, r7
	mov	r0, #63
	ldr	r4, [sp, #4]
	bl	COLSAT2YAB16
	mov	r1, r0
	add	r0, sp, #4
	blx	r4
	mov	r1, r0
	mov	r0, r6
	bl	TitanPutBackHLine
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L11
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	Vdp2Regs
	.word	.LC0
	.word	vdp2height
	.word	Vdp2Ram
	.size	Vdp2DrawBackScreen, .-Vdp2DrawBackScreen
	.comm	vdp2height,4,4
	.comm	Vdp2Regs,4,4
	.comm	Vdp2Ram,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
