	.file	"extr_cmd.c_mlx4_comm_cmd_wait.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"communication channel command 0x%x timed out\n"
	.align 8
.LC1:
	.string	"command 0x%x failed: fw status = 0x%x\n"
	.text
	.p2align 4
	.type	mlx4_comm_cmd_wait, @function
mlx4_comm_cmd_wait:
.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	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 8[rsp], esi
	mov	DWORD PTR 12[rsp], edx
	call	mlx4_priv@PLT
	mov	r12, rax
	lea	r15, 8[rax]
	mov	rdi, r15
	lea	r14, 12[r12]
	call	down@PLT
	mov	rdi, r14
	call	spin_lock@PLT
	xor	edi, edi
	call	BUG_ON@PLT
	mov	rbx, QWORD PTR [r12]
	mov	eax, DWORD PTR 24[r12]
	mov	rdi, r14
	sal	rbx, 5
	add	rbx, QWORD PTR 16[r12]
	add	eax, 1
	add	DWORD PTR 28[rbx], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [r12], rax
	call	spin_unlock@PLT
	lea	r8, 24[rbx]
	mov	rdi, r8
	mov	QWORD PTR [rsp], r8
	call	init_completion@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	edx, DWORD PTR 12[rsp]
	mov	rdi, rbp
	call	mlx4_comm_cmd_post@PLT
	mov	rdi, r13
	call	msecs_to_jiffies@PLT
	mov	r8, QWORD PTR [rsp]
	mov	rsi, rax
	mov	rdi, r8
	call	wait_for_completion_timeout@PLT
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR [rsp], eax
	test	eax, eax
	jne	.L15
.L3:
	mov	rdi, r13
	call	msecs_to_jiffies@PLT
	add	rax, QWORD PTR jiffies[rip]
	mov	r13, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, QWORD PTR jiffies[rip]
	mov	rsi, r13
	call	time_before@PLT
	test	rax, rax
	je	.L7
	xor	eax, eax
	call	cond_resched@PLT
.L4:
	mov	rdi, rbp
	call	comm_pending@PLT
	test	rax, rax
	jne	.L16
.L7:
	mov	rdi, r14
	call	spin_lock@PLT
	mov	rax, QWORD PTR [r12]
	mov	rdi, r14
	mov	QWORD PTR [rbx], rax
	sub	rbx, QWORD PTR 16[r12]
	sar	rbx, 5
	mov	QWORD PTR [r12], rbx
	call	spin_unlock@PLT
	mov	rdi, r15
	call	up@PLT
	mov	eax, DWORD PTR [rsp]
	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
.L15:
	.cfi_restore_state
	mov	rcx, QWORD PTR 16[rbx]
	cmp	rcx, QWORD PTR CMD_STAT_MULTI_FUNC_REQ[rip]
	je	.L3
	mov	edx, DWORD PTR 8[rsp]
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	mlx4_err@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, DWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	mlx4_warn@PLT
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
	mov	DWORD PTR [rsp], eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	mlx4_comm_cmd_wait, .-mlx4_comm_cmd_wait
	.comm	jiffies,8,8
	.comm	EBUSY,4,4
	.comm	CMD_STAT_MULTI_FUNC_REQ,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_cmd.c_mlx4_comm_cmd_wait.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"communication channel command 0x%x timed out\012\000"
	.align	2
.LC1:
	.ascii	"command 0x%x failed: fw status = 0x%x\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_comm_cmd_wait, %function
mlx4_comm_cmd_wait:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r7, r1
	mov	r6, r3
	str	r2, [sp, #12]
	mov	r4, r0
	bl	mlx4_priv
	mov	r5, r0
	add	fp, r0, #4
	add	r9, r5, #8
	mov	r0, fp
	bl	down
	mov	r0, r9
	bl	spin_lock
	mov	r0, #0
	bl	BUG_ON
	ldr	r3, [r5]
	ldr	r2, [r5, #12]
	add	r3, r3, r3, lsl #2
	add	r8, r2, r3, lsl #2
	ldr	r1, [r5, #16]
	lsl	r0, r3, #2
	ldr	r3, [r8, #16]
	ldr	ip, [r2, r0]
	add	r1, r1, #1
	add	r3, r3, r1
	str	r3, [r8, #16]
	str	r0, [sp, #4]
	str	ip, [r5]
	add	r10, r8, #12
	mov	r0, r9
	str	r2, [sp, #8]
	bl	spin_unlock
	mov	r0, r10
	bl	init_completion
	mov	r1, r7
	ldr	r2, [sp, #12]
	mov	r0, r4
	bl	mlx4_comm_cmd_post
	mov	r0, r6
	bl	msecs_to_jiffies
	mov	r1, r0
	mov	r0, r10
	bl	wait_for_completion_timeout
	cmp	r0, #0
	beq	.L14
	ldr	r10, [r8, #4]
	cmp	r10, #0
	bne	.L15
.L3:
	mov	r0, r6
	bl	msecs_to_jiffies
	ldr	r7, .L17
	ldr	r3, [r7]
	add	r6, r0, r3
	b	.L4
.L16:
	mov	r1, r6
	ldr	r0, [r7]
	bl	time_before
	cmp	r0, #0
	beq	.L7
	bl	cond_resched
.L4:
	mov	r0, r4
	bl	comm_pending
	cmp	r0, #0
	bne	.L16
.L7:
	mov	r0, r9
	bl	spin_lock
	ldr	r3, [r5, #12]
	ldr	r2, [r5]
	sub	r8, r8, r3
	asr	r8, r8, #2
	add	r3, r8, r8, lsl #1
	add	r3, r3, r3, lsl #4
	add	r3, r3, r3, lsl #8
	ldr	r1, [sp, #8]
	ldr	ip, [sp, #4]
	add	r3, r3, r3, lsl #16
	add	r3, r8, r3, lsl #2
	str	r2, [r1, ip]
	mov	r0, r9
	str	r3, [r5]
	bl	spin_unlock
	mov	r0, fp
	bl	up
	mov	r0, r10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r2, .L17+4
	ldr	r3, [r8, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L3
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L17+8
	bl	mlx4_err
	b	.L3
.L14:
	mov	r2, r7
	mov	r0, r4
	ldr	r1, .L17+12
	bl	mlx4_warn
	ldr	r3, .L17+16
	ldr	r10, [r3]
	rsb	r10, r10, #0
	b	.L3
.L18:
	.align	2
.L17:
	.word	jiffies
	.word	CMD_STAT_MULTI_FUNC_REQ
	.word	.LC1
	.word	.LC0
	.word	EBUSY
	.size	mlx4_comm_cmd_wait, .-mlx4_comm_cmd_wait
	.comm	jiffies,4,4
	.comm	EBUSY,4,4
	.comm	CMD_STAT_MULTI_FUNC_REQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
