	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_z80_memory_w                   ## -- Begin function z80_memory_w
	.p2align	4, 0x90
_z80_memory_w:                          ## @z80_memory_w
	.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, %eax
	movl	%edi, %ecx
	shrl	$13, %ecx
	andl	$7, %ecx
	cmpl	$2, %ecx
	jb	LBB0_6
## %bb.1:
	je	LBB0_7
## %bb.2:
	cmpl	$3, %ecx
	jne	LBB0_10
## %bb.3:
	movl	%eax, %ecx
	shrl	$8, %ecx
	cmpl	$127, %ecx
	je	LBB0_8
## %bb.4:
	cmpl	$96, %ecx
	jne	LBB0_9
## %bb.5:
	andb	$1, %sil
	movzbl	%sil, %edi
	popq	%rbp
	jmp	_gen_zbank_w                    ## TAILCALL
LBB0_6:
	movq	_zram@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	$8191, %eax                     ## imm = 0x1FFF
	movb	%sil, (%rcx,%rax)
	popq	%rbp
	retq
LBB0_7:
	movq	_Z80@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	$3, %eax
	movzbl	%sil, %edx
	movl	%eax, %esi
	popq	%rbp
	jmp	_fm_write                       ## TAILCALL
LBB0_10:
	movq	_zbank@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	$32767, %eax                    ## imm = 0x7FFF
	orl	%ecx, %eax
	movq	_zbank_memory_map@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shrq	$16, %rcx
	movq	(%rdx,%rcx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movzbl	%sil, %esi
	movl	%eax, %edi
	popq	%rbp
	jmpq	*%rdx                           ## TAILCALL
LBB0_8:
	movq	_zbank_memory_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	1536(%rcx), %rcx
	movzbl	%sil, %esi
	movl	%eax, %edi
	popq	%rbp
	jmpq	*%rcx                           ## TAILCALL
LBB0_9:
	movzbl	%sil, %esi
	movl	%eax, %edi
	popq	%rbp
	jmp	_z80_unused_w                   ## TAILCALL
LBB0_12:
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%rcx,4), %edi
	movzwl	%ax, %eax
	movzbl	%sil, %edx
	movl	%eax, %esi
	popq	%rbp
	jmp	_WRITE_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_w                   ; -- Begin function z80_memory_w
	.p2align	2
_z80_memory_w:                          ; @z80_memory_w
	.cfi_startproc
; %bb.0:
	mov	x2, x1
                                        ; kill: def $w0 killed $w0 def $x0
	ubfx	w8, w0, #13, #3
	cmp	w8, #2
	b.lo	LBB0_6
; %bb.1:
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #3
	b.ne	LBB0_8
; %bb.3:
	lsr	w8, w0, #8
	cmp	w8, #127
	b.eq	LBB0_10
; %bb.4:
	cmp	w8, #96
	b.ne	LBB0_11
; %bb.5:
	and	w0, w2, #0x1
	b	_gen_zbank_w
LBB0_6:
Lloh0:
	adrp	x8, _zram@GOTPAGE
Lloh1:
	ldr	x8, [x8, _zram@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	x9, x0, #0x1fff
	strb	w2, [x8, x9]
	ret
LBB0_7:
Lloh3:
	adrp	x8, _Z80@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Z80@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w1, w0, #0x3
	mov	x0, x8
	b	_fm_write
LBB0_8:
Lloh6:
	adrp	x8, _zbank@GOTPAGE
Lloh7:
	ldr	x8, [x8, _zbank@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w9, w0, #0x7fff
	orr	w0, w8, w9
Lloh9:
	adrp	x9, _zbank_memory_map@GOTPAGE
Lloh10:
	ldr	x9, [x9, _zbank_memory_map@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	lsr	x8, x8, #16
	ldr	x3, [x9, x8, lsl #3]
	cbz	x3, LBB0_12
; %bb.9:
	mov	x1, x2
	br	x3
LBB0_10:
Lloh12:
	adrp	x8, _zbank_memory_map@GOTPAGE
Lloh13:
	ldr	x8, [x8, _zbank_memory_map@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x3, [x8, #1536]
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x2
	br	x3
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x1, x2
	b	_z80_unused_w
LBB0_12:
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	_WRITE_BYTE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.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
