	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_common_init_hw         ## -- Begin function hns_rcb_common_init_hw
	.p2align	4, 0x90
_hns_rcb_common_init_hw:                ## @hns_rcb_common_init_hw
	.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, %r12
	callq	_hns_rcb_common_get_port_num
	movl	%eax, %r14d
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_hns_rcb_comm_exc_irq_en
	movq	_RCB_COM_CFG_INIT_FLAG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dsaf_read_dev
	testb	$1, %al
	jne	LBB0_1
## %bb.11:
	movq	(%r12), %rcx
	movl	4(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_1:
	testl	%r14d, %r14d
	jle	LBB0_7
## %bb.2:
	xorl	%ebx, %ebx
	movq	_HNS_RCB_DEF_RX_COALESCED_FRAMES@GOTPCREL(%rip), %r15
	movq	_HNS_RCB_DEF_COALESCED_USECS@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hns_rcb_set_port_timeout
	incl	%ebx
	cmpl	%ebx, %r14d
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hns_rcb_set_port_desc_cnt
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hns_rcb_set_rx_coalesced_frames
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_AE_IS_VER1
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdi
	callq	_HNS_DSAF_IS_DEBUG
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_HNS_RCB_DEF_TX_COALESCED_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_hns_rcb_set_tx_coalesced_frames
	jmp	LBB0_6
LBB0_7:
	movq	_RCB_COM_CFG_ENDIAN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HNS_RCB_COMMON_ENDIAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_dsaf_write_dev
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_AE_IS_VER1
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_RCB_COM_CFG_FNA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_dsaf_write_dev
	movq	_RCB_COM_CFG_FA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_dsaf_write_dev
	jmp	LBB0_10
LBB0_9:
	movq	_RCBV2_COM_CFG_USER_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RCB_COM_CFG_FNA_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_dsaf_set_dev_bit
	movl	(%rbx), %esi
	movq	_RCB_COM_CFG_FA_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_dsaf_set_dev_bit
	movq	_RCBV2_COM_CFG_TSO_MODE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RCB_COM_TSO_MODE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HNS_TSO_MODE_8BD_32K@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_dsaf_set_dev_bit
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCB_COM_CFG_INIT_FLAG_REG,4,2  ## @RCB_COM_CFG_INIT_FLAG_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RCB_COM_CFG_INIT_FLAG_REG reg = 0x%x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_HNS_RCB_DEF_RX_COALESCED_FRAMES,4,2 ## @HNS_RCB_DEF_RX_COALESCED_FRAMES
	.comm	_HNS_RCB_DEF_TX_COALESCED_FRAMES,4,2 ## @HNS_RCB_DEF_TX_COALESCED_FRAMES
	.comm	_HNS_RCB_DEF_COALESCED_USECS,4,2 ## @HNS_RCB_DEF_COALESCED_USECS
	.comm	_RCB_COM_CFG_ENDIAN_REG,4,2     ## @RCB_COM_CFG_ENDIAN_REG
	.comm	_HNS_RCB_COMMON_ENDIAN,4,2      ## @HNS_RCB_COMMON_ENDIAN
	.comm	_RCB_COM_CFG_FNA_REG,4,2        ## @RCB_COM_CFG_FNA_REG
	.comm	_RCB_COM_CFG_FA_REG,4,2         ## @RCB_COM_CFG_FA_REG
	.comm	_RCBV2_COM_CFG_USER_REG,4,2     ## @RCBV2_COM_CFG_USER_REG
	.comm	_RCB_COM_CFG_FNA_B,4,2          ## @RCB_COM_CFG_FNA_B
	.comm	_RCB_COM_CFG_FA_B,4,2           ## @RCB_COM_CFG_FA_B
	.comm	_RCBV2_COM_CFG_TSO_MODE_REG,4,2 ## @RCBV2_COM_CFG_TSO_MODE_REG
	.comm	_RCB_COM_TSO_MODE_B,4,2         ## @RCB_COM_TSO_MODE_B
	.comm	_HNS_TSO_MODE_8BD_32K,4,2       ## @HNS_TSO_MODE_8BD_32K
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_rcb_common_init_hw         ; -- Begin function hns_rcb_common_init_hw
	.p2align	2
_hns_rcb_common_init_hw:                ; @hns_rcb_common_init_hw
	.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
	bl	_hns_rcb_common_get_port_num
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_hns_rcb_comm_exc_irq_en
Lloh0:
	adrp	x8, _RCB_COM_CFG_INIT_FLAG_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCB_COM_CFG_INIT_FLAG_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dsaf_read_dev
	tbnz	w0, #0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_2:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w21, #0
Lloh8:
	adrp	x22, _HNS_RCB_DEF_RX_COALESCED_FRAMES@GOTPAGE
Lloh9:
	ldr	x22, [x22, _HNS_RCB_DEF_RX_COALESCED_FRAMES@GOTPAGEOFF]
Lloh10:
	adrp	x23, _HNS_RCB_DEF_TX_COALESCED_FRAMES@GOTPAGE
Lloh11:
	ldr	x23, [x23, _HNS_RCB_DEF_TX_COALESCED_FRAMES@GOTPAGEOFF]
Lloh12:
	adrp	x24, _HNS_RCB_DEF_COALESCED_USECS@GOTPAGE
Lloh13:
	ldr	x24, [x24, _HNS_RCB_DEF_COALESCED_USECS@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_hns_rcb_set_port_timeout
	add	w21, w21, #1
	cmp	w20, w21
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_hns_rcb_set_port_desc_cnt
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_hns_rcb_set_rx_coalesced_frames
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_AE_IS_VER1
	cbnz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19]
	bl	_HNS_DSAF_IS_DEBUG
	cbnz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_hns_rcb_set_tx_coalesced_frames
	b	LBB0_4
LBB0_8:
Lloh14:
	adrp	x8, _RCB_COM_CFG_ENDIAN_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RCB_COM_CFG_ENDIAN_REG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _HNS_RCB_COMMON_ENDIAN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HNS_RCB_COMMON_ENDIAN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_dsaf_write_dev
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_AE_IS_VER1
	cbz	x0, LBB0_10
; %bb.9:
Lloh20:
	adrp	x8, _RCB_COM_CFG_FNA_REG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RCB_COM_CFG_FNA_REG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_dsaf_write_dev
Lloh23:
	adrp	x8, _RCB_COM_CFG_FA_REG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RCB_COM_CFG_FA_REG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_dsaf_write_dev
	b	LBB0_11
LBB0_10:
Lloh26:
	adrp	x20, _RCBV2_COM_CFG_USER_REG@GOTPAGE
Lloh27:
	ldr	x20, [x20, _RCBV2_COM_CFG_USER_REG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh28:
	adrp	x8, _RCB_COM_CFG_FNA_B@GOTPAGE
Lloh29:
	ldr	x8, [x8, _RCB_COM_CFG_FNA_B@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_dsaf_set_dev_bit
	ldr	w1, [x20]
Lloh31:
	adrp	x8, _RCB_COM_CFG_FA_B@GOTPAGE
Lloh32:
	ldr	x8, [x8, _RCB_COM_CFG_FA_B@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_dsaf_set_dev_bit
Lloh34:
	adrp	x8, _RCBV2_COM_CFG_TSO_MODE_REG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _RCBV2_COM_CFG_TSO_MODE_REG@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _RCB_COM_TSO_MODE_B@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RCB_COM_TSO_MODE_B@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
Lloh40:
	adrp	x8, _HNS_TSO_MODE_8BD_32K@GOTPAGE
Lloh41:
	ldr	x8, [x8, _HNS_TSO_MODE_8BD_32K@GOTPAGEOFF]
Lloh42:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_dsaf_set_dev_bit
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RCB_COM_CFG_INIT_FLAG_REG,4,2  ; @RCB_COM_CFG_INIT_FLAG_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RCB_COM_CFG_INIT_FLAG_REG reg = 0x%x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_HNS_RCB_DEF_RX_COALESCED_FRAMES,4,2 ; @HNS_RCB_DEF_RX_COALESCED_FRAMES
	.comm	_HNS_RCB_DEF_TX_COALESCED_FRAMES,4,2 ; @HNS_RCB_DEF_TX_COALESCED_FRAMES
	.comm	_HNS_RCB_DEF_COALESCED_USECS,4,2 ; @HNS_RCB_DEF_COALESCED_USECS
	.comm	_RCB_COM_CFG_ENDIAN_REG,4,2     ; @RCB_COM_CFG_ENDIAN_REG
	.comm	_HNS_RCB_COMMON_ENDIAN,4,2      ; @HNS_RCB_COMMON_ENDIAN
	.comm	_RCB_COM_CFG_FNA_REG,4,2        ; @RCB_COM_CFG_FNA_REG
	.comm	_RCB_COM_CFG_FA_REG,4,2         ; @RCB_COM_CFG_FA_REG
	.comm	_RCBV2_COM_CFG_USER_REG,4,2     ; @RCBV2_COM_CFG_USER_REG
	.comm	_RCB_COM_CFG_FNA_B,4,2          ; @RCB_COM_CFG_FNA_B
	.comm	_RCB_COM_CFG_FA_B,4,2           ; @RCB_COM_CFG_FA_B
	.comm	_RCBV2_COM_CFG_TSO_MODE_REG,4,2 ; @RCBV2_COM_CFG_TSO_MODE_REG
	.comm	_RCB_COM_TSO_MODE_B,4,2         ; @RCB_COM_TSO_MODE_B
	.comm	_HNS_TSO_MODE_8BD_32K,4,2       ; @HNS_TSO_MODE_8BD_32K
.subsections_via_symbols
