	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function VIDGCDVdp2DrawStart
LCPI0_0:
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.long	256                             ## 0x100
	.long	256                             ## 0x100
	.space	4
	.space	4
LCPI0_2:
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_3:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VIDGCDVdp2DrawStart
	.p2align	4, 0x90
_VIDGCDVdp2DrawStart:                   ## @VIDGCDVdp2DrawStart
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_Vdp2DrawBackScreen
	movq	_Vdp2Regs@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movl	(%rdx), %ecx
	andl	$7, %ecx
	movq	_vdp1draw_info@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%ecx, (%rax)
	movl	(%rdx), %ecx
	shrl	$8, %ecx
	andl	$7, %ecx
	movl	%ecx, 4(%rax)
	movl	4(%rdx), %ecx
	andl	$7, %ecx
	movl	%ecx, 8(%rax)
	movl	4(%rdx), %ecx
	shrl	$8, %ecx
	andl	$7, %ecx
	movl	%ecx, 12(%rax)
	movl	8(%rdx), %ecx
	andl	$7, %ecx
	movl	%ecx, 16(%rax)
	movl	8(%rdx), %ecx
	shrl	$8, %ecx
	andl	$7, %ecx
	movl	%ecx, 20(%rax)
	movl	12(%rdx), %ecx
	andl	$7, %ecx
	movl	%ecx, 24(%rax)
	movl	12(%rdx), %ecx
	shrl	$8, %ecx
	andl	$7, %ecx
	movl	%ecx, 28(%rax)
	movl	16(%rdx), %eax
	andl	$112, %eax
	shll	$4, %eax
	movl	%eax, 8(%r14)
	movl	20(%rdx), %eax
	andl	$15, %eax
	movq	_vdp1spritetype@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testb	$64, 24(%rdx)
	jne	LBB0_3
## %bb.1:
	testb	$64, 56(%rdx)
	jne	LBB0_12
LBB0_2:
	movq	_DoNothing@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_3:
	testb	$64, 28(%rdx)
	jne	LBB0_6
## %bb.4:
	movq	44(%rdx), %xmm1                 ## xmm1 = mem[0],zero
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0]
	pand	%xmm1, %xmm2
	pand	LCPI0_1(%rip), %xmm1
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pandn	LCPI0_2(%rip), %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, 48(%r14)
	pextrd	$1, %xmm0, 52(%r14)
	movl	52(%rdx), %ecx
	jmp	LBB0_7
LBB0_6:
	movq	32(%rdx), %xmm1                 ## xmm1 = mem[0],zero
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0]
	pand	%xmm1, %xmm2
	pand	LCPI0_1(%rip), %xmm1
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pandn	LCPI0_2(%rip), %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, 48(%r14)
	pextrd	$1, %xmm0, 52(%r14)
	movl	40(%rdx), %ecx
LBB0_7:
	movzbl	%cl, %eax
	movl	%eax, 56(%r14)
	testl	$256, %ecx                      ## imm = 0x100
	jne	LBB0_13
## %bb.8:
	pxor	%xmm1, %xmm1
	pcmpeqd	%xmm0, %xmm1
	pmovsxdq	%xmm1, %xmm0
	movmskpd	%xmm0, %ecx
	testb	$1, %cl
	je	LBB0_14
## %bb.9:
	shrb	%cl
	je	LBB0_14
## %bb.10:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	testb	$64, 56(%rdx)
	je	LBB0_2
LBB0_12:
	movq	_DoColorCalc@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_13:
	orl	$-256, %ecx
	movl	%ecx, 56(%r14)
LBB0_14:
	testb	$64, 56(%rdx)
	jne	LBB0_16
## %bb.15:
	movq	_DoColorOffset@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_DoColorCalcWithColorOffset@GOTPCREL(%rip), %rax
LBB0_17:
	movq	%rax, 64(%r14)
	movl	60(%rdx), %ebx
	sarl	$8, %ebx
	movq	40(%r14), %rsi
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, 48(%rsi)
	movupd	%xmm0, 32(%rsi)
	movupd	%xmm0, 16(%rsi)
	movupd	%xmm0, (%rsi)
	movl	%ebx, %edi
	callq	_ReadWindowData
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, 16(%r14)
	leaq	16(%r14), %rcx
	movq	(%r15), %r8
	leaq	32(%r14), %rdi
	addq	$24, %r14
	movl	%ebx, %esi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ReadLineWindowData             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp2Regs,8,3                   ## @Vdp2Regs
	.comm	_vdp1draw_info,72,3             ## @vdp1draw_info
	.comm	_vdp1spritetype,4,2             ## @vdp1spritetype
	.comm	_DoColorCalc,4,2                ## @DoColorCalc
	.comm	_DoNothing,4,2                  ## @DoNothing
	.comm	_DoColorCalcWithColorOffset,4,2 ## @DoColorCalcWithColorOffset
	.comm	_DoColorOffset,4,2              ## @DoColorOffset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDGCDVdp2DrawStart            ; -- Begin function VIDGCDVdp2DrawStart
	.p2align	2
