	.file	"extr_vdev_mirror.c_vdev_mirror_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vdev_mirror_open, @function
vdev_mirror_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	je	.L14
	mov	r14, rcx
	mov	r12, rsi
	mov	r13, rdx
	call	vdev_open_children@PLT
	mov	ecx, DWORD PTR [r15]
	test	ecx, ecx
	jle	.L9
	mov	DWORD PTR 12[rsp], 0
	xor	ebx, ebx
	xor	edx, edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	add	rbx, 1
	mov	DWORD PTR 12[rsp], eax
	add	edx, 1
	cmp	ecx, ebx
	jle	.L3
.L6:
	mov	rax, QWORD PTR 32[r15]
	mov	rbp, QWORD PTR [rax+rbx*8]
	mov	eax, DWORD PTR 4[rbp]
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR 24[rbp]
	mov	DWORD PTR 8[rsp], edx
	add	rbx, 1
	lea	rsi, -1[rax]
	mov	rax, QWORD PTR [r12]
	lea	rdi, -1[rax]
	call	MIN@PLT
	add	rax, 1
	mov	QWORD PTR [r12], rax
	mov	rax, QWORD PTR 16[rbp]
	lea	rsi, -1[rax]
	mov	rax, QWORD PTR 0[r13]
	lea	rdi, -1[rax]
	call	MIN@PLT
	mov	esi, DWORD PTR 12[rbp]
	add	rax, 1
	mov	QWORD PTR 0[r13], rax
	mov	rdi, QWORD PTR [r14]
	call	MAX@PLT
	mov	ecx, DWORD PTR [r15]
	mov	edx, DWORD PTR 8[rsp]
	mov	QWORD PTR [r14], rax
	cmp	ecx, ebx
	jg	.L6
.L3:
	cmp	edx, ecx
	je	.L16
	mov	DWORD PTR 12[rsp], 0
.L1:
	mov	eax, DWORD PTR 12[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.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
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR VDEV_AUX_BAD_LABEL[rip]
	mov	DWORD PTR 8[rdi], eax
	mov	edi, DWORD PTR EINVAL[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.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
	jmp	SET_ERROR@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, r15
	call	vdev_children_are_offline@PLT
	test	rax, rax
	je	.L8
	mov	eax, DWORD PTR VDEV_AUX_CHILDREN_OFFLINE[rip]
	mov	DWORD PTR 8[r15], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	DWORD PTR 12[rsp], 0
	xor	edx, edx
	jmp	.L3
.L8:
	mov	eax, DWORD PTR VDEV_AUX_NO_REPLICAS[rip]
	mov	DWORD PTR 8[r15], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	vdev_mirror_open, .-vdev_mirror_open
	.comm	VDEV_AUX_NO_REPLICAS,4,4
	.comm	VDEV_AUX_CHILDREN_OFFLINE,4,4
	.comm	VDEV_AUX_BAD_LABEL,4,4
	.comm	EINVAL,4,4
	.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_vdev_mirror.c_vdev_mirror_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vdev_mirror_open, %function
vdev_mirror_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r0]
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	cmp	ip, #0
	mov	r6, r0
	beq	.L14
	mov	r8, r2
	mov	r7, r1
	mov	r9, r3
	bl	vdev_open_children
	ldr	r2, [r6]
	cmp	r2, #0
	ble	.L9
	mov	r4, #0
	mov	r10, r4
	mov	fp, r4
.L6:
	ldr	r3, [r6, #24]
	ldr	r5, [r3, r4, lsl #2]
	ldr	ip, [r5, #4]
	cmp	ip, #0
	movne	r10, ip
	addne	fp, fp, #1
	bne	.L5
	ldr	r1, [r5, #20]
	ldr	r0, [r7]
	sub	r1, r1, #1
	sub	r0, r0, #1
	bl	MIN
	add	r0, r0, #1
	str	r0, [r7]
	ldr	r1, [r5, #16]
	ldr	r0, [r8]
	sub	r1, r1, #1
	sub	r0, r0, #1
	bl	MIN
	add	r0, r0, #1
	str	r0, [r8]
	ldr	r1, [r5, #12]
	ldr	r0, [r9]
	bl	MAX
	ldr	r2, [r6]
	str	r0, [r9]
.L5:
	add	r4, r4, #1
	cmp	r2, r4
	bgt	.L6
.L3:
	cmp	fp, r2
	movne	r10, #0
	beq	.L15
.L1:
	mov	r0, r10
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, .L16
	ldr	r2, .L16+4
	ldr	r3, [r3]
	ldr	r0, [r2]
	str	r3, [r6, #8]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	SET_ERROR
.L15:
	mov	r0, r6
	bl	vdev_children_are_offline
	cmp	r0, #0
	ldrne	r3, .L16+8
	ldreq	r3, .L16+12
	ldr	r3, [r3]
	str	r3, [r6, #8]
	b	.L1
.L9:
	mov	r10, #0
	mov	fp, r10
	b	.L3
.L17:
	.align	2
.L16:
	.word	VDEV_AUX_BAD_LABEL
	.word	EINVAL
	.word	VDEV_AUX_CHILDREN_OFFLINE
	.word	VDEV_AUX_NO_REPLICAS
	.size	vdev_mirror_open, .-vdev_mirror_open
	.comm	VDEV_AUX_NO_REPLICAS,4,4
	.comm	VDEV_AUX_CHILDREN_OFFLINE,4,4
	.comm	VDEV_AUX_BAD_LABEL,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
