	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rescan_or_reset_bus
_rescan_or_reset_bus:                   ## @rescan_or_reset_bus
	.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	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	_XPT_DEVICE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movl	$40, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	movl	$40, %esi
	callq	_bzero
	movq	_CAM_BUS_WILDCARD@GOTPCREL(%rip), %r14
	cmpq	%r12, (%r14)
	jne	LBB0_6
## %bb.13:
	movl	$40, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.14:
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	$40, %esi
	callq	_bzero
	movq	_XPT_DEV_MATCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r12)
	movq	(%r14), %rax
	movq	%rax, (%r12)
	movl	$2240, (%r12)                   ## imm = 0x8C0
	movl	$2240, %edi                     ## imm = 0x8C0
	callq	_malloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.17:
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, 4(%r12)
	movl	$112, 12(%r12)
	movl	$112, %edi
	callq	_malloc
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	_DEV_MATCH_BUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	_BUS_MATCH_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	32(%r12), %rcx
	movl	%eax, (%rcx)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_26 Depth 2
	movq	_CAMIOCOMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%r12, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_41
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	8(%r12), %esi
	movq	16(%r12), %rdx
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_46
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_CAM_DEV_MATCH_LAST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_CAM_DEV_MATCH_MORE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_46
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=1
	cmpl	$0, 4(%r12)
	je	LBB0_37
## %bb.25:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_26 Depth=2
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13,%r15), %rcx
	leaq	L_.str.7(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_35:                                ##   in Loop: Header=BB0_26 Depth=2
	incq	%r14
	movl	4(%r12), %eax
	addq	$40, %r15
	cmpq	%rax, %r14
	jae	LBB0_36
LBB0_26:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r12), %r13
	movq	(%r13,%r15), %rax
	movq	_DEV_MATCH_BUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_35
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_CAM_XPT_PATH_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_35
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_XPT_SCAN_BUS@GOTPCREL(%rip), %rax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_XPT_RESET_BUS@GOTPCREL(%rip), %rax
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=2
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	(%r13,%r15), %rax
	movq	%rax, (%rbx)
	movq	_CAM_TARGET_WILDCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_CAM_LUN_WILDCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	_CAM_FLAG_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$5, 12(%rbx)
	movq	_CAMIOCOMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	andl	8(%rbx), %r8d
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	jne	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13,%r15), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_35
LBB0_36:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	8(%r12), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_43
LBB0_37:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	16(%r12), %rax
	movq	_CAM_DEV_MATCH_MORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_20
	jmp	LBB0_43
LBB0_1:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	$1, %r14d
	jmp	LBB0_45
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	xorl	%eax, %eax
	callq	_warn
LBB0_39:
	movl	$1, %r14d
LBB0_40:
	movl	%r15d, %edi
	callq	_close
LBB0_44:
	movq	%rbx, %rdi
	callq	_free
LBB0_45:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.8:
	movq	_XPT_RESET_BUS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_XPT_SCAN_BUS@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	%r12, (%rbx)
	movq	_CAM_TARGET_WILDCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_CAM_LUN_WILDCARD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	_CAM_FLAG_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$5, 12(%rbx)
	movq	_CAMIOCOMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%rbx, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.11:
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	andl	8(%rbx), %r8d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rax
	leaq	L_.str.6(%rip), %rcx
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rcx, %rdx
	movq	_stdout@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpl	(%rax), %r8d
	jne	LBB0_38
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_40
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_38:
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_39
LBB0_15:
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_16
LBB0_18:
	leaq	L_.str.9(%rip), %rdi
LBB0_16:
	xorl	%eax, %eax
	callq	_warnx
LBB0_42:
	movl	$1, %r14d
	jmp	LBB0_43
LBB0_33:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	$1, %r14d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
LBB0_43:
	movl	%r15d, %edi
	callq	_close
	movq	32(%r12), %rdi
	callq	_free
	movq	24(%r12), %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_44
