	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_memory_r                   ## -- Begin function z80_memory_r
	.p2align	4, 0x90
_z80_memory_r:                          ## @z80_memory_r
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %esi
	movl	%edi, %eax
	shrl	$13, %eax
	andl	$7, %eax
	cmpl	$2, %eax
	jb	LBB0_5
## %bb.1:
	je	LBB0_6
## %bb.2:
	cmpl	$3, %eax
	jne	LBB0_8
## %bb.3:
	movl	%esi, %eax
	andl	$-256, %eax
	cmpl	$32512, %eax                    ## imm = 0x7F00
	jne	LBB0_7
## %bb.4:
	movq	_zbank_memory_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %edi
	popq	%rbp
	jmpq	*1536(%rax)                     ## TAILCALL
LBB0_5:
	movq	_zram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	$8191, %esi                     ## imm = 0x1FFF
	movzbl	(%rax,%rsi), %eax
	popq	%rbp
	retq
LBB0_6:
	movq	_Z80@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	$3, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbp
	jmp	_fm_read                        ## TAILCALL
LBB0_8:
	movq	_zbank@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$32767, %esi                    ## imm = 0x7FFF
	orl	%eax, %esi
	movq	_zbank_memory_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shrq	$16, %rax
	movq	(%rcx,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movl	%esi, %edi
	popq	%rbp
	jmpq	*%rcx                           ## TAILCALL
LBB0_7:
	movl	%esi, %edi
	popq	%rbp
	jmp	_z80_unused_r                   ## TAILCALL
LBB0_10:
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movzwl	%si, %esi
	popq	%rbp
	jmp	_READ_BYTE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_zram,8,3                       ## @zram
	.comm	_Z80,4,2                        ## @Z80
	.comm	_zbank_memory_map,8,3           ## @zbank_memory_map
	.comm	_zbank,4,2                      ## @zbank
	.comm	_m68k,8,3                       ## @m68k
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_memory_r                   ; -- Begin function z80_memory_r
	.p2align	2
_z80_memory_r:                          ; @z80_memory_r
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w0 killed $w0 def $x0
	ubfx	w8, w0, #13, #3
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.1:
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #3
	b.ne	LBB0_7
; %bb.3:
	lsr	w8, w0, #8
	cmp	w8, #127
	b.ne	LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _zbank_memory_map@GOTPAGE
Lloh1:
	ldr	x8, [x8, _zbank_memory_map@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x1, [x8, #1536]
                                        ; kill: def $w0 killed $w0 killed $x0
	br	x1
LBB0_5:
Lloh3:
	adrp	x8, _zram@GOTPAGE
Lloh4:
	ldr	x8, [x8, _zram@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x9, x0, #0x1fff
	ldrb	w0, [x8, x9]
	ret
LBB0_6:
Lloh6:
	adrp	x8, _Z80@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w1, w0, #0x3
	mov	x0, x8
	b	_fm_read
LBB0_7:
Lloh9:
	adrp	x8, _zbank@GOTPAGE
Lloh10:
	ldr	x8, [x8, _zbank@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w9, w0, #0x7fff
	orr	w0, w8, w9
Lloh12:
	adrp	x9, _zbank_memory_map@GOTPAGE
Lloh13:
	ldr	x9, [x9, _zbank_memory_map@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	lsr	x8, x8, #16
	ldr	x1, [x9, x8, lsl #3]
	cbz	x1, LBB0_10
; %bb.8:
	br	x1
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	b	_z80_unused_r
LBB0_10:
Lloh15:
	adrp	x9, _m68k@GOTPAGE
Lloh16:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	and	w1, w0, #0xffff
	mov	x0, x8
	b	_READ_BYTE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_zram,8,3                       ; @zram
	.comm	_Z80,4,2                        ; @Z80
	.comm	_zbank_memory_map,8,3           ; @zbank_memory_map
	.comm	_zbank,4,2                      ; @zbank
	.comm	_m68k,8,3                       ; @m68k
.subsections_via_symbols
