	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rdi
	movq	_MAC_CFG1_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %rsi
	callq	_of_property_read_bool
	movq	_MAC_CFG1_TFC@GOTPCREL(%rip), %rcx
	movq	_MAC_CFG1_RFC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%ecx, %edx
	orl	%r14d, %edx
	movq	_AG71XX_REG_MAC_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %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	%rbx, %rdi
	callq	_ag71xx_sb
	movq	_AG71XX_REG_MAC_MFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %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	%rbx, %rdi
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ag71xx_wr
	movq	_AG71XX_REG_FIFO_CFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movl	4(%rax), %edx
	movq	%rbx, %rdi
	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	%rbx, %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	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ag71xx_wr                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CFG1_INIT,4,2              ## @MAC_CFG1_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flow-control"

	.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
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
Lloh0:
	adrp	x8, _MAC_CFG1_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAC_CFG1_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_property_read_bool
Lloh5:
	adrp	x8, _MAC_CFG1_TFC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAC_CFG1_TFC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MAC_CFG1_RFC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAC_CFG1_RFC@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w20
Lloh11:
	adrp	x8, _AG71XX_REG_MAC_CFG1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AG71XX_REG_MAC_CFG1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh14:
	adrp	x8, _AG71XX_REG_MAC_CFG2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AG71XX_REG_MAC_CFG2@GOTPAGEOFF]
Lloh16:
	adrp	x9, _MAC_CFG2_PAD_CRC_EN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MAC_CFG2_PAD_CRC_EN@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	ldr	w8, [x9]
Lloh20:
	adrp	x9, _MAC_CFG2_LEN_CHECK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MAC_CFG2_LEN_CHECK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ag71xx_sb
Lloh23:
	adrp	x8, _AG71XX_REG_MAC_MFL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AG71XX_REG_MAC_MFL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ag71xx_wr
Lloh26:
	adrp	x8, _AG71XX_REG_FIFO_CFG0@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG0@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _FIFO_CFG0_INIT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FIFO_CFG0_INIT@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh32:
	adrp	x8, _AG71XX_REG_FIFO_CFG1@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG1@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh35:
	adrp	x8, _AG71XX_REG_FIFO_CFG2@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG2@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh38:
	adrp	x8, _AG71XX_REG_FIFO_CFG4@GOTPAGE
Lloh39:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG4@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
Lloh41:
	adrp	x8, _FIFO_CFG4_INIT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _FIFO_CFG4_INIT@GOTPAGEOFF]
Lloh43:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_wr
Lloh44:
	adrp	x8, _AG71XX_REG_FIFO_CFG5@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AG71XX_REG_FIFO_CFG5@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x8, _FIFO_CFG5_INIT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _FIFO_CFG5_INIT@GOTPAGEOFF]
Lloh49:
	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	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.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
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CFG1_INIT,4,2              ; @MAC_CFG1_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flow-control"

	.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
