	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_bankswitch_w               ## -- Begin function gen_bankswitch_w
	.p2align	4, 0x90
_gen_bankswitch_w:                      ## @gen_bankswitch_w
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_system_bios@GOTPCREL(%rip), %rax
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.1:
	testb	$1, %dil
	jne	LBB0_2
## %bb.3:
	movq	_boot_rom@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_cart@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movq	_m68k@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_system_bios,4,2                ## @system_bios
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_cart,4,2                       ## @cart
	.comm	_m68k,8,3                       ## @m68k
	.comm	_boot_rom,4,2                   ## @boot_rom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gen_bankswitch_w               ; -- Begin function gen_bankswitch_w
	.p2align	2
_gen_bankswitch_w:                      ; @gen_bankswitch_w
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _system_bios@GOTPAGE
Lloh1:
	ldr	x8, [x8, _system_bios@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _boot_rom@GOTPAGE
Lloh7:
	ldr	x8, [x8, _boot_rom@GOTPAGEOFF]
Lloh8:
	adrp	x9, _cart@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cart@GOTPAGEOFF]
	tst	w0, #0x1
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _m68k@GOTPAGE
Lloh11:
	ldr	x9, [x9, _m68k@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_2:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_system_bios,4,2                ; @system_bios
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_cart,4,2                       ; @cart
	.comm	_m68k,8,3                       ; @m68k
	.comm	_boot_rom,4,2                   ; @boot_rom
.subsections_via_symbols
