	.file	"extr_mthca_provider.c_mthca_alloc_resize_buf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mthca_alloc_resize_buf, @function
mthca_alloc_resize_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	mov	rdi, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	spin_lock_irq@PLT
	cmp	QWORD PTR 8[rbp], 0
	je	.L2
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L3:
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	test	r12d, r12d
	je	.L5
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	mov	edi, 12
	call	kmalloc@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	QWORD PTR 8[rbp], rax
	neg	r12d
	test	rax, rax
	je	.L3
	mov	edx, DWORD PTR CQ_RESIZE_ALLOC[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rax], edx
	call	spin_unlock_irq@PLT
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, ebx
	mov	rdi, r13
	lea	rsi, 8[rax]
	call	mthca_alloc_cq_buf@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L10
	mov	rax, QWORD PTR 8[rbp]
	lea	edx, -1[rbx]
	mov	rdi, rbp
	mov	DWORD PTR [rax], edx
	call	spin_lock_irq@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR CQ_RESIZE_READY[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rax], edx
	call	spin_unlock_irq@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	call	spin_lock_irq@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	kfree@PLT
	mov	QWORD PTR 8[rbp], 0
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	mthca_alloc_resize_buf, .-mthca_alloc_resize_buf
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	EBUSY,4,4
	.comm	CQ_RESIZE_READY,4,4
	.comm	CQ_RESIZE_ALLOC,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_mthca_provider.c_mthca_alloc_resize_buf.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mthca_alloc_resize_buf, %function
mthca_alloc_resize_buf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	mov	r7, r0
	mov	r0, r1
	mov	r6, r2
	bl	spin_lock_irq
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L12
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L3:
	mov	r0, r4
	bl	spin_unlock_irq
	cmp	r5, #0
	beq	.L5
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L12+4
	mov	r0, #12
	ldr	r1, [r3]
	bl	kmalloc
	cmp	r0, #0
	mov	r3, r0
	str	r0, [r4, #4]
	beq	.L10
	ldr	r2, .L12+8
	mov	r0, r4
	ldr	r2, [r2]
	str	r2, [r3, #4]
	bl	spin_unlock_irq
.L5:
	ldr	r1, [r4, #4]
	mov	r0, r7
	mov	r2, r6
	add	r1, r1, #8
	bl	mthca_alloc_cq_buf
	subs	r5, r0, #0
	bne	.L11
	ldr	r3, [r4, #4]
	sub	r2, r6, #1
	str	r2, [r3]
	mov	r0, r4
	bl	spin_lock_irq
	ldr	r2, .L12+12
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	mov	r0, r4
	str	r2, [r3, #4]
	bl	spin_unlock_irq
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	mov	r0, r4
	bl	spin_lock_irq
	ldr	r0, [r4, #4]
	bl	kfree
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4, #4]
	bl	spin_unlock_irq
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r3, .L12+16
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L3
.L13:
	.align	2
.L12:
	.word	EBUSY
	.word	GFP_ATOMIC
	.word	CQ_RESIZE_ALLOC
	.word	CQ_RESIZE_READY
	.word	ENOMEM
	.size	mthca_alloc_resize_buf, .-mthca_alloc_resize_buf
	.comm	GFP_ATOMIC,4,4
	.comm	ENOMEM,4,4
	.comm	EBUSY,4,4
	.comm	CQ_RESIZE_READY,4,4
	.comm	CQ_RESIZE_ALLOC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
