	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_detect
_pd_detect:                             ## @pd_detect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PD_UNITS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	movl	$56, %r15d
	movq	_pd@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_drives@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movq	(%rax), %r13
	movq	(%rcx), %r12
	leaq	(%r12,%r15), %rax
	movq	%rax, -24(%r12,%r15)
	movq	$0, -8(%r12,%r15)
	movl	$1, -56(%r12,%r15)
	movq	$0, -32(%r12,%r15)
	movq	_D_SLV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %eax
	movl	%eax, -52(%r12,%r15)
	movl	-16(%r12,%r15), %edi
	movq	_PD_NAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leal	97(%r14), %eax
	movsbl	%al, %r8d
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	_pd@GOTPCREL(%rip), %rcx
	movq	_D_GEO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %eax
	movl	%eax, -48(%r12,%r15)
	movq	_D_SBY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r13,%rax,4), %eax
	movl	%eax, -44(%r12,%r15)
	movq	_PD_UNITS@GOTPCREL(%rip), %r12
	movq	_D_PRT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1, (%r13,%rax,4)
	sbbl	$-1, %ebx
	incq	%r14
	movslq	(%r12), %rax
	addq	$64, %r15
	cmpq	%rax, %r14
	jl	LBB0_2
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.8:
	testl	%eax, %eax
	jle	LBB0_7
## %bb.9:
	movq	(%rcx), %rbx
	xorl	%r13d, %r13d
	movq	_drives@GOTPCREL(%rip), %r14
	movq	_D_PRT@GOTPCREL(%rip), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r13
	addq	$64, %rbx
	movslq	(%r12), %rcx
	cmpq	%rcx, %r13
	jge	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r13,8), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edx
	testl	%edx, %edx
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	32(%rbx), %rdi
	movq	_D_MOD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	_D_UNI@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r8d
	movq	_D_PRO@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r9d
	movq	_D_DLY@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %r10d
	movq	_pd_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	movq	_PI_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_verbose@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	40(%rbx), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	pushq	%rax
	pushq	%r15
	movq	_D_PRT@GOTPCREL(%rip), %r15
	pushq	%r14
	movq	_drives@GOTPCREL(%rip), %r14
	pushq	%r11
	pushq	%r10
	callq	_pi_init
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	callq	_pd_probe_drive
	cmpq	$0, 16(%rbx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	32(%rbx), %rdi
	callq	_pi_release
	jmp	LBB0_14
LBB0_4:
	movq	_pd@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	32(%rbx), %rdi
	movq	_pd_scratch@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_PI_PD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	movq	_verbose@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	40(%rbx), %eax
	subq	$8, %rsp
	movl	$1, %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	movl	$-1, %r8d
	movl	$-1, %r9d
	pushq	%rax
	pushq	%r14
	pushq	%r11
	pushq	%r10
	pushq	$-1
	callq	_pi_init
	addq	$48, %rsp
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_pd_probe_drive
	cmpq	$0, 16(%rbx)
	jne	LBB0_7
## %bb.6:
	movq	32(%rbx), %rdi
	callq	_pi_release
LBB0_7:
	movl	(%r12), %ecx
LBB0_15:
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.16:
	movq	_pd@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	$16, %rbx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%r14d
	addq	$64, %rbx
	cmpl	%ecx, %r14d
	jge	LBB0_20
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%rbx), %rsi
	callq	_set_capacity
	movq	(%rbx), %rdi
	callq	_add_disk
	movl	(%r12), %ecx
	movl	$1, %eax
	jmp	LBB0_19
LBB0_20:
	testl	%eax, %eax
	jne	LBB0_22
