	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_volume_spare_pool
_find_volume_spare_pool:                ## @find_volume_spare_pool
	.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	$152, %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, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-88(%rbp), %rdx
	leaq	-84(%rbp), %rcx
	callq	_mpt_lookup_volume
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_warnc
	jmp	LBB0_17
LBB0_2:
	movl	-88(%rbp), %esi
	movl	-84(%rbp), %edx
	movl	%r12d, %edi
	xorl	%ecx, %ecx
	callq	_mpt_vol_info
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_MPI_RAID_HOT_SPARE_POOL_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	4(%rax), %ecx
	je	LBB0_6
## %bb.5:
	bsfl	%ecx, %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movl	%edx, (%r14)
	movq	%rax, %rdi
	callq	_free
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_6:
	movq	%rax, %rdi
	callq	_free
	movl	%r12d, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_mpt_read_ioc_page
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	leaq	-80(%rbp), %rdi
	movl	$28, %esi
	callq	_bzero
	cmpl	$0, (%rbx)
	jle	LBB0_13
## %bb.9:
	movl	%r12d, -104(%rbp)               ## 4-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	-80(%rbp), %ebx
	movl	-76(%rbp), %r13d
	movl	-72(%rbp), %r12d
	movl	-68(%rbp), %r15d
	movl	-64(%rbp), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movl	-60(%rbp), %eax
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%r14,8), %edx
	movl	4(%rax,%r14,8), %esi
	movl	-104(%rbp), %edi                ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_mpt_vol_info
	testq	%rax, %rax
	je	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	4(%rax), %ecx
	btl	$1, %ecx
	adcl	$0, %ebx
	btl	$2, %ecx
	adcl	$0, %r13d
	btl	$3, %ecx
	adcl	$0, %r12d
	btl	$4, %ecx
	adcl	$0, %r15d
	btl	$5, %ecx
	adcl	$0, -92(%rbp)                   ## 4-byte Folded Spill
	btl	$6, %ecx
	adcl	$0, -96(%rbp)                   ## 4-byte Folded Spill
	btl	$7, %ecx
	adcl	$0, -100(%rbp)                  ## 4-byte Folded Spill
	movq	%rax, %rdi
	callq	_free
	incq	%r14
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpl	(%rax), %r14d
	jl	LBB0_10