LBB0_46:
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_42
LBB0_41:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_42
	.cfi_endproc
                                        ## -- End function
	.comm	_XPT_DEVICE,4,2                 ## @XPT_DEVICE
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error opening transport layer device %s"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate CCB"

	.comm	_CAM_BUS_WILDCARD,8,3           ## @CAM_BUS_WILDCARD
	.comm	_XPT_SCAN_BUS,8,3               ## @XPT_SCAN_BUS
	.comm	_XPT_RESET_BUS,8,3              ## @XPT_RESET_BUS
	.comm	_CAM_TARGET_WILDCARD,8,3        ## @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,8,3           ## @CAM_LUN_WILDCARD
	.comm	_CAM_FLAG_NONE,8,3              ## @CAM_FLAG_NONE
	.comm	_CAMIOCOMMAND,4,2               ## @CAMIOCOMMAND
L_.str.3:                               ## @.str.3
	.asciz	"CAMIOCOMMAND ioctl failed"

	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_stdout,4,2                     ## @stdout
L_.str.4:                               ## @.str.4
	.asciz	"%s of bus %d was successful\n"

L_.str.5:                               ## @.str.5
	.asciz	"Re-scan"

L_.str.6:                               ## @.str.6
	.asciz	"Reset"

L_.str.7:                               ## @.str.7
	.asciz	"%s of bus %d returned error %#x\n"

	.comm	_XPT_DEV_MATCH,8,3              ## @XPT_DEV_MATCH
L_.str.8:                               ## @.str.8
	.asciz	"can't malloc memory for matches"

L_.str.9:                               ## @.str.9
	.asciz	"can't malloc memory for patterns"

	.comm	_DEV_MATCH_BUS,8,3              ## @DEV_MATCH_BUS
	.comm	_BUS_MATCH_ANY,4,2              ## @BUS_MATCH_ANY
	.comm	_CAM_DEV_MATCH_LAST,8,3         ## @CAM_DEV_MATCH_LAST
	.comm	_CAM_DEV_MATCH_MORE,8,3         ## @CAM_DEV_MATCH_MORE
