	.file	"extr_nfs_bio.c_nfs_wait_bufs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nfs_wait_bufs
	.type	nfs_wait_bufs, @function
nfs_wait_bufs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	lea	rbx, 4[rbp]
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR nfs_buf_mutex[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r12, 4[rsp]
	call	lck_mtx_lock@PLT
	mov	edx, DWORD PTR NBI_CLEAN[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	nfs_buf_iterprepare@PLT
	test	eax, eax
	jne	.L3
.L2:
	mov	rdi, r12
	call	LIST_FIRST@PLT
	mov	r13, rax
	test	rax, rax
	je	.L27
	mov	esi, DWORD PTR nb_vnbufs[rip]
	mov	rdi, r13
	call	LIST_REMOVE@PLT
	mov	edx, DWORD PTR nb_vnbufs[rip]
	mov	rdi, rbx
	mov	rsi, r13
	call	LIST_INSERT_HEAD@PLT
	mov	rdi, r13
	call	nfs_buf_refget@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	DWORD PTR EAGAIN[rip], eax
	jne	.L28
.L4:
	xor	ecx, ecx
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r13
	call	nfs_buf_acquire@PLT
	test	eax, eax
	jne	.L6
	mov	rdi, r13
	call	nfs_buf_refrele@PLT
	mov	rdi, r13
	call	nfs_buf_drop@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, r13
	call	nfs_buf_refrele@PLT
	mov	edx, DWORD PTR NBI_CLEAN[rip]
.L24:
	mov	rsi, r12
	mov	rdi, rbp
	call	nfs_buf_itercomplete@PLT
.L9:
	mov	edi, DWORD PTR nfs_buf_mutex[rip]
	call	lck_mtx_unlock@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L27:
	.cfi_restore_state
	mov	edx, DWORD PTR NBI_CLEAN[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	nfs_buf_itercomplete@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR NBI_DIRTY[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	nfs_buf_iterprepare@PLT
	test	eax, eax
	jne	.L9
.L8:
	mov	rdi, r12
	call	LIST_FIRST@PLT
	mov	r13, rax
	test	rax, rax
	je	.L25
	mov	esi, DWORD PTR nb_vnbufs[rip]
	mov	rdi, r13
	call	LIST_REMOVE@PLT
	mov	edx, DWORD PTR nb_vnbufs[rip]
	mov	rdi, rbp
	mov	rsi, r13
	call	LIST_INSERT_HEAD@PLT
	mov	rdi, r13
	call	nfs_buf_refget@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L11:
	cmp	DWORD PTR EAGAIN[rip], eax
	jne	.L30
.L10:
	xor	ecx, ecx
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r13
	call	nfs_buf_acquire@PLT
	test	eax, eax
	jne	.L11
	mov	rdi, r13
	call	nfs_buf_refrele@PLT
	mov	rdi, r13
	call	nfs_buf_drop@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, r13
	call	nfs_buf_refrele@PLT
.L25:
	mov	edx, DWORD PTR NBI_DIRTY[rip]
	jmp	.L24
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nfs_wait_bufs, .-nfs_wait_bufs
	.comm	nfs_buf_mutex,4,4
	.comm	nb_vnbufs,4,4
	.comm	NBI_DIRTY,4,4
	.comm	NBI_CLEAN,4,4
	.comm	EAGAIN,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_nfs_bio.c_nfs_wait_bufs.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	nfs_wait_bufs
	.syntax unified
	.arm
	.fpu softvfp
	.type	nfs_wait_bufs, %function
nfs_wait_bufs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r6, r0
	ldr	r7, .L25
	ldr	r3, .L25+4
	ldr	r9, .L25+8
	sub	sp, sp, #12
	ldr	r0, [r7]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	lck_mtx_lock
	mov	r0, r6
	mov	r1, sp
	ldr	r2, [r9]
	bl	nfs_buf_iterprepare
	cmp	r0, #0
	bne	.L3
	ldr	r8, .L25+12
	ldr	r5, .L25+16
.L2:
	mov	r0, sp
	bl	LIST_FIRST
	subs	r4, r0, #0
	beq	.L23
	ldr	r1, [r8]
	bl	LIST_REMOVE
	mov	r1, r4
	ldr	r2, [r8]
	add	r0, r6, #4
	bl	LIST_INSERT_HEAD
	mov	r0, r4
	bl	nfs_buf_refget
	b	.L4
.L6:
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L21
.L4:
	mov	r3, #0
	mov	r0, r4
	mov	r2, r3
	mov	r1, r3
	bl	nfs_buf_acquire
	cmp	r0, #0
	bne	.L6
	mov	r0, r4
	bl	nfs_buf_refrele
	mov	r0, r4
	bl	nfs_buf_drop
	b	.L2
.L21:
	mov	r0, r4
	bl	nfs_buf_refrele
.L20:
	mov	r1, sp
	mov	r0, r6
	ldr	r2, [r9]
	bl	nfs_buf_itercomplete
.L9:
	ldr	r0, [r7]
	bl	lck_mtx_unlock
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L23:
	mov	r1, sp
	mov	r0, r6
	ldr	r2, [r9]
	bl	nfs_buf_itercomplete
.L3:
	ldr	r9, .L25+20
	mov	r1, sp
	mov	r0, r6
	ldr	r2, [r9]
	bl	nfs_buf_iterprepare
	cmp	r0, #0
	bne	.L9
	ldr	r8, .L25+12
	ldr	r5, .L25+16
.L8:
	mov	r0, sp
	bl	LIST_FIRST
	subs	r4, r0, #0
	beq	.L20
	ldr	r1, [r8]
	bl	LIST_REMOVE
	mov	r1, r4
	mov	r0, r6
	ldr	r2, [r8]
	bl	LIST_INSERT_HEAD
	mov	r0, r4
	bl	nfs_buf_refget
	b	.L10
.L11:
	ldr	r3, [r5]
	cmp	r3, r0
	bne	.L21
.L10:
	mov	r3, #0
	mov	r0, r4
	mov	r2, r3
	mov	r1, r3
	bl	nfs_buf_acquire
	cmp	r0, #0
	bne	.L11
	mov	r0, r4
	bl	nfs_buf_refrele
	mov	r0, r4
	bl	nfs_buf_drop
	b	.L8
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	nfs_buf_mutex
	.word	.LC0
	.word	NBI_CLEAN
	.word	nb_vnbufs
	.word	EAGAIN
	.word	NBI_DIRTY
	.size	nfs_wait_bufs, .-nfs_wait_bufs
	.comm	nfs_buf_mutex,4,4
	.comm	nb_vnbufs,4,4
	.comm	NBI_DIRTY,4,4
	.comm	NBI_CLEAN,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
