	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_BountyBob2           ## -- Begin function CARTRIDGE_BountyBob2
	.p2align	4, 0x90
_CARTRIDGE_BountyBob2:                  ## @CARTRIDGE_BountyBob2
	.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
	movl	%edi, %ebx
	movq	_Atari800_machine_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_Atari800_MACHINE_5200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	addl	$-24566, %ebx                   ## imm = 0xA00A
	cmpl	$3, %ebx
	ja	LBB0_6
## %bb.2:
	movq	_active_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	%ebx, %ecx
	shll	$12, %ecx
	leaq	(%rcx,%rax), %rdx
	addq	$16384, %rdx                    ## imm = 0x4000
	movl	$20480, %edi                    ## imm = 0x5000
	movl	$24575, %esi                    ## imm = 0x5FFF
	jmp	LBB0_5
LBB0_3:
	addl	$-40950, %ebx                   ## imm = 0xFFFF600A
	cmpl	$3, %ebx
	ja	LBB0_6
## %bb.4:
	movq	_active_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	%ebx, %ecx
	shll	$12, %ecx
	leaq	(%rcx,%rax), %rdx
	addq	$16384, %rdx                    ## imm = 0x4000
	movl	$36864, %edi                    ## imm = 0x9000
	movl	$40959, %esi                    ## imm = 0x9FFF
LBB0_5:
	callq	_MEMORY_CopyROM
	movq	_active_cart@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	andl	$3, %ecx
	leal	(%rcx,%rbx,4), %ecx
	movl	%ecx, (%rax)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Atari800_machine_type,8,3      ## @Atari800_machine_type
	.comm	_Atari800_MACHINE_5200,8,3      ## @Atari800_MACHINE_5200
	.comm	_active_cart,8,3                ## @active_cart
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CARTRIDGE_BountyBob2           ; -- Begin function CARTRIDGE_BountyBob2
	.p2align	2
_CARTRIDGE_BountyBob2:                  ; @CARTRIDGE_BountyBob2
	.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, _Atari800_machine_type@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Atari800_machine_type@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _Atari800_MACHINE_5200@GOTPAGE
Lloh4:
	ldr	x9, [x9, _Atari800_MACHINE_5200@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	w8, #-24566
	add	w19, w0, w8
	cmp	w19, #3
	b.hi	LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _active_cart@GOTPAGE
Lloh7:
	ldr	x8, [x8, _active_cart@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	lsl	w9, w19, #12
	add	x8, x9, x8
	add	x2, x8, #4, lsl #12             ; =16384
	mov	w0, #20480
	mov	w1, #24575
	b	LBB0_5
LBB0_3:
	mov	w8, #-40950
	add	w19, w0, w8
	cmp	w19, #3
	b.hi	LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _active_cart@GOTPAGE
Lloh10:
	ldr	x8, [x8, _active_cart@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	lsl	w9, w19, #12
	add	x8, x9, x8
	add	x2, x8, #4, lsl #12             ; =16384
	mov	w0, #36864
	mov	w1, #40959
LBB0_5:
	bl	_MEMORY_CopyROM
Lloh12:
	adrp	x8, _active_cart@GOTPAGE
Lloh13:
	ldr	x8, [x8, _active_cart@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w9, [x8]
	bfi	w9, w19, #2, #30
	str	w9, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_Atari800_machine_type,8,3      ; @Atari800_machine_type
	.comm	_Atari800_MACHINE_5200,8,3      ; @Atari800_MACHINE_5200
	.comm	_active_cart,8,3                ; @active_cart
.subsections_via_symbols
