	.file	"extr_tr_raid1e.c_g_raid_tr_update_state_raid1e_odd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Promote subdisk %s:%d from %s to STALE."
	.text
	.p2align 4
	.type	g_raid_tr_update_state_raid1e_odd, @function
g_raid_tr_update_state_raid1e_odd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	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, 56
	.cfi_def_cfa_offset 112
	mov	rsi, QWORD PTR G_RAID_SUBDISK_S_ACTIVE[rip]
	mov	rbp, QWORD PTR 24[rdi]
	call	g_raid_nsubdisks@PLT
	mov	r8d, DWORD PTR 0[r13]
	cmp	eax, r8d
	je	.L2
	xor	ebx, ebx
	lea	r12, .LC0[rip]
	test	r8d, r8d
	jg	.L3
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	add	rbx, 1
	cmp	r8d, ebx
	jle	.L26
.L3:
	mov	rdx, QWORD PTR 8[r13]
	lea	rax, [rbx+rbx*2]
	lea	r14, [rdx+rax*8]
	mov	rdi, QWORD PTR [r14]
	cmp	rdi, QWORD PTR G_RAID_SUBDISK_S_UNINITIALIZED[rip]
	jne	.L5
	call	g_raid_subdisk_state2str@PLT
	mov	r8d, DWORD PTR 20[r14]
	mov	ecx, DWORD PTR 16[r13]
	mov	rdx, r12
	mov	r9d, eax
	mov	rsi, rbp
	mov	edi, 1
	add	rbx, 1
	call	G_RAID_DEBUG1@PLT
	mov	rsi, QWORD PTR G_RAID_SUBDISK_S_STALE[rip]
	mov	rdi, r14
	call	g_raid_change_subdisk_state@PLT
	mov	ecx, DWORD PTR 16[r14]
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbp
	call	g_raid_write_metadata@PLT
	mov	r8d, DWORD PTR 0[r13]
	cmp	r8d, ebx
	jg	.L3
.L26:
	mov	r14d, DWORD PTR G_RAID_VOLUME_S_OPTIMAL[rip]
	test	r8d, r8d
	jle	.L13
	mov	rax, QWORD PTR G_RAID_SUBDISK_S_RESYNC[rip]
	mov	r11, QWORD PTR 8[r13]
	mov	r12d, r14d
	mov	r13d, DWORD PTR N[rip]
	mov	rbp, QWORD PTR G_RAID_SUBDISK_S_REBUILD[rip]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR G_RAID_SUBDISK_S_ACTIVE[rip]
	mov	rbx, r11
	mov	r15, QWORD PTR G_RAID_SUBDISK_S_STALE[rip]
	mov	r10d, r13d
	mov	QWORD PTR 16[rsp], rax
	mov	eax, DWORD PTR G_RAID_VOLUME_S_BROKEN[rip]
	mov	DWORD PTR 40[rsp], eax
	mov	eax, DWORD PTR G_RAID_VOLUME_S_DEGRADED[rip]
	mov	DWORD PTR 44[rsp], eax
	mov	eax, DWORD PTR G_RAID_VOLUME_S_SUBOPTIMAL[rip]
	mov	DWORD PTR 36[rsp], eax
	lea	eax, [r8+r13]
	mov	DWORD PTR 12[rsp], eax
	mov	eax, 1
	sub	eax, r13d
	mov	DWORD PTR 32[rsp], eax
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, QWORD PTR [rbx]
	mov	r9, rbx
	cmp	r13d, 1
	jle	.L14
	mov	eax, DWORD PTR 32[rsp]
	mov	rsi, rdi
	lea	ecx, [rax+r10]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L28:
	je	.L27
.L7:
	cmp	rsi, rax
	cmovg	rsi, rax
	add	ecx, 1
	cmp	r10d, ecx
	je	.L6
.L29:
	mov	rdi, QWORD PTR [r9]
.L9:
	mov	eax, ecx
	cdq
	idiv	r8d
	movsx	rdx, edx
	lea	rax, [rdx+rdx*2]
	lea	rdx, [r11+rax*8]
	mov	rax, QWORD PTR [rdx]
	cmp	rax, rdi
	jle	.L28
	cmp	rsi, rax
	mov	r9, rdx
	cmovg	rsi, rax
	add	ecx, 1
	cmp	r10d, ecx
	jne	.L29
