	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function VIDDCVdp2DrawScreens
_VIDDCVdp2DrawScreens:                  ## @VIDDCVdp2DrawScreens
	.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
	pushq	%rax
	.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), %rax
	movl	12(%rax), %edi
	callq	_VIDDCVdp2SetResolution
	movq	(%rbx), %rax
	movl	(%rax), %edi
	andl	$7, %edi
	callq	_VIDDCVdp2SetPriorityNBG0
	movq	(%rbx), %rax
	movl	(%rax), %edi
	shrl	$8, %edi
	andl	$7, %edi
	callq	_VIDDCVdp2SetPriorityNBG1
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	andl	$7, %edi
	callq	_VIDDCVdp2SetPriorityNBG2
	movq	(%rbx), %rax
	movl	4(%rax), %edi
	shrl	$8, %edi
	andl	$7, %edi
	callq	_VIDDCVdp2SetPriorityNBG3
	movq	(%rbx), %rax
	movl	8(%rax), %edi
	andl	$7, %edi
	callq	_VIDDCVdp2SetPriorityRBG0
	movq	_vdp2_fbs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_vdp2_fb@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	movq	_vdp2_fbnum@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	movl	$1, %ebx
	movq	_dmadone@GOTPCREL(%rip), %r14
	movq	_cur_vdp2@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$8, %ebx
	je	LBB0_14
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_nbg3priority@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_Vdp2DrawNBG3
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movl	$262144, %esi                   ## imm = 0x40000
	callq	_dcache_flush_range
	movq	%r14, %rdi
	callq	_sem_wait
	movq	(%r12), %rdi
	movl	(%r15), %esi
	movq	_dma_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$262144, %edx                   ## imm = 0x40000
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_pvr_txr_load_dma
	movl	%ebx, %edi
	callq	_Vdp2Draw
	addq	$262144, (%r15)                 ## imm = 0x40000
	movslq	(%r13), %rax
	xorq	$1, %rax
	movl	%eax, (%r13)
	movq	_vdp2_fbs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%r12)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_nbg2priority@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_Vdp2DrawNBG2
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movl	$262144, %esi                   ## imm = 0x40000
	callq	_dcache_flush_range
	movq	%r14, %rdi
	callq	_sem_wait
	movq	(%r12), %rdi
	movl	(%r15), %esi
	movq	_dma_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$262144, %edx                   ## imm = 0x40000
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_pvr_txr_load_dma
	movl	%ebx, %edi
	callq	_Vdp2Draw
	addq	$262144, (%r15)                 ## imm = 0x40000
	movslq	(%r13), %rax
	xorq	$1, %rax
	movl	%eax, (%r13)
	movq	_vdp2_fbs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%r12)
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_nbg1priority@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_Vdp2DrawNBG1
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movl	$262144, %esi                   ## imm = 0x40000
	callq	_dcache_flush_range
	movq	%r14, %rdi
	callq	_sem_wait
	movq	(%r12), %rdi
	movl	(%r15), %esi
	movq	_dma_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$262144, %edx                   ## imm = 0x40000
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_pvr_txr_load_dma
	movl	%ebx, %edi
	callq	_Vdp2Draw
	addq	$262144, (%r15)                 ## imm = 0x40000
	movslq	(%r13), %rax
	xorq	$1, %rax
	movl	%eax, (%r13)
	movq	_vdp2_fbs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%r12)
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_nbg0priority@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_Vdp2DrawNBG0
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movl	$262144, %esi                   ## imm = 0x40000
	callq	_dcache_flush_range
	movq	%r14, %rdi
	callq	_sem_wait
	movq	(%r12), %rdi
	movl	(%r15), %esi
	movq	_dma_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$262144, %edx                   ## imm = 0x40000
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_pvr_txr_load_dma
	movl	%ebx, %edi
	callq	_Vdp2Draw
	addq	$262144, (%r15)                 ## imm = 0x40000
	movslq	(%r13), %rax
	xorq	$1, %rax
	movl	%eax, (%r13)
	movq	_vdp2_fbs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%r12)
	jmp	LBB0_13
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp2Regs,8,3                   ## @Vdp2Regs
	.comm	_vdp2_fbs,8,3                   ## @vdp2_fbs
	.comm	_vdp2_fb,8,3                    ## @vdp2_fb
	.comm	_vdp2_fbnum,4,2                 ## @vdp2_fbnum
	.comm	_nbg3priority,4,2               ## @nbg3priority
	.comm	_dmadone,4,2                    ## @dmadone
	.comm	_cur_vdp2,8,3                   ## @cur_vdp2
	.comm	_dma_callback,4,2               ## @dma_callback
	.comm	_nbg2priority,4,2               ## @nbg2priority
	.comm	_nbg1priority,4,2               ## @nbg1priority
	.comm	_nbg0priority,4,2               ## @nbg0priority
	.no_dead_strip	_VIDDCVdp2DrawScreens
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function VIDDCVdp2DrawScreens
_VIDDCVdp2DrawScreens:                  ; @VIDDCVdp2DrawScreens
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x19, _Vdp2Regs@GOTPAGE
Lloh1:
	ldr	x19, [x19, _Vdp2Regs@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	w0, [x8, #12]
	bl	_VIDDCVdp2SetResolution
	ldr	x8, [x19]
	ldr	w8, [x8]
	and	w0, w8, #0x7
	bl	_VIDDCVdp2SetPriorityNBG0
	ldr	x8, [x19]
	ldr	w8, [x8]
	ubfx	w0, w8, #8, #3
	bl	_VIDDCVdp2SetPriorityNBG1
	ldr	x8, [x19]
	ldr	w8, [x8, #4]
	and	w0, w8, #0x7
	bl	_VIDDCVdp2SetPriorityNBG2
	ldr	x8, [x19]
	ldr	w8, [x8, #4]
	ubfx	w0, w8, #8, #3
	bl	_VIDDCVdp2SetPriorityNBG3
	ldr	x8, [x19]
	ldr	w8, [x8, #8]
	and	w0, w8, #0x7
	bl	_VIDDCVdp2SetPriorityRBG0
Lloh2:
	adrp	x21, _vdp2_fbs@GOTPAGE
Lloh3:
	ldr	x21, [x21, _vdp2_fbs@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x8, [x8]
Lloh4:
	adrp	x22, _vdp2_fb@GOTPAGE
Lloh5:
	ldr	x22, [x22, _vdp2_fb@GOTPAGEOFF]
	str	x8, [x22]
Lloh6:
	adrp	x23, _vdp2_fbnum@GOTPAGE
Lloh7:
	ldr	x23, [x23, _vdp2_fbnum@GOTPAGEOFF]
	str	wzr, [x23]
	mov	w19, #1
Lloh8:
	adrp	x20, _dmadone@GOTPAGE
Lloh9:
	ldr	x20, [x20, _dmadone@GOTPAGEOFF]
Lloh10:
	adrp	x25, _cur_vdp2@GOTPAGE
Lloh11:
	ldr	x25, [x25, _cur_vdp2@GOTPAGEOFF]
Lloh12:
	adrp	x26, _dma_callback@GOTPAGE
Lloh13:
	ldr	x26, [x26, _dma_callback@GOTPAGEOFF]
Lloh14:
	adrp	x27, _nbg2priority@GOTPAGE
Lloh15:
	ldr	x27, [x27, _nbg2priority@GOTPAGEOFF]
Lloh16:
	adrp	x28, _nbg1priority@GOTPAGE
Lloh17:
	ldr	x28, [x28, _nbg1priority@GOTPAGEOFF]
Lloh18:
	adrp	x24, _nbg0priority@GOTPAGE
Lloh19:
	ldr	x24, [x24, _nbg0priority@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w19, w19, #1
	cmp	w19, #8
	b.eq	LBB0_14
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
Lloh20:
	adrp	x8, _nbg3priority@GOTPAGE
Lloh21:
	ldr	x8, [x8, _nbg3priority@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_Vdp2DrawNBG3
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	w1, #262144
	bl	_dcache_flush_range
	mov	x0, x20
	bl	_sem_wait
	ldr	x0, [x22]
	ldr	w1, [x25]
	ldr	w4, [x26]
	mov	w2, #262144
	mov	w3, #0
	mov	w5, #0
	bl	_pvr_txr_load_dma
	mov	x0, x19
	bl	_Vdp2Draw
	ldr	x8, [x25]
	add	x8, x8, #64, lsl #12            ; =262144
	str	x8, [x25]
	ldrsw	x8, [x23]
	eor	x8, x8, #0x1
	str	w8, [x23]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x22]
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x27]
	cmp	w19, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_Vdp2DrawNBG2
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	w1, #262144
	bl	_dcache_flush_range
	mov	x0, x20
	bl	_sem_wait
	ldr	x0, [x22]
	ldr	w1, [x25]
	ldr	w4, [x26]
	mov	w2, #262144
	mov	w3, #0
	mov	w5, #0
	bl	_pvr_txr_load_dma
	mov	x0, x19
	bl	_Vdp2Draw
	ldr	x8, [x25]
	add	x8, x8, #64, lsl #12            ; =262144
	str	x8, [x25]
	ldrsw	x8, [x23]
	eor	x8, x8, #0x1
	str	w8, [x23]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x22]
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28]
	cmp	w19, w8
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_Vdp2DrawNBG1
	cbz	x0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	w1, #262144
	bl	_dcache_flush_range
	mov	x0, x20
	bl	_sem_wait
	ldr	x0, [x22]
	ldr	w1, [x25]
	ldr	w4, [x26]
	mov	w2, #262144
	mov	w3, #0
	mov	w5, #0
	bl	_pvr_txr_load_dma
	mov	x0, x19
	bl	_Vdp2Draw
	ldr	x8, [x25]
	add	x8, x8, #64, lsl #12            ; =262144
	str	x8, [x25]
	ldrsw	x8, [x23]
	eor	x8, x8, #0x1
	str	w8, [x23]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x22]
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
	cmp	w19, w8
	b.ne	LBB0_1
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_Vdp2DrawNBG0
	cbz	x0, LBB0_1
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22]
	mov	w1, #262144
	bl	_dcache_flush_range
	mov	x0, x20
	bl	_sem_wait
	ldr	x0, [x22]
	ldr	w1, [x25]
	ldr	w4, [x26]
	mov	w2, #262144
	mov	w3, #0
	mov	w5, #0
	bl	_pvr_txr_load_dma
	mov	x0, x19
	bl	_Vdp2Draw
	ldr	x8, [x25]
	add	x8, x8, #64, lsl #12            ; =262144
	str	x8, [x25]
	ldrsw	x8, [x23]
	eor	x8, x8, #0x1
	str	w8, [x23]
	ldr	x9, [x21]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x22]
	b	LBB0_1
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp2Regs,8,3                   ; @Vdp2Regs
	.comm	_vdp2_fbs,8,3                   ; @vdp2_fbs
	.comm	_vdp2_fb,8,3                    ; @vdp2_fb
	.comm	_vdp2_fbnum,4,2                 ; @vdp2_fbnum
	.comm	_nbg3priority,4,2               ; @nbg3priority
	.comm	_dmadone,4,2                    ; @dmadone
	.comm	_cur_vdp2,8,3                   ; @cur_vdp2
	.comm	_dma_callback,4,2               ; @dma_callback
	.comm	_nbg2priority,4,2               ; @nbg2priority
	.comm	_nbg1priority,4,2               ; @nbg1priority
	.comm	_nbg0priority,4,2               ; @nbg0priority
	.no_dead_strip	_VIDDCVdp2DrawScreens
.subsections_via_symbols
