	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_table_get             ## -- Begin function hns_roce_table_get
	.p2align	4, 0x90
_hns_roce_table_get:                    ## @hns_roce_table_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movl	48(%rsi), %esi
	callq	_hns_roce_check_whether_mhop
	testq	%rax, %rax
	je	LBB0_1
## %bb.19:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_roce_table_mhop_get        ## TAILCALL
LBB0_1:
	movslq	(%rbx), %rcx
	decq	%rcx
	andq	%r12, %rcx
	movq	8(%rbx), %rax
	movq	16(%rbx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rsi
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %esi
LBB0_4:
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.6:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %r14
	jmp	LBB0_7
LBB0_5:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r14d
LBB0_7:
	leaq	24(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	32(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	incl	(%rax)
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	8(%rbx), %rdx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%rdx, %rsi
	shrq	%cl, %rsi
	cmpq	$0, 40(%rbx)
	jne	LBB0_10
## %bb.11:
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %ecx
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hns_roce_alloc_hem
	movq	32(%rbx), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	32(%rbx), %rax
	cmpq	$0, (%rax,%r14,8)
	je	LBB0_13
## %bb.14:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_hns_roce_set_hem
	movq	32(%rbx), %rcx
	movq	(%rcx,%r14,8), %rsi
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	callq	_hns_roce_free_hem
	movq	32(%rbx), %rax
	movq	$0, (%rax,%r14,8)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_18
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_16:
	incl	(%rsi)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set HEM base address to HW failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_roce_table_get             ; -- Begin function hns_roce_table_get
	.p2align	2
_hns_roce_table_get:                    ; @hns_roce_table_get
	.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	x23, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x20, [x0]
	ldr	w1, [x1, #48]
	bl	_hns_roce_check_whether_mhop
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	mov	x1, x21
	mov	x2, 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
	b	_hns_roce_table_mhop_get
LBB0_2:
	ldrsw	x8, [x21]
	sub	x8, x8, #1
	and	x8, x8, x23
	ldp	x9, x10, [x21, #8]
	udiv	x9, x9, x10
	add	x19, x21, #24
	udiv	x24, x8, x9
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21, #32]
	ldr	x8, [x8, x24, lsl #3]
	cbz	x8, LBB0_5
; %bb.3:
	mov	w21, #0
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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:
	ldr	x2, [x21, #8]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsr	x1, x2, x8
	ldr	x8, [x21, #40]
Lloh3:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _GFP_HIGHUSER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GFP_HIGHUSER@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_hns_roce_alloc_hem
	ldr	x8, [x21, #32]
	lsl	x9, x24, #3
	str	x0, [x8, x9]
	ldr	x8, [x21, #32]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_hns_roce_set_hem
	ldr	x8, [x21, #32]
	ldr	x1, [x8, x24, lsl #3]
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x22
	bl	_hns_roce_free_hem
	ldr	x8, [x21, #32]
	str	xzr, [x8, x24, lsl #3]
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_4
LBB0_8:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_4
LBB0_9:
	mov	w21, #0
	ldr	w8, [x1]
	add	w8, w8, #1
	str	w8, [x1]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set HEM base address to HW failed.\n"

.subsections_via_symbols
