	.file	"extr_raid5-cache.c_r5c_finish_stripe_write_out.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	r5c_finish_stripe_write_out
	.type	r5c_finish_stripe_write_out, @function
r5c_finish_stripe_write_out:
.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
	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	r12, QWORD PTR 40[rdi]
	mov	QWORD PTR 8[rsp], rdx
	test	r12, r12
	je	.L1
	mov	rdx, QWORD PTR [rsi]
	mov	rax, QWORD PTR 32[rsi]
	mov	rbp, rdi
	mov	rbx, rsi
	mov	edi, DWORD PTR R5_InJournal[rip]
	lea	rsi, [rax+rdx*4]
	call	test_bit@PLT
	test	rax, rax
	jne	.L48
.L1:
	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
.L48:
	.cfi_restore_state
	mov	edi, DWORD PTR STRIPE_R5C_CACHING[rip]
	lea	r15, 12[rbx]
	mov	rsi, r15
	call	test_bit@PLT
	mov	rdi, rax
	call	WARN_ON@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR R5_InJournal[rip]
	lea	rsi, [rax+rdx*4]
	call	clear_bit@PLT
	mov	rax, QWORD PTR R5C_JOURNAL_MODE_WRITE_THROUGH[rip]
	cmp	QWORD PTR [r12], rax
	je	.L1
	mov	r13d, DWORD PTR 8[rbx]
	lea	eax, -1[r13]
	test	r13d, r13d
	je	.L5
	movsx	rdx, eax
	movsx	rcx, r13d
	mov	eax, eax
	xor	r13d, r13d
	sub	rcx, rax
	lea	r14, 0[0+rdx*4]
	lea	rax, -8[0+rcx*4]
	mov	QWORD PTR [rsp], rax
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rsi, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR R5_InJournal[rip]
	add	rsi, r14
	call	clear_bit@PLT
	mov	rsi, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR R5_Overlap[rip]
	add	rsi, r14
	call	test_and_clear_bit@PLT
	test	rax, rax
	mov	eax, 1
	cmovne	r13d, eax
	sub	r14, 4
	cmp	r14, QWORD PTR [rsp]
	jne	.L7
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR STRIPE_FULL_WRITE[rip]
	mov	rsi, r15
	mov	QWORD PTR [rax], 0
	call	test_and_clear_bit@PLT
	test	rax, rax
	jne	.L49
.L8:
	test	r13d, r13d
	jne	.L50
