	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkdirty                     ## -- Begin function checkdirty
	.p2align	4, 0x90
_checkdirty:                            ## @checkdirty
	.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	%rsi, %r12
	movl	%edi, %r15d
	movq	(%rsi), %rax
	movq	_CLUST16_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	movq	_CLUST32_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
LBB0_2:
	movq	8(%r12), %r14
	movq	16(%r12), %rbx
	movq	%rbx, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r13
	imulq	%r14, %rbx
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_lseek
	cmpq	%rbx, %rax
	jne	LBB0_12
## %bb.4:
	movq	16(%r12), %rdx
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_read
	cmpq	16(%r12), %rax
	jne	LBB0_12
## %bb.5:
	movl	(%r13), %eax
	cmpl	24(%r12), %eax
	jne	LBB0_16
## %bb.6:
	cmpl	$255, 4(%r13)
	jne	LBB0_16
## %bb.7:
	movq	(%r12), %rcx
	movl	8(%r13), %eax
	movq	_CLUST16_MASK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.8:
	notl	%eax
	testb	$-8, %al
	jne	LBB0_16
## %bb.9:
	movl	12(%r13), %eax
	notl	%eax
	testb	$63, %al
	jne	LBB0_16
## %bb.10:
	testb	$-64, %al
LBB0_11:
	sete	%bl
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_perr
	jmp	LBB0_13
LBB0_14:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_perr
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_18:
	cmpl	$255, %eax
	jne	LBB0_16
## %bb.19:
	movl	12(%r13), %eax
	notl	%eax
	testb	$15, %al
	jne	LBB0_16
## %bb.20:
	movl	16(%r13), %eax
	notl	%eax
	testb	$-8, %al
	jne	LBB0_16
## %bb.21:
	cmpl	$255, 20(%r13)
	jne	LBB0_16
## %bb.22:
	cmpl	$255, 24(%r13)
	jne	LBB0_16
## %bb.23:
	movl	28(%r13), %eax
	notl	%eax
	testb	$3, %al
	jne	LBB0_16
## %bb.24:
	testb	$12, %al
	jmp	LBB0_11
LBB0_16:
	xorl	%ebx, %ebx
LBB0_13:
	movzbl	%bl, %ebx
	movq	%r13, %rdi
	callq	_free
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLUST16_MASK,8,3               ## @CLUST16_MASK
	.comm	_CLUST32_MASK,8,3               ## @CLUST32_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No space for FAT sectors (%zu)"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"Unable to read FAT"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checkdirty                     ; -- Begin function checkdirty
	.p2align	2
_checkdirty:                            ; @checkdirty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x23, _CLUST16_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CLUST16_MASK@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh2:
	adrp	x10, _CLUST32_MASK@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CLUST32_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_11
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	ldp	x24, x22, [x1, #8]
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_15
; %bb.2:
	mov	x19, x0
	mul	x22, x22, x24
Lloh5:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_lseek
	cmp	x0, x22
	b.ne	LBB0_12
; %bb.3:
	ldr	x2, [x20, #16]
	mov	x0, x21
	mov	x1, x19
	bl	_read
	ldr	x8, [x20, #16]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.4:
	ldr	w8, [x19]
	ldr	w9, [x20, #24]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.5:
	ldr	w8, [x19, #4]
	cmp	w8, #255
	b.ne	LBB0_13
; %bb.6:
	ldr	x9, [x20]
	ldr	x10, [x23]
	ldr	w8, [x19, #8]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.7:
	mvn	w8, w8
	tst	w8, #0xf8
	b.ne	LBB0_13
; %bb.8:
	ldr	w8, [x19, #12]
	mvn	w9, w8
	tst	w9, #0x3f
	b.ne	LBB0_13
; %bb.9:
	mov	w9, #192
LBB0_10:
	bics	wzr, w9, w8
	cset	w20, eq
	b	LBB0_14
LBB0_11:
	mov	w20, #0
	b	LBB0_16
LBB0_12:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perr
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x19
	bl	_free
	b	LBB0_16
LBB0_15:
	str	x22, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perr
	mov	w20, #1
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	cmp	w8, #255
	b.ne	LBB0_13
; %bb.18:
	ldr	w8, [x19, #12]
	mvn	w8, w8
	tst	w8, #0xf
	b.ne	LBB0_13
; %bb.19:
	ldr	w8, [x19, #16]
	mvn	w8, w8
	tst	w8, #0xf8
	b.ne	LBB0_13
; %bb.20:
	ldr	w8, [x19, #20]
	cmp	w8, #255
	b.ne	LBB0_13
; %bb.21:
	ldr	w8, [x19, #24]
	cmp	w8, #255
	b.ne	LBB0_13
; %bb.22:
	ldr	w8, [x19, #28]
	mvn	w9, w8
	tst	w9, #0x3
	b.ne	LBB0_13
; %bb.23:
	mov	w9, #12
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CLUST16_MASK,8,3               ; @CLUST16_MASK
	.comm	_CLUST32_MASK,8,3               ; @CLUST32_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No space for FAT sectors (%zu)"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"Unable to read FAT"

.subsections_via_symbols
