	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r8153b_init
_r8153b_init:                           ## @r8153b_init
	.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, %r13
	movq	_RTL8152_UNPLUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153b_u1u2en
	movl	$500, %ebx                      ## imm = 0x1F4
	movq	_MCU_TYPE_PLA@GOTPCREL(%rip), %r15
	movq	_PLA_BOOT_CTRL@GOTPCREL(%rip), %r12
	movq	_AUTOLOAD_DONE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_ocp_read_word
	testl	%eax, (%r14)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$20, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_2
LBB0_4:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153_phy_status
	movq	_MII_BMCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_r8152_mdio_read
	movq	_BMCR_PDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_6
## %bb.5:
	notl	%ecx
	andl	%ecx, %eax
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_r8152_mdio_write
LBB0_6:
	movq	_PHY_STAT_LAN_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_r8153_phy_status
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153_u2p3en
	movq	_MCU_TYPE_USB@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_USB_MSC_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$4095, %ecx                     ## imm = 0xFFF
	callq	_ocp_write_word
	movl	(%r12), %esi
	movq	_USB_U1U2_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$500, %ecx                      ## imm = 0x1F4
	callq	_ocp_write_word
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153b_power_cut_en
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153b_ups_en
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_r8153_queue_wake
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_rtl_runtime_suspend_enable
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_r8153b_u1u2en
	movl	8(%r13), %edi
	callq	_usb_enable_lpm
	movl	(%r15), %esi
	movq	_PLA_MAC_PWR_CTRL2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_ocp_read_word
	movq	_MAC_CLK_SPDWN_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %ecx
	callq	_ocp_write_word
	movq	_GREEN_ETHERNET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_set_bit
	movl	(%r12), %esi
	movq	_USB_USB_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_ocp_read_word
	movq	_RX_AGG_DISABLE@GOTPCREL(%rip), %rdx
	movq	_RX_ZERO_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r12), %esi
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_ocp_write_word
	movq	%r13, %rdi
	callq	_rtl_tally_reset
	movl	$15000, (%r13)                  ## imm = 0x3A98
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8152_UNPLUG,4,2             ## @RTL8152_UNPLUG
	.comm	_MCU_TYPE_PLA,4,2               ## @MCU_TYPE_PLA
	.comm	_PLA_BOOT_CTRL,4,2              ## @PLA_BOOT_CTRL
	.comm	_AUTOLOAD_DONE,4,2              ## @AUTOLOAD_DONE
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ## @BMCR_PDOWN
	.comm	_PHY_STAT_LAN_ON,4,2            ## @PHY_STAT_LAN_ON
	.comm	_MCU_TYPE_USB,4,2               ## @MCU_TYPE_USB
	.comm	_USB_MSC_TIMER,4,2              ## @USB_MSC_TIMER
	.comm	_USB_U1U2_TIMER,4,2             ## @USB_U1U2_TIMER
	.comm	_PLA_MAC_PWR_CTRL2,4,2          ## @PLA_MAC_PWR_CTRL2
	.comm	_MAC_CLK_SPDWN_EN,4,2           ## @MAC_CLK_SPDWN_EN
	.comm	_GREEN_ETHERNET,4,2             ## @GREEN_ETHERNET
	.comm	_USB_USB_CTRL,4,2               ## @USB_USB_CTRL
	.comm	_RX_AGG_DISABLE,4,2             ## @RX_AGG_DISABLE
	.comm	_RX_ZERO_EN,4,2                 ## @RX_ZERO_EN
	.no_dead_strip	_r8153b_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r8153b_init
_r8153b_init:                           ; @r8153b_init
	.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	x19, x0
Lloh0:
	adrp	x8, _RTL8152_UNPLUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTL8152_UNPLUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #4
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_r8153b_u1u2en
	mov	w22, #500
Lloh3:
	adrp	x21, _MCU_TYPE_PLA@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MCU_TYPE_PLA@GOTPAGEOFF]
Lloh5:
	adrp	x23, _PLA_BOOT_CTRL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PLA_BOOT_CTRL@GOTPAGEOFF]
Lloh7:
	adrp	x24, _AUTOLOAD_DONE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AUTOLOAD_DONE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_read_word
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #20
	bl	_msleep
	subs	w22, w22, #1
	b.ne	LBB0_2
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_r8153_phy_status
Lloh9:
	adrp	x22, _MII_BMCR@GOTPAGE
