	.file	"extr_transport.c_wait_for_free_credits.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"wait timed out after %d ms\n"
	.text
	.p2align 4
	.type	wait_for_free_credits, @function
wait_for_free_credits:
.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
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	DWORD PTR 24[rsp], edx
	mov	QWORD PTR 16[rsp], r8
	test	edx, edx
	jns	.L2
	mov	rax, QWORD PTR MAX_JIFFY_OFFSET[rip]
	mov	QWORD PTR 8[rsp], rax
.L3:
	mov	rax, QWORD PTR 16[rsp]
	mov	r14d, DWORD PTR CIFS_OP_MASK[rip]
	mov	rdi, rbx
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR 40[rbx]
	and	r14d, r13d
	mov	esi, r14d
	call	[QWORD PTR [rax]]
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jg	.L4
	cmp	DWORD PTR CIFS_ECHO_OP[rip], r14d
	je	.L33
.L4:
	lea	r15, 24[rbx]
	mov	rdi, r15
	call	spin_lock@PLT
	and	r13d, DWORD PTR CIFS_TIMEOUT_MASK[rip]
	cmp	r13d, DWORD PTR CIFS_NON_BLOCKING[rip]
	mov	DWORD PTR 28[rsp], r13d
	je	.L34
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, r12d
	jl	.L35
.L8:
	mov	rcx, QWORD PTR CifsExiting[rip]
	cmp	QWORD PTR 16[rbx], rcx
	je	.L36
	test	r14d, r14d
	jne	.L12
	cmp	r12d, 1
	jne	.L12
	mov	edx, DWORD PTR MAX_COMPOUND[rip]
	lea	ecx, [rdx+rdx]
	cmp	DWORD PTR [rbx], ecx
	jle	.L12
	cmp	eax, edx
	jg	.L12
	mov	rdi, r15
	call	spin_unlock@PLT
	mov	rdi, rbx
	call	cifs_num_waiters_inc@PLT
	mov	eax, DWORD PTR MAX_COMPOUND[rip]
	mov	rsi, rbp
	mov	rdi, rbx
	lea	edx, 1[rax]
	call	has_credits@PLT
	mov	edi, DWORD PTR 36[rbx]
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, eax
	call	wait_event_killable_timeout@PLT
	mov	rdi, rbx
	mov	r13d, eax
	call	cifs_num_waiters_dec@PLT
	test	r13d, r13d
	je	.L37
	mov	eax, r13d
	add	eax, DWORD PTR ERESTARTSYS[rip]
	je	.L1
.L30:
	mov	rdi, r15
	call	spin_lock@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, r12d
	jge	.L8
