	.file	"extr_dm-raid.c_rs_check_takeover.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Can't takeover degraded raid set"
	.align 8
.LC1:
	.string	"Can't takeover reshaping raid set"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"takeover not possible"
	.text
	.p2align 4
	.type	rs_check_takeover, @function
rs_check_takeover:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12d, DWORD PTR 16[rdi]
	mov	rbx, rdi
	test	r12d, r12d
	je	.L2
	mov	rax, QWORD PTR 8[rdi]
	lea	rcx, .LC0[rip]
	mov	r12d, DWORD PTR EPERM[rip]
	mov	QWORD PTR [rax], rcx
	neg	r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	rs_is_reshaping@PLT
	test	rax, rax
	jne	.L57
	cmp	DWORD PTR 20[rbx], 10
	ja	.L5
	mov	eax, DWORD PTR 20[rbx]
	lea	rdx, .L7[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L12-.L7
	.long	.L11-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L8-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L6-.L7
	.text
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR 24[rbx]
	test	edi, edi
	je	.L1
	mov	eax, edi
	and	eax, -5
	cmp	eax, 1
	jne	.L23
	cmp	DWORD PTR 28[rbx], 2
	je	.L1
.L23:
	mov	edx, 6
	mov	esi, 5
	call	__within_range@PLT
	test	eax, eax
	je	.L5
.L29:
	mov	eax, DWORD PTR ALGORITHM_PARITY_N[rip]
	cmp	DWORD PTR 36[rbx], eax
	je	.L1
.L5:
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, .LC2[rip]
	neg	r12d
	mov	QWORD PTR [rax], rsi
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L57:
	.cfi_restore_state
	mov	r12d, DWORD PTR EPERM[rip]
	mov	rax, QWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	neg	r12d
	mov	QWORD PTR [rax], rsi
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR 36[rbx]
	call	__is_raid10_offset@PLT
	test	eax, eax
	jne	.L5
	mov	edi, DWORD PTR 36[rbx]
	call	__raid10_near_copies@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	ebp, eax
	test	edi, edi
	jne	.L18
	cmp	eax, 1
	jbe	.L19
	mov	eax, DWORD PTR 28[rbx]
	xor	edx, edx
	div	ebp
	test	edx, edx
	jne	.L5
	mov	DWORD PTR 28[rbx], eax
	xor	r12d, r12d
	mov	DWORD PTR 40[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR 24[rbx]
	mov	eax, edi
	and	eax, -5
	cmp	eax, 1
	jne	.L13
	cmp	DWORD PTR 28[rbx], 1
	je	.L1
.L14:
	mov	edx, 6
	mov	esi, 4
	call	__within_range@PLT
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR ALGORITHM_PARITY_N[rip]
	cmp	DWORD PTR 32[rbx], eax
	jne	.L5
	cmp	DWORD PTR 28[rbx], 1
	jle	.L5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR 24[rbx]
	mov	edx, 5
	mov	esi, 4
	call	__within_range@PLT
	test	eax, eax
	je	.L21
	cmp	DWORD PTR 28[rbx], 2
	je	.L58
.L21:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	jne	.L22
	cmp	DWORD PTR 28[rbx], 1
	jne	.L5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, eax
	je	.L29
	cmp	eax, 4
	jne	.L25
	mov	eax, DWORD PTR ALGORITHM_PARITY_N[rip]
	cmp	DWORD PTR 36[rbx], eax
	je	.L1
.L52:
	cmp	DWORD PTR 28[rbx], 2
	jne	.L5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR 24[rbx]
	test	eax, -5
	je	.L29
	cmp	eax, 5
	jne	.L5
	mov	eax, DWORD PTR ALGORITHM_PARITY_N[rip]
	mov	edi, DWORD PTR 32[rbx]
	cmp	DWORD PTR 36[rbx], eax
	jne	.L30
	cmp	eax, edi
	je	.L1
.L30:
	mov	edx, DWORD PTR ALGORITHM_RIGHT_SYMMETRIC[rip]
	mov	esi, DWORD PTR ALGORITHM_LEFT_ASYMMETRIC[rip]
	call	__within_range@PLT
	test	eax, eax
	je	.L5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	cmp	edi, 10
	jne	.L14
	mov	eax, DWORD PTR [rbx]
	cdq
	idiv	DWORD PTR 28[rbx]
	test	edx, edx
	jne	.L14
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	cmp	eax, 10
	jne	.L5
	jmp	.L1
.L25:
	cmp	eax, 10
	ja	.L5
	mov	edx, 1042
	bt	rdx, rax
	jnc	.L27
	cmp	DWORD PTR 28[rbx], 2
	je	.L1
.L27:
	cmp	eax, 6
	jne	.L5
	mov	eax, DWORD PTR ALGORITHM_PARITY_N[rip]
	mov	edi, DWORD PTR 32[rbx]
	cmp	DWORD PTR 36[rbx], eax
	jne	.L28
	cmp	edi, eax
	je	.L1
.L28:
	mov	edx, DWORD PTR ALGORITHM_RIGHT_SYMMETRIC_6[rip]
	mov	esi, DWORD PTR ALGORITHM_LEFT_ASYMMETRIC_6[rip]
	call	__within_range@PLT
	test	eax, eax
	je	.L5
	jmp	.L1
.L18:
	cmp	edi, 1
	je	.L59
.L20:
	mov	edx, 5
	mov	esi, 4
	call	__within_range@PLT
	test	eax, eax
	je	.L5
	jmp	.L52
.L58:
	mov	DWORD PTR 16[rbx], 1
	jmp	.L1
.L19:
	jne	.L5
	mov	edi, DWORD PTR 36[rbx]
	call	__raid10_far_copies@PLT
	cmp	eax, 1
	jle	.L5
	jmp	.L1
.L59:
	mov	edi, DWORD PTR 36[rbx]
	call	__raid10_far_copies@PLT
	mov	edi, ebp
	mov	esi, eax
	call	max@PLT
	cmp	eax, DWORD PTR 28[rbx]
	je	.L1
	mov	edi, DWORD PTR 24[rbx]
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	rs_check_takeover, .-rs_check_takeover
	.comm	EPERM,4,4
	.comm	EINVAL,4,4
	.comm	ALGORITHM_RIGHT_SYMMETRIC_6,4,4
	.comm	ALGORITHM_RIGHT_SYMMETRIC,4,4
	.comm	ALGORITHM_PARITY_N,4,4
	.comm	ALGORITHM_LEFT_ASYMMETRIC_6,4,4
	.comm	ALGORITHM_LEFT_ASYMMETRIC,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_dm-raid.c_rs_check_takeover.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Can't takeover degraded raid set\000"
	.align	2
.LC1:
	.ascii	"Can't takeover reshaping raid set\000"
	.global	__aeabi_idivmod
	.global	__aeabi_uidivmod
	.align	2
.LC2:
	.ascii	"takeover not possible\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rs_check_takeover, %function
rs_check_takeover:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #8]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r4, r0
	beq	.L2
	ldr	r1, .L78
	ldr	r3, [r0, #4]
	ldr	r5, [r1]
	ldr	r2, .L78+4
	rsb	r5, r5, #0
	str	r2, [r3]
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	bl	rs_is_reshaping
	subs	r5, r0, #0
	bne	.L76
	ldr	r3, [r4, #12]
	cmp	r3, #10
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L7:
	.word	.L12
	.word	.L11
	.word	.L5
	.word	.L5
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L6
.L10:
	ldr	r0, [r4, #16]
	cmp	r0, #0
	beq	.L1
	bic	r3, r0, #4
	cmp	r3, #1
	bne	.L23
	ldr	r3, [r4, #20]
	cmp	r3, #2
	beq	.L1
.L23:
	mov	r2, #6
	mov	r1, #5
	bl	__within_range
	cmp	r0, #0
	beq	.L5
.L29:
	ldr	r3, .L78+8
	ldr	r2, [r4, #28]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L1
.L5:
	ldr	r1, .L78+12
	ldr	r3, [r4, #4]
	ldr	r5, [r1]
	ldr	r2, .L78+16
	rsb	r5, r5, #0
	mov	r0, r5
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L76:
	ldr	r1, .L78
	ldr	r3, [r4, #4]
	ldr	r5, [r1]
	ldr	r2, .L78+20
	rsb	r5, r5, #0
	mov	r0, r5
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r0, [r4, #28]
	bl	__is_raid10_offset
	cmp	r0, #0
	bne	.L5
	ldr	r0, [r4, #28]
	bl	__raid10_near_copies
	ldr	r3, [r4, #16]
	mov	r6, r0
	cmp	r3, #0
	bne	.L18
	cmp	r0, #1
	bls	.L19
	mov	r1, r0
	ldr	r0, [r4, #20]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	moveq	r5, r1
	streq	r0, [r4, #20]
	streq	r0, [r4, #32]
	bne	.L5
	b	.L1
.L12:
	ldr	r6, [r4, #16]
	bic	r3, r6, #4
	cmp	r3, #1
	bne	.L13
	ldr	r3, [r4, #20]
	cmp	r3, #1
	beq	.L1
.L14:
	mov	r0, r6
	mov	r2, #6
	mov	r1, #4
	bl	__within_range
	cmp	r0, #0
	beq	.L5
	ldr	r3, .L78+8
	ldr	r2, [r4, #24]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [r4, #20]
	cmp	r3, #1
	ble	.L5
	b	.L1
.L11:
	mov	r2, #5
	mov	r1, #4
	ldr	r0, [r4, #16]
	bl	__within_range
	cmp	r0, #0
	beq	.L21
	ldr	r3, [r4, #20]
	cmp	r3, #2
	moveq	r3, #1
	streq	r3, [r4, #8]
	beq	.L1
.L21:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [r4, #20]
	cmp	r3, #1
	bne	.L5
	b	.L1
.L9:
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L29
	cmp	r3, #4
	bne	.L25
	ldr	r3, .L78+8
	ldr	r2, [r4, #28]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L1
.L70:
	ldr	r3, [r4, #20]
	cmp	r3, #2
	bne	.L5
	b	.L1
.L8:
	ldr	r3, [r4, #16]
	bics	r2, r3, #4
	beq	.L29
	cmp	r3, #5
	bne	.L5
	ldr	r2, .L78+8
	ldr	r3, [r4, #28]
	ldr	r2, [r2]
	ldr	r0, [r4, #24]
	cmp	r3, r2
	bne	.L30
	cmp	r3, r0
	beq	.L1
.L30:
	ldr	r2, .L78+24
	ldr	r3, .L78+28
.L72:
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	__within_range
	cmp	r0, #0
	beq	.L5
	b	.L1
.L13:
	cmp	r6, #10
	bne	.L14
	ldr	r1, [r4, #20]
	ldr	r0, [r4]
	bl	__aeabi_idivmod
	cmp	r1, #0
	bne	.L14
	b	.L1
.L22:
	cmp	r3, #10
	bne	.L5
	b	.L1
.L25:
	cmp	r3, #10
	cmpne	r3, #1
	bne	.L27
	ldr	r2, [r4, #20]
	cmp	r2, #2
	beq	.L1
.L27:
	cmp	r3, #6
	bne	.L5
	ldr	r2, .L78+8
	ldr	r3, [r4, #28]
	ldr	r2, [r2]
	ldr	r0, [r4, #24]
	cmp	r3, r2
	bne	.L28
	cmp	r3, r0
	beq	.L1
.L28:
	ldr	r2, .L78+32
	ldr	r3, .L78+36
	b	.L72
.L18:
	cmp	r3, #1
	beq	.L77
.L20:
	mov	r0, r3
	mov	r2, #5
	mov	r1, #4
	bl	__within_range
	cmp	r0, #0
	beq	.L5
	b	.L70
.L19:
	bne	.L5
	ldr	r0, [r4, #28]
	bl	__raid10_far_copies
	cmp	r0, #1
	ble	.L5
	b	.L1
.L77:
	ldr	r0, [r4, #28]
	bl	__raid10_far_copies
	mov	r1, r0
	mov	r0, r6
	bl	max
	ldr	r3, [r4, #20]
	cmp	r0, r3
	beq	.L1
	ldr	r3, [r4, #16]
	b	.L20
.L79:
	.align	2
.L78:
	.word	EPERM
	.word	.LC0
	.word	ALGORITHM_PARITY_N
	.word	EINVAL
	.word	.LC2
	.word	.LC1
	.word	ALGORITHM_RIGHT_SYMMETRIC
	.word	ALGORITHM_LEFT_ASYMMETRIC
	.word	ALGORITHM_RIGHT_SYMMETRIC_6
	.word	ALGORITHM_LEFT_ASYMMETRIC_6
	.size	rs_check_takeover, .-rs_check_takeover
	.comm	EPERM,4,4
	.comm	EINVAL,4,4
	.comm	ALGORITHM_RIGHT_SYMMETRIC_6,4,4
	.comm	ALGORITHM_RIGHT_SYMMETRIC,4,4
	.comm	ALGORITHM_PARITY_N,4,4
	.comm	ALGORITHM_LEFT_ASYMMETRIC_6,4,4
	.comm	ALGORITHM_LEFT_ASYMMETRIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
