	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mapper_reset
LCPI0_0:
	.quad	503808                          ## 0x7b000
	.quad	507904                          ## 0x7c000
LCPI0_1:
	.quad	512000                          ## 0x7d000
	.quad	516096                          ## 0x7e000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mapper_reset:                          ## @mapper_reset
	.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	_system_hw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYSTEM_SG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	_cart_rom@GOTPCREL(%rip), %rax
	cmpq	$129, (%rax)
	jne	LBB0_6
## %bb.2:
	movl	$50176, %eax                    ## imm = 0xC400
	xorl	%ecx, %ecx
	movq	_work_ram@GOTPCREL(%rip), %r8
	movq	_z80_writemap@GOTPCREL(%rip), %rsi
	movq	_z80_readmap@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1024(%rax), %ebx
	andl	$6144, %ebx                     ## imm = 0x1800
	shlq	$2, %rbx
	addq	(%r8), %rbx
	movq	(%rsi), %rdx
	movq	%rbx, 384(%rdx,%rcx)
	movq	(%rdi), %rdx
	movq	%rbx, 384(%rdx,%rcx)
	movl	%eax, %edx
	andl	$7168, %edx                     ## imm = 0x1C00
	shlq	$2, %rdx
	addq	(%r8), %rdx
	movq	(%rsi), %rbx
	movq	%rdx, 392(%rbx,%rcx)
	movq	(%rdi), %rbx
	movq	%rdx, 392(%rbx,%rcx)
	addq	$2048, %rax                     ## imm = 0x800
	addq	$16, %rcx
	cmpq	$128, %rcx
	jne	LBB0_3
	jmp	LBB0_8
LBB0_4:
	movl	$50176, %eax                    ## imm = 0xC400
	xorl	%ecx, %ecx
	movq	_work_ram@GOTPCREL(%rip), %r8
	movq	_z80_writemap@GOTPCREL(%rip), %rsi
	movq	_z80_readmap@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1024(%rax), %ebx
	andl	$6144, %ebx                     ## imm = 0x1800
	shlq	$2, %rbx
	addq	(%r8), %rbx
	movq	(%rsi), %rdx
	movq	%rbx, 384(%rdx,%rcx)
	movq	(%rdi), %rdx
	movq	%rbx, 384(%rdx,%rcx)
	movl	%eax, %edx
	andl	$7168, %edx                     ## imm = 0x1C00
	shlq	$2, %rdx
	addq	(%r8), %rdx
	movq	(%rsi), %rbx
	movq	%rdx, 392(%rbx,%rcx)
	movq	(%rdi), %rbx
	movq	%rdx, 392(%rbx,%rcx)
	addq	$2048, %rax                     ## imm = 0x800
	addq	$16, %rcx
	cmpq	$128, %rcx
	jne	LBB0_5
	jmp	LBB0_8
LBB0_6:
	xorl	%eax, %eax
	movq	_work_ram@GOTPCREL(%rip), %rcx
	movq	_z80_writemap@GOTPCREL(%rip), %rdx
	movq	_z80_readmap@GOTPCREL(%rip), %rsi
	movl	$4096, %r8d                     ## imm = 0x1000
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rbx
	movq	(%rdx), %rdi
	movq	%rbx, 384(%rdi,%rax,8)
	movq	(%rsi), %rdi
	movq	%rbx, 384(%rdi,%rax,8)
	movq	(%rcx), %rdi
	addq	%r8, %rdi
	movq	(%rdx), %rbx
	movq	%rdi, 392(%rbx,%rax,8)
	movq	(%rsi), %rbx
	movq	%rdi, 392(%rbx,%rax,8)
	addq	$2, %rax
	cmpq	$16, %rax
	jne	LBB0_7
LBB0_8:
	movq	_slot@GOTPCREL(%rip), %r15
	movl	(%r15), %r9d
	testl	%r9d, %r9d
	je	LBB0_17
## %bb.9:
	movl	4(%r15), %r8d
	movq	_MAPPER_SEGA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	jge	LBB0_19
