	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_hwlro_rx_init
_mtk_hwlro_rx_init:                     ## @mtk_hwlro_rx_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, %r13
	movq	_MTK_MAX_RX_RING_NUM@GOTPCREL(%rip), %r15
	cmpl	$2, (%r15)
	jl	LBB0_3
## %bb.1:
	movq	_MTK_RING_AUTO_LERAN_MODE@GOTPCREL(%rip), %rax
	movq	_MTK_RING_VLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	_MTK_RING_AGE_TIME_H@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_MTK_RING_MAX_AGG_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_MTK_RING_AGE_TIME_L@GOTPCREL(%rip), %rax
	movq	_MTK_RING_MAX_AGG_CNT_L@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r14d
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MTK_RING_MAX_AGG_CNT_H@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MTK_LRO_CTRL_DW1_CFG
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_mtk_w32
	movl	%ebx, %edi
	callq	_MTK_LRO_CTRL_DW2_CFG
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_mtk_w32
	movl	%ebx, %edi
	callq	_MTK_LRO_CTRL_DW3_CFG
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mtk_w32
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_3:
	movq	_MTK_L3_CKS_UPD_EN@GOTPCREL(%rip), %rax
	movq	_MTK_LRO_ALT_PKT_CNT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	_MTK_HW_LRO_BW_THRE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_PDMA_LRO_CTRL_DW2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mtk_w32
	movq	_MTK_HW_LRO_REPLACE_DELTA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_PDMA_LRO_ALT_SCORE_DELTA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mtk_w32
	movq	_MTK_HW_LRO_TIMER_UNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %esi
	movq	_MTK_HW_LRO_REFRESH_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_PDMA_LRO_ALT_REFRESH_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mtk_w32
	movq	_MTK_ADMA_MODE@GOTPCREL(%rip), %rax
	movq	_MTK_HW_LRO_MAX_AGG_CNT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_MTK_LRO_MIN_RXD_SDL@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MTK_LRO_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_MTK_PDMA_LRO_CTRL_DW3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_mtk_w32
	movq	_MTK_PDMA_LRO_CTRL_DW0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_mtk_w32
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_RING_AUTO_LERAN_MODE,4,2   ## @MTK_RING_AUTO_LERAN_MODE
	.comm	_MTK_RING_VLD,4,2               ## @MTK_RING_VLD
	.comm	_MTK_RING_AGE_TIME_H,4,2        ## @MTK_RING_AGE_TIME_H
	.comm	_MTK_RING_AGE_TIME_L,4,2        ## @MTK_RING_AGE_TIME_L
	.comm	_MTK_RING_MAX_AGG_TIME,4,2      ## @MTK_RING_MAX_AGG_TIME
	.comm	_MTK_RING_MAX_AGG_CNT_L,4,2     ## @MTK_RING_MAX_AGG_CNT_L
	.comm	_MTK_RING_MAX_AGG_CNT_H,4,2     ## @MTK_RING_MAX_AGG_CNT_H
	.comm	_MTK_MAX_RX_RING_NUM,4,2        ## @MTK_MAX_RX_RING_NUM
	.comm	_MTK_L3_CKS_UPD_EN,4,2          ## @MTK_L3_CKS_UPD_EN
	.comm	_MTK_LRO_ALT_PKT_CNT_MODE,4,2   ## @MTK_LRO_ALT_PKT_CNT_MODE
	.comm	_MTK_HW_LRO_BW_THRE,4,2         ## @MTK_HW_LRO_BW_THRE
	.comm	_MTK_PDMA_LRO_CTRL_DW2,4,2      ## @MTK_PDMA_LRO_CTRL_DW2
	.comm	_MTK_HW_LRO_REPLACE_DELTA,4,2   ## @MTK_HW_LRO_REPLACE_DELTA
	.comm	_MTK_PDMA_LRO_ALT_SCORE_DELTA,4,2 ## @MTK_PDMA_LRO_ALT_SCORE_DELTA
	.comm	_MTK_HW_LRO_TIMER_UNIT,4,2      ## @MTK_HW_LRO_TIMER_UNIT
	.comm	_MTK_HW_LRO_REFRESH_TIME,4,2    ## @MTK_HW_LRO_REFRESH_TIME
	.comm	_MTK_PDMA_LRO_ALT_REFRESH_TIMER,4,2 ## @MTK_PDMA_LRO_ALT_REFRESH_TIMER
	.comm	_MTK_ADMA_MODE,4,2              ## @MTK_ADMA_MODE
	.comm	_MTK_HW_LRO_MAX_AGG_CNT,4,2     ## @MTK_HW_LRO_MAX_AGG_CNT
	.comm	_MTK_LRO_MIN_RXD_SDL,4,2        ## @MTK_LRO_MIN_RXD_SDL
	.comm	_MTK_LRO_EN,4,2                 ## @MTK_LRO_EN
	.comm	_MTK_PDMA_LRO_CTRL_DW3,4,2      ## @MTK_PDMA_LRO_CTRL_DW3
	.comm	_MTK_PDMA_LRO_CTRL_DW0,4,2      ## @MTK_PDMA_LRO_CTRL_DW0
	.no_dead_strip	_mtk_hwlro_rx_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_hwlro_rx_init
