	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clear_config
_clear_config:                          ## @clear_config
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_mpt_unit@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_mpt_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movl	%eax, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_mpt_read_ioc_page
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.5:
	movq	32(%r12), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,8), %esi
	movl	4(%r15,%rbx,8), %edi
	callq	_mpt_lock_volume
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	cmpl	(%r12), %ebx
	jl	LBB0_6
LBB0_9:
	movl	(%r13), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_printf
	xorl	%eax, %eax
	callq	_getchar
	andl	$-33, %eax
	cmpl	$89, %eax
	jne	LBB0_10
## %bb.11:
	cmpl	$0, (%r12)
	jle	LBB0_16
## %bb.12:
	movq	32(%r12), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r15
	cmpl	(%r12), %r15d
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	_MPI_RAID_ACTION_DELETE_VOLUME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13,%r15,8), %ecx
	movl	4(%r13,%r15,8), %edx
	movq	_MPI_RAID_ACTION_ADATA_ZERO_LBA0@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	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)
	movl	%r14d, %edi
	xorl	%r8d, %r8d
	callq	_mpt_raid_action
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%eax, %ebx
	leaq	(%r15,%r15), %rax
	movl	4(%r13,%rax,4), %edi
	movl	(%r13,%rax,4), %esi
	callq	_mpt_volume_name
	movl	%ebx, %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	callq	_warnc
	jmp	LBB0_15
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_34
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_33
LBB0_10:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_33
LBB0_16:
	movq	%r12, %rdi
	callq	_free
	movl	%r14d, %edi
	movl	$5, %esi
	xorl	%edx, %edx
	callq	_mpt_read_ioc_page
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%rax, %r12
	cmpl	$0, 4(%rax)
	jle	LBB0_23
