	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drive_progress
_drive_progress:                        ## @drive_progress
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$2, %edi
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	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_3
## %bb.4:
	movl	%eax, %r14d
	movq	8(%rbx), %rsi
	leaq	-28(%rbp), %rdx
	movl	%eax, %edi
	callq	_mfi_lookup_drive
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
LBB0_6:
	movl	%r14d, %edi
	callq	_close
	jmp	LBB0_17
LBB0_1:
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmovgq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_17
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_17
LBB0_7:
	movl	-28(%rbp), %esi
	leaq	-48(%rbp), %rdx
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	callq	_mfi_pd_get_info
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movl	%r14d, %edi
	callq	_close
	movl	-48(%rbp), %eax
	movq	_MFI_PD_PROGRESS_REBUILD@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.10:
	leaq	-36(%rbp), %rsi
	leaq	L_.str.5(%rip), %rdi
	callq	_mfi_display_progress
	movl	-48(%rbp), %eax
LBB0_11:
	movq	_MFI_PD_PROGRESS_PATROL@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsi
	leaq	L_.str.6(%rip), %rdi
	callq	_mfi_display_progress
	movl	-48(%rbp), %eax
LBB0_13:
	movq	_MFI_PD_PROGRESS_CLEAR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testl	%eax, %ecx
	je	LBB0_15
## %bb.14:
	leaq	-44(%rbp), %rsi
	leaq	L_.str.7(%rip), %rdi
	callq	_mfi_display_progress
	movl	-48(%rbp), %eax
	movl	(%rbx), %ecx
LBB0_15:
	movl	(%r15), %edx
	orl	(%r14), %edx
	orl	%ecx, %edx
	xorl	%ebx, %ebx
	testl	%eax, %edx
	jne	LBB0_17
## %bb.16:
	movl	-28(%rbp), %esi
	movq	_MFI_DNAME_DEVICE_ID@GOTPCREL(%rip), %rax
	movq	_MFI_DNAME_HONOR_OPTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_mfi_drive_name
	leaq	L_.str.8(%rip), %rdi
	movq	%rax, %rsi
	callq	_printf
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-28(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"drive progress: %s"

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

L_.str.2:                               ## @.str.2
	.asciz	"drive required"

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

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

	.comm	_MFI_PD_PROGRESS_REBUILD,4,2    ## @MFI_PD_PROGRESS_REBUILD
L_.str.5:                               ## @.str.5
	.asciz	"Rebuild"

	.comm	_MFI_PD_PROGRESS_PATROL,4,2     ## @MFI_PD_PROGRESS_PATROL
L_.str.6:                               ## @.str.6
	.asciz	"Patrol Read"

	.comm	_MFI_PD_PROGRESS_CLEAR,4,2      ## @MFI_PD_PROGRESS_CLEAR
L_.str.7:                               ## @.str.7
	.asciz	"Clear"

L_.str.8:                               ## @.str.8
	.asciz	"No activity in progress for drive %s.\n"

	.comm	_MFI_DNAME_DEVICE_ID,4,2        ## @MFI_DNAME_DEVICE_ID
	.comm	_MFI_DNAME_HONOR_OPTS,4,2       ## @MFI_DNAME_HONOR_OPTS
	.no_dead_strip	_drive_progress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drive_progress
_drive_progress:                        ; @drive_progress
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	cmp	w0, #2
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _mfi_unit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mfi_unit@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_mfi_open
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x19, x0
	ldr	x1, [x20, #8]
	add	x2, sp, #12
	bl	_mfi_lookup_drive
	cbz	w0, LBB0_7
; %bb.3:
	mov	x20, x0
LBB0_4:
	mov	x0, x19
	bl	_close
	b	LBB0_17
LBB0_5:
Lloh6:
	adrp	x8, l_.str.2@PAGE
Lloh7:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
	csel	x1, x9, x8, gt
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_17
LBB0_6:
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warn
	b	LBB0_17
LBB0_7:
	ldr	w1, [sp, #12]
	add	x2, sp, #16
	mov	x0, x19
	mov	x3, #0
	bl	_mfi_pd_get_info
	tbnz	x0, #63, LBB0_18
; %bb.8:
	mov	x0, x19
	bl	_close
	ldr	w8, [sp, #16]
Lloh20:
	adrp	x19, _MFI_PD_PROGRESS_REBUILD@GOTPAGE
Lloh21:
	ldr	x19, [x19, _MFI_PD_PROGRESS_REBUILD@GOTPAGEOFF]
	ldr	w9, [x19]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	add	x8, sp, #16
	add	x1, x8, #12
Lloh22:
	adrp	x0, l_.str.5@PAGE
Lloh23:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_mfi_display_progress
	ldr	w8, [sp, #16]
LBB0_10:
Lloh24:
	adrp	x20, _MFI_PD_PROGRESS_PATROL@GOTPAGE
Lloh25:
	ldr	x20, [x20, _MFI_PD_PROGRESS_PATROL@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	add	x8, sp, #16
	add	x1, x8, #8
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_mfi_display_progress
	ldr	w8, [sp, #16]
LBB0_12:
Lloh28:
	adrp	x21, _MFI_PD_PROGRESS_CLEAR@GOTPAGE
Lloh29:
	ldr	x21, [x21, _MFI_PD_PROGRESS_CLEAR@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	add	x8, sp, #16
	orr	x1, x8, #0x4
Lloh30:
	adrp	x0, l_.str.7@PAGE
Lloh31:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_mfi_display_progress
	ldr	w8, [sp, #16]
	ldr	w9, [x21]
LBB0_14:
	ldr	w10, [x19]
	ldr	w11, [x20]
	orr	w10, w11, w10
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_16
; %bb.15:
Lloh32:
	adrp	x8, _MFI_DNAME_DEVICE_ID@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MFI_DNAME_DEVICE_ID@GOTPAGEOFF]
	ldr	w1, [sp, #12]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _MFI_DNAME_HONOR_OPTS@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MFI_DNAME_HONOR_OPTS@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, #0
	bl	_mfi_drive_name
	mov	x1, x0
Lloh38:
	adrp	x0, l_.str.8@PAGE
Lloh39:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_printf
LBB0_16:
	mov	w20, #0
LBB0_17:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_18:
Lloh40:
	adrp	x8, _errno@GOTPAGE
Lloh41:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh42:
	ldr	w20, [x8]
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.4@PAGE
Lloh44:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"drive progress: %s"

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

l_.str.2:                               ; @.str.2
	.asciz	"drive required"

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

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

	.comm	_MFI_PD_PROGRESS_REBUILD,4,2    ; @MFI_PD_PROGRESS_REBUILD
l_.str.5:                               ; @.str.5
	.asciz	"Rebuild"

	.comm	_MFI_PD_PROGRESS_PATROL,4,2     ; @MFI_PD_PROGRESS_PATROL
l_.str.6:                               ; @.str.6
	.asciz	"Patrol Read"

	.comm	_MFI_PD_PROGRESS_CLEAR,4,2      ; @MFI_PD_PROGRESS_CLEAR
l_.str.7:                               ; @.str.7
	.asciz	"Clear"

l_.str.8:                               ; @.str.8
	.asciz	"No activity in progress for drive %s.\n"

	.comm	_MFI_DNAME_DEVICE_ID,4,2        ; @MFI_DNAME_DEVICE_ID
	.comm	_MFI_DNAME_HONOR_OPTS,4,2       ; @MFI_DNAME_HONOR_OPTS
	.no_dead_strip	_drive_progress
.subsections_via_symbols
