	.file	"extr_r8169_main.c_rtl8168h_2_hw_phy_config.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtl8168h_2_hw_phy_config, @function
rtl8168h_2_hw_phy_config:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	rtl_apply_firmware@PLT
	mov	edx, 2627
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	edx, 32906
	mov	esi, 19
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	ecx, 63
	mov	edx, 10
	mov	rdi, rbp
	mov	esi, 20
	call	rtl_w0w1_phy@PLT
	xor	edx, edx
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	edx, 2627
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	edx, 2065
	mov	esi, 19
	mov	rdi, rbp
	call	rtl_writephy@PLT
	xor	ecx, ecx
	mov	edx, 2048
	mov	rdi, rbp
	mov	esi, 20
	call	rtl_w0w1_phy@PLT
	mov	edx, 2626
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	xor	ecx, ecx
	mov	edx, 2
	mov	rdi, rbp
	mov	esi, 22
	call	rtl_w0w1_phy@PLT
	xor	edx, edx
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	edi, 11
	call	BIT@PLT
	mov	edi, DWORD PTR 0[rbp]
	xor	ecx, ecx
	mov	edx, 17
	mov	r8d, eax
	mov	esi, 2628
	call	phy_modify_paged@PLT
	mov	edx, 32893
	mov	esi, 56578
	mov	rdi, rbp
	call	r8168_mac_ocp_write@PLT
	mov	esi, 56578
	mov	rdi, rbp
	call	r8168_mac_ocp_read@PLT
	mov	esi, 56576
	mov	rdi, rbp
	shr	eax, 4
	mov	r12d, eax
	call	r8168_mac_ocp_read@PLT
	and	r12d, 8
	mov	r13d, eax
	mov	r14d, eax
	mov	ebx, eax
	sar	r13d, 13
	sar	r14d, 5
	and	r13d, 7
	shr	ebx
	and	r14d, 15
	or	r13d, r12d
	mov	r12d, eax
	and	ebx, 8
	sar	r12d, 9
	and	r12d, 15
	and	eax, 7
	or	ebx, eax
	cmp	r13d, 15
	jne	.L2
	cmp	r12d, 15
	jne	.L2
	cmp	r14d, 15
	jne	.L2
	cmp	ebx, 15
	jne	.L2
.L3:
	mov	edx, 3021
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	esi, 22
	mov	rdi, rbp
	call	rtl_readphy@PLT
	mov	edx, eax
	and	edx, 12
	je	.L5
	and	eax, 15
	sub	eax, 3
	mov	edx, eax
	mov	ecx, eax
	sal	edx, 4
	sal	ecx, 8
	or	edx, ecx
	or	edx, eax
	sal	eax, 12
	or	edx, eax
