	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PicoWrite16_32x_on
_PicoWrite16_32x_on:                    ## @PicoWrite16_32x_on
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movl	%edi, %eax
	andl	$64512, %eax                    ## imm = 0xFC00
	cmpl	$20480, %eax                    ## imm = 0x5000
	jne	LBB0_5
## %bb.1:
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movzwl	%r14w, %r15d
	movq	_SekPc@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_elprintf
	movl	%ebx, %eax
	andl	$65472, %eax                    ## imm = 0xFFC0
	cmpl	$20736, %eax                    ## imm = 0x5100
	je	LBB0_14
## %bb.2:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_P32XS_FM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_3
LBB0_15:
	movq	_EL_UIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_5:
	movl	%ebx, %eax
	andl	$65472, %eax                    ## imm = 0xFFC0
	cmpl	$20736, %eax                    ## imm = 0x5100
	jne	LBB0_6
LBB0_14:
	movl	%ebx, %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_reg_write16               ## TAILCALL
LBB0_6:
	movq	_PicoAHW@GOTPCREL(%rip), %rax
	movq	_PAHW_MCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_PicoWrite16_mcd_io
	cmpl	$10563824, %ebx                 ## imm = 0xA130F0
	je	LBB0_10
	jmp	LBB0_13
LBB0_3:
	movl	%ebx, %ecx
	andl	$65520, %ecx                    ## imm = 0xFFF0
	cmpl	$20864, %ecx                    ## imm = 0x5180
	jne	LBB0_11
## %bb.4:
	movl	%ebx, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p32x_vdp_write16               ## TAILCALL
LBB0_8:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_PicoWrite16_io
	cmpl	$10563824, %ebx                 ## imm = 0xA130F0
	jne	LBB0_13
LBB0_10:
	movq	_Pico32x@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bank_switch                    ## TAILCALL
LBB0_11:
	movl	%ebx, %ecx
	andl	$65024, %ecx                    ## imm = 0xFE00
	cmpl	$20992, %ecx                    ## imm = 0x5200
	jne	LBB0_15
## %bb.12:
	movq	_Pico32xMem@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	shrl	%ebx
	movzbl	%bl, %edx
	movl	%r14d, (%rcx,%rdx,4)
	movl	$1, 8(%rax)
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"m68k 32x w16 [%06x] %04x @%06x"

	.comm	_SekPc,4,2                      ## @SekPc
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_MCD,4,2                   ## @PAHW_MCD
	.comm	_Pico32x,16,3                   ## @Pico32x
	.comm	_P32XS_FM,4,2                   ## @P32XS_FM
	.comm	_Pico32xMem,8,3                 ## @Pico32xMem
	.comm	_EL_UIO,4,2                     ## @EL_UIO
L_.str.1:                               ## @.str.1
	.asciz	"m68k unmapped w16 [%06x] %04x @%06x"

	.no_dead_strip	_PicoWrite16_32x_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PicoWrite16_32x_on
_PicoWrite16_32x_on:                    ; @PicoWrite16_32x_on
	.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	x20, x1
	mov	x19, x0
	and	w8, w0, #0xfc00
	cmp	w8, #5, lsl #12                 ; =20480
	b.ne	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _EL_32X@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_32X@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	and	w21, w20, #0xffff
Lloh3:
	adrp	x22, _SekPc@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SekPc@GOTPAGEOFF]
	ldr	w4, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x21
	bl	_elprintf
	and	w8, w19, #0xffc0
	mov	w9, #20736
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.2:
Lloh7:
	adrp	x8, _Pico32x@GOTPAGE
Lloh8:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _P32XS_FM@GOTPAGE
Lloh10:
	ldr	x10, [x10, _P32XS_FM@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
LBB0_3:
Lloh12:
	adrp	x8, _EL_UIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EL_UIO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	ldr	w4, [x22]
	mov	x2, x19
	mov	x3, x21
	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
	b	_elprintf
LBB0_4:
	and	w8, w19, #0xffc0
	mov	w9, #20736
	cmp	w8, w9
	b.ne	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	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
	b	_p32x_reg_write16
LBB0_6:
Lloh17:
	adrp	x8, _PicoAHW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PicoAHW@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _PAHW_MCD@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PAHW_MCD@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	mov	x0, x19
	mov	x1, x20
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
	bl	_PicoWrite16_mcd_io
	b	LBB0_11
LBB0_8:
	and	w9, w19, #0xfff0
	mov	w10, #20864
	cmp	w9, w10
	b.ne	LBB0_13
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	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
	b	_p32x_vdp_write16
LBB0_10:
	bl	_PicoWrite16_io
LBB0_11:
	mov	w8, #12528
	movk	w8, #161, lsl #16
	cmp	w19, w8
	b.ne	LBB0_15
; %bb.12:
Lloh23:
	adrp	x8, _Pico32x@GOTPAGE
Lloh24:
	ldr	x8, [x8, _Pico32x@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	w0, [x8, #8]
	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
	b	_bank_switch
LBB0_13:
	and	w9, w19, #0xfe00
	mov	w10, #20992
	cmp	w9, w10
	b.ne	LBB0_3
; %bb.14:
Lloh26:
	adrp	x9, _Pico32xMem@GOTPAGE
Lloh27:
	ldr	x9, [x9, _Pico32xMem@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ubfx	w10, w19, #1, #8
	str	w20, [x9, w10, uxtw #2]
	mov	w9, #1
	str	w9, [x8, #8]
LBB0_15:
	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
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"m68k 32x w16 [%06x] %04x @%06x"

	.comm	_SekPc,4,2                      ; @SekPc
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_MCD,4,2                   ; @PAHW_MCD
	.comm	_Pico32x,16,3                   ; @Pico32x
	.comm	_P32XS_FM,4,2                   ; @P32XS_FM
	.comm	_Pico32xMem,8,3                 ; @Pico32xMem
	.comm	_EL_UIO,4,2                     ; @EL_UIO
l_.str.1:                               ; @.str.1
	.asciz	"m68k unmapped w16 [%06x] %04x @%06x"

	.no_dead_strip	_PicoWrite16_32x_on
.subsections_via_symbols
