	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_GetByte                    ## -- Begin function SIO_GetByte
	.p2align	4, 0x90
_SIO_GetByte:                           ## @SIO_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_TransferStatus@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%ebx, %ebx
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_15
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_Command_Frame                  ## TAILCALL
LBB0_3:
	movl	$129, (%r14)
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	movq	_DataIndex@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rax
	movq	_ExpectedBytes@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	jge	LBB0_16
## %bb.5:
	movq	_DataBuffer@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	leal	1(%rax), %edi
	movl	%edi, (%rcx)
	movl	(%rsi,%rax,4), %ebx
	cmpl	%edx, %edi
	jge	LBB0_6
## %bb.7:
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_POKEY_AUDF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_POKEY_CHAN3@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	imull	(%rax,%rdx,4), %ecx
	decl	%ecx
	movslq	%ecx, %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	sarq	$36, %rcx
	shrq	$63, %rax
	addl	%eax, %ecx
	incl	%ecx
LBB0_9:
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	jmp	LBB0_15
LBB0_10:
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	_ExpectedBytes@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	jge	LBB0_16
## %bb.11:
	movq	_DataBuffer@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	leal	1(%rcx), %esi
	movl	%esi, (%rax)
	movl	(%rdi,%rcx,4), %ebx
	cmpl	%edx, %esi
	jge	LBB0_6
## %bb.12:
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%esi, %esi
	jne	LBB0_14
## %bb.13:
	movq	_SIO_ACK_INTERVAL@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
LBB0_14:
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
LBB0_6:
	movq	_SIO_NoFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_17:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_CASSETTE_GetByte               ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_10
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_TransferStatus,4,2             ## @TransferStatus
	.comm	_SIO_SERIN_INTERVAL,4,2         ## @SIO_SERIN_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,4,2    ## @POKEY_DELAYED_SERIN_IRQ
	.comm	_DataIndex,4,2                  ## @DataIndex
	.comm	_ExpectedBytes,4,2              ## @ExpectedBytes
	.comm	_DataBuffer,8,3                 ## @DataBuffer
	.comm	_SIO_NoFrame,4,2                ## @SIO_NoFrame
	.comm	_POKEY_AUDF,8,3                 ## @POKEY_AUDF
	.comm	_POKEY_CHAN3,8,3                ## @POKEY_CHAN3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid read frame!"

	.comm	_SIO_ACK_INTERVAL,4,2           ## @SIO_ACK_INTERVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_GetByte                    ; -- Begin function SIO_GetByte
	.p2align	2
_SIO_GetByte:                           ; @SIO_GetByte
	.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, _TransferStatus@GOTPAGE
Lloh1:
	ldr	x19, [x19, _TransferStatus@GOTPAGEOFF]
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_Command_Frame
LBB0_3:
	mov	w0, #0
	b	LBB0_17
LBB0_4:
	mov	w8, #129
Lloh4:
	adrp	x9, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
	str	w8, [x19]
Lloh6:
	ldr	w8, [x9]
	lsl	w8, w8, #3
Lloh7:
	adrp	x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
LBB0_5:
Lloh10:
	adrp	x9, _DataIndex@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DataIndex@GOTPAGEOFF]
	ldrsw	x8, [x9]
Lloh12:
	adrp	x10, _ExpectedBytes@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ExpectedBytes@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ge	LBB0_15
; %bb.6:
Lloh15:
	adrp	x11, _DataBuffer@GOTPAGE
Lloh16:
	ldr	x11, [x11, _DataBuffer@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	add	w12, w8, #1
	str	w12, [x9]
	ldr	w0, [x11, x8, lsl #2]
	cmp	w12, w10
	b.ge	LBB0_16
; %bb.7:
Lloh18:
	adrp	x9, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cbz	w8, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _POKEY_AUDF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POKEY_AUDF@GOTPAGEOFF]
Lloh23:
	adrp	x10, _POKEY_CHAN3@GOTPAGE
Lloh24:
	ldr	x10, [x10, _POKEY_CHAN3@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	ldr	x10, [x10]
	ldr	w8, [x8, x10, lsl #2]
	mul	w8, w8, w9
	sub	w8, w8, #1
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #36
	add	w8, w8, w9
	add	w9, w8, #1
LBB0_9:
Lloh27:
	adrp	x8, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
Lloh29:
	str	w9, [x8]
	b	LBB0_17
LBB0_10:
Lloh30:
	adrp	x9, _DataIndex@GOTPAGE
Lloh31:
	ldr	x9, [x9, _DataIndex@GOTPAGEOFF]
	ldrsw	x8, [x9]
Lloh32:
	adrp	x10, _ExpectedBytes@GOTPAGE
Lloh33:
	ldr	x10, [x10, _ExpectedBytes@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ge	LBB0_15
; %bb.11:
Lloh35:
	adrp	x11, _DataBuffer@GOTPAGE
Lloh36:
	ldr	x11, [x11, _DataBuffer@GOTPAGEOFF]
Lloh37:
	ldr	x12, [x11]
	add	w11, w8, #1
	str	w11, [x9]
	ldr	w0, [x12, x8, lsl #2]
	cmp	w11, w10
	b.ge	LBB0_16
; %bb.12:
Lloh38:
	adrp	x8, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cbnz	w11, LBB0_14
; %bb.13:
Lloh41:
	adrp	x9, _SIO_ACK_INTERVAL@GOTPAGE
Lloh42:
	ldr	x9, [x9, _SIO_ACK_INTERVAL@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	add	w8, w9, w8
LBB0_14:
Lloh44:
	adrp	x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh45:
	ldr	x9, [x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
Lloh46:
	str	w8, [x9]
	b	LBB0_17
LBB0_15:
Lloh47:
	adrp	x0, l_.str@PAGE
Lloh48:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
	mov	w0, #0
LBB0_16:
Lloh49:
	adrp	x8, _SIO_NoFrame@GOTPAGE
Lloh50:
	ldr	x8, [x8, _SIO_NoFrame@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CASSETTE_GetByte
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_18-LBB0_2)>>2
                                        ; -- End function
	.comm	_TransferStatus,4,2             ; @TransferStatus
	.comm	_SIO_SERIN_INTERVAL,4,2         ; @SIO_SERIN_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,4,2    ; @POKEY_DELAYED_SERIN_IRQ
	.comm	_DataIndex,4,2                  ; @DataIndex
	.comm	_ExpectedBytes,4,2              ; @ExpectedBytes
	.comm	_DataBuffer,8,3                 ; @DataBuffer
	.comm	_SIO_NoFrame,4,2                ; @SIO_NoFrame
	.comm	_POKEY_AUDF,8,3                 ; @POKEY_AUDF
	.comm	_POKEY_CHAN3,8,3                ; @POKEY_CHAN3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid read frame!"

	.comm	_SIO_ACK_INTERVAL,4,2           ; @SIO_ACK_INTERVAL
.subsections_via_symbols
