	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function falcon_reset_macs
_falcon_reset_macs:                     ## @falcon_reset_macs
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	callq	_ef4_nic_rev
	movq	_EF4_REV_FALCON_B0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_FRF_AB_XM_CORE_RST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$1, %edx
	callq	_EF4_POPULATE_OWORD_1
	movq	_FR_AB_XM_GLB_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ef4_writeo
	movl	$10000, %r14d                   ## imm = 0x2710
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ef4_reado
	movl	-44(%rbp), %edi
	movl	(%r12), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%r14d
	jne	LBB0_2
## %bb.4:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_5:
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	movq	_FR_AB_MAC_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	-48(%rbp), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ef4_reado
	movl	-48(%rbp), %edi
	movq	_FRF_BB_TXFIFO_DRAIN_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_EF4_SET_OWORD_FIELD
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ef4_writeo
	movq	_FR_AB_GLB_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ef4_reado
	movl	-44(%rbp), %edi
	movq	_FRF_AB_RST_XGTX@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$1, %edx
	callq	_EF4_SET_OWORD_FIELD
	movl	-44(%rbp), %edi
	movq	_FRF_AB_RST_XGRX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_EF4_SET_OWORD_FIELD
	movl	-44(%rbp), %edi
	movq	_FRF_AB_RST_EM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_EF4_SET_OWORD_FIELD
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ef4_writeo
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ef4_reado
	movl	-44(%rbp), %edi
	movl	(%r12), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %edi
	movq	_FRF_AB_RST_XGRX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %edi
	movq	_FRF_AB_RST_EM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_EF4_OWORD_FIELD
	testq	%rax, %rax
	je	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$21, %ebx
	je	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	movl	$10, %edi
	callq	_udelay
	jmp	LBB0_6
LBB0_11:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
LBB0_12:
	movq	_FR_AB_MAC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ef4_writeo
	movq	%r15, %rdi
	callq	_falcon_setup_xaui
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r15, %rdi
	movl	%ebx, %r8d
	callq	_netif_dbg
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EF4_REV_FALCON_B0,8,3          ## @EF4_REV_FALCON_B0
	.comm	_FRF_AB_XM_CORE_RST,4,2         ## @FRF_AB_XM_CORE_RST
	.comm	_FR_AB_XM_GLB_CFG,4,2           ## @FR_AB_XM_GLB_CFG
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for XMAC core reset\n"

	.comm	_FR_AB_MAC_CTRL,4,2             ## @FR_AB_MAC_CTRL
	.comm	_FRF_BB_TXFIFO_DRAIN_EN,4,2     ## @FRF_BB_TXFIFO_DRAIN_EN
	.comm	_FR_AB_GLB_CTL,4,2              ## @FR_AB_GLB_CTL
	.comm	_FRF_AB_RST_XGTX,4,2            ## @FRF_AB_RST_XGTX
	.comm	_FRF_AB_RST_XGRX,4,2            ## @FRF_AB_RST_XGRX
	.comm	_FRF_AB_RST_EM,4,2              ## @FRF_AB_RST_EM
L_.str.1:                               ## @.str.1
	.asciz	"Completed MAC reset after %d loops\n"

L_.str.2:                               ## @.str.2
	.asciz	"MAC reset failed\n"

	.no_dead_strip	_falcon_reset_macs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function falcon_reset_macs
