	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AF80_D6GetByte                 ## -- Begin function AF80_D6GetByte
	.p2align	4, 0x90
_AF80_D6GetByte:                        ## @AF80_D6GetByte
	.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, %esi
	movq	_not_enable_2k_character_ram@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.1:
	movq	_not_enable_2k_attribute_ram@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.2:
	movq	_not_enable_crtc_registers@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	$255, %ebx
	jne	LBB0_8
## %bb.3:
	movq	_video_bank_select@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.4:
	movzbl	%sil, %eax
	movl	$255, %ebx
	cmpl	$63, %eax
	ja	LBB0_7
## %bb.5:
	movl	$1, %ebx
	cmpl	$58, %eax
	je	LBB0_7
## %bb.6:
	movq	_crtreg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	movl	(%rcx,%rax,4), %ebx
LBB0_7:
	movq	_CPU_remember_PC@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_CPU_remember_PC_curpos@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	movq	_CPU_REMEMBER_PC_STEPS@GOTPCREL(%rip), %rdi
	cltd
	idivl	(%rdi)
	movslq	%edx, %rax
	movl	(%rcx,%rax,4), %edx
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movl	%eax, %edi
	callq	_D
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	movl	%esi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_MEMORY_dGetByte                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_not_enable_2k_character_ram,4,2 ## @not_enable_2k_character_ram
	.comm	_not_enable_2k_attribute_ram,4,2 ## @not_enable_2k_attribute_ram
	.comm	_not_enable_crtc_registers,4,2  ## @not_enable_crtc_registers
	.comm	_video_bank_select,8,3          ## @video_bank_select
	.comm	_crtreg,8,3                     ## @crtreg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AF80 Read addr:%4x cpu:%4x\n"

	.comm	_CPU_remember_PC,8,3            ## @CPU_remember_PC
	.comm	_CPU_remember_PC_curpos,4,2     ## @CPU_remember_PC_curpos
	.comm	_CPU_REMEMBER_PC_STEPS,4,2      ## @CPU_REMEMBER_PC_STEPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AF80_D6GetByte                 ; -- Begin function AF80_D6GetByte
	.p2align	2
_AF80_D6GetByte:                        ; @AF80_D6GetByte
	.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
	mov	x1, x0
Lloh0:
	adrp	x8, _not_enable_2k_character_ram@GOTPAGE
Lloh1:
	ldr	x8, [x8, _not_enable_2k_character_ram@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _not_enable_2k_attribute_ram@GOTPAGE
Lloh4:
	ldr	x8, [x8, _not_enable_2k_attribute_ram@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _not_enable_crtc_registers@GOTPAGE
Lloh7:
	ldr	x8, [x8, _not_enable_crtc_registers@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _video_bank_select@GOTPAGE
Lloh10:
	ldr	x9, [x9, _video_bank_select@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	w8, #0
	ccmp	x9, #0, #0, eq
	b.eq	LBB0_5
; %bb.3:
	mov	w19, #255
	b	LBB0_9
LBB0_4:
	mov	x0, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MEMORY_dGetByte
LBB0_5:
	and	w8, w1, #0xff
	cmp	w8, #63
	b.hi	LBB0_7
; %bb.6:
Lloh12:
	adrp	x9, _crtreg@GOTPAGE
Lloh13:
	ldr	x9, [x9, _crtreg@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w9, [x9, w8, uxtw #2]
	cmp	w8, #58
	csinc	w19, w9, wzr, ne
	b	LBB0_8
LBB0_7:
	mov	w19, #255
LBB0_8:
Lloh15:
	adrp	x8, _CPU_remember_PC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CPU_remember_PC@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _CPU_remember_PC_curpos@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CPU_remember_PC_curpos@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _CPU_REMEMBER_PC_STEPS@GOTPAGE
Lloh22:
	ldr	x10, [x10, _CPU_REMEMBER_PC_STEPS@GOTPAGEOFF]
	sub	w9, w9, #1
Lloh23:
	ldr	w10, [x10]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	ldr	w2, [x8, w9, sxtw #2]
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	bl	_D
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_not_enable_2k_character_ram,4,2 ; @not_enable_2k_character_ram
	.comm	_not_enable_2k_attribute_ram,4,2 ; @not_enable_2k_attribute_ram
	.comm	_not_enable_crtc_registers,4,2  ; @not_enable_crtc_registers
	.comm	_video_bank_select,8,3          ; @video_bank_select
	.comm	_crtreg,8,3                     ; @crtreg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AF80 Read addr:%4x cpu:%4x\n"

	.comm	_CPU_remember_PC,8,3            ; @CPU_remember_PC
	.comm	_CPU_remember_PC_curpos,4,2     ; @CPU_remember_PC_curpos
	.comm	_CPU_REMEMBER_PC_STEPS,4,2      ; @CPU_REMEMBER_PC_STEPS
.subsections_via_symbols
