	.file	"extr_ipath_cq.c_ipath_create_cq.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ipath_create_cq
	.type	ipath_create_cq, @function
ipath_create_cq:
.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
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	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
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	to_idev@PLT
	test	ebx, ebx
	jle	.L2
	cmp	DWORD PTR ib_ipath_max_cqes[rip], ebx
	jge	.L3
.L2:
	mov	edi, DWORD PTR EINVAL[rip]
.L30:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	neg	edi
	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
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 56
	mov	rbp, rax
	call	kmalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L32
	lea	edi, 20[0+rbx*4]
	test	r13, r13
	je	.L5
	mov	DWORD PTR 12[rsp], edi
	call	vmalloc_user@PLT
	mov	edi, DWORD PTR 12[rsp]
	test	rax, rax
	mov	r15, rax
	je	.L17
	cmp	DWORD PTR 0[r13], 3
	ja	.L33
.L9:
	mov	QWORD PTR [r12], 0
.L12:
	lea	r13, 16[rbp]
	mov	rdi, r13
	call	spin_lock@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR ib_ipath_max_cqs[rip]
	je	.L34
	add	rax, 1
	mov	rdi, r13
	mov	QWORD PTR 0[rbp], rax
	call	spin_unlock@PLT
	cmp	QWORD PTR [r12], 0
	je	.L15
	lea	r13, 8[rbp]
	mov	rdi, r13
	call	spin_lock_irq@PLT
	mov	rax, QWORD PTR [r12]
	lea	rsi, 12[rbp]
	lea	rdi, 44[rax]
	call	list_add@PLT
	mov	rdi, r13
	call	spin_unlock_irq@PLT
.L15:
	mov	eax, DWORD PTR IB_CQ_NONE[rip]
	mov	DWORD PTR 8[r12], ebx
	lea	rdi, 28[r12]
	lea	r13, 8[r12]
	mov	QWORD PTR 32[r12], 0
	mov	DWORD PTR 40[r12], eax
	call	spin_lock_init@PLT
	mov	esi, DWORD PTR send_complete[rip]
	lea	rdi, 24[r12]
	mov	rdx, r12
	call	tasklet_init@PLT
	mov	QWORD PTR 8[r15], 0
	mov	QWORD PTR [r15], 0
	mov	QWORD PTR 16[r12], r15
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L33:
	.cfi_restore_state
	mov	esi, edi
	mov	rcx, rax
	mov	rdx, r14
	mov	rdi, rbp
	call	ipath_create_mmap_info@PLT
	mov	QWORD PTR [r12], rax
	test	rax, rax
	je	.L35
	lea	rsi, 48[rax]
	mov	edx, 4
	mov	rdi, r13
	call	ib_copy_to_udata@PLT
	test	eax, eax
	je	.L12
	mov	edi, eax
	call	ERR_PTR@PLT
	mov	r13, rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L5:
	call	vmalloc_user@PLT
	mov	r15, rax
	test	rax, rax
	jne	.L9
.L17:
	mov	edi, DWORD PTR ENOMEM[rip]
	neg	edi
	call	ERR_PTR@PLT
	mov	r13, rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, r13
	call	spin_unlock@PLT
	mov	edi, DWORD PTR ENOMEM[rip]
	neg	edi
	call	ERR_PTR@PLT
	mov	r13, rax
.L13:
	mov	rdi, QWORD PTR [r12]
	call	kfree@PLT
.L11:
	mov	rdi, r15
	call	vfree@PLT
.L8:
.L16:
	endbr64
	mov	rdi, r12
	call	kfree@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L32:
	mov	edi, DWORD PTR ENOMEM[rip]
	jmp	.L30
	.p2align 4,,10
	.p2align 3
