	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function Vdp2DrawNBG0
LCPI0_0:
	.long	0x47800000                      ## float 65536
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_Vdp2DrawNBG0:                          ## @Vdp2DrawNBG0
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$144, %rsp
	movq	_Vdp2Regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%rcx), %eax
	movl	%eax, %edx
	andl	$1, %edx
	movl	%edx, -144(%rbp)
	movq	_Vdp2External@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	testl	$256, %eax                      ## imm = 0x100
	sete	%dl
	movl	%edx, -140(%rbp)
	movl	4(%rcx), %eax
	andl	$3, %eax
	movl	%eax, -136(%rbp)
	movl	8(%rcx), %edi
	movl	%edi, %eax
	shrl	$4, %eax
	andl	$7, %eax
	movl	%eax, -132(%rbp)
	movl	%edi, %r8d
	andl	$2, %r8d
	movl	%r8d, -128(%rbp)
	jne	LBB0_3
## %bb.4:
	movl	$2, -100(%rbp)
	movl	28(%rcx), %eax
	andl	$3, %eax
	cmpl	$3, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$1, %eax
	je	LBB0_7
## %bb.6:
	testl	%eax, %eax
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -96(%rbp)
	movw	$512, %r9w                      ## imm = 0x200
	movw	$512, %r10w                     ## imm = 0x200
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_3:
	andl	$12, %edi
	leaq	L_switch.table.Vdp2DrawNBG0(%rip), %rax
	movl	(%rdi,%rax), %esi
	leaq	L_switch.table.Vdp2DrawNBG0.1(%rip), %rax
	movl	(%rdi,%rax), %edi
	movl	%esi, -124(%rbp)
	movl	%edi, -120(%rbp)
	movzwl	12(%rcx), %eax
	andl	$2047, %eax                     ## imm = 0x7FF
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%si
	movzwl	%dx, %eax
	negl	%eax
	movl	%eax, -116(%rbp)
	movzwl	16(%rcx), %eax
	andl	$2047, %eax                     ## imm = 0x7FF
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%di
	movzwl	%dx, %eax
	negl	%eax
	movl	%eax, -112(%rbp)
	movl	20(%rcx), %eax
	andl	$7, %eax
	shll	$17, %eax
	movl	%eax, -108(%rbp)
	movl	24(%rcx), %eax
	andl	$7, %eax
	shll	$8, %eax
	movl	%eax, -104(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -16(%rbp)
	jmp	LBB0_10
LBB0_8:
	movabsq	$8589934594, %rax               ## imm = 0x200000002
	movq	%rax, -96(%rbp)
	movw	$1024, %r9w                     ## imm = 0x400
	movw	$1024, %r10w                    ## imm = 0x400
	jmp	LBB0_9
LBB0_7:
	movabsq	$4294967298, %rax               ## imm = 0x100000002
	movq	%rax, -96(%rbp)
	movw	$1024, %r10w                    ## imm = 0x400
	movw	$512, %r9w                      ## imm = 0x200
LBB0_9:
	movzwl	12(%rcx), %eax
	andl	$2047, %eax                     ## imm = 0x7FF
	xorl	%esi, %esi
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%r10w
	movzwl	%dx, %eax
	negl	%eax
	movl	%eax, -116(%rbp)
	movzwl	16(%rcx), %eax
	andl	$2047, %eax                     ## imm = 0x7FF
                                        ## kill: def $ax killed $ax killed $eax
	xorl	%edx, %edx
	divw	%r9w
	movzwl	%dx, %eax
	negl	%eax
	movl	%eax, -112(%rbp)
	movl	32(%rcx), %edx
	movl	%edx, %eax
	andl	$32768, %eax                    ## imm = 0x8000
	cmpl	$1, %eax
	adcl	$1, %esi
	movl	%esi, -88(%rbp)
	andl	$1, %edi
	incl	%edi
	movl	%edi, -84(%rbp)
	movb	$64, %al
	movzbl	%al, %eax
	divb	%dil
	movzbl	%al, %eax
	movl	%eax, -80(%rbp)
	movabsq	$34359738376, %rax              ## imm = 0x800000008
	movq	%rax, -124(%rbp)
	movl	%edx, %eax
	andl	$1023, %eax                     ## imm = 0x3FF
	movl	%eax, -76(%rbp)
	shrl	$14, %edx
	andl	$1, %edx
	movl	%edx, -72(%rbp)
LBB0_10:
	movl	36(%rcx), %eax
	movl	$255, %edx
	testb	$1, %al
	je	LBB0_12
## %bb.11:
	movl	40(%rcx), %edx
	shll	$3, %edx
	notl	%edx
	movzbl	%dl, %edx
LBB0_12:
	movl	%edx, -68(%rbp)
	movl	44(%rcx), %edx
	andl	$7, %edx
	shll	$8, %edx
	movl	%edx, -64(%rbp)
	testb	$1, 48(%rcx)
	jne	LBB0_13
## %bb.21:
	testb	$1, %al
	jne	LBB0_22
## %bb.23:
	movq	_DoNothing@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_13:
	testb	$1, 52(%rcx)
	jne	LBB0_14
## %bb.15:
	movl	68(%rcx), %eax
	movzbl	%al, %edx
	shll	$23, %eax
	sarl	$31, %eax
	andl	$-256, %eax
	orl	%edx, %eax
	movl	%eax, -60(%rbp)
	movl	72(%rcx), %eax
	movzbl	%al, %edx
	shll	$23, %eax
	sarl	$31, %eax
	andl	$-256, %eax
	orl	%edx, %eax
	movl	%eax, -56(%rbp)
	movl	76(%rcx), %eax
	jmp	LBB0_16
LBB0_22:
	movq	_DoColorCalc@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_14:
	movl	56(%rcx), %eax
	movzbl	%al, %edx
	shll	$23, %eax
	sarl	$31, %eax
	andl	$-256, %eax
	orl	%edx, %eax
	movl	%eax, -60(%rbp)
	movl	60(%rcx), %eax
	movzbl	%al, %edx
	shll	$23, %eax
	sarl	$31, %eax
	andl	$-256, %eax
	orl	%edx, %eax
	movl	%eax, -56(%rbp)
	movl	64(%rcx), %eax
LBB0_16:
	movzbl	%al, %edx
	movl	%edx, -52(%rbp)
	testl	$256, %eax                      ## imm = 0x100
	je	LBB0_18
## %bb.17:
	orl	$-256, %eax
	movl	%eax, -52(%rbp)
LBB0_18:
	testb	$1, 36(%rcx)
	jne	LBB0_19
## %bb.20:
	movq	_DoColorOffset@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_19:
	movq	_DoColorCalcWithColorOffset@GOTPCREL(%rip), %rax
LBB0_24:
	movq	%rax, -24(%rbp)
	movl	$524032, %eax                   ## imm = 0x7FF00
	movl	84(%rcx), %edx
	andl	%eax, %edx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	divss	%xmm0, %xmm2
	movss	%xmm2, -48(%rbp)
	andl	80(%rcx), %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	%xmm0, %xmm1
	movss	%xmm1, -44(%rbp)
	movq	_nbg0priority@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_Vdp2NBG0PlaneAddr@GOTPCREL(%rip), %rax
	movq	%rax, -40(%rbp)
	leaq	-144(%rbp), %rdi
	testl	%r8d, %r8d
	jne	LBB0_25
## %bb.26:
	callq	_Vdp2DrawMap
	jmp	LBB0_27
LBB0_25:
	callq	_Vdp2DrawScrollBitmap
LBB0_27:
	movl	$1, %eax
LBB0_28:
	addq	$144, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp2Regs,8,3                   ## @Vdp2Regs
	.comm	_Vdp2External,4,2               ## @Vdp2External
	.comm	_DoColorCalcWithColorOffset,4,2 ## @DoColorCalcWithColorOffset
	.comm	_DoColorOffset,4,2              ## @DoColorOffset
	.comm	_DoColorCalc,4,2                ## @DoColorCalc
	.comm	_DoNothing,4,2                  ## @DoNothing
	.comm	_nbg0priority,4,2               ## @nbg0priority
	.comm	_Vdp2NBG0PlaneAddr,4,2          ## @Vdp2NBG0PlaneAddr
	.no_dead_strip	_Vdp2DrawNBG0
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.Vdp2DrawNBG0
L_switch.table.Vdp2DrawNBG0:
	.long	512                             ## 0x200
	.long	512                             ## 0x200
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400

	.p2align	2                               ## @switch.table.Vdp2DrawNBG0.1
L_switch.table.Vdp2DrawNBG0.1:
	.long	256                             ## 0x100
	.long	512                             ## 0x200
	.long	256                             ## 0x100
	.long	512                             ## 0x200

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function Vdp2DrawNBG0
lCPI0_0:
	.long	17                              ; 0x11
	.long	8                               ; 0x8
lCPI0_1:
	.long	917504                          ; 0xe0000
	.long	1792                            ; 0x700
lCPI0_2:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_Vdp2DrawNBG0:                          ; @Vdp2DrawNBG0
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _Vdp2Regs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Vdp2Regs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8]
	and	w10, w9, #0x1
	str	w10, [sp]