LBB0_21:
	movq	_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
	xorl	%eax, %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PD_UNITS,4,2                   ## @PD_UNITS
	.comm	_drives,8,3                     ## @drives
	.comm	_pd,8,3                         ## @pd
	.comm	_D_SLV,8,3                      ## @D_SLV
	.comm	_PD_NAMELEN,4,2                 ## @PD_NAMELEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%c"

	.comm	_name,8,3                       ## @name
	.comm	_D_GEO,8,3                      ## @D_GEO
	.comm	_D_SBY,8,3                      ## @D_SBY
	.comm	_D_PRT,8,3                      ## @D_PRT
	.comm	_pd_scratch,4,2                 ## @pd_scratch
	.comm	_PI_PD,4,2                      ## @PI_PD
	.comm	_verbose,4,2                    ## @verbose
	.comm	_D_MOD,8,3                      ## @D_MOD
	.comm	_D_UNI,8,3                      ## @D_UNI
	.comm	_D_PRO,8,3                      ## @D_PRO
	.comm	_D_DLY,8,3                      ## @D_DLY
L_.str.1:                               ## @.str.1
	.asciz	"%s: no valid drive found\n"

	.no_dead_strip	_pd_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_detect
_pd_detect:                             ; @pd_detect
	.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
Lloh0:
	adrp	x24, _PD_UNITS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PD_UNITS@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x28, _pd@GOTPAGE
Lloh3:
	ldr	x28, [x28, _pd@GOTPAGEOFF]
Lloh4:
	adrp	x21, _name@GOTPAGE
