	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dorescan_or_reset
_dorescan_or_reset:                     ## @dorescan_or_reset
	.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
	movl	%edx, %r14d
	movq	_CAM_BUS_WILDCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_CAM_TARGET_WILDCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_CAM_LUN_WILDCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	cmpl	$2, %edi
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	_optind@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rsi,%rax,8), %rbx
	movsbl	(%rbx), %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$0, (%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movsbl	1(%rbx), %edi
	incq	%rbx
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.2(%rip), %r12
	movq	%r12, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	(%r13), %rax
	movq	(%r15,%rax,8), %rdi
	movq	_arglist@GOTPCREL(%rip), %rbx
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %r8
	callq	_parse_btl
	andl	$-3, %eax
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.9:
	movl	(%rbx), %eax
	jmp	LBB0_10
LBB0_1:
	testl	%r14d, %r14d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	_dorescan_or_reset.must(%rip), %rdi
	callq	_warnx
	movl	$1, %eax
	jmp	LBB0_13
LBB0_7:
	movq	_CAM_ARG_BUS@GOTPCREL(%rip), %rcx
	movq	_arglist@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rdx)
LBB0_10:
	movq	_CAM_ARG_LUN@GOTPCREL(%rip), %rcx
	movl	-52(%rbp), %edi
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movl	%r14d, %ecx
	callq	_scanlun_or_reset_dev
	jmp	LBB0_13
LBB0_12:
	movl	%r14d, %esi
	callq	_rescan_or_reset_bus
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @dorescan_or_reset.must
_dorescan_or_reset.must:
	.asciz	"you must specify \"all\", a bus, a bus:target:lun or periph to %s"

	.comm	_CAM_BUS_WILDCARD,4,2           ## @CAM_BUS_WILDCARD
	.comm	_CAM_TARGET_WILDCARD,4,2        ## @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ## @CAM_LUN_WILDCARD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rescan"

L_.str.1:                               ## @.str.1
	.asciz	"reset"

	.comm	_optind,8,3                     ## @optind
L_.str.2:                               ## @.str.2
	.asciz	"all"

	.comm	_CAM_ARG_BUS,4,2                ## @CAM_ARG_BUS
	.comm	_arglist,4,2                    ## @arglist
	.comm	_CAM_ARG_LUN,4,2                ## @CAM_ARG_LUN
	.no_dead_strip	_dorescan_or_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dorescan_or_reset
_dorescan_or_reset:                     ; @dorescan_or_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
Lloh0:
	adrp	x8, _CAM_BUS_WILDCARD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAM_BUS_WILDCARD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _CAM_TARGET_WILDCARD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAM_TARGET_WILDCARD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh6:
	adrp	x8, _CAM_LUN_WILDCARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAM_LUN_WILDCARD@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	cmp	w0, #2
	b.le	LBB0_7
; %bb.1:
	mov	x20, x1
Lloh9:
	adrp	x23, _optind@GOTPAGE
Lloh10:
	ldr	x23, [x23, _optind@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x21, [x1, x8, lsl #3]
	ldrsb	w0, [x21]
	bl	_isspace
	cbz	x0, LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x21]
	cbz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrsb	w0, [x21, #1]!
	bl	_isspace
	cbnz	x0, LBB0_2
LBB0_4:
Lloh11:
	adrp	x22, l_.str.2@PAGE
Lloh12:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_strncasecmp
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x23]
	ldr	x0, [x20, x8, lsl #3]
Lloh13:
	adrp	x20, _arglist@GOTPAGE
Lloh14:
	ldr	x20, [x20, _arglist@GOTPAGEOFF]
	add	x1, sp, #12
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x4, x20
	bl	_parse_btl
	and	w8, w0, #0xfffffffd
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.6:
	ldr	w8, [x20]
	b	LBB0_9
LBB0_7:
Lloh15:
	adrp	x8, l_.str@PAGE
Lloh16:
	add	x8, x8, l_.str@PAGEOFF
Lloh17:
	adrp	x9, l_.str.1@PAGE
Lloh18:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh19:
	adrp	x0, _dorescan_or_reset.must@PAGE
Lloh20:
	add	x0, x0, _dorescan_or_reset.must@PAGEOFF
	bl	_warnx
	mov	w0, #1
	b	LBB0_12
LBB0_8:
Lloh21:
	adrp	x8, _CAM_ARG_BUS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CAM_ARG_BUS@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _arglist@GOTPAGE
Lloh25:
	ldr	x9, [x9, _arglist@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
LBB0_9:
Lloh26:
	adrp	x9, _CAM_ARG_LUN@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CAM_ARG_LUN@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	ldr	w0, [sp, #12]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	ldp	w2, w1, [sp, #4]
	mov	x3, x19
	bl	_scanlun_or_reset_dev
	b	LBB0_12
LBB0_11:
	mov	x1, x19
	bl	_rescan_or_reset_bus
LBB0_12:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_dorescan_or_reset.must:                ; @dorescan_or_reset.must
	.asciz	"you must specify \"all\", a bus, a bus:target:lun or periph to %s"

	.comm	_CAM_BUS_WILDCARD,4,2           ; @CAM_BUS_WILDCARD
	.comm	_CAM_TARGET_WILDCARD,4,2        ; @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,4,2           ; @CAM_LUN_WILDCARD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rescan"

l_.str.1:                               ; @.str.1
	.asciz	"reset"

	.comm	_optind,8,3                     ; @optind
l_.str.2:                               ; @.str.2
	.asciz	"all"

	.comm	_CAM_ARG_BUS,4,2                ; @CAM_ARG_BUS
	.comm	_arglist,4,2                    ; @arglist
	.comm	_CAM_ARG_LUN,4,2                ; @CAM_ARG_LUN
	.no_dead_strip	_dorescan_or_reset
.subsections_via_symbols