Lloh10:
	ldr	x22, [x22, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_r8152_mdio_read
Lloh11:
	adrp	x8, _BMCR_PDOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BMCR_PDOWN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	bic	w2, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_r8152_mdio_write
LBB0_6:
Lloh14:
	adrp	x8, _PHY_STAT_LAN_ON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PHY_STAT_LAN_ON@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_r8153_phy_status
	mov	x0, x19
	mov	w1, #0
	bl	_r8153_u2p3en
Lloh17:
	adrp	x22, _MCU_TYPE_USB@GOTPAGE
Lloh18:
	ldr	x22, [x22, _MCU_TYPE_USB@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh19:
	adrp	x8, _USB_MSC_TIMER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _USB_MSC_TIMER@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #4095
	bl	_ocp_write_word
	ldr	w1, [x22]
Lloh22:
	adrp	x8, _USB_U1U2_TIMER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _USB_U1U2_TIMER@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #500
	bl	_ocp_write_word
	mov	x0, x19
	mov	w1, #0
	bl	_r8153b_power_cut_en
	mov	x0, x19
	mov	w1, #0
	bl	_r8153b_ups_en
	mov	x0, x19
	mov	w1, #0
	bl	_r8153_queue_wake
	mov	x0, x19
	mov	w1, #0
	bl	_rtl_runtime_suspend_enable
	mov	x0, x19
	mov	w1, #1
	bl	_r8153b_u1u2en
	ldr	w0, [x19, #8]
	bl	_usb_enable_lpm
	ldr	w1, [x21]
Lloh25:
	adrp	x23, _PLA_MAC_PWR_CTRL2@GOTPAGE
Lloh26:
	ldr	x23, [x23, _PLA_MAC_PWR_CTRL2@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_read_word
Lloh27:
	adrp	x8, _MAC_CLK_SPDWN_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAC_CLK_SPDWN_EN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w3, w8, w0
	ldr	w1, [x21]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_write_word
Lloh30:
	adrp	x8, _GREEN_ETHERNET@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GREEN_ETHERNET@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	ldr	w1, [x22]
Lloh33:
	adrp	x20, _USB_USB_CTRL@GOTPAGE
Lloh34:
	ldr	x20, [x20, _USB_USB_CTRL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_ocp_read_word
Lloh35:
	adrp	x8, _RX_AGG_DISABLE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _RX_AGG_DISABLE@GOTPAGEOFF]
Lloh37:
	adrp	x9, _RX_ZERO_EN@GOTPAGE
Lloh38:
	ldr	x9, [x9, _RX_ZERO_EN@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w3, w0, w8
	ldr	w1, [x22]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_ocp_write_word
	mov	x0, x19
	bl	_rtl_tally_reset
	mov	w8, #15000
	str	w8, [x19]
LBB0_7:
	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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8152_UNPLUG,4,2             ; @RTL8152_UNPLUG
	.comm	_MCU_TYPE_PLA,4,2               ; @MCU_TYPE_PLA
	.comm	_PLA_BOOT_CTRL,4,2              ; @PLA_BOOT_CTRL
	.comm	_AUTOLOAD_DONE,4,2              ; @AUTOLOAD_DONE
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_PDOWN,4,2                 ; @BMCR_PDOWN
	.comm	_PHY_STAT_LAN_ON,4,2            ; @PHY_STAT_LAN_ON
	.comm	_MCU_TYPE_USB,4,2               ; @MCU_TYPE_USB
	.comm	_USB_MSC_TIMER,4,2              ; @USB_MSC_TIMER
	.comm	_USB_U1U2_TIMER,4,2             ; @USB_U1U2_TIMER
	.comm	_PLA_MAC_PWR_CTRL2,4,2          ; @PLA_MAC_PWR_CTRL2
	.comm	_MAC_CLK_SPDWN_EN,4,2           ; @MAC_CLK_SPDWN_EN
	.comm	_GREEN_ETHERNET,4,2             ; @GREEN_ETHERNET
	.comm	_USB_USB_CTRL,4,2               ; @USB_USB_CTRL
	.comm	_RX_AGG_DISABLE,4,2             ; @RX_AGG_DISABLE
	.comm	_RX_ZERO_EN,4,2                 ; @RX_ZERO_EN
	.no_dead_strip	_r8153b_init
.subsections_via_symbols