## %bb.10:
	movl	$4096, %edi                     ## imm = 0x1000
	xorl	%eax, %eax
	movq	_z80_readmap@GOTPCREL(%rip), %r10
	movq	_cart@GOTPCREL(%rip), %rsi
	movl	$21233664, %ebx                 ## imm = 0x1440000
	movq	_z80_writemap@GOTPCREL(%rip), %r11
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	addq	%rdi, %rcx
	addq	$-4096, %rcx                    ## imm = 0xF000
	movq	(%r10), %rdx
	movq	%rcx, (%rdx,%rax)
	movq	(%rsi), %rcx
	addq	%rbx, %rcx
	movq	(%r11), %rdx
	movq	%rcx, (%rdx,%rax)
	movq	16(%r15), %rcx
	addq	%rdi, %rcx
	movq	(%r10), %rdx
	movq	%rcx, 8(%rdx,%rax)
	movq	(%rsi), %rcx
	addq	%rbx, %rcx
	movq	(%r11), %rdx
	movq	%rcx, 8(%rdx,%rax)
	addq	$8192, %rdi                     ## imm = 0x2000
	addq	$16, %rax
	cmpq	$384, %rax                      ## imm = 0x180
	jne	LBB0_11
## %bb.12:
	cmpl	$32, %r9d
	jg	LBB0_15
## %bb.13:
	movl	$33792, %esi                    ## imm = 0x8400
	xorl	%edi, %edi
	movq	_work_ram@GOTPCREL(%rip), %rax
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rcx
	leal	-1024(%rsi), %edx
	andl	$6144, %edx                     ## imm = 0x1800
	leaq	(%rcx,%rdx,4), %rcx
	addq	$32768, %rcx                    ## imm = 0x8000
	movq	(%r11), %rdx
	movq	%rcx, 256(%rdx,%rdi)
	movq	(%r10), %rdx
	movq	%rcx, 256(%rdx,%rdi)
	movq	(%rax), %rcx
	movl	%esi, %edx
	andl	$7168, %edx                     ## imm = 0x1C00
	leaq	(%rcx,%rdx,4), %rcx
	addq	$32768, %rcx                    ## imm = 0x8000
	movq	(%r11), %rdx
	movq	%rcx, 264(%rdx,%rdi)
	movq	(%r10), %rdx
	movq	%rcx, 264(%rdx,%rdi)
	addq	$2048, %rsi                     ## imm = 0x800
	addq	$16, %rdi
	cmpq	$128, %rdi
	jne	LBB0_14
LBB0_15:
	cmpl	$130, %r8d
	jne	LBB0_25
## %bb.16:
	movq	_work_ram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	32768(%rax), %rcx
	movq	(%r11), %rdx
	movq	%rcx, 64(%rdx)
	movq	(%r10), %rsi
	movq	%rcx, 64(%rsi)
	leaq	36864(%rax), %rcx
	movq	%rcx, 72(%rdx)
	movq	%rcx, 72(%rsi)
	leaq	40960(%rax), %rcx
	movq	%rcx, 80(%rdx)
	movq	%rcx, 80(%rsi)
	leaq	45056(%rax), %rcx
	movq	%rcx, 88(%rdx)
	movq	%rcx, 88(%rsi)
	leaq	49152(%rax), %rcx
	movq	%rcx, 96(%rdx)
	movq	%rcx, 96(%rsi)
	leaq	53248(%rax), %rcx
	movq	%rcx, 104(%rdx)
	movq	%rcx, 104(%rsi)
	leaq	57344(%rax), %rcx
	movq	%rcx, 112(%rdx)
	movq	%rcx, 112(%rsi)
	addq	$61440, %rax                    ## imm = 0xF000
	movq	%rax, 120(%rdx)
	movq	%rax, 120(%rsi)
	movq	_write_mapper_none@GOTPCREL(%rip), %r8
	jmp	LBB0_28
