	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_mac
_reset_mac:                             ## @reset_mac
	.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, %r15
	movl	(%rdi), %r14d
	movq	_command_config@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_tse_csroffs
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_csrrd32
	movq	_MAC_CMDCFG_TX_ENA@GOTPCREL(%rip), %rcx
	movq	_MAC_CMDCFG_RX_ENA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	movq	_MAC_CMDCFG_SW_RESET@GOTPCREL(%rip), %rsi
	movq	_MAC_CMDCFG_CNT_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rsi), %ebx
	andl	%eax, %edx
	orl	%edx, %ebx
	movl	(%r15), %r14d
	movq	%r12, %r13
	movl	(%r12), %edi
	callq	_tse_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movq	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	movl	(%r13), %edi
	callq	_tse_csroffs
	movq	_MAC_CMDCFG_SW_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_tse_bit_is_clear
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	leal	1(%r12), %edx
	movl	(%r14), %ecx
	cmpl	%ecx, %r12d
	movl	%edx, %r12d
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movl	$1, %edx
	jmp	LBB0_6
LBB0_4:
	movl	(%r14), %ecx
	movl	%r12d, %edx
LBB0_6:
	xorl	%eax, %eax
	cmpl	%ecx, %edx
	jl	LBB0_8
## %bb.7:
	movl	(%r15), %ebx
	movl	(%r13), %edi
	callq	_tse_csroffs
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_csrrd32
	movq	_MAC_CMDCFG_SW_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r15), %r14d
	movl	(%r13), %edi
	callq	_tse_csroffs
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_csrwr32
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_command_config,4,2             ## @command_config
	.comm	_MAC_CMDCFG_TX_ENA,4,2          ## @MAC_CMDCFG_TX_ENA
	.comm	_MAC_CMDCFG_RX_ENA,4,2          ## @MAC_CMDCFG_RX_ENA
	.comm	_MAC_CMDCFG_SW_RESET,4,2        ## @MAC_CMDCFG_SW_RESET
	.comm	_MAC_CMDCFG_CNT_RESET,4,2       ## @MAC_CMDCFG_CNT_RESET
	.comm	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR,4,2 ## @ALTERA_TSE_SW_RESET_WATCHDOG_CNTR
	.no_dead_strip	_reset_mac
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_mac
_reset_mac:                             ; @reset_mac
	.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
	ldr	w20, [x0]
Lloh0:
	adrp	x22, _command_config@GOTPAGE
Lloh1:
	ldr	x22, [x22, _command_config@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_tse_csroffs
	mov	x1, x0
	mov	x0, x20
	bl	_csrrd32
Lloh2:
	adrp	x8, _MAC_CMDCFG_TX_ENA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAC_CMDCFG_TX_ENA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _MAC_CMDCFG_RX_ENA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAC_CMDCFG_RX_ENA@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
Lloh8:
	adrp	x23, _MAC_CMDCFG_SW_RESET@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MAC_CMDCFG_SW_RESET@GOTPAGEOFF]
Lloh10:
	adrp	x9, _MAC_CMDCFG_CNT_RESET@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MAC_CMDCFG_CNT_RESET@GOTPAGEOFF]
	ldr	w10, [x23]
Lloh12:
	ldr	w9, [x9]
	orr	w9, w9, w10
	orr	w20, w9, w8
	ldr	w21, [x19]
	ldr	w0, [x22]
	bl	_tse_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_csrwr32
Lloh13:
	adrp	x24, _ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPAGE
Lloh14:
	ldr	x24, [x24, _ALTERA_TSE_SW_RESET_WATCHDOG_CNTR@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w21, #1
	cmp	w8, #1
	b.lt	LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x19]
	ldr	w0, [x22]
	bl	_tse_csroffs
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x20
	bl	_tse_bit_is_clear
	cbnz	x0, LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w9, w21, #1
	ldr	w8, [x24]
	cmp	w21, w8
	mov	x21, x9
	b.lt	LBB0_1
; %bb.3:
	mov	x21, x9
LBB0_4:
	cmp	w21, w8
	b.ge	LBB0_7
LBB0_5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	ldr	w8, [x24]
	cmp	w21, w8
	b.lt	LBB0_5
LBB0_7:
	ldr	w20, [x19]
	ldr	w0, [x22]
	bl	_tse_csroffs
	mov	x1, x0
	mov	x0, x20
	bl	_csrrd32
	ldr	w8, [x23]
	bic	w20, w0, w8
	ldr	w19, [x19]
	ldr	w0, [x22]
	bl	_tse_csroffs
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_csrwr32
	mov	w0, #-1
LBB0_8:
	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	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_command_config,4,2             ; @command_config
	.comm	_MAC_CMDCFG_TX_ENA,4,2          ; @MAC_CMDCFG_TX_ENA
	.comm	_MAC_CMDCFG_RX_ENA,4,2          ; @MAC_CMDCFG_RX_ENA
	.comm	_MAC_CMDCFG_SW_RESET,4,2        ; @MAC_CMDCFG_SW_RESET
	.comm	_MAC_CMDCFG_CNT_RESET,4,2       ; @MAC_CMDCFG_CNT_RESET
	.comm	_ALTERA_TSE_SW_RESET_WATCHDOG_CNTR,4,2 ; @ALTERA_TSE_SW_RESET_WATCHDOG_CNTR
	.no_dead_strip	_reset_mac
.subsections_via_symbols
