	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_srq                 ## -- Begin function qib_create_srq
	.p2align	4, 0x90
_qib_create_srq:                        ## @qib_create_srq
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	callq	_to_idev
	movq	%rax, %r15
	movq	(%rbx), %rax
	movq	_IB_SRQT_BASIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	_ib_qib_max_srq_sges@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_7
## %bb.5:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ib_qib_max_srq_wrs@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_7
## %bb.8:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	movq	16(%rbx), %rdi
	incq	%rdi
	movq	%rdi, (%rax)
	movq	8(%rbx), %rax
	movq	%rax, 8(%r14)
	leal	4(,%rax,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	imull	%eax, %edi
	addl	$4, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_vmalloc_user
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	testq	%r12, %r12
	je	LBB0_20
## %bb.13:
	cmpl	$4, (%r12)
	jb	LBB0_20
## %bb.14:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	imull	(%r14), %esi
	addl	$4, %esi
	movq	(%r13), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movq	%rax, %rcx
	callq	_qib_create_mmap_info
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	addq	$52, %rax
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	movl	%eax, %edi
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_21
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_20:
	movq	$0, 32(%r14)
LBB0_21:
	leaq	24(%r14), %rdi
	callq	_spin_lock_init
	movq	16(%r14), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	24(%rbx), %eax
	movl	%eax, 48(%r14)
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	(%r15), %rax
	movq	_ib_qib_max_srqs@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_16:
	callq	_ERR_PTR
	movq	%rax, %rbx
	movq	32(%r14), %rdi
	callq	_kfree
	jmp	LBB0_18
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_19
LBB0_23:
	incq	%rax
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock
	cmpq	$0, 32(%r14)
	je	LBB0_25
## %bb.24:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movq	32(%r14), %rdi
	addq	$44, %rdi
	addq	$12, %r15
	movq	%r15, %rsi
	callq	_list_add
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
LBB0_25:
	addq	$40, %r14
	jmp	LBB0_26
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_18:
	movq	16(%r14), %rdi
	callq	_vfree
LBB0_19:
	movq	%r14, %rdi
	callq	_kfree
	movq	%rbx, %r14
LBB0_26:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_SRQT_BASIC,8,3              ## @IB_SRQT_BASIC
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_ib_qib_max_srq_sges,8,3        ## @ib_qib_max_srq_sges
	.comm	_ib_qib_max_srq_wrs,8,3         ## @ib_qib_max_srq_wrs
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ib_qib_max_srqs,8,3            ## @ib_qib_max_srqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_create_srq                 ; -- Begin function qib_create_srq
	.p2align	2
_qib_create_srq:                        ; @qib_create_srq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x23, x0
	ldr	w0, [x0, #8]
	bl	_to_idev
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _IB_SRQT_BASIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_SRQT_BASIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.1:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _ib_qib_max_srq_sges@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ib_qib_max_srq_sges@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #0, ne
	b.gt	LBB0_11
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_11
; %bb.3:
Lloh6:
	adrp	x9, _ib_qib_max_srq_wrs@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ib_qib_max_srq_wrs@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_11
; %bb.4:
	mov	x20, x0
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kmalloc
	cbz	x0, LBB0_13
; %bb.5:
	mov	x19, x0
	ldp	x9, x8, [x21, #8]
	add	x8, x8, #1
	stp	x8, x9, [x0]
	lsl	w9, w9, #2
	add	w24, w9, #4
	orr	w9, wzr, #0x4
	madd	w0, w24, w8, w9
	bl	_vmalloc_user
	str	x0, [x19, #16]
	cbz	x0, LBB0_18
; %bb.6:
	cbz	x22, LBB0_14
; %bb.7:
	ldr	w8, [x22]
	cmp	w8, #4
	b.lo	LBB0_14
; %bb.8:
	mov	x3, x0
	ldr	w8, [x19]
	orr	w9, wzr, #0x4
	madd	w1, w24, w8, w9
	ldr	x8, [x23]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_qib_create_mmap_info
	str	x0, [x19, #32]
	cbz	x0, LBB0_22
; %bb.9:
	add	x1, x0, #52
	mov	x0, x22
	mov	w2, #4
	bl	_ib_copy_to_udata
	cbnz	w0, LBB0_17
	b	LBB0_15
LBB0_10:
Lloh12:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_13:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_14:
	str	xzr, [x19, #32]
LBB0_15:
	add	x0, x19, #24
	bl	_spin_lock_init
	ldr	x8, [x19, #16]
	stp	xzr, xzr, [x8]
	ldr	w8, [x21, #24]
	str	w8, [x19, #48]
	add	x21, x20, #16
	mov	x0, x21
	bl	_spin_lock
	ldr	x8, [x20]
Lloh18:
	adrp	x9, _ib_qib_max_srqs@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ib_qib_max_srqs@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.16:
	mov	x0, x21
	bl	_spin_unlock
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	bl	_ERR_PTR
	mov	x20, x0
	ldr	x0, [x19, #32]
	bl	_kfree
	b	LBB0_23
LBB0_18:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	b	LBB0_24
LBB0_19:
	add	x8, x8, #1
	str	x8, [x20]
	mov	x0, x21
	bl	_spin_unlock
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_21
; %bb.20:
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irq
	ldr	x8, [x19, #32]
	add	x0, x8, #44
	add	x1, x20, #12
	bl	_list_add
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_21:
	add	x20, x19, #40
	b	LBB0_25
LBB0_22:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
LBB0_23:
	ldr	x0, [x19, #16]
	bl	_vfree
LBB0_24:
	mov	x0, x19
	bl	_kfree
LBB0_25:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_SRQT_BASIC,8,3              ; @IB_SRQT_BASIC
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_ib_qib_max_srq_sges,8,3        ; @ib_qib_max_srq_sges
	.comm	_ib_qib_max_srq_wrs,8,3         ; @ib_qib_max_srq_wrs
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ib_qib_max_srqs,8,3            ; @ib_qib_max_srqs
.subsections_via_symbols
