	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92d_phy_check_poweroff      ## -- Begin function rtl92d_phy_check_poweroff
	.p2align	4, 0x90
_rtl92d_phy_check_poweroff:             ## @rtl92d_phy_check_poweroff
	.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, %rbx
	callq	_rtl_priv
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rtl_priv
	movq	%rax, %rdi
	callq	_rtl_hal
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_SINGLEMAC_SINGLEPHY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_REG_MAC0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movl	(%rbx), %esi
	movq	_MAC0_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	callq	_rtl_write_byte
	jmp	LBB0_5
LBB0_2:
	movq	_globalmutex_power@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 8(%rbx)
	movq	_REG_MAC0@GOTPCREL(%rip), %r12
	movq	_REG_MAC1@GOTPCREL(%rip), %rax
	movq	%rax, %rbx
	cmoveq	%r12, %rbx
	movl	(%rbx), %esi
	movq	_MAC0_ON@GOTPCREL(%rip), %r15
	movq	_MAC1_ON@GOTPCREL(%rip), %rcx
	movq	%rcx, %r13
	cmoveq	%r15, %r13
	cmoveq	%rax, %r12
	cmoveq	%rcx, %r15
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movl	(%rbx), %esi
	movl	(%r13), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	callq	_rtl_write_byte
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.3:
	movq	_globalmutex_power@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_REG_POWER_OFF_IN_PROCESS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_rtl_read_byte
	movl	%eax, %ebx
	movl	$7, %edi
	callq	_BIT
	orl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_rtl_write_byte
	movq	_globalmutex_power@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	movl	$1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SINGLEMAC_SINGLEPHY,8,3        ## @SINGLEMAC_SINGLEPHY
	.comm	_REG_MAC0,4,2                   ## @REG_MAC0
	.comm	_MAC0_ON,4,2                    ## @MAC0_ON
	.comm	_globalmutex_power,4,2          ## @globalmutex_power
	.comm	_REG_MAC1,4,2                   ## @REG_MAC1
	.comm	_MAC1_ON,4,2                    ## @MAC1_ON
	.comm	_REG_POWER_OFF_IN_PROCESS,4,2   ## @REG_POWER_OFF_IN_PROCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtl92d_phy_check_poweroff      ; -- Begin function rtl92d_phy_check_poweroff
	.p2align	2
_rtl92d_phy_check_poweroff:             ; @rtl92d_phy_check_poweroff
	.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	x20, x0
	bl	_rtl_priv
	mov	x19, x0
	mov	x0, x20
	bl	_rtl_priv
	bl	_rtl_hal
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SINGLEMAC_SINGLEPHY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SINGLEMAC_SINGLEPHY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x20, _REG_MAC0@GOTPAGE
Lloh4:
	ldr	x20, [x20, _REG_MAC0@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _MAC0_ON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAC0_ON@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_rtl_write_byte
	b	LBB0_5
LBB0_2:
	mov	x20, x0
Lloh8:
	adrp	x0, _globalmutex_power@GOTPAGE
Lloh9:
	ldr	x0, [x0, _globalmutex_power@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh10:
	adrp	x8, _REG_MAC1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REG_MAC1@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh12:
	adrp	x10, _REG_MAC0@GOTPAGE
Lloh13:
	ldr	x10, [x10, _REG_MAC0@GOTPAGEOFF]
	cmp	x9, #0
	csel	x20, x10, x8, eq
	ldr	w1, [x20]
Lloh14:
	adrp	x9, _MAC0_ON@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MAC0_ON@GOTPAGEOFF]
Lloh16:
	adrp	x11, _MAC1_ON@GOTPAGE
Lloh17:
	ldr	x11, [x11, _MAC1_ON@GOTPAGEOFF]
	csel	x21, x9, x11, eq
	csel	x22, x8, x10, eq
	csel	x23, x11, x9, eq
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	w1, [x20]
	ldr	w8, [x21]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_rtl_write_byte
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_read_byte
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh18:
	adrp	x0, _globalmutex_power@GOTPAGE
Lloh19:
	ldr	x0, [x0, _globalmutex_power@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh20:
	adrp	x21, _REG_POWER_OFF_IN_PROCESS@GOTPAGE
Lloh21:
	ldr	x21, [x21, _REG_POWER_OFF_IN_PROCESS@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl_read_byte
	mov	x20, x0
	mov	w0, #7
	bl	_BIT
	orr	w2, w0, w20
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rtl_write_byte
Lloh22:
	adrp	x0, _globalmutex_power@GOTPAGE
Lloh23:
	ldr	x0, [x0, _globalmutex_power@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
LBB0_5:
	mov	w0, #1
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SINGLEMAC_SINGLEPHY,8,3        ; @SINGLEMAC_SINGLEPHY
	.comm	_REG_MAC0,4,2                   ; @REG_MAC0
	.comm	_MAC0_ON,4,2                    ; @MAC0_ON
	.comm	_globalmutex_power,4,2          ; @globalmutex_power
	.comm	_REG_MAC1,4,2                   ; @REG_MAC1
	.comm	_MAC1_ON,4,2                    ; @MAC1_ON
	.comm	_REG_POWER_OFF_IN_PROCESS,4,2   ; @REG_POWER_OFF_IN_PROCESS
.subsections_via_symbols
