	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PicoWrite8_vdp
_PicoWrite8_vdp:                        ## @PicoWrite8_vdp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	andl	$249, %eax
	cmpl	$17, %eax
	jne	LBB0_3
## %bb.1:
	movq	_PicoOpt@GOTPCREL(%rip), %rax
	movq	_POPT_EN_PSG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.2:
	movl	%esi, %edi
	popq	%rbp
	jmp	_SN76496Write                   ## TAILCALL
LBB0_3:
	movl	%edi, %edx
	testb	$-32, %dl
	je	LBB0_6
## %bb.4:
	movq	_EL_UIO@GOTPCREL(%rip), %rax
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movzbl	%sil, %ecx
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_5:
	popq	%rbp
	retq
LBB0_6:
	movzbl	%sil, %eax
	movl	%eax, %esi
	shll	$8, %esi
	orl	%eax, %esi
	movl	%edx, %edi
	popq	%rbp
	jmp	_PicoVideoWrite                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_EN_PSG,4,2                ## @POPT_EN_PSG
	.comm	_EL_UIO,4,2                     ## @EL_UIO
	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"68k bad write [%06x] %02x @%06x"

	.comm	_SekPc,4,2                      ## @SekPc
	.no_dead_strip	_PicoWrite8_vdp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PicoWrite8_vdp
_PicoWrite8_vdp:                        ; @PicoWrite8_vdp
	.cfi_startproc
; %bb.0:
	mov	w8, #249
	and	w8, w0, w8
	cmp	w8, #17
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _POPT_EN_PSG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _POPT_EN_PSG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	mov	x0, x1
	b	_SN76496Write
LBB0_3:
	mov	x2, x0
	tst	w0, #0xe0
	b.eq	LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _EL_UIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EL_UIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EL_ANOMALY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EL_ANOMALY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	and	w3, w1, #0xff
Lloh12:
	adrp	x8, _SekPc@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SekPc@GOTPAGEOFF]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
Lloh16:
	ldr	w4, [x8]
	b	_elprintf
LBB0_5:
	ret
LBB0_6:
	and	w1, w1, #0xff
	bfi	w1, w1, #8, #8
	mov	x0, x2
	b	_PicoVideoWrite
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_EN_PSG,4,2                ; @POPT_EN_PSG
	.comm	_EL_UIO,4,2                     ; @EL_UIO
	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"68k bad write [%06x] %02x @%06x"

	.comm	_SekPc,4,2                      ; @SekPc
	.no_dead_strip	_PicoWrite8_vdp
.subsections_via_symbols
