	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd_detach
_cmd_detach:                            ## @cmd_detach
	.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
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	_optreset@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_optind@GOTPCREL(%rip), %r13
	movl	$1, (%r13)
	movb	$1, %cl
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %r12d
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_getopt
	xorl	%ecx, %ecx
	cmpl	$97, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$-1, %eax
	jne	LBB0_17
## %bb.3:
	movslq	(%r13), %rax
	subl	%eax, %r14d
	leaq	(%rbx,%rax,8), %r13
	testb	$1, %r12b
	je	LBB0_8
## %bb.4:
	testl	%r14d, %r14d
	jle	LBB0_16
## %bb.5:
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	movq	_detach_drive@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_mlx_foreach
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_16
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_driveunit
	movl	%eax, -44(%rbp)
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13,%rbx,8), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
	jmp	LBB0_15
LBB0_17:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cmd_help                       ## TAILCALL
LBB0_8:
	movq	_detach_drive@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -64(%rbp)
	testl	%r14d, %r14d
	jle	LBB0_16
## %bb.9:
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %r14
	leaq	-64(%rbp), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_mlxd_foreach_ctrlr
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_ctrlrunit
	movl	%eax, -44(%rbp)
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r13,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_warnx
	jmp	LBB0_13
LBB0_16:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_optreset,4,2                   ## @optreset
	.comm	_optind,4,2                     ## @optind
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a"

	.comm	_detach_drive,4,2               ## @detach_drive
L_.str.1:                               ## @.str.1
	.asciz	"'%s' is not a valid controller"

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

	.no_dead_strip	_cmd_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmd_detach
_cmd_detach:                            ; @cmd_detach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _optreset@GOTPAGE
Lloh1:
	ldr	x9, [x9, _optreset@GOTPAGEOFF]
	mov	w8, #1
Lloh2:
	str	w8, [x9]
Lloh3:
	adrp	x22, _optind@GOTPAGE
Lloh4:
	ldr	x22, [x22, _optind@GOTPAGEOFF]
	str	w8, [x22]
Lloh5:
	adrp	x21, l_.str@PAGE
Lloh6:
	add	x21, x21, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_getopt
	mov	w8, #0
	cmp	w0, #97
	b.eq	LBB0_1
; %bb.2:
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.3:
	ldrsw	x8, [x22]
	sub	w20, w20, w8
	add	x21, x19, x8, lsl #3
	tbz	w23, #0, LBB0_11
; %bb.4:
	cmp	w20, #1
	b.lt	LBB0_17
; %bb.5:
Lloh7:
	adrp	x19, l_.str.2@PAGE
Lloh8:
	add	x19, x19, l_.str.2@PAGEOFF
Lloh9:
	adrp	x22, _detach_drive@GOTPAGE
Lloh10:
	ldr	x22, [x22, _detach_drive@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x22]
	add	x1, sp, #12
	bl	_mlx_foreach
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #8
	subs	x20, x20, #1
	b.eq	LBB0_17
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	bl	_driveunit
	str	w0, [sp, #12]
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x1, [x21]
	mov	x0, x19
	bl	_warnx
	b	LBB0_7
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_cmd_help
LBB0_11:
Lloh11:
	adrp	x8, _detach_drive@GOTPAGE
Lloh12:
	ldr	x8, [x8, _detach_drive@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	add	x8, sp, #12
	str	x8, [sp, #16]
	cmp	w20, #1
	b.lt	LBB0_17
; %bb.12:
Lloh14:
	adrp	x19, l_.str.1@PAGE
Lloh15:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x1, sp, #16
	bl	_mlxd_foreach_ctrlr
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x21, x21, #8
	subs	x20, x20, #1
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	bl	_ctrlrunit
	str	w0, [sp, #12]
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x1, [x21]
	mov	x0, x19
	bl	_warnx
	b	LBB0_14
LBB0_17:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_optreset,4,2                   ; @optreset
	.comm	_optind,4,2                     ; @optind
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a"

	.comm	_detach_drive,4,2               ; @detach_drive
l_.str.1:                               ; @.str.1
	.asciz	"'%s' is not a valid controller"

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

	.no_dead_strip	_cmd_detach
.subsections_via_symbols