Lloh5:
	ldr	x21, [x21, _name@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x26, #0
	mov	w25, #0
	mov	w27, #56
Lloh6:
	adrp	x22, _drives@GOTPAGE
Lloh7:
	ldr	x22, [x22, _drives@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
Lloh10:
	adrp	x19, _D_PRT@GOTPAGE
Lloh11:
	ldr	x19, [x19, _D_PRT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, x26, lsl #3]
	mov	x23, x22
	mov	x22, x24
	ldr	x24, [x8]
	ldr	x8, [x28]
	mov	x20, x28
	add	x28, x8, x27
	stur	xzr, [x28, #-8]
	mov	w8, #1
	stur	w8, [x28, #-56]
	stur	xzr, [x28, #-32]
Lloh12:
	adrp	x8, _D_SLV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _D_SLV@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	stur	x28, [x28, #-24]
	stur	w8, [x28, #-52]
	ldur	w0, [x28, #-16]
Lloh15:
	adrp	x8, _PD_NAMELEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PD_NAMELEN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _name@GOTPAGE
Lloh19:
	ldr	x8, [x8, _name@GOTPAGEOFF]
Lloh20:
	ldr	x3, [x8]
	add	w8, w26, #97
	sxtb	w4, w8
	mov	x2, x21
	bl	_snprintf
Lloh21:
	adrp	x8, _D_GEO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _D_GEO@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	stur	w8, [x28, #-48]
Lloh24:
	adrp	x8, _D_SBY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _D_SBY@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	stur	w8, [x28, #-44]
	mov	x28, x20
	ldr	x8, [x19]
	ldr	w8, [x24, x8, lsl #2]
	mov	x24, x22
	mov	x22, x23
	cmp	w8, #0
	cinc	w25, w25, ne
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x27, x27, #64
	cmp	x26, x8
	b.lt	LBB0_2
; %bb.3:
Lloh27:
	adrp	x21, _name@GOTPAGE
Lloh28:
	ldr	x21, [x21, _name@GOTPAGEOFF]
	cbz	w25, LBB0_11
; %bb.4:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.5:
	mov	x23, x19
	mov	x25, #0
	ldr	x19, [x28]
Lloh29:
	adrp	x27, _pd_scratch@GOTPAGE
Lloh30:
	ldr	x27, [x27, _pd_scratch@GOTPAGEOFF]
Lloh31:
	adrp	x28, _PI_PD@GOTPAGE
Lloh32:
	ldr	x28, [x28, _PI_PD@GOTPAGEOFF]
Lloh33:
	adrp	x26, _verbose@GOTPAGE
Lloh34:
	ldr	x26, [x26, _verbose@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x25, x25, #1
	add	x19, x19, #64
	ldrsw	x9, [x24]
	cmp	x25, x9
	b.ge	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x8, [x8]
	ldr	x9, [x23]
	ldr	w2, [x8, x9, lsl #2]
	cbz	w2, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19, #32]
Lloh35:
	adrp	x9, _D_MOD@GOTPAGE
Lloh36:
	ldr	x9, [x9, _D_MOD@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
Lloh38:
	adrp	x9, _D_UNI@GOTPAGE
Lloh39:
	ldr	x9, [x9, _D_UNI@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	ldr	w4, [x8, x9, lsl #2]
Lloh41:
	adrp	x9, _D_PRO@GOTPAGE
Lloh42:
	ldr	x9, [x9, _D_PRO@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	ldr	w5, [x8, x9, lsl #2]
Lloh44:
	adrp	x9, _D_DLY@GOTPAGE
Lloh45:
	ldr	x9, [x9, _D_DLY@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	ldr	w6, [x8, x9, lsl #2]
	ldr	w7, [x27]
	ldr	w8, [x28]
	ldr	w9, [x26]
	ldr	w10, [x19, #40]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	mov	w1, #0
	bl	_pi_init
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_pd_probe_drive
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19, #32]
	bl	_pi_release
	b	LBB0_6
LBB0_11:
	ldr	x19, [x28]
	ldr	x0, [x19, #32]
Lloh47:
	adrp	x8, _pd_scratch@GOTPAGE
Lloh48:
	ldr	x8, [x8, _pd_scratch@GOTPAGEOFF]
Lloh49:
	adrp	x9, _PI_PD@GOTPAGE
Lloh50:
	ldr	x9, [x9, _PI_PD@GOTPAGEOFF]
Lloh51:
	ldr	w7, [x8]
Lloh52:
	ldr	w8, [x9]
Lloh53:
	adrp	x9, _verbose@GOTPAGE
Lloh54:
	ldr	x9, [x9, _verbose@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	ldr	w10, [x19, #40]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	mov	w1, #1
	mov	w2, #-1
	mov	w3, #-1
	mov	w4, #-1
	mov	w5, #-1
	mov	w6, #-1
	bl	_pi_init
	cbz	x0, LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_pd_probe_drive
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_14
; %bb.13:
	ldr	x0, [x19, #32]
	bl	_pi_release
LBB0_14:
	ldr	w9, [x24]
	cmp	w9, #1
	b.ge	LBB0_16
	b	LBB0_21
LBB0_15:
	mov	x28, x20
	cmp	w9, #1
	b.lt	LBB0_21
LBB0_16:
	mov	w0, #0
	mov	w19, #0
	ldr	x8, [x28]
	add	x20, x8, #16
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	w19, w19, #1
	add	x20, x20, #64
	cmp	w19, w9
	b.ge	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x1, [x20, #8]
	mov	x0, x8
	bl	_set_capacity
	ldr	x0, [x20]
	bl	_add_disk
	ldr	w9, [x24]
	mov	w0, #1
	b	LBB0_17
LBB0_20:
	cbnz	w0, LBB0_22
LBB0_21:
	ldr	x1, [x21]
Lloh56:
	adrp	x0, l_.str.1@PAGE
Lloh57:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	mov	w0, #0
LBB0_22:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh51
	.loh AdrpAdd	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_PD_UNITS,4,2                   ; @PD_UNITS
	.comm	_drives,8,3                     ; @drives
	.comm	_pd,8,3                         ; @pd
	.comm	_D_SLV,8,3                      ; @D_SLV
	.comm	_PD_NAMELEN,4,2                 ; @PD_NAMELEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%c"

	.comm	_name,8,3                       ; @name
	.comm	_D_GEO,8,3                      ; @D_GEO
	.comm	_D_SBY,8,3                      ; @D_SBY
	.comm	_D_PRT,8,3                      ; @D_PRT
	.comm	_pd_scratch,4,2                 ; @pd_scratch
	.comm	_PI_PD,4,2                      ; @PI_PD
	.comm	_verbose,4,2                    ; @verbose
	.comm	_D_MOD,8,3                      ; @D_MOD
	.comm	_D_UNI,8,3                      ; @D_UNI
	.comm	_D_PRO,8,3                      ; @D_PRO
	.comm	_D_DLY,8,3                      ; @D_DLY
l_.str.1:                               ; @.str.1
	.asciz	"%s: no valid drive found\n"

	.no_dead_strip	_pd_detect
.subsections_via_symbols
