	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetch_path_id
_fetch_path_id:                         ## @fetch_path_id
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_xpt_open
	testq	%rax, %rax
	js	LBB0_7
## %bb.1:
	leaq	-88(%rbp), %r12
	movq	%r12, %rdi
	movl	$56, %esi
	callq	_bzero
	movq	_XPT_DEV_MATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movl	$0, -88(%rbp)
	movq	$4, -80(%rbp)
	movl	$4, %esi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, -48(%rbp)
	movl	$1, -72(%rbp)
	movq	$4, -64(%rbp)
	movl	$4, %esi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, -40(%rbp)
	movq	_DEV_MATCH_BUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rcx, (%rax)
	movq	-40(%rbp), %rbx
	movl	36(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_mpt_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_BUS_MATCH_NAME@GOTPCREL(%rip), %rax
	movq	_BUS_MATCH_UNIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BUS_MATCH_BUS_ID@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movq	_xptfd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CAMIOCOMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_8
## %bb.2:
	movq	-40(%rbp), %rdi
	callq	_free
	movl	-88(%rbp), %esi
	movq	_CAM_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movq	_CAM_REQ_CMP@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.3:
	movq	_CAM_DEV_MATCH_LAST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_9
## %bb.4:
	movq	-48(%rbp), %rdi
	cmpl	$1, %esi
	jne	LBB0_10
## %bb.5:
	movq	(%rdi), %rax
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.6:
	movl	8(%rdi), %eax
	movl	%eax, (%r14)
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi
	callq	_free
	movq	-40(%rbp), %rdi
	callq	_free
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
	movq	-48(%rbp), %rdi
	callq	_free
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	callq	_free
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_XPT_DEV_MATCH,4,2              ## @XPT_DEV_MATCH
	.comm	_DEV_MATCH_BUS,8,3              ## @DEV_MATCH_BUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mpt"

	.comm	_mpt_unit,4,2                   ## @mpt_unit
	.comm	_BUS_MATCH_NAME,4,2             ## @BUS_MATCH_NAME
	.comm	_BUS_MATCH_UNIT,4,2             ## @BUS_MATCH_UNIT
	.comm	_BUS_MATCH_BUS_ID,4,2           ## @BUS_MATCH_BUS_ID
	.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	_CAM_DEV_MATCH_LAST,8,3         ## @CAM_DEV_MATCH_LAST
L_.str.1:                               ## @.str.1
	.asciz	"fetch_path_id got CAM error %#x, CDM error %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_fetch_path_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetch_path_id
_fetch_path_id:                         ; @fetch_path_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	bl	_xpt_open
	tbnz	x0, #63, LBB0_7
; %bb.1:
	add	x0, sp, #8
	mov	w1, #56
	bl	_bzero
Lloh0:
	adrp	x8, _XPT_DEV_MATCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XPT_DEV_MATCH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #8]
	mov	w20, #4
	str	x20, [sp, #16]
	mov	w21, #1
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	str	w21, [sp, #24]
	str	x0, [sp, #48]
	str	x20, [sp, #32]
	mov	w0, #1
	mov	w1, #4
	bl	_calloc
	str	x0, [sp, #56]
Lloh3:
	adrp	x20, _DEV_MATCH_BUS@GOTPAGE
Lloh4:
	ldr	x20, [x20, _DEV_MATCH_BUS@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [x0]
	ldr	x21, [sp, #56]
	ldr	w0, [x21, #36]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh7:
	adrp	x8, _mpt_unit@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mpt_unit@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x21, #32]
	str	xzr, [x21, #24]
Lloh10:
	adrp	x8, _BUS_MATCH_NAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BUS_MATCH_NAME@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _BUS_MATCH_UNIT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BUS_MATCH_UNIT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _BUS_MATCH_BUS_ID@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BUS_MATCH_BUS_ID@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x21, #16]
Lloh19:
	adrp	x8, _xptfd@GOTPAGE
Lloh20:
	ldr	x8, [x8, _xptfd@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _CAMIOCOMMAND@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAMIOCOMMAND@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	x0, [sp, #56]
	bl	_free
	ldr	w1, [sp, #8]
Lloh25:
	adrp	x8, _CAM_STATUS_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CAM_STATUS_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh28:
	adrp	x9, _CAM_REQ_CMP@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CAM_REQ_CMP@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	ldr	x2, [sp, #40]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.3:
Lloh31:
	adrp	x8, _CAM_DEV_MATCH_LAST@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CAM_DEV_MATCH_LAST@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_9
; %bb.4:
	ldr	x0, [sp, #48]
	cmp	w1, #1
	b.ne	LBB0_10
; %bb.5:
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	ldr	w8, [x0, #8]
	str	w8, [x19]
	bl	_free
	mov	w19, #0
	b	LBB0_12
LBB0_7:
Lloh34:
	adrp	x8, _ENXIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
Lloh36:
	adrp	x8, _errno@GOTPAGE
Lloh37:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh38:
	ldr	w19, [x8]
	ldr	x0, [sp, #48]
	bl	_free
	ldr	x0, [sp, #56]
	bl	_free
	b	LBB0_12
LBB0_9:
Lloh39:
	adrp	x0, l_.str.1@PAGE
Lloh40:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
	ldr	x0, [sp, #48]
	bl	_free
Lloh41:
	adrp	x8, _EIO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	bl	_free
Lloh43:
	adrp	x8, _ENOENT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_11:
	ldr	w19, [x8]
LBB0_12:
	mov	x0, x19
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_XPT_DEV_MATCH,4,2              ; @XPT_DEV_MATCH
	.comm	_DEV_MATCH_BUS,8,3              ; @DEV_MATCH_BUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mpt"

	.comm	_mpt_unit,4,2                   ; @mpt_unit
	.comm	_BUS_MATCH_NAME,4,2             ; @BUS_MATCH_NAME
	.comm	_BUS_MATCH_UNIT,4,2             ; @BUS_MATCH_UNIT
	.comm	_BUS_MATCH_BUS_ID,4,2           ; @BUS_MATCH_BUS_ID
	.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	_CAM_DEV_MATCH_LAST,8,3         ; @CAM_DEV_MATCH_LAST
l_.str.1:                               ; @.str.1
	.asciz	"fetch_path_id got CAM error %#x, CDM error %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_fetch_path_id
.subsections_via_symbols