.L6:
	mov	eax, r14d
	cmp	QWORD PTR 16[rsp], rsi
	je	.L10
	mov	eax, DWORD PTR 36[rsp]
	cmp	r15, rsi
	jle	.L10
	mov	eax, DWORD PTR 44[rsp]
	cmp	r15, QWORD PTR [r9]
	cmovg	eax, DWORD PTR 40[rsp]
.L10:
	cmp	r12d, eax
	cmovg	r12d, eax
	add	rbx, 24
	add	r10d, 1
	cmp	DWORD PTR 12[rsp], r10d
	jne	.L11
.L1:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L27:
	.cfi_restore_state
	cmp	rbp, rdi
	je	.L8
	cmp	QWORD PTR 24[rsp], rdi
	jne	.L7
.L8:
	mov	rdi, QWORD PTR 8[r9]
	cmp	QWORD PTR 8[rdx], rdi
	cmovg	r9, rdx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, rdi
	jmp	.L6
.L2:
	mov	r12d, DWORD PTR G_RAID_VOLUME_S_OPTIMAL[rip]
	jmp	.L1
.L13:
	mov	r12d, r14d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	g_raid_tr_update_state_raid1e_odd, .-g_raid_tr_update_state_raid1e_odd
	.comm	N,4,4
	.comm	G_RAID_VOLUME_S_SUBOPTIMAL,4,4
	.comm	G_RAID_VOLUME_S_OPTIMAL,4,4
	.comm	G_RAID_VOLUME_S_DEGRADED,4,4
	.comm	G_RAID_VOLUME_S_BROKEN,4,4
	.comm	G_RAID_SUBDISK_S_UNINITIALIZED,8,8
	.comm	G_RAID_SUBDISK_S_STALE,8,8
	.comm	G_RAID_SUBDISK_S_RESYNC,8,8
	.comm	G_RAID_SUBDISK_S_REBUILD,8,8
	.comm	G_RAID_SUBDISK_S_ACTIVE,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_tr_raid1e.c_g_raid_tr_update_state_raid1e_odd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Promote subdisk %s:%d from %s to STALE.\000"
	.global	__aeabi_idivmod
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	g_raid_tr_update_state_raid1e_odd, %function
g_raid_tr_update_state_raid1e_odd:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L25
	mov	r6, r0
	ldr	r1, [r9]
	sub	sp, sp, #52
	ldr	r8, [r0, #12]
	bl	g_raid_nsubdisks
	ldr	r10, [r6]
	cmp	r0, r10
	beq	.L2
	cmp	r10, #0
	ble	.L2
	mov	r4, #0
	ldr	r7, .L25+4
	ldr	fp, .L25+8
	b	.L3
.L5:
	cmp	r10, r4
	ble	.L24
.L3:
	ldr	r2, [r6, #4]
	ldr	r3, [r7]
	ldr	r0, [r2, r4, lsl #4]
	add	r5, r2, r4, lsl #4
	cmp	r0, r3
	add	r4, r4, #1
	bne	.L5
	ldr	r3, [r5, #12]
	ldr	r10, [r6, #8]
	str	r3, [sp, #8]
	bl	g_raid_subdisk_state2str
	ldr	r3, [sp, #8]
	mov	r2, fp
	mov	r1, r8
	str	r3, [sp]
	str	r0, [sp, #4]
	mov	r3, r10
	mov	r0, #1
	bl	G_RAID_DEBUG1
	ldr	r3, .L25+12
	mov	r0, r5
	ldr	r1, [r3]
	bl	g_raid_change_subdisk_state
	mov	r2, r5
	mov	r1, r6
	mov	r0, r8
	ldr	r3, [r5, #8]
	bl	g_raid_write_metadata
	ldr	r10, [r6]
	cmp	r10, r4
	bgt	.L3
.L24:
	ldr	r2, .L25+16
	cmp	r10, #0
	ldr	r8, [r2]
	str	r8, [sp, #32]
	ble	.L13
	mov	r1, #0
	ldr	r2, .L25+20
	ldr	r5, .L25+24
	ldr	r3, [r2]
	ldr	r4, .L25+28
	mov	r7, r3
	str	r3, [sp, #20]
	ldr	r3, [r9]
	mov	r9, r1
	str	r3, [sp, #16]
	ldr	r3, [r5]
	ldr	lr, .L25+12
	str	r3, [sp, #12]
	ldr	r3, [r4]
	ldr	ip, .L25+32
	str	r3, [sp, #24]
	ldr	r3, [lr]
	ldr	r0, .L25+36
	str	r3, [sp, #28]
	ldr	r3, [ip]
	ldr	r2, .L25+40
	str	r3, [sp, #36]
	ldr	r3, [r0]
	ldr	fp, [r6, #4]
	str	r3, [sp, #40]
	ldr	r3, [r2]
	str	r8, [sp, #8]
	str	r3, [sp, #44]
.L11:
	ldr	r3, [sp, #20]
	ldr	r8, [fp, r9, lsl #4]
	cmp	r3, #1
	add	r6, fp, r9, lsl #4
	ble	.L14
	add	r9, r9, #1
	mov	r4, r9
	mov	r5, r8
	b	.L9
.L7:
	cmp	r5, r3
	add	r4, r4, #1
	movge	r5, r3
	cmp	r7, r4
	beq	.L6
	ldr	r8, [r6]
.L9:
	mov	r1, r10
	mov	r0, r4
	bl	__aeabi_idivmod
	ldr	r3, [fp, r1, lsl #4]
	add	r1, fp, r1, lsl #4
	cmp	r3, r8
	movgt	r6, r1
	bgt	.L7
	bne	.L7
	ldr	r2, [sp, #12]
	cmp	r2, r8
	beq	.L8
	ldr	r2, [sp, #24]
	cmp	r2, r8
	bne	.L7
.L8:
	ldr	r2, [r6, #4]
	ldr	r0, [r1, #4]
	cmp	r0, r2
	movgt	r6, r1
	b	.L7
.L14:
	mov	r5, r8
	add	r9, r9, #1
.L6:
	ldr	r3, [sp, #16]
	cmp	r3, r5
	beq	.L16
	ldr	r2, [sp, #28]
	cmp	r2, r5
	ble	.L17
	ldr	r3, [r6]
	ldr	r0, [sp, #40]
	cmp	r2, r3
	ldr	r1, [sp, #36]
	movle	r1, r0
	mov	r3, r1
.L10:
	ldr	r2, [sp, #8]
	add	r7, r7, #1
	cmp	r2, r3
	movlt	r3, r2
	cmp	r10, r9
	str	r3, [sp, #8]
	bne	.L11
	mov	r8, r3
.L1:
	mov	r0, r8
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, [sp, #32]
	b	.L10
.L17:
	ldr	r3, [sp, #44]
	b	.L10
.L2:
	ldr	r3, .L25+16
	ldr	r8, [r3]
	mov	r0, r8
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r8, [sp, #32]
	b	.L1
.L26:
	.align	2
.L25:
	.word	G_RAID_SUBDISK_S_ACTIVE
	.word	G_RAID_SUBDISK_S_UNINITIALIZED
	.word	.LC0
	.word	G_RAID_SUBDISK_S_STALE
	.word	G_RAID_VOLUME_S_OPTIMAL
	.word	N
	.word	G_RAID_SUBDISK_S_REBUILD
	.word	G_RAID_SUBDISK_S_RESYNC
	.word	G_RAID_VOLUME_S_BROKEN
	.word	G_RAID_VOLUME_S_DEGRADED
	.word	G_RAID_VOLUME_S_SUBOPTIMAL
	.size	g_raid_tr_update_state_raid1e_odd, .-g_raid_tr_update_state_raid1e_odd
	.comm	N,4,4
	.comm	G_RAID_VOLUME_S_SUBOPTIMAL,4,4
	.comm	G_RAID_VOLUME_S_OPTIMAL,4,4
	.comm	G_RAID_VOLUME_S_DEGRADED,4,4
	.comm	G_RAID_VOLUME_S_BROKEN,4,4
	.comm	G_RAID_SUBDISK_S_UNINITIALIZED,4,4
	.comm	G_RAID_SUBDISK_S_STALE,4,4
	.comm	G_RAID_SUBDISK_S_RESYNC,4,4
	.comm	G_RAID_SUBDISK_S_REBUILD,4,4
	.comm	G_RAID_SUBDISK_S_ACTIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