.L10:
	lea	r13, 20[r12]
	mov	rdi, r13
	call	spin_lock_irq@PLT
	lea	rdi, 24[rbx]
	call	list_del_init@PLT
	mov	rdi, r13
	call	spin_unlock_irq@PLT
	mov	eax, DWORD PTR MaxSector[rip]
	lea	rdi, 16[r12]
	mov	DWORD PTR 20[rbx], eax
	call	atomic_dec@PLT
	mov	rdi, r12
	call	r5c_update_log_state@PLT
	mov	edi, DWORD PTR STRIPE_R5C_PARTIAL_STRIPE[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	jne	.L14
	mov	edi, DWORD PTR STRIPE_R5C_FULL_STRIPE[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	jne	.L14
.L15:
	mov	edi, DWORD PTR STRIPE_R5C_PARTIAL_STRIPE[rip]
	mov	rsi, r15
	call	test_and_clear_bit@PLT
	test	rax, rax
	jne	.L51
.L17:
	mov	edi, DWORD PTR STRIPE_R5C_FULL_STRIPE[rip]
	mov	rsi, r15
	call	test_and_clear_bit@PLT
	test	rax, rax
	jne	.L52
.L18:
	mov	esi, DWORD PTR 16[rbx]
	mov	rdi, r12
	call	r5l_append_flush_payload@PLT
	mov	edi, DWORD PTR STRIPE_SYNC_REQUESTED[rip]
	mov	rsi, r15
	call	test_bit@PLT
	test	rax, rax
	je	.L1
	mov	edi, DWORD PTR STRIPE_HANDLE[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rsi, r15
	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_bit@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	esi, DWORD PTR 16[rbx]
	mov	rdi, rbp
	lea	r13, 8[r12]
	call	r5c_tree_index@PLT
	mov	rdi, r13
	mov	r14d, eax
	mov	DWORD PTR 8[rsp], eax
	call	spin_lock@PLT
	lea	r9, 12[r12]
	mov	esi, r14d
	mov	rdi, r9
	mov	QWORD PTR [rsp], r9
	call	radix_tree_lookup_slot@PLT
	xor	edi, edi
	test	rax, rax
	mov	r14, rax
	sete	dil
	call	BUG_ON@PLT
	mov	rsi, r13
	mov	rdi, r14
	call	radix_tree_deref_slot_protected@PLT
	mov	rcx, QWORD PTR R5C_RADIX_COUNT_SHIFT[rip]
	mov	r9, QWORD PTR [rsp]
	shr	rax, cl
	cmp	rax, 1
	je	.L53
	lea	rdx, -1[rax]
	mov	rsi, r14
	mov	rdi, r9
	sal	rdx, cl
	call	radix_tree_replace_slot@PLT
.L16:
	mov	rdi, r13
	call	spin_unlock@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L50:
	lea	rdi, 16[rbp]
	call	wake_up@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L49:
	lea	rdi, 32[rbp]
	call	atomic_dec_and_test@PLT
	test	rax, rax
	je	.L8
.L20:
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR [rax]
	call	md_wakeup_thread@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L53:
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, r9
	call	radix_tree_delete@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L52:
	mov	rdi, rbp
	call	atomic_read@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	BUG_ON@PLT
	lea	rdi, 4[rbp]
	call	atomic_dec@PLT
	mov	rdi, rbp
	call	atomic_dec@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L51:
	lea	r13, 8[rbp]
	mov	rdi, r13
	call	atomic_read@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	BUG_ON@PLT
	lea	rdi, 12[rbp]
	call	atomic_dec@PLT
	mov	rdi, r13
	call	atomic_dec@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rsp]
	mov	edi, DWORD PTR STRIPE_FULL_WRITE[rip]
	mov	rsi, r15
	mov	QWORD PTR [rax], 0
	call	test_and_clear_bit@PLT
	test	rax, rax
	je	.L10
	lea	rdi, 32[rbp]
	call	atomic_dec_and_test@PLT
	test	rax, rax
	je	.L10
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	r5c_finish_stripe_write_out, .-r5c_finish_stripe_write_out
	.comm	STRIPE_SYNC_REQUESTED,4,4
	.comm	STRIPE_R5C_PARTIAL_STRIPE,4,4
	.comm	STRIPE_R5C_FULL_STRIPE,4,4
	.comm	STRIPE_R5C_CACHING,4,4
	.comm	STRIPE_HANDLE,4,4
	.comm	STRIPE_FULL_WRITE,4,4
	.comm	R5_Overlap,4,4
	.comm	R5_InJournal,4,4
	.comm	R5C_RADIX_COUNT_SHIFT,8,8
	.comm	R5C_JOURNAL_MODE_WRITE_THROUGH,8,8
	.comm	MaxSector,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-cache.c_r5c_finish_stripe_write_out.c"
	.text
	.align	2
	.global	r5c_finish_stripe_write_out
	.syntax unified
	.arm
	.fpu softvfp
	.type	r5c_finish_stripe_write_out, %function
r5c_finish_stripe_write_out:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r0, #28]
	sub	sp, sp, #12
	cmp	r6, #0
	str	r2, [sp]
	beq	.L1
	mov	r4, r1
	ldr	r9, .L54
	ldr	r1, [r1]
	ldr	r3, [r4, #24]
	mov	r5, r0
	add	r1, r3, r1, lsl #2
	ldr	r0, [r9]
	bl	test_bit
	cmp	r0, #0
	bne	.L48
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L48:
	ldr	r3, .L54+4
	add	r7, r4, #8
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	bl	WARN_ON
	ldr	r3, [r4, #24]
	ldr	r1, [r4]
	ldr	r0, [r9]
	add	r1, r3, r1, lsl #2
	bl	clear_bit
	ldr	r3, .L54+8
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L1
	ldr	r10, [r4, #4]
	cmp	r10, #0
	sub	r8, r10, #1
	beq	.L5
	mov	r10, #0
	ldr	fp, .L54+12
.L7:
	ldr	r1, [r4, #24]
	ldr	r0, [r9]
	add	r1, r1, r8, lsl #2
	bl	clear_bit
	ldr	r1, [r4, #24]
	lsl	r2, r8, #2
	ldr	r0, [fp]
	add	r1, r1, r2
	bl	test_and_clear_bit
	sub	r8, r8, #1
	cmp	r0, #0
	movne	r10, #1
	cmn	r8, #1
	bne	.L7
	mov	r1, #0
	ldr	r2, .L54+16
	ldr	r3, [sp]
	ldr	r0, [r2]
	str	r1, [r3]
	mov	r1, r7
	bl	test_and_clear_bit
	cmp	r0, #0
	bne	.L49
.L8:
	cmp	r10, #0
	bne	.L50
.L10:
	add	r8, r6, #16
	mov	r0, r8
	bl	spin_lock_irq
	add	r0, r4, #20
	bl	list_del_init
	mov	r0, r8
	bl	spin_unlock_irq
	ldr	r3, .L54+20
	ldr	r10, .L54+24
	ldr	r3, [r3]
	add	r0, r6, #12
	str	r3, [r4, #16]
	bl	atomic_dec
	mov	r0, r6
	bl	r5c_update_log_state
	mov	r1, r7
	ldr	r0, [r10]
	bl	test_bit
	ldr	r3, .L54+28
	cmp	r0, #0
	str	r3, [sp]
	bne	.L14
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L14
.L15:
	mov	r1, r7
	ldr	r0, [r10]
	bl	test_and_clear_bit
	cmp	r0, #0
	bne	.L51
.L17:
	ldr	r3, [sp]
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_and_clear_bit
	cmp	r0, #0
	bne	.L52
.L18:
	ldr	r1, [r4, #12]
	mov	r0, r6
	bl	r5l_append_flush_payload
	ldr	r3, .L54+32
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	beq	.L1
	mov	r1, r7
	ldr	r3, .L54+36
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	set_bit
.L14:
	ldr	r1, [r4, #12]
	mov	r0, r5
	bl	r5c_tree_index
	mov	r8, r0
	add	fp, r6, #4
	str	r0, [sp, #4]
	add	r9, r6, #8
	mov	r0, fp
	bl	spin_lock
	mov	r1, r8
	mov	r0, r9
	bl	radix_tree_lookup_slot
	mov	r8, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	mov	r1, fp
	mov	r0, r8
	bl	radix_tree_deref_slot_protected
	ldr	r2, .L54+40
	ldr	r2, [r2]
	lsr	r0, r0, r2
	cmp	r0, #1
	beq	.L53
	sub	r0, r0, #1
	lsl	r2, r0, r2
	mov	r1, r8
	mov	r0, r9
	bl	radix_tree_replace_slot
.L16:
	mov	r0, fp
	bl	spin_unlock
	b	.L15
.L50:
	add	r0, r5, #16
	bl	wake_up
	b	.L10
.L49:
	add	r0, r5, #24
	bl	atomic_dec_and_test
	cmp	r0, #0
	beq	.L8
.L20:
	ldr	r2, [r5, #20]
	ldr	r0, [r2]
	bl	md_wakeup_thread
	b	.L8
.L53:
	mov	r0, r9
	ldr	r1, [sp, #4]
	bl	radix_tree_delete
	b	.L16
.L52:
	mov	r0, r5
	bl	atomic_read
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	add	r0, r5, #4
	bl	atomic_dec
	mov	r0, r5
	bl	atomic_dec
	b	.L18
.L51:
	add	r8, r5, #8
	mov	r0, r8
	bl	atomic_read
	clz	r0, r0
	lsr	r0, r0, #5
	bl	BUG_ON
	add	r0, r5, #12
	bl	atomic_dec
	mov	r0, r8
	bl	atomic_dec
	b	.L17
.L5:
	ldr	r2, .L54+16
	ldr	r3, [sp]
	mov	r1, r7
	ldr	r0, [r2]
	str	r10, [r3]
	bl	test_and_clear_bit
	cmp	r0, #0
	beq	.L10
	add	r0, r5, #24
	bl	atomic_dec_and_test
	cmp	r0, #0
	beq	.L10
	b	.L20
.L55:
	.align	2
.L54:
	.word	R5_InJournal
	.word	STRIPE_R5C_CACHING
	.word	R5C_JOURNAL_MODE_WRITE_THROUGH
	.word	R5_Overlap
	.word	STRIPE_FULL_WRITE
	.word	MaxSector
	.word	STRIPE_R5C_PARTIAL_STRIPE
	.word	STRIPE_R5C_FULL_STRIPE
	.word	STRIPE_SYNC_REQUESTED
	.word	STRIPE_HANDLE
	.word	R5C_RADIX_COUNT_SHIFT
	.size	r5c_finish_stripe_write_out, .-r5c_finish_stripe_write_out
	.comm	STRIPE_SYNC_REQUESTED,4,4
	.comm	STRIPE_R5C_PARTIAL_STRIPE,4,4
	.comm	STRIPE_R5C_FULL_STRIPE,4,4
	.comm	STRIPE_R5C_CACHING,4,4
	.comm	STRIPE_HANDLE,4,4
	.comm	STRIPE_FULL_WRITE,4,4
	.comm	R5_Overlap,4,4
	.comm	R5_InJournal,4,4
	.comm	R5C_RADIX_COUNT_SHIFT,4,4
	.comm	R5C_JOURNAL_MODE_WRITE_THROUGH,4,4
	.comm	MaxSector,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
