	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_dsaf_comm_init
_hns_dsaf_comm_init:                    ## @hns_dsaf_comm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_AE_IS_VER1
	movl	%eax, %r14d
	movq	_DSAF_CFG_0_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_dsaf_read_dev
	movq	%rax, %rbx
	movq	_DSAF_CFG_EN_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %edx
	movq	%rbx, %rdi
	callq	_dsaf_set_bit
	movq	_DSAF_CFG_TC_MODE_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_dsaf_set_bit
	movq	_DSAF_CFG_CRC_EN_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_dsaf_set_bit
	movq	_DSAF_CFG_MIX_MODE_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_dsaf_set_bit
	movq	_DSAF_CFG_LOCA_ADDR_EN_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_dsaf_set_bit
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_dsaf_write_dev
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_hns_dsaf_reg_cnt_clr_ce
	movq	_DSAF_STP_PORT_TYPE_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hns_dsaf_stp_port_type_cfg
	movq	_DSAF_DEFAUTL_QUEUE_NUM_PER_PPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hns_dsaf_ppe_qid_cfg
	movq	%r15, %rdi
	callq	_hns_dsaf_mix_def_qid_cfg
	movq	%r15, %rdi
	callq	_hns_dsaf_inner_qid_cfg
	movq	_DSAF_SW_PORT_TYPE_NON_VLAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_hns_dsaf_sw_port_type_cfg
	movq	_DSAF_COMM_CHN@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_hns_dsaf_pfc_en_cfg
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movl	%r14d, %ecx
	callq	_hns_dsaf_set_pfc_pause
	incq	%rbx
	movq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
## %bb.3:
	testq	%rax, %rax
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_xge_src_clr
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_ppe_src_clr
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_rocee_src_clr
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_xge_msk_set
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_ppe_msk_set
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_hns_dsaf_int_rocee_msk_set
	incq	%rbx
	cmpq	(%r12), %rbx
	jl	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_hns_dsaf_int_tbl_src_clr
	movq	%r15, %rdi
	movl	$-1, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_dsaf_int_tbl_msk_set       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_CFG_0_REG,4,2             ## @DSAF_CFG_0_REG
	.comm	_DSAF_CFG_EN_S,4,2              ## @DSAF_CFG_EN_S
	.comm	_DSAF_CFG_TC_MODE_S,4,2         ## @DSAF_CFG_TC_MODE_S
	.comm	_DSAF_CFG_CRC_EN_S,4,2          ## @DSAF_CFG_CRC_EN_S
	.comm	_DSAF_CFG_MIX_MODE_S,4,2        ## @DSAF_CFG_MIX_MODE_S
	.comm	_DSAF_CFG_LOCA_ADDR_EN_S,4,2    ## @DSAF_CFG_LOCA_ADDR_EN_S
	.comm	_DSAF_STP_PORT_TYPE_FORWARD,4,2 ## @DSAF_STP_PORT_TYPE_FORWARD
	.comm	_DSAF_DEFAUTL_QUEUE_NUM_PER_PPE,4,2 ## @DSAF_DEFAUTL_QUEUE_NUM_PER_PPE
	.comm	_DSAF_SW_PORT_TYPE_NON_VLAN,4,2 ## @DSAF_SW_PORT_TYPE_NON_VLAN
	.comm	_DSAF_COMM_CHN,8,3              ## @DSAF_COMM_CHN
	.no_dead_strip	_hns_dsaf_comm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_dsaf_comm_init
_hns_dsaf_comm_init:                    ; @hns_dsaf_comm_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_AE_IS_VER1
	mov	x20, x0
Lloh0:
	adrp	x22, _DSAF_CFG_0_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DSAF_CFG_0_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dsaf_read_dev
	mov	x21, x0
Lloh2:
	adrp	x8, _DSAF_CFG_EN_S@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DSAF_CFG_EN_S@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	bl	_dsaf_set_bit
