	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Vdp2PatternAddr
_Vdp2PatternAddr:                       ## @Vdp2PatternAddr
	.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
	movq	%rdi, %r14
	movl	(%rdi), %eax
	cmpl	$2, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$1, %eax
	jne	LBB0_19
## %bb.2:
	movq	_Vdp2Ram@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	callq	_T1ReadWord
	addl	$2, 4(%r14)
                                        ## kill: def $eax killed $eax def $rax
	movl	12(%r14), %ecx
	movl	%ecx, %edx
	shrl	$9, %edx
	andl	$1, %edx
	movl	%edx, 8(%r14)
	cmpl	$0, 36(%r14)
	je	LBB0_5
## %bb.3:
	movl	%eax, %edx
	shrl	$4, %edx
	andl	$1792, %edx                     ## imm = 0x700
	jmp	LBB0_6
LBB0_4:
	movq	_Vdp2Ram@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	4(%r14), %esi
	callq	_T1ReadWord
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	4(%r14), %esi
	addl	$2, %esi
	callq	_T1ReadWord
	addl	$4, 4(%r14)
	andl	$32767, %eax                    ## imm = 0x7FFF
	movl	%eax, 24(%r14)
	movl	%ebx, %eax
	shrl	$14, %eax
	andl	$3, %eax
	movl	%eax, 20(%r14)
	movl	%ebx, %eax
	andl	$127, %eax
	shll	$4, %eax
	movl	%eax, 16(%r14)
	shrl	$13, %ebx
	andl	$1, %ebx
	movl	%ebx, 8(%r14)
	jmp	LBB0_19
LBB0_5:
	movl	%eax, %edx
	shrl	$8, %edx
	andl	$240, %edx
	movl	%ecx, %esi
	andl	$224, %esi
	leal	(%rdx,%rsi,8), %edx
LBB0_6:
	movl	%edx, 16(%r14)
	movl	32(%r14), %edx
	cmpl	$1, %edx
	je	LBB0_11
## %bb.7:
	testl	%edx, %edx
	jne	LBB0_19
## %bb.8:
	movl	%eax, %edx
	shrl	$10, %edx
	andl	$3, %edx
	movl	%edx, 20(%r14)
	movl	28(%r14), %edx
	cmpl	$2, %edx
	je	LBB0_15
## %bb.9:
	cmpl	$1, %edx
	jne	LBB0_19
## %bb.10:
	andl	$1023, %eax                     ## imm = 0x3FF
	andl	$31, %ecx
	jmp	LBB0_14
LBB0_11:
	movl	$0, 20(%r14)
	movl	28(%r14), %edx
	cmpl	$2, %edx
	je	LBB0_16
## %bb.12:
	cmpl	$1, %edx
	jne	LBB0_19
## %bb.13:
	andl	$4095, %eax                     ## imm = 0xFFF
	andl	$28, %ecx
LBB0_14:
	shll	$10, %ecx
	orl	%eax, %ecx
	jmp	LBB0_18
LBB0_15:
	andl	$1023, %eax                     ## imm = 0x3FF
	movl	%ecx, %edx
	andl	$3, %edx
	leal	(%rdx,%rax,4), %eax
	andl	$28, %ecx
	jmp	LBB0_17
LBB0_16:
	andl	$4095, %eax                     ## imm = 0xFFF
	movl	%ecx, %edx
	andl	$3, %edx
	leal	(%rdx,%rax,4), %eax
	andl	$16, %ecx
LBB0_17:
	shll	$10, %ecx
	orl	%eax, %ecx
LBB0_18:
	movl	%ecx, 24(%r14)
LBB0_19:
	movq	_Vdp2Regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	24(%r14), %ecx
	shll	$5, %ecx
	movl	%ecx, %edx
	andl	$524256, %edx                   ## imm = 0x7FFE0
	testl	$32768, (%rax)                  ## imm = 0x8000
	cmovnel	%ecx, %edx
	movl	%edx, 24(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp2Ram,4,2                    ## @Vdp2Ram
	.comm	_Vdp2Regs,8,3                   ## @Vdp2Regs
	.no_dead_strip	_Vdp2PatternAddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Vdp2PatternAddr
_Vdp2PatternAddr:                       ; @Vdp2PatternAddr
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.1:
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _Vdp2Ram@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Vdp2Ram@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_T1ReadWord
	ldr	w8, [x19, #4]
	add	w9, w8, #2
	ldr	w8, [x19, #12]
	ubfx	w10, w8, #9, #1
	stp	w9, w10, [x19, #4]
	lsr	w9, w0, #4
	and	w10, w9, #0x700
	lsr	w9, w0, #8
	and	w11, w9, #0xf0
	lsr	w9, w8, #5
	bfi	w11, w9, #8, #3
	ldp	w9, w12, [x19, #32]
	cmp	w12, #0
	csel	w10, w10, w11, ne
	str	w10, [x19, #16]
	cmp	w9, #1
	b.eq	LBB0_9
; %bb.3:
	cbnz	w9, LBB0_8
; %bb.4:
	ubfx	w9, w0, #10, #2
	str	w9, [x19, #20]
	ldr	w9, [x19, #28]
	cmp	w9, #2
	b.eq	LBB0_12
; %bb.5:
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.6:
	and	w9, w0, #0x3ff
	bfi	w9, w8, #10, #5
	str	w9, [x19, #24]
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x21, _Vdp2Ram@GOTPAGE
Lloh4:
	ldr	x21, [x21, _Vdp2Ram@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x19, #4]
	bl	_T1ReadWord
	mov	x20, x0
	ldr	w0, [x21]
	ldr	w8, [x19, #4]
	add	w1, w8, #2
	bl	_T1ReadWord
	ldr	w8, [x19, #4]
	add	w8, w8, #4
	and	w11, w0, #0x7fff
	ubfx	w9, w20, #14, #2
	ubfiz	w10, w20, #4, #7
	stp	w9, w11, [x19, #20]
	str	w10, [x19, #16]
	ubfx	w9, w20, #13, #1
	stp	w8, w9, [x19, #4]
LBB0_8:
Lloh5:
	adrp	x8, _Vdp2Regs@GOTPAGE
Lloh6:
	ldr	x8, [x8, _Vdp2Regs@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	lsl	w9, w9, #5
	and	w10, w9, #0x7ffe0
	tst	w8, #0x8000
	csel	w8, w10, w9, eq
	str	w8, [x19, #24]
	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
	ret
LBB0_9:
	str	wzr, [x19, #20]
	ldr	w9, [x19, #28]
	cmp	w9, #2
	b.eq	LBB0_13
; %bb.10:
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.11:
	and	w9, w0, #0xfff
	lsr	w8, w8, #2
	bfi	w9, w8, #12, #3
	str	w9, [x19, #24]
	b	LBB0_8
LBB0_12:
	lsr	w9, w8, #2
	and	w8, w8, #0x3
	bfi	w8, w0, #2, #10
	bfi	w8, w9, #12, #3
	str	w8, [x19, #24]
	b	LBB0_8
LBB0_13:
	lsr	w9, w8, #4
	and	w8, w8, #0x3
	bfi	w8, w0, #2, #12
	bfi	w8, w9, #14, #1
	str	w8, [x19, #24]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp2Ram,4,2                    ; @Vdp2Ram
	.comm	_Vdp2Regs,8,3                   ; @Vdp2Regs
	.no_dead_strip	_Vdp2PatternAddr
.subsections_via_symbols