_VIDGCDVdp2DrawStart:                   ; @VIDGCDVdp2DrawStart
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	bl	_Vdp2DrawBackScreen
Lloh0:
	adrp	x21, _Vdp2Regs@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Vdp2Regs@GOTPAGEOFF]
	ldr	x2, [x21]
	ldr	w8, [x2]
	and	w8, w8, #0x7
Lloh2:
	adrp	x19, _vdp1draw_info@GOTPAGE
Lloh3:
	ldr	x19, [x19, _vdp1draw_info@GOTPAGEOFF]
	ldr	x9, [x19]
	str	w8, [x9]
	ldr	w8, [x2]
	ubfx	w8, w8, #8, #3
	str	w8, [x9, #4]
	ldr	w8, [x2, #4]
	and	w8, w8, #0x7
	str	w8, [x9, #8]
	ldr	w8, [x2, #4]
	ubfx	w8, w8, #8, #3
	str	w8, [x9, #12]
	ldr	w8, [x2, #8]
	and	w8, w8, #0x7
	str	w8, [x9, #16]
	ldr	w8, [x2, #8]
	ubfx	w8, w8, #8, #3
	str	w8, [x9, #20]
	ldr	w8, [x2, #12]
	and	w8, w8, #0x7
	str	w8, [x9, #24]
	ldr	w8, [x2, #12]
	ubfx	w8, w8, #8, #3
	str	w8, [x9, #28]
	ldp	w8, w9, [x2, #16]
	lsl	w8, w8, #4
	and	w8, w8, #0x700
	str	w8, [x19, #8]
	and	w8, w9, #0xf
Lloh4:
	adrp	x9, _vdp1spritetype@GOTPAGE
Lloh5:
	ldr	x9, [x9, _vdp1spritetype@GOTPAGEOFF]
Lloh6:
	str	w8, [x9]
	ldrb	w8, [x2, #24]
	tbnz	w8, #6, LBB0_2
LBB0_1:
	ldrb	w8, [x2, #56]
Lloh7:
	adrp	x9, _DoColorCalc@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DoColorCalc@GOTPAGEOFF]
Lloh9:
	adrp	x10, _DoNothing@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DoNothing@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	ldrb	w8, [x2, #28]
	tbnz	w8, #6, LBB0_4
; %bb.3:
	ldur	d0, [x2, #44]
	movi	d1, #0x0000ff000000ff
	and.8b	v1, v0, v1
	movi.2s	v2, #1, lsl #8
	cmtst.2s	v0, v0, v2
	bic.2s	v0, #255
	orr.8b	v0, v0, v1
	str	d0, [x19, #48]
	ldr	w9, [x2, #52]
	b	LBB0_5
LBB0_4:
	ldr	d0, [x2, #32]
	movi	d1, #0x0000ff000000ff
	and.8b	v1, v0, v1
	movi.2s	v2, #1, lsl #8
	cmtst.2s	v0, v0, v2
	bic.2s	v0, #255
	orr.8b	v0, v0, v1
	str	d0, [x19, #48]
	ldr	w9, [x2, #40]
LBB0_5:
	and	w8, w9, #0xff
	str	w8, [x19, #56]
	tbnz	w9, #8, LBB0_9
; %bb.6:
	cmeq.2s	v0, v0, #0
	fmov	w9, s0
	tbz	w9, #0, LBB0_10
; %bb.7:
	mov.s	w9, v0[1]
	tbz	w9, #0, LBB0_10
; %bb.8:
	cbz	w8, LBB0_1
	b	LBB0_10
LBB0_9:
	orr	w8, w9, #0xffffff00
	str	w8, [x19, #56]
LBB0_10:
	ldrb	w8, [x2, #56]
Lloh11:
	adrp	x9, _DoColorCalcWithColorOffset@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DoColorCalcWithColorOffset@GOTPAGEOFF]
Lloh13:
	adrp	x10, _DoColorOffset@GOTPAGE
Lloh14:
	ldr	x10, [x10, _DoColorOffset@GOTPAGEOFF]
LBB0_11:
	tst	w8, #0x40
	csel	x8, x10, x9, eq
	str	x8, [x19, #64]
	ldr	w8, [x2, #60]
	asr	w20, w8, #8
	ldr	x1, [x19, #40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x1, #32]
	stp	q0, q0, [x1]
	mov	x0, x20
	bl	_ReadWindowData
	str	xzr, [x19, #16]!
	mov	x2, x19
	str	xzr, [x2, #8]!
	ldr	x4, [x21]
	add	x0, x19, #16
	mov	x1, x20
	mov	x3, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ReadLineWindowData
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp2Regs,8,3                   ; @Vdp2Regs
	.comm	_vdp1draw_info,72,3             ; @vdp1draw_info
	.comm	_vdp1spritetype,4,2             ; @vdp1spritetype
	.comm	_DoColorCalc,4,2                ; @DoColorCalc
	.comm	_DoNothing,4,2                  ; @DoNothing
	.comm	_DoColorCalcWithColorOffset,4,2 ; @DoColorCalcWithColorOffset
	.comm	_DoColorOffset,4,2              ; @DoColorOffset
.subsections_via_symbols