Lloh5:
	adrp	x8, _DSAF_CFG_TC_MODE_S@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DSAF_CFG_TC_MODE_S@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_dsaf_set_bit
Lloh8:
	adrp	x8, _DSAF_CFG_CRC_EN_S@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DSAF_CFG_CRC_EN_S@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_dsaf_set_bit
Lloh11:
	adrp	x8, _DSAF_CFG_MIX_MODE_S@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DSAF_CFG_MIX_MODE_S@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_dsaf_set_bit
Lloh14:
	adrp	x8, _DSAF_CFG_LOCA_ADDR_EN_S@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DSAF_CFG_LOCA_ADDR_EN_S@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_dsaf_set_bit
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_dsaf_write_dev
	mov	x0, x19
	mov	w1, #1
	bl	_hns_dsaf_reg_cnt_clr_ce
Lloh17:
	adrp	x8, _DSAF_STP_PORT_TYPE_FORWARD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DSAF_STP_PORT_TYPE_FORWARD@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hns_dsaf_stp_port_type_cfg
Lloh20:
	adrp	x8, _DSAF_DEFAUTL_QUEUE_NUM_PER_PPE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DSAF_DEFAUTL_QUEUE_NUM_PER_PPE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hns_dsaf_ppe_qid_cfg
	mov	x0, x19
	bl	_hns_dsaf_mix_def_qid_cfg
	mov	x0, x19
	bl	_hns_dsaf_inner_qid_cfg
Lloh23:
	adrp	x8, _DSAF_SW_PORT_TYPE_NON_VLAN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DSAF_SW_PORT_TYPE_NON_VLAN@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_hns_dsaf_sw_port_type_cfg
Lloh26:
	adrp	x22, _DSAF_COMM_CHN@GOTPAGE
Lloh27:
	ldr	x22, [x22, _DSAF_COMM_CHN@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_hns_dsaf_pfc_en_cfg
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x20
	bl	_hns_dsaf_set_pfc_pause
	add	x21, x21, #1
	ldr	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_2
; %bb.3:
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x20, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_xge_src_clr
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_ppe_src_clr
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_rocee_src_clr
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_xge_msk_set
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_ppe_msk_set
	mov	x0, x19
	mov	x1, x20
	mov	w2, #-1
	bl	_hns_dsaf_int_rocee_msk_set
	add	x20, x20, #1
	ldr	x8, [x22]
	cmp	x20, x8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	w1, #-1
	bl	_hns_dsaf_int_tbl_src_clr
	mov	x0, x19
	mov	w1, #-1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_hns_dsaf_int_tbl_msk_set
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_CFG_0_REG,4,2             ; @DSAF_CFG_0_REG
	.comm	_DSAF_CFG_EN_S,4,2              ; @DSAF_CFG_EN_S
	.comm	_DSAF_CFG_TC_MODE_S,4,2         ; @DSAF_CFG_TC_MODE_S
	.comm	_DSAF_CFG_CRC_EN_S,4,2          ; @DSAF_CFG_CRC_EN_S
	.comm	_DSAF_CFG_MIX_MODE_S,4,2        ; @DSAF_CFG_MIX_MODE_S
	.comm	_DSAF_CFG_LOCA_ADDR_EN_S,4,2    ; @DSAF_CFG_LOCA_ADDR_EN_S
	.comm	_DSAF_STP_PORT_TYPE_FORWARD,4,2 ; @DSAF_STP_PORT_TYPE_FORWARD
	.comm	_DSAF_DEFAUTL_QUEUE_NUM_PER_PPE,4,2 ; @DSAF_DEFAUTL_QUEUE_NUM_PER_PPE
	.comm	_DSAF_SW_PORT_TYPE_NON_VLAN,4,2 ; @DSAF_SW_PORT_TYPE_NON_VLAN
	.comm	_DSAF_COMM_CHN,8,3              ; @DSAF_COMM_CHN
	.no_dead_strip	_hns_dsaf_comm_init
.subsections_via_symbols