Lloh3:
	adrp	x11, _Vdp2External@GOTPAGE
Lloh4:
	ldr	x11, [x11, _Vdp2External@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.1:
	mov	w10, #1
	bic	w9, w10, w9, lsr #8
	str	w9, [sp, #4]
	ldr	w9, [x8, #4]
	and	w9, w9, #0x3
	str	w9, [sp, #8]
	ldr	w10, [x8, #8]
	ubfx	w11, w10, #4, #3
	and	w9, w10, #0x2
	stp	w11, w9, [sp, #12]
	tbnz	w10, #1, LBB0_6
; %bb.2:
	mov	w11, #2
	str	w11, [sp, #44]
	ldr	w11, [x8, #28]
	and	w11, w11, #0x3
	cmp	w11, #3
	b.eq	LBB0_8
; %bb.3:
	cmp	w11, #1
	b.ne	LBB0_9
; %bb.4:
Lloh6:
	adrp	x11, lCPI0_2@PAGE
Lloh7:
	ldr	d0, [x11, lCPI0_2@PAGEOFF]
	mov	w12, #1024
	mov	w11, #512
	b	LBB0_10
LBB0_5:
	mov	w0, #0
	b	LBB0_28
LBB0_6:
	ubfx	x10, x10, #2, #2
	lsl	x10, x10, #2
Lloh8:
	adrp	x11, l_switch.table.Vdp2DrawNBG0@PAGE
Lloh9:
	add	x11, x11, l_switch.table.Vdp2DrawNBG0@PAGEOFF
	ldr	w11, [x11, x10]
Lloh10:
	adrp	x12, l_switch.table.Vdp2DrawNBG0.1@PAGE
Lloh11:
	add	x12, x12, l_switch.table.Vdp2DrawNBG0.1@PAGEOFF
	ldr	w10, [x12, x10]
	stp	w11, w10, [sp, #20]
	ldrh	w12, [x8, #12]
	and	w12, w12, #0x7ff
	and	w11, w11, #0xffff
	udiv	w13, w12, w11
	neg	w12, w12
	madd	w11, w13, w11, w12
	str	w11, [sp, #28]
	ldrh	w11, [x8, #16]
	and	w11, w11, #0x7ff
	and	w10, w10, #0xffff
	udiv	w12, w11, w10
	neg	w11, w11
	madd	w10, w12, w10, w11
	str	w10, [sp, #32]
	ldur	d0, [x8, #20]
Lloh12:
	adrp	x10, lCPI0_0@PAGE
Lloh13:
	ldr	d1, [x10, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
Lloh14:
	adrp	x10, lCPI0_1@PAGE
Lloh15:
	ldr	d1, [x10, lCPI0_1@PAGEOFF]
	and.8b	v0, v0, v1
	stur	d0, [sp, #36]
	stp	xzr, xzr, [sp, #128]
	ldr	w10, [x8, #36]
	tbz	w10, #0, LBB0_11
LBB0_7:
	ldr	w11, [x8, #40]
	ubfiz	w11, w11, #3, #5
	eor	w11, w11, #0xff
	b	LBB0_12
LBB0_8:
	mov	w11, #1024
	movi.2s	v0, #2
	mov	w12, #1024
	b	LBB0_10
LBB0_9:
	mov	w11, #512
	movi.2s	v0, #1
	mov	w12, #512
LBB0_10:
	str	d0, [sp, #48]
	ldrh	w13, [x8, #12]
	and	w13, w13, #0x7ff
	udiv	w14, w13, w12
	neg	w13, w13
	madd	w12, w14, w12, w13
	str	w12, [sp, #28]
	ldrh	w12, [x8, #16]
	and	w12, w12, #0x7ff
	udiv	w13, w12, w11
	neg	w12, w12
	madd	w11, w13, w11, w12
	str	w11, [sp, #32]
	ldr	w11, [x8, #32]
	tst	w11, #0x8000
	mov	w12, #1
	cinc	w13, w12, eq
	tst	w10, #0x1
	cinc	w10, w12, ne
	stp	w13, w10, [sp, #56]
	mov	w12, #64
	udiv	w10, w12, w10
	movi.2s	v0, #8
	stur	d0, [sp, #20]
	and	w12, w11, #0x3ff
	stp	w10, w12, [sp, #64]
	ubfx	w10, w11, #14, #1
	str	w10, [sp, #72]
	ldr	w10, [x8, #36]
	tbnz	w10, #0, LBB0_7
LBB0_11:
	mov	w11, #255
LBB0_12:
	str	w11, [sp, #76]
	ldr	w11, [x8, #44]
	ubfiz	w11, w11, #8, #3
	str	w11, [sp, #80]
	ldrb	w11, [x8, #48]
	tbnz	w11, #0, LBB0_15
; %bb.13:
	tbnz	w10, #0, LBB0_17
; %bb.14:
Lloh16:
	adrp	x10, _DoNothing@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DoNothing@GOTPAGEOFF]
	b	LBB0_24
LBB0_15:
	ldrb	w10, [x8, #52]
	tbnz	w10, #0, LBB0_18
; %bb.16:
	ldur	d0, [x8, #68]
	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, v1, v0
	stur	d0, [sp, #84]
	ldr	w10, [x8, #76]
	b	LBB0_19
LBB0_17:
Lloh18:
	adrp	x10, _DoColorCalc@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DoColorCalc@GOTPAGEOFF]
	b	LBB0_24
LBB0_18:
	ldr	d0, [x8, #56]
	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, v1, v0
	stur	d0, [sp, #84]
	ldr	w10, [x8, #64]
LBB0_19:
	and	w11, w10, #0xff
	str	w11, [sp, #92]
	tbz	w10, #8, LBB0_21
; %bb.20:
	orr	w10, w10, #0xffffff00
	str	w10, [sp, #92]
LBB0_21:
	ldrb	w10, [x8, #36]
	tbnz	w10, #0, LBB0_23
; %bb.22:
Lloh20:
	adrp	x10, _DoColorOffset@GOTPAGE
Lloh21:
	ldr	x10, [x10, _DoColorOffset@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh22:
	adrp	x10, _DoColorCalcWithColorOffset@GOTPAGE
Lloh23:
	ldr	x10, [x10, _DoColorCalcWithColorOffset@GOTPAGEOFF]
LBB0_24:
	str	x10, [sp, #120]
	ldr	d0, [x8, #80]
	mov	w8, #524032
	dup.2s	v1, w8
	and.8b	v0, v0, v1
	scvtf.2s	v0, v0
	mov	w8, #1199570944
	dup.2s	v1, w8
	fdiv.2s	v0, v1, v0
	rev64.2s	v0, v0
Lloh24:
	adrp	x8, _nbg0priority@GOTPAGE
Lloh25:
	ldr	x8, [x8, _nbg0priority@GOTPAGEOFF]
	str	d0, [sp, #96]
Lloh26:
	ldr	w8, [x8]
	str	w8, [sp, #112]
Lloh27:
	adrp	x8, _Vdp2NBG0PlaneAddr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _Vdp2NBG0PlaneAddr@GOTPAGEOFF]
	str	x8, [sp, #104]
	mov	x0, sp
	cbnz	w9, LBB0_26
; %bb.25:
	bl	_Vdp2DrawMap
	b	LBB0_27
LBB0_26:
	bl	_Vdp2DrawScrollBitmap
LBB0_27:
	mov	w0, #1
LBB0_28:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp2Regs,8,3                   ; @Vdp2Regs
	.comm	_Vdp2External,4,2               ; @Vdp2External
	.comm	_DoColorCalcWithColorOffset,4,2 ; @DoColorCalcWithColorOffset
	.comm	_DoColorOffset,4,2              ; @DoColorOffset
	.comm	_DoColorCalc,4,2                ; @DoColorCalc
	.comm	_DoNothing,4,2                  ; @DoNothing
	.comm	_nbg0priority,4,2               ; @nbg0priority
	.comm	_Vdp2NBG0PlaneAddr,4,2          ; @Vdp2NBG0PlaneAddr
	.no_dead_strip	_Vdp2DrawNBG0
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.Vdp2DrawNBG0
l_switch.table.Vdp2DrawNBG0:
	.long	512                             ; 0x200
	.long	512                             ; 0x200
	.long	1024                            ; 0x400
	.long	1024                            ; 0x400

	.p2align	2                               ; @switch.table.Vdp2DrawNBG0.1
l_switch.table.Vdp2DrawNBG0.1:
	.long	256                             ; 0x100
	.long	512                             ; 0x200
	.long	256                             ; 0x100
	.long	512                             ; 0x200

.subsections_via_symbols
