	.file	"extr_raid5.c_handle_failed_sync.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	handle_failed_sync, @function
handle_failed_sync:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	add	rsi, 24
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR STRIPE_SYNCING[rip]
	call	clear_bit@PLT
	mov	rdx, QWORD PTR [r12]
	mov	rax, QWORD PTR 16[r12]
	mov	edi, DWORD PTR R5_Overlap[rip]
	lea	rsi, [rax+rdx*4]
	call	test_and_clear_bit@PLT
	test	rax, rax
	jne	.L27
.L2:
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR [rbx], 0
	mov	edi, DWORD PTR MD_RECOVERY_RECOVER[rip]
	lea	rsi, 4[rax]
	call	test_bit@PLT
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L5
	xor	ebx, ebx
	xor	r13d, r13d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rax, QWORD PTR 24[rbp]
	add	rax, r14
.L6:
	mov	r15, QWORD PTR [rax]
	test	r15, r15
	je	.L10
	mov	edi, DWORD PTR Faulty[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	je	.L28
.L10:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L29
.L11:
	mov	rax, QWORD PTR 24[rbp]
	mov	r14, rbx
	sal	r14, 4
	add	rax, r14
	mov	r15, QWORD PTR 8[rax]
	test	r15, r15
	je	.L6
	mov	edi, DWORD PTR Faulty[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	jne	.L25
	mov	edi, DWORD PTR In_sync[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	jne	.L25
	mov	esi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR STRIPE_SECTORS[rip]
	xor	ecx, ecx
	mov	rdi, r15
	call	rdev_set_badblocks@PLT
	test	eax, eax
	mov	rax, r14
	jne	.L30
	add	rax, QWORD PTR 24[rbp]
	mov	r13d, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, 1
.L4:
	mov	esi, DWORD PTR STRIPE_SECTORS[rip]
	add	rsp, 8
	.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	md_done_sync@PLT
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR In_sync[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	jne	.L10
	mov	esi, DWORD PTR 8[r12]
	mov	edx, DWORD PTR STRIPE_SECTORS[rip]
	xor	ecx, ecx
	mov	rdi, r15
	call	rdev_set_badblocks@PLT
	test	eax, eax
	mov	eax, 1
	cmove	r13d, eax
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L11
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, QWORD PTR 8[rbp]
	mov	edx, 1
	test	r13d, r13d
	je	.L4
	mov	eax, DWORD PTR [rdi]
	xor	edx, edx
	mov	DWORD PTR 16[rbp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	lea	rdi, 32[rbp]
	call	wake_up@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L30:
	add	rax, QWORD PTR 24[rbp]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	handle_failed_sync, .-handle_failed_sync
	.comm	STRIPE_SYNCING,4,4
	.comm	STRIPE_SECTORS,4,4
	.comm	R5_Overlap,4,4
	.comm	MD_RECOVERY_RECOVER,4,4
	.comm	In_sync,4,4
	.comm	Faulty,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_raid5.c_handle_failed_sync.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_failed_sync, %function
handle_failed_sync:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	ldr	r3, .L29
	sub	sp, sp, #12
	add	r1, r1, #12
	mov	r5, r0
	ldr	r0, [r3]
	mov	r7, r2
	bl	clear_bit
	ldr	r1, [r6]
	ldr	r2, [r6, #8]
	ldr	r3, .L29+4
	add	r1, r2, r1, lsl #2
	ldr	r0, [r3]
	bl	test_and_clear_bit
	cmp	r0, #0
	bne	.L26
.L2:
	mov	r4, #0
	ldr	r1, [r5, #4]
	ldr	r3, .L29+8
	str	r4, [r7, #4]
	ldr	r0, [r3]
	str	r4, [r7]
	add	r1, r1, #4
	bl	test_bit
	cmp	r0, r4
	beq	.L5
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L5
	ldr	r9, .L29+12
	ldr	r8, .L29+16
	ldr	r10, .L29+20
	str	r4, [sp, #4]
	b	.L11
.L24:
	ldr	r3, [r5, #12]
	add	r3, r3, r7
.L6:
	ldr	r7, [r3]
	cmp	r7, #0
	beq	.L10
	mov	r1, r7
	ldr	r0, [r8]
	bl	test_bit
	cmp	r0, #0
	beq	.L27
.L10:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L28
.L11:
	ldr	r3, [r5, #12]
	lsl	r7, r4, #3
	add	r3, r3, r4, lsl #3
	ldr	fp, [r3, #4]
	cmp	fp, #0
	beq	.L6
	mov	r1, fp
	ldr	r0, [r8]
	bl	test_bit
	cmp	r0, #0
	bne	.L24
	mov	r1, fp
	ldr	r0, [r10]
	bl	test_bit
	subs	r3, r0, #0
	bne	.L24
	mov	r0, fp
	ldr	r2, [r9]
	ldr	r1, [r6, #4]
	bl	rdev_set_badblocks
	cmp	r0, #0
	moveq	r3, #1
	streq	r3, [sp, #4]
	b	.L24
.L5:
	mov	r2, #1
	ldr	r9, .L29+12
	ldr	r0, [r5, #4]
	ldr	r1, [r9]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	md_done_sync
.L27:
	mov	r1, r7
	ldr	r0, [r10]
	bl	test_bit
	subs	r3, r0, #0
	bne	.L10
	mov	r0, r7
	ldr	r2, [r9]
	ldr	r1, [r6, #4]
	bl	rdev_set_badblocks
	cmp	r0, #0
	ldr	r3, [sp, #4]
	moveq	r3, #1
	str	r3, [sp, #4]
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L11
.L28:
	ldr	r3, [sp, #4]
	ldr	r0, [r5, #4]
	cmp	r3, #0
	movne	r2, #0
	moveq	r2, #1
	ldrne	r3, [r0]
	ldr	r1, [r9]
	strne	r3, [r5, #8]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	md_done_sync
.L26:
	add	r0, r5, #16
	bl	wake_up
	b	.L2
.L30:
	.align	2
.L29:
	.word	STRIPE_SYNCING
	.word	R5_Overlap
	.word	MD_RECOVERY_RECOVER
	.word	STRIPE_SECTORS
	.word	Faulty
	.word	In_sync
	.size	handle_failed_sync, .-handle_failed_sync
	.comm	STRIPE_SYNCING,4,4
	.comm	STRIPE_SECTORS,4,4
	.comm	R5_Overlap,4,4
	.comm	MD_RECOVERY_RECOVER,4,4
	.comm	In_sync,4,4
	.comm	Faulty,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
