	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fec_enet_open
_fec_enet_open:                         ## @fec_enet_open
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	8(%rax), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rdi
	callq	_pinctrl_pm_select_default_state
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_fec_enet_clk_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movb	$1, %r12b
	cmpq	$0, (%rax)
	jne	LBB0_6
LBB0_5:
	xorl	%r12d, %r12d
LBB0_6:
	movq	%r14, %rdi
	callq	_fec_enet_alloc_buffers
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	%r14, %rdi
	callq	_fec_restart
	movq	%r14, %rdi
	callq	_fec_enet_mii_probe
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_fec_enet_free_buffers
LBB0_14:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_fec_enet_clk_enable
LBB0_15:
	movq	8(%r15), %rdi
	callq	_pm_runtime_mark_last_busy
	movq	8(%r15), %rdi
	callq	_pm_runtime_put_autosuspend
	movq	8(%r15), %rdi
	callq	_pinctrl_pm_select_sleep_state
	jmp	LBB0_16
LBB0_1:
	movl	%eax, %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testb	%r12b, %r12b
	jne	LBB0_10
## %bb.9:
	movq	8(%r14), %rdi
	callq	_phy_reset_after_clk_enable
LBB0_10:
	movq	_FEC_QUIRK_ERR006687@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.11:
	xorl	%eax, %eax
	callq	_imx6q_cpuidle_fec_irqs_used
LBB0_12:
	movq	%r15, %rdi
	addq	$16, %rdi
	callq	_napi_enable
	movq	8(%r14), %rdi
	callq	_phy_start
	movq	%r14, %rdi
	callq	_netif_tx_start_all_queues
	movq	_FEC_WOL_FLAG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_device_set_wakeup_enable
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_FEC_QUIRK_ERR006687,4,2        ## @FEC_QUIRK_ERR006687
	.comm	_FEC_WOL_FLAG_ENABLE,4,2        ## @FEC_WOL_FLAG_ENABLE
	.no_dead_strip	_fec_enet_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fec_enet_open
_fec_enet_open:                         ; @fec_enet_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_pinctrl_pm_select_default_state
	mov	x0, x20
	mov	w1, #1
	bl	_fec_enet_clk_enable
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.4:
	mov	w22, #1
	b	LBB0_7
LBB0_5:
	mov	x21, x0
	b	LBB0_12
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x20
	bl	_fec_enet_alloc_buffers
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.8:
	mov	x0, x20
	bl	_fec_restart
	mov	x0, x20
	bl	_fec_enet_mii_probe
	cbz	w0, LBB0_13
; %bb.9:
	mov	x21, x0
	mov	x0, x20
	bl	_fec_enet_free_buffers
LBB0_10:
	mov	x0, x20
	mov	w1, #0
	bl	_fec_enet_clk_enable
LBB0_11:
	ldr	x0, [x19, #8]
	bl	_pm_runtime_mark_last_busy
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_autosuspend
	ldr	x0, [x19, #8]
	bl	_pinctrl_pm_select_sleep_state
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	tbnz	w22, #0, LBB0_15
; %bb.14:
	ldr	x0, [x20, #8]
	bl	_phy_reset_after_clk_enable
LBB0_15:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FEC_QUIRK_ERR006687@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FEC_QUIRK_ERR006687@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
	bl	_imx6q_cpuidle_fec_irqs_used
LBB0_17:
	add	x0, x19, #16
	bl	_napi_enable
	ldr	x0, [x20, #8]
	bl	_phy_start
	mov	x0, x20
	bl	_netif_tx_start_all_queues
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _FEC_WOL_FLAG_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FEC_WOL_FLAG_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w1, w9, w8
	mov	x0, x20
	bl	_device_set_wakeup_enable
	mov	w21, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FEC_QUIRK_ERR006687,4,2        ; @FEC_QUIRK_ERR006687
	.comm	_FEC_WOL_FLAG_ENABLE,4,2        ; @FEC_WOL_FLAG_ENABLE
	.no_dead_strip	_fec_enet_open
.subsections_via_symbols
