	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_table_mhop_get
_hns_roce_table_mhop_get:               ## @hns_roce_table_mhop_get
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movq	%rdx, -136(%rbp)
	leaq	-136(%rbp), %rdx
	leaq	-112(%rbp), %rcx
	callq	_hns_roce_calc_hem_mhop
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	-112(%rbp), %eax
	movl	%eax, -124(%rbp)                ## 4-byte Spill
	movl	-108(%rbp), %r14d
	movl	-104(%rbp), %esi
	movq	_BA_BYTE_LEN@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	movl	%eax, %ebx
	movl	56(%r15), %edi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_hns_roce_get_bt_num
	cmpl	$1, %eax
	je	LBB0_5
## %bb.2:
	cmpl	$2, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$3, %eax
	jne	LBB0_6
## %bb.4:
	movslq	-100(%rbp), %rcx
	movq	%rcx, %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	imull	%ebx, %eax
	addl	-96(%rbp), %eax
	imull	%eax, %ebx
	addl	-92(%rbp), %ebx
	cltq
	jmp	LBB0_9
LBB0_5:
	movl	-100(%rbp), %ebx
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_8:
	movslq	-100(%rbp), %rcx
	movq	%rcx, %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	imull	%ecx, %ebx
	addl	-96(%rbp), %ebx
	xorl	%eax, %eax
