	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpt_fetch_disks                ## -- Begin function mpt_fetch_disks
	.p2align	4, 0x90
_mpt_fetch_disks:                       ## @mpt_fetch_disks
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_xpt_open
	testq	%rax, %rax
	js	LBB0_7
## %bb.1:
	leaq	-52(%rbp), %rdi
	callq	_fetch_path_id
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.2:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	movl	$404, %ebx                      ## imm = 0x194
	leaq	-112(%rbp), %r13
	movq	_xptfd@GOTPCREL(%rip), %r12
	movq	_CAMIOCOMMAND@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$56, %esi
	callq	_bzero
	movq	$0, -112(%rbp)
	movq	%rbx, -104(%rbp)
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_calloc
	movq	%rax, -72(%rbp)
	movl	$1, -96(%rbp)
	movq	$4, -88(%rbp)
	movl	$1, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, %r15
	movq	%rax, -64(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, 32(%r15)
	xorl	%edi, %edi
	movl	$4, %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_snprintf
	movq	_PERIPH_MATCH_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PERIPH_MATCH_PATH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 24(%r15)
	movl	(%r12), %edi
	movl	(%r14), %esi
	movq	%r13, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdi
	callq	_free
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-112(%rbp), %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax
	movq	_CAM_DEV_MATCH_MORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rdi
	callq	_free
	addq	$400, %rbx                      ## imm = 0x190
	jmp	LBB0_3
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-72(%rbp), %rdi
	callq	_free
	movq	-64(%rbp), %rdi
	callq	_free
	jmp	LBB0_26
LBB0_9:
	movq	_CAM_DEV_MATCH_LAST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.10:
	movq	-112(%rbp), %rax
	movq	-72(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_22
## %bb.11:
	movq	_DEV_MATCH_PERIPH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, (%rdi)
	jne	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	$40, %rdi
	decq	%rax
	jne	LBB0_12
## %bb.14:
	xorl	%r14d, %r14d
	movl	%edx, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_mpt_read_ioc_page
	testq	%rax, %rax
	je	LBB0_29
## %bb.15:
	movq	%rax, %r13
	movq	-112(%rbp), %rbx
	movl	%ebx, %edi
	movl	$16, %esi
	callq	_calloc
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_27
## %bb.16:
	movl	$8, %r12d
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_19
LBB0_17:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	incl	%r14d
	movq	-144(%rbp), %r13                ## 8-byte Reload
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r15
	addq	$40, %r12
	cmpq	-112(%rbp), %r15
	jae	LBB0_27
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rbx
	leaq	(%rbx,%r12), %rsi
	movq	%r13, %rdi
	callq	_periph_is_volume
	testq	%rax, %rax
	jne	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %r13
	shlq	$4, %r13
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movq	$0, 8(%rdx,%r13)
	movl	12(%rbx,%r12), %eax
	movl	%eax, 4(%rdx,%r13)
	movl	(%rdx,%r13), %edi
	movq	(%rbx,%r12), %rcx
	movl	8(%rbx,%r12), %r8d
	movq	%rdx, %rbx
	movl	$4, %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_snprintf
	movl	(%rbx,%r13), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cam_open_device
	testq	%rax, %rax
	je	LBB0_17
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rax, %r14
	addq	%rbx, %r13
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_fetch_scsi_capacity
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_fetch_scsi_inquiry
	movq	%r14, %rdi
	callq	_cam_close_device
	jmp	LBB0_17
LBB0_22:
	callq	_free
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	$0, (%rax)
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movq	$0, (%rax)
	jmp	LBB0_28
LBB0_23:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
LBB0_24:
	movq	-72(%rbp), %rdi
	callq	_free
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	-72(%rbp), %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_free
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	%r14d, (%rax)
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, (%rax)
LBB0_28:
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_29:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_XPT_DEV_MATCH,4,2              ## @XPT_DEV_MATCH
	.comm	_DEV_MATCH_PERIPH,8,3           ## @DEV_MATCH_PERIPH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"da"

	.comm	_PERIPH_MATCH_PATH,4,2          ## @PERIPH_MATCH_PATH
	.comm	_PERIPH_MATCH_NAME,4,2          ## @PERIPH_MATCH_NAME
	.comm	_xptfd,4,2                      ## @xptfd
	.comm	_CAMIOCOMMAND,4,2               ## @CAMIOCOMMAND
	.comm	_errno,4,2                      ## @errno
	.comm	_CAM_STATUS_MASK,4,2            ## @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ## @CAM_REQ_CMP
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CAM_DEV_MATCH_MORE,8,3         ## @CAM_DEV_MATCH_MORE
	.comm	_CAM_DEV_MATCH_LAST,8,3         ## @CAM_DEV_MATCH_LAST
L_.str.1:                               ## @.str.1
	.asciz	"mpt_fetch_disks got wrong CAM matches"

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

	.comm	_O_RDWR,4,2                     ## @O_RDWR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mpt_fetch_disks                ; -- Begin function mpt_fetch_disks
	.p2align	2
_mpt_fetch_disks:                       ; @mpt_fetch_disks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_xpt_open
	tbnz	x0, #63, LBB0_7
; %bb.1:
	add	x0, sp, #36
	bl	_fetch_path_id
	mov	x23, x0
	cbnz	w0, LBB0_26
; %bb.2:
	str	w21, [sp, #32]                  ; 4-byte Folded Spill
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	mov	w22, #404
Lloh0:
	adrp	x27, _PERIPH_MATCH_PATH@GOTPAGE
Lloh1:
	ldr	x27, [x27, _PERIPH_MATCH_PATH@GOTPAGEOFF]
Lloh2:
	adrp	x28, _PERIPH_MATCH_NAME@GOTPAGE
Lloh3:
	ldr	x28, [x28, _PERIPH_MATCH_NAME@GOTPAGEOFF]
Lloh4:
	adrp	x19, _xptfd@GOTPAGE
Lloh5:
	ldr	x19, [x19, _xptfd@GOTPAGEOFF]
Lloh6:
	adrp	x20, _CAMIOCOMMAND@GOTPAGE
Lloh7:
	ldr	x20, [x20, _CAMIOCOMMAND@GOTPAGEOFF]
Lloh8:
	adrp	x23, l_.str@PAGE
Lloh9:
	add	x23, x23, l_.str@PAGEOFF
Lloh10:
	adrp	x21, _CAM_STATUS_MASK@GOTPAGE
Lloh11:
	ldr	x21, [x21, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh12:
	adrp	x25, _CAM_REQ_CMP@GOTPAGE
Lloh13:
	ldr	x25, [x25, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh14:
	adrp	x26, _CAM_DEV_MATCH_MORE@GOTPAGE
Lloh15:
	ldr	x26, [x26, _CAM_DEV_MATCH_MORE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #40
	mov	w1, #56
	bl	_bzero
	stp	xzr, x22, [sp, #40]
	mov	w0, #1
	mov	x1, x22
	bl	_calloc
	mov	w8, #1
	str	w8, [sp, #56]
	str	x0, [sp, #80]
	mov	w8, #4
	str	x8, [sp, #64]
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	mov	x24, x0
	str	x0, [sp, #88]
	ldr	w8, [sp, #36]
	str	w8, [x0, #32]
	mov	w0, #0
	mov	w1, #4
	mov	x2, x23
	bl	_snprintf
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	str	w8, [x24, #24]
	ldr	w0, [x19]
	ldr	w1, [x20]
	add	x2, sp, #40
	bl	_ioctl
	tbnz	x0, #63, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #88]
	bl	_free
	ldr	w8, [sp, #40]
	ldr	w9, [x21]
	and	w8, w9, w8
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #72]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #80]
	bl	_free
	add	x22, x22, #400
	b	LBB0_3
LBB0_7:
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_25
LBB0_8:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
	ldr	x0, [sp, #80]
	bl	_free
	ldr	x0, [sp, #88]
	bl	_free
	b	LBB0_26
LBB0_9:
Lloh21:
	adrp	x9, _CAM_DEV_MATCH_LAST@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CAM_DEV_MATCH_LAST@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.10:
	ldr	x8, [sp, #40]
	ldr	x0, [sp, #80]
	cbz	x8, LBB0_22
; %bb.11:
Lloh24:
	adrp	x9, _DEV_MATCH_PERIPH@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DEV_MATCH_PERIPH@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	ldr	w11, [sp, #32]                  ; 4-byte Folded Reload
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x0]
	cmp	x10, x9
	b.ne	LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, x0, #40
	subs	x8, x8, #1
	b.ne	LBB0_12
; %bb.14:
	mov	x0, x11
	mov	w1, #2
	mov	x2, #0
	bl	_mpt_read_ioc_page
	cbz	x0, LBB0_27
; %bb.15:
	mov	x21, x0
	ldr	x23, [sp, #40]
	mov	x0, x23
	mov	w1, #16
	bl	_calloc
	mov	x22, x0
	cbz	x23, LBB0_28
; %bb.16:
	mov	x27, #0
	mov	x28, #0
	mov	w26, #0
Lloh27:
	adrp	x19, _O_RDWR@GOTPAGE
Lloh28:
	ldr	x19, [x19, _O_RDWR@GOTPAGEOFF]
Lloh29:
	adrp	x23, l_.str.2@PAGE
Lloh30:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	add	w26, w26, #1
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x28, x28, #1
	ldr	x8, [sp, #40]
	add	x27, x27, #40
	cmp	x28, x8
	b.hs	LBB0_29
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #80]
	add	x20, x8, x27
	add	x1, x20, #8
	mov	x0, x21
	bl	_periph_is_volume
	cbnz	x0, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x24, x22, w26, sxtw #4
	str	xzr, [x24, #8]
	ldr	w8, [x20, #20]
	str	w8, [x24, #4]
	ldr	w0, [x24]
	ldr	x8, [x20, #8]
	ldr	w9, [x20, #16]
	stp	x8, x9, [sp]
	mov	w1, #4
	mov	x2, x23
	bl	_snprintf
	ldr	w0, [x24]
	ldr	w1, [x19]
	bl	_cam_open_device
	cbz	x0, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x25, x0
	mov	x1, x24
	bl	_fetch_scsi_capacity
	mov	x0, x25
	mov	x1, x24
	bl	_fetch_scsi_inquiry
	mov	x0, x25
	bl	_cam_close_device
	b	LBB0_17
LBB0_22:
	bl	_free
	mov	w23, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	wzr, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	xzr, [x8]
	b	LBB0_26
LBB0_23:
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
LBB0_24:
	ldr	x0, [sp, #80]
	bl	_free
Lloh33:
	adrp	x8, _EIO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_25:
	ldr	w23, [x8]
LBB0_26:
	mov	x0, x23
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_27:
Lloh35:
	adrp	x8, _errno@GOTPAGE
Lloh36:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_25
LBB0_28:
	mov	w26, #0
LBB0_29:
	ldr	x0, [sp, #80]
	bl	_free
	mov	x0, x21
	bl	_free
	mov	w23, #0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w26, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x22, [x8]
	b	LBB0_26
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_XPT_DEV_MATCH,4,2              ; @XPT_DEV_MATCH
	.comm	_DEV_MATCH_PERIPH,8,3           ; @DEV_MATCH_PERIPH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"da"

	.comm	_PERIPH_MATCH_PATH,4,2          ; @PERIPH_MATCH_PATH
	.comm	_PERIPH_MATCH_NAME,4,2          ; @PERIPH_MATCH_NAME
	.comm	_xptfd,4,2                      ; @xptfd
	.comm	_CAMIOCOMMAND,4,2               ; @CAMIOCOMMAND
	.comm	_errno,4,2                      ; @errno
	.comm	_CAM_STATUS_MASK,4,2            ; @CAM_STATUS_MASK
	.comm	_CAM_REQ_CMP,4,2                ; @CAM_REQ_CMP
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CAM_DEV_MATCH_MORE,8,3         ; @CAM_DEV_MATCH_MORE
	.comm	_CAM_DEV_MATCH_LAST,8,3         ; @CAM_DEV_MATCH_LAST
l_.str.1:                               ; @.str.1
	.asciz	"mpt_fetch_disks got wrong CAM matches"

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

	.comm	_O_RDWR,4,2                     ; @O_RDWR
.subsections_via_symbols
