	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Vdp2DrawBackScreen
_Vdp2DrawBackScreen:                    ## @Vdp2DrawBackScreen
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Vdp2Regs@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testb	$-127, 1(%rdi)
	je	LBB0_1
## %bb.4:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movl	$32, %edx
	xorl	%ecx, %ecx
	callq	_ReadVdp2ColorOffset
	movq	(%rbx), %rax
	movb	5(%rax), %cl
	shrb	$7, %cl
	movl	8(%rax), %edx
	movl	%edx, %esi
	shll	$16, %esi
	movzbl	%cl, %r14d
	shll	$18, %r14d
	orl	$196608, %r14d                  ## imm = 0x30000
	andl	%esi, %r14d
	orl	12(%rax), %r14d
	addl	%r14d, %r14d
	testl	$32768, %edx                    ## imm = 0x8000
	jne	LBB0_5
## %bb.8:
	movq	_Vdp2Ram@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_T1ReadWord
	movq	_vdp2height@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_11
## %bb.9:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %r13
	movl	$63, %edi
	movl	%r14d, %esi
	callq	_COLSAT2YAB16
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	*%r13
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_TitanPutBackHLine
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_10
	jmp	LBB0_11
LBB0_1:
	movq	_vdp2height@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$63, %edi
	xorl	%esi, %esi
	callq	_COLSAT2YAB32
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_TitanPutBackHLine
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_3
	jmp	LBB0_11
LBB0_5:
	movq	_vdp2height@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_Vdp2Ram@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%r14d, %esi
	callq	_T1ReadWord
	addl	$2, %r14d
	movq	-64(%rbp), %r12
	movl	$63, %edi
	movl	%eax, %esi
	callq	_COLSAT2YAB16
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	*%r12
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_TitanPutBackHLine
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_7
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp2Regs,8,3                   ## @Vdp2Regs
	.comm	_vdp2height,4,2                 ## @vdp2height
	.comm	_Vdp2Ram,4,2                    ## @Vdp2Ram
	.no_dead_strip	_Vdp2DrawBackScreen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Vdp2DrawBackScreen
_Vdp2DrawBackScreen:                    ; @Vdp2DrawBackScreen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _Vdp2Regs@GOTPAGE
Lloh1:
	ldr	x19, [x19, _Vdp2Regs@GOTPAGEOFF]
	ldr	x0, [x19]
	ldrb	w8, [x0, #1]
	tst	w8, #0xffffff81
	b.eq	LBB0_5
; %bb.1:
	stp	xzr, xzr, [sp]
	mov	x1, sp
	mov	w2, #32
	mov	w3, #0
	bl	_ReadVdp2ColorOffset
	ldr	x8, [x19]
	ldrb	w9, [x8, #5]
	tst	w9, #0x80
	mov	w9, #458752
	mov	w10, #196608
	csel	w9, w10, w9, eq
	ldp	w10, w8, [x8, #8]
	and	w9, w9, w10, lsl #16
	orr	w8, w9, w8
	lsl	w19, w8, #1
	tbnz	w10, #15, LBB0_8
; %bb.2:
Lloh2:
	adrp	x8, _Vdp2Ram@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Vdp2Ram@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_T1ReadWord
Lloh5:
	adrp	x21, _vdp2height@GOTPAGE
Lloh6:
	ldr	x21, [x21, _vdp2height@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.3:
	mov	x19, x0
	mov	w20, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [sp]
	mov	w0, #63
	mov	x1, x19
	bl	_COLSAT2YAB16
	mov	x1, x0
	mov	x0, sp
	blr	x22
	mov	x1, x0
	mov	x0, x20
	bl	_TitanPutBackHLine
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_4
	b	LBB0_11
LBB0_5:
Lloh7:
	adrp	x20, _vdp2height@GOTPAGE
Lloh8:
	ldr	x20, [x20, _vdp2height@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	w19, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #63
	mov	w1, #0
	bl	_COLSAT2YAB32
	mov	x1, x0
	mov	x0, x19
	bl	_TitanPutBackHLine
	add	w19, w19, #1
	ldr	w8, [x20]
	cmp	w19, w8
	b.lt	LBB0_7
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x21, _vdp2height@GOTPAGE
Lloh10:
	ldr	x21, [x21, _vdp2height@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	w20, #0
Lloh11:
	adrp	x22, _Vdp2Ram@GOTPAGE
Lloh12:
	ldr	x22, [x22, _Vdp2Ram@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x1, x19
	bl	_T1ReadWord
	mov	x1, x0
	add	w19, w19, #2
	ldr	x23, [sp]
	mov	w0, #63
	bl	_COLSAT2YAB16
	mov	x1, x0
	mov	x0, sp
	blr	x23
	mov	x1, x0
	mov	x0, x20
	bl	_TitanPutBackHLine
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp2Regs,8,3                   ; @Vdp2Regs
	.comm	_vdp2height,4,2                 ; @vdp2height
	.comm	_Vdp2Ram,4,2                    ; @Vdp2Ram
	.no_dead_strip	_Vdp2DrawBackScreen
.subsections_via_symbols
