	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatSeek                        ## -- Begin function FatSeek
	.p2align	4, 0x90
_FatSeek:                               ## @FatSeek
	.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	%edx, %r13d
	movq	%rsi, %rbx
	callq	_FsGetDeviceSpecific
	movq	%rax, %r12
	movl	%r13d, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.1:
	cmpq	$0, (%rbx)
	jne	LBB0_6
## %bb.2:
	movq	8(%rbx), %r14
	cmpq	8(%r12), %r14
	jge	LBB0_6
## %bb.3:
	movq	32(%r12), %r15
	movq	(%r12), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_TRACE
	movq	(%r12), %rax
	movq	8(%r15), %rcx
	imulq	(%r15), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_8
## %bb.4:
	cqto
	idivq	%rcx
	movq	%rax, %r13
	jmp	LBB0_9
LBB0_5:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ASSERT
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r13d
LBB0_9:
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.10:
	movq	%r14, %rax
	cqto
	idivq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_12
LBB0_11:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_TRACE
	cmpq	%r13, %rbx
	je	LBB0_18
## %bb.13:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpq	%r13, %rbx
	cmovgq	%r13, %rax
	setle	%cl
	movq	16(%r12,%rcx,8), %rsi
	movq	%rsi, -48(%rbp)
	cmpq	%rbx, %rax
	jge	LBB0_17
## %bb.14:
	subq	%rax, %rbx
	leaq	-48(%rbp), %r13
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_FatGetFatEntry
	testl	%eax, %eax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	-48(%rbp), %rsi
	decq	%rbx
	jne	LBB0_15
LBB0_17:
	movq	%rsi, 16(%r12)
LBB0_18:
	movq	%r14, (%r12)
	movq	_ESUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_19:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FatSeek() NewPosition = %u, OldPointer = %u, SeekMode = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"FatSeek() OldClusterIdx: %u, NewClusterIdx: %u\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ESUCCESS,4,2                   ## @ESUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FatSeek                        ; -- Begin function FatSeek
	.p2align	2
_FatSeek:                               ; @FatSeek
	.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
	mov	x22, x2
	mov	x20, x1
	bl	_FsGetDeviceSpecific
	and	w8, w22, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_10
; %bb.1:
	ldr	x8, [x20]
	cbnz	x8, LBB0_11
; %bb.2:
	mov	x19, x0
	ldr	x20, [x20, #8]
	ldr	x8, [x0, #8]
	cmp	x20, x8
	b.ge	LBB0_11
; %bb.3:
	ldr	x21, [x19, #32]
	ldr	x2, [x19]
	str	x22, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	x8, [x19]
	ldp	x9, x10, [x21]
	mul	x9, x10, x9
	sdiv	x23, x8, x9
	sdiv	x22, x20, x9
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	mov	x2, x22
	bl	_TRACE
	cmp	x22, x23
	b.eq	LBB0_9
; %bb.4:
	mov	w8, #24
	mov	w9, #16
	csel	x9, x9, x8, gt
	csel	x8, x23, xzr, gt
	ldr	x1, [x19, x9]
	str	x1, [sp, #8]
	cmp	x8, x22
	b.ge	LBB0_8
; %bb.5:
	sub	x22, x22, x8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x21
	bl	_FatGetFatEntry
	cbz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [sp, #8]
	subs	x22, x22, #1
	b.ne	LBB0_6
LBB0_8:
	str	x1, [x19, #16]
LBB0_9:
	str	x20, [x19]
Lloh4:
	adrp	x8, _ESUCCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ESUCCESS@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh6:
	adrp	x8, _FALSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_ASSERT
LBB0_11:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	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_13:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FatSeek() NewPosition = %u, OldPointer = %u, SeekMode = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"FatSeek() OldClusterIdx: %u, NewClusterIdx: %u\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ESUCCESS,4,2                   ; @ESUCCESS
.subsections_via_symbols
