	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Command_Frame
_Command_Frame:                         ## @Command_Frame
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_CommandFrame@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %ecx
	movl	12(%rax), %ebx
	movl	(%rax), %r15d
	movl	4(%rax), %edx
	cmpl	$49, %r15d
	jl	LBB0_6
## %bb.1:
	leal	-49(%r15), %r14d
	movq	_SIO_MAX_DRIVES@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %r14d
	jge	LBB0_6
## %bb.2:
	shll	$8, %ebx
	orl	%ecx, %ebx
	cmpl	$160, %edx
	jg	LBB0_7
## %bb.3:
	addl	$-33, %edx
	cmpl	$54, %edx
	ja	LBB0_27
## %bb.4:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_DataBuffer@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	$4, %esi
	movl	%r14d, %edi
	callq	_SIO_ReadStatusBlock
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	addl	$4, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$12, %esi
	callq	_SIO_ChkSum
	movq	(%rbx), %rcx
	movl	%eax, 52(%rcx)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$14, (%rax)
	jmp	LBB0_22
LBB0_6:
	movl	16(%rax), %r9d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %r8d
	callq	_Log_print
	movq	_SIO_NoFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_32
LBB0_7:
	cmpl	$207, %edx
	jle	LBB0_12
## %bb.8:
	cmpl	$208, %edx
	je	LBB0_11
## %bb.9:
	cmpl	$210, %edx
	je	LBB0_15
## %bb.10:
	cmpl	$215, %edx
	jne	LBB0_27
LBB0_11:
	movsbl	%r14b, %edi
	leaq	-36(%rbp), %rdx
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_SIO_SizeOfSector
	movl	-36(%rbp), %eax
	incl	%eax
	movq	_ExpectedBytes@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_SIO_WriteFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_LAST_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_12:
	cmpl	$161, %edx
	je	LBB0_19
## %bb.13:
	cmpl	$162, %edx
	jne	LBB0_27
LBB0_14:
	movq	_DataBuffer@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	$4, %esi
	movl	%r14d, %edi
	movl	$128, %edx
	movl	$1040, %ecx                     ## imm = 0x410
	callq	_SIO_FormatDisk
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	addl	$4, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$128, %esi
	callq	_SIO_ChkSum
	movq	(%rbx), %rcx
	movl	%eax, 516(%rcx)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$130, (%rax)
	movq	_SIO_FormatFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_15:
	movsbl	%r14b, %edi
	leaq	-36(%rbp), %rdx
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_SIO_SizeOfSector
	movq	_DataBuffer@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	addl	$4, %edx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SIO_ReadSector
	movq	(%r12), %rdi
	movl	%eax, (%rdi)
	addl	$4, %edi
	movl	-36(%rbp), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_SIO_ChkSum
	movq	(%r12), %rcx
	movslq	-36(%rbp), %rdx
	movl	%eax, 4(%rcx,%rdx,4)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	-36(%rbp), %eax
	addl	$2, %eax
	movq	_ExpectedBytes@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_ReadFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	$2, %ecx
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_image_type@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movl	%r14d, %edx
	movl	(%rsi,%rdx,4), %esi
	movq	_IMAGE_TYPE_VAPI@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %esi
	jne	LBB0_25
## %bb.16:
	movq	_additional_info@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rsi,%rdx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.17:
	movl	(%rdx), %ecx
	movl	%ecx, %edx
	addl	$57, %edx
	movslq	%edx, %rdx
	imulq	$-1883757585, %rdx, %rdx        ## imm = 0x8FB823EF
	shrq	$32, %rdx
	addl	%edx, %ecx
	addl	$57, %ecx
	movl	%ecx, %edx
	sarl	$6, %edx
	shrl	$31, %ecx
	addl	%edx, %ecx
	addl	$-12, %ecx
LBB0_18:
	movl	%ecx, (%rax)
	jmp	LBB0_29
