	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _FAT_check_position_for_next_cluster
__FAT_check_position_for_next_cluster:  ## @_FAT_check_position_for_next_cluster
	.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
	movl	$1, %r14d
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.1:
	movq	%r8, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	testq	%r8, %r8
	je	LBB0_4
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_3
LBB0_4:
	movq	(%r13), %rax
	cmpq	%rax, (%r12)
	jle	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r14d, %r14d
	movl	(%rax), %eax
	movl	%eax, (%r15)
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:
	movl	$0, (%rbx)
	jmp	LBB0_14
LBB0_6:
	jne	LBB0_14
## %bb.7:
	movq	8(%r12), %rsi
	movq	%r13, %rdi
	callq	__FAT_fat_nextCluster
	movq	_CLUSTER_EOF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movq	_CLUSTER_FREE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_9:
	movq	8(%r12), %rsi
	movq	%r13, %rdi
	callq	__FAT_fat_linkFreeCluster
LBB0_10:
	movq	%r13, %rdi
	movq	%rax, %r13
	movq	%rax, %rsi
	callq	__FAT_fat_isValidCluster
	testl	%eax, %eax
	je	LBB0_11
## %bb.15:
	movq	$0, (%r12)
	movq	%r13, 8(%r12)
	jmp	LBB0_14
LBB0_3:
	xorl	%r14d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CLUSTER_EOF,8,3                ## @CLUSTER_EOF
	.comm	_CLUSTER_FREE,8,3               ## @CLUSTER_FREE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	__FAT_check_position_for_next_cluster
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _FAT_check_position_for_next_cluster
__FAT_check_position_for_next_cluster:  ; @_FAT_check_position_for_next_cluster
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x3, LBB0_12
; %bb.1:
	mov	x19, x4
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	cbz	x4, LBB0_3
; %bb.2:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
LBB0_3:
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	w0, #0
	cbz	x19, LBB0_14
; %bb.6:
	str	wzr, [x19]
	b	LBB0_14
LBB0_7:
	b.ne	LBB0_12
; %bb.8:
	ldr	x1, [x21, #8]
	mov	x0, x22
	bl	__FAT_fat_nextCluster
	mov	x23, x0
Lloh2:
	adrp	x8, _CLUSTER_EOF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CLUSTER_EOF@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _CLUSTER_FREE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CLUSTER_FREE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_10
; %bb.9:
	ldr	x1, [x21, #8]
	mov	x0, x22
	bl	__FAT_fat_linkFreeCluster
	mov	x23, x0
LBB0_10:
	mov	x0, x22
	mov	x1, x23
	bl	__FAT_fat_isValidCluster
	cbz	w0, LBB0_15
; %bb.11:
	stp	xzr, x23, [x21]
LBB0_12:
	mov	w0, #1
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh8:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CLUSTER_EOF,8,3                ; @CLUSTER_EOF
	.comm	_CLUSTER_FREE,8,3               ; @CLUSTER_FREE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	__FAT_check_position_for_next_cluster
.subsections_via_symbols
