	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_init_mr_table         ## -- Begin function hns_roce_init_mr_table
	.p2align	4, 0x90
_hns_roce_init_mr_table:                ## @hns_roce_init_mr_table
	.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	%rdi, %r13
	leaq	48(%rdi), %r14
	movq	40(%rdi), %rsi
	leaq	-1(%rsi), %rdx
	movl	32(%rdi), %ecx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_hns_roce_bitmap_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	leaq	52(%r13), %r15
	movq	24(%r13), %rdi
	callq	_ilog2
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_hns_roce_buddy_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movq	_HEM_TYPE_CQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hns_roce_check_whether_mhop
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	56(%r13), %rbx
	movq	16(%r13), %rdi
	callq	_ilog2
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hns_roce_buddy_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
LBB0_4:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	leaq	60(%r13), %rbx
	callq	_ilog2
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_hns_roce_buddy_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_10
LBB0_6:
	movq	8(%r13), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.7:
	leaq	64(%r13), %r12
	callq	_ilog2
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_hns_roce_buddy_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:
	movl	%eax, %r12d
	cmpq	$0, (%r13)
	je	LBB0_10
## %bb.9:
	leaq	60(%r13), %rdi
	callq	_hns_roce_buddy_cleanup
LBB0_10:
	movq	_HEM_TYPE_CQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_hns_roce_check_whether_mhop
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	addq	$56, %r13
	movq	%r13, %rdi
	callq	_hns_roce_buddy_cleanup
LBB0_12:
	movq	%r15, %rdi
	callq	_hns_roce_buddy_cleanup
LBB0_13:
	movq	%r14, %rdi
	callq	_hns_roce_bitmap_cleanup
	movl	%r12d, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEM_TYPE_CQE,4,2               ## @HEM_TYPE_CQE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_init_mr_table         ; -- Begin function hns_roce_init_mr_table
	.p2align	2
_hns_roce_init_mr_table:                ; @hns_roce_init_mr_table
	.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	x20, x0
	add	x19, x0, #48
	ldr	x1, [x0, #40]
	sub	x2, x1, #1
	ldr	w3, [x0, #32]
	mov	x0, x19
	mov	w4, #0
	bl	_hns_roce_bitmap_init
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.1:
	add	x21, x20, #52
	ldr	x0, [x20, #24]
	bl	_ilog2
	mov	x1, x0
	mov	x0, x21
	bl	_hns_roce_buddy_init
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.2:
Lloh0:
	adrp	x23, _HEM_TYPE_CQE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HEM_TYPE_CQE@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_hns_roce_check_whether_mhop
	cbz	x0, LBB0_4
; %bb.3:
	add	x22, x20, #56
	ldr	x0, [x20, #16]
	bl	_ilog2
	mov	x1, x0
	mov	x0, x22
	bl	_hns_roce_buddy_init
	mov	x22, x0
	cbnz	w0, LBB0_12
LBB0_4:
	ldr	x0, [x20]
	cbz	x0, LBB0_6
; %bb.5:
	add	x22, x20, #60
	bl	_ilog2
	mov	x1, x0
	mov	x0, x22
	bl	_hns_roce_buddy_init
	mov	x22, x0
	cbnz	w0, LBB0_10
LBB0_6:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_15
; %bb.7:
	add	x22, x20, #64
	bl	_ilog2
	mov	x1, x0
	mov	x0, x22
	bl	_hns_roce_buddy_init
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.8:
	ldr	x8, [x20]
	cbz	x8, LBB0_10
; %bb.9:
	add	x0, x20, #60
	bl	_hns_roce_buddy_cleanup
LBB0_10:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_hns_roce_check_whether_mhop
	cbz	x0, LBB0_12
; %bb.11:
	add	x0, x20, #56
	bl	_hns_roce_buddy_cleanup
LBB0_12:
	mov	x0, x21
	bl	_hns_roce_buddy_cleanup
LBB0_13:
	mov	x0, x19
	bl	_hns_roce_bitmap_cleanup
LBB0_14:
	mov	x0, x22
	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_15:
	mov	w22, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_HEM_TYPE_CQE,4,2               ; @HEM_TYPE_CQE
.subsections_via_symbols