## %bb.12:
	movl	%ebx, -80(%rbp)
	movl	%r13d, -76(%rbp)
	movl	%r12d, -72(%rbp)
	movl	%r15d, -68(%rbp)
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -64(%rbp)
	movl	-96(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -60(%rbp)
	movl	-100(%rbp), %eax                ## 4-byte Reload
	movl	%eax, -56(%rbp)
	movl	-104(%rbp), %r12d               ## 4-byte Reload
	movq	-112(%rbp), %rbx                ## 8-byte Reload
LBB0_13:
	movq	%rbx, %rdi
	callq	_free
	movl	-76(%rbp), %eax
	xorl	%ecx, %ecx
	cmpl	-80(%rbp), %eax
	movl	-72(%rbp), %eax
	setl	%cl
	cmpl	-80(%rbp,%rcx,4), %eax
	movl	$2, %eax
	cmovgel	%ecx, %eax
	movl	-68(%rbp), %ecx
	cmpl	-80(%rbp,%rax,4), %ecx
	movl	$3, %ecx
	cmovgel	%eax, %ecx
	movl	-64(%rbp), %eax
	cmpl	-80(%rbp,%rcx,4), %eax
	movl	$4, %eax
	cmovgel	%ecx, %eax
	movl	-60(%rbp), %ecx
	cmpl	-80(%rbp,%rax,4), %ecx
	movl	$5, %ecx
	cmovgel	%eax, %ecx
	movl	-56(%rbp), %eax
	movl	%ecx, %edx
	incl	%edx
	cmpl	-80(%rbp,%rcx,4), %eax
	movl	$7, %r15d
	cmovgel	%edx, %r15d
	movl	-88(%rbp), %esi
	movl	-84(%rbp), %edx
	xorl	%r13d, %r13d
	movl	%r12d, %edi
	xorl	%ecx, %ecx
	callq	_mpt_vol_info
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	%rax, %rbx
	movl	$1, %r14d
	movl	%r15d, %ecx
	shll	%cl, %r14d
	movl	4(%rax), %r9d
	btsl	%r15d, %r9d
	movl	%r9d, 4(%rax)
	movq	_MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-88(%rbp), %edx
	movl	-84(%rbp), %ecx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movups	%xmm0, 16(%rsp)
	movl	$0, 56(%rsp)
	movl	$0, 32(%rsp)
	movl	$0, 8(%rsp)
	movq	$0, (%rsp)
	xorl	%r13d, %r13d
	movl	%r12d, %edi
	xorl	%r8d, %r8d
	callq	_mpt_raid_action
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r12d
	movl	-88(%rbp), %edi
	movl	-84(%rbp), %esi
	callq	_mpt_volume_name
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_warnx
	movq	%rbx, %rdi
	callq	_free
	movl	%r12d, %r13d
	jmp	LBB0_17
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	jmp	LBB0_17
LBB0_19:
	movl	%ebx, -80(%rbp)
	movl	%r13d, -76(%rbp)
	movl	%r12d, -72(%rbp)
	movl	%r15d, -68(%rbp)
	movl	-92(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -64(%rbp)
	movl	-96(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -60(%rbp)
	movl	-100(%rbp), %eax                ## 4-byte Reload
	movl	%eax, -56(%rbp)
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.18:
	movl	%r13d, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%rbx, %rdi
	callq	_free
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	%r14d, (%rax)
	jmp	LBB0_17
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid volume %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_MPI_RAID_HOT_SPARE_POOL_0,4,2  ## @MPI_RAID_HOT_SPARE_POOL_0
L_.str.1:                               ## @.str.1
	.asciz	"Failed to fetch volume list"

	.comm	_MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS,4,2 ## @MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS
L_.str.2:                               ## @.str.2
	.asciz	"Failed to add spare pool %d to %s"

	.no_dead_strip	_find_volume_spare_pool
.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 find_volume_spare_pool
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	4294967294                      ; 0xfffffffe
lCPI0_1:
	.long	4294967293                      ; 0xfffffffd
	.long	4294967292                      ; 0xfffffffc
lCPI0_2:
	.long	4294967291                      ; 0xfffffffb
	.long	4294967290                      ; 0xfffffffa
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_find_volume_spare_pool:                ; @find_volume_spare_pool
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	d15, d14, [sp, #96]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #112]            ; 16-byte Folded Spill
	stp	d11, d10, [sp, #128]            ; 16-byte Folded Spill
	stp	d9, d8, [sp, #144]              ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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 b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	.cfi_offset b12, -120
	.cfi_offset b13, -128
	.cfi_offset b14, -136
	.cfi_offset b15, -144
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	add	x2, sp, #52
	add	x3, sp, #48
	bl	_mpt_lookup_volume
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_warnc
	b	LBB0_17
LBB0_2:
	ldp	w2, w1, [sp, #48]
	mov	x0, x20
	mov	x3, #0
	bl	_mpt_vol_info
	cbz	x0, LBB0_16
; %bb.3:
	ldr	w8, [x0, #4]
Lloh5:
	adrp	x9, _MPI_RAID_HOT_SPARE_POOL_0@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MPI_RAID_HOT_SPARE_POOL_0@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	bics	w8, w8, w9
	b.eq	LBB0_5
; %bb.4:
	rbit	w8, w8
	clz	w8, w8
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [x19]
	bl	_free
	mov	w21, #0
	b	LBB0_17
LBB0_5:
	bl	_free
	mov	x0, x20
	mov	w1, #2
	mov	x2, #0
	bl	_mpt_read_ioc_page
	cbz	x0, LBB0_14
; %bb.6:
	mov	x21, x0
	add	x22, sp, #56
	add	x0, sp, #56
	mov	w1, #28
	bl	_bzero
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	w24, #0
	ldr	x8, [x21, #8]
	ldp	d10, d9, [sp, #56]
	ldr	d8, [sp, #72]
	ldr	w23, [sp, #80]
	add	x25, x8, #4
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d11, [x8, lCPI0_0@PAGEOFF]
	movi.2s	v12, #1
Lloh10:
	adrp	x8, lCPI0_1@PAGE
Lloh11:
	ldr	d13, [x8, lCPI0_1@PAGEOFF]
Lloh12:
	adrp	x8, lCPI0_2@PAGE
Lloh13:
	ldr	d14, [x8, lCPI0_2@PAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [x25, #-4]
	mov	x0, x20
	mov	x3, #0
	bl	_mpt_vol_info
	cbz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x0, #4]
	dup.2s	v0, w8
	ushl.2s	v1, v0, v11
	and.8b	v1, v1, v12
	add.2s	v10, v10, v1
	ushl.2s	v1, v0, v13
	and.8b	v1, v1, v12
	add.2s	v9, v9, v1
	ushl.2s	v0, v0, v14
	and.8b	v0, v0, v12
	add.2s	v8, v8, v0
	ubfx	w8, w8, #7, #1
	add	w23, w23, w8
	bl	_free
	add	w24, w24, #1
	ldr	w8, [x21]
	add	x25, x25, #8
	cmp	w24, w8
	b.lt	LBB0_8
; %bb.10:
	stp	d10, d9, [sp, #56]
	str	d8, [sp, #72]
	str	w23, [sp, #80]
LBB0_11:
	mov	x0, x21
	bl	_free
	ldp	w9, w8, [sp, #56]
	cmp	w8, w9
	cset	w8, lt
	add	x9, sp, #56
	bfi	x9, x8, #2, #1
	ldr	w9, [x9]
	mov	w10, #2
	ldp	w11, w12, [sp, #64]
	cmp	w11, w9
	csel	w8, w10, w8, lt
	ldr	w9, [x22, w8, uxtw #2]
	mov	w10, #3
	cmp	w12, w9
	csel	w8, w10, w8, lt
	ldr	w9, [x22, w8, uxtw #2]
	mov	w10, #4
	ldp	w11, w12, [sp, #72]
	cmp	w11, w9
	csel	w8, w10, w8, lt
	ldr	w9, [x22, w8, uxtw #2]
	mov	w10, #5
	cmp	w12, w9
	csel	w8, w10, w8, lt
	ldr	w9, [x22, w8, uxtw #2]
	ldr	w10, [sp, #80]
	cmp	w10, w9
	mov	w9, #7
	csinc	w22, w9, w8, lt
	ldp	w2, w1, [sp, #48]
	mov	x0, x20
	mov	x3, #0
	bl	_mpt_vol_info
	cbz	x0, LBB0_19
; %bb.12:
	mov	x23, x0
	mov	w8, #1
	lsl	w24, w8, w22
	ldr	w8, [x0, #4]
	orr	w5, w8, w24
	str	w5, [x0, #4]
Lloh14:
	adrp	x8, _MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldp	w3, w2, [sp, #48]
	str	wzr, [sp, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #24]
	str	wzr, [sp, #16]
	str	q0, [sp]
	mov	x0, x20
	mov	w4, #0
	mov	x6, #0
	mov	w7, #0
	bl	_mpt_raid_action
	mov	x21, x0
	cbz	w0, LBB0_20
; %bb.13:
	ldp	w1, w0, [sp, #48]
	bl	_mpt_volume_name
	mov	x2, x0
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_warnx
	mov	x0, x23
	bl	_free
	b	LBB0_17
LBB0_14:
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	b	LBB0_17
LBB0_15:
	stp	d10, d9, [sp, #56]
	str	d8, [sp, #72]
	str	w23, [sp, #80]
LBB0_16:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
LBB0_17:
	ldr	x8, [sp, #88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.18:
	mov	x0, x21
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #144]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #128]            ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #112]            ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_19:
	mov	w21, #0
	b	LBB0_17
LBB0_20:
	mov	x0, x23
	bl	_free
	str	w24, [x19]
	b	LBB0_17
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpAdrp	Lloh10, Lloh12
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdrp	Lloh8, Lloh10
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid volume %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_MPI_RAID_HOT_SPARE_POOL_0,4,2  ; @MPI_RAID_HOT_SPARE_POOL_0
l_.str.1:                               ; @.str.1
	.asciz	"Failed to fetch volume list"

	.comm	_MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS,4,2 ; @MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS
l_.str.2:                               ; @.str.2
	.asciz	"Failed to add spare pool %d to %s"

	.no_dead_strip	_find_volume_spare_pool
.subsections_via_symbols
