	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_bank_SDX_128
_set_bank_SDX_128:                      ## @set_bank_SDX_128
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_active_cart@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	testb	$8, (%rax)
	jne	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_MEMORY_CartA0bfEnable
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movl	%edx, %ecx
	andl	$7, %ecx
	shrq	%rdx
	andl	$8, %edx
	orq	%rcx, %rdx
	shlq	$13, %rdx
	addq	8(%rax), %rdx
	movl	$40960, %edi                    ## imm = 0xA000
	movl	$49151, %esi                    ## imm = 0xBFFF
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_MEMORY_CopyROM                 ## TAILCALL
LBB0_1:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_MEMORY_CartA0bfDisable         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_active_cart,8,3                ## @active_cart
	.no_dead_strip	_set_bank_SDX_128
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_bank_SDX_128
_set_bank_SDX_128:                      ; @set_bank_SDX_128
	.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	x19, _active_cart@GOTPAGE
Lloh1:
	ldr	x19, [x19, _active_cart@GOTPAGEOFF]
	ldr	x8, [x19]
	ldrb	w8, [x8]
	tbnz	w8, #3, LBB0_2
; %bb.1:
	bl	_MEMORY_CartA0bfEnable
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	ldr	w8, [x8]
	lsr	x10, x8, #1
	and	x10, x10, #0x8
	bfxil	x10, x8, #0, #3
	add	x2, x9, x10, lsl #13
	mov	w0, #40960
	mov	w1, #49151
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MEMORY_CopyROM
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MEMORY_CartA0bfDisable
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_active_cart,8,3                ; @active_cart
	.no_dead_strip	_set_bank_SDX_128
.subsections_via_symbols
