	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__FAT_unlink_r                  ## -- Begin function _FAT_unlink_r
	.p2align	4, 0x90
__FAT_unlink_r:                         ## @_FAT_unlink_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	__FAT_partition_getPartitionFromPath
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.2:
	movq	_EROFS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_strchr
	leaq	1(%rax), %r15
	testq	%rax, %rax
	cmoveq	%rbx, %r15
	movq	%r15, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	callq	__FAT_lock
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	__FAT_directory_entryFromPath
	testl	%eax, %eax
	je	LBB0_22
## %bb.10:
	movl	-40(%rbp), %esi
	movq	%r12, %rdi
	callq	__FAT_directory_entryGetCluster
	movl	%eax, %r15d
	leaq	-40(%rbp), %rdi
	callq	__FAT_directory_isDirectory
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	__FAT_directory_getFirstEntry
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	leaq	-48(%rbp), %rbx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	__FAT_directory_isDot
	testl	%eax, %eax
	je	LBB0_24
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	__FAT_directory_getNextEntry
	testl	%eax, %eax
	jne	LBB0_13
LBB0_15:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	__FAT_fat_isValidCluster
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	__FAT_fat_clearLinks
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	_EIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movl	$1, %ebx
LBB0_18:
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	__FAT_directory_removeEntry
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	_EIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movl	$1, %ebx
LBB0_20:
	movl	4(%r12), %edi
	callq	__FAT_cache_flush
	testl	%eax, %eax
	je	LBB0_23
## %bb.21:
	movq	%r12, %rdi
	callq	__FAT_unlock
	xorl	%eax, %eax
	negl	%ebx
	sbbl	%eax, %eax
	jmp	LBB0_8
LBB0_22:
	movq	%r12, %rdi
	callq	__FAT_unlock
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_23:
	movq	_EIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	%r12, %rdi
	callq	__FAT_unlock
	jmp	LBB0_7
LBB0_24:
	movq	%r12, %rdi
	callq	__FAT_unlock
	movq	_ENOTEMPTY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,8,3                     ## @ENODEV
	.comm	_EROFS,8,3                      ## @EROFS
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ENOTEMPTY,8,3                  ## @ENOTEMPTY
	.comm	_EIO,8,3                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__FAT_unlink_r                  ; -- Begin function _FAT_unlink_r
	.p2align	2
__FAT_unlink_r:                         ; @_FAT_unlink_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	__FAT_partition_getPartitionFromPath
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EROFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	mov	x0, x21
	mov	w1, #58
	bl	_strchr
	cmp	x0, #0
	csinc	x21, x21, x0, eq
	mov	x0, x21
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	x0, x20
	bl	__FAT_lock
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x21
	mov	x3, #0
	bl	__FAT_directory_entryFromPath
	cbz	w0, LBB0_17
; %bb.10:
	ldr	w1, [sp, #8]
	mov	x0, x20
	bl	__FAT_directory_entryGetCluster
	mov	x21, x0
	add	x0, sp, #8
	bl	__FAT_directory_isDirectory
	cbz	x0, LBB0_14
; %bb.11:
	mov	x1, sp
	mov	x0, x20
	mov	x2, x21
	bl	__FAT_directory_getFirstEntry
	cbz	w0, LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	bl	__FAT_directory_isDot
	cbz	w0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x1, sp
	mov	x0, x20
	bl	__FAT_directory_getNextEntry
	cbnz	w0, LBB0_12
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	bl	__FAT_fat_isValidCluster
	cbz	x0, LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x21
	bl	__FAT_fat_clearLinks
	cbz	w0, LBB0_19
LBB0_16:
	mov	w21, #0
	b	LBB0_20
LBB0_17:
	mov	x0, x20
	bl	__FAT_unlock
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_6
LBB0_18:
	mov	x0, x20
	bl	__FAT_unlock
Lloh8:
	adrp	x8, _ENOTEMPTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOTEMPTY@GOTPAGEOFF]
	b	LBB0_6
LBB0_19:
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w21, #1
LBB0_20:
	add	x1, sp, #8
	mov	x0, x20
	bl	__FAT_directory_removeEntry
	cbnz	w0, LBB0_22
; %bb.21:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w21, #1
LBB0_22:
	ldr	w0, [x20, #4]
	bl	__FAT_cache_flush
	cbz	w0, LBB0_24
; %bb.23:
	mov	x0, x20
	bl	__FAT_unlock
	cmp	w21, #0
	csetm	w0, ne
	b	LBB0_8
LBB0_24:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x20
	bl	__FAT_unlock
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,8,3                     ; @ENODEV
	.comm	_EROFS,8,3                      ; @EROFS
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ENOTEMPTY,8,3                  ; @ENOTEMPTY
	.comm	_EIO,8,3                        ; @EIO
.subsections_via_symbols