LBB0_19:
	movq	_SIO_format_sectorsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %edx
	movl	%edx, -36(%rbp)
	movq	_DataBuffer@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	addl	$4, %esi
	movq	_SIO_format_sectorcount@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %ecx
	movl	%r14d, %edi
	callq	_SIO_FormatDisk
	movq	(%r15), %rdi
	movl	%eax, (%rdi)
	addl	$4, %edi
	movslq	-36(%rbp), %rbx
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%ebx, %esi
	callq	_SIO_ChkSum
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx,%rbx,4)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	-36(%rbp), %eax
	addl	$2, %eax
	movq	_ExpectedBytes@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_FormatFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_20:
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$13, (%rax)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_SIO_WriteFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	jmp	LBB0_24
LBB0_21:
	movq	_DataBuffer@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	$4, %esi
	movl	%r14d, %edi
	callq	_SIO_DriveStatus
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	addl	$4, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$4, %esi
	callq	_SIO_ChkSum
	movq	(%rbx), %rcx
	movl	%eax, 20(%rcx)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$6, (%rax)
LBB0_22:
	movq	_SIO_ReadFrame@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_SERIN_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_POKEY_DELAYED_SERIN_IRQ@GOTPCREL(%rip), %rcx
LBB0_24:
	movl	%eax, (%rcx)
	jmp	LBB0_31
LBB0_25:
	cmpl	$1, %ebx
	jne	LBB0_28
## %bb.26:
	movq	_delay_counter@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movq	_SECTOR_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	jmp	LBB0_29
LBB0_27:
	movq	_SIO_NoFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movb	$69, %al
	jmp	LBB0_32
LBB0_28:
	movq	_delay_counter@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
LBB0_29:
	movq	_SIO_LAST_READ@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %eax
	movq	_SIO_last_op@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_last_op_time@GOTPCREL(%rip), %rax
	movl	$10, (%rax)
	addl	$-48, %r15d
	movq	_SIO_last_drive@GOTPCREL(%rip), %rax
	movl	%r15d, (%rax)
LBB0_31:
	movb	$65, %al
LBB0_32:
	movzbl	%al, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_14
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_5
	.long	L0_0_set_20
	.long	L0_0_set_11
	.long	L0_0_set_27
	.long	L0_0_set_15
	.long	L0_0_set_21
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_CommandFrame,8,3               ## @CommandFrame
	.comm	_SIO_MAX_DRIVES,4,2             ## @SIO_MAX_DRIVES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown command frame: %02x %02x %02x %02x %02x"

	.comm	_SIO_NoFrame,4,2                ## @SIO_NoFrame
	.comm	_TransferStatus,4,2             ## @TransferStatus
	.comm	_DataBuffer,8,3                 ## @DataBuffer
	.comm	_DataIndex,4,2                  ## @DataIndex
	.comm	_ExpectedBytes,4,2              ## @ExpectedBytes
	.comm	_SIO_ReadFrame,4,2              ## @SIO_ReadFrame
	.comm	_SIO_SERIN_INTERVAL,4,2         ## @SIO_SERIN_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,4,2    ## @POKEY_DELAYED_SERIN_IRQ
	.comm	_SIO_WriteFrame,4,2             ## @SIO_WriteFrame
	.comm	_SIO_LAST_WRITE,4,2             ## @SIO_LAST_WRITE
	.comm	_SIO_last_op,4,2                ## @SIO_last_op
	.comm	_SIO_last_op_time,4,2           ## @SIO_last_op_time
	.comm	_SIO_last_drive,4,2             ## @SIO_last_drive
	.comm	_image_type,8,3                 ## @image_type
	.comm	_IMAGE_TYPE_VAPI,4,2            ## @IMAGE_TYPE_VAPI
	.comm	_additional_info,8,3            ## @additional_info
	.comm	_delay_counter,4,2              ## @delay_counter
	.comm	_SECTOR_DELAY,4,2               ## @SECTOR_DELAY
	.comm	_SIO_LAST_READ,4,2              ## @SIO_LAST_READ
	.comm	_SIO_format_sectorsize,8,3      ## @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ## @SIO_format_sectorcount
	.comm	_SIO_FormatFrame,4,2            ## @SIO_FormatFrame
	.no_dead_strip	_Command_Frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Command_Frame