.L5:
	mov	rdi, rbp
	mov	esi, 23
	call	rtl_writephy@PLT
	mov	rdi, rbp
	mov	edx, 3021
	mov	esi, 31
	call	rtl_writephy@PLT
	xor	edx, edx
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	mov	edi, 7
	call	BIT@PLT
	mov	edi, DWORD PTR 0[rbp]
	xor	r8d, r8d
	mov	edx, 17
	mov	ecx, eax
	mov	esi, 2628
	call	phy_modify_paged@PLT
	mov	rdi, rbp
	call	rtl8168g_disable_aldps@PLT
	mov	rdi, rbp
	call	rtl8168g_config_eee_phy@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	rtl_enable_eee@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	mov	edx, 3023
	mov	esi, 31
	sal	r12d, 8
	call	rtl_writephy@PLT
	mov	edx, r14d
	mov	rdi, rbp
	mov	esi, 22
	sal	edx, 4
	or	edx, r12d
	or	ebx, edx
	mov	edx, r13d
	sal	edx, 12
	or	edx, ebx
	call	rtl_writephy@PLT
	xor	edx, edx
	mov	esi, 31
	mov	rdi, rbp
	call	rtl_writephy@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	rtl8168h_2_hw_phy_config, .-rtl8168h_2_hw_phy_config
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_r8169_main.c_rtl8168h_2_hw_phy_config.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtl8168h_2_hw_phy_config, %function
rtl8168h_2_hw_phy_config:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	sub	sp, sp, #8
	bl	rtl_apply_firmware
	mov	r1, #31
	ldr	r2, .L13
	mov	r0, r4
	bl	rtl_writephy
	mov	r1, #19
	ldr	r2, .L13+4
	mov	r0, r4
	bl	rtl_writephy
	mov	r3, #63
	mov	r2, #10
	mov	r1, #20
	mov	r0, r4
	bl	rtl_w0w1_phy
	mov	r2, #0
	mov	r1, #31
	mov	r0, r4
	bl	rtl_writephy
	mov	r1, #31
	ldr	r2, .L13
	mov	r0, r4
	bl	rtl_writephy
	mov	r1, #19
	ldr	r2, .L13+8
	mov	r0, r4
	bl	rtl_writephy
	mov	r3, #0
	mov	r2, #2048
	mov	r1, #20
	mov	r0, r4
	bl	rtl_w0w1_phy
	mov	r1, #31
	ldr	r2, .L13+12
	mov	r0, r4
	bl	rtl_writephy
	mov	r3, #0
	mov	r2, #2
	mov	r1, #22
	mov	r0, r4
	bl	rtl_w0w1_phy
	mov	r2, #0
	mov	r1, #31
	mov	r0, r4
	bl	rtl_writephy
	mov	r0, #11
	ldr	r5, [r4]
	bl	BIT
	mov	r2, r0
	mov	r3, #0
	mov	r0, r5
	ldr	r1, .L13+16
	str	r2, [sp]
	mov	r2, #17
	bl	phy_modify_paged
	ldr	r2, .L13+20
	ldr	r1, .L13+24
	mov	r0, r4
	bl	r8168_mac_ocp_write
	ldr	r1, .L13+24
	mov	r0, r4
	bl	r8168_mac_ocp_read
	mov	r1, #56576
	lsr	r6, r0, #4
	mov	r0, r4
	bl	r8168_mac_ocp_read
	and	r6, r6, #8
	asr	r2, r0, #9
	lsl	r3, r0, #16
	and	r7, r2, #15
	orr	r6, r6, r3, lsr #29
	cmp	r7, #15
	cmpeq	r6, #15
	lsr	r8, r0, #1
	and	r2, r0, #7
	and	r8, r8, #8
	asr	r0, r0, #5
	orr	r8, r2, r8
	and	r5, r0, #15
	bne	.L2
	cmp	r8, #15
	cmpeq	r5, #15
	bne	.L2
.L3:
	ldr	r2, .L13+28
	mov	r1, #31
	mov	r0, r4
	bl	rtl_writephy
	mov	r1, #22
	mov	r0, r4
	bl	rtl_readphy
	ands	r2, r0, #12
	beq	.L4
	and	r0, r0, #15
	sub	r0, r0, #3
	lsl	r2, r0, #8
	orr	r2, r2, r0, lsl #4
	orr	r2, r2, r0
	orr	r2, r2, r0, lsl #12
.L4:
	mov	r1, #23
	mov	r0, r4
	bl	rtl_writephy
	mov	r1, #31
	mov	r0, r4
	ldr	r2, .L13+28
	bl	rtl_writephy
	mov	r2, #0
	mov	r1, #31
	mov	r0, r4
	bl	rtl_writephy
	mov	r0, #7
	ldr	r5, [r4]
	bl	BIT
	mov	r2, #0
	mov	r3, r0
	ldr	r1, .L13+16
	str	r2, [sp]
	mov	r0, r5
	mov	r2, #17
	bl	phy_modify_paged
	mov	r0, r4
	bl	rtl8168g_disable_aldps
	mov	r0, r4
	bl	rtl8168g_config_eee_phy
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	rtl_enable_eee
.L2:
	mov	r1, #31
	mov	r0, r4
	ldr	r2, .L13+32
	bl	rtl_writephy
	lsl	r2, r5, #4
	orr	r2, r2, r7, lsl #8
	orr	r2, r2, r8
	orr	r2, r2, r6, lsl #12
	mov	r1, #22
	mov	r0, r4
	bl	rtl_writephy
	mov	r2, #0
	mov	r1, #31
	mov	r0, r4
	bl	rtl_writephy
	b	.L3
.L14:
	.align	2
.L13:
	.word	2627
	.word	32906
	.word	2065
	.word	2626
	.word	2628
	.word	32893
	.word	56578
	.word	3021
	.word	3023
	.size	rtl8168h_2_hw_phy_config, .-rtl8168h_2_hw_phy_config
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
