	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function updatefats
_updatefats:                            ## @updatefats
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_MSDOSFS_FATMIRROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_13
## %bb.1:
	movq	%rdx, %r15
	cmpq	%rdx, 8(%r12)
	jne	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	callq	_FAT12
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	xorl	%eax, %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	$2, 16(%r12)
	jge	LBB0_6
	jmp	LBB0_13
LBB0_4:
	movq	%r12, %rdi
	callq	_FAT16
	testq	%rax, %rax
	sete	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	setne	%al
	cmpl	$2, 16(%r12)
	jl	LBB0_13
LBB0_6:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	orb	%al, %cl
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testb	%al, %al
	movl	$128, %ecx
	movl	$8, %edx
	cmovnel	%ecx, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	xorb	$1, %al
	movzbl	%al, %eax
	leaq	3(,%rax,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	callq	_bdwrite
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r13d
	cmpl	16(%r12), %r13d
	jge	LBB0_13
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addq	24(%r12), %r15
	movl	32(%r12), %edi
	movl	8(%r14), %edx
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_getblk
	movq	%rax, %rbx
	movq	(%rax), %rdi
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	callq	_memcpy
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rbx), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	orl	%ecx, (%rax,%rdx,4)
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_SYNCHRONOUS_WRITES
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	callq	_bwrite
	jmp	LBB0_12
LBB0_13:
	movq	%r12, %rdi
	callq	_SYNCHRONOUS_WRITES
	movq	%r14, %rdi
	addq	$24, %rsp
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bwrite                         ## TAILCALL
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bdwrite                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSDOSFS_FATMIRROR,4,2          ## @MSDOSFS_FATMIRROR
	.no_dead_strip	_updatefats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function updatefats
_updatefats:                            ; @updatefats
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MSDOSFS_FATMIRROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSDOSFS_FATMIRROR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.1:
	mov	x21, x2
	ldr	x8, [x20, #8]
	cmp	x8, x2
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_FAT12
	cbz	x0, LBB0_4
LBB0_3:
	mov	w8, #0
	mov	w9, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_FAT16
	cmp	x0, #0
	cset	w9, eq
	cset	w8, ne
LBB0_5:
	ldr	w10, [x20, #16]
	cmp	w10, #2
	b.lt	LBB0_13
; %bb.6:
	orr	w23, w8, w9
	mov	w9, #8
	mov	w10, #128
	cmp	w8, #0
	csel	w24, w10, w9, ne
	mov	w8, #7
	mov	w9, #3
	csel	x8, x9, x8, ne
	mov	w25, #1
	lsl	x26, x8, #2
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_bdwrite
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w25, w25, #1
	ldr	w8, [x20, #16]
	cmp	w25, w8
	b.ge	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	add	x21, x8, x21
	ldr	w0, [x20, #32]
	ldr	w2, [x19, #8]
	mov	x1, x21
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_getblk
	mov	x22, x0
	ldr	x0, [x0]
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
	bl	_memcpy
	cbz	w23, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x22]
	ldr	w9, [x8, x26]
	orr	w9, w9, w24
	str	w9, [x8, x26]
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_SYNCHRONOUS_WRITES
	cbz	x0, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	_bwrite
	b	LBB0_8
LBB0_13:
	mov	x0, x20
	bl	_SYNCHRONOUS_WRITES
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bwrite
LBB0_15:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bdwrite
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSDOSFS_FATMIRROR,4,2          ; @MSDOSFS_FATMIRROR
	.no_dead_strip	_updatefats
.subsections_via_symbols
