	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_create_user_qp
_qedr_create_user_qp:                   ## @qedr_create_user_qp
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	callq	_get_qedr_pd
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_rdma_protocol_roce
	movl	%eax, %r14d
	leaq	-168(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	%r13, %rbx
	movq	%r13, %rsi
	movl	$40, %edx
	callq	_ib_copy_from_udata
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_17
LBB0_2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	leaq	40(%r12), %rdx
	movl	-136(%rbp), %r8d
	movl	-132(%rbp), %ecx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	xorl	%r9d, %r9d
	movq	%r14, %r15
	pushq	%r14
	pushq	$0
	callq	_qedr_init_user_queue
	addq	$16, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.3:
	cmpl	$0, 32(%r12)
	je	LBB0_4
LBB0_5:
	movq	%rbx, %r13
	movq	%r12, %rbx
	leaq	-128(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_qedr_init_common_qp_in_params
	movq	-152(%rbp), %rax
	movq	%rax, -112(%rbp)
	movl	48(%rbx), %eax
	movl	%eax, -116(%rbp)
	movq	40(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	cmpl	$0, 32(%rbx)
	jne	LBB0_7
## %bb.6:
	movl	24(%rbx), %eax
	movl	%eax, -124(%rbp)
	movq	16(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -128(%rbp)
LBB0_7:
	movq	8(%r14), %rax
	movl	(%r14), %edi
	leaq	-128(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	*8(%rax)
	movl	%eax, (%rbx)
	testl	%eax, %eax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_8
## %bb.9:
	movl	$1, %esi
	callq	_rdma_protocol_iwarp
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_qedr_iwarp_populate_user_qp
LBB0_11:
	movl	-52(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	callq	_qedr_copy_qp_uresp
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	8(%r14), %rax
	movl	(%r14), %edi
	movl	(%rbx), %esi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_16
LBB0_4:
	leaq	16(%r12), %rdx
	movl	-144(%rbp), %r8d
	movl	-140(%rbp), %ecx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	xorl	%r9d, %r9d
	pushq	%r15
	pushq	$0
	callq	_qedr_init_user_queue
	addq	$16, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_5
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_16
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_qedr_qp_user_print
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_14:
	xorl	%r13d, %r13d
LBB0_16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_qedr_cleanup_user
LBB0_17:
	movl	%r13d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Problem copying data from user space\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"create qp: fatal fault. rc=%d"

	.no_dead_strip	_qedr_create_user_qp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_create_user_qp
_qedr_create_user_qp:                   ; @qedr_create_user_qp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x21, x3
	mov	x20, x1
	mov	x19, x0
	mov	x0, x2
	bl	_get_qedr_pd
	mov	x24, x0
	add	x22, x19, #16
	mov	x0, x22
	mov	w1, #1
	bl	_rdma_protocol_roce
	mov	x25, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	add	x0, sp, #8
	mov	x1, x21
	mov	w2, #40
	bl	_ib_copy_from_udata
	cbz	w0, LBB0_2
; %bb.1:
	mov	x26, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_16
LBB0_2:
	add	x2, x20, #40
	ldp	w4, w3, [sp, #40]
	mov	x0, x21
	mov	x1, x19
	mov	w5, #0
	mov	w6, #0
	mov	x7, x25
	bl	_qedr_init_user_queue
	mov	x26, x0
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	w8, [x20, #32]
	cbz	w8, LBB0_12
LBB0_4:
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	add	x5, sp, #56
	mov	x0, x19
	mov	x1, x24
	mov	x2, x20
	mov	x3, x23
	mov	w4, #0
	bl	_qedr_init_common_qp_in_params
	ldr	d0, [sp, #24]
	str	d0, [sp, #72]
	ldr	w8, [x20, #48]
	str	w8, [sp, #68]
	ldr	x8, [x20, #40]
	ldr	w8, [x8]
	str	w8, [sp, #64]
	ldr	w8, [x20, #32]
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x20, #24]
	str	w8, [sp, #60]
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	str	w8, [sp, #56]
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x19]
	add	x1, sp, #56
	add	x2, sp, #48
	blr	x8
	str	w0, [x20]
	cbz	w0, LBB0_13
; %bb.7:
	mov	x0, x22
	mov	w1, #1
	bl	_rdma_protocol_iwarp
	cbz	x0, LBB0_9
; %bb.8:
	add	x2, sp, #48
	mov	x0, x19
	mov	x1, x20
	bl	_qedr_iwarp_populate_user_qp
LBB0_9:
	ldr	d0, [sp, #48]
	stur	d0, [x20, #4]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_qedr_copy_qp_uresp
	cbz	w0, LBB0_15
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x19]
	ldr	w1, [x20]
	blr	x8
	mov	x26, x0
	cbz	w0, LBB0_14
; %bb.11:
	str	x26, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_14
LBB0_12:
	add	x2, x20, #16
	ldp	w4, w3, [sp, #32]
	mov	x0, x21
	mov	x1, x19
	mov	w5, #0
	mov	w6, #0
	mov	x7, x25
	bl	_qedr_init_user_queue
	mov	x26, x0
	cbnz	w0, LBB0_16
	b	LBB0_4
LBB0_13:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w26, w8
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_qedr_cleanup_user
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_qedr_qp_user_print
	mov	w26, #0
LBB0_16:
	mov	x0, x26
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Problem copying data from user space\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"create qp: fatal fault. rc=%d"

	.no_dead_strip	_qedr_create_user_qp
.subsections_via_symbols
