	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_fat_remove_device
_sd_fat_remove_device:                  ## @sd_fat_remove_device
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm0, -176(%rbp)
	leaq	-176(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$127, %edx
	callq	_strncpy
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strtok
	movq	_STD_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$-1, %eax
	cmpl	$4, %edx
	jl	LBB0_15
## %bb.1:
	movq	%r13, -184(%rbp)                ## 8-byte Spill
	movq	%r12, -192(%rbp)                ## 8-byte Spill
	movq	%r14, -200(%rbp)                ## 8-byte Spill
	movl	$3, %r12d
	movq	_devoptab_list@GOTPCREL(%rip), %r13
	leaq	-176(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movslq	%edx, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	movq	(%rcx,%r12,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edx
	jmp	LBB0_6
LBB0_7:
	movl	$-1, %eax
	jmp	LBB0_15
LBB0_8:
	movq	(%r13), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rax,%r12,8)
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_14
## %bb.9:
	movq	24(%r14), %rax
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	16(%r14), %rax
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	8(%r14), %edi
	callq	_strlen
	leaq	1(%rax), %rdi
	callq	_malloc
	movq	-200(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	8(%r14), %esi
	movq	%rax, %rdi
	callq	_strcpy
LBB0_11:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_free
LBB0_13:
	movq	(%rbx), %rdi
	callq	_free
LBB0_14:
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	":/"

	.comm	_STD_MAX,4,2                    ## @STD_MAX
	.comm	_devoptab_list,8,3              ## @devoptab_list
	.no_dead_strip	_sd_fat_remove_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_fat_remove_device
_sd_fat_remove_device:                  ; @sd_fat_remove_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x1, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	mov	x0, sp
	mov	w2, #127
	bl	_strncpy
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, sp
	bl	_strtok
Lloh5:
	adrp	x23, _STD_MAX@GOTPAGE
Lloh6:
	ldr	x23, [x23, _STD_MAX@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #4
	b.lt	LBB0_7
; %bb.1:
	mov	w24, #3
Lloh7:
	adrp	x25, _devoptab_list@GOTPAGE
Lloh8:
	ldr	x25, [x25, _devoptab_list@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	ldr	x22, [x9, x24, lsl #3]
	cbz	x22, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x22, #8]
	cbz	x1, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	b	LBB0_2
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.9:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_10:
	ldr	x8, [x25]
	ldr	x9, [x8]
	str	x9, [x8, x24, lsl #3]
	ldr	x23, [x22]
	cbz	x23, LBB0_16
; %bb.11:
	ldr	x8, [x23, #24]
	str	x8, [x21]
	ldr	x8, [x23, #16]
	str	x8, [x20]
	ldr	w0, [x23, #8]
	bl	_strlen
	add	x0, x0, #1
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w1, [x23, #8]
	bl	_strcpy
LBB0_13:
	ldr	x0, [x23]
	cbz	x0, LBB0_15
; %bb.14:
	bl	_free
LBB0_15:
	ldr	x0, [x22]
	bl	_free
LBB0_16:
	mov	x0, x22
	bl	_free
	mov	w0, #0
	b	LBB0_8
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	":/"

	.comm	_STD_MAX,4,2                    ; @STD_MAX
	.comm	_devoptab_list,8,3              ; @devoptab_list
	.no_dead_strip	_sd_fat_remove_device
.subsections_via_symbols
