	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PicoWrite16_sram
_PicoWrite16_sram:                      ## @PicoWrite16_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_SRam@GOTPCREL(%rip), %r15
	cmpq	%rdi, (%r15)
	jl	LBB0_7
## %bb.1:
	cmpq	%rbx, 8(%r15)
	jg	LBB0_7
## %bb.2:
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	_SRR_MAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.3:
	movq	_EL_SRAMIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movzwl	%r14w, %ecx
	movq	_SekPc@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_elprintf
	movq	_SRF_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_4
## %bb.8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EEPROM_write16                 ## TAILCALL
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_m68k_unmapped_write16          ## TAILCALL
LBB0_4:
	addq	24(%r15), %rbx
	subq	8(%r15), %rbx
	cmpq	%r14, (%rbx)
	je	LBB0_6
## %bb.5:
	movl	$1, 32(%r15)
	movq	%r14, (%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRam,40,3                      ## @SRam
	.comm	_Pico,4,2                       ## @Pico
	.comm	_SRR_MAPPED,4,2                 ## @SRR_MAPPED
	.comm	_EL_SRAMIO,4,2                  ## @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sram w16 [%06x] %04x @ %06x"

	.comm	_SekPc,4,2                      ## @SekPc
	.comm	_SRF_EEPROM,4,2                 ## @SRF_EEPROM
	.no_dead_strip	_PicoWrite16_sram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PicoWrite16_sram
_PicoWrite16_sram:                      ; @PicoWrite16_sram
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _SRam@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SRam@GOTPAGEOFF]
	ldp	x8, x9, [x21]
	cmp	x8, x0
	ccmp	x9, x0, #0, ge
	b.gt	LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _Pico@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SRR_MAPPED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SRR_MAPPED@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _EL_SRAMIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EL_SRAMIO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	and	x3, x19, #0xffff
Lloh11:
	adrp	x8, _SekPc@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SekPc@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_elprintf
	ldr	w8, [x21, #16]
Lloh16:
	adrp	x9, _SRF_EEPROM@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SRF_EEPROM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	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	_EEPROM_write16
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	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	_m68k_unmapped_write16
LBB0_5:
	ldr	x8, [x21, #24]
	ldr	x9, [x21, #8]
	add	x8, x8, x20
	sub	x8, x8, x9
	ldr	x9, [x8]
	cmp	x9, x19
	b.eq	LBB0_7
; %bb.6:
	mov	w9, #1
	str	w9, [x21, #32]
	str	x19, [x8]
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SRam,40,3                      ; @SRam
	.comm	_Pico,4,2                       ; @Pico
	.comm	_SRR_MAPPED,4,2                 ; @SRR_MAPPED
	.comm	_EL_SRAMIO,4,2                  ; @EL_SRAMIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sram w16 [%06x] %04x @ %06x"

	.comm	_SekPc,4,2                      ; @SekPc
	.comm	_SRF_EEPROM,4,2                 ; @SRF_EEPROM
	.no_dead_strip	_PicoWrite16_sram
.subsections_via_symbols
