	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r8153b_hw_phy_cfg
_r8153b_hw_phy_cfg:                     ## @r8153b_hw_phy_cfg
	.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
	xorl	%esi, %esi
	callq	_r8153_aldps_en
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rtl_eee_enable
	movq	_GREEN_ETHERNET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_r8153b_green_en
	movq	_SRAM_GREEN_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sram_read
	movq	_R_TUNE_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_sram_write
	movq	_OCP_NCTL_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ocp_reg_read
	movq	_PGA_RETURN_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ocp_reg_write
	movq	%rbx, %rdi
	movl	$125, %esi
	callq	_r8152_efuse_read
	movl	%eax, %ecx
	shrl	%ecx
	andl	$65528, %ecx                    ## imm = 0xFFF8
	andl	$7, %eax
	orl	%ecx, %eax
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_2
## %bb.1:
	movq	_OCP_ADC_IOFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ocp_reg_write
LBB0_2:
	movq	%rbx, %rdi
	movl	$50214, %esi                    ## imm = 0xC426
	callq	_ocp_reg_read
	movl	%eax, %ecx
	andl	$16383, %ecx                    ## imm = 0x3FFF
	je	LBB0_4
## %bb.3:
	movl	$16000000, %eax                 ## imm = 0xF42400
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
	movq	_SAW_CNT_1MS_MASK@GOTPCREL(%rip), %r15
	andl	(%r15), %r14d
	movq	_MCU_TYPE_USB@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_USB_UPS_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_ocp_read_word
	movl	(%r15), %ecx
	notl	%ecx
	andl	%eax, %ecx
	orl	%r14d, %ecx
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_ocp_write_word
LBB0_4:
	movq	_MCU_TYPE_PLA@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_PLA_PHY_PWR@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_ocp_read_word
	movq	_PFM_PWM_SWITCH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_ocp_write_word
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_r8153_patch_request
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	cmpq	$0, 8(%rbx)
	je	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rtl_eee_enable
LBB0_8:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_r8153_aldps_en
	movq	%rbx, %rdi
	callq	_r8152b_enable_fc
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_r8153_u2p3en
	movq	_PHY_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_bit                        ## TAILCALL
