	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_init_link_table
_hns_roce_init_link_table:              ## @hns_roce_init_link_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %r12
	cmpl	$129, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$128, %esi
	jne	LBB0_3
## %bb.2:
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	addl	(%rbx), %ecx
	movl	$1, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	addq	$32, %r12
	movl	4(%rbx), %eax
	movl	8(%rbx), %ecx
	shll	$3, %eax
	cltd
	idivl	%r13d
	movl	%eax, %edi
	leal	2(,%rcx,4), %esi
	jmp	LBB0_5
LBB0_4:
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	addl	12(%rbx), %ecx
	movl	$1, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movl	16(%rbx), %eax
	shll	$2, %eax
	cltd
	idivl	%r13d
	movl	%eax, %edi
	movl	$10, %esi
LBB0_5:
	callq	_max
	movl	%eax, %r15d
	leal	(,%r15,8), %esi
	leaq	8(%r12), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	callq	_dma_alloc_coherent
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movl	(%r14), %edx
	movl	%r15d, %edi
	movl	$16, %esi
	callq	_kcalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_18
## %bb.8:
	movq	16(%r12), %r13
	movl	-80(%rbp), %ebx                 ## 4-byte Reload
	negq	%rbx
	movl	$1, %r15d
	movq	$-8, %r14
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	leaq	-52(%rbp), %rdx
	callq	_dma_alloc_coherent
	movq	24(%r12), %rdi
	movq	%rax, 16(%rdi,%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-52(%rbp), %eax
	movl	%eax, 8(%rdi,%r14)
	movl	-52(%rbp), %eax
	sarl	$12, %eax
	movl	%eax, -8(%r13,%r15,8)
	addq	$16, %r14
	leaq	(%rbx,%r15), %rax
	incq	%rax
	incq	%r15
	cmpq	$1, %rax
	jne	LBB0_9
LBB0_18:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_hns_roce_config_link_table
	jmp	LBB0_19
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_10:
	cmpl	$1, %r15d
	je	LBB0_13
## %bb.11:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%r14), %rdx
	movl	-8(%rdi,%r14), %ecx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_dma_free_coherent
	movq	24(%r12), %rdi
	decq	%r15
	addq	$-16, %r14
	cmpq	$1, %r15
	jg	LBB0_12
LBB0_13:
	callq	_kfree
LBB0_14:
	movq	16(%r12), %rdx
	movl	8(%r12), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_free_coherent
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_HNS_ROCE_LINK_TABLE_NXT_PTR_S,4,2 ## @HNS_ROCE_LINK_TABLE_NXT_PTR_S
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_hns_roce_init_link_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_init_link_table
_hns_roce_init_link_table:              ; @hns_roce_init_link_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x1
	mov	x22, x0
	ldp	x19, x25, [x0, #24]
	cmp	w1, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_11
; %bb.2:
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	add	x25, x25, #32
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [x22]
	add	w8, w8, w9
	mov	w9, #1
	lsl	w20, w9, w8
	lsl	w8, w10, #3
	sdiv	w0, w8, w20
	ldr	w8, [x22, #8]
	mov	w1, #2
	bfi	w1, w8, #2, #30
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w10, [x22, #12]
	add	w8, w8, w9
	mov	w9, #1
	lsl	w20, w9, w8
	lsl	w8, w10, #2
	sdiv	w0, w8, w20
	mov	w1, #10
LBB0_4:
	bl	_max
	mov	x24, x0
	lsl	w23, w0, #3
	add	x2, x25, #8
Lloh6:
	adrp	x26, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x26, [x26, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x19
	mov	x1, x23
	bl	_dma_alloc_coherent
	str	x0, [x25, #16]
	cbz	x0, LBB0_18
; %bb.5:
	ldr	w2, [x26]
	mov	x0, x24
	mov	w1, #16
	bl	_kcalloc
	str	x0, [x25, #24]
	cbz	x0, LBB0_17
; %bb.6:
	stp	w23, w21, [sp, #4]              ; 8-byte Folded Spill
	cmp	w24, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x27, #0
	ldr	x28, [x25, #16]
	mov	w21, w24
	mov	w23, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x26]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_dma_alloc_coherent
	mov	x8, x0
	ldr	x0, [x25, #24]
	str	x8, [x0, x23]
	cbz	x8, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #12]
	add	x9, x0, x23
	stur	w8, [x9, #-8]
	ldr	w8, [sp, #12]
	asr	w8, w8, #12
	str	w8, [x28], #8
	add	x27, x27, #1
	add	x23, x23, #16
	cmp	x21, x27
	b.ne	LBB0_8
LBB0_10:
	stp	w24, w20, [x25]
	mov	x0, x22
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	_hns_roce_config_link_table
	b	LBB0_20
LBB0_11:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_12:
	cbz	w27, LBB0_15
; %bb.13:
	sub	x21, x23, #8
	add	x22, x27, #1
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x0, x21
	ldur	x2, [x8, #-8]
	ldur	w3, [x8, #-16]
	mov	x0, x19
	mov	x1, x20
	bl	_dma_free_coherent
	ldr	x0, [x25, #24]
	sub	x22, x22, #1
	sub	x21, x21, #16
	cmp	x22, #1
	b.gt	LBB0_14
	b	LBB0_16
LBB0_15:
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
LBB0_16:
	bl	_kfree
LBB0_17:
	ldr	x2, [x25, #16]
	ldr	w3, [x25, #8]
	mov	x0, x19
	mov	x1, x23
	bl	_dma_free_coherent
LBB0_18:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_HNS_ROCE_LINK_TABLE_NXT_PTR_S,4,2 ; @HNS_ROCE_LINK_TABLE_NXT_PTR_S
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_hns_roce_init_link_table
.subsections_via_symbols