_mtk_hwlro_rx_init:                     ; @mtk_hwlro_rx_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
Lloh0:
	adrp	x24, _MTK_MAX_RX_RING_NUM@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MTK_MAX_RX_RING_NUM@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _MTK_RING_AUTO_LERAN_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MTK_RING_AUTO_LERAN_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _MTK_RING_VLD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MTK_RING_VLD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _MTK_RING_AGE_TIME_H@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MTK_RING_AGE_TIME_H@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh10:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh11:
	adrp	x9, _MTK_RING_AGE_TIME_L@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MTK_RING_AGE_TIME_L@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x9]
Lloh14:
	adrp	x9, _MTK_RING_MAX_AGG_TIME@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MTK_RING_MAX_AGG_TIME@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _MTK_RING_MAX_AGG_CNT_L@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MTK_RING_MAX_AGG_CNT_L@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w21, w8, w9
Lloh20:
	adrp	x8, _MTK_RING_MAX_AGG_CNT_H@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MTK_RING_MAX_AGG_CNT_H@GOTPAGEOFF]
Lloh22:
	ldr	w22, [x8]
	mov	w23, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_MTK_LRO_CTRL_DW1_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_w32
	mov	x0, x23
	bl	_MTK_LRO_CTRL_DW2_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_mtk_w32
	mov	x0, x23
	bl	_MTK_LRO_CTRL_DW3_CFG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_mtk_w32
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.lt	LBB0_2
LBB0_3:
Lloh23:
	adrp	x8, _MTK_L3_CKS_UPD_EN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MTK_L3_CKS_UPD_EN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _MTK_LRO_ALT_PKT_CNT_MODE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MTK_LRO_ALT_PKT_CNT_MODE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh29:
	adrp	x8, _MTK_HW_LRO_BW_THRE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MTK_HW_LRO_BW_THRE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _MTK_PDMA_LRO_CTRL_DW2@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MTK_PDMA_LRO_CTRL_DW2@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_w32
Lloh35:
	adrp	x8, _MTK_HW_LRO_REPLACE_DELTA@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MTK_HW_LRO_REPLACE_DELTA@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _MTK_PDMA_LRO_ALT_SCORE_DELTA@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MTK_PDMA_LRO_ALT_SCORE_DELTA@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_w32
Lloh41:
	adrp	x8, _MTK_HW_LRO_TIMER_UNIT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MTK_HW_LRO_TIMER_UNIT@GOTPAGEOFF]
Lloh43:
	adrp	x9, _MTK_HW_LRO_REFRESH_TIME@GOTPAGE
