	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PicoRead8_sram
_PicoRead8_sram:                        ## @PicoRead8_sram
	.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
	movl	%edi, %ebx
	movq	_SRam@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%edi, %ecx
	jg	LBB0_7
## %bb.1:
	cmpl	%ebx, 4(%rax)
	jl	LBB0_7
## %bb.2:
	movq	_Pico@GOTPCREL(%rip), %rdx
	movq	_SRR_MAPPED@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, 16(%rdx)
	je	LBB0_7
## %bb.3:
	movq	_SRF_EEPROM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rax)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_EEPROM_read
	movl	%eax, %r14d
	sarl	$8, %r14d
	testb	$1, %bl
	cmovnel	%eax, %r14d
	jmp	LBB0_6
LBB0_7:
	movq	_Pico@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jle	LBB0_10
## %bb.8:
	movq	8(%rax), %rax
	xorl	$1, %ebx
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %r14d
	jmp	LBB0_9
LBB0_10:
	movl	%ebx, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_m68k_unmapped_read8            ## TAILCALL
LBB0_5:
	movl	%ebx, %edx
	subl	%ecx, %edx
	addl	12(%rax), %edx
	movslq	%edx, %rax
	movl	(%rax), %r14d
LBB0_6:
	movq	_EL_SRAMIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_elprintf
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRam,16,2                      ## @SRam
	.comm	_Pico,24,3                      ## @Pico
	.comm	_SRR_MAPPED,4,2                 ## @SRR_MAPPED
	.comm	_SRF_EEPROM,4,2                 ## @SRF_EEPROM
	.comm	_EL_SRAMIO,4,2                  ## @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sram r8  [%06x]   %02x @ %06x"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PicoRead8_sram
_PicoRead8_sram:                        ; @PicoRead8_sram
	.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, x0
Lloh0:
	adrp	x8, _SRam@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SRam@GOTPAGEOFF]
	ldp	w9, w10, [x8]
	cmp	w9, w0
	ccmp	w10, w0, #8, le
Lloh2:
	adrp	x10, _Pico@GOTPAGE
Lloh3:
	ldr	x10, [x10, _Pico@GOTPAGEOFF]
	b.lt	LBB0_4
; %bb.1:
	ldr	w11, [x10, #16]
Lloh4:
	adrp	x12, _SRR_MAPPED@GOTPAGE
Lloh5:
	ldr	x12, [x12, _SRR_MAPPED@GOTPAGEOFF]
Lloh6:
	ldr	w12, [x12]
	tst	w12, w11
	b.eq	LBB0_4
; %bb.2:
	ldr	w10, [x8, #8]
Lloh7:
	adrp	x11, _SRF_EEPROM@GOTPAGE
Lloh8:
	ldr	x11, [x11, _SRF_EEPROM@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.3:
	bl	_EEPROM_read
	asr	w8, w0, #8
	tst	w19, #0x1
	csel	w20, w8, w0, eq
	b	LBB0_8
LBB0_4:
	ldr	w8, [x10]
	cmp	w8, w19
	b.le	LBB0_6
; %bb.5:
	ldr	x8, [x10, #8]
	eor	w9, w19, #0x1
	ldr	w20, [x8, w9, sxtw #2]
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_m68k_unmapped_read8
LBB0_7:
	ldr	w8, [x8, #12]
	sub	w9, w19, w9
	add	w8, w9, w8
	sxtw	x8, w8
	ldr	w20, [x8]
LBB0_8:
Lloh10:
	adrp	x8, _EL_SRAMIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EL_SRAMIO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _SekPc@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SekPc@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_elprintf
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SRam,16,2                      ; @SRam
	.comm	_Pico,24,3                      ; @Pico
	.comm	_SRR_MAPPED,4,2                 ; @SRR_MAPPED
	.comm	_SRF_EEPROM,4,2                 ; @SRF_EEPROM
	.comm	_EL_SRAMIO,4,2                  ; @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sram r8  [%06x]   %02x @ %06x"

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