	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_fat_add_device
_sd_fat_add_device:                     ## @sd_fat_add_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	49(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %r14
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	addq	$48, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	49(%rax), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, %r13
	movq	%rax, %rbx
	addq	$48, %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_strcpy
	movq	%rbx, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r13)
	movl	$4, %edi
	callq	_malloc
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movq	%rax, %rdi
	callq	_OSInitMutex
	movq	_devops_sd_fat@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movl	$48, %edx
	callq	_memcpy
	movq	%r15, 8(%r14)
	movq	%r13, 16(%r14)
	movq	_STD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$4, %eax
	jl	LBB0_8
## %bb.5:
	movq	_devoptab_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rsi
	movl	$3, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rcx,%rdx,8)
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_6
LBB0_8:
	movq	%r13, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_11:
	movq	%r14, %rdi
	jmp	LBB0_13
LBB0_12:
	movq	%r14, %rdi
	callq	_free
	movq	%r13, %rdi
LBB0_13:
	callq	_free
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, (%rcx,%rdx,8)
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_devops_sd_fat,4,2              ## @devops_sd_fat
	.comm	_STD_MAX,4,2                    ## @STD_MAX
	.comm	_devoptab_list,8,3              ## @devoptab_list
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.no_dead_strip	_sd_fat_add_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_add_device
_sd_fat_add_device:                     ; @sd_fat_add_device
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x20, x0
	bl	_strlen
	add	w0, w0, #49
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.2:
	mov	x19, x0
	add	x21, x0, #48
	mov	x0, x21
	mov	x1, x20
	bl	_strcpy
	mov	x0, x24
	bl	_strlen
	add	w0, w0, #49
	bl	_malloc
	cbz	x0, LBB0_10
; %bb.3:
	mov	x20, x0
	add	x25, x0, #48
	mov	x0, x25
	mov	x1, x24
	bl	_strcpy
	str	x25, [x20]
	stp	x22, x23, [x20, #32]
	mov	w0, #4
	bl	_malloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_11
; %bb.4:
	bl	_OSInitMutex
Lloh0:
	adrp	x1, _devops_sd_fat@GOTPAGE
Lloh1:
	ldr	x1, [x1, _devops_sd_fat@GOTPAGEOFF]
	mov	x0, x19
	mov	w2, #48
	bl	_memcpy
	stp	x21, x20, [x19, #8]
Lloh2:
	adrp	x8, _STD_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STD_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x8]
	cmp	w10, #4
	b.lt	LBB0_8
; %bb.5:
Lloh5:
	adrp	x8, _devoptab_list@GOTPAGE
Lloh6:
	ldr	x8, [x8, _devoptab_list@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x8], #24
	sub	x10, x10, #3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8]
	cmp	x11, x9
	b.eq	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #8
	subs	x10, x10, #1
	b.ne	LBB0_6
LBB0_8:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_free
Lloh8:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_free
	mov	x0, x20
LBB0_12:
	bl	_free
LBB0_13:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _errno@GOTPAGE
Lloh15:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
	mov	w0, #-1
LBB0_15:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w0, #0
	str	x19, [x8]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_devops_sd_fat,4,2              ; @devops_sd_fat
	.comm	_STD_MAX,4,2                    ; @STD_MAX
	.comm	_devoptab_list,8,3              ; @devoptab_list
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.no_dead_strip	_sd_fat_add_device
.subsections_via_symbols
