	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_PutByte                    ## -- Begin function SIO_PutByte
	.p2align	4, 0x90
_SIO_PutByte:                           ## @SIO_PutByte
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TransferStatus@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_14
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_22
## %bb.3:
	movq	_CommandIndex@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	_ExpectedBytes@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jge	LBB0_15
## %bb.4:
	movq	_CommandFrame@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	leal	1(%rdx), %ebx
	movl	%ebx, (%rax)
	movl	%edi, (%rsi,%rdx,4)
	movl	(%rax), %eax
	cmpl	(%rcx), %eax
	jl	LBB0_22
## %bb.5:
	movl	(%rsi), %eax
	addl	$-49, %eax
	cmpl	$7, %eax
	ja	LBB0_20
## %bb.6:
	movq	_SIO_drive_status@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	movl	(%rcx,%rax,4), %eax
	movq	_SIO_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.7:
	movq	_BINLOAD_start_binloading@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_20
LBB0_8:
	movq	_SIO_StatusRead@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rax
	movq	_SIO_ACK_INTERVAL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	jmp	LBB0_22
LBB0_9:
	movq	_DataIndex@GOTPCREL(%rip), %r15
	movslq	(%r15), %rax
	movq	_ExpectedBytes@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jge	LBB0_17
## %bb.10:
	movq	_DataBuffer@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	leal	1(%rax), %edx
	movl	%edx, (%r15)
	movb	%dil, (%rcx,%rax)
	movl	(%r14), %esi
	cmpl	%esi, (%r15)
	jl	LBB0_22
## %bb.11:
	movq	(%r12), %rdi
	decl	%esi
	callq	_SIO_ChkSum
	movq	(%r12), %rcx
	movslq	(%r14), %rdx
	cmpb	-1(%rdx,%rcx), %al
	jne	LBB0_18
## %bb.12:
	xorl	%eax, %eax
	callq	_WriteSectorBack
	testb	%al, %al
	je	LBB0_20
## %bb.13:
	movq	(%r12), %rcx
	movb	$65, (%rcx)
	movq	(%r12), %rcx
	movb	%al, 1(%rcx)
	movl	$2, %eax
	jmp	LBB0_19
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CASSETTE_PutByte               ## TAILCALL
LBB0_15:
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
LBB0_20:
	movq	_SIO_NoFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Log_print                      ## TAILCALL
LBB0_18:
	movb	$69, (%rcx)
	movl	$1, %eax
LBB0_19:
	movl	$0, (%r15)
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rcx
	movq	_SIO_ACK_INTERVAL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rdx
	movl	%eax, (%r14)
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rax
	movq	%rdx, (%rax)
	movq	_SIO_FinalStatus@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	movl	%eax, (%r13)
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TransferStatus,4,2             ## @TransferStatus
	.comm	_CommandIndex,4,2               ## @CommandIndex
	.comm	_ExpectedBytes,4,2              ## @ExpectedBytes
	.comm	_CommandFrame,8,3               ## @CommandFrame
	.comm	_SIO_drive_status,8,3           ## @SIO_drive_status
	.comm	_SIO_OFF,4,2                    ## @SIO_OFF
	.comm	_BINLOAD_start_binloading,4,2   ## @BINLOAD_start_binloading
	.comm	_SIO_StatusRead,4,2             ## @SIO_StatusRead
	.comm	_SIO_SERIN_INTERVAL,8,3         ## @SIO_SERIN_INTERVAL
	.comm	_SIO_ACK_INTERVAL,8,3           ## @SIO_ACK_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,8,3    ## @POKEY_DELAYED_SERIN_IRQ
	.comm	_SIO_NoFrame,4,2                ## @SIO_NoFrame
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid command frame!"

	.comm	_DataIndex,4,2                  ## @DataIndex
	.comm	_DataBuffer,8,3                 ## @DataBuffer
	.comm	_SIO_FinalStatus,4,2            ## @SIO_FinalStatus
L_.str.1:                               ## @.str.1
	.asciz	"Invalid data frame!"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SIO_PutByte                    ; -- Begin function SIO_PutByte
	.p2align	2
_SIO_PutByte:                           ; @SIO_PutByte
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x19, _TransferStatus@GOTPAGE
Lloh1:
	ldr	x19, [x19, _TransferStatus@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_13
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_20
; %bb.3:
Lloh2:
	adrp	x8, _CommandIndex@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CommandIndex@GOTPAGEOFF]
	ldrsw	x9, [x8]
Lloh4:
	adrp	x10, _ExpectedBytes@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ExpectedBytes@GOTPAGEOFF]
	ldr	w11, [x10]
	cmp	w9, w11
	b.ge	LBB0_14
; %bb.4:
Lloh6:
	adrp	x11, _CommandFrame@GOTPAGE