_Command_Frame:                         ; @Command_Frame
	.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
Lloh0:
	adrp	x8, _CommandFrame@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CommandFrame@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	w3, w4, [x8, #8]
	ldp	w19, w2, [x8]
	subs	w20, w19, #49
Lloh3:
	adrp	x9, _SIO_MAX_DRIVES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SIO_MAX_DRIVES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ccmp	w20, w9, #0, ge
	b.lt	LBB0_2
; %bb.1:
	ldr	w5, [x8, #16]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_Log_print
	mov	w0, #0
Lloh8:
	adrp	x8, _SIO_NoFrame@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIO_NoFrame@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	b	LBB0_31
LBB0_2:
	orr	w21, w3, w4, lsl #8
	cmp	w2, #160
	b.gt	LBB0_6
; %bb.3:
	sub	w8, w2, #33
	cmp	w8, #54
	b.hi	LBB0_26
; %bb.4:
Lloh14:
	adrp	x9, lJTI0_0@PAGE
Lloh15:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
Lloh16:
	adrp	x19, _DataBuffer@GOTPAGE
Lloh17:
	ldr	x19, [x19, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w1, w8, #4
	mov	x0, x20
	bl	_SIO_ReadStatusBlock
	ldr	x8, [x19]
	str	w0, [x8]
	add	w0, w8, #4
	mov	w1, #12
	bl	_SIO_ChkSum
	ldr	x8, [x19]
	str	w0, [x8, #52]
Lloh18:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #14
	b	LBB0_21
LBB0_6:
	cmp	w2, #207
	b.le	LBB0_11
; %bb.7:
	cmp	w2, #208
	b.eq	LBB0_10
; %bb.8:
	cmp	w2, #210
	b.eq	LBB0_14
; %bb.9:
	cmp	w2, #215
	b.ne	LBB0_26
LBB0_10:
	sxtb	w0, w20
	add	x2, sp, #12
	mov	x1, x21
	mov	x3, #0
	bl	_SIO_SizeOfSector
	ldr	w8, [sp, #12]
	add	w8, w8, #1
Lloh20:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
Lloh23:
	adrp	x8, _DataIndex@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh25:
	str	wzr, [x8]
Lloh26:
	adrp	x8, _SIO_WriteFrame@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SIO_WriteFrame@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh30:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh31:
	str	w8, [x9]
Lloh32:
	adrp	x8, _SIO_LAST_WRITE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SIO_LAST_WRITE@GOTPAGEOFF]
	b	LBB0_29
LBB0_11:
	cmp	w2, #161
	b.eq	LBB0_18
; %bb.12:
	cmp	w2, #162
	b.ne	LBB0_26
LBB0_13:
Lloh34:
	adrp	x19, _DataBuffer@GOTPAGE
Lloh35:
	ldr	x19, [x19, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w1, w8, #4
	mov	x0, x20
	mov	w2, #128
	mov	w3, #1040
	bl	_SIO_FormatDisk
	ldr	x8, [x19]
	str	w0, [x8]
	add	w0, w8, #4
	mov	w1, #128
	bl	_SIO_ChkSum
	ldr	x8, [x19]
	str	w0, [x8, #516]
Lloh36:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #130
Lloh38:
	str	w9, [x8]
Lloh39:
	adrp	x8, _SIO_FormatFrame@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SIO_FormatFrame@GOTPAGEOFF]
	b	LBB0_22
LBB0_14:
	sxtb	w0, w20
	add	x2, sp, #12
	mov	x1, x21
	mov	x3, #0
	bl	_SIO_SizeOfSector
Lloh41:
	adrp	x22, _DataBuffer@GOTPAGE
Lloh42:
	ldr	x22, [x22, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w2, w8, #4
	mov	x0, x20
	mov	x1, x21
	bl	_SIO_ReadSector
	ldr	x8, [x22]
	str	w0, [x8]
	add	w0, w8, #4
	ldr	w1, [sp, #12]
	bl	_SIO_ChkSum
	ldr	x8, [x22]
	ldrsw	x9, [sp, #12]
	add	x8, x8, x9, lsl #2
	str	w0, [x8, #4]
Lloh43:
	adrp	x8, _DataIndex@GOTPAGE
Lloh44:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh45:
	str	wzr, [x8]
	ldr	w8, [sp, #12]
Lloh46:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh47:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
	add	w8, w8, #2
Lloh48:
	str	w8, [x9]
Lloh49:
	adrp	x8, _SIO_ReadFrame@GOTPAGE
Lloh50:
	ldr	x8, [x8, _SIO_ReadFrame@GOTPAGEOFF]
Lloh51:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh52:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
Lloh54:
	str	w8, [x9]
Lloh55:
	adrp	x8, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh56:
	ldr	x8, [x8, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	lsl	w9, w8, #2
Lloh58:
	adrp	x8, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh59:
	ldr	x8, [x8, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
	str	w9, [x8]
Lloh60:
	adrp	x10, _image_type@GOTPAGE
Lloh61:
	ldr	x10, [x10, _image_type@GOTPAGEOFF]
Lloh62:
	ldr	x10, [x10]
	ldr	w10, [x10, w20, uxtw #2]
Lloh63:
	adrp	x11, _IMAGE_TYPE_VAPI@GOTPAGE
Lloh64:
	ldr	x11, [x11, _IMAGE_TYPE_VAPI@GOTPAGEOFF]
Lloh65:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_24
; %bb.15:
Lloh66:
	adrp	x10, _additional_info@GOTPAGE
Lloh67:
	ldr	x10, [x10, _additional_info@GOTPAGEOFF]
Lloh68:
	ldr	x10, [x10]
	ldr	x10, [x10, x20, lsl #3]
	cbz	x10, LBB0_17
; %bb.16:
	ldr	w9, [x10]
	add	w9, w9, #57
	mov	w10, #9199
	movk	w10, #36792, lsl #16
	smull	x10, w9, w10
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #6
	add	w9, w10, w9, lsr #31
	sub	w9, w9, #12
LBB0_17:
	str	w9, [x8]
	b	LBB0_28
LBB0_18:
Lloh69:
	adrp	x8, _SIO_format_sectorsize@GOTPAGE
Lloh70:
	ldr	x8, [x8, _SIO_format_sectorsize@GOTPAGEOFF]
Lloh71:
	ldr	x8, [x8]
	lsl	x9, x20, #2
	ldr	w2, [x8, x9]
	str	w2, [sp, #12]
Lloh72:
	adrp	x21, _DataBuffer@GOTPAGE
Lloh73:
	ldr	x21, [x21, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w1, w8, #4
Lloh74:
	adrp	x8, _SIO_format_sectorcount@GOTPAGE
Lloh75:
	ldr	x8, [x8, _SIO_format_sectorcount@GOTPAGEOFF]
Lloh76:
	ldr	x8, [x8]
	ldr	w3, [x8, x9]
	mov	x0, x20
	bl	_SIO_FormatDisk
	ldr	x8, [x21]
	str	w0, [x8]
	add	w0, w8, #4
	ldr	w19, [sp, #12]
	mov	x1, x19
	bl	_SIO_ChkSum
	ldr	x8, [x21]
	add	w9, w19, #1
	str	w0, [x8, w9, sxtw #2]
Lloh77:
	adrp	x8, _DataIndex@GOTPAGE
Lloh78:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh79:
	str	wzr, [x8]
	ldr	w8, [sp, #12]
	add	w8, w8, #2
Lloh80:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh81:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
Lloh82:
	adrp	x10, _SIO_FormatFrame@GOTPAGE
Lloh83:
	ldr	x10, [x10, _SIO_FormatFrame@GOTPAGEOFF]
Lloh84:
	str	w8, [x9]
Lloh85:
	ldr	w8, [x10]
Lloh86:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh87:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh88:
	adrp	x10, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh89:
	ldr	x10, [x10, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh90:
	str	w8, [x9]
Lloh91:
	ldr	w8, [x10]
	b	LBB0_23
LBB0_19:
Lloh92:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh93:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #13
Lloh94:
	str	w9, [x8]
Lloh95:
	adrp	x8, _DataIndex@GOTPAGE
Lloh96:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh97:
	adrp	x9, _SIO_WriteFrame@GOTPAGE
Lloh98:
	ldr	x9, [x9, _SIO_WriteFrame@GOTPAGEOFF]
Lloh99:
	str	wzr, [x8]
Lloh100:
	ldr	w8, [x9]
Lloh101:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh102:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
	b	LBB0_30
LBB0_20:
Lloh103:
	adrp	x19, _DataBuffer@GOTPAGE
Lloh104:
	ldr	x19, [x19, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w1, w8, #4
	mov	x0, x20
	bl	_SIO_DriveStatus
	ldr	x8, [x19]
	str	w0, [x8]
	add	w0, w8, #4
	mov	w1, #4
	bl	_SIO_ChkSum
	ldr	x8, [x19]
	str	w0, [x8, #20]
Lloh105:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh106:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #6
LBB0_21:
	str	w9, [x8]
Lloh107:
	adrp	x8, _SIO_ReadFrame@GOTPAGE
Lloh108:
	ldr	x8, [x8, _SIO_ReadFrame@GOTPAGEOFF]
LBB0_22:
Lloh109:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh110:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh111:
	str	w8, [x9]
Lloh112:
	adrp	x8, _DataIndex@GOTPAGE
Lloh113:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh114:
	adrp	x9, _SIO_SERIN_INTERVAL@GOTPAGE
Lloh115:
	ldr	x9, [x9, _SIO_SERIN_INTERVAL@GOTPAGEOFF]
Lloh116:
	str	wzr, [x8]
Lloh117:
	ldr	w8, [x9]
LBB0_23:
Lloh118:
	adrp	x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGE
Lloh119:
	ldr	x9, [x9, _POKEY_DELAYED_SERIN_IRQ@GOTPAGEOFF]
	b	LBB0_30
LBB0_24:
	cmp	w21, #1
	b.ne	LBB0_27
; %bb.25:
Lloh120:
	adrp	x10, _delay_counter@GOTPAGE
Lloh121:
	ldr	x10, [x10, _delay_counter@GOTPAGEOFF]
	ldr	w11, [x10]
	add	w9, w11, w9
	str	w9, [x8]
Lloh122:
	adrp	x8, _SECTOR_DELAY@GOTPAGE
Lloh123:
	ldr	x8, [x8, _SECTOR_DELAY@GOTPAGEOFF]
Lloh124:
	ldr	w8, [x8]
	str	w8, [x10]
	b	LBB0_28
LBB0_26:
Lloh125:
	adrp	x8, _SIO_NoFrame@GOTPAGE
Lloh126:
	ldr	x8, [x8, _SIO_NoFrame@GOTPAGEOFF]
Lloh127:
	ldr	w8, [x8]
Lloh128:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh129:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh130:
	str	w8, [x9]
	mov	w0, #69
	b	LBB0_31
LBB0_27:
Lloh131:
	adrp	x8, _delay_counter@GOTPAGE
Lloh132:
	ldr	x8, [x8, _delay_counter@GOTPAGEOFF]
Lloh133:
	str	wzr, [x8]
LBB0_28:
Lloh134:
	adrp	x8, _SIO_LAST_READ@GOTPAGE
Lloh135:
	ldr	x8, [x8, _SIO_LAST_READ@GOTPAGEOFF]
LBB0_29:
	ldr	w8, [x8]
Lloh136:
	adrp	x9, _SIO_last_op@GOTPAGE
Lloh137:
	ldr	x9, [x9, _SIO_last_op@GOTPAGEOFF]
Lloh138:
	str	w8, [x9]
Lloh139:
	adrp	x8, _SIO_last_op_time@GOTPAGE
Lloh140:
	ldr	x8, [x8, _SIO_last_op_time@GOTPAGEOFF]
	mov	w9, #10
Lloh141:
	str	w9, [x8]
	sub	w8, w19, #48
Lloh142:
	adrp	x9, _SIO_last_drive@GOTPAGE
Lloh143:
	ldr	x9, [x9, _SIO_last_drive@GOTPAGEOFF]
LBB0_30:
	str	w8, [x9]
	mov	w0, #65
LBB0_31:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotStr	Lloh51, Lloh52, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh53
	.loh AdrpLdrGotStr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotStr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh91
	.loh AdrpLdrGotStr	Lloh86, Lloh87, Lloh90
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh85
	.loh AdrpLdrGotStr	Lloh80, Lloh81, Lloh84
	.loh AdrpLdrGotStr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGot	Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh100
	.loh AdrpLdrGotStr	Lloh95, Lloh96, Lloh99
	.loh AdrpLdrGotStr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGot	Lloh105, Lloh106
	.loh AdrpLdrGot	Lloh103, Lloh104
	.loh AdrpLdrGot	Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh114, Lloh115, Lloh117
	.loh AdrpLdrGotStr	Lloh112, Lloh113, Lloh116
	.loh AdrpLdrGotStr	Lloh109, Lloh110, Lloh111
	.loh AdrpLdrGot	Lloh118, Lloh119
	.loh AdrpLdrGotLdr	Lloh122, Lloh123, Lloh124
	.loh AdrpLdrGot	Lloh120, Lloh121
	.loh AdrpLdrGotStr	Lloh128, Lloh129, Lloh130
	.loh AdrpLdrGotLdr	Lloh125, Lloh126, Lloh127
	.loh AdrpLdrGotStr	Lloh131, Lloh132, Lloh133
	.loh AdrpLdrGot	Lloh134, Lloh135
	.loh AdrpLdrGot	Lloh142, Lloh143
	.loh AdrpLdrGotStr	Lloh139, Lloh140, Lloh141
	.loh AdrpLdrGotStr	Lloh136, Lloh137, Lloh138
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_18-LBB0_5)>>2
	.byte	(LBB0_13-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_19-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_14-LBB0_5)>>2
	.byte	(LBB0_20-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_26-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
                                        ; -- End function
	.comm	_CommandFrame,8,3               ; @CommandFrame
	.comm	_SIO_MAX_DRIVES,4,2             ; @SIO_MAX_DRIVES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown command frame: %02x %02x %02x %02x %02x"

	.comm	_SIO_NoFrame,4,2                ; @SIO_NoFrame
	.comm	_TransferStatus,4,2             ; @TransferStatus
	.comm	_DataBuffer,8,3                 ; @DataBuffer
	.comm	_DataIndex,4,2                  ; @DataIndex
	.comm	_ExpectedBytes,4,2              ; @ExpectedBytes
	.comm	_SIO_ReadFrame,4,2              ; @SIO_ReadFrame
	.comm	_SIO_SERIN_INTERVAL,4,2         ; @SIO_SERIN_INTERVAL
	.comm	_POKEY_DELAYED_SERIN_IRQ,4,2    ; @POKEY_DELAYED_SERIN_IRQ
	.comm	_SIO_WriteFrame,4,2             ; @SIO_WriteFrame
	.comm	_SIO_LAST_WRITE,4,2             ; @SIO_LAST_WRITE
	.comm	_SIO_last_op,4,2                ; @SIO_last_op
	.comm	_SIO_last_op_time,4,2           ; @SIO_last_op_time
	.comm	_SIO_last_drive,4,2             ; @SIO_last_drive
	.comm	_image_type,8,3                 ; @image_type
	.comm	_IMAGE_TYPE_VAPI,4,2            ; @IMAGE_TYPE_VAPI
	.comm	_additional_info,8,3            ; @additional_info
	.comm	_delay_counter,4,2              ; @delay_counter
	.comm	_SECTOR_DELAY,4,2               ; @SECTOR_DELAY
	.comm	_SIO_LAST_READ,4,2              ; @SIO_LAST_READ
	.comm	_SIO_format_sectorsize,8,3      ; @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ; @SIO_format_sectorcount
	.comm	_SIO_FormatFrame,4,2            ; @SIO_FormatFrame
	.no_dead_strip	_Command_Frame
.subsections_via_symbols