_falcon_reset_macs:                     ; @falcon_reset_macs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x20, [x0, #8]
	bl	_ef4_nic_rev
Lloh0:
	adrp	x8, _EF4_REV_FALCON_B0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EF4_REV_FALCON_B0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_5
; %bb.1:
Lloh3:
	adrp	x21, _FRF_AB_XM_CORE_RST@GOTPAGE
Lloh4:
	ldr	x21, [x21, _FRF_AB_XM_CORE_RST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #1
	bl	_EF4_POPULATE_OWORD_1
Lloh5:
	adrp	x22, _FR_AB_XM_GLB_CFG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _FR_AB_XM_GLB_CFG@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_writeo
	mov	w23, #10000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_reado
	ldr	w0, [sp, #12]
	ldr	w1, [x21]
	bl	_EF4_OWORD_FIELD
	cbz	x0, LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	bl	_udelay
	subs	w23, w23, #1
	b.ne	LBB0_2
; %bb.4:
Lloh7:
	adrp	x8, _hw@GOTPAGE
Lloh8:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh10:
	adrp	x3, l_.str@PAGE
Lloh11:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_5:
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
Lloh12:
	adrp	x21, _FR_AB_MAC_CTRL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _FR_AB_MAC_CTRL@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ef4_reado
	ldr	w0, [sp, #8]
Lloh14:
	adrp	x8, _FRF_BB_TXFIFO_DRAIN_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FRF_BB_TXFIFO_DRAIN_EN@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_EF4_SET_OWORD_FIELD
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ef4_writeo
Lloh17:
	adrp	x22, _FR_AB_GLB_CTL@GOTPAGE
Lloh18:
	ldr	x22, [x22, _FR_AB_GLB_CTL@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_reado
	ldr	w0, [sp, #12]
Lloh19:
	adrp	x23, _FRF_AB_RST_XGTX@GOTPAGE
Lloh20:
	ldr	x23, [x23, _FRF_AB_RST_XGTX@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w2, #1
	bl	_EF4_SET_OWORD_FIELD
	ldr	w0, [sp, #12]
Lloh21:
	adrp	x24, _FRF_AB_RST_XGRX@GOTPAGE
Lloh22:
	ldr	x24, [x24, _FRF_AB_RST_XGRX@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w2, #1
	bl	_EF4_SET_OWORD_FIELD
	ldr	w0, [sp, #12]
Lloh23:
	adrp	x25, _FRF_AB_RST_EM@GOTPAGE
Lloh24:
	ldr	x25, [x25, _FRF_AB_RST_EM@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w2, #1
	bl	_EF4_SET_OWORD_FIELD
	ldr	w2, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_writeo
	mov	w20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x22]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ef4_reado
	ldr	w0, [sp, #12]
	ldr	w1, [x23]
	bl	_EF4_OWORD_FIELD
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #12]
	ldr	w1, [x24]
	bl	_EF4_OWORD_FIELD
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #12]
	ldr	w1, [x25]
	bl	_EF4_OWORD_FIELD
	cbz	x0, LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w20, #21
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w20, #1
	mov	w0, #10
	bl	_udelay
	b	LBB0_6
LBB0_11:
Lloh25:
	adrp	x8, _hw@GOTPAGE
Lloh26:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh28:
	adrp	x3, l_.str.2@PAGE
Lloh29:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_12:
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x19
	bl	_ef4_writeo
	mov	x0, x19
	bl	_falcon_setup_xaui
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
Lloh30:
	adrp	x8, _hw@GOTPAGE
Lloh31:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh33:
	adrp	x3, l_.str.1@PAGE
Lloh34:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_netif_dbg
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EF4_REV_FALCON_B0,8,3          ; @EF4_REV_FALCON_B0
	.comm	_FRF_AB_XM_CORE_RST,4,2         ; @FRF_AB_XM_CORE_RST
	.comm	_FR_AB_XM_GLB_CFG,4,2           ; @FR_AB_XM_GLB_CFG
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for XMAC core reset\n"

	.comm	_FR_AB_MAC_CTRL,4,2             ; @FR_AB_MAC_CTRL
	.comm	_FRF_BB_TXFIFO_DRAIN_EN,4,2     ; @FRF_BB_TXFIFO_DRAIN_EN
	.comm	_FR_AB_GLB_CTL,4,2              ; @FR_AB_GLB_CTL
	.comm	_FRF_AB_RST_XGTX,4,2            ; @FRF_AB_RST_XGTX
	.comm	_FRF_AB_RST_XGRX,4,2            ; @FRF_AB_RST_XGRX
	.comm	_FRF_AB_RST_EM,4,2              ; @FRF_AB_RST_EM
l_.str.1:                               ; @.str.1
	.asciz	"Completed MAC reset after %d loops\n"

l_.str.2:                               ; @.str.2
	.asciz	"MAC reset failed\n"

	.no_dead_strip	_falcon_reset_macs
.subsections_via_symbols
