	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_create_srq
_mthca_create_srq:                      ## @mthca_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	movq	_IB_SRQT_BASIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	(%rax), %edi
	callq	_to_mucontext
	movq	%rax, %r13
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	movl	$12, %edx
	callq	_ib_copy_from_udata
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_9
LBB0_1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	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_6:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_13:
	movl	(%r12), %edi
	callq	_to_mdev
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_to_mpd
	addq	$8, %rbx
	movl	%r13d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_mthca_alloc_srq
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %r13d
	cmpq	$0, 8(%r12)
	je	LBB0_9
## %bb.15:
	movl	(%r12), %edi
	callq	_to_mdev
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %edx
	addq	$4, %rsi
	movl	-64(%rbp), %ecx
	movl	%eax, %edi
	callq	_mthca_unmap_user_db
	jmp	LBB0_9
LBB0_11:
	movl	(%r12), %edi
	callq	_to_mdev
	movq	%r13, %rsi
	addq	$4, %rsi
	movl	(%r13), %edx
	movl	-64(%rbp), %ecx
	movl	-56(%rbp), %r8d
	movl	%eax, %edi
	callq	_mthca_map_user_db
	movq	%r13, %rcx
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_12
LBB0_9:
	movq	%r14, %rdi
	callq	_kfree
	movl	%r13d, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_10:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.17:
	movq	%r14, %rsi
	addq	$4, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_ib_copy_to_udata
	testq	%rax, %rax
	je	LBB0_10
## %bb.18:
	movl	(%r12), %edi
	callq	_to_mdev
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_mthca_free_srq
	jmp	LBB0_8
LBB0_12:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %eax
	movl	%eax, 12(%r14)
	movl	-64(%rbp), %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_SRQT_BASIC,8,3              ## @IB_SRQT_BASIC
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_mthca_create_srq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_create_srq
_mthca_create_srq:                      ; @mthca_create_srq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x8, [x1]
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_5
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w0, [x8]
	bl	_to_mucontext
	mov	x23, x0
	mov	x0, sp
	mov	x1, x21
	mov	w2, #12
	bl	_ib_copy_from_udata
	cbz	x0, LBB0_12
LBB0_4:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_13
LBB0_5:
Lloh9:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	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
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_8:
	mov	x23, #0
LBB0_9:
	ldr	w0, [x20]
	bl	_to_mdev
	mov	x24, x0
	mov	x0, x20
	bl	_to_mpd
	mov	x1, x0
	add	x2, x22, #8
	mov	x0, x24
	mov	x3, x19
	bl	_mthca_alloc_srq
	cbz	w0, LBB0_15
; %bb.10:
	mov	x24, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w0, [x20]
	bl	_to_mdev
	ldr	w2, [x23], #4
	ldr	w3, [sp]
	mov	x1, x23
	bl	_mthca_unmap_user_db
	b	LBB0_13
LBB0_12:
	ldr	w0, [x20]
	bl	_to_mdev
	mov	x1, x23
	ldr	w2, [x1], #4
	ldr	w3, [sp]
	ldr	w4, [sp, #8]
	bl	_mthca_map_user_db
	mov	x24, x0
	cbz	w0, LBB0_18
LBB0_13:
	mov	x0, x19
	bl	_kfree
	mov	x0, x24
	bl	_ERR_PTR
	mov	x19, x0
LBB0_14:
	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
	add	sp, sp, #80
	ret
LBB0_15:
	cbz	x23, LBB0_14
; %bb.16:
	add	x1, x19, #4
	mov	x0, x21
	mov	w2, #4
	bl	_ib_copy_to_udata
	cbz	x0, LBB0_14
; %bb.17:
	ldr	w0, [x20]
	bl	_to_mdev
	mov	x1, x19
	bl	_mthca_free_srq
	b	LBB0_4
LBB0_18:
	ldr	d0, [sp]
	str	d0, [x19, #8]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_SRQT_BASIC,8,3              ; @IB_SRQT_BASIC
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_mthca_create_srq
.subsections_via_symbols
