	.file	"extr_libzfs_pool.c_zpool_clear.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	""
	.string	""
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"cannot clear errors for %s"
	.text
	.p2align 4
	.globl	zpool_clear
	.type	zpool_clear, @function
zpool_clear:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sub	rsp, 1104
	.cfi_def_cfa_offset 1152
	mov	rbp, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR TEXT_DOMAIN[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1096[rsp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	movups	XMMWORD PTR 40[rsp], xmm0
	mov	QWORD PTR 32[rsp], rax
	mov	QWORD PTR 24[rsp], 0
	test	rsi, rsi
	je	.L2
	mov	r14, rsi
	lea	rsi, .LC1[rip]
	lea	r13, 64[rsp]
	call	dgettext@PLT
	mov	rcx, r14
	mov	esi, 1024
	mov	rdi, r13
	mov	rdx, rax
	call	snprintf@PLT
	mov	rsi, QWORD PTR [r12]
	mov	edi, DWORD PTR 44[rsp]
	mov	edx, 4
	call	strlcpy@PLT
	mov	rdi, r12
	lea	rcx, 16[rsp]
	xor	r8d, r8d
	lea	rdx, 8[rsp]
	mov	rsi, r14
	call	zpool_find_vdev@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L29
	cmp	QWORD PTR 8[rsp], 0
	jne	.L30
	mov	esi, DWORD PTR ZPOOL_CONFIG_GUID[rip]
	lea	rdx, 48[rsp]
	call	nvlist_lookup_uint64@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	verify@PLT
.L5:
	lea	rsi, 4[rsp]
	mov	rdi, r15
	call	zpool_get_load_policy@PLT
	mov	edx, DWORD PTR 8[r12]
	mov	eax, DWORD PTR 4[rsp]
	mov	rdi, rbp
	lea	r12, 32[rsp]
	add	edx, edx
	mov	rsi, r12
	mov	DWORD PTR 40[rsp], eax
	call	zcmd_alloc_dst_nvlist@PLT
	test	rax, rax
	jne	.L27
	mov	rdx, r15
	mov	rsi, r12
	mov	rdi, rbp
	call	zcmd_write_src_nvlist@PLT
	test	rax, rax
	je	.L10
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR errno[rip]
	cmp	rax, QWORD PTR ENOMEM[rip]
	jne	.L31
	mov	rsi, r12
	mov	rdi, rbp
	call	zcmd_expand_dst_nvlist@PLT
	test	rax, rax
	jne	.L32
.L10:
	mov	esi, DWORD PTR ZFS_IOC_CLEAR[rip]
	mov	rdx, r12
	mov	rdi, rbp
	call	zfs_ioctl@PLT
	test	eax, eax
	jne	.L11
	mov	ecx, DWORD PTR 4[rsp]
	mov	edx, DWORD PTR ZPOOL_TRY_REWIND[rip]
.L12:
	or	edx, DWORD PTR ZPOOL_DO_REWIND[rip]
	test	edx, ecx
	jne	.L33
.L16:
	mov	rdi, r12
	call	zcmd_free_nvlists@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	esi, DWORD PTR EZFS_ISSPARE[rip]
	mov	rdx, r13
	mov	rdi, rbp
	call	zfs_error@PLT
.L1:
	mov	rcx, QWORD PTR 1096[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L34
	add	rsp, 1104
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	ecx, DWORD PTR 4[rsp]
	mov	edx, DWORD PTR ZPOOL_TRY_REWIND[rip]
	test	ecx, edx
	je	.L15
	cmp	rax, QWORD PTR EPERM[rip]
	je	.L15
	cmp	rax, QWORD PTR EACCES[rip]
	jne	.L12
.L15:
	mov	rdi, r12
	call	zcmd_free_nvlists@PLT
	mov	rsi, QWORD PTR errno[rip]
	mov	rdx, r13
	mov	rdi, rbp
	call	zpool_standard_error@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r14, QWORD PTR [r12]
	lea	rsi, .LC1[rip]
	lea	r13, 64[rsp]
	call	dgettext@PLT
	mov	rdi, r13
	mov	esi, 1024
	mov	rdx, rax
	mov	rcx, r14
	call	snprintf@PLT
	mov	rsi, QWORD PTR [r12]
	mov	edi, DWORD PTR 44[rsp]
	mov	edx, 4
	call	strlcpy@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdi, r12
	call	zcmd_free_nvlists@PLT
.L27:
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	lea	rdx, 24[rsp]
	mov	rsi, r12
	mov	rdi, rbp
	call	zcmd_read_dst_nvlist@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	rcx, QWORD PTR 24[rsp]
	xor	edx, edx
	mov	esi, DWORD PTR 44[rsp]
	test	DWORD PTR ZPOOL_TRY_REWIND[rip], eax
	mov	rdi, rbp
	setne	dl
	call	zpool_rewind_exclaim@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	nvlist_free@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L29:
	mov	esi, DWORD PTR EZFS_NODEVICE[rip]
	mov	rdx, r13
	mov	rdi, rbp
	call	zfs_error@PLT
	jmp	.L1
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	zpool_clear, .-zpool_clear
	.comm	errno,8,8
	.comm	ZPOOL_TRY_REWIND,4,4
	.comm	ZPOOL_DO_REWIND,4,4
	.comm	ZPOOL_CONFIG_GUID,4,4
	.comm	ZFS_IOC_CLEAR,4,4
	.comm	TEXT_DOMAIN,4,4
	.comm	EZFS_NODEVICE,4,4
	.comm	EZFS_ISSPARE,4,4
	.comm	EPERM,8,8
	.comm	ENOMEM,8,8
	.comm	EACCES,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_libzfs_pool.c_zpool_clear.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"cannot clear errors for %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	zpool_clear
	.syntax unified
	.arm
	.fpu softvfp
	.type	zpool_clear, %function
zpool_clear:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, #0
	mov	r5, r0
	mov	r8, r2
	ldr	r0, .L36
	ldr	r3, .L36+4
	ldr	r2, .L36+8
	sub	sp, sp, #1072
	subs	r7, r1, #0
	ldr	r2, [r2]
	str	r2, [sp, #1068]
	mov	r2,#0
	ldr	r4, [r5, #8]
	str	r0, [sp, #28]
	ldr	r1, .L36+12
	ldr	r0, [r3]
	str	r6, [sp, #32]
	str	r6, [sp, #36]
	str	r6, [sp, #40]
	str	r6, [sp, #24]
	beq	.L2
	bl	dgettext
	add	r9, sp, #44
	mov	r2, r0
	mov	r3, r7
	mov	r1, #1024
	mov	r0, r9
	bl	snprintf
	add	r10, sp, #16
	mov	r2, #4
	ldr	r1, [r5]
	ldr	r0, [sp, #36]
	bl	strlcpy
	mov	r1, r7
	mov	r2, r10
	mov	r0, r5
	str	r6, [sp]
	add	r3, sp, #20
	bl	zpool_find_vdev
	cmp	r0, r6
	beq	.L30
	ldr	r3, [sp, #16]
	cmp	r3, #0
	bne	.L31
	ldr	r3, .L36+16
	add	r2, sp, #40
	ldr	r1, [r3]
	bl	nvlist_lookup_uint64
	clz	r0, r0
	lsr	r0, r0, #5
	bl	verify
.L5:
	sub	r1, r10, #4
	mov	r0, r8
	bl	zpool_get_load_policy
	ldr	r2, [r5, #4]
	ldr	r3, [sp, #12]
	mov	r0, r4
	lsl	r2, r2, #1
	add	r1, sp, #28
	str	r3, [sp, #32]
	bl	zcmd_alloc_dst_nvlist
	cmp	r0, #0
	bne	.L28
	mov	r2, r8
	mov	r0, r4
	add	r1, sp, #28
	bl	zcmd_write_src_nvlist
	subs	r8, r0, #0
	bne	.L28
	ldr	r5, .L36+20
	ldr	r6, .L36+24
	ldr	r7, .L36+28
	b	.L10
.L11:
	ldr	r3, [r6]
	ldr	r2, [r7]
	cmp	r3, r2
	bne	.L32
	mov	r0, r4
	add	r1, sp, #28
	bl	zcmd_expand_dst_nvlist
	cmp	r0, #0
	bne	.L33
.L10:
	mov	r0, r4
	ldr	r1, [r5]
	add	r2, sp, #28
	bl	zfs_ioctl
	cmp	r0, #0
	bne	.L11
	ldr	r5, .L36+32
	ldr	r1, [sp, #12]
	ldr	r2, [r5]
.L12:
	ldr	r3, .L36+36
	ldr	r3, [r3]
	orr	r2, r2, r3
	tst	r2, r1
	bne	.L34
.L16:
	add	r0, sp, #28
	bl	zcmd_free_nvlists
	b	.L1
.L31:
	ldr	r3, .L36+40
.L27:
	mov	r2, r9
	mov	r0, r4
	ldr	r1, [r3]
	bl	zfs_error
	mov	r8, r0
.L1:
	ldr	r3, .L36+8
	ldr	r2, [r3]
	ldr	r3, [sp, #1068]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r8
	add	sp, sp, #1072
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L32:
	ldr	r5, .L36+32
	ldr	r1, [sp, #12]
	ldr	r2, [r5]
	tst	r1, r2
	beq	.L15
	ldr	r0, .L36+44
	ldr	r0, [r0]
	cmp	r3, r0
	beq	.L15
	ldr	r0, .L36+48
	ldr	r0, [r0]
	cmp	r3, r0
	bne	.L12
.L15:
	add	r0, sp, #28
	bl	zcmd_free_nvlists
	mov	r2, r9
	mov	r0, r4
	ldr	r1, [r6]
	bl	zpool_standard_error
	mov	r8, r0
	b	.L1
.L2:
	bl	dgettext
	add	r9, sp, #44
	mov	r2, r0
	mov	r1, #1024
	ldr	r3, [r5]
	mov	r0, r9
	bl	snprintf
	mov	r2, #4
	ldr	r1, [r5]
	ldr	r0, [sp, #36]
	bl	strlcpy
	add	r10, sp, #16
	b	.L5
.L33:
	add	r0, sp, #28
	bl	zcmd_free_nvlists
.L28:
	mvn	r8, #0
	b	.L1
.L34:
	add	r2, sp, #24
	add	r1, sp, #28
	mov	r0, r4
	bl	zcmd_read_dst_nvlist
	ldr	r2, [sp, #12]
	ldr	r3, [r5]
	mov	r0, r4
	tst	r2, r3
	movne	r2, #1
	moveq	r2, #0
	ldr	r3, [sp, #24]
	ldr	r1, [sp, #36]
	bl	zpool_rewind_exclaim
	ldr	r0, [sp, #24]
	bl	nvlist_free
	b	.L16
.L30:
	ldr	r3, .L36+52
	b	.L27
.L35:
	bl	__stack_chk_fail
.L37:
	.align	2
.L36:
	.word	.LANCHOR0
	.word	TEXT_DOMAIN
	.word	.LC2
	.word	.LC1
	.word	ZPOOL_CONFIG_GUID
	.word	ZFS_IOC_CLEAR
	.word	errno
	.word	ENOMEM
	.word	ZPOOL_TRY_REWIND
	.word	ZPOOL_DO_REWIND
	.word	EZFS_ISSPARE
	.word	EPERM
	.word	EACCES
	.word	EZFS_NODEVICE
	.size	zpool_clear, .-zpool_clear
	.comm	errno,4,4
	.comm	ZPOOL_TRY_REWIND,4,4
	.comm	ZPOOL_DO_REWIND,4,4
	.comm	ZPOOL_CONFIG_GUID,4,4
	.comm	ZFS_IOC_CLEAR,4,4
	.comm	TEXT_DOMAIN,4,4
	.comm	EZFS_NODEVICE,4,4
	.comm	EZFS_ISSPARE,4,4
	.comm	EPERM,4,4
	.comm	ENOMEM,4,4
	.comm	EACCES,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.ascii	"\000\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
