	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v1_init
_hns_roce_v1_init:                      ## @hns_roce_v1_init
	.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, %r15
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ROCEE_DMAE_USER_CFG1_REG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_roce_read
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, %ebx
	movq	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$15, %ecx
	callq	_roce_set_field
	movq	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PAGES_SHIFT_16@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	$1, %r12d
	movl	$1, %eax
	shll	%cl, %eax
	movl	%ebx, %edi
	movl	%eax, %ecx
	callq	_roce_set_field
	movl	%ebx, %edi
	callq	_le32_to_cpu
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_roce_write
	movq	_ROCEE_DMAE_USER_CFG2_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_roce_read
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, %ebx
	movq	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$15, %ecx
	callq	_roce_set_field
	movq	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movb	(%r13), %cl
	shll	%cl, %r12d
	movl	%ebx, %edi
	movl	%r12d, %ecx
	callq	_roce_set_field
	movq	%r15, %rdi
	callq	_hns_roce_db_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_13
LBB0_2:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_hns_roce_raq_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_4:
	movq	%r15, %rdi
	callq	_hns_roce_bt_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_6:
	movq	%r15, %rdi
	callq	_hns_roce_tptr_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_8:
	movq	%r15, %rdi
	callq	_hns_roce_free_mr_init
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_hns_roce_tptr_free
LBB0_10:
	movq	%r15, %rdi
	callq	_hns_roce_bt_free
LBB0_11:
	movq	%r15, %rdi
	callq	_hns_roce_raq_free
LBB0_12:
	movq	%r15, %rdi
	callq	_hns_roce_db_free
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_HNS_ROCE_PORT_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hns_roce_port_enable
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ROCEE_DMAE_USER_CFG1_REG,4,2   ## @ROCEE_DMAE_USER_CFG1_REG
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M,4,2 ## @ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S,4,2 ## @ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M,4,2 ## @ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S,4,2 ## @ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S
	.comm	_PAGES_SHIFT_16,4,2             ## @PAGES_SHIFT_16
	.comm	_ROCEE_DMAE_USER_CFG2_REG,4,2   ## @ROCEE_DMAE_USER_CFG2_REG
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M,4,2 ## @ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S,4,2 ## @ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M,4,2 ## @ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S,4,2 ## @ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"doorbell init failed!\n"

L_.str.1:                               ## @.str.1
	.asciz	"raq init failed!\n"

L_.str.2:                               ## @.str.2
	.asciz	"bt init failed!\n"

L_.str.3:                               ## @.str.3
	.asciz	"tptr init failed!\n"

L_.str.4:                               ## @.str.4
	.asciz	"free mr init failed!\n"

	.comm	_HNS_ROCE_PORT_UP,4,2           ## @HNS_ROCE_PORT_UP
	.no_dead_strip	_hns_roce_v1_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v1_init
_hns_roce_v1_init:                      ; @hns_roce_v1_init
	.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	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x22, _ROCEE_DMAE_USER_CFG1_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ROCEE_DMAE_USER_CFG1_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_roce_read
	bl	_cpu_to_le32
	mov	x21, x0
Lloh2:
	adrp	x8, _ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w3, #15
	bl	_roce_set_field
Lloh8:
	adrp	x8, _ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x23, _PAGES_SHIFT_16@GOTPAGE
Lloh15:
	ldr	x23, [x23, _PAGES_SHIFT_16@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	w24, #1
	lsl	w3, w24, w8
	mov	x0, x21
	bl	_roce_set_field
	mov	x0, x21
	bl	_le32_to_cpu
	mov	x2, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_roce_write
Lloh16:
	adrp	x8, _ROCEE_DMAE_USER_CFG2_REG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG2_REG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_roce_read
	bl	_cpu_to_le32
	mov	x21, x0
Lloh19:
	adrp	x8, _ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w3, #15
	bl	_roce_set_field
Lloh25:
	adrp	x8, _ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w8, [x23]
	lsl	w3, w24, w8
	mov	x0, x21
	bl	_roce_set_field
	mov	x0, x19
	bl	_hns_roce_db_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_13
LBB0_2:
	mov	x0, x19
	bl	_hns_roce_raq_init
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_4:
	mov	x0, x19
	bl	_hns_roce_bt_init
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_hns_roce_tptr_init
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_hns_roce_free_mr_init
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.9:
Lloh39:
	adrp	x1, l_.str.4@PAGE
Lloh40:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x19
	bl	_hns_roce_tptr_free
LBB0_10:
	mov	x0, x19
	bl	_hns_roce_bt_free
LBB0_11:
	mov	x0, x19
	bl	_hns_roce_raq_free
LBB0_12:
	mov	x0, x19
	bl	_hns_roce_db_free
LBB0_13:
	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_14:
Lloh41:
	adrp	x8, _HNS_ROCE_PORT_UP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _HNS_ROCE_PORT_UP@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hns_roce_port_enable
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_ROCEE_DMAE_USER_CFG1_REG,4,2   ; @ROCEE_DMAE_USER_CFG1_REG
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M,4,2 ; @ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S,4,2 ; @ROCEE_DMAE_USER_CFG1_ROCEE_CACHE_TB_CFG_S
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M,4,2 ; @ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S,4,2 ; @ROCEE_DMAE_USER_CFG1_ROCEE_STREAM_ID_TB_CFG_S
	.comm	_PAGES_SHIFT_16,4,2             ; @PAGES_SHIFT_16
	.comm	_ROCEE_DMAE_USER_CFG2_REG,4,2   ; @ROCEE_DMAE_USER_CFG2_REG
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M,4,2 ; @ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S,4,2 ; @ROCEE_DMAE_USER_CFG2_ROCEE_CACHE_PKT_CFG_S
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M,4,2 ; @ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_M
	.comm	_ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S,4,2 ; @ROCEE_DMAE_USER_CFG2_ROCEE_STREAM_ID_PKT_CFG_S
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"doorbell init failed!\n"

l_.str.1:                               ; @.str.1
	.asciz	"raq init failed!\n"

l_.str.2:                               ; @.str.2
	.asciz	"bt init failed!\n"

l_.str.3:                               ; @.str.3
	.asciz	"tptr init failed!\n"

l_.str.4:                               ; @.str.4
	.asciz	"free mr init failed!\n"

	.comm	_HNS_ROCE_PORT_UP,4,2           ; @HNS_ROCE_PORT_UP
	.no_dead_strip	_hns_roce_v1_init
.subsections_via_symbols
