	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PIO_Command_Frame
_PIO_Command_Frame:                     ## @PIO_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_2
## %bb.1:
	leal	-49(%r15), %r14d
	movq	_SIO_MAX_DRIVES@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %r14d
	jge	LBB0_2
## %bb.3:
	leal	-1(%rdx), %eax
	cmpl	$86, %eax
	ja	LBB0_4
## %bb.30:
	shll	$8, %ebx
	orl	%ecx, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:
	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	_PIO_WriteFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_LAST_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_2:
	movl	16(%rax), %r9d
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r15d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_Log_print
	movq	_PIO_NoFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_29
LBB0_4:
	cmpl	$177, %edx
	je	LBB0_26
## %bb.5:
	cmpl	$178, %edx
	jne	LBB0_27
## %bb.6:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_8
LBB0_27:
	movq	_PIO_NoFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_28
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_23:
	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	_PIO_FormatFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_24:
	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	_PIO_FormatFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_8
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_8
LBB0_12:
	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_21
LBB0_13:
	movq	_ExpectedBytes@GOTPCREL(%rip), %rax
	movl	$13, (%rax)
	movq	_DataIndex@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_PIO_WriteFrame@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_16:
	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	_PIO_ReadFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_SIO_LAST_READ@GOTPCREL(%rip), %rax
LBB0_15:
	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)
	movb	$65, %r14b
	jmp	LBB0_29
LBB0_17:
	movq	_DataBuffer@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	$4, %esi
	movl	%r14d, %edi
	callq	_SIO_DriveStatus
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	movl	$255, 8(%rdi)
	movq	_SIO_drive_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movl	(%rax,%rcx,4), %eax
	movq	_SIO_NO_DISK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_19
## %bb.18:
	movq	_SIO_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
LBB0_19:
	movl	$127, 8(%rdi)
LBB0_20:
	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_21:
	movq	_PIO_ReadFrame@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	movq	_TransferStatus@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movb	$65, %r14b
	jmp	LBB0_29
LBB0_26:
	leaq	L_.str.5(%rip), %rdi
LBB0_8:
	xorl	%eax, %eax
	callq	_Log_print
LBB0_28:
	movb	$69, %r14b
LBB0_29:
	movzbl	%r14b, %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_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_9
	.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_23
	.long	L0_0_set_24
	.long	L0_0_set_10
	.long	L0_0_set_11
	.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_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_27
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_27
	.long	L0_0_set_14
	.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	_PIO_NoFrame,4,2                ## @PIO_NoFrame
	.comm	_TransferStatus,4,2             ## @TransferStatus
L_.str.1:                               ## @.str.1
	.asciz	"PIO DISK: Set large mode (unimplemented)"

L_.str.2:                               ## @.str.2
	.asciz	"PIO DISK: Set small mode (unimplemented)"

L_.str.3:                               ## @.str.3
	.asciz	"PIO DISK: Drive Diagnostic In (unimplemented)"

L_.str.4:                               ## @.str.4
	.asciz	"PIO DISK: Drive Diagnostic Out (unimplemented)"

	.comm	_DataBuffer,8,3                 ## @DataBuffer
	.comm	_DataIndex,4,2                  ## @DataIndex
	.comm	_ExpectedBytes,4,2              ## @ExpectedBytes
	.comm	_PIO_ReadFrame,4,2              ## @PIO_ReadFrame
	.comm	_PIO_WriteFrame,4,2             ## @PIO_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	_SIO_LAST_READ,4,2              ## @SIO_LAST_READ
	.comm	_SIO_drive_status,8,3           ## @SIO_drive_status
	.comm	_SIO_NO_DISK,4,2                ## @SIO_NO_DISK
	.comm	_SIO_OFF,4,2                    ## @SIO_OFF
	.comm	_SIO_format_sectorsize,8,3      ## @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ## @SIO_format_sectorcount
	.comm	_PIO_FormatFrame,4,2            ## @PIO_FormatFrame
L_.str.5:                               ## @.str.5
	.asciz	"PIO DISK: Internal Command 0xb1 (unimplemented)"

L_.str.6:                               ## @.str.6
	.asciz	"PIO DISK: Internal Command 0xb2 (unimplemented)"

	.no_dead_strip	_PIO_Command_Frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PIO_Command_Frame
