	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_cq                  ## -- Begin function qib_create_cq
	.p2align	4, 0x90
_qib_create_cq:                         ## @qib_create_cq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r14
	movl	%esi, %ebx
	callq	_to_idev
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.1:
	movq	%rax, %r12
	movq	_ib_qib_max_cqes@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jl	LBB0_2
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leal	20(,%rbx,4), %r15d
	movl	%r15d, %edi
	callq	_vmalloc_user
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	testq	%r13, %r13
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.9:
	cmpl	$4, (%r13)
	jb	LBB0_16
## %bb.10:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_qib_create_mmap_info
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	addq	$48, %rax
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	movl	%eax, %edi
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_17
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_16:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	$0, (%r15)
LBB0_17:
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	(%r12), %rax
	movq	_ib_qib_max_cqs@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.18:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_12:
	callq	_ERR_PTR
	movq	%rax, %r12
	movq	(%r15), %rdi
	callq	_kfree
	jmp	LBB0_14
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_19:
	incq	%rax
	movq	%rax, (%r12)
	movq	%r14, %rdi
	callq	_spin_unlock
	cmpq	$0, (%r15)
	je	LBB0_21
## %bb.20:
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movq	(%r15), %rdi
	addq	$44, %rdi
	addq	$12, %r12
	movq	%r12, %rsi
	callq	_list_add
	movq	%r14, %rdi
	callq	_spin_unlock_irq
LBB0_21:
	leaq	8(%r15), %r12
	movl	%ebx, 8(%r15)
	movq	_IB_CQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	$0, 32(%r15)
	leaq	28(%r15), %rdi
	callq	_spin_lock_init
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	_send_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	xorps	%xmm0, %xmm0
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
	movq	%rax, 16(%r15)
	jmp	LBB0_22
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r12
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_vfree
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
LBB0_22:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_qib_max_cqes,4,2            ## @ib_qib_max_cqes
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ib_qib_max_cqs,8,3             ## @ib_qib_max_cqs
	.comm	_IB_CQ_NONE,4,2                 ## @IB_CQ_NONE
	.comm	_send_complete,4,2              ## @send_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_cq                  ; -- Begin function qib_create_cq
	.p2align	2
_qib_create_cq:                         ; @qib_create_cq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x24, x3
	mov	x21, x1
	bl	_to_idev
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _ib_qib_max_cqes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_qib_max_cqes@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.lt	LBB0_8
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x19, x0
	lsl	w8, w21, #2
	add	w25, w8, #20
	mov	x0, x25
	bl	_vmalloc_user
	cbz	x0, LBB0_15
; %bb.4:
	mov	x20, x0
	cbz	x23, LBB0_11
; %bb.5:
	ldr	w8, [x23]
	cmp	w8, #4
	b.lo	LBB0_11
; %bb.6:
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
	mov	x3, x20
	bl	_qib_create_mmap_info
	str	x0, [x19]
	cbz	x0, LBB0_19
; %bb.7:
	add	x1, x0, #48
	mov	x0, x23
	mov	w2, #4
	bl	_ib_copy_to_udata
	cbnz	w0, LBB0_14
	b	LBB0_12
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_11:
	str	xzr, [x19]
LBB0_12:
	add	x23, x22, #16
	mov	x0, x23
	bl	_spin_lock
	ldr	x8, [x22]
Lloh10:
	adrp	x9, _ib_qib_max_cqs@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ib_qib_max_cqs@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x23
	bl	_spin_unlock
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	bl	_ERR_PTR
	mov	x21, x0
	ldr	x0, [x19]
	bl	_kfree
	b	LBB0_20
LBB0_15:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x21, x0
	b	LBB0_21
LBB0_16:
	add	x8, x8, #1
	str	x8, [x22]
	mov	x0, x23
	bl	_spin_unlock
	ldr	x8, [x19]
	cbz	x8, LBB0_18
; %bb.17:
	add	x23, x22, #8
	mov	x0, x23
	bl	_spin_lock_irq
	ldr	x8, [x19]
	add	x0, x8, #44
	add	x1, x22, #12
	bl	_list_add
	mov	x0, x23
	bl	_spin_unlock_irq
LBB0_18:
	str	w21, [x19, #8]!
Lloh19:
	adrp	x8, _IB_CQ_NONE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IB_CQ_NONE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	str	xzr, [x19, #24]
	add	x0, x19, #20
	bl	_spin_lock_init
	add	x0, x19, #16
Lloh22:
	adrp	x8, _send_complete@GOTPAGE
Lloh23:
	ldr	x8, [x8, _send_complete@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_INIT_WORK
	stp	xzr, xzr, [x20]
	str	x20, [x19, #8]
	b	LBB0_22
LBB0_19:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x21, x0
LBB0_20:
	mov	x0, x20
	bl	_vfree
LBB0_21:
	mov	x0, x19
	bl	_kfree
	mov	x19, x21
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_qib_max_cqes,4,2            ; @ib_qib_max_cqes
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ib_qib_max_cqs,8,3             ; @ib_qib_max_cqs
	.comm	_IB_CQ_NONE,4,2                 ; @IB_CQ_NONE
	.comm	_send_complete,4,2              ; @send_complete
.subsections_via_symbols