## %bb.19:
	movq	24(%r12), %r13
	leaq	L_.str.7(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	incq	%rbx
	cmpl	4(%r12), %ebx
	jge	LBB0_23
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %esi
	movl	%r14d, %edi
	callq	_mpt_delete_physdisk
	testq	%rax, %rax
	jns	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	(%r13,%rbx,4), %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_22
LBB0_7:
	movl	(%r15,%rbx,8), %esi
	movl	4(%r15,%rbx,8), %edi
	callq	_mpt_volume_name
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_warnx
	movq	%r12, %rdi
	callq	_free
	movl	%r14d, %edi
	callq	_close
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_34
LBB0_23:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_24
LBB0_17:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_24:
	movq	_mpt_unit@GOTPCREL(%rip), %rbx
	movl	%r14d, %edi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_mpt_read_ioc_page
	testq	%rax, %rax
	je	LBB0_25
## %bb.26:
	movq	%rax, %r12
	cmpl	$0, 8(%rax)
	jle	LBB0_31
## %bb.27:
	movq	16(%r12), %r13
	leaq	L_.str.7(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_28 Depth=1
	incq	%rbx
	cmpl	8(%r12), %ebx
	jge	LBB0_31
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rbx,4), %esi
	movl	%r14d, %edi
	callq	_mpt_delete_physdisk
	testq	%rax, %rax
	jns	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movl	(%r13,%rbx,4), %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_30
LBB0_31:
	movq	%r12, %rdi
	callq	_free
	movq	_mpt_unit@GOTPCREL(%rip), %rbx
	jmp	LBB0_32
LBB0_25:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
LBB0_32:
	movl	(%rbx), %esi
	leaq	L_.str.9(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_printf
	movl	$-1, %edi
	movl	$-1, %esi
	callq	_mpt_rescan_bus
LBB0_33:
	movl	%r14d, %edi
	callq	_close
LBB0_34:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mpt_unit,4,2                   ## @mpt_unit
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mpt_open"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to fetch volume list"

L_.str.2:                               ## @.str.2
	.asciz	"Volume %s is busy and cannot be deleted"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.3:                               ## @.str.3
	.asciz	"Are you sure you wish to clear the configuration on mpt%u? [y/N] "

	.comm	_MPI_RAID_ACTION_DELETE_VOLUME,4,2 ## @MPI_RAID_ACTION_DELETE_VOLUME
	.comm	_MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS,4,2 ## @MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS
	.comm	_MPI_RAID_ACTION_ADATA_ZERO_LBA0,4,2 ## @MPI_RAID_ACTION_ADATA_ZERO_LBA0
L_.str.5:                               ## @.str.5
	.asciz	"Failed to delete volume %s"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to fetch spare list"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to delete physical disk %d"

L_.str.8:                               ## @.str.8
	.asciz	"Failed to fetch drive list"

L_.str.9:                               ## @.str.9
	.asciz	"mpt%d: Configuration cleared\n"

L_str:                                  ## @str
	.asciz	"\nAborting"

	.no_dead_strip	_clear_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clear_config
_clear_config:                          ; @clear_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x23, _mpt_unit@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mpt_unit@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_mpt_open
	tbnz	w0, #31, LBB0_12
; %bb.1:
	mov	x19, x0
	mov	w1, #2
	mov	x2, #0
	bl	_mpt_read_ioc_page
	cbz	x0, LBB0_13
; %bb.2:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w22, #0
	ldr	x8, [x20, #32]
	add	x21, x8, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x21, #-4]
	bl	_mpt_lock_volume
	tbnz	x0, #63, LBB0_21
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w8, [x20]
	add	x21, x21, #8
	cmp	w22, w8
	b.lt	LBB0_4
LBB0_6:
	ldr	w8, [x23]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	bl	_getchar
	and	w8, w0, #0xffffffdf
	cmp	w8, #89
	b.ne	LBB0_14
; %bb.7:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.8:
	mov	w24, #0
	ldr	x8, [x20, #32]
Lloh4:
	adrp	x25, _MPI_RAID_ACTION_DELETE_VOLUME@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MPI_RAID_ACTION_DELETE_VOLUME@GOTPAGEOFF]
Lloh6:
	adrp	x26, _MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS@GOTPAGE
Lloh7:
	ldr	x26, [x26, _MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS@GOTPAGEOFF]
	add	x27, x8, #4
Lloh8:
	adrp	x28, _MPI_RAID_ACTION_ADATA_ZERO_LBA0@GOTPAGE
Lloh9:
	ldr	x28, [x28, _MPI_RAID_ACTION_ADATA_ZERO_LBA0@GOTPAGEOFF]
Lloh10:
	adrp	x21, l_.str.5@PAGE
Lloh11:
	add	x21, x21, l_.str.5@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w24, w24, #1
	ldr	w8, [x20]
	add	x27, x27, #8
	cmp	w24, w8
	b.ge	LBB0_15
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldp	w3, w2, [x27, #-4]
	ldr	w8, [x26]
	ldr	w9, [x28]
	orr	w5, w9, w8
	str	wzr, [sp, #40]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #24]
	str	wzr, [sp, #16]
	str	q0, [sp]
	mov	x0, x19
	mov	w4, #0
	mov	x6, #0
	mov	w7, #0
	bl	_mpt_raid_action
	cbz	w0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x22, x0
	ldp	w1, w0, [x27, #-4]
	bl	_mpt_volume_name
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_warnc
	b	LBB0_9
LBB0_12:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_34
LBB0_13:
Lloh17:
	adrp	x8, _errno@GOTPAGE
Lloh18:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	mov	x0, x19
	bl	_close
	b	LBB0_34
LBB0_14:
Lloh22:
	adrp	x0, l_str@PAGE
Lloh23:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	x0, x20
	bl	_free
	b	LBB0_33
LBB0_15:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	mov	w1, #5
	mov	x2, #0
	bl	_mpt_read_ioc_page
	cbz	x0, LBB0_23
; %bb.16:
	mov	x20, x0
	ldr	w8, [x0, #4]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.17:
	mov	x22, #0
	ldr	x24, [x20, #24]
Lloh24:
	adrp	x21, l_.str.7@PAGE
Lloh25:
	add	x21, x21, l_.str.7@PAGEOFF
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x20, #4]
	add	x22, x22, #1
	cmp	w22, w8
	b.ge	LBB0_22
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24, x22, lsl #2]
	mov	x0, x19
	bl	_mpt_delete_physdisk
	tbz	x0, #63, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x24, x22, lsl #2]
	str	x8, [sp]
	mov	x0, x21
	bl	_warn
	b	LBB0_18
LBB0_21:
	ldp	w1, w0, [x21, #-4]
	bl	_mpt_volume_name
	mov	x1, x0
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_close
Lloh28:
	adrp	x8, _EBUSY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	b	LBB0_34
LBB0_22:
	mov	x0, x20
	bl	_free
	b	LBB0_24
LBB0_23:
Lloh31:
	adrp	x0, l_.str.6@PAGE
Lloh32:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_warn
LBB0_24:
	mov	x0, x19
	mov	w1, #3
	mov	x2, #0
	bl	_mpt_read_ioc_page
	cbz	x0, LBB0_31
; %bb.25:
	mov	x20, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.26:
	mov	x22, #0
	ldr	x24, [x20, #16]
Lloh33:
	adrp	x21, l_.str.7@PAGE
Lloh34:
	add	x21, x21, l_.str.7@PAGEOFF
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x20, #8]
	add	x22, x22, #1
	cmp	w22, w8
	b.ge	LBB0_30
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24, x22, lsl #2]
	mov	x0, x19
	bl	_mpt_delete_physdisk
	tbz	x0, #63, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x24, x22, lsl #2]
	str	x8, [sp]
	mov	x0, x21
	bl	_warn
	b	LBB0_27
LBB0_30:
	mov	x0, x20
	bl	_free
	b	LBB0_32
LBB0_31:
Lloh35:
	adrp	x0, l_.str.8@PAGE
Lloh36:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_warn
LBB0_32:
	ldr	w8, [x23]
	str	x8, [sp]
Lloh37:
	adrp	x0, l_.str.9@PAGE
Lloh38:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
	mov	w0, #-1
	mov	w1, #-1
	bl	_mpt_rescan_bus
LBB0_33:
	mov	x0, x19
	bl	_close
	mov	w20, #0
LBB0_34:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_mpt_unit,4,2                   ; @mpt_unit
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mpt_open"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to fetch volume list"

l_.str.2:                               ; @.str.2
	.asciz	"Volume %s is busy and cannot be deleted"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.3:                               ; @.str.3
	.asciz	"Are you sure you wish to clear the configuration on mpt%u? [y/N] "

	.comm	_MPI_RAID_ACTION_DELETE_VOLUME,4,2 ; @MPI_RAID_ACTION_DELETE_VOLUME
	.comm	_MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS,4,2 ; @MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS
	.comm	_MPI_RAID_ACTION_ADATA_ZERO_LBA0,4,2 ; @MPI_RAID_ACTION_ADATA_ZERO_LBA0
l_.str.5:                               ; @.str.5
	.asciz	"Failed to delete volume %s"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to fetch spare list"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to delete physical disk %d"

l_.str.8:                               ; @.str.8
	.asciz	"Failed to fetch drive list"

l_.str.9:                               ; @.str.9
	.asciz	"mpt%d: Configuration cleared\n"

l_str:                                  ; @str
	.asciz	"\nAborting"

	.no_dead_strip	_clear_config
.subsections_via_symbols
