	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoWrite8_io                  ## -- Begin function PicoWrite8_io
	.p2align	4, 0x90
_PicoWrite8_io:                         ## @PicoWrite8_io
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movl	%edi, %eax
	andl	$65505, %eax                    ## imm = 0xFFE1
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.8:
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_io_ports_write                 ## TAILCALL
LBB0_1:
	movl	%edi, %eax
	andl	$65281, %eax                    ## imm = 0xFF01
	cmpl	$4608, %eax                     ## imm = 0x1200
	je	LBB0_4
## %bb.2:
	movzwl	%ax, %eax
	cmpl	$4352, %eax                     ## imm = 0x1100
	jne	LBB0_5
## %bb.3:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ctl_write_z80busreq            ## TAILCALL
LBB0_4:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ctl_write_z80reset             ## TAILCALL
LBB0_5:
	cmpl	$10563825, %edi                 ## imm = 0xA130F1
	jne	LBB0_6
## %bb.9:
	movq	_EL_SRAMIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_elprintf
	movq	_SRR_MAPPED@GOTPCREL(%rip), %rax
	movq	_SRR_READONLY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	movq	_Pico@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	andl	$3, %ebx
	orl	%ecx, %ebx
	movl	%ebx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_PicoOpt@GOTPCREL(%rip), %rax
	movq	_POPT_EN_32X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.10:
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_PicoWrite8_32x                 ## TAILCALL
LBB0_7:
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_m68k_unmapped_write8           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_SRAMIO,4,2                  ## @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sram reg=%02x"

	.comm	_SRR_MAPPED,4,2                 ## @SRR_MAPPED
	.comm	_SRR_READONLY,4,2               ## @SRR_READONLY
	.comm	_Pico,4,2                       ## @Pico
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_POPT_EN_32X,4,2                ## @POPT_EN_32X
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoWrite8_io                  ; -- Begin function PicoWrite8_io
	.p2align	2
_PicoWrite8_io:                         ; @PicoWrite8_io
	.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
	mov	x19, x1
	mov	w8, #65505
	and	w8, w0, w8
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_io_ports_write
LBB0_2:
	mov	w8, #65281
	and	w8, w0, w8
	mov	w9, #4608
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.3:
	mov	w9, #4352
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ctl_write_z80busreq
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ctl_write_z80reset
LBB0_6:
	mov	w8, #12529
	movk	w8, #161, lsl #16
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, _EL_SRAMIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_SRAMIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_elprintf
Lloh5:
	adrp	x8, _SRR_MAPPED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SRR_MAPPED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SRR_READONLY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SRR_READONLY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _Pico@GOTPAGE
Lloh12:
	ldr	x10, [x10, _Pico@GOTPAGEOFF]
	orr	w8, w9, w8
	ldr	w9, [x10]
	bic	w8, w9, w8
	and	w9, w19, #0x3
	orr	w8, w8, w9
	str	w8, [x10]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh13:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _POPT_EN_32X@GOTPAGE
Lloh17:
	ldr	x9, [x9, _POPT_EN_32X@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	mov	x1, x19
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PicoWrite8_32x
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_m68k_unmapped_write8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_SRAMIO,4,2                  ; @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sram reg=%02x"

	.comm	_SRR_MAPPED,4,2                 ; @SRR_MAPPED
	.comm	_SRR_READONLY,4,2               ; @SRR_READONLY
	.comm	_Pico,4,2                       ; @Pico
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_POPT_EN_32X,4,2                ; @POPT_EN_32X
.subsections_via_symbols