Lloh7:
	ldr	x11, [x11, _CommandFrame@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	add	w12, w9, #1
	str	w12, [x8]
	str	w0, [x11, x9, lsl #2]
	ldr	w8, [x8]
	ldr	w9, [x10]
	cmp	w8, w9
	b.lt	LBB0_20
; %bb.5:
	ldr	w8, [x11]
	sub	w8, w8, #49
	cmp	w8, #7
	b.hi	LBB0_15
; %bb.6:
Lloh9:
	adrp	x9, _SIO_drive_status@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SIO_drive_status@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w8, [x9, w8, uxtw #2]
Lloh12:
	adrp	x9, _SIO_OFF@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SIO_OFF@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _BINLOAD_start_binloading@GOTPAGE
Lloh16:
	ldr	x10, [x10, _BINLOAD_start_binloading@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w10, #0, #0, eq
	b.eq	LBB0_15
; %bb.7:
Lloh18:
	adrp	x8, _SIO_StatusRead@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SIO_StatusRead@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh21:
	adrp	x8, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh23:
	adrp	x9, _SIO_ACK_INTERVAL@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SIO_ACK_INTERVAL@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh27:
	adrp	x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh28:
	ldr	x9, [x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
Lloh29:
	str	x8, [x9]
	b	LBB0_20
LBB0_8:
Lloh30:
	adrp	x20, _DataIndex@GOTPAGE
Lloh31:
	ldr	x20, [x20, _DataIndex@GOTPAGEOFF]
	ldrsw	x8, [x20]
Lloh32:
	adrp	x21, _ExpectedBytes@GOTPAGE
Lloh33:
	ldr	x21, [x21, _ExpectedBytes@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ge	LBB0_16
; %bb.9:
Lloh34:
	adrp	x22, _DataBuffer@GOTPAGE
Lloh35:
	ldr	x22, [x22, _DataBuffer@GOTPAGEOFF]
	ldr	x9, [x22]
	add	w10, w8, #1
	str	w10, [x20]
	strb	w0, [x9, x8]
	ldr	w9, [x20]
	ldr	w8, [x21]
	cmp	w9, w8
	b.lt	LBB0_20
; %bb.10:
	ldr	x0, [x22]
	sub	w1, w8, #1
	bl	_SIO_ChkSum
	ldr	x8, [x22]
	ldrsw	x9, [x21]
	add	x9, x9, x8
	ldurb	w9, [x9, #-1]
	cmp	w9, w0, uxtb
	b.ne	LBB0_17
; %bb.11:
	bl	_WriteSectorBack
	cbz	w0, LBB0_15
; %bb.12:
	ldr	x8, [x22]
	mov	w9, #65
	strb	w9, [x8]
	ldr	x8, [x22]
	strb	w0, [x8, #1]
	mov	w8, #2
	b	LBB0_18
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_CASSETTE_PutByte
LBB0_14:
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
LBB0_15:
Lloh38:
	adrp	x8, _SIO_NoFrame@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SIO_NoFrame@GOTPAGEOFF]
	b	LBB0_19
LBB0_16:
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_Log_print
LBB0_17:
	mov	w9, #69
	strb	w9, [x8]
	mov	w8, #1
LBB0_18:
	str	wzr, [x20]
	str	w8, [x21]
Lloh42:
	adrp	x8, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
Lloh45:
	adrp	x9, _SIO_ACK_INTERVAL@GOTPAGE
Lloh46:
	ldr	x9, [x9, _SIO_ACK_INTERVAL@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh48:
	adrp	x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh49:
	ldr	x9, [x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
Lloh50:
	str	x8, [x9]
Lloh51:
	adrp	x8, _SIO_FinalStatus@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SIO_FinalStatus@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_20:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_TransferStatus,4,2             ; @TransferStatus
	.comm	_CommandIndex,4,2               ; @CommandIndex
	.comm	_ExpectedBytes,4,2              ; @ExpectedBytes
	.comm	_CommandFrame,8,3               ; @CommandFrame
	.comm	_SIO_drive_status,8,3           ; @SIO_drive_status
	.comm	_SIO_OFF,4,2                    ; @SIO_OFF
	.comm	_BINLOAD_start_binloading,4,2   ; @BINLOAD_start_binloading
	.comm	_SIO_StatusRead,4,2             ; @SIO_StatusRead
	.comm	_SIO_SERIN_INTERVAL,8,3         ; @SIO_SERIN_INTERVAL
	.comm	_SIO_ACK_INTERVAL,8,3           ; @SIO_ACK_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,8,3    ; @POKEY_DELAYED_SERIN_IRQ
	.comm	_SIO_NoFrame,4,2                ; @SIO_NoFrame
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid command frame!"

	.comm	_DataIndex,4,2                  ; @DataIndex
	.comm	_DataBuffer,8,3                 ; @DataBuffer
	.comm	_SIO_FinalStatus,4,2            ; @SIO_FinalStatus
l_.str.1:                               ; @.str.1
	.asciz	"Invalid data frame!"

.subsections_via_symbols