L_.str.10:                              ## @.str.10
	.asciz	"got CAM error %#x, CDM error %d\n"

	.comm	_CAM_XPT_PATH_ID,8,3            ## @CAM_XPT_PATH_ID
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_rescan_or_reset_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rescan_or_reset_bus
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rescan_or_reset_bus:                   ; @rescan_or_reset_bus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x19, _XPT_DEVICE@GOTPAGE
Lloh1:
	ldr	x19, [x19, _XPT_DEVICE@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_20
; %bb.1:
	mov	x20, x0
	mov	w0, #40
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_21
; %bb.2:
	mov	x0, x19
	mov	w1, #40
	bl	_bzero
Lloh5:
	adrp	x23, _CAM_BUS_WILDCARD@GOTPAGE
Lloh6:
	ldr	x23, [x23, _CAM_BUS_WILDCARD@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x22
	b.ne	LBB0_27
; %bb.3:
	mov	w0, #40
	bl	_malloc
	cbz	x0, LBB0_21
; %bb.4:
	mov	x22, x0
	mov	w1, #40
	bl	_bzero
Lloh7:
	adrp	x8, _XPT_DEV_MATCH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _XPT_DEV_MATCH@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x22, #32]
	ldr	x8, [x23]
	str	x8, [x22]
	mov	w8, #2240
	str	w8, [x22]
	mov	w0, #2240
	bl	_malloc
	str	x0, [x22, #24]
	cbz	x0, LBB0_32
; %bb.5:
Lloh10:
	adrp	x8, lCPI0_0@PAGE
Lloh11:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x22, #4]
	mov	w8, #112
	str	w8, [x22, #12]
	mov	w0, #112
	bl	_malloc
	str	x0, [x22, #32]
	cbz	x0, LBB0_34
; %bb.6:
	mov	w23, #0
Lloh12:
	adrp	x8, _DEV_MATCH_BUS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DEV_MATCH_BUS@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x0]
Lloh15:
	adrp	x8, _BUS_MATCH_ANY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BUS_MATCH_ANY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [x22, #32]
Lloh18:
	adrp	x10, l_.str.5@PAGE
Lloh19:
	add	x10, x10, l_.str.5@PAGEOFF
	str	w8, [x9]
Lloh20:
	adrp	x8, l_.str.6@PAGE
Lloh21:
	add	x8, x8, l_.str.6@PAGEOFF
	cmp	w21, #0
Lloh22:
	adrp	x25, _CAM_DEV_MATCH_LAST@GOTPAGE
Lloh23:
	ldr	x25, [x25, _CAM_DEV_MATCH_LAST@GOTPAGEOFF]
Lloh24:
	adrp	x27, _CAM_DEV_MATCH_MORE@GOTPAGE
Lloh25:
	ldr	x27, [x27, _CAM_DEV_MATCH_MORE@GOTPAGEOFF]
Lloh26:
	adrp	x26, _CAM_XPT_PATH_ID@GOTPAGE
Lloh27:
	ldr	x26, [x26, _CAM_XPT_PATH_ID@GOTPAGEOFF]
	csel	x24, x8, x10, eq
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
Lloh28:
	adrp	x8, _CAMIOCOMMAND@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CAMIOCOMMAND@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_33
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22, #8]
Lloh31:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x9]
	ldr	x9, [x22, #16]
	cmp	w8, w10
	b.ne	LBB0_35
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x10, [x25]
	ldr	x11, [x27]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_35
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x28, #0
	mov	x25, #0
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=2
Lloh34:
	adrp	x9, _stderr@GOTPAGE
Lloh35:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x9]
	ldr	x3, [x27, x28]
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x2, x24
	bl	_fprintf
	mov	w23, #1
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x25, x25, #1
	ldr	w8, [x22, #4]
	add	x28, x28, #40
	cmp	x25, x8
	b.hs	LBB0_18
LBB0_14:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x27, [x22, #24]
	ldr	x8, [x27, x28]
Lloh39:
	adrp	x9, _DEV_MATCH_BUS@GOTPAGE
Lloh40:
	ldr	x9, [x9, _DEV_MATCH_BUS@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	ldr	x10, [x26]
	cmp	x8, x9
	ccmp	x8, x10, #4, eq
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	cmp	w21, #0
Lloh42:
	adrp	x8, _XPT_SCAN_BUS@GOTPAGE
Lloh43:
	ldr	x8, [x8, _XPT_SCAN_BUS@GOTPAGEOFF]
Lloh44:
	adrp	x9, _XPT_RESET_BUS@GOTPAGE
Lloh45:
	ldr	x9, [x9, _XPT_RESET_BUS@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x19, #32]
	ldr	x8, [x27, x28]
	str	x8, [x19]
Lloh46:
	adrp	x8, _CAM_TARGET_WILDCARD@GOTPAGE
Lloh47:
	ldr	x8, [x8, _CAM_TARGET_WILDCARD@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
Lloh49:
	adrp	x9, _CAM_LUN_WILDCARD@GOTPAGE
Lloh50:
	ldr	x9, [x9, _CAM_LUN_WILDCARD@GOTPAGEOFF]
Lloh51:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #16]
Lloh52:
	adrp	x8, _CAM_FLAG_NONE@GOTPAGE
Lloh53:
	ldr	x8, [x8, _CAM_FLAG_NONE@GOTPAGEOFF]
Lloh54:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w8, #5
	str	w8, [x19, #12]
Lloh55:
	adrp	x8, _CAMIOCOMMAND@GOTPAGE
Lloh56:
	ldr	x8, [x8, _CAMIOCOMMAND@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_33
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w8, [x19, #8]
Lloh58:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh59:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh61:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh62:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=2
Lloh64:
	adrp	x8, _stdout@GOTPAGE
Lloh65:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh66:
	ldr	w0, [x8]
	ldr	x3, [x27, x28]
Lloh67:
	adrp	x1, l_.str.4@PAGE
Lloh68:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x24
	bl	_fprintf
	b	LBB0_13
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x22, #8]
Lloh69:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh70:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh71:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh72:
	adrp	x25, _CAM_DEV_MATCH_LAST@GOTPAGE
Lloh73:
	ldr	x25, [x25, _CAM_DEV_MATCH_LAST@GOTPAGEOFF]
Lloh74:
	adrp	x27, _CAM_DEV_MATCH_MORE@GOTPAGE
Lloh75:
	ldr	x27, [x27, _CAM_DEV_MATCH_MORE@GOTPAGEOFF]
	b.ne	LBB0_38
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22, #16]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_7
	b	LBB0_38
LBB0_20:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh76:
	adrp	x0, l_.str@PAGE
Lloh77:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	ldr	w8, [x19]
	str	x8, [sp]
Lloh78:
	adrp	x0, l_.str.1@PAGE
Lloh79:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	w23, #1
	b	LBB0_26
LBB0_21:
Lloh80:
	adrp	x0, l_.str.2@PAGE
Lloh81:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_22:
	bl	_warn
LBB0_23:
	mov	w23, #1
LBB0_24:
	mov	x0, x20
	bl	_close
LBB0_25:
	mov	x0, x19
	bl	_free
LBB0_26:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_27:
Lloh82:
	adrp	x8, _XPT_SCAN_BUS@GOTPAGE
Lloh83:
	ldr	x8, [x8, _XPT_SCAN_BUS@GOTPAGEOFF]
Lloh84:
	adrp	x9, _XPT_RESET_BUS@GOTPAGE
Lloh85:
	ldr	x9, [x9, _XPT_RESET_BUS@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x19, #32]
	str	x22, [x19]
Lloh86:
	adrp	x8, _CAM_TARGET_WILDCARD@GOTPAGE
Lloh87:
	ldr	x8, [x8, _CAM_TARGET_WILDCARD@GOTPAGEOFF]
Lloh88:
	ldr	x8, [x8]
Lloh89:
	adrp	x9, _CAM_LUN_WILDCARD@GOTPAGE
Lloh90:
	ldr	x9, [x9, _CAM_LUN_WILDCARD@GOTPAGEOFF]
Lloh91:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #16]
Lloh92:
	adrp	x8, _CAM_FLAG_NONE@GOTPAGE
Lloh93:
	ldr	x8, [x8, _CAM_FLAG_NONE@GOTPAGEOFF]
Lloh94:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w8, #5
	str	w8, [x19, #12]
Lloh95:
	adrp	x8, _CAMIOCOMMAND@GOTPAGE
Lloh96:
	ldr	x8, [x8, _CAMIOCOMMAND@GOTPAGEOFF]
Lloh97:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x19
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_30
; %bb.28:
	ldr	w8, [x19, #8]
Lloh98:
	adrp	x9, _CAM_STATUS_MASK@GOTPAGE
Lloh99:
	ldr	x9, [x9, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh100:
	ldr	w9, [x9]
Lloh101:
	adrp	x10, _CAM_REQ_CMP@GOTPAGE
Lloh102:
	ldr	x10, [x10, _CAM_REQ_CMP@GOTPAGEOFF]
	and	w8, w9, w8
Lloh103:
	ldr	w9, [x10]
Lloh104:
	adrp	x10, _stdout@GOTPAGE
Lloh105:
	ldr	x10, [x10, _stdout@GOTPAGEOFF]
Lloh106:
	adrp	x11, l_.str.5@PAGE
Lloh107:
	add	x11, x11, l_.str.5@PAGEOFF
Lloh108:
	ldr	w0, [x10]
Lloh109:
	adrp	x10, l_.str.6@PAGE
Lloh110:
	add	x10, x10, l_.str.6@PAGEOFF
	cmp	w21, #0
	csel	x2, x10, x11, eq
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.29:
Lloh111:
	adrp	x1, l_.str.4@PAGE
Lloh112:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x22
	bl	_fprintf
	mov	w23, #0
	b	LBB0_24
LBB0_30:
Lloh113:
	adrp	x0, l_.str.3@PAGE
Lloh114:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_31:
	str	x8, [sp]
Lloh115:
	adrp	x1, l_.str.7@PAGE
Lloh116:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x3, x22
	bl	_fprintf
	b	LBB0_23
LBB0_32:
Lloh117:
	adrp	x0, l_.str.8@PAGE
Lloh118:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_36
LBB0_33:
Lloh119:
	adrp	x0, l_.str.3@PAGE
Lloh120:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warn
	b	LBB0_37
LBB0_34:
Lloh121:
	adrp	x0, l_.str.9@PAGE
Lloh122:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_36
LBB0_35:
	stp	x8, x9, [sp]
Lloh123:
	adrp	x0, l_.str.10@PAGE
Lloh124:
	add	x0, x0, l_.str.10@PAGEOFF
LBB0_36:
	bl	_warnx
LBB0_37:
	mov	w23, #1
LBB0_38:
	mov	x0, x20
	bl	_close
	ldr	x0, [x22, #32]
	bl	_free
	ldr	x0, [x22, #24]
	bl	_free
	mov	x0, x22
	bl	_free
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh95, Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpAdd	Lloh109, Lloh110
	.loh AdrpAdd	Lloh106, Lloh107
	.loh AdrpLdrGotLdr	Lloh104, Lloh105, Lloh108
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh98, Lloh99, Lloh100
	.loh AdrpAdd	Lloh111, Lloh112
	.loh AdrpAdd	Lloh113, Lloh114
	.loh AdrpAdd	Lloh115, Lloh116
	.loh AdrpAdd	Lloh117, Lloh118
	.loh AdrpAdd	Lloh119, Lloh120
	.loh AdrpAdd	Lloh121, Lloh122
	.loh AdrpAdd	Lloh123, Lloh124
	.cfi_endproc
                                        ; -- End function
	.comm	_XPT_DEVICE,4,2                 ; @XPT_DEVICE
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error opening transport layer device %s"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate CCB"

	.comm	_CAM_BUS_WILDCARD,8,3           ; @CAM_BUS_WILDCARD
	.comm	_XPT_SCAN_BUS,8,3               ; @XPT_SCAN_BUS
	.comm	_XPT_RESET_BUS,8,3              ; @XPT_RESET_BUS
	.comm	_CAM_TARGET_WILDCARD,8,3        ; @CAM_TARGET_WILDCARD
	.comm	_CAM_LUN_WILDCARD,8,3           ; @CAM_LUN_WILDCARD
	.comm	_CAM_FLAG_NONE,8,3              ; @CAM_FLAG_NONE
	.comm	_CAMIOCOMMAND,4,2               ; @CAMIOCOMMAND
l_.str.3:                               ; @.str.3
	.asciz	"CAMIOCOMMAND ioctl failed"

	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_stdout,4,2                     ; @stdout
l_.str.4:                               ; @.str.4
	.asciz	"%s of bus %d was successful\n"

l_.str.5:                               ; @.str.5
	.asciz	"Re-scan"

l_.str.6:                               ; @.str.6
	.asciz	"Reset"

l_.str.7:                               ; @.str.7
	.asciz	"%s of bus %d returned error %#x\n"

	.comm	_XPT_DEV_MATCH,8,3              ; @XPT_DEV_MATCH
l_.str.8:                               ; @.str.8
	.asciz	"can't malloc memory for matches"

l_.str.9:                               ; @.str.9
	.asciz	"can't malloc memory for patterns"

	.comm	_DEV_MATCH_BUS,8,3              ; @DEV_MATCH_BUS
	.comm	_BUS_MATCH_ANY,4,2              ; @BUS_MATCH_ANY
	.comm	_CAM_DEV_MATCH_LAST,8,3         ; @CAM_DEV_MATCH_LAST
	.comm	_CAM_DEV_MATCH_MORE,8,3         ; @CAM_DEV_MATCH_MORE
l_.str.10:                              ; @.str.10
	.asciz	"got CAM error %#x, CDM error %d\n"

	.comm	_CAM_XPT_PATH_ID,8,3            ; @CAM_XPT_PATH_ID
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_rescan_or_reset_bus
.subsections_via_symbols