LBB0_9:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_10:
	movslq	%ebx, %rbx
	xorl	%edi, %edi
	cmpq	%rbx, (%r15)
	setbe	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	56(%r15), %edx
	movq	(%r15), %r8
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_7
LBB0_12:
	leaq	40(%r15), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	48(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_17
LBB0_13:
	incl	(%rax)
	xorl	%r14d, %r14d
LBB0_14:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	jmp	LBB0_16
LBB0_6:
	movl	56(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	56(%r15), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_check_whether_bt_num_3
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:
	movl	56(%r15), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_check_whether_bt_num_2
	testq	%rax, %rax
	je	LBB0_19
LBB0_20:
	movq	8(%r15), %rax
	movb	$1, %dl
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	jne	LBB0_26
## %bb.21:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,8), %rdx
	addq	16(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	movq	8(%r15), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rcx,%rdx,8)
	movq	8(%r15), %rax
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_22
## %bb.23:
	movl	56(%r15), %eax
	movq	_HEM_TYPE_MTT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_25
## %bb.24:
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_25
## %bb.53:
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_54
LBB0_19:
	movb	$1, %dl
	jmp	LBB0_26
LBB0_25:
	xorl	%edx, %edx
LBB0_26:
	movl	%edx, -120(%rbp)                ## 4-byte Spill
	movl	56(%r15), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_check_whether_bt_num_3
	movb	$1, %dil
	testq	%rax, %rax
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	je	LBB0_33
## %bb.27:
	movq	24(%r15), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_28
LBB0_33:
	movl	56(%r15), %eax
	movq	_HEM_TYPE_MTT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	-124(%rbp), %edx                ## 4-byte Reload
	cmovgel	%r14d, %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%edx, %esi
	sarl	%cl, %esi
	cmpq	$0, 64(%r15)
	movl	%edi, -116(%rbp)                ## 4-byte Spill
	jne	LBB0_34
## %bb.35:
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	jmp	LBB0_36
LBB0_34:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
LBB0_36:
	movl	(%rax), %ecx
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_hns_roce_alloc_hem
	movq	48(%r15), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	48(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_37
## %bb.38:
	leaq	-144(%rbp), %r14
	movq	%r14, %rsi
	callq	_hns_roce_hem_first
	movq	%r14, %rdi
	callq	_hns_roce_hem_addr
	movl	56(%r15), %ecx
	movq	_HEM_TYPE_MTT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_50
## %bb.39:
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	cmpl	$1, %r8d
	je	LBB0_44
## %bb.40:
	cmpl	$2, %r8d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_42
## %bb.41:
	leaq	(,%rcx,8), %rcx
	addq	24(%r15), %rcx
	leaq	-92(%rbp), %rdx
	jmp	LBB0_45
LBB0_37:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_48
LBB0_50:
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_52
## %bb.51:
	movq	8(%r15), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movslq	-96(%rbp), %rdx
	movq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_52
LBB0_28:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,8), %rdx
	addq	32(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_dma_alloc_coherent
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	24(%r15), %rcx
	movq	%rax, (%rcx,%rdx,8)
	movq	24(%r15), %rax
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_29
## %bb.31:
	movq	8(%r15), %rax
	movq	32(%r15), %rcx
	movq	(%rcx,%rdx,8), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rax,%rdx,8), %rax
	movslq	-96(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_32
## %bb.55:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_56
LBB0_22:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_44:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(,%rcx,8), %rcx
	addq	8(%r15), %rcx
	leaq	-96(%rbp), %rdx
LBB0_45:
	movq	(%rcx), %rcx
	movslq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_46
LBB0_42:
	movq	_HNS_ROCE_HOP_NUM_0@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r8d
	movl	$0, %r8d
	jne	LBB0_43
LBB0_46:
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%r8d, %ecx
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_52
## %bb.47:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_48:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpb	$0, -116(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_49
LBB0_56:
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	(%rax,%r13,8), %rdx
	movq	(%rcx,%r13,8), %rcx
	movq	%r12, %rdi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_free_coherent
	movq	24(%r15), %rax
	movq	$0, (%rax,%r13,8)
	jmp	LBB0_49
LBB0_52:
	movq	48(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	jmp	LBB0_13
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_32:
	xorl	%edi, %edi
	jmp	LBB0_33
LBB0_43:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %r14d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_49:
	negl	%r14d
	cmpb	$0, -120(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_15
LBB0_54:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	(%rax,%r13,8), %rdx
	movq	(%rcx,%r13,8), %rcx
	movq	%r12, %rdi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_free_coherent
	movq	8(%r15), %rax
	movq	$0, (%rax,%r13,8)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_BA_BYTE_LEN,4,2                ## @BA_BYTE_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Table %d not support hop_num = %d!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Table %d exceed hem limt idx = %llu,max = %lu!\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HEM_TYPE_MTT,4,2               ## @HEM_TYPE_MTT
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"set HEM base address to HW failed!\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_HNS_ROCE_HOP_NUM_0,4,2         ## @HNS_ROCE_HOP_NUM_0
	.no_dead_strip	_hns_roce_table_mhop_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_table_mhop_get
_hns_roce_table_mhop_get:               ; @hns_roce_table_mhop_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x19, x1
	mov	x24, x0
	ldr	x20, [x0, #8]
	str	x2, [sp, #56]
	add	x2, sp, #56
	add	x3, sp, #72
	bl	_hns_roce_calc_hem_mhop
	mov	x25, x0
	cbnz	w0, LBB0_15
; %bb.1:
	ldp	w22, w21, [sp, #72]
	ldr	w25, [sp, #80]
Lloh0:
	adrp	x8, _BA_BYTE_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BA_BYTE_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldr	w0, [x19, #56]
	mov	x1, x25
	bl	_hns_roce_get_bt_num
	cmp	w0, #1
	b.eq	LBB0_5
; %bb.2:
	sdiv	w8, w21, w26
	cmp	w0, #2
	b.eq	LBB0_6
; %bb.3:
	cmp	w0, #3
	b.ne	LBB0_13
; %bb.4:
	ldp	w26, w9, [sp, #84]
                                        ; kill: def $w26 killed $w26 def $x26
	sxtw	x26, w26
	madd	w9, w26, w8, w9
	ldr	w10, [sp, #92]
	madd	w8, w9, w8, w10
	sxtw	x27, w9
	b	LBB0_7
LBB0_5:
	mov	x27, #0
	mov	x26, #0
	ldr	w8, [sp, #84]
	b	LBB0_7
LBB0_6:
	mov	x27, #0
	ldp	w26, w9, [sp, #84]
                                        ; kill: def $w26 killed $w26 def $x26
	sxtw	x26, w26
	madd	w8, w26, w8, w9
LBB0_7:
	sxtw	x28, w8
	ldr	x8, [x19]
	cmp	x8, x28
	cset	w0, ls
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x8, [x19]
	ldr	w9, [x19, #56]
	stp	x28, x8, [sp, #8]
	str	x9, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_9:
	add	x0, x19, #40
	stp	x27, x0, [sp, #40]              ; 16-byte Folded Spill
	bl	_mutex_lock
	ldr	x8, [x19, #48]
	ldr	x8, [x8, x28, lsl #3]
	cbz	x8, LBB0_16
; %bb.10:
	mov	w25, #0
LBB0_11:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_12:
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	bl	_mutex_unlock
	b	LBB0_15
LBB0_13:
	ldr	w8, [x19, #56]
	stp	x8, x25, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	mov	x0, x20
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_15:
	mov	x0, x25
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_16:
	ldr	w0, [x19, #56]
	mov	x1, x25
	bl	_check_whether_bt_num_3
	cbnz	x0, LBB0_18
; %bb.17:
	ldr	w0, [x19, #56]
	mov	x1, x25
	bl	_check_whether_bt_num_2
	cbz	x0, LBB0_19
LBB0_18:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	cbz	x8, LBB0_24
LBB0_19:
	mov	w27, #1
LBB0_20:
	ldr	w0, [x19, #56]
	mov	x1, x25
	bl	_check_whether_bt_num_3
	cbz	x0, LBB0_28
; %bb.21:
	str	w27, [sp, #28]                  ; 4-byte Folded Spill
	ldr	x8, [x19, #24]
	ldr	x27, [sp, #40]                  ; 8-byte Folded Reload
	ldr	x8, [x8, x27, lsl #3]
	cbz	x8, LBB0_37
; %bb.22:
	mov	w8, #1
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
LBB0_23:
	ldr	w27, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_29
LBB0_24:
	ldr	x8, [x19, #16]
	lsl	x27, x26, #3
	add	x2, x8, x27
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_alloc_coherent
	ldr	x8, [x19, #8]
	str	x0, [x8, x27]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x27]
	cbz	x8, LBB0_41
; %bb.25:
	ldr	w8, [x19, #56]
Lloh13:
	adrp	x9, _HEM_TYPE_MTT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HEM_TYPE_MTT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_40
; %bb.26:
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x23
	mov	w3, #0
	blr	x8
	cbz	x0, LBB0_40
; %bb.27:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w22, [x8]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	neg	w25, w22
	b	LBB0_55
LBB0_28:
	mov	w8, #1
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
LBB0_29:
	ldr	w8, [x19, #56]
Lloh21:
	adrp	x9, _HEM_TYPE_MTT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HEM_TYPE_MTT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w2, w22, w21, lt
Lloh24:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	asr	w1, w2, w8
	ldr	x8, [x19, #64]
Lloh27:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh28:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh29:
	adrp	x10, _GFP_HIGHUSER@GOTPAGE
Lloh30:
	ldr	x10, [x10, _GFP_HIGHUSER@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
Lloh31:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x24
	bl	_hns_roce_alloc_hem
	ldr	x8, [x19, #48]
	lsl	x9, x28, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #48]
	ldr	x0, [x8, x9]
	cbz	x0, LBB0_34
; %bb.30:
	add	x1, sp, #64
	bl	_hns_roce_hem_first
	add	x0, sp, #64
	bl	_hns_roce_hem_addr
	ldr	w8, [x19, #56]
Lloh34:
	adrp	x9, _HEM_TYPE_MTT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _HEM_TYPE_MTT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_35
; %bb.31:
	cmp	w25, #1
	b.eq	LBB0_42
; %bb.32:
	cmp	w25, #2
	b.ne	LBB0_44
; %bb.33:
	ldr	x8, [x19, #24]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x8, x8, x9, lsl #3
	add	x9, sp, #72
	add	x9, x9, #20
	b	LBB0_43
LBB0_34:
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh39:
	ldr	w22, [x8]
	b	LBB0_48
LBB0_35:
	cmp	w25, #2
	b.ne	LBB0_50
; %bb.36:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldrsw	x9, [sp, #88]
	str	x0, [x8, x9, lsl #3]
	b	LBB0_50
LBB0_37:
	ldr	x8, [x19, #32]
	lsl	x9, x27, #3
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	add	x2, x8, x9
Lloh40:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh42:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_alloc_coherent
	ldr	x8, [x19, #24]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	str	x0, [x8, x9]
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_51
; %bb.38:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, x27, lsl #3]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x26, lsl #3]
	ldrsw	x10, [sp, #88]
	str	x8, [x9, x10, lsl #3]
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x23
	mov	w3, #1
	blr	x8
	cbz	x0, LBB0_52
; %bb.39:
Lloh43:
	adrp	x8, _ENODEV@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh45:
	ldr	w22, [x8]
Lloh46:
	adrp	x1, l_.str.2@PAGE
Lloh47:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w27, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_49
LBB0_40:
	mov	w27, #0
	b	LBB0_20
LBB0_41:
Lloh48:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh49:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_12
LBB0_42:
	ldr	x8, [x19, #8]
	add	x8, x8, x26, lsl #3
	add	x9, sp, #72
	add	x9, x9, #16
LBB0_43:
	ldr	x8, [x8]
	ldrsw	x9, [x9]
	str	x0, [x8, x9, lsl #3]
	b	LBB0_46
LBB0_44:
Lloh51:
	adrp	x8, _HNS_ROCE_HOP_NUM_0@GOTPAGE
Lloh52:
	ldr	x8, [x8, _HNS_ROCE_HOP_NUM_0@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
	cmp	w25, w8
	b.ne	LBB0_53
; %bb.45:
	mov	w25, #0
LBB0_46:
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	x0, x24
	mov	x1, x19
	mov	x2, x23
	mov	x3, x25
	blr	x8
	cbz	x0, LBB0_50
; %bb.47:
Lloh54:
	adrp	x8, _ENODEV@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh56:
	ldr	w22, [x8]
Lloh57:
	adrp	x1, l_.str.2@PAGE
Lloh58:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_48:
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	tbnz	w8, #0, LBB0_54
LBB0_49:
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	lsl	x23, x8, #3
	ldp	x8, x9, [x19, #24]
	ldr	x2, [x8, x23]
	ldr	x3, [x9, x23]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_free_coherent
	ldr	x8, [x19, #24]
	str	xzr, [x8, x23]
	b	LBB0_54
LBB0_50:
	mov	w25, #0
	ldr	x8, [x19, #48]
	ldr	x8, [x8, x28, lsl #3]
	b	LBB0_11
LBB0_51:
Lloh59:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh61:
	ldr	w22, [x8]
	ldr	w27, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_54
LBB0_52:
	str	wzr, [sp, #32]                  ; 4-byte Folded Spill
	b	LBB0_23
LBB0_53:
Lloh62:
	adrp	x8, _EINVAL@GOTPAGE
Lloh63:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh64:
	ldr	w22, [x8]
LBB0_54:
	neg	w25, w22
	tbnz	w27, #0, LBB0_12
LBB0_55:
	lsl	x22, x26, #3
	ldp	x8, x9, [x19, #8]
	ldr	x2, [x8, x22]
	ldr	x3, [x9, x22]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_free_coherent
	ldr	x8, [x19, #8]
	str	xzr, [x8, x22]
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_BA_BYTE_LEN,4,2                ; @BA_BYTE_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Table %d not support hop_num = %d!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Table %d exceed hem limt idx = %llu,max = %lu!\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HEM_TYPE_MTT,4,2               ; @HEM_TYPE_MTT
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"set HEM base address to HW failed!\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_HNS_ROCE_HOP_NUM_0,4,2         ; @HNS_ROCE_HOP_NUM_0
	.no_dead_strip	_hns_roce_table_mhop_get
.subsections_via_symbols
