	.file	"extr_segment.c___wait_one_discard_bio.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__wait_one_discard_bio, @function
__wait_one_discard_bio:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, 0
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	SM_I@PLT
	lea	rdi, 20[rbp]
	mov	r13, QWORD PTR [rax]
	call	wait_for_completion_io@PLT
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	rax, QWORD PTR D_DONE[rip]
	xor	esi, esi
	cmp	QWORD PTR 0[rbp], rax
	setne	sil
	mov	rdi, r12
	call	f2fs_bug_on@PLT
	sub	DWORD PTR 16[rbp], 1
	jne	.L2
	mov	eax, DWORD PTR 12[rbp]
	test	eax, eax
	je	.L8
.L3:
	mov	rsi, rbp
	mov	rdi, r12
	call	__remove_discard_cmd@PLT
.L2:
	mov	rdi, r13
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r14d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	r14d, DWORD PTR 8[rbp]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	__wait_one_discard_bio, .-__wait_one_discard_bio
	.comm	D_DONE,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_segment.c___wait_one_discard_bio.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__wait_one_discard_bio, %function
__wait_one_discard_bio:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r6, r0
	bl	SM_I
	mov	r3, r0
	ldr	r7, [r3]
	add	r0, r4, #16
	bl	wait_for_completion_io
	mov	r0, r7
	bl	mutex_lock
	ldr	r3, .L8
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r0, r6
	subs	r1, r1, r3
	movne	r1, #1
	bl	f2fs_bug_on
	ldr	r3, [r4, #12]
	sub	r3, r3, #1
	cmp	r3, #0
	movne	r5, #0
	str	r3, [r4, #12]
	bne	.L2
	ldr	r2, [r4, #8]
	mov	r1, r4
	cmp	r2, #0
	mov	r0, r6
	movne	r5, r3
	ldreq	r5, [r4, #4]
	bl	__remove_discard_cmd
.L2:
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	D_DONE
	.size	__wait_one_discard_bio, .-__wait_one_discard_bio
	.comm	D_DONE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
