	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tja11xx_wakeup
_tja11xx_wakeup:                        ## @tja11xx_wakeup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_MII_ECTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	_MII_ECTRL_POWER_MODE_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	andl	%edx, %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$130, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r14), %esi
	movq	_MII_ECTRL_WAKE_REQUEST@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_phy_set_bits
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_phy_clear_bits
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_7:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$128, %ecx
	callq	_phy_modify_check
	testl	%eax, %eax
	jne	LBB0_6
## %bb.8:
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$130, %ecx
	callq	_phy_modify
	testl	%eax, %eax
	jne	LBB0_6
## %bb.9:
	movq	_MII_GENSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MII_GENSTAT_PLL_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_phy_modify_check
	testl	%eax, %eax
	je	LBB0_10
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tja11xx_enable_link_control    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ECTRL,4,2                  ## @MII_ECTRL
	.comm	_MII_ECTRL_POWER_MODE_MASK,4,2  ## @MII_ECTRL_POWER_MODE_MASK
	.comm	_MII_ECTRL_WAKE_REQUEST,4,2     ## @MII_ECTRL_WAKE_REQUEST
	.comm	_MII_GENSTAT,4,2                ## @MII_GENSTAT
	.comm	_MII_GENSTAT_PLL_LOCKED,4,2     ## @MII_GENSTAT_PLL_LOCKED
	.no_dead_strip	_tja11xx_wakeup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tja11xx_wakeup
_tja11xx_wakeup:                        ; @tja11xx_wakeup
	.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	x19, x0
Lloh0:
	adrp	x20, _MII_ECTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MII_ECTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_phy_read
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh2:
	adrp	x21, _MII_ECTRL_POWER_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MII_ECTRL_POWER_MODE_MASK@GOTPAGEOFF]
	ldr	w2, [x21]
	and	w8, w2, w0
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #130
	b.ne	LBB0_5
; %bb.3:
	ldr	w1, [x20]
Lloh4:
	adrp	x21, _MII_ECTRL_WAKE_REQUEST@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MII_ECTRL_WAKE_REQUEST@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_phy_set_bits
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_phy_clear_bits
	cbnz	w0, LBB0_9
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w3, #128
	bl	_phy_modify_check
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #130
	bl	_phy_modify
	cbnz	w0, LBB0_9
; %bb.8:
Lloh6:
	adrp	x8, _MII_GENSTAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_GENSTAT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MII_GENSTAT_PLL_LOCKED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_GENSTAT_PLL_LOCKED@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	bl	_phy_modify_check
	cbz	w0, LBB0_10
LBB0_9:
	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_10:
	mov	x0, x19
	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
	b	_tja11xx_enable_link_control
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ECTRL,4,2                  ; @MII_ECTRL
	.comm	_MII_ECTRL_POWER_MODE_MASK,4,2  ; @MII_ECTRL_POWER_MODE_MASK
	.comm	_MII_ECTRL_WAKE_REQUEST,4,2     ; @MII_ECTRL_WAKE_REQUEST
	.comm	_MII_GENSTAT,4,2                ; @MII_GENSTAT
	.comm	_MII_GENSTAT_PLL_LOCKED,4,2     ; @MII_GENSTAT_PLL_LOCKED
	.no_dead_strip	_tja11xx_wakeup
.subsections_via_symbols
