	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366s_set_green
_rtl8366s_set_green:                    ## @rtl8366s_set_green
	.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, %r15
	testl	%esi, %esi
	je	LBB0_1
## %bb.3:
	movq	_RTL8366S_GREEN_ETHERNET_TX_BIT@GOTPCREL(%rip), %rax
	movq	_RTL8366S_GREEN_ETHERNET_RX_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
	movq	_RTL8366S_PHY_NO_MAX@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_rtl8366s_set_green_port
	incl	%ebx
	cmpl	(%r12), %ebx
	jbe	LBB0_2
LBB0_4:
	movq	_RTL8366S_GREEN_ETHERNET_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366S_GREEN_ETHERNET_CTRL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_REG_RMW
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366S_PHY_NO_MAX,4,2        ## @RTL8366S_PHY_NO_MAX
	.comm	_RTL8366S_GREEN_ETHERNET_TX_BIT,4,2 ## @RTL8366S_GREEN_ETHERNET_TX_BIT
	.comm	_RTL8366S_GREEN_ETHERNET_RX_BIT,4,2 ## @RTL8366S_GREEN_ETHERNET_RX_BIT
	.comm	_RTL8366S_GREEN_ETHERNET_CTRL_REG,4,2 ## @RTL8366S_GREEN_ETHERNET_CTRL_REG
	.comm	_RTL8366S_GREEN_ETHERNET_CTRL_MASK,4,2 ## @RTL8366S_GREEN_ETHERNET_CTRL_MASK
	.no_dead_strip	_rtl8366s_set_green
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366s_set_green
_rtl8366s_set_green:                    ; @rtl8366s_set_green
	.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
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _RTL8366S_GREEN_ETHERNET_TX_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8366S_GREEN_ETHERNET_TX_BIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RTL8366S_GREEN_ETHERNET_RX_BIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RTL8366S_GREEN_ETHERNET_RX_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w3, w9, w8
	b	LBB0_5
LBB0_2:
	mov	w20, #0
Lloh6:
	adrp	x21, _RTL8366S_PHY_NO_MAX@GOTPAGE
Lloh7:
	ldr	x21, [x21, _RTL8366S_PHY_NO_MAX@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rtl8366s_set_green_port
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.ls	LBB0_3
; %bb.4:
	mov	w3, #0
LBB0_5:
Lloh8:
	adrp	x8, _RTL8366S_GREEN_ETHERNET_CTRL_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTL8366S_GREEN_ETHERNET_CTRL_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _RTL8366S_GREEN_ETHERNET_CTRL_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8366S_GREEN_ETHERNET_CTRL_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_RMW
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366S_PHY_NO_MAX,4,2        ; @RTL8366S_PHY_NO_MAX
	.comm	_RTL8366S_GREEN_ETHERNET_TX_BIT,4,2 ; @RTL8366S_GREEN_ETHERNET_TX_BIT
	.comm	_RTL8366S_GREEN_ETHERNET_RX_BIT,4,2 ; @RTL8366S_GREEN_ETHERNET_RX_BIT
	.comm	_RTL8366S_GREEN_ETHERNET_CTRL_REG,4,2 ; @RTL8366S_GREEN_ETHERNET_CTRL_REG
	.comm	_RTL8366S_GREEN_ETHERNET_CTRL_MASK,4,2 ; @RTL8366S_GREEN_ETHERNET_CTRL_MASK
	.no_dead_strip	_rtl8366s_set_green
.subsections_via_symbols
