	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_init_user_queue
_qedr_init_user_queue:                  ## @qedr_init_user_queue
	.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	%r8, %rax
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movl	24(%rbp), %r13d
	movl	16(%rbp), %r8d
	movl	%ecx, 28(%rdx)
	movq	%rax, (%rdx)
	movl	%ecx, %esi
	movq	%rax, %rdx
	movl	%r9d, %ecx
	callq	_ib_umem_get
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	callq	_PTR_ERR
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DP_ERR
	movq	8(%rbx), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	callq	_ib_umem_page_count
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_FW_PAGE_SHIFT@GOTPCREL(%rip), %rdx
	subl	(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	leaq	24(%rbx), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_qedr_prepare_pbl_tbl
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_2
LBB0_8:
	movq	8(%rbx), %rdi
	callq	_ib_umem_release
	movq	$0, 8(%rbx)
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_FW_PAGE_SHIFT@GOTPCREL(%rip), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qedr_alloc_pbl_tbl
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	16(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_8
LBB0_6:
	movl	$4, %edi
	movl	%edx, %esi
	callq	_kzalloc
	movq	%rax, 16(%rbx)
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_5:
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdx
	movl	(%r12), %r8d
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_qedr_populate_pbls
	xorl	%r12d, %r12d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"create user queue: failed ib_umem_get, got %ld\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_FW_PAGE_SHIFT,4,2              ## @FW_PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_qedr_init_user_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_init_user_queue
_qedr_init_user_queue:                  ; @qedr_init_user_queue
	.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	x21, x7
	mov	x19, x2
	mov	x20, x1
	str	w3, [x2, #28]
	str	x4, [x2]
	mov	x1, x3
	mov	x2, x4
	mov	x3, x5
	mov	x4, x6
	bl	_ib_umem_get
	str	x0, [x19, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_PTR_ERR
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_DP_ERR
	ldr	x0, [x19, #8]
	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	_PTR_ERR
LBB0_2:
	bl	_ib_umem_page_count
Lloh2:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x24, _FW_PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _FW_PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x24]
	sub	w8, w8, w9
	lsl	w2, w0, w8
	add	x22, x19, #24
	mov	x0, x20
	mov	x1, x22
	mov	w3, #0
	bl	_qedr_prepare_pbl_tbl
	mov	x23, x0
	cbz	w0, LBB0_5
LBB0_3:
	ldr	x0, [x19, #8]
	bl	_ib_umem_release
	str	xzr, [x19, #8]
LBB0_4:
	mov	x0, x23
	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
LBB0_5:
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	cbz	w21, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x22
	bl	_qedr_alloc_pbl_tbl
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x23, x0
	b	LBB0_3
LBB0_8:
	mov	w0, #4
	mov	x1, x2
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_11
; %bb.9:
	mov	w23, #0
	b	LBB0_4
LBB0_10:
	ldp	x1, x2, [x19, #8]
	ldr	w4, [x24]
	mov	x0, x20
	mov	x3, x22
	bl	_qedr_populate_pbls
	mov	w23, #0
	b	LBB0_4
LBB0_11:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create user queue: failed ib_umem_get, got %ld\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_FW_PAGE_SHIFT,4,2              ; @FW_PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_qedr_init_user_queue
.subsections_via_symbols