.L35:
	mov	rdi, r15
	call	spin_unlock@PLT
	mov	rdi, rbx
	call	cifs_num_waiters_inc@PLT
	mov	edx, r12d
	mov	rsi, rbp
	mov	rdi, rbx
	call	has_credits@PLT
	mov	edi, DWORD PTR 36[rbx]
	mov	rdx, QWORD PTR 8[rsp]
	mov	esi, eax
	call	wait_event_killable_timeout@PLT
	mov	rdi, rbx
	mov	r13d, eax
	call	cifs_num_waiters_dec@PLT
	test	r13d, r13d
	je	.L38
	mov	eax, r13d
	add	eax, DWORD PTR ERESTARTSYS[rip]
	jne	.L30
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rsp]
	call	msecs_to_jiffies@PLT
	mov	QWORD PTR 8[rsp], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L33:
	mov	r13d, DWORD PTR EAGAIN[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	eax, DWORD PTR [rbx]
	add	eax, 1
	mov	DWORD PTR [rbx], eax
	cmp	eax, DWORD PTR 4[rbx]
	jle	.L7
	mov	DWORD PTR 4[rbx], eax
.L7:
	sub	DWORD PTR 0[rbp], 1
.L15:
	mov	eax, DWORD PTR 8[rbx]
	mov	rcx, QWORD PTR 16[rsp]
	mov	DWORD PTR [rcx], eax
.L14:
	mov	rdi, r15
	xor	r13d, r13d
	call	spin_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	ecx, DWORD PTR 28[rsp]
	cmp	ecx, DWORD PTR CIFS_BLOCKING_OP[rip]
	je	.L14
	sub	eax, r12d
	mov	DWORD PTR 0[rbp], eax
	add	r12d, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], r12d
	cmp	r12d, DWORD PTR 4[rbx]
	jle	.L15
	mov	DWORD PTR 4[rbx], r12d
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rdi, r15
	call	spin_unlock@PLT
	mov	r13d, DWORD PTR ENOENT[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 32[rbx]
	mov	edx, 1
.L31:
	call	trace_smb3_credit_timeout@PLT
	mov	edx, DWORD PTR 24[rsp]
	mov	edi, DWORD PTR VFS[rip]
	lea	rsi, .LC0[rip]
	call	cifs_server_dbg@PLT
	mov	r13d, DWORD PTR ENOTSUPP[rip]
	neg	r13d
	jmp	.L1
.L38:
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 32[rbx]
	mov	edx, r12d
	jmp	.L31
	.cfi_endproc
.LFE0:
	.size	wait_for_free_credits, .-wait_for_free_credits
	.comm	VFS,4,4
	.comm	MAX_JIFFY_OFFSET,8,8
	.comm	MAX_COMPOUND,4,4
	.comm	ERESTARTSYS,4,4
	.comm	ENOTSUPP,4,4
	.comm	ENOENT,4,4
	.comm	EAGAIN,4,4
	.comm	CifsExiting,8,8
	.comm	CIFS_TIMEOUT_MASK,4,4
	.comm	CIFS_OP_MASK,4,4
	.comm	CIFS_NON_BLOCKING,4,4
	.comm	CIFS_ECHO_OP,4,4
	.comm	CIFS_BLOCKING_OP,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_transport.c_wait_for_free_credits.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wait timed out after %d ms\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_for_free_credits, %function
wait_for_free_credits:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	cmp	r2, #0
	sub	sp, sp, #20
	mov	r4, r0
	mov	r6, r1
	mov	r10, r3
	str	r2, [sp, #8]
	bge	.L2
	ldr	r3, .L35
	ldr	r9, [r3]
.L3:
	mov	r2, #0
	ldr	r1, .L35+4
	ldr	r3, [r4, #32]
	ldr	r7, [r1]
	ldr	r1, [sp, #56]
	and	r7, r7, r10
	ldr	r3, [r3]
	str	r2, [r1]
	mov	r0, r4
	mov	r1, r7
	blx	r3
	ldr	r3, [r0]
	mov	r5, r0
	cmp	r3, #0
	bgt	.L4
	ldr	r3, .L35+8
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L30
.L4:
	add	r8, r4, #16
	mov	r0, r8
	bl	spin_lock
	ldr	r3, .L35+12
	ldr	r2, .L35+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	and	r3, r10, r3
	cmp	r3, r2
	str	r3, [sp, #12]
	beq	.L23
	ldr	r10, .L35+20
	ldr	fp, .L35+24
	str	r7, [sp, #4]
.L6:
	ldr	r2, [r5]
	cmp	r2, r6
	blt	.L31
	ldr	r3, .L35+28
	ldr	r0, [r4, #12]
	ldr	r1, [r3]
	cmp	r0, r1
	beq	.L32
	ldr	r3, [sp, #4]
	cmp	r3, #0
	cmpeq	r6, #1
	bne	.L12
	ldr	r1, [r10]
	ldr	r0, [r4]
	lsl	ip, r1, #1
	cmp	r2, r1
	cmple	ip, r0
	bge	.L12
	mov	r0, r8
	bl	spin_unlock
	mov	r0, r4
	bl	cifs_num_waiters_inc
	ldr	r2, [r10]
	mov	r1, r5
	add	r2, r2, #1
	mov	r0, r4
	ldr	r7, [r4, #28]
	bl	has_credits
	mov	r2, r9
	mov	r1, r0
	mov	r0, r7
	bl	wait_event_killable_timeout
	mov	r7, r0
	mov	r0, r4
	bl	cifs_num_waiters_dec
	cmp	r7, #0
	beq	.L33
	ldr	r2, [fp]
	cmn	r7, r2
	bne	.L27
.L25:
	mov	r3, r7
.L1:
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	mov	r0, r8
	bl	spin_unlock
	mov	r0, r4
	bl	cifs_num_waiters_inc
	mov	r2, r6
	mov	r1, r5
	mov	r0, r4
	ldr	r7, [r4, #28]
	bl	has_credits
	mov	r2, r9
	mov	r1, r0
	mov	r0, r7
	bl	wait_event_killable_timeout
	mov	r7, r0
	mov	r0, r4
	bl	cifs_num_waiters_dec
	cmp	r7, #0
	beq	.L34
	ldr	r2, [fp]
	cmn	r7, r2
	beq	.L25
.L27:
	mov	r0, r8
	bl	spin_lock
	b	.L6
.L2:
	ldr	r0, [sp, #8]
	bl	msecs_to_jiffies
	mov	r9, r0
	b	.L3
.L30:
	ldr	r3, .L35+32
	ldr	r3, [r3]
	rsb	r3, r3, #0
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	ldr	r3, [r4]
	ldr	r2, [r4, #4]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r4]
	strgt	r3, [r4, #4]
	ldr	r3, [r5]
	mov	r0, r8
	sub	r3, r3, #1
	str	r3, [r5]
	mov	r3, #0
	ldr	r2, [r4, #8]
	str	r3, [sp, #4]
	ldr	r3, [sp, #56]
	str	r2, [r3]
	bl	spin_unlock
	ldr	r3, [sp, #4]
	mov	r0, r3
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r3, r2
	ldr	r2, .L35+36
	ldr	r1, [sp, #12]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L14
	sub	r3, r3, r6
	str	r3, [r5]
	ldm	r4, {r2, r3}
	add	r6, r6, r2
	cmp	r6, r3
	ldr	r2, [sp, #56]
	ldr	r3, [r4, #8]
	str	r6, [r4]
	strgt	r6, [r4, #4]
	str	r3, [r2]
.L14:
	mov	r0, r8
	bl	spin_unlock
	mov	r3, #0
	b	.L1
.L32:
	mov	r0, r8
	bl	spin_unlock
	ldr	r3, .L35+40
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L33:
	mov	r2, #1
.L28:
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #24]
	bl	trace_smb3_credit_timeout
	ldr	r3, .L35+44
	ldr	r2, [sp, #8]
	ldr	r0, [r3]
	ldr	r1, .L35+48
	bl	cifs_server_dbg
	ldr	r3, .L35+52
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L1
.L34:
	mov	r2, r6
	b	.L28
.L36:
	.align	2
.L35:
	.word	MAX_JIFFY_OFFSET
	.word	CIFS_OP_MASK
	.word	CIFS_ECHO_OP
	.word	CIFS_TIMEOUT_MASK
	.word	CIFS_NON_BLOCKING
	.word	MAX_COMPOUND
	.word	ERESTARTSYS
	.word	CifsExiting
	.word	EAGAIN
	.word	CIFS_BLOCKING_OP
	.word	ENOENT
	.word	VFS
	.word	.LC0
	.word	ENOTSUPP
	.size	wait_for_free_credits, .-wait_for_free_credits
	.comm	VFS,4,4
	.comm	MAX_JIFFY_OFFSET,4,4
	.comm	MAX_COMPOUND,4,4
	.comm	ERESTARTSYS,4,4
	.comm	ENOTSUPP,4,4
	.comm	ENOENT,4,4
	.comm	EAGAIN,4,4
	.comm	CifsExiting,4,4
	.comm	CIFS_TIMEOUT_MASK,4,4
	.comm	CIFS_OP_MASK,4,4
	.comm	CIFS_NON_BLOCKING,4,4
	.comm	CIFS_ECHO_OP,4,4
	.comm	CIFS_BLOCKING_OP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