LBB0_17:
	xorl	%edx, %edx
	movq	_cart@GOTPCREL(%rip), %rsi
	movl	$21233664, %r10d                ## imm = 0x1440000
	movq	_z80_writemap@GOTPCREL(%rip), %r11
	movl	$21237760, %eax                 ## imm = 0x1441000
	movq	_z80_readmap@GOTPCREL(%rip), %rcx
	movq	_write_mapper_none@GOTPCREL(%rip), %r8
	movq	_read_mapper_default@GOTPCREL(%rip), %r9
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	addq	%r10, %rdi
	movq	(%r11), %rbx
	movq	%rdi, (%rbx,%rdx,8)
	movq	(%rsi), %rdi
	addq	%rax, %rdi
	movq	(%rcx), %rbx
	movq	%rdi, (%rbx,%rdx,8)
	movq	(%rsi), %rdi
	addq	%r10, %rdi
	movq	(%r11), %rbx
	movq	%rdi, 8(%rbx,%rdx,8)
	movq	(%rsi), %rdi
	addq	%rax, %rdi
	movq	(%rcx), %rbx
	movq	%rdi, 8(%rbx,%rdx,8)
	addq	$2, %rdx
	cmpq	$48, %rdx
	jne	LBB0_18
	jmp	LBB0_29
LBB0_19:
	movl	$4096, %ecx                     ## imm = 0x1000
	xorl	%edx, %edx
	movq	_z80_readmap@GOTPCREL(%rip), %r14
	movq	_cart@GOTPCREL(%rip), %r9
	movl	$21233664, %esi                 ## imm = 0x1440000
	movq	_z80_writemap@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rbx
	addq	%rcx, %rbx
	addq	$-4096, %rbx                    ## imm = 0xF000
	movq	(%r14), %rax
	movq	%rbx, (%rax,%rdx)
	movq	(%r9), %rax
	addq	%rsi, %rax
	movq	(%rdi), %rbx
	movq	%rax, (%rbx,%rdx)
	movq	16(%r15), %rax
	addq	%rcx, %rax
	movq	(%r14), %rbx
	movq	%rax, 8(%rbx,%rdx)
	movq	(%r9), %rax
	addq	%rsi, %rax
	movq	(%rdi), %rbx
	movq	%rax, 8(%rbx,%rdx)
	addq	$8192, %rcx                     ## imm = 0x2000
	addq	$16, %rdx
	cmpq	$384, %rdx                      ## imm = 0x180
	jne	LBB0_20
## %bb.21:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	testb	$-121, %r8b
	je	LBB0_24
## %bb.22:
	callq	_mapper_8k_w
	movq	8(%r15), %rax
	movl	4(%rax), %esi
	movl	$1, %edi
	callq	_mapper_8k_w
	movq	8(%r15), %rax
	movl	8(%rax), %esi
	movl	$2, %edi
	callq	_mapper_8k_w
	movq	8(%r15), %rax
	movl	12(%rax), %esi
	movl	$3, %edi
	callq	_mapper_8k_w
	movl	4(%r15), %r8d
	cmpl	$133, %r8d
	jne	LBB0_25
## %bb.23:
	movl	$491520, %eax                   ## imm = 0x78000
	addq	16(%r15), %rax
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	movl	$495616, %eax                   ## imm = 0x79000
	addq	16(%r15), %rax
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx)
	movl	$499712, %eax                   ## imm = 0x7A000
	addq	16(%r15), %rax
	movq	%rax, 16(%rcx)
	movq	16(%r15), %rax
	movq	%rax, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [503808,507904]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 24(%rcx)
	paddq	LCPI0_1(%rip), %xmm0
	movdqu	%xmm0, 40(%rcx)
	addq	$520192, %rax                   ## imm = 0x7F000
	movq	%rax, 56(%rcx)
	movq	_write_mapper_msx@GOTPCREL(%rip), %r8
	jmp	LBB0_28
LBB0_24:
	callq	_mapper_16k_w
	movq	8(%r15), %rax
	movl	4(%rax), %esi
	movl	$1, %edi
	callq	_mapper_16k_w
	movq	8(%r15), %rax
	movl	8(%rax), %esi
	movl	$2, %edi
	callq	_mapper_16k_w
	movq	8(%r15), %rax
	movl	12(%rax), %esi
	movl	$3, %edi
	callq	_mapper_16k_w
	movl	4(%r15), %r8d
LBB0_25:
	addl	$-128, %r8d
	cmpl	$11, %r8d
	ja	LBB0_27
## %bb.26:
	movslq	%r8d, %rax
	leaq	l_switch.table.mapper_reset(%rip), %rcx
	movq	(%rcx,%rax,8), %r9
	leaq	l_switch.table.mapper_reset.1(%rip), %rcx
	movq	(%rcx,%rax,8), %r8
	jmp	LBB0_29
