	.file	"extr_raid1.c_sync_request_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sync_request_write, @function
sync_request_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rax, 12[rsi]
	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
	mov	rbp, rsi
	mov	rsi, rax
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r15, QWORD PTR 8[rdi]
	mov	QWORD PTR 16[rsp], rdi
	mov	edi, DWORD PTR R1BIO_Uptodate[rip]
	mov	QWORD PTR 24[rsp], rax
	mov	ebx, DWORD PTR [r15]
	call	test_bit@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, rbp
	call	fix_sync_read_error@PLT
	test	eax, eax
	je	.L1
.L5:
	mov	rsi, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR MD_RECOVERY_REQUESTED[rip]
	call	test_bit@PLT
	test	rax, rax
	jne	.L3
.L4:
	lea	r14, 16[rbp]
	add	ebx, ebx
	mov	esi, 1
	xor	r12d, r12d
	mov	rdi, r14
	call	atomic_set@PLT
	lea	eax, -1[rbx]
	mov	QWORD PTR 8[rsp], rax
	test	ebx, ebx
	jg	.L15
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR WRITE[rip]
	mov	rdi, r14
	mov	DWORD PTR 8[r13], eax
	mov	rax, QWORD PTR end_sync_write[rip]
	mov	QWORD PTR 0[r13], rax
	call	atomic_inc@PLT
	mov	rdi, r13
	call	bio_sectors@PLT
	mov	esi, eax
	mov	rax, QWORD PTR 8[r15]
	mov	rax, QWORD PTR [rax+rbx]
	mov	edi, DWORD PTR [rax]
	call	md_sync_acct@PLT
	mov	rdi, r13
	call	generic_make_request@PLT
.L11:
	lea	rax, 1[r12]
	cmp	r12, QWORD PTR 8[rsp]
	je	.L8
.L18:
	mov	r12, rax
.L15:
	mov	rax, QWORD PTR 24[rbp]
	lea	rbx, 0[0+r12*8]
	mov	r13, QWORD PTR [rax+r12*8]
	mov	rax, QWORD PTR 0[r13]
	test	rax, rax
	je	.L11
	cmp	rax, QWORD PTR end_sync_read[rip]
	jne	.L14
	cmp	QWORD PTR 0[rbp], r12
	je	.L11
	mov	rsi, QWORD PTR 16[rsp]
	mov	edi, DWORD PTR MD_RECOVERY_SYNC[rip]
	call	test_bit@PLT
	test	rax, rax
	jne	.L14
	lea	rax, 1[r12]
	cmp	r12, QWORD PTR 8[rsp]
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, r14
	call	atomic_dec_and_test@PLT
	test	rax, rax
	jne	.L28
.L1:
	add	rsp, 40
	.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
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	call	process_checks@PLT
	test	rax, rax
	jns	.L4
	add	rsp, 40
	.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
.L28:
	.cfi_restore_state
	mov	rsi, QWORD PTR 24[rsp]
	mov	edi, DWORD PTR R1BIO_MadeGood[rip]
	mov	r12d, DWORD PTR 8[rbp]
	call	test_bit@PLT
	test	rax, rax
	je	.L16
.L17:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	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	reschedule_retry@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rsi, QWORD PTR 24[rsp]
	mov	edi, DWORD PTR R1BIO_WriteError[rip]
	call	test_bit@PLT
	test	rax, rax
	jne	.L17
	mov	rdi, rbp
	call	put_buf@PLT
	mov	rdi, QWORD PTR 16[rsp]
	add	rsp, 40
	.cfi_def_cfa_offset 56
	mov	esi, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	edx, 1
	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
	.cfi_endproc
.LFE0:
	.size	sync_request_write, .-sync_request_write
	.comm	end_sync_write,8,8
	.comm	end_sync_read,8,8
	.comm	WRITE,4,4
	.comm	R1BIO_WriteError,4,4
	.comm	R1BIO_Uptodate,4,4
	.comm	R1BIO_MadeGood,4,4
	.comm	MD_RECOVERY_SYNC,4,4
	.comm	MD_RECOVERY_REQUESTED,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_raid1.c_sync_request_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sync_request_write, %function
