	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mapper_smw_64_w
_mapper_smw_64_w:                       ## @mapper_smw_64_w
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movl	%edi, %eax
	shrl	$16, %eax
	andl	$7, %eax
	cmpl	$7, %eax
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	_sram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$2, %dil
	jne	LBB0_12
## %bb.3:
	movl	%esi, (%rax)
	jmp	LBB0_11
LBB0_4:
	testb	$2, %dil
	je	LBB0_11
## %bb.5:
	movq	_sram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, 8(%rax)
	popq	%rbp
	retq
LBB0_6:
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbp
	jmp	_m68k_unused_8_w                ## TAILCALL
LBB0_7:
	movq	_sram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$2, %dil
	jne	LBB0_16
## %bb.8:
	movl	%esi, 12(%rax)
	popq	%rbp
	retq
LBB0_9:
	testb	$2, %dil
	jne	LBB0_11
## %bb.10:
	movq	_sram@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, 20(%rax)
	testb	$-128, 8(%rax)
	jne	LBB0_17
LBB0_11:
	popq	%rbp
	retq
LBB0_12:
	movl	(%rax), %ecx
	andl	$7, %ecx
	cmpl	$7, %ecx
	je	LBB0_18
## %bb.13:
	cmpl	$1, %ecx
	je	LBB0_20
## %bb.14:
	testl	%ecx, %ecx
	jne	LBB0_19
## %bb.15:
	movl	24(%rax), %ecx
	xorl	%esi, %ecx
	xorl	4(%rax), %ecx
	andl	$254, %ecx
	movl	%ecx, 24(%rax)
	jmp	LBB0_19
LBB0_16:
	movl	%esi, 16(%rax)
	popq	%rbp
	retq
LBB0_17:
	movq	_cart@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$28, %esi
	shll	$14, %esi
	addl	%esi, %eax
	addl	$524288, %eax                   ## imm = 0x80000
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 416(%rcx)
	movl	%eax, 384(%rcx)
	popq	%rbp
	retq
LBB0_18:
	movq	_cart@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%esi, %edx
	andl	$28, %edx
	shll	$14, %edx
	addl	%edx, %ecx
	addl	$524288, %ecx                   ## imm = 0x80000
	movq	_m68k@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, 420(%rdx)
	movl	%ecx, 388(%rdx)
	jmp	LBB0_19
LBB0_20:
	movl	%esi, %ecx
	andl	$254, %ecx
	movl	%ecx, 28(%rax)
LBB0_19:
	movl	%esi, 4(%rax)
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_11
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_sram,8,3                       ## @sram
	.comm	_cart,4,2                       ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.no_dead_strip	_mapper_smw_64_w
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mapper_smw_64_w
_mapper_smw_64_w:                       ; @mapper_smw_64_w
	.cfi_startproc
; %bb.0:
	ubfx	w8, w0, #16, #3
	cmp	w8, #7
	b.hi	LBB0_6
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _sram@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sram@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	tbnz	w0, #1, LBB0_12
; %bb.3:
	str	w1, [x8]
	b	LBB0_11
LBB0_4:
	tbz	w0, #1, LBB0_11
; %bb.5:
Lloh5:
	adrp	x8, _sram@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sram@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	w1, [x8, #8]
	ret
LBB0_6:
	b	_m68k_unused_8_w
LBB0_7:
Lloh8:
	adrp	x8, _sram@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sram@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	tbnz	w0, #1, LBB0_16
; %bb.8:
	str	w1, [x8, #12]
	ret
LBB0_9:
	tbnz	w0, #1, LBB0_11
; %bb.10:
Lloh11:
	adrp	x8, _sram@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sram@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	w1, [x8, #20]
	ldrb	w8, [x8, #8]
	tbnz	w8, #7, LBB0_17
LBB0_11:
	ret
LBB0_12:
	ldr	w9, [x8]
	and	w9, w9, #0x7
	cmp	w9, #7
	b.eq	LBB0_18
; %bb.13:
	cmp	w9, #1
	b.eq	LBB0_20
; %bb.14:
	cbnz	w9, LBB0_19
; %bb.15:
	ldr	w9, [x8, #24]
	ldr	w10, [x8, #4]
	eor	w9, w9, w1
	eor	w9, w9, w10
	and	w9, w9, #0xfe
	str	w9, [x8, #24]
	str	w1, [x8, #4]
	ret
LBB0_16:
	str	w1, [x8, #16]
	ret
LBB0_17:
Lloh14:
	adrp	x8, _cart@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cart@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	lsl	w9, w1, #14
	and	w9, w9, #0x70000
	add	w8, w8, w9
	add	w8, w8, #128, lsl #12           ; =524288
Lloh17:
	adrp	x9, _m68k@GOTPAGE
Lloh18:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	str	w8, [x9, #416]
	str	w8, [x9, #384]
	ret
LBB0_18:
Lloh20:
	adrp	x9, _cart@GOTPAGE
Lloh21:
	ldr	x9, [x9, _cart@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsl	w10, w1, #14
	and	w10, w10, #0x70000
	add	w9, w9, w10
	add	w9, w9, #128, lsl #12           ; =524288
Lloh23:
	adrp	x10, _m68k@GOTPAGE
Lloh24:
	ldr	x10, [x10, _m68k@GOTPAGEOFF]
Lloh25:
	ldr	x10, [x10]
	str	w9, [x10, #420]
	str	w9, [x10, #388]
LBB0_19:
	str	w1, [x8, #4]
	ret
LBB0_20:
	and	w9, w1, #0xfe
	str	w9, [x8, #28]
	str	w1, [x8, #4]
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
                                        ; -- End function
	.comm	_sram,8,3                       ; @sram
	.comm	_cart,4,2                       ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.no_dead_strip	_mapper_smw_64_w
.subsections_via_symbols