LBB0_27:
	movq	_write_mapper_sega@GOTPCREL(%rip), %r8
LBB0_28:
	movq	_read_mapper_default@GOTPCREL(%rip), %r9
LBB0_29:
	movl	(%r9), %eax
	movq	_z80_readmem@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	(%r8), %eax
	movq	_z80_writemem@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_system_hw,8,3                  ## @system_hw
	.comm	_SYSTEM_SG,8,3                  ## @SYSTEM_SG
	.comm	_cart_rom,8,3                   ## @cart_rom
	.comm	_work_ram,8,3                   ## @work_ram
	.comm	_z80_writemap,8,3               ## @z80_writemap
	.comm	_z80_readmap,8,3                ## @z80_readmap
	.comm	_slot,24,3                      ## @slot
	.comm	_cart,8,3                       ## @cart
	.comm	_read_mapper_default,4,2        ## @read_mapper_default
	.comm	_z80_readmem,4,2                ## @z80_readmem
	.comm	_write_mapper_none,4,2          ## @write_mapper_none
	.comm	_z80_writemem,4,2               ## @z80_writemem
	.comm	_MAPPER_SEGA,4,2                ## @MAPPER_SEGA
	.comm	_write_mapper_codies,4,2        ## @write_mapper_codies
	.comm	_write_mapper_korea,4,2         ## @write_mapper_korea
	.comm	_read_mapper_korea_8k,4,2       ## @read_mapper_korea_8k
	.comm	_write_mapper_korea_8k,4,2      ## @write_mapper_korea_8k
	.comm	_write_mapper_korea_16k,4,2     ## @write_mapper_korea_16k
	.comm	_write_mapper_msx,4,2           ## @write_mapper_msx
	.comm	_write_mapper_multi,4,2         ## @write_mapper_multi
	.comm	_read_mapper_93c46,4,2          ## @read_mapper_93c46
	.comm	_write_mapper_93c46,4,2         ## @write_mapper_93c46
	.comm	_read_mapper_terebi,4,2         ## @read_mapper_terebi
	.comm	_write_mapper_terebi,4,2        ## @write_mapper_terebi
	.comm	_write_mapper_sega,4,2          ## @write_mapper_sega
	.no_dead_strip	_mapper_reset
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mapper_reset
l_switch.table.mapper_reset:
	.quad	_read_mapper_terebi
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_korea_8k
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_93c46

	.p2align	3                               ## @switch.table.mapper_reset.1
l_switch.table.mapper_reset.1:
	.quad	_write_mapper_terebi
	.quad	_write_mapper_none
	.quad	_write_mapper_none
	.quad	_write_mapper_none
	.quad	_write_mapper_multi
	.quad	_write_mapper_msx
	.quad	_write_mapper_msx
	.quad	_write_mapper_korea_8k
	.quad	_write_mapper_korea_16k
	.quad	_write_mapper_korea
	.quad	_write_mapper_codies
	.quad	_write_mapper_93c46

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mapper_reset
_mapper_reset:                          ; @mapper_reset
	.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
Lloh0:
	adrp	x8, _system_hw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _SYSTEM_SG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYSTEM_SG@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
Lloh6:
	adrp	x8, _z80_writemap@GOTPAGE
Lloh7:
	ldr	x8, [x8, _z80_writemap@GOTPAGEOFF]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
Lloh8:
	adrp	x9, _cart_rom@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cart_rom@GOTPAGEOFF]
Lloh10:
	adrp	x10, _work_ram@GOTPAGE
Lloh11:
	ldr	x10, [x10, _work_ram@GOTPAGEOFF]
Lloh12:
	ldr	x13, [x9]
