	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PicoRead16_sram
_PicoRead16_sram:                       ## @PicoRead16_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
	movq	%rdi, %rbx
	movq	_SRam@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	cmpq	%rdi, %rax
	jg	LBB0_7
## %bb.1:
	cmpq	%rbx, 8(%rcx)
	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, 16(%rcx)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_EEPROM_read
	movq	%rax, %r14
	jmp	LBB0_6
LBB0_7:
	movq	_Pico@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jle	LBB0_10
## %bb.8:
	movq	8(%rax), %rax
	movq	(%rax,%rbx), %r14
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_m68k_unmapped_read16           ## TAILCALL
LBB0_5:
	movq	24(%rcx), %rcx
	movq	%rbx, %rdx
	subq	%rax, %rdx
	movl	(%rdx,%rcx), %eax
	shll	$8, %eax
	orl	4(%rdx,%rcx), %eax
	movslq	%eax, %r14
LBB0_6:
	movq	_EL_SRAMIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_elprintf
LBB0_9:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRam,32,3                      ## @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 r16 [%06x] %04x @ %06x"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PicoRead16_sram
_PicoRead16_sram:                       ; @PicoRead16_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	x9, x10, [x8]
	cmp	x9, x0
	ccmp	x10, x0, #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, #16]
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
	mov	x20, x0
	b	LBB0_8
LBB0_4:
	ldr	x8, [x10]
	cmp	x8, x19
	b.le	LBB0_6
; %bb.5:
	ldr	x8, [x10, #8]
	ldr	x20, [x8, x19]
	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_read16
LBB0_7:
	ldr	x8, [x8, #24]
	sub	x9, x19, x9
	add	x8, x9, x8
	ldp	w9, w8, [x8]
	orr	w8, w8, w9, lsl #8
	sxtw	x20, w8
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,32,3                      ; @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 r16 [%06x] %04x @ %06x"

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