	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p32x_vdp_write8
_p32x_vdp_write8:                       ## @p32x_vdp_write8
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $edi killed $edi def $rdi
	andl	$15, %edi
	decl	%edi
	rorl	%edi
	cmpl	$5, %edi
	ja	LBB0_11
## %bb.1:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdi,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movl	(%rbx), %ecx
	movl	%ecx, %edx
	xorl	%esi, %edx
	movq	_P32XV_PRI@GOTPCREL(%rip), %rdi
	testl	%edx, (%rdi)
	je	LBB0_4
## %bb.3:
	movl	$1, 8(%rax)
	movl	(%rbx), %ecx
LBB0_4:
	movq	_P32XV_nPAL@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movzbl	%sil, %eax
	orl	%ecx, %eax
	movl	%eax, (%rbx)
	jmp	LBB0_11
LBB0_10:
	andl	$1, %esi
	movl	%esi, 4(%rbx)
	jmp	LBB0_11
LBB0_5:
	movzbl	%sil, %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_11
LBB0_6:
	andl	$1, %esi
	movl	%esi, 12(%rax)
	movl	20(%rbx), %eax
	movq	_P32XV_VBLK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_P32XV_Mx@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	jne	LBB0_11
LBB0_8:
	movl	%eax, %edx
	xorl	%esi, %edx
	movq	_P32XV_FS@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%edx, %ecx
	je	LBB0_11
## %bb.9:
	xorl	%eax, %ecx
	movl	%ecx, 20(%rbx)
	xorl	$1, %esi
	movl	%esi, %edi
	callq	_Pico32xSwapDRAM
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	andl	20(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_5
	.long	L0_0_set_11
	.long	L0_0_set_11
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_P32XV_PRI,4,2                  ## @P32XV_PRI
	.comm	_P32XV_nPAL,4,2                 ## @P32XV_nPAL
	.comm	_P32XV_VBLK,4,2                 ## @P32XV_VBLK
	.comm	_P32XV_Mx,4,2                   ## @P32XV_Mx
	.comm	_P32XV_FS,4,2                   ## @P32XV_FS
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VDP FS: %d"

	.no_dead_strip	_p32x_vdp_write8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p32x_vdp_write8
_p32x_vdp_write8:                       ; @p32x_vdp_write8
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	and	w8, w0, #0xf
	sub	w8, w8, #1
	ror	w8, w8, #1
	cmp	w8, #5
	b.hi	LBB0_11
; %bb.1:
Lloh0:
	adrp	x9, _Pico32x@GOTPAGE
Lloh1:
	ldr	x9, [x9, _Pico32x@GOTPAGEOFF]
	ldr	x19, [x9]
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x8]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	ldr	w8, [x19]
	eor	w10, w8, w1
Lloh4:
	adrp	x11, _P32XV_PRI@GOTPAGE
Lloh5:
	ldr	x11, [x11, _P32XV_PRI@GOTPAGEOFF]
Lloh6:
	ldr	w11, [x11]
	tst	w10, w11
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x9, #8]
	ldr	w8, [x19]
LBB0_4:
Lloh7:
	adrp	x9, _P32XV_nPAL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _P32XV_nPAL@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	and	w8, w9, w8
	and	w9, w1, #0xff
	orr	w8, w8, w9
	str	w8, [x19]
	b	LBB0_11
LBB0_5:
	and	w8, w1, #0x1
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_6:
	and	w8, w1, #0xff
	str	w8, [x19, #8]
	b	LBB0_11
LBB0_7:
	and	w8, w1, #0x1
	str	w8, [x9, #12]
	ldr	w9, [x19, #20]
Lloh10:
	adrp	x10, _P32XV_VBLK@GOTPAGE
Lloh11:
	ldr	x10, [x10, _P32XV_VBLK@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_9
; %bb.8:
	ldr	w10, [x19]
Lloh13:
	adrp	x11, _P32XV_Mx@GOTPAGE
Lloh14:
	ldr	x11, [x11, _P32XV_Mx@GOTPAGEOFF]
Lloh15:
	ldr	w11, [x11]
	tst	w11, w10
	b.ne	LBB0_11
LBB0_9:
	eor	w11, w9, w8
Lloh16:
	adrp	x20, _P32XV_FS@GOTPAGE
Lloh17:
	ldr	x20, [x20, _P32XV_FS@GOTPAGEOFF]
	ldr	w10, [x20]
	tst	w10, w11
	b.eq	LBB0_11
; %bb.10:
	eor	w9, w10, w9
	str	w9, [x19, #20]
	eor	w0, w8, #0x1
	bl	_Pico32xSwapDRAM
Lloh18:
	adrp	x8, _EL_32X@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EL_32X@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w8, [x19, #20]
	ldr	w9, [x20]
	and	w2, w9, w8
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_elprintf
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_P32XV_PRI,4,2                  ; @P32XV_PRI
	.comm	_P32XV_nPAL,4,2                 ; @P32XV_nPAL
	.comm	_P32XV_VBLK,4,2                 ; @P32XV_VBLK
	.comm	_P32XV_Mx,4,2                   ; @P32XV_Mx
	.comm	_P32XV_FS,4,2                   ; @P32XV_FS
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VDP FS: %d"

	.no_dead_strip	_p32x_vdp_write8
.subsections_via_symbols