Lloh13:
	ldr	x11, [x10]
	ldr	x9, [x8]
	str	x11, [x9, #384]
Lloh14:
	adrp	x10, _z80_readmap@GOTPAGE
Lloh15:
	ldr	x10, [x10, _z80_readmap@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	str	x11, [x10, #384]
	add	x12, x11, #1, lsl #12           ; =4096
	str	x12, [x9, #392]
	str	x12, [x10, #392]
	cmp	x13, #129
	b.ne	LBB0_4
; %bb.2:
	add	x13, x11, #2, lsl #12           ; =8192
	str	x13, [x9, #400]
	str	x13, [x10, #400]
	add	x14, x11, #3, lsl #12           ; =12288
	str	x14, [x9, #408]
	str	x14, [x10, #408]
	add	x15, x11, #4, lsl #12           ; =16384
	str	x15, [x9, #416]
	str	x15, [x10, #416]
	add	x16, x11, #5, lsl #12           ; =20480
	str	x16, [x9, #424]
	str	x16, [x10, #424]
	add	x0, x11, #6, lsl #12            ; =24576
	str	x0, [x9, #432]
	add	x17, x11, #7, lsl #12           ; =28672
	str	x0, [x10, #432]
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x9, _work_ram@GOTPAGE
Lloh18:
	ldr	x9, [x9, _work_ram@GOTPAGEOFF]
Lloh19:
	ldr	x11, [x9]
	ldr	x9, [x8]
	str	x11, [x9, #384]
Lloh20:
	adrp	x10, _z80_readmap@GOTPAGE
Lloh21:
	ldr	x10, [x10, _z80_readmap@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
	str	x11, [x10, #384]
	add	x12, x11, #1, lsl #12           ; =4096
	str	x12, [x9, #392]
	str	x12, [x10, #392]
	add	x13, x11, #2, lsl #12           ; =8192
	str	x13, [x9, #400]
	str	x13, [x10, #400]
	add	x14, x11, #3, lsl #12           ; =12288
	str	x14, [x9, #408]
	str	x14, [x10, #408]
	add	x15, x11, #4, lsl #12           ; =16384
	str	x15, [x9, #416]
	str	x15, [x10, #416]
	add	x16, x11, #5, lsl #12           ; =20480
	str	x16, [x9, #424]
	str	x16, [x10, #424]
	add	x0, x11, #6, lsl #12            ; =24576
	str	x0, [x9, #432]
	str	x0, [x10, #432]
	add	x17, x11, #7, lsl #12           ; =28672
	b	LBB0_5
LBB0_4:
	str	x11, [x9, #400]
	str	x11, [x10, #400]
	str	x12, [x9, #408]
	str	x12, [x10, #408]
	str	x11, [x9, #416]
	str	x11, [x10, #416]
	str	x12, [x9, #424]
	mov	x17, x12
	str	x12, [x10, #424]
	mov	x13, x11
	mov	x14, x12
	str	x11, [x9, #432]
	mov	x15, x11
	mov	x16, x12
	mov	x0, x11
	str	x11, [x10, #432]
LBB0_5:
	str	x17, [x9, #440]
	str	x17, [x10, #440]
	str	x11, [x9, #448]
	str	x11, [x10, #448]
	str	x12, [x9, #456]
	str	x12, [x10, #456]
	str	x13, [x9, #464]
	str	x13, [x10, #464]
	str	x14, [x9, #472]
	str	x14, [x10, #472]
	str	x15, [x9, #480]
	str	x15, [x10, #480]
	str	x16, [x9, #488]
	str	x16, [x10, #488]
	str	x0, [x9, #496]
	str	x0, [x10, #496]
	str	x17, [x9, #504]
	str	x17, [x10, #504]
Lloh23:
	adrp	x19, _slot@GOTPAGE
Lloh24:
	ldr	x19, [x19, _slot@GOTPAGEOFF]
	ldr	w12, [x19]
	cbz	w12, LBB0_13
; %bb.6:
Lloh25:
	adrp	x11, _MAPPER_SEGA@GOTPAGE
Lloh26:
	ldr	x11, [x11, _MAPPER_SEGA@GOTPAGEOFF]
	ldr	w9, [x19, #4]
Lloh27:
	ldr	w13, [x11]
	ldr	x11, [x19, #16]
	str	x11, [x10]
Lloh28:
	adrp	x11, _cart@GOTPAGE
Lloh29:
	ldr	x11, [x11, _cart@GOTPAGEOFF]
	ldr	x10, [x11]
	mov	w14, #21233664
	add	x10, x10, x14
	ldr	x14, [x8]
	str	x10, [x14]
	cmp	w9, w13
	b.ge	LBB0_15
; %bb.7:
	mov	w13, #4096
	mov	w14, #8
Lloh30:
	adrp	x10, _z80_readmap@GOTPAGE
Lloh31:
	ldr	x10, [x10, _z80_readmap@GOTPAGEOFF]
	mov	w15, #21233664
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x16, [x10]
	ldr	x17, [x19, #16]
	add	x17, x17, x13
	str	x17, [x16, x14]
	ldr	x16, [x11]
	add	x16, x16, x15
	ldr	x17, [x8]
	str	x16, [x17, x14]
	add	x13, x13, #1, lsl #12           ; =4096
	add	x14, x14, #8
	cmp	x13, #48, lsl #12               ; =196608
	b.ne	LBB0_8
; %bb.9:
	cmp	w12, #32
	b.gt	LBB0_11
; %bb.10:
Lloh32:
	adrp	x11, _work_ram@GOTPAGE
Lloh33:
	ldr	x11, [x11, _work_ram@GOTPAGEOFF]
Lloh34:
	ldr	x11, [x11]
	add	x12, x11, #8, lsl #12           ; =32768
	ldr	x13, [x8]
	str	x12, [x13, #256]
	ldr	x14, [x10]
	str	x12, [x14, #256]
	add	x15, x11, #9, lsl #12           ; =36864
	str	x15, [x13, #264]
	str	x15, [x14, #264]
	add	x16, x11, #10, lsl #12          ; =40960
	str	x16, [x13, #272]
	str	x16, [x14, #272]
	add	x17, x11, #11, lsl #12          ; =45056
	str	x17, [x13, #280]
	str	x17, [x14, #280]
	add	x0, x11, #12, lsl #12           ; =49152
	str	x0, [x13, #288]
	str	x0, [x14, #288]
	add	x1, x11, #13, lsl #12           ; =53248
	str	x1, [x13, #296]
	str	x1, [x14, #296]
	add	x2, x11, #14, lsl #12           ; =57344
	str	x2, [x13, #304]
	str	x2, [x14, #304]
	add	x11, x11, #15, lsl #12          ; =61440
	str	x11, [x13, #312]
	str	x11, [x14, #312]
	str	x12, [x13, #320]
	str	x12, [x14, #320]
	str	x15, [x13, #328]
	str	x15, [x14, #328]
	str	x16, [x13, #336]
	str	x16, [x14, #336]
	str	x17, [x13, #344]
	str	x17, [x14, #344]
	str	x0, [x13, #352]
	str	x0, [x14, #352]
	str	x1, [x13, #360]
	str	x1, [x14, #360]
	str	x2, [x13, #368]
	str	x2, [x14, #368]
	str	x11, [x13, #376]
	str	x11, [x14, #376]
LBB0_11:
	cmp	w9, #130
	b.ne	LBB0_21
; %bb.12:
Lloh35:
	adrp	x9, _work_ram@GOTPAGE
Lloh36:
	ldr	x9, [x9, _work_ram@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x11, x9, #8, lsl #12            ; =32768
	ldr	x8, [x8]
	str	x11, [x8, #64]
	ldr	x10, [x10]
	str	x11, [x10, #64]
	add	x11, x9, #9, lsl #12            ; =36864
	str	x11, [x8, #72]
	str	x11, [x10, #72]
	add	x11, x9, #10, lsl #12           ; =40960
	str	x11, [x8, #80]
	str	x11, [x10, #80]
	add	x11, x9, #11, lsl #12           ; =45056
	str	x11, [x8, #88]
	str	x11, [x10, #88]
	add	x11, x9, #12, lsl #12           ; =49152
	str	x11, [x8, #96]
	str	x11, [x10, #96]
	add	x11, x9, #13, lsl #12           ; =53248
	str	x11, [x8, #104]
	str	x11, [x10, #104]
	add	x11, x9, #14, lsl #12           ; =57344
	str	x11, [x8, #112]
	str	x11, [x10, #112]
	add	x9, x9, #15, lsl #12            ; =61440
	str	x9, [x8, #120]
	str	x9, [x10, #120]
Lloh38:
	adrp	x9, _write_mapper_none@GOTPAGE
Lloh39:
	ldr	x9, [x9, _write_mapper_none@GOTPAGEOFF]
	b	LBB0_24
LBB0_13:
Lloh40:
	adrp	x11, _cart@GOTPAGE
Lloh41:
	ldr	x11, [x11, _cart@GOTPAGEOFF]
	ldr	x10, [x11]
	mov	w12, #21233664
	add	x10, x10, x12
	str	x10, [x9]
	ldr	x9, [x11]
	mov	w13, #4096
	movk	w13, #324, lsl #16
	add	x9, x9, x13
Lloh42:
	adrp	x14, _z80_readmap@GOTPAGE
Lloh43:
	ldr	x14, [x14, _z80_readmap@GOTPAGEOFF]
	ldr	x10, [x14]
	str	x9, [x10]
	mov	w15, #8
Lloh44:
	adrp	x9, _write_mapper_none@GOTPAGE
Lloh45:
	ldr	x9, [x9, _write_mapper_none@GOTPAGEOFF]
Lloh46:
	adrp	x10, _read_mapper_default@GOTPAGE
Lloh47:
	ldr	x10, [x10, _read_mapper_default@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x16, [x8]
	ldr	x17, [x11]
	add	x17, x17, x12
	str	x17, [x16, x15]
	ldr	x16, [x11]
	add	x16, x16, x13
	ldr	x17, [x14]
	str	x16, [x17, x15]
	add	x15, x15, #8
	cmp	x15, #384
	b.ne	LBB0_14
	b	LBB0_25
LBB0_15:
	mov	w10, #4096
	mov	w12, #8
Lloh48:
	adrp	x20, _z80_readmap@GOTPAGE
Lloh49:
	ldr	x20, [x20, _z80_readmap@GOTPAGEOFF]
	mov	w13, #21233664
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x20]
	ldr	x15, [x19, #16]
	add	x15, x15, x10
	str	x15, [x14, x12]
	ldr	x14, [x11]
	add	x14, x14, x13
	ldr	x15, [x8]
	str	x14, [x15, x12]
	add	x10, x10, #1, lsl #12           ; =4096
	add	x12, x12, #8
	cmp	x10, #48, lsl #12               ; =196608
	b.ne	LBB0_16
; %bb.17:
	mov	w8, #135
	ldr	x10, [x19, #8]
	ldr	w1, [x10]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.18:
	mov	w0, #0
	bl	_mapper_8k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #4]
	mov	w0, #1
	bl	_mapper_8k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	w0, #2
	bl	_mapper_8k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #12]
	mov	w0, #3
	bl	_mapper_8k_w
	ldr	w9, [x19, #4]
	cmp	w9, #133
	b.ne	LBB0_21
; %bb.19:
	ldr	x8, [x19, #16]
	add	x8, x8, #120, lsl #12           ; =491520
	ldr	x9, [x20]
	str	x8, [x9]
	ldr	x8, [x19, #16]
	add	x8, x8, #121, lsl #12           ; =495616
	ldr	x9, [x20]
	str	x8, [x9, #8]
	ldr	x8, [x19, #16]
	add	x8, x8, #122, lsl #12           ; =499712
	str	x8, [x9, #16]
	ldr	x8, [x19, #16]
	add	x10, x8, #123, lsl #12          ; =503808
	add	x11, x8, #124, lsl #12          ; =507904
	stp	x10, x11, [x9, #24]
	add	x10, x8, #125, lsl #12          ; =512000
	add	x11, x8, #126, lsl #12          ; =516096
	stp	x10, x11, [x9, #40]
	add	x8, x8, #127, lsl #12           ; =520192
	str	x8, [x9, #56]
Lloh50:
	adrp	x9, _write_mapper_msx@GOTPAGE
Lloh51:
	ldr	x9, [x9, _write_mapper_msx@GOTPAGEOFF]
	b	LBB0_24
LBB0_20:
	mov	w0, #0
	bl	_mapper_16k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #4]
	mov	w0, #1
	bl	_mapper_16k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	w0, #2
	bl	_mapper_16k_w
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #12]
	mov	w0, #3
	bl	_mapper_16k_w
	ldr	w9, [x19, #4]
LBB0_21:
	sub	w8, w9, #128
	cmp	w8, #11
	b.hi	LBB0_23
; %bb.22:
	sbfiz	x8, x8, #3, #32
Lloh52:
	adrp	x9, l_switch.table.mapper_reset@PAGE
Lloh53:
	add	x9, x9, l_switch.table.mapper_reset@PAGEOFF
	ldr	x10, [x9, x8]
Lloh54:
	adrp	x9, l_switch.table.mapper_reset.1@PAGE
Lloh55:
	add	x9, x9, l_switch.table.mapper_reset.1@PAGEOFF
	ldr	x9, [x9, x8]
	b	LBB0_25
LBB0_23:
Lloh56:
	adrp	x9, _write_mapper_sega@GOTPAGE
Lloh57:
	ldr	x9, [x9, _write_mapper_sega@GOTPAGEOFF]
LBB0_24:
Lloh58:
	adrp	x10, _read_mapper_default@GOTPAGE
Lloh59:
	ldr	x10, [x10, _read_mapper_default@GOTPAGEOFF]
LBB0_25:
Lloh60:
	adrp	x8, _z80_readmem@GOTPAGE
Lloh61:
	ldr	x8, [x8, _z80_readmem@GOTPAGEOFF]
	ldr	w10, [x10]
Lloh62:
	str	w10, [x8]
	ldr	w8, [x9]
Lloh63:
	adrp	x9, _z80_writemem@GOTPAGE
Lloh64:
	ldr	x9, [x9, _z80_writemem@GOTPAGEOFF]
Lloh65:
	str	w8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotStr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotStr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_system_hw,8,3                  ; @system_hw
	.comm	_SYSTEM_SG,8,3                  ; @SYSTEM_SG
	.comm	_cart_rom,8,3                   ; @cart_rom
	.comm	_work_ram,8,3                   ; @work_ram
	.comm	_z80_writemap,8,3               ; @z80_writemap
	.comm	_z80_readmap,8,3                ; @z80_readmap
	.comm	_slot,24,3                      ; @slot
	.comm	_cart,8,3                       ; @cart
	.comm	_read_mapper_default,4,2        ; @read_mapper_default
	.comm	_z80_readmem,4,2                ; @z80_readmem
	.comm	_write_mapper_none,4,2          ; @write_mapper_none
	.comm	_z80_writemem,4,2               ; @z80_writemem
	.comm	_MAPPER_SEGA,4,2                ; @MAPPER_SEGA
	.comm	_write_mapper_codies,4,2        ; @write_mapper_codies
	.comm	_write_mapper_korea,4,2         ; @write_mapper_korea
	.comm	_read_mapper_korea_8k,4,2       ; @read_mapper_korea_8k
	.comm	_write_mapper_korea_8k,4,2      ; @write_mapper_korea_8k
	.comm	_write_mapper_korea_16k,4,2     ; @write_mapper_korea_16k
	.comm	_write_mapper_msx,4,2           ; @write_mapper_msx
	.comm	_write_mapper_multi,4,2         ; @write_mapper_multi
	.comm	_read_mapper_93c46,4,2          ; @read_mapper_93c46
	.comm	_write_mapper_93c46,4,2         ; @write_mapper_93c46
	.comm	_read_mapper_terebi,4,2         ; @read_mapper_terebi
	.comm	_write_mapper_terebi,4,2        ; @write_mapper_terebi
	.comm	_write_mapper_sega,4,2          ; @write_mapper_sega
	.no_dead_strip	_mapper_reset
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mapper_reset
l_switch.table.mapper_reset:
	.quad	_read_mapper_terebi
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_korea_8k
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_default
	.quad	_read_mapper_93c46

	.p2align	3                               ; @switch.table.mapper_reset.1
l_switch.table.mapper_reset.1:
	.quad	_write_mapper_terebi
	.quad	_write_mapper_none
	.quad	_write_mapper_none
	.quad	_write_mapper_none
	.quad	_write_mapper_multi
	.quad	_write_mapper_msx
	.quad	_write_mapper_msx
	.quad	_write_mapper_korea_8k
	.quad	_write_mapper_korea_16k
	.quad	_write_mapper_korea
	.quad	_write_mapper_codies
	.quad	_write_mapper_93c46

.subsections_via_symbols
