	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_kernel_srq
_create_kernel_srq:                     ## @create_kernel_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
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	52(%rdi), %edi
	callq	_to_hr_dev
	movq	%rax, %r15
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r12
	movl	4(%rax), %r8d
	addl	(%r12), %r8d
	movl	$2, %edx
	movl	%r8d, %ecx
	shll	%cl, %edx
	movq	%rax, %rdi
	movl	%ebx, %esi
	movq	%r13, %rcx
	callq	_hns_roce_buf_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	$0, 64(%r13)
	movq	40(%r13), %rax
	decq	%rax
	movq	%rax, 56(%r13)
	movl	(%r13), %edx
	movl	4(%r13), %esi
	leaq	8(%r13), %r14
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_hns_roce_mtt_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_hns_roce_buf_write_mtt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edx
	addl	(%r12), %edx
	movl	48(%r13), %edi
	movq	%r13, %rsi
	callq	_hns_roce_create_idx_que
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_12
LBB0_6:
	leaq	20(%r13), %r12
	movl	20(%r13), %edx
	movl	24(%r13), %esi
	leaq	28(%r13), %r14
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_hns_roce_mtt_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdx
	callq	_hns_roce_buf_write_mtt
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hns_roce_mtt_cleanup
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	movl	12(%r13), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_hns_roce_buf_free
	movl	16(%r13), %edi
	callq	_kfree
LBB0_12:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_13:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hns_roce_mtt_cleanup
LBB0_14:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	callq	_hns_roce_buf_free
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	40(%r13), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kvmalloc_array
	movl	%eax, 32(%r13)
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Create idx queue fail(%d)!\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_create_kernel_srq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_kernel_srq
_create_kernel_srq:                     ; @create_kernel_srq
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #52]
	bl	_to_hr_dev
	mov	x21, x0
Lloh0:
	adrp	x24, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x24]
	ldr	w9, [x0, #4]
	add	w4, w9, w8
	mov	w8, #2
	lsl	w2, w8, w4
	mov	x1, x20
	mov	x3, x19
	bl	_hns_roce_buf_alloc
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_2:
	ldr	x8, [x19, #40]
	sub	x8, x8, #1
	stp	x8, xzr, [x19, #56]
	ldp	w2, w1, [x19]
	add	x22, x19, #8
	mov	x0, x21
	mov	x3, x22
	bl	_hns_roce_mtt_init
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.3:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_hns_roce_buf_write_mtt
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.4:
	ldr	w8, [x24]
	ldr	w9, [x21, #8]
	add	w2, w9, w8
	ldr	w0, [x19, #48]
	mov	x1, x19
	bl	_hns_roce_create_idx_que
	cbz	w0, LBB0_6
; %bb.5:
	mov	x23, x0
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_err
	b	LBB0_10
LBB0_6:
	mov	x24, x19
	ldp	w2, w1, [x24, #20]!
	add	x25, x24, #8
	mov	x0, x21
	mov	x3, x25
	bl	_hns_roce_mtt_init
	mov	x23, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x21
	mov	x1, x25
	mov	x2, x24
	bl	_hns_roce_buf_write_mtt
	mov	x23, x0
	cbz	w0, LBB0_13
LBB0_8:
	mov	x0, x21
	mov	x1, x25
	bl	_hns_roce_mtt_cleanup
LBB0_9:
	ldr	w1, [x19, #12]
	mov	x0, x21
	mov	x2, x24
	bl	_hns_roce_buf_free
	ldr	w0, [x19, #16]
	bl	_kfree
LBB0_10:
	mov	x0, x21
	mov	x1, x22
	bl	_hns_roce_mtt_cleanup
LBB0_11:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_hns_roce_buf_free
LBB0_12:
	mov	x0, x23
	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
LBB0_13:
	ldr	x0, [x19, #40]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kvmalloc_array
	str	w0, [x19, #32]
	cbz	w0, LBB0_15
; %bb.14:
	mov	w23, #0
	b	LBB0_12
LBB0_15:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Create idx queue fail(%d)!\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_create_kernel_srq
.subsections_via_symbols
