	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_mac_reset
_cas_mac_reset:                         ## @cas_mac_reset
	.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	_REG_MAC_TX_RESET@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	(%rdi), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_REG_MAC_RX_RESET@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%r13), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_STOP_TRIES@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	testl	%ebx, %ebx
	jle	LBB0_8
## %bb.1:
	incl	%ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_2
LBB0_4:
	movl	(%r14), %ebx
	testl	%ebx, %ebx
	jle	LBB0_8
## %bb.5:
	incl	%ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	(%r13), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_6
LBB0_8:
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r14d
	movq	(%r12), %rdi
	addq	(%r13), %rdi
	callq	_readl
	orl	%r14d, %eax
	je	LBB0_9
## %bb.10:
	movl	8(%r13), %r14d
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r15d
	movq	(%r12), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_REG_MAC_STATE_MACHINE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_err                     ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MAC_TX_RESET,8,3           ## @REG_MAC_TX_RESET
	.comm	_REG_MAC_RX_RESET,8,3           ## @REG_MAC_RX_RESET
	.comm	_STOP_TRIES,4,2                 ## @STOP_TRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac tx[%d]/rx[%d] reset failed [%08x]\n"

	.comm	_REG_MAC_STATE_MACHINE,8,3      ## @REG_MAC_STATE_MACHINE
	.no_dead_strip	_cas_mac_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_mac_reset
_cas_mac_reset:                         ; @cas_mac_reset
	.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	x8, [x0]
Lloh0:
	adrp	x21, _REG_MAC_TX_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_MAC_TX_RESET@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	x8, [x19]
Lloh2:
	adrp	x22, _REG_MAC_RX_RESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _REG_MAC_RX_RESET@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
Lloh4:
	adrp	x20, _STOP_TRIES@GOTPAGE
Lloh5:
	ldr	x20, [x20, _STOP_TRIES@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	add	w23, w8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	bl	_udelay
	sub	w23, w23, #1
	cmp	w23, #1
	b.gt	LBB0_2
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	add	w20, w8, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #10
	bl	_udelay
	sub	w20, w20, #1
	cmp	w20, #1
	b.gt	LBB0_6
LBB0_8:
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	orr	w8, w0, w20
	cbz	w8, LBB0_10
; %bb.9:
	ldr	w20, [x19, #8]
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _REG_MAC_STATE_MACHINE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _REG_MAC_STATE_MACHINE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x0
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	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
	b	_netdev_err
LBB0_10:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MAC_TX_RESET,8,3           ; @REG_MAC_TX_RESET
	.comm	_REG_MAC_RX_RESET,8,3           ; @REG_MAC_RX_RESET
	.comm	_STOP_TRIES,4,2                 ; @STOP_TRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac tx[%d]/rx[%d] reset failed [%08x]\n"

	.comm	_REG_MAC_STATE_MACHINE,8,3      ; @REG_MAC_STATE_MACHINE
	.no_dead_strip	_cas_mac_reset
.subsections_via_symbols
