	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_hw_init
_ag71xx_hw_init:                        ## @ag71xx_hw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_ag71xx_hw_stop
	movq	_AG71XX_REG_MAC_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAC_CFG1_SR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ag71xx_sb
	movl	$20, %edi
	callq	_udelay
	movq	8(%rbx), %rdi
	callq	_reset_control_assert
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_reset_control_assert
LBB0_2:
	movl	$100, %edi
	callq	_msleep
	movq	8(%rbx), %rdi
	callq	_reset_control_deassert
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_reset_control_deassert
LBB0_4:
	movl	$200, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_ag71xx_hw_setup
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ag71xx_dma_reset               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AG71XX_REG_MAC_CFG1,4,2        ## @AG71XX_REG_MAC_CFG1
	.comm	_MAC_CFG1_SR,4,2                ## @MAC_CFG1_SR
	.no_dead_strip	_ag71xx_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_hw_init
_ag71xx_hw_init:                        ; @ag71xx_hw_init
	.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_hw_stop
Lloh0:
	adrp	x8, _AG71XX_REG_MAC_CFG1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AG71XX_REG_MAC_CFG1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MAC_CFG1_SR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAC_CFG1_SR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ag71xx_sb
	mov	w0, #20
	bl	_udelay
	ldr	x0, [x19, #8]
	bl	_reset_control_assert
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_reset_control_assert
LBB0_2:
	mov	w0, #100
	bl	_msleep
	ldr	x0, [x19, #8]
	bl	_reset_control_deassert
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_reset_control_deassert
LBB0_4:
	mov	w0, #200
	bl	_msleep
	mov	x0, x19
	bl	_ag71xx_hw_setup
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ag71xx_dma_reset
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AG71XX_REG_MAC_CFG1,4,2        ; @AG71XX_REG_MAC_CFG1
	.comm	_MAC_CFG1_SR,4,2                ; @MAC_CFG1_SR
	.no_dead_strip	_ag71xx_hw_init
.subsections_via_symbols