.L35:
	mov	edi, DWORD PTR ENOMEM[rip]
	neg	edi
	call	ERR_PTR@PLT
	mov	r13, rax
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	ipath_create_cq, .-ipath_create_cq
	.comm	send_complete,4,4
	.comm	ib_ipath_max_cqs,8,8
	.comm	ib_ipath_max_cqes,4,4
	.comm	IB_CQ_NONE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_ipath_cq.c_ipath_create_cq.c"
	.text
	.align	2
	.global	ipath_create_cq
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipath_create_cq, %function
ipath_create_cq:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	mov	r8, r3
	ldr	r9, [sp, #32]
	bl	to_idev
	cmp	r4, #0
	ble	.L2
	ldr	r3, .L39
	ldr	r3, [r3]
	cmp	r3, r4
	bge	.L3
.L2:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L39+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L3:
	ldr	r3, .L39+8
	mov	r6, r0
	ldr	r1, [r3]
	mov	r0, #36
	bl	kmalloc
	subs	r5, r0, #0
	beq	.L35
	lsl	r10, r4, #2
	cmp	r9, #0
	add	r10, r10, #12
	beq	.L5
	mov	r0, r10
	bl	vmalloc_user
	subs	r7, r0, #0
	beq	.L17
	ldr	r3, [r9]
	cmp	r3, #3
	bhi	.L36
.L9:
	mov	r3, #0
	str	r3, [r5]
.L12:
	add	r8, r6, #12
	mov	r0, r8
	bl	spin_lock
	ldr	r2, .L39+12
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L37
	add	r3, r3, #1
	str	r3, [r6]
	mov	r0, r8
	bl	spin_unlock
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L15
	add	r8, r6, #4
	mov	r0, r8
	bl	spin_lock_irq
	ldr	r0, [r5]
	add	r1, r6, #8
	add	r0, r0, #28
	bl	list_add
	mov	r0, r8
	bl	spin_unlock_irq
.L15:
	mov	r6, #0
	ldr	r3, .L39+16
	str	r4, [r5, #4]
	ldr	r3, [r3]
	str	r6, [r5, #20]
	str	r3, [r5, #24]
	add	r0, r5, #16
	bl	spin_lock_init
	ldr	r3, .L39+20
	mov	r2, r5
	ldr	r1, [r3]
	add	r0, r5, #12
	add	r4, r5, #4
	bl	tasklet_init
	str	r6, [r7, #4]
	str	r6, [r7]
	mov	r0, r4
	str	r7, [r5, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L36:
	mov	r2, r8
	mov	r1, r10
	mov	r3, r7
	mov	r0, r6
	bl	ipath_create_mmap_info
	cmp	r0, #0
	str	r0, [r5]
	beq	.L38
	add	r1, r0, #32
	mov	r2, #4
	mov	r0, r9
	bl	ib_copy_to_udata
	cmp	r0, #0
	beq	.L12
.L33:
.L13:
	bl	ERR_PTR
	mov	r4, r0
	ldr	r0, [r5]
	bl	kfree
.L11:
	mov	r0, r7
	bl	vfree
.L8:
.L16:
	mov	r0, r5
	bl	kfree
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	mov	r0, r10
	bl	vmalloc_user
	subs	r7, r0, #0
	bne	.L9
.L17:
	ldr	r3, .L39+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	mov	r4, r0
	b	.L8
.L37:
	mov	r0, r8
	bl	spin_unlock
	ldr	r3, .L39+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L33
.L35:
	ldr	r3, .L39+24
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	ERR_PTR
.L38:
	ldr	r3, .L39+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bl	ERR_PTR
	mov	r4, r0
	b	.L11
.L40:
	.align	2
.L39:
	.word	ib_ipath_max_cqes
	.word	EINVAL
	.word	GFP_KERNEL
	.word	ib_ipath_max_cqs
	.word	IB_CQ_NONE
	.word	send_complete
	.word	ENOMEM
	.size	ipath_create_cq, .-ipath_create_cq
	.comm	send_complete,4,4
	.comm	ib_ipath_max_cqs,4,4
	.comm	ib_ipath_max_cqes,4,4
	.comm	IB_CQ_NONE,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
