	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mfi_lookup_drive               ## -- Begin function mfi_lookup_drive
	.p2align	4, 0x90
_mfi_lookup_drive:                      ## @mfi_lookup_drive
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_strtol
	movq	-48(%rbp), %rcx
	cmpb	$0, (%rcx)
	je	LBB0_1
## %bb.3:
	movsbl	(%rbx), %edi
	callq	_toupper
	cmpb	$69, %al
	je	LBB0_5
## %bb.4:
	movsbl	(%rbx), %edi
	callq	_toupper
	cmpb	$83, %al
	jne	LBB0_25
LBB0_5:
	cmpb	$0, 1(%rbx)
	je	LBB0_25
## %bb.6:
	movsbl	(%rbx), %edi
	callq	_toupper
	movl	$255, %r12d
	movq	%rbx, %r13
	cmpb	$69, %al
	jne	LBB0_11
## %bb.7:
	leaq	1(%rbx), %rdi
	movq	%rdi, -48(%rbp)
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtol
	cmpq	$255, %rax
	ja	LBB0_25
## %bb.8:
	movq	-48(%rbp), %r13
	cmpb	$58, (%r13)
	jne	LBB0_25
## %bb.9:
	movq	%rax, %r12
	movsbl	1(%r13), %edi
	callq	_toupper
	cmpb	$83, %al
	jne	LBB0_25
## %bb.10:
	incq	%r13
LBB0_11:
	leaq	1(%r13), %rdi
	movq	%rdi, -48(%rbp)
	cmpb	$0, 1(%r13)
	je	LBB0_25
## %bb.12:
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtol
	cmpq	$255, %rax
	ja	LBB0_25
## %bb.13:
	movq	%rax, %r13
	movq	-48(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_25
## %bb.14:
	leaq	-56(%rbp), %rsi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_mfi_pd_get_list
	testq	%rax, %rax
	js	LBB0_28
## %bb.15:
	movq	-56(%rbp), %rdi
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_24
## %bb.16:
	movq	8(%rdi), %rcx
	addq	$24, %rcx
	jmp	LBB0_17
LBB0_1:
	cmpq	$65534, %rax                    ## imm = 0xFFFE
	jbe	LBB0_2
LBB0_25:
	leaq	L_.str.2(%rip), %rdi
LBB0_26:
	movq	%rbx, %rsi
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpl	%r13d, -8(%rcx)
	je	LBB0_22
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	addq	$32, %rcx
	decq	%rax
	je	LBB0_24
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -24(%rcx)
	jne	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$255, %r12d
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$65535, -16(%rcx)               ## imm = 0xFFFF
	je	LBB0_21
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	cmpl	%r12d, -12(%rcx)
	je	LBB0_21
	jmp	LBB0_23
LBB0_24:
	callq	_free
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_26
LBB0_28:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_warn
	jmp	LBB0_27
LBB0_22:
	movq	(%rcx), %rax
	movq	%rax, (%r14)
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to fetch drive list"

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

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Invalid drive number %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mfi_lookup_drive               ; -- Begin function mfi_lookup_drive
	.p2align	2
_mfi_lookup_drive:                      ; @mfi_lookup_drive
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x1, sp
	mov	x0, x19
	mov	w2, #0
	bl	_strtol
	ldr	x8, [sp]
	ldrb	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	ldrsb	w0, [x19]
	bl	_toupper
	cmp	w0, #69
	b.eq	LBB0_3
; %bb.2:
	ldrsb	w0, [x19]
	bl	_toupper
	cmp	w0, #83
	b.ne	LBB0_14
LBB0_3:
	mov	x22, x19
	ldrb	w8, [x22, #1]!
	cbz	w8, LBB0_14
; %bb.4:
	ldrsb	w0, [x19]
	bl	_toupper
	cmp	w0, #69
	b.ne	LBB0_10
; %bb.5:
	str	x22, [sp]
	mov	x1, sp
	mov	x0, x22
	mov	w2, #0
	bl	_strtol
	cmp	x0, #255
	b.hi	LBB0_14
; %bb.6:
	ldr	x23, [sp]
	ldrb	w8, [x23]
	cmp	w8, #58
	b.ne	LBB0_14
; %bb.7:
	mov	x22, x0
	ldrsb	w0, [x23, #1]!
	bl	_toupper
	cmp	w0, #83
	b.eq	LBB0_11
	b	LBB0_14
LBB0_8:
	mov	w8, #65534
	cmp	x0, x8
	b.hi	LBB0_14
; %bb.9:
	mov	w19, #0
	str	x0, [x20]
	b	LBB0_16
LBB0_10:
	mov	w22, #255
	mov	x23, x19
LBB0_11:
	ldrb	w8, [x23, #1]!
	str	x23, [sp]
	cbz	w8, LBB0_14
; %bb.12:
	mov	x1, sp
	mov	x0, x23
	mov	w2, #0
	bl	_strtol
	cmp	x0, #255
	b.hi	LBB0_14
; %bb.13:
	ldr	x8, [sp]
	ldrb	w8, [x8]
	cbz	w8, LBB0_17
LBB0_14:
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_15:
	mov	x1, x19
	bl	_warnx
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
LBB0_16:
	mov	x0, x19
	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
LBB0_17:
	mov	x23, x0
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, #0
	bl	_mfi_pd_get_list
	tbnz	x0, #63, LBB0_27
; %bb.18:
	ldr	x0, [sp, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_26
; %bb.19:
	ldr	x9, [x0, #8]
	add	x9, x9, #12
	mov	w10, #65535
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w11, [x9, #4]
	cmp	w11, w23
	b.eq	LBB0_28
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x9, x9, #32
	subs	x8, x8, #1
	b.eq	LBB0_26
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x9, #-12]
	cbnz	x11, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	w22, #255
	b.ne	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	ldur	w11, [x9, #-4]
	cmp	w11, w10
	b.eq	LBB0_20
LBB0_25:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	w11, [x9]
	cmp	w11, w22
	b.eq	LBB0_20
	b	LBB0_21
LBB0_26:
	bl	_free
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_27:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	w19, [x8]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_28:
	ldur	x8, [x9, #12]
	str	x8, [x20]
	bl	_free
	mov	w19, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to fetch drive list"

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

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Invalid drive number %s"

.subsections_via_symbols
