	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetByte
_GetByte:                               ## @GetByte
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %ebx
	movl	%ebx, -28(%rbp)
	testl	%edx, %edx
	je	LBB0_1
LBB0_5:
	movl	4(%r15), %ecx
	movl	$255, %eax
	leal	-131(%rcx), %edx
	cmpl	$4, %edx
	jb	LBB0_9
## %bb.6:
	leal	-128(%rcx), %edx
	cmpl	$3, %edx
	jae	LBB0_7
## %bb.11:
	cmpl	$54690, %r14d                   ## imm = 0xD5A2
	je	LBB0_16
## %bb.12:
	cmpl	$54689, %r14d                   ## imm = 0xD5A1
	je	LBB0_15
## %bb.13:
	cmpl	$54688, %r14d                   ## imm = 0xD5A0
	jne	LBB0_17
## %bb.14:
	movzbl	(%r15), %eax
	jmp	LBB0_17
LBB0_9:
	testb	$-32, %r14b
	jne	LBB0_17
## %bb.10:
	movl	(%r15), %eax
	jmp	LBB0_17
LBB0_1:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_access_D5
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	-28(%rbp), %eax
	cmpl	%ebx, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, (%r15)
	movq	_active_cart@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_SwitchBank
	jmp	LBB0_5
LBB0_7:
	cmpl	$135, %ecx
	jne	LBB0_17
## %bb.8:
	movq	8(%r15), %rax
	movzbl	1(%r15), %ecx
	shlq	$8, %rcx
	movzbl	%r14b, %edx
	orq	%rcx, %rdx
	movl	(%rax,%rdx,4), %eax
	jmp	LBB0_17
LBB0_16:
	xorl	%eax, %eax
	testb	$64, 1(%r15)
	sete	%al
	jmp	LBB0_17
LBB0_15:
	movl	(%r15), %eax
	shrl	$8, %eax
	andl	$63, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_active_cart,8,3                ## @active_cart
	.comm	_CARTRIDGE_NONE,4,2             ## @CARTRIDGE_NONE
	.comm	_CARTRIDGE_piggyback,16,3       ## @CARTRIDGE_piggyback
	.no_dead_strip	_GetByte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetByte
_GetByte:                               ; @GetByte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	ldr	w21, [x0]
	str	w21, [sp, #12]
	cbz	w2, LBB0_9
LBB0_1:
	ldr	w8, [x19, #4]
	sub	w9, w8, #131
	cmp	w9, #4
	b.lo	LBB0_7
; %bb.2:
	sub	w9, w8, #128
	cmp	w9, #3
	b.hs	LBB0_13
; %bb.3:
	mov	w8, #54690
	cmp	w20, w8
	b.eq	LBB0_17
; %bb.4:
	mov	w8, #54689
	cmp	w20, w8
	b.eq	LBB0_18
; %bb.5:
	mov	w8, #54688
	cmp	w20, w8
	b.ne	LBB0_15
; %bb.6:
	ldrb	w0, [x19]
	b	LBB0_16
LBB0_7:
	tst	w20, #0xe0
	b.ne	LBB0_15
; %bb.8:
	ldr	w0, [x19]
	b	LBB0_16
LBB0_9:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_access_D5
	cbz	x0, LBB0_1
; %bb.10:
	ldr	w8, [sp, #12]
	cmp	w8, w21
	b.eq	LBB0_1
; %bb.11:
	str	w8, [x19]
Lloh0:
	adrp	x8, _active_cart@GOTPAGE
Lloh1:
	ldr	x8, [x8, _active_cart@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_1
; %bb.12:
	mov	x0, x21
	bl	_SwitchBank
	b	LBB0_1
LBB0_13:
	cmp	w8, #135
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
	ldrb	w9, [x19, #1]
	and	x10, x20, #0xff
	bfi	x10, x9, #8, #8
	ldr	w0, [x8, x10, lsl #2]
	b	LBB0_16
LBB0_15:
	mov	w0, #255
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	ldr	w8, [x19]
	mov	w9, #1
	bic	w0, w9, w8, lsr #14
	b	LBB0_16
LBB0_18:
	ldr	w8, [x19]
	ubfx	w0, w8, #8, #6
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_active_cart,8,3                ; @active_cart
	.comm	_CARTRIDGE_NONE,4,2             ; @CARTRIDGE_NONE
	.comm	_CARTRIDGE_piggyback,16,3       ; @CARTRIDGE_piggyback
	.no_dead_strip	_GetByte
.subsections_via_symbols