Lloh44:
	ldr	x9, [x9, _MTK_HW_LRO_REFRESH_TIME@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	ldr	w9, [x9]
	orr	w1, w9, w8, lsl #16
Lloh47:
	adrp	x8, _MTK_PDMA_LRO_ALT_REFRESH_TIMER@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MTK_PDMA_LRO_ALT_REFRESH_TIMER@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_w32
Lloh50:
	adrp	x8, _MTK_ADMA_MODE@GOTPAGE
Lloh51:
	ldr	x8, [x8, _MTK_ADMA_MODE@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
Lloh53:
	adrp	x9, _MTK_HW_LRO_MAX_AGG_CNT@GOTPAGE
Lloh54:
	ldr	x9, [x9, _MTK_HW_LRO_MAX_AGG_CNT@GOTPAGEOFF]
	ldrb	w9, [x9]
	orr	w8, w9, w8
Lloh55:
	adrp	x9, _MTK_LRO_MIN_RXD_SDL@GOTPAGE
Lloh56:
	ldr	x9, [x9, _MTK_LRO_MIN_RXD_SDL@GOTPAGEOFF]
Lloh57:
	ldr	w9, [x9]
Lloh58:
	adrp	x10, _MTK_LRO_EN@GOTPAGE
Lloh59:
	ldr	x10, [x10, _MTK_LRO_EN@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh60:
	ldr	w8, [x10]
	orr	w20, w20, w8
Lloh61:
	adrp	x8, _MTK_PDMA_LRO_CTRL_DW3@GOTPAGE
Lloh62:
	ldr	x8, [x8, _MTK_PDMA_LRO_CTRL_DW3@GOTPAGEOFF]
Lloh63:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mtk_w32
Lloh64:
	adrp	x8, _MTK_PDMA_LRO_CTRL_DW0@GOTPAGE
Lloh65:
	ldr	x8, [x8, _MTK_PDMA_LRO_CTRL_DW0@GOTPAGEOFF]
Lloh66:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_w32
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.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 AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh45
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_RING_AUTO_LERAN_MODE,4,2   ; @MTK_RING_AUTO_LERAN_MODE
	.comm	_MTK_RING_VLD,4,2               ; @MTK_RING_VLD
	.comm	_MTK_RING_AGE_TIME_H,4,2        ; @MTK_RING_AGE_TIME_H
	.comm	_MTK_RING_AGE_TIME_L,4,2        ; @MTK_RING_AGE_TIME_L
	.comm	_MTK_RING_MAX_AGG_TIME,4,2      ; @MTK_RING_MAX_AGG_TIME
	.comm	_MTK_RING_MAX_AGG_CNT_L,4,2     ; @MTK_RING_MAX_AGG_CNT_L
	.comm	_MTK_RING_MAX_AGG_CNT_H,4,2     ; @MTK_RING_MAX_AGG_CNT_H
	.comm	_MTK_MAX_RX_RING_NUM,4,2        ; @MTK_MAX_RX_RING_NUM
	.comm	_MTK_L3_CKS_UPD_EN,4,2          ; @MTK_L3_CKS_UPD_EN
	.comm	_MTK_LRO_ALT_PKT_CNT_MODE,4,2   ; @MTK_LRO_ALT_PKT_CNT_MODE
	.comm	_MTK_HW_LRO_BW_THRE,4,2         ; @MTK_HW_LRO_BW_THRE
	.comm	_MTK_PDMA_LRO_CTRL_DW2,4,2      ; @MTK_PDMA_LRO_CTRL_DW2
	.comm	_MTK_HW_LRO_REPLACE_DELTA,4,2   ; @MTK_HW_LRO_REPLACE_DELTA
	.comm	_MTK_PDMA_LRO_ALT_SCORE_DELTA,4,2 ; @MTK_PDMA_LRO_ALT_SCORE_DELTA
	.comm	_MTK_HW_LRO_TIMER_UNIT,4,2      ; @MTK_HW_LRO_TIMER_UNIT
	.comm	_MTK_HW_LRO_REFRESH_TIME,4,2    ; @MTK_HW_LRO_REFRESH_TIME
	.comm	_MTK_PDMA_LRO_ALT_REFRESH_TIMER,4,2 ; @MTK_PDMA_LRO_ALT_REFRESH_TIMER
	.comm	_MTK_ADMA_MODE,4,2              ; @MTK_ADMA_MODE
	.comm	_MTK_HW_LRO_MAX_AGG_CNT,4,2     ; @MTK_HW_LRO_MAX_AGG_CNT
	.comm	_MTK_LRO_MIN_RXD_SDL,4,2        ; @MTK_LRO_MIN_RXD_SDL
	.comm	_MTK_LRO_EN,4,2                 ; @MTK_LRO_EN
	.comm	_MTK_PDMA_LRO_CTRL_DW3,4,2      ; @MTK_PDMA_LRO_CTRL_DW3
	.comm	_MTK_PDMA_LRO_CTRL_DW0,4,2      ; @MTK_PDMA_LRO_CTRL_DW0
	.no_dead_strip	_mtk_hwlro_rx_init
.subsections_via_symbols