sync_request_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L28
	ldr	r9, [r0, #4]
	sub	sp, sp, #20
	add	r3, r1, #8
	str	r0, [sp, #8]
	mov	r10, r1
	ldr	r0, [r2]
	mov	r1, r3
	ldr	r7, [r9]
	str	r3, [sp, #12]
	bl	test_bit
	cmp	r0, #0
	bne	.L5
	mov	r0, r10
	bl	fix_sync_read_error
	cmp	r0, #0
	beq	.L1
.L5:
	ldr	r2, .L28+4
	ldr	r1, [sp, #8]
	ldr	r0, [r2]
	bl	test_bit
	cmp	r0, #0
	bne	.L3
.L4:
	lsl	r3, r7, #1
	mov	r4, r3
	add	r8, r10, #12
	mov	r0, r8
	mov	r1, #1
	str	r3, [sp, #4]
	bl	atomic_set
	cmp	r4, #0
	ble	.L8
	mov	r4, #0
	ldr	r7, .L28+8
	ldr	fp, .L28+12
	b	.L7
.L14:
	ldr	r3, .L28+16
	ldr	r0, [fp]
	ldr	r1, [r3]
	str	r0, [r6, #4]
	str	r1, [r6]
	mov	r0, r8
	bl	atomic_inc
	ldr	r1, [r9, #4]
	mov	r0, r6
	ldr	r1, [r1, r5]
	ldr	r5, [r1]
	bl	bio_sectors
	mov	r1, r0
	mov	r0, r5
	bl	md_sync_acct
	mov	r0, r6
	bl	generic_make_request
.L11:
	ldr	r3, [sp, #4]
	add	r4, r4, #1
	cmp	r3, r4
	beq	.L8
.L7:
	ldr	r3, [r10, #16]
	lsl	r5, r4, #2
	ldr	r6, [r3, r4, lsl #2]
	ldr	r1, [r6]
	cmp	r1, #0
	beq	.L11
	ldr	r0, [r7]
	cmp	r1, r0
	bne	.L14
	ldr	r1, [r10]
	cmp	r1, r4
	beq	.L11
	ldr	r3, .L28+20
	ldr	r1, [sp, #8]
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	bne	.L14
	ldr	r3, [sp, #4]
	add	r4, r4, #1
	cmp	r3, r4
	bne	.L7
.L8:
	mov	r0, r8
	bl	atomic_dec_and_test
	cmp	r0, #0
	bne	.L27
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r0, r10
	bl	process_checks
	cmp	r0, #0
	bge	.L4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r2, .L28+24
	ldr	r1, [sp, #12]
	ldr	r0, [r2]
	ldr	r4, [r10, #4]
	bl	test_bit
	cmp	r0, #0
	beq	.L15
.L16:
	mov	r0, r10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	reschedule_retry
.L15:
	ldr	r2, .L28+28
	ldr	r1, [sp, #12]
	ldr	r0, [r2]
	bl	test_bit
	cmp	r0, #0
	bne	.L16
	mov	r0, r10
	bl	put_buf
	mov	r1, r4
	mov	r2, #1
	ldr	r0, [sp, #8]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	md_done_sync
.L29:
	.align	2
.L28:
	.word	R1BIO_Uptodate
	.word	MD_RECOVERY_REQUESTED
	.word	end_sync_read
	.word	WRITE
	.word	end_sync_write
	.word	MD_RECOVERY_SYNC
	.word	R1BIO_MadeGood
	.word	R1BIO_WriteError
	.size	sync_request_write, .-sync_request_write
	.comm	end_sync_write,4,4
	.comm	end_sync_read,4,4
	.comm	WRITE,4,4
	.comm	R1BIO_WriteError,4,4
	.comm	R1BIO_Uptodate,4,4
	.comm	R1BIO_MadeGood,4,4
	.comm	MD_RECOVERY_SYNC,4,4
	.comm	MD_RECOVERY_REQUESTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
