	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drive_clear
_drive_clear:                           ## @drive_clear
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$3, %edi
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %r13
	movq	16(%rsi), %rbx
	movb	(%rbx), %al
	testb	%al, %al
	je	LBB0_6
## %bb.3:
	incq	%rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_tolower
	movb	%al, -1(%rbx)
	movzbl	(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_4
## %bb.5:
	movq	16(%r13), %rbx
LBB0_6:
	leaq	L_.str.3(%rip), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	16(%r13), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	movq	_MFI_DCMD_PD_CLEAR_ABORT@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:
	movq	16(%r13), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.12:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmovgq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_21
LBB0_7:
	movq	_MFI_DCMD_PD_CLEAR_START@GOTPCREL(%rip), %rbx
LBB0_8:
	movq	(%rbx), %r12
	movq	_mfi_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mfi_open
	testl	%eax, %eax
	js	LBB0_9
## %bb.14:
	movl	%eax, %r15d
	movq	8(%r13), %rsi
	leaq	-68(%rbp), %rdx
	movl	%eax, %edi
	callq	_mfi_lookup_drive
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
LBB0_20:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_21
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	-68(%rbp), %esi
	leaq	-72(%rbp), %rdx
	movl	%r15d, %edi
	xorl	%ecx, %ecx
	callq	_mfi_pd_get_info
	testq	%rax, %rax
	js	LBB0_17
## %bb.18:
	leaq	-64(%rbp), %r13
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mbox_store_pdref
	movq	$0, (%rsp)
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	movl	$4, %r9d
	callq	_mfi_dcmd_command
	testq	%rax, %rax
	jns	LBB0_20
## %bb.19:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MFI_DCMD_PD_CLEAR_START@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%r14, %rsi
	movl	-68(%rbp), %edx
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_20
LBB0_17:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-68(%rbp), %esi
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_20
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"drive clear: %s"

L_.str.1:                               ## @.str.1
	.asciz	"extra arguments"

L_.str.2:                               ## @.str.2
	.asciz	"drive and action requires"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"start"

	.comm	_MFI_DCMD_PD_CLEAR_START,8,3    ## @MFI_DCMD_PD_CLEAR_START
L_.str.4:                               ## @.str.4
	.asciz	"stop"

L_.str.5:                               ## @.str.5
	.asciz	"abort"

	.comm	_MFI_DCMD_PD_CLEAR_ABORT,8,3    ## @MFI_DCMD_PD_CLEAR_ABORT
L_.str.6:                               ## @.str.6
	.asciz	"drive clear: invalid action, must be 'start' or 'stop'\n"

	.comm	_mfi_unit,4,2                   ## @mfi_unit
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_errno,4,2                      ## @errno
L_.str.7:                               ## @.str.7
	.asciz	"mfi_open"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to fetch info for drive %u"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to %s clear on drive %u"

	.no_dead_strip	_drive_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drive_clear
_drive_clear:                           ; @drive_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	cmp	w0, #3
	b.ne	LBB0_9
; %bb.1:
	mov	x20, x1
	ldr	x0, [x1, #16]
	ldrb	w8, [x0]
	cbz	w8, LBB0_5
; %bb.2:
	add	x19, x0, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_tolower
	sturb	w0, [x19, #-1]
	ldrb	w8, [x19], #1
	cbnz	w8, LBB0_3
; %bb.4:
	ldr	x0, [x20, #16]
LBB0_5:
Lloh3:
	adrp	x19, l_.str.3@PAGE
Lloh4:
	add	x19, x19, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_strcmp
Lloh5:
	adrp	x23, _MFI_DCMD_PD_CLEAR_START@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MFI_DCMD_PD_CLEAR_START@GOTPAGEOFF]
	cbz	x0, LBB0_12
; %bb.6:
	ldr	x0, [x20, #16]
Lloh7:
	adrp	x1, l_.str.4@PAGE
Lloh8:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.7:
	ldr	x0, [x20, #16]
Lloh9:
	adrp	x1, l_.str.5@PAGE
Lloh10:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.8:
Lloh11:
	adrp	x0, l_.str.6@PAGE
Lloh12:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, l_.str.2@PAGE
Lloh14:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh15:
	adrp	x9, l_.str.1@PAGE
Lloh16:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x8, x9, x8, gt
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_warnx
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	b	LBB0_18
LBB0_11:
Lloh22:
	adrp	x8, _MFI_DCMD_PD_CLEAR_ABORT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MFI_DCMD_PD_CLEAR_ABORT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	mov	x8, x23
LBB0_13:
	ldr	x22, [x8]
Lloh24:
	adrp	x8, _mfi_unit@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mfi_unit@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_mfi_open
	tbnz	w0, #31, LBB0_17
; %bb.14:
	mov	x21, x0
	ldr	x1, [x20, #8]
	add	x2, sp, #28
	bl	_mfi_lookup_drive
	cbz	w0, LBB0_20
; %bb.15:
	mov	x20, x0
LBB0_16:
	mov	x0, x21
	bl	_close
	b	LBB0_18
LBB0_17:
Lloh30:
	adrp	x8, _errno@GOTPAGE
Lloh31:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh32:
	ldr	w20, [x8]
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warn
LBB0_18:
	ldr	x8, [sp, #56]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.19:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	ldr	w1, [sp, #28]
	add	x2, sp, #32
	mov	x0, x21
	mov	x3, #0
	bl	_mfi_pd_get_info
	tbnz	x0, #63, LBB0_23
; %bb.21:
	add	x0, sp, #40
	add	x1, sp, #32
	bl	_mbox_store_pdref
	add	x4, sp, #40
	mov	x0, x21
	mov	x1, x22
	mov	x2, #0
	mov	w3, #0
	mov	w5, #4
	mov	x6, #0
	bl	_mfi_dcmd_command
	tbnz	x0, #63, LBB0_24
; %bb.22:
	mov	x0, x21
	bl	_close
	mov	w20, #0
	b	LBB0_18
LBB0_23:
Lloh38:
	adrp	x8, _errno@GOTPAGE
Lloh39:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh40:
	ldr	w20, [x8]
	ldr	w8, [sp, #28]
	str	x8, [sp]
Lloh41:
	adrp	x0, l_.str.8@PAGE
Lloh42:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_24:
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w20, [x8]
	ldr	x8, [x23]
Lloh46:
	adrp	x9, l_.str.4@PAGE
Lloh47:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	x22, x8
	csel	x8, x19, x9, eq
	ldr	w9, [sp, #28]
	stp	x8, x9, [sp]
Lloh48:
	adrp	x0, l_.str.9@PAGE
Lloh49:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"drive clear: %s"

l_.str.1:                               ; @.str.1
	.asciz	"extra arguments"

l_.str.2:                               ; @.str.2
	.asciz	"drive and action requires"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"start"

	.comm	_MFI_DCMD_PD_CLEAR_START,8,3    ; @MFI_DCMD_PD_CLEAR_START
l_.str.4:                               ; @.str.4
	.asciz	"stop"

l_.str.5:                               ; @.str.5
	.asciz	"abort"

	.comm	_MFI_DCMD_PD_CLEAR_ABORT,8,3    ; @MFI_DCMD_PD_CLEAR_ABORT
l_.str.6:                               ; @.str.6
	.asciz	"drive clear: invalid action, must be 'start' or 'stop'\n"

	.comm	_mfi_unit,4,2                   ; @mfi_unit
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_errno,4,2                      ; @errno
l_.str.7:                               ; @.str.7
	.asciz	"mfi_open"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to fetch info for drive %u"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to %s clear on drive %u"

	.no_dead_strip	_drive_clear
.subsections_via_symbols
