	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkfilesys                   ## -- Begin function checkfilesys
	.p2align	4, 0x90
_checkfilesys:                          ## @checkfilesys
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	_alwaysno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_rdonly@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movq	_preen@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	je	LBB0_3
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_4
LBB0_2:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_9
## %bb.6:
	cmpl	$0, (%r14)
	jne	LBB0_9
## %bb.7:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_18
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
	jmp	LBB0_20
LBB0_9:
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.11:
	testl	%r12d, %r12d
	js	LBB0_21
LBB0_12:
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	callq	_readboot
	movq	_FSFATAL@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_14
## %bb.13:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_22
LBB0_14:
	movq	_skipclean@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	(%r13), %rax
	je	LBB0_26
## %bb.15:
	testq	%rax, %rax
	je	LBB0_26
## %bb.16:
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	callq	_checkdirty
	testq	%rax, %rax
	je	LBB0_25
## %bb.17:
	leaq	L_.str.4(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_str.22(%rip), %rdi
	callq	_puts
	xorl	%ebx, %ebx
	jmp	LBB0_62
LBB0_18:
	cmpq	$0, (%r13)
	jne	LBB0_20
## %bb.19:
	movl	$10, %edi
	callq	_putchar
LBB0_20:
	movl	$1, (%r14)
	testl	%r12d, %r12d
	jns	LBB0_12
LBB0_21:
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	callq	_perr
LBB0_22:
	movl	$10, %edi
	callq	_putchar
LBB0_23:
	movl	$8, %r14d
LBB0_24:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$10, %edi
	callq	_putchar
	testl	%r12d, %r12d
	jns	LBB0_12
	jmp	LBB0_21
LBB0_25:
	movq	(%r13), %rax
LBB0_26:
	testq	%rax, %rax
	jne	LBB0_28
## %bb.27:
	cmpq	$0, -88(%rbp)
	leaq	L_str.21(%rip), %rax
	leaq	L_str(%rip), %rdi
	cmovsq	%rax, %rdi
	callq	_puts
LBB0_28:
	movq	-88(%rbp), %rax
	xorl	%edx, %edx
	testq	%rax, %rax
	cmovgq	%rax, %rdx
	leaq	-88(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	movl	%r12d, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_readfat
	testl	%eax, (%r15)
	je	LBB0_30
## %bb.29:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_23
LBB0_30:
	movl	%eax, %r14d
	cmpq	$0, -88(%rbp)
	jns	LBB0_36
## %bb.31:
	cmpl	$2, -80(%rbp)
	jl	LBB0_36
## %bb.32:
	movl	$1, %r15d
	leaq	-88(%rbp), %r13
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r13, %r12
	movq	%r13, %rsi
	movl	%r15d, %edx
	leaq	-96(%rbp), %rcx
	callq	_readfat
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	_FSFATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_50
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=1
	movq	-48(%rbp), %rsi
	movq	-96(%rbp), %rdx
	movq	%r12, %r13
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movq	%rax, %r12
	callq	_comparefat
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	-96(%rbp), %rdi
	callq	_free
	testl	%r14d, (%r12)
	jne	LBB0_49
## %bb.35:                              ##   in Loop: Header=BB0_33 Depth=1
	incl	%r15d
	cmpl	-80(%rbp), %r15d
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	jl	LBB0_33
LBB0_36:
	movq	_preen@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	jne	LBB0_38
## %bb.37:
	leaq	L_str.18(%rip), %rdi
	callq	_puts
LBB0_38:
	movq	-48(%rbp), %rsi
	leaq	-88(%rbp), %rdi
	callq	_checkfat
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	$8, %r14d
	movq	_FSFATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_62
## %bb.39:
	cmpq	$0, (%r13)
	jne	LBB0_41
## %bb.40:
	leaq	L_str.19(%rip), %rdi
	callq	_puts
LBB0_41:
	movq	-48(%rbp), %rsi
	leaq	-88(%rbp), %rdi
	callq	_resetDosDirSection
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movl	$8, %r14d
	movq	_FSFATAL@GOTPCREL(%rip), %rbx
	testl	%r15d, (%rbx)
	jne	LBB0_61
## %bb.42:
	movq	-48(%rbp), %rdx
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	callq	_handleDirTree
	orl	%eax, %r15d
	testl	%r15d, (%rbx)
	jne	LBB0_61
## %bb.43:
	cmpq	$0, (%r13)
	jne	LBB0_45
## %bb.44:
	leaq	L_str.20(%rip), %rdi
	callq	_puts
LBB0_45:
	movq	-48(%rbp), %rdx
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	callq	_checklost
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_FSFATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_60
## %bb.46:
	movq	_FSFATMOD@GOTPCREL(%rip), %rax
	movq	_FSFIXFAT@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_52
## %bb.47:
	leaq	L_.str.11(%rip), %rsi
	movl	$1, %edi
	callq	_ask
	testq	%rax, %rax
	je	LBB0_51
## %bb.48:
	movq	-48(%rbp), %rdx
	movl	(%r15), %ecx
	andl	%ebx, %ecx
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	callq	_writefat
	orl	%eax, %ebx
	movl	%ebx, %r15d
	movq	_FSFATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_61
	jmp	LBB0_52
LBB0_49:
	movl	%r14d, %ebx
LBB0_50:
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	$8, %r14d
	jmp	LBB0_62
LBB0_51:
	movq	_FSERROR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_52:
	movl	-72(%rbp), %ecx
	movl	-68(%rbp), %eax
	movl	%eax, %esi
	imull	%ecx, %esi
	leal	1023(%rsi), %edx
	testl	%esi, %esi
	cmovnsl	%esi, %edx
	movl	-76(%rbp), %r9d
	sarl	$10, %edx
	movl	-64(%rbp), %esi
	testl	%r9d, %r9d
	je	LBB0_54
## %bb.53:
	imull	%r9d, %eax
	leal	1023(%rax), %r8d
	testl	%eax, %eax
	cmovnsl	%eax, %r8d
	sarl	$10, %r8d
	leaq	L_.str.12(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
	jmp	LBB0_55
LBB0_54:
	leaq	L_.str.13(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
LBB0_55:
	movq	_FSFATAL@GOTPCREL(%rip), %rcx
	testl	%ebx, %ebx
	je	LBB0_58
## %bb.56:
	movq	_FSERROR@GOTPCREL(%rip), %r15
	testl	%ebx, (%r15)
	je	LBB0_64
LBB0_57:
	movq	_FSFATAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_59
LBB0_58:
	xorl	%ebx, %ebx
LBB0_59:
	movq	_FSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	xorl	%r14d, %r14d
	testl	%ebx, %eax
	setne	%r14b
	shll	$3, %r14d
LBB0_60:
	movl	%ebx, %r15d
LBB0_61:
	xorl	%eax, %eax
	callq	_finishDosDirSection
	movl	%r15d, %ebx
LBB0_62:
	movq	-48(%rbp), %rdi
	callq	_free
	movl	%r12d, %edi
	callq	_close
	movq	_FSFATMOD@GOTPCREL(%rip), %rax
	movq	_FSDIRMOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_24
## %bb.63:
	leaq	L_.str.17(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
	jmp	LBB0_24
LBB0_64:
	movq	_FSDIRTY@GOTPCREL(%rip), %r14
	testl	%ebx, (%r14)
	je	LBB0_57
## %bb.65:
	leaq	L_.str.14(%rip), %rsi
	movl	$1, %edi
	callq	_ask
	movl	(%r14), %ecx
	movl	%ecx, %edx
	xorl	%r14d, %r14d
	negq	%rax
	sbbl	%r14d, %r14d
	notl	%edx
	orl	%edx, %r14d
	andl	%ebx, %r14d
	testl	%ecx, %r14d
	je	LBB0_67
## %bb.66:
	leaq	L_.str.15(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
	movq	-48(%rbp), %rdx
	leaq	-88(%rbp), %rsi
	movl	%r12d, %edi
	movl	$1, %ecx
	callq	_writefat
	movl	%eax, %ebx
	orl	%r14d, %ebx
	jmp	LBB0_57
LBB0_67:
	leaq	L_.str.16(%rip), %rdi
	xorl	%eax, %eax
	callq	_pwarn
	orl	(%r15), %r14d
	movl	%r14d, %ebx
	jmp	LBB0_57
	.cfi_endproc
                                        ## -- End function
	.comm	_alwaysno,4,2                   ## @alwaysno
	.comm	_rdonly,4,2                     ## @rdonly
	.comm	_preen,8,3                      ## @preen
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"** %s"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	" (NO WRITE)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Can't open `%s'"

	.comm	_FSFATAL,4,2                    ## @FSFATAL
	.comm	_skipclean,8,3                  ## @skipclean
L_.str.4:                               ## @.str.4
	.asciz	"%s: "

	.comm	_FSFATMOD,4,2                   ## @FSFATMOD
	.comm	_FSFIXFAT,4,2                   ## @FSFIXFAT
L_.str.11:                              ## @.str.11
	.asciz	"Update FATs"

	.comm	_FSERROR,4,2                    ## @FSERROR
L_.str.12:                              ## @.str.12
	.asciz	"%d files, %d free (%d clusters), %d bad (%d clusters)\n"

L_.str.13:                              ## @.str.13
	.asciz	"%d files, %d free (%d clusters)\n"

	.comm	_FSDIRTY,4,2                    ## @FSDIRTY
L_.str.14:                              ## @.str.14
	.asciz	"MARK FILE SYSTEM CLEAN"

L_.str.15:                              ## @.str.15
	.asciz	"MARKING FILE SYSTEM CLEAN\n"

L_.str.16:                              ## @.str.16
	.asciz	"\n***** FILE SYSTEM IS LEFT MARKED AS DIRTY *****\n"

	.comm	_FSDIRMOD,4,2                   ## @FSDIRMOD
L_.str.17:                              ## @.str.17
	.asciz	"\n***** FILE SYSTEM WAS MODIFIED *****\n"

L_str:                                  ## @str
	.asciz	"** Phase 1 - Read FAT"

L_str.18:                               ## @str.18
	.asciz	"** Phase 2 - Check Cluster Chains"

L_str.19:                               ## @str.19
	.asciz	"** Phase 3 - Checking Directories"

L_str.20:                               ## @str.20
	.asciz	"** Phase 4 - Checking for Lost Files"

L_str.21:                               ## @str.21
	.asciz	"** Phase 1 - Read and Compare FATs"

L_str.22:                               ## @str.22
	.asciz	"FILESYSTEM CLEAN; SKIPPING CHECKS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkfilesys                   ; -- Begin function checkfilesys
	.p2align	2
_checkfilesys:                          ; @checkfilesys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	str	xzr, [sp, #56]
Lloh0:
	adrp	x8, _alwaysno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _alwaysno@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _rdonly@GOTPAGE
Lloh4:
	ldr	x21, [x21, _rdonly@GOTPAGEOFF]
	str	w8, [x21]
Lloh5:
	adrp	x23, _preen@GOTPAGE
Lloh6:
	ldr	x23, [x23, _preen@GOTPAGEOFF]
	ldr	x9, [x23]
	cbnz	x9, LBB0_2
; %bb.1:
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	w8, [x21]
LBB0_2:
Lloh9:
	adrp	x22, _O_RDONLY@GOTPAGE
Lloh10:
	ldr	x22, [x22, _O_RDONLY@GOTPAGEOFF]
Lloh11:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x9, x22, eq
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_open
	mov	x19, x0
	tbz	w0, #31, LBB0_6
; %bb.3:
	ldr	w8, [x21]
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_open
	mov	x19, x0
	tbnz	w0, #31, LBB0_14
; %bb.5:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pwarn
	b	LBB0_16
LBB0_6:
	ldr	x8, [x23]
	cbz	x8, LBB0_21
; %bb.7:
	tbnz	w19, #31, LBB0_17
LBB0_8:
	add	x1, sp, #64
	mov	x0, x19
	bl	_readboot
Lloh15:
	adrp	x22, _FSFATAL@GOTPAGE
Lloh16:
	ldr	x22, [x22, _FSFATAL@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_close
	b	LBB0_18
LBB0_10:
Lloh17:
	adrp	x8, _skipclean@GOTPAGE
Lloh18:
	ldr	x8, [x8, _skipclean@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x8]
	ldr	x8, [x23]
	cbz	x9, LBB0_23
; %bb.11:
	cbz	x8, LBB0_23
; %bb.12:
	add	x1, sp, #64
	mov	x0, x19
	bl	_checkdirty
	cbz	x0, LBB0_22
; %bb.13:
	str	x20, [sp]
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
Lloh22:
	adrp	x0, l_str.22@PAGE
Lloh23:
	add	x0, x0, l_str.22@PAGEOFF
	bl	_puts
	mov	w21, #0
	mov	w20, #0
	b	LBB0_46
LBB0_14:
	ldr	x8, [x23]
	cbnz	x8, LBB0_16
; %bb.15:
	mov	w0, #10
	bl	_putchar
LBB0_16:
	mov	w8, #1
	str	w8, [x21]
	tbz	w19, #31, LBB0_8
LBB0_17:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_perr
LBB0_18:
	mov	w0, #10
	bl	_putchar
LBB0_19:
	mov	w21, #8
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_21:
	mov	w0, #10
	bl	_putchar
	tbz	w19, #31, LBB0_8
	b	LBB0_17
LBB0_22:
	ldr	x8, [x23]
LBB0_23:
	cbnz	x8, LBB0_25
; %bb.24:
	ldr	x8, [sp, #64]
Lloh26:
	adrp	x9, l_str@PAGE
Lloh27:
	add	x9, x9, l_str@PAGEOFF
Lloh28:
	adrp	x10, l_str.21@PAGE
Lloh29:
	add	x10, x10, l_str.21@PAGEOFF
	cmp	x8, #0
	csel	x0, x10, x9, lt
	bl	_puts
LBB0_25:
	ldr	x8, [sp, #64]
	cmp	x8, #0
	csel	x2, x8, xzr, gt
	add	x1, sp, #64
	add	x3, sp, #56
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_readfat
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_27
; %bb.26:
	mov	x0, x19
	bl	_close
	b	LBB0_19
LBB0_27:
	mov	x20, x0
	ldr	x8, [sp, #64]
	tbz	x8, #63, LBB0_33
; %bb.28:
	ldr	w8, [sp, #72]
	cmp	w8, #2
	b.lt	LBB0_33
; %bb.29:
	mov	w21, #1
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #64
	add	x3, sp, #48
	mov	x0, x19
	mov	x2, x21
	bl	_readfat
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.ne	LBB0_36
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	ldp	x2, x1, [sp, #48]
	add	x0, sp, #64
	mov	x3, x21
	bl	_comparefat
	orr	w20, w0, w20
	ldr	x0, [sp, #48]
	bl	_free
	ldr	w8, [x22]
	tst	w8, w20
	b.ne	LBB0_36
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	add	w21, w21, #1
	ldr	w8, [sp, #72]
	cmp	w21, w8
	b.lt	LBB0_30
LBB0_33:
	ldr	x8, [x23]
	cbnz	x8, LBB0_35
; %bb.34:
Lloh30:
	adrp	x0, l_str.18@PAGE
Lloh31:
	add	x0, x0, l_str.18@PAGEOFF
	bl	_puts
LBB0_35:
	ldr	x1, [sp, #56]
	add	x0, sp, #64
	bl	_checkfat
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.eq	LBB0_37
LBB0_36:
	mov	w21, #8
	b	LBB0_46
LBB0_37:
	ldr	x8, [x23]
	cbnz	x8, LBB0_39
; %bb.38:
Lloh32:
	adrp	x0, l_str.19@PAGE
Lloh33:
	add	x0, x0, l_str.19@PAGEOFF
	bl	_puts
LBB0_39:
	ldr	x1, [sp, #56]
	add	x0, sp, #64
	bl	_resetDosDirSection
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.ne	LBB0_44
; %bb.40:
	ldr	x2, [sp, #56]
	add	x1, sp, #64
	mov	x0, x19
	bl	_handleDirTree
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.ne	LBB0_44
; %bb.41:
	ldr	x8, [x23]
	cbnz	x8, LBB0_43
; %bb.42:
Lloh34:
	adrp	x0, l_str.20@PAGE
Lloh35:
	add	x0, x0, l_str.20@PAGEOFF
	bl	_puts
LBB0_43:
	ldr	x2, [sp, #56]
	add	x1, sp, #64
	mov	x0, x19
	bl	_checklost
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.eq	LBB0_48
LBB0_44:
	mov	w21, #8
LBB0_45:
	bl	_finishDosDirSection
LBB0_46:
	ldr	x0, [sp, #56]
	bl	_free
	mov	x0, x19
	bl	_close
Lloh36:
	adrp	x8, _FSFATMOD@GOTPAGE
Lloh37:
	ldr	x8, [x8, _FSFATMOD@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _FSDIRMOD@GOTPAGE
Lloh40:
	ldr	x9, [x9, _FSDIRMOD@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_20
; %bb.47:
Lloh42:
	adrp	x0, l_.str.17@PAGE
Lloh43:
	add	x0, x0, l_.str.17@PAGEOFF
	bl	_pwarn
	b	LBB0_20
LBB0_48:
Lloh44:
	adrp	x8, _FSFATMOD@GOTPAGE
Lloh45:
	ldr	x8, [x8, _FSFATMOD@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x21, _FSFIXFAT@GOTPAGE
Lloh48:
	ldr	x21, [x21, _FSFIXFAT@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_52
; %bb.49:
Lloh49:
	adrp	x1, l_.str.11@PAGE
Lloh50:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	w0, #1
	bl	_ask
	cbz	x0, LBB0_51
; %bb.50:
	ldr	x2, [sp, #56]
	ldr	w8, [x21]
	and	w3, w8, w20
	add	x1, sp, #64
	mov	x0, x19
	bl	_writefat
	orr	w20, w0, w20
	ldr	w8, [x22]
	tst	w20, w8
	b.ne	LBB0_44
	b	LBB0_52
LBB0_51:
Lloh51:
	adrp	x8, _FSERROR@GOTPAGE
Lloh52:
	ldr	x8, [x8, _FSERROR@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_52:
	ldp	w11, w9, [sp, #76]
	ldp	w12, w8, [sp, #84]
	mul	w10, w12, w9
	add	w13, w10, #1023
	cmp	w10, #0
	csel	w10, w13, w10, lt
	asr	w10, w10, #10
	cbz	w11, LBB0_54
; %bb.53:
	mul	w12, w12, w11
	add	w13, w12, #1023
	cmp	w12, #0
	csel	w12, w13, w12, lt
	asr	w12, w12, #10
	stp	x12, x11, [sp, #24]
	stp	x8, x10, [sp]
	str	x9, [sp, #16]
Lloh54:
	adrp	x0, l_.str.12@PAGE
Lloh55:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_55
LBB0_54:
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh56:
	adrp	x0, l_.str.13@PAGE
Lloh57:
	add	x0, x0, l_.str.13@PAGEOFF
LBB0_55:
	bl	_pwarn
	cbz	w20, LBB0_57
; %bb.56:
Lloh58:
	adrp	x21, _FSERROR@GOTPAGE
Lloh59:
	ldr	x21, [x21, _FSERROR@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_58
LBB0_57:
Lloh60:
	adrp	x8, _FSERROR@GOTPAGE
Lloh61:
	ldr	x8, [x8, _FSERROR@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh62:
	ldr	w8, [x8]
	orr	w8, w8, w9
	tst	w8, w20
	cset	w8, ne
	lsl	w21, w8, #3
	b	LBB0_45
LBB0_58:
Lloh63:
	adrp	x23, _FSDIRTY@GOTPAGE
Lloh64:
	ldr	x23, [x23, _FSDIRTY@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_57
; %bb.59:
Lloh65:
	adrp	x1, l_.str.14@PAGE
Lloh66:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	w0, #1
	bl	_ask
	ldr	w8, [x23]
	cmp	x0, #0
	mov	w9, #-1
	csinv	w9, w9, w8, ne
	and	w20, w9, w20
	tst	w20, w8
	b.eq	LBB0_61
; %bb.60:
Lloh67:
	adrp	x0, l_.str.15@PAGE
Lloh68:
	add	x0, x0, l_.str.15@PAGEOFF
	bl	_pwarn
	ldr	x2, [sp, #56]
	add	x1, sp, #64
	mov	x0, x19
	mov	w3, #1
	bl	_writefat
	orr	w20, w0, w20
	b	LBB0_57
LBB0_61:
Lloh69:
	adrp	x0, l_.str.16@PAGE
Lloh70:
	add	x0, x0, l_.str.16@PAGEOFF
	bl	_pwarn
	ldr	w8, [x21]
	orr	w20, w8, w20
	b	LBB0_57
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_alwaysno,4,2                   ; @alwaysno
	.comm	_rdonly,4,2                     ; @rdonly
	.comm	_preen,8,3                      ; @preen
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"** %s"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	" (NO WRITE)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Can't open `%s'"

	.comm	_FSFATAL,4,2                    ; @FSFATAL
	.comm	_skipclean,8,3                  ; @skipclean
l_.str.4:                               ; @.str.4
	.asciz	"%s: "

	.comm	_FSFATMOD,4,2                   ; @FSFATMOD
	.comm	_FSFIXFAT,4,2                   ; @FSFIXFAT
l_.str.11:                              ; @.str.11
	.asciz	"Update FATs"

	.comm	_FSERROR,4,2                    ; @FSERROR
l_.str.12:                              ; @.str.12
	.asciz	"%d files, %d free (%d clusters), %d bad (%d clusters)\n"

l_.str.13:                              ; @.str.13
	.asciz	"%d files, %d free (%d clusters)\n"

	.comm	_FSDIRTY,4,2                    ; @FSDIRTY
l_.str.14:                              ; @.str.14
	.asciz	"MARK FILE SYSTEM CLEAN"

l_.str.15:                              ; @.str.15
	.asciz	"MARKING FILE SYSTEM CLEAN\n"

l_.str.16:                              ; @.str.16
	.asciz	"\n***** FILE SYSTEM IS LEFT MARKED AS DIRTY *****\n"

	.comm	_FSDIRMOD,4,2                   ; @FSDIRMOD
l_.str.17:                              ; @.str.17
	.asciz	"\n***** FILE SYSTEM WAS MODIFIED *****\n"

l_str:                                  ; @str
	.asciz	"** Phase 1 - Read FAT"

l_str.18:                               ; @str.18
	.asciz	"** Phase 2 - Check Cluster Chains"

l_str.19:                               ; @str.19
	.asciz	"** Phase 3 - Checking Directories"

l_str.20:                               ; @str.20
	.asciz	"** Phase 4 - Checking for Lost Files"

l_str.21:                               ; @str.21
	.asciz	"** Phase 1 - Read and Compare FATs"

l_str.22:                               ; @str.22
	.asciz	"FILESYSTEM CLEAN; SKIPPING CHECKS"

.subsections_via_symbols