_PIO_Command_Frame:                     ; @PIO_Command_Frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x11, [x8]
	ldp	w8, w10, [x11, #8]
	ldp	w21, w9, [x11]
	subs	w19, w21, #49
Lloh3:
	adrp	x12, _SIO_MAX_DRIVES@GOTPAGE
Lloh4:
	ldr	x12, [x12, _SIO_MAX_DRIVES@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	ccmp	w19, w12, #0, ge
	b.lt	LBB0_2
; %bb.1:
	ldr	w11, [x11, #16]
	stp	x10, x11, [sp, #24]
	stp	x9, x8, [sp, #8]
	str	x21, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
	mov	w0, #0
Lloh8:
	adrp	x8, _PIO_NoFrame@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PIO_NoFrame@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	b	LBB0_30
LBB0_2:
	sub	w11, w9, #1
	cmp	w11, #86
	b.hi	LBB0_5
; %bb.3:
	orr	w20, w8, w10, lsl #8
Lloh14:
	adrp	x8, lJTI0_0@PAGE
Lloh15:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_4
	ldrb	w10, [x8, x11]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_4:
	sxtb	w0, w19
	sub	x2, x29, #36
	mov	x1, x20
	mov	x3, #0
	bl	_SIO_SizeOfSector
	ldur	w8, [x29, #-36]
	add	w8, w8, #1
Lloh16:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
Lloh18:
	str	w8, [x9]
Lloh19:
	adrp	x8, _DataIndex@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh21:
	str	wzr, [x8]
Lloh22:
	adrp	x8, _PIO_WriteFrame@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PIO_WriteFrame@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh26:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh27:
	str	w8, [x9]
Lloh28:
	adrp	x8, _SIO_LAST_WRITE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SIO_LAST_WRITE@GOTPAGEOFF]
	b	LBB0_18
LBB0_5:
	cmp	w9, #177
	b.eq	LBB0_27
; %bb.6:
	cmp	w9, #178
	b.ne	LBB0_8
; %bb.7:
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_28
LBB0_8:
Lloh32:
	adrp	x8, _PIO_NoFrame@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PIO_NoFrame@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh36:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh37:
	str	w8, [x9]
	b	LBB0_29
LBB0_9:
Lloh38:
	adrp	x0, l_.str.1@PAGE
Lloh39:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_28
LBB0_10:
Lloh40:
	adrp	x0, l_.str.2@PAGE
Lloh41:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_28
LBB0_11:
Lloh42:
	adrp	x8, _SIO_format_sectorsize@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SIO_format_sectorsize@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	lsl	x9, x19, #2
	ldr	w2, [x8, x9]
	stur	w2, [x29, #-36]
Lloh45:
	adrp	x20, _DataBuffer@GOTPAGE
Lloh46:
	ldr	x20, [x20, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w1, w8, #4
Lloh47:
	adrp	x8, _SIO_format_sectorcount@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SIO_format_sectorcount@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	ldr	w3, [x8, x9]
	mov	x0, x19
	bl	_SIO_FormatDisk
	ldr	x8, [x20]
	str	w0, [x8]
	add	w0, w8, #4
	ldur	w19, [x29, #-36]
	mov	x1, x19
	bl	_SIO_ChkSum
	ldr	x8, [x20]
	add	w9, w19, #1
	str	w0, [x8, w9, sxtw #2]
Lloh50:
	adrp	x8, _DataIndex@GOTPAGE
Lloh51:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh52:
	str	wzr, [x8]
	ldur	w8, [x29, #-36]
	add	w8, w8, #2
Lloh53:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh54:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
Lloh55:
	adrp	x10, _PIO_FormatFrame@GOTPAGE
Lloh56:
	ldr	x10, [x10, _PIO_FormatFrame@GOTPAGEOFF]
Lloh57:
	str	w8, [x9]
	b	LBB0_24
LBB0_12:
Lloh58:
	adrp	x20, _DataBuffer@GOTPAGE
Lloh59:
	ldr	x20, [x20, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w1, w8, #4
	mov	x0, x19
	mov	w2, #128
	mov	w3, #1040
	bl	_SIO_FormatDisk
	ldr	x8, [x20]
	str	w0, [x8]
	add	w0, w8, #4
	mov	w1, #128
	bl	_SIO_ChkSum
	ldr	x8, [x20]
	str	w0, [x8, #516]
Lloh60:
	adrp	x8, _DataIndex@GOTPAGE
Lloh61:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh62:
	str	wzr, [x8]
Lloh63:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh64:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #130
Lloh65:
	adrp	x10, _PIO_FormatFrame@GOTPAGE
Lloh66:
	ldr	x10, [x10, _PIO_FormatFrame@GOTPAGEOFF]
	b	LBB0_23
LBB0_13:
Lloh67:
	adrp	x0, l_.str.3@PAGE
Lloh68:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_28
LBB0_14:
Lloh69:
	adrp	x0, l_.str.4@PAGE
Lloh70:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_28
LBB0_15:
Lloh71:
	adrp	x20, _DataBuffer@GOTPAGE
Lloh72:
	ldr	x20, [x20, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w1, w8, #4
	mov	x0, x19
	bl	_SIO_ReadStatusBlock
	ldr	x8, [x20]
	str	w0, [x8]
	add	w0, w8, #4
	mov	w1, #12
	bl	_SIO_ChkSum
	ldr	x8, [x20]
	str	w0, [x8, #52]
Lloh73:
	adrp	x8, _DataIndex@GOTPAGE
Lloh74:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh75:
	str	wzr, [x8]
Lloh76:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh77:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #14
	b	LBB0_22
LBB0_16:
Lloh78:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh79:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #13
Lloh80:
	str	w9, [x8]
Lloh81:
	adrp	x8, _DataIndex@GOTPAGE
Lloh82:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh83:
	adrp	x9, _PIO_WriteFrame@GOTPAGE
Lloh84:
	ldr	x9, [x9, _PIO_WriteFrame@GOTPAGEOFF]
Lloh85:
	str	wzr, [x8]
Lloh86:
	ldr	w8, [x9]
	b	LBB0_25
LBB0_17:
	sxtb	w0, w19
	sub	x2, x29, #36
	mov	x1, x20
	mov	x3, #0
	bl	_SIO_SizeOfSector
Lloh87:
	adrp	x22, _DataBuffer@GOTPAGE
Lloh88:
	ldr	x22, [x22, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w2, w8, #4
	mov	x0, x19
	mov	x1, x20
	bl	_SIO_ReadSector
	ldr	x8, [x22]
	str	w0, [x8]
	add	w0, w8, #4
	ldur	w1, [x29, #-36]
	bl	_SIO_ChkSum
	ldr	x8, [x22]
	ldursw	x9, [x29, #-36]
	add	x8, x8, x9, lsl #2
	str	w0, [x8, #4]
Lloh89:
	adrp	x8, _DataIndex@GOTPAGE
Lloh90:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh91:
	str	wzr, [x8]
	ldur	w8, [x29, #-36]
	add	w8, w8, #2
Lloh92:
	adrp	x9, _ExpectedBytes@GOTPAGE
Lloh93:
	ldr	x9, [x9, _ExpectedBytes@GOTPAGEOFF]
Lloh94:
	str	w8, [x9]
Lloh95:
	adrp	x8, _PIO_ReadFrame@GOTPAGE
Lloh96:
	ldr	x8, [x8, _PIO_ReadFrame@GOTPAGEOFF]
Lloh97:
	ldr	w8, [x8]
Lloh98:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh99:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
Lloh100:
	str	w8, [x9]
Lloh101:
	adrp	x8, _SIO_LAST_READ@GOTPAGE
Lloh102:
	ldr	x8, [x8, _SIO_LAST_READ@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
Lloh103:
	adrp	x9, _SIO_last_op@GOTPAGE
Lloh104:
	ldr	x9, [x9, _SIO_last_op@GOTPAGEOFF]
Lloh105:
	str	w8, [x9]
Lloh106:
	adrp	x8, _SIO_last_op_time@GOTPAGE
Lloh107:
	ldr	x8, [x8, _SIO_last_op_time@GOTPAGEOFF]
	mov	w9, #10
Lloh108:
	str	w9, [x8]
	sub	w8, w21, #48
Lloh109:
	adrp	x9, _SIO_last_drive@GOTPAGE
Lloh110:
	ldr	x9, [x9, _SIO_last_drive@GOTPAGEOFF]
	b	LBB0_26
LBB0_19:
Lloh111:
	adrp	x20, _DataBuffer@GOTPAGE
Lloh112:
	ldr	x20, [x20, _DataBuffer@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w1, w8, #4
	mov	x0, x19
	bl	_SIO_DriveStatus
	ldr	x8, [x20]
	str	w0, [x8]
	mov	w9, #255
Lloh113:
	adrp	x10, _SIO_drive_status@GOTPAGE
Lloh114:
	ldr	x10, [x10, _SIO_drive_status@GOTPAGEOFF]
	str	w9, [x8, #8]
Lloh115:
	ldr	x9, [x10]
	ldr	w9, [x9, w19, uxtw #2]
Lloh116:
	adrp	x10, _SIO_NO_DISK@GOTPAGE
Lloh117:
	ldr	x10, [x10, _SIO_NO_DISK@GOTPAGEOFF]
Lloh118:
	ldr	w10, [x10]
Lloh119:
	adrp	x11, _SIO_OFF@GOTPAGE
Lloh120:
	ldr	x11, [x11, _SIO_OFF@GOTPAGEOFF]
Lloh121:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.ne	LBB0_21
; %bb.20:
	mov	w9, #127
	str	w9, [x8, #8]
LBB0_21:
	add	w0, w8, #4
	mov	w1, #4
	bl	_SIO_ChkSum
	ldr	x8, [x20]
	str	w0, [x8, #20]
Lloh122:
	adrp	x8, _DataIndex@GOTPAGE
Lloh123:
	ldr	x8, [x8, _DataIndex@GOTPAGEOFF]
Lloh124:
	str	wzr, [x8]
Lloh125:
	adrp	x8, _ExpectedBytes@GOTPAGE
Lloh126:
	ldr	x8, [x8, _ExpectedBytes@GOTPAGEOFF]
	mov	w9, #6
LBB0_22:
Lloh127:
	adrp	x10, _PIO_ReadFrame@GOTPAGE
Lloh128:
	ldr	x10, [x10, _PIO_ReadFrame@GOTPAGEOFF]
LBB0_23:
	str	w9, [x8]
LBB0_24:
	ldr	w8, [x10]
LBB0_25:
Lloh129:
	adrp	x9, _TransferStatus@GOTPAGE
Lloh130:
	ldr	x9, [x9, _TransferStatus@GOTPAGEOFF]
LBB0_26:
	str	w8, [x9]
	mov	w0, #65
	b	LBB0_30
LBB0_27:
Lloh131:
	adrp	x0, l_.str.5@PAGE
Lloh132:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_28:
	bl	_Log_print
LBB0_29:
	mov	w0, #69
LBB0_30:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	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	Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotStr	Lloh53, Lloh54, Lloh57
	.loh AdrpLdrGotStr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotStr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGotStr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh86
	.loh AdrpLdrGotStr	Lloh81, Lloh82, Lloh85
	.loh AdrpLdrGotStr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh101, Lloh102
	.loh AdrpLdrGotStr	Lloh98, Lloh99, Lloh100
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotStr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotStr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh109, Lloh110
	.loh AdrpLdrGotStr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotStr	Lloh103, Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh119, Lloh120, Lloh121
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGot	Lloh111, Lloh112
	.loh AdrpLdrGot	Lloh125, Lloh126
	.loh AdrpLdrGotStr	Lloh122, Lloh123, Lloh124
	.loh AdrpLdrGot	Lloh127, Lloh128
	.loh AdrpLdrGot	Lloh129, Lloh130
	.loh AdrpAdd	Lloh131, Lloh132
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_15-LBB0_4)>>2
	.byte	(LBB0_16-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>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	_PIO_NoFrame,4,2                ; @PIO_NoFrame
	.comm	_TransferStatus,4,2             ; @TransferStatus
l_.str.1:                               ; @.str.1
	.asciz	"PIO DISK: Set large mode (unimplemented)"

l_.str.2:                               ; @.str.2
	.asciz	"PIO DISK: Set small mode (unimplemented)"

l_.str.3:                               ; @.str.3
	.asciz	"PIO DISK: Drive Diagnostic In (unimplemented)"

l_.str.4:                               ; @.str.4
	.asciz	"PIO DISK: Drive Diagnostic Out (unimplemented)"

	.comm	_DataBuffer,8,3                 ; @DataBuffer
	.comm	_DataIndex,4,2                  ; @DataIndex
	.comm	_ExpectedBytes,4,2              ; @ExpectedBytes
	.comm	_PIO_ReadFrame,4,2              ; @PIO_ReadFrame
	.comm	_PIO_WriteFrame,4,2             ; @PIO_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	_SIO_LAST_READ,4,2              ; @SIO_LAST_READ
	.comm	_SIO_drive_status,8,3           ; @SIO_drive_status
	.comm	_SIO_NO_DISK,4,2                ; @SIO_NO_DISK
	.comm	_SIO_OFF,4,2                    ; @SIO_OFF
	.comm	_SIO_format_sectorsize,8,3      ; @SIO_format_sectorsize
	.comm	_SIO_format_sectorcount,8,3     ; @SIO_format_sectorcount
	.comm	_PIO_FormatFrame,4,2            ; @PIO_FormatFrame
l_.str.5:                               ; @.str.5
	.asciz	"PIO DISK: Internal Command 0xb1 (unimplemented)"

l_.str.6:                               ; @.str.6
	.asciz	"PIO DISK: Internal Command 0xb2 (unimplemented)"

	.no_dead_strip	_PIO_Command_Frame
.subsections_via_symbols