LBB0_5:
	movq	_OCP_POWER_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ocp_reg_read
	movq	_EEE_CLKDIV_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ocp_reg_write
	movl	$1, 16(%rbx)
	movq	_OCP_DOWN_SPEED@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_ocp_reg_read
	movq	_EN_EEE_CMODE@GOTPCREL(%rip), %rcx
	movq	_EN_EEE_1000@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_EN_10M_CLKDIV@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ocp_reg_write
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 20(%rbx)
	movl	$1, 28(%rbx)
	movq	_OCP_SYSCLK_CFG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ocp_reg_write
	movl	(%r14), %r14d
	movl	$5, %edi
	callq	_clk_div_expo
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_ocp_reg_write
	movl	$1, 32(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_r8153_patch_request
	cmpq	$0, 8(%rbx)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GREEN_ETHERNET,4,2             ## @GREEN_ETHERNET
	.comm	_SRAM_GREEN_CFG,4,2             ## @SRAM_GREEN_CFG
	.comm	_R_TUNE_EN,4,2                  ## @R_TUNE_EN
	.comm	_OCP_NCTL_CFG,4,2               ## @OCP_NCTL_CFG
	.comm	_PGA_RETURN_EN,4,2              ## @PGA_RETURN_EN
	.comm	_OCP_ADC_IOFFSET,4,2            ## @OCP_ADC_IOFFSET
	.comm	_SAW_CNT_1MS_MASK,4,2           ## @SAW_CNT_1MS_MASK
	.comm	_MCU_TYPE_USB,4,2               ## @MCU_TYPE_USB
	.comm	_USB_UPS_CFG,4,2                ## @USB_UPS_CFG
	.comm	_MCU_TYPE_PLA,4,2               ## @MCU_TYPE_PLA
	.comm	_PLA_PHY_PWR,4,2                ## @PLA_PHY_PWR
	.comm	_PFM_PWM_SWITCH,4,2             ## @PFM_PWM_SWITCH
	.comm	_OCP_POWER_CFG,4,2              ## @OCP_POWER_CFG
	.comm	_EEE_CLKDIV_EN,4,2              ## @EEE_CLKDIV_EN
	.comm	_OCP_DOWN_SPEED,4,2             ## @OCP_DOWN_SPEED
	.comm	_EN_EEE_CMODE,4,2               ## @EN_EEE_CMODE
	.comm	_EN_EEE_1000,4,2                ## @EN_EEE_1000
	.comm	_EN_10M_CLKDIV,4,2              ## @EN_10M_CLKDIV
	.comm	_OCP_SYSCLK_CFG,4,2             ## @OCP_SYSCLK_CFG
	.comm	_PHY_RESET,4,2                  ## @PHY_RESET
	.no_dead_strip	_r8153b_hw_phy_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r8153b_hw_phy_cfg
_r8153b_hw_phy_cfg:                     ; @r8153b_hw_phy_cfg
	.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
	mov	w1, #0
	bl	_r8153_aldps_en
	mov	x0, x19
	mov	w1, #0
	bl	_rtl_eee_enable
Lloh0:
	adrp	x8, _GREEN_ETHERNET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GREEN_ETHERNET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	mov	x1, x0
	mov	x0, x19
	bl	_r8153b_green_en
Lloh3:
	adrp	x20, _SRAM_GREEN_CFG@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SRAM_GREEN_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sram_read
Lloh5:
	adrp	x8, _R_TUNE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R_TUNE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sram_write
Lloh8:
	adrp	x20, _OCP_NCTL_CFG@GOTPAGE
Lloh9:
	ldr	x20, [x20, _OCP_NCTL_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_read
Lloh10:
	adrp	x8, _PGA_RETURN_EN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PGA_RETURN_EN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_write
	mov	x0, x19
	mov	w1, #125
	bl	_r8152_efuse_read
	lsr	w8, w0, #1
	and	w2, w8, #0xfff8
	bfxil	w2, w0, #0, #3
	mov	w8, #65535
	cmp	w2, w8
	b.eq	LBB0_2
; %bb.1:
Lloh13:
	adrp	x8, _OCP_ADC_IOFFSET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OCP_ADC_IOFFSET@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ocp_reg_write
LBB0_2:
	mov	x0, x19
	mov	w1, #50214
	bl	_ocp_reg_read
	ands	w8, w0, #0x3fff
	b.eq	LBB0_4
; %bb.3:
	mov	w9, #9216
	movk	w9, #244, lsl #16
	udiv	w8, w9, w8
Lloh16:
	adrp	x20, _SAW_CNT_1MS_MASK@GOTPAGE
Lloh17:
	ldr	x20, [x20, _SAW_CNT_1MS_MASK@GOTPAGEOFF]
	ldr	w9, [x20]
	and	w21, w9, w8
Lloh18:
	adrp	x22, _MCU_TYPE_USB@GOTPAGE
Lloh19:
	ldr	x22, [x22, _MCU_TYPE_USB@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh20:
	adrp	x23, _USB_UPS_CFG@GOTPAGE
Lloh21:
	ldr	x23, [x23, _USB_UPS_CFG@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_read_word
	ldr	w8, [x20]
	bic	w8, w0, w8
	orr	w3, w8, w21
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_write_word
LBB0_4:
Lloh22:
	adrp	x20, _MCU_TYPE_PLA@GOTPAGE
Lloh23:
	ldr	x20, [x20, _MCU_TYPE_PLA@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh24:
	adrp	x21, _PLA_PHY_PWR@GOTPAGE
Lloh25:
	ldr	x21, [x21, _PLA_PHY_PWR@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ocp_read_word
Lloh26:
	adrp	x8, _PFM_PWM_SWITCH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PFM_PWM_SWITCH@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w3, w8, w0
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ocp_write_word
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	bl	_r8153_patch_request
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_rtl_eee_enable
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_r8153_aldps_en
	mov	x0, x19
	bl	_r8152b_enable_fc
	mov	x0, x19
	mov	w1, #1
	bl	_r8153_u2p3en
Lloh29:
	adrp	x8, _PHY_RESET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PHY_RESET@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x19
	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
	b	_set_bit
LBB0_8:
Lloh32:
	adrp	x20, _OCP_POWER_CFG@GOTPAGE
Lloh33:
	ldr	x20, [x20, _OCP_POWER_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_read
Lloh34:
	adrp	x8, _EEE_CLKDIV_EN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EEE_CLKDIV_EN@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_write
	str	w21, [x19, #16]
Lloh37:
	adrp	x20, _OCP_DOWN_SPEED@GOTPAGE
Lloh38:
	ldr	x20, [x20, _OCP_DOWN_SPEED@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_read
Lloh39:
	adrp	x8, _EN_EEE_CMODE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EN_EEE_CMODE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _EN_EEE_1000@GOTPAGE
Lloh43:
	ldr	x9, [x9, _EN_EEE_1000@GOTPAGEOFF]
Lloh44:
	adrp	x10, _EN_10M_CLKDIV@GOTPAGE
Lloh45:
	ldr	x10, [x10, _EN_10M_CLKDIV@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
Lloh47:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ocp_reg_write
	movi.2s	v0, #1
	stur	d0, [x19, #20]
	str	w21, [x19, #28]
Lloh48:
	adrp	x20, _OCP_SYSCLK_CFG@GOTPAGE
Lloh49:
	ldr	x20, [x20, _OCP_SYSCLK_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_ocp_reg_write
	ldr	w20, [x20]
	mov	w0, #5
	bl	_clk_div_expo
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_ocp_reg_write
	str	w21, [x19, #32]
	mov	x0, x19
	mov	w1, #0
	bl	_r8153_patch_request
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh46
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_GREEN_ETHERNET,4,2             ; @GREEN_ETHERNET
	.comm	_SRAM_GREEN_CFG,4,2             ; @SRAM_GREEN_CFG
	.comm	_R_TUNE_EN,4,2                  ; @R_TUNE_EN
	.comm	_OCP_NCTL_CFG,4,2               ; @OCP_NCTL_CFG
	.comm	_PGA_RETURN_EN,4,2              ; @PGA_RETURN_EN
	.comm	_OCP_ADC_IOFFSET,4,2            ; @OCP_ADC_IOFFSET
	.comm	_SAW_CNT_1MS_MASK,4,2           ; @SAW_CNT_1MS_MASK
	.comm	_MCU_TYPE_USB,4,2               ; @MCU_TYPE_USB
	.comm	_USB_UPS_CFG,4,2                ; @USB_UPS_CFG
	.comm	_MCU_TYPE_PLA,4,2               ; @MCU_TYPE_PLA
	.comm	_PLA_PHY_PWR,4,2                ; @PLA_PHY_PWR
	.comm	_PFM_PWM_SWITCH,4,2             ; @PFM_PWM_SWITCH
	.comm	_OCP_POWER_CFG,4,2              ; @OCP_POWER_CFG
	.comm	_EEE_CLKDIV_EN,4,2              ; @EEE_CLKDIV_EN
	.comm	_OCP_DOWN_SPEED,4,2             ; @OCP_DOWN_SPEED
	.comm	_EN_EEE_CMODE,4,2               ; @EN_EEE_CMODE
	.comm	_EN_EEE_1000,4,2                ; @EN_EEE_1000
	.comm	_EN_10M_CLKDIV,4,2              ; @EN_10M_CLKDIV
	.comm	_OCP_SYSCLK_CFG,4,2             ; @OCP_SYSCLK_CFG
	.comm	_PHY_RESET,4,2                  ; @PHY_RESET
	.no_dead_strip	_r8153b_hw_phy_cfg
.subsections_via_symbols
