	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_hw_setup
_ag71xx_hw_setup:                       ## @ag71xx_hw_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_ag71xx_get_pdata
	movq	%rax, %r14
	movq	_MAC_CFG1_INIT@GOTPCREL(%rip), %rax
	movq	_MAC_CFG1_TFC@GOTPCREL(%rip), %rcx
	movq	_MAC_CFG1_RFC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ecx, %ecx
	cmpq	$0, 8(%r14)
	cmovel	%ecx, %edx
	orl	(%rax), %edx
	movq	_AG71XX_REG_MAC_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ag71xx_wr
	movq	_AG71XX_REG_MAC_CFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAC_CFG2_PAD_CRC_EN@GOTPCREL(%rip), %rax
	movq	_MAC_CFG2_LEN_CHECK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_ag71xx_sb
	movq	_AG71XX_REG_MAC_MFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FIFO_CFG0_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_ag71xx_wr
	cmpq	$0, (%r14)
	movq	_AG71XX_REG_FIFO_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$268369920, %eax                ## imm = 0xFFF0000
	movl	$1114111, %edx                  ## imm = 0x10FFFF
	cmovel	%eax, %edx
	movl	$8191, %eax                     ## imm = 0x1FFF
	movl	$22347946, %ebx                 ## imm = 0x15500AA
	cmovel	%eax, %ebx
	movq	%r15, %rdi
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FIFO_CFG4_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FIFO_CFG5_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ag71xx_wr                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CFG1_INIT,4,2              ## @MAC_CFG1_INIT
	.comm	_MAC_CFG1_TFC,4,2               ## @MAC_CFG1_TFC
	.comm	_MAC_CFG1_RFC,4,2               ## @MAC_CFG1_RFC
	.comm	_AG71XX_REG_MAC_CFG1,4,2        ## @AG71XX_REG_MAC_CFG1
	.comm	_AG71XX_REG_MAC_CFG2,4,2        ## @AG71XX_REG_MAC_CFG2
	.comm	_MAC_CFG2_PAD_CRC_EN,4,2        ## @MAC_CFG2_PAD_CRC_EN
	.comm	_MAC_CFG2_LEN_CHECK,4,2         ## @MAC_CFG2_LEN_CHECK
	.comm	_AG71XX_REG_MAC_MFL,4,2         ## @AG71XX_REG_MAC_MFL
	.comm	_AG71XX_REG_FIFO_CFG0,4,2       ## @AG71XX_REG_FIFO_CFG0
	.comm	_FIFO_CFG0_INIT,4,2             ## @FIFO_CFG0_INIT
	.comm	_AG71XX_REG_FIFO_CFG1,4,2       ## @AG71XX_REG_FIFO_CFG1
	.comm	_AG71XX_REG_FIFO_CFG2,4,2       ## @AG71XX_REG_FIFO_CFG2
	.comm	_AG71XX_REG_FIFO_CFG4,4,2       ## @AG71XX_REG_FIFO_CFG4
	.comm	_FIFO_CFG4_INIT,4,2             ## @FIFO_CFG4_INIT
	.comm	_AG71XX_REG_FIFO_CFG5,4,2       ## @AG71XX_REG_FIFO_CFG5
	.comm	_FIFO_CFG5_INIT,4,2             ## @FIFO_CFG5_INIT
	.no_dead_strip	_ag71xx_hw_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_hw_setup
_ag71xx_hw_setup:                       ; @ag71xx_hw_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_ag71xx_get_pdata
	mov	x20, x0
Lloh0:
	adrp	x8, _MAC_CFG1_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAC_CFG1_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MAC_CFG1_TFC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAC_CFG1_TFC@GOTPAGEOFF]
	ldr	x10, [x0, #8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x11, _MAC_CFG1_RFC@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MAC_CFG1_RFC@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w9, w11, w9
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w2, w9, w8
Lloh9:
	adrp	x8, _AG71XX_REG_MAC_CFG1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AG71XX_REG_MAC_CFG1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh12:
	adrp	x8, _AG71XX_REG_MAC_CFG2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AG71XX_REG_MAC_CFG2@GOTPAGEOFF]
Lloh14:
	adrp	x9, _MAC_CFG2_PAD_CRC_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MAC_CFG2_PAD_CRC_EN@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _MAC_CFG2_LEN_CHECK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MAC_CFG2_LEN_CHECK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ag71xx_sb
Lloh21:
	adrp	x8, _AG71XX_REG_MAC_MFL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AG71XX_REG_MAC_MFL@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ag71xx_wr
Lloh24:
	adrp	x8, _AG71XX_REG_FIFO_CFG0@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG0@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _FIFO_CFG0_INIT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FIFO_CFG0_INIT@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
	ldr	x8, [x20]
Lloh30:
	adrp	x9, _AG71XX_REG_FIFO_CFG1@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AG71XX_REG_FIFO_CFG1@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x9]
	cmp	x8, #0
	mov	w8, #1114111
	mov	w9, #268369920
	csel	w2, w9, w8, eq
	mov	w8, #170
	movk	w8, #341, lsl #16
	mov	w9, #8191
	csel	w20, w9, w8, eq
	mov	x0, x19
	bl	_ag71xx_wr
Lloh33:
	adrp	x8, _AG71XX_REG_FIFO_CFG2@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG2@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_ag71xx_wr
Lloh36:
	adrp	x8, _AG71XX_REG_FIFO_CFG4@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG4@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x8, _FIFO_CFG4_INIT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FIFO_CFG4_INIT@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh42:
	adrp	x8, _AG71XX_REG_FIFO_CFG5@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG5@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x8, _FIFO_CFG5_INIT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _FIFO_CFG5_INIT@GOTPAGEOFF]
Lloh47:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ag71xx_wr
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CFG1_INIT,4,2              ; @MAC_CFG1_INIT
	.comm	_MAC_CFG1_TFC,4,2               ; @MAC_CFG1_TFC
	.comm	_MAC_CFG1_RFC,4,2               ; @MAC_CFG1_RFC
	.comm	_AG71XX_REG_MAC_CFG1,4,2        ; @AG71XX_REG_MAC_CFG1
	.comm	_AG71XX_REG_MAC_CFG2,4,2        ; @AG71XX_REG_MAC_CFG2
	.comm	_MAC_CFG2_PAD_CRC_EN,4,2        ; @MAC_CFG2_PAD_CRC_EN
	.comm	_MAC_CFG2_LEN_CHECK,4,2         ; @MAC_CFG2_LEN_CHECK
	.comm	_AG71XX_REG_MAC_MFL,4,2         ; @AG71XX_REG_MAC_MFL
	.comm	_AG71XX_REG_FIFO_CFG0,4,2       ; @AG71XX_REG_FIFO_CFG0
	.comm	_FIFO_CFG0_INIT,4,2             ; @FIFO_CFG0_INIT
	.comm	_AG71XX_REG_FIFO_CFG1,4,2       ; @AG71XX_REG_FIFO_CFG1
	.comm	_AG71XX_REG_FIFO_CFG2,4,2       ; @AG71XX_REG_FIFO_CFG2
	.comm	_AG71XX_REG_FIFO_CFG4,4,2       ; @AG71XX_REG_FIFO_CFG4
	.comm	_FIFO_CFG4_INIT,4,2             ; @FIFO_CFG4_INIT
	.comm	_AG71XX_REG_FIFO_CFG5,4,2       ; @AG71XX_REG_FIFO_CFG5
	.comm	_FIFO_CFG5_INIT,4,2             ; @FIFO_CFG5_INIT
	.no_dead_strip	_ag71xx_hw_setup
.subsections_via_symbols
