	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_fat_seek_r
_sd_fat_seek_r:                         ## @sd_fat_seek_r
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movq	%rsi, %r12
	movl	(%rax), %edi
	callq	_OSLockMutex
	cmpl	$130, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$129, %ebx
	je	LBB0_10
## %bb.4:
	cmpl	$128, %ebx
	je	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_6:
	addl	(%r12), %r14d
	jmp	LBB0_7
LBB0_10:
	addl	4(%r12), %r14d
LBB0_7:
	movl	%r14d, (%r12)
	movq	8(%r12), %rax
	movl	4(%rax), %esi
	movl	8(%rax), %edi
	movl	16(%r12), %edx
	movl	%r14d, %ecx
	movl	$-1, %r8d
	callq	_FSSetPosFile
	movl	%eax, %ebx
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_OSUnlockMutex
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.8:
	movl	(%r12), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sd_fat_seek_r
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_fat_seek_r
_sd_fat_seek_r:                         ; @sd_fat_seek_r
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
	ldr	w0, [x8]
	bl	_OSLockMutex
	cmp	w22, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w22, #129
	b.eq	LBB0_7
; %bb.3:
	cmp	w22, #128
	b.eq	LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21]
	mov	w20, #-1
	b	LBB0_11
LBB0_5:
	mov	w20, #0
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x21]
	b	LBB0_11
LBB0_6:
	ldr	w8, [x19]
	b	LBB0_8
LBB0_7:
	ldr	w8, [x19, #4]
LBB0_8:
	add	w20, w8, w20
LBB0_9:
	str	w20, [x19]
	ldr	x8, [x19, #8]
	ldp	w1, w0, [x8, #4]
	ldr	w2, [x19, #16]
	mov	x3, x20
	mov	w4, #-1
	bl	_FSSetPosFile
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_OSUnlockMutex
	cbnz	w20, LBB0_11
; %bb.10:
	ldr	w20, [x19]
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sd_fat_seek_r
.subsections_via_symbols
