	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_rebuild
_cmd_rebuild:                           ## @cmd_rebuild
	.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
	cmpl	$3, %edi
	jne	LBB0_10
## %bb.1:
	movq	8(%rbx), %rdi
	callq	_ctrlrunit
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.2:
	movl	%eax, %r15d
	movq	16(%rbx), %rdi
	leaq	-40(%rbp), %r14
	leaq	-44(%rbp), %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_sscanf
	cmpl	$2, %eax
	je	LBB0_4
## %bb.3:
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_13
LBB0_4:
	movl	%r15d, %edi
	callq	_ctrlrpath
	xorl	%r14d, %r14d
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	_MLX_REBUILDASYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_16
## %bb.6:
	movl	-48(%rbp), %eax
	cmpl	$260, %eax                      ## imm = 0x104
	jg	LBB0_17
## %bb.7:
	cmpl	$2, %eax
	je	LBB0_22
## %bb.8:
	cmpl	$4, %eax
	jne	LBB0_21
## %bb.9:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_20
LBB0_10:
	movq	%rbx, %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cmd_help                       ## TAILCALL
LBB0_11:
	movq	8(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_14
LBB0_12:
	movl	%r15d, %edi
	callq	_ctrlrpath
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_13:
	movq	16(%rbx), %rsi
	leaq	L_.str.3(%rip), %rdi
LBB0_14:
	xorl	%eax, %eax
	callq	_warnx
LBB0_15:
	movl	$1, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	cmpl	$261, %eax                      ## imm = 0x105
	je	LBB0_23
## %bb.18:
	cmpl	$262, %eax                      ## imm = 0x106
	jne	LBB0_21
## %bb.19:
	leaq	L_.str.8(%rip), %rdi
LBB0_20:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_16
LBB0_21:
	leaq	L_.str.9(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_16
LBB0_22:
	movl	-44(%rbp), %edx
	movl	-40(%rbp), %esi
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_24
LBB0_23:
	movl	-44(%rbp), %edx
	movl	-40(%rbp), %esi
	leaq	L_.str.7(%rip), %rdi
LBB0_24:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"'%s' is not a valid controller"

L_.str.1:                               ## @.str.1
	.asciz	"disk%2d%2d"

L_.str.2:                               ## @.str.2
	.asciz	"unknown%2d%2d"

L_.str.3:                               ## @.str.3
	.asciz	"'%s' is not a valid physical drive"

L_.str.4:                               ## @.str.4
	.asciz	"can't open %s"

	.comm	_MLX_REBUILDASYNC,4,2           ## @MLX_REBUILDASYNC
L_.str.5:                               ## @.str.5
	.asciz	"the drive at %d:%d is already ONLINE"

L_.str.6:                               ## @.str.6
	.asciz	"drive failed during rebuild"

L_.str.7:                               ## @.str.7
	.asciz	"there is no drive at channel %d, target %d"

L_.str.8:                               ## @.str.8
	.asciz	"drive rebuild or consistency check is already in progress on this controller"

L_.str.9:                               ## @.str.9
	.asciz	"ioctl MLXD_REBUILDASYNC"

	.no_dead_strip	_cmd_rebuild
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_rebuild
_cmd_rebuild:                           ; @cmd_rebuild
	.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
	mov	x20, x1
	cmp	w0, #3
	b.ne	LBB0_7
; %bb.1:
	ldr	x0, [x20, #8]
	bl	_ctrlrunit
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	x0, [x20, #16]
	add	x8, sp, #16
	add	x21, x8, #8
	orr	x22, x8, #0x4
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_sscanf
	cmp	w0, #2
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x20, #16]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_ctrlrpath
	mov	w1, #0
	bl	_open
	tbnz	w0, #31, LBB0_9
; %bb.5:
Lloh4:
	adrp	x8, _MLX_REBUILDASYNC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MLX_REBUILDASYNC@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	tbnz	x0, #63, LBB0_14
LBB0_6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
	mov	x1, 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
	b	_cmd_help
LBB0_8:
	ldr	x8, [x20, #8]
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_ctrlrpath
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
	b	LBB0_12
LBB0_10:
	ldr	x8, [x20, #16]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_11:
	bl	_warnx
LBB0_12:
	mov	w0, #1
LBB0_13:
	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_14:
	ldr	w8, [sp, #16]
	cmp	w8, #260
	b.gt	LBB0_18
; %bb.15:
	cmp	w8, #2
	b.eq	LBB0_22
; %bb.16:
	cmp	w8, #4
	b.ne	LBB0_21
; %bb.17:
Lloh13:
	adrp	x0, l_.str.6@PAGE
Lloh14:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_warnx
	b	LBB0_6
LBB0_18:
	cmp	w8, #261
	b.eq	LBB0_23
; %bb.19:
	cmp	w8, #262
	b.ne	LBB0_21
; %bb.20:
Lloh15:
	adrp	x0, l_.str.8@PAGE
Lloh16:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_warnx
	b	LBB0_6
LBB0_21:
Lloh17:
	adrp	x0, l_.str.9@PAGE
Lloh18:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_warn
	b	LBB0_6
LBB0_22:
	ldp	w9, w8, [sp, #20]
	stp	x8, x9, [sp]
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_warnx
	b	LBB0_6
LBB0_23:
	ldp	w9, w8, [sp, #20]
	stp	x8, x9, [sp]
Lloh21:
	adrp	x0, l_.str.7@PAGE
Lloh22:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_warnx
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"'%s' is not a valid controller"

l_.str.1:                               ; @.str.1
	.asciz	"disk%2d%2d"

l_.str.2:                               ; @.str.2
	.asciz	"unknown%2d%2d"

l_.str.3:                               ; @.str.3
	.asciz	"'%s' is not a valid physical drive"

l_.str.4:                               ; @.str.4
	.asciz	"can't open %s"

	.comm	_MLX_REBUILDASYNC,4,2           ; @MLX_REBUILDASYNC
l_.str.5:                               ; @.str.5
	.asciz	"the drive at %d:%d is already ONLINE"

l_.str.6:                               ; @.str.6
	.asciz	"drive failed during rebuild"

l_.str.7:                               ; @.str.7
	.asciz	"there is no drive at channel %d, target %d"

l_.str.8:                               ; @.str.8
	.asciz	"drive rebuild or consistency check is already in progress on this controller"

l_.str.9:                               ; @.str.9
	.asciz	"ioctl MLXD_REBUILDASYNC"

	.no_dead_strip	_cmd_rebuild
.subsections_via_symbols
