	.file	"extr_mthca_provider.c_mthca_create_srq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mthca_create_srq, @function
mthca_create_srq:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR IB_SRQT_BASIC[rip]
	cmp	QWORD PTR [rsi], rax
	je	.L2
	mov	edi, DWORD PTR ENOSYS[rip]
	neg	edi
	call	ERR_PTR@PLT
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.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
.L2:
	.cfi_restore_state
	mov	rbx, rsi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	r13, rdi
	mov	r15, rdx
	mov	edi, 16
	call	kmalloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L19
	mov	r12, QWORD PTR 8[r13]
	test	r12, r12
	je	.L5
	mov	edi, DWORD PTR [r12]
	call	to_mucontext@PLT
	lea	rdi, 28[rsp]
	mov	edx, 12
	mov	rsi, r15
	mov	r12, rax
	call	ib_copy_from_udata@PLT
	test	rax, rax
	je	.L6
.L16:
	mov	r14d, DWORD PTR EFAULT[rip]
	neg	r14d
.L7:
	mov	rdi, rbp
	call	kfree@PLT
	mov	edi, r14d
	call	ERR_PTR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8d, DWORD PTR 36[rsp]
	mov	ecx, DWORD PTR 28[rsp]
	mov	edi, DWORD PTR 0[r13]
	mov	r14d, DWORD PTR [r12]
	mov	DWORD PTR 12[rsp], r8d
	mov	DWORD PTR 8[rsp], ecx
	call	to_mdev@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 8[rsp]
	mov	edx, r14d
	mov	edi, eax
	lea	rsi, 4[r12]
	call	mthca_map_user_db@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR 28[rsp]
	mov	rdi, r13
	mov	QWORD PTR 8[rbp], rax
	call	to_mpd@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	r14d, eax
	call	to_mdev@PLT
	mov	esi, r14d
	lea	rdx, 8[rbx]
	mov	rcx, rbp
	mov	edi, eax
	call	mthca_alloc_srq@PLT
	mov	r14d, eax
	test	eax, eax
	je	.L8
.L10:
	cmp	QWORD PTR 8[r13], 0
	je	.L7
	mov	edi, DWORD PTR 0[r13]
	mov	ebx, DWORD PTR 28[rsp]
	mov	r15d, DWORD PTR [r12]
	call	to_mdev@PLT
	lea	rsi, 4[r12]
	mov	ecx, ebx
	mov	edi, eax
	mov	edx, r15d
	call	mthca_unmap_user_db@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r13
	call	to_mpd@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	r14d, eax
	call	to_mdev@PLT
	mov	esi, r14d
	lea	rdx, 8[rbx]
	mov	rcx, rbp
	mov	edi, eax
	call	mthca_alloc_srq@PLT
	mov	r14d, eax
	test	eax, eax
	jne	.L10
.L9:
	mov	rax, rbp
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, 4[rbp]
	mov	edx, 4
	mov	rdi, r15
	call	ib_copy_to_udata@PLT
	test	rax, rax
	je	.L9
	mov	edi, DWORD PTR 0[r13]
	call	to_mdev@PLT
	mov	rsi, rbp
	mov	edi, eax
	call	mthca_free_srq@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR ENOMEM[rip]
	neg	edi
	call	ERR_PTR@PLT
	jmp	.L1
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mthca_create_srq, .-mthca_create_srq
	.comm	IB_SRQT_BASIC,8,8
	.comm	GFP_KERNEL,4,4
	.comm	ENOSYS,4,4
	.comm	ENOMEM,4,4
	.comm	EFAULT,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_create_srq.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mthca_create_srq, %function
mthca_create_srq:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L23
	mov	r6, r1
	ldr	r3, [r3]
	ldr	r1, [r1]
	sub	sp, sp, #28
	cmp	r1, r3
	ldr	r3, .L23+4
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	beq	.L2
	ldr	r3, .L23+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
.L1:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, .L23+12
	mov	r5, r0
	ldr	r1, [r3]
	mov	r0, #16
	mov	r9, r2
	bl	kmalloc
	subs	r4, r0, #0
	beq	.L22
	ldr	r8, [r5, #4]
	cmp	r8, #0
	beq	.L5
	ldr	r0, [r8]
	bl	to_mucontext
	mov	r2, #12
	mov	r8, r0
	mov	r1, r9
	add	r0, sp, #8
	bl	ib_copy_from_udata
	cmp	r0, #0
	beq	.L6
.L19:
	ldr	r3, .L23+16
	ldr	r7, [r3]
	rsb	r7, r7, #0
.L7:
	mov	r0, r4
	bl	kfree
	mov	r0, r7
	bl	ERR_PTR
	b	.L1
.L6:
	ldr	r0, [r5]
	bl	to_mdev
	mov	r1, r8
	ldr	r3, [sp, #16]
	ldr	r2, [r1], #4
	str	r3, [sp]
	ldr	r3, [sp, #8]
	bl	mthca_map_user_db
	subs	r7, r0, #0
	bne	.L7
	ldr	r2, [sp, #12]
	ldr	r3, [sp, #8]
	str	r2, [r4, #12]
	str	r3, [r4, #8]
	ldr	r0, [r5]
	bl	to_mdev
	mov	r7, r0
	mov	r0, r5
	bl	to_mpd
	mov	r3, r4
	mov	r1, r0
	add	r2, r6, #4
	mov	r0, r7
	bl	mthca_alloc_srq
	subs	r7, r0, #0
	beq	.L8
.L10:
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L7
	ldr	r0, [r5]
	bl	to_mdev
	mov	r1, r8
	ldr	r3, [sp, #8]
	ldr	r2, [r1], #4
	bl	mthca_unmap_user_db
	b	.L7
.L5:
	ldr	r0, [r5]
	bl	to_mdev
	mov	r7, r0
	mov	r0, r5
	bl	to_mpd
	mov	r3, r4
	mov	r1, r0
	add	r2, r6, #4
	mov	r0, r7
	bl	mthca_alloc_srq
	subs	r7, r0, #0
	bne	.L10
.L9:
	mov	r0, r4
	b	.L1
.L8:
	mov	r2, #4
	mov	r0, r9
	add	r1, r4, r2
	bl	ib_copy_to_udata
	cmp	r0, #0
	beq	.L9
	ldr	r0, [r5]
	bl	to_mdev
	mov	r1, r4
	bl	mthca_free_srq
	b	.L19
.L22:
	ldr	r3, .L23+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	b	.L1
.L21:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	IB_SRQT_BASIC
	.word	.LC0
	.word	ENOSYS
	.word	GFP_KERNEL
	.word	EFAULT
	.word	ENOMEM
	.size	mthca_create_srq, .-mthca_create_srq
	.comm	IB_SRQT_BASIC,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOSYS,4,4
	.comm	ENOMEM,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
