	.file	"extr_sky2.c_sky2_led.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sky2_led, @function
sky2_led:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	lea	rbp, 4[rdi]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 8[rdi]
	mov	r14d, DWORD PTR [rdi]
	mov	rdi, rbp
	call	spin_lock_bh@PLT
	mov	rax, QWORD PTR 0[r13]
	cmp	rax, QWORD PTR CHIP_ID_YUKON_EC_U[rip]
	je	.L2
	cmp	rax, QWORD PTR CHIP_ID_YUKON_EX[rip]
	je	.L2
	cmp	rax, QWORD PTR CHIP_ID_YUKON_SUPR[rip]
	jne	.L3
.L2:
	mov	edx, DWORD PTR PHY_MARV_EXT_ADR[rip]
	mov	esi, r14d
	mov	rdi, r13
	call	gm_phy_read@PLT
	mov	ecx, 3
	mov	esi, r14d
	mov	rdi, r13
	mov	edx, DWORD PTR PHY_MARV_EXT_ADR[rip]
	mov	r15d, eax
	call	gm_phy_write@PLT
	cmp	r12d, 130
	je	.L4
	ja	.L5
	cmp	r12d, 128
	je	.L6
	cmp	r12d, 129
	jne	.L8
	mov	edi, 8
	call	PHY_M_LEDC_LOS_CTRL@PLT
	mov	edi, 8
	mov	ebx, eax
	call	PHY_M_LEDC_INIT_CTRL@PLT
	mov	edi, 8
	or	ebx, eax
	call	PHY_M_LEDC_STA1_CTRL@PLT
	mov	edi, 8
	or	ebx, eax
.L12:
	call	PHY_M_LEDC_STA0_CTRL@PLT
	mov	ecx, ebx
	mov	edx, DWORD PTR PHY_MARV_PHY_CTRL[rip]
	mov	esi, r14d
	or	ecx, eax
	mov	rdi, r13
	call	gm_phy_write@PLT
.L8:
	mov	edx, DWORD PTR PHY_MARV_EXT_ADR[rip]
	mov	ecx, r15d
	mov	esi, r14d
	mov	rdi, r13
	call	gm_phy_write@PLT
.L10:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_bh@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmp	r12d, 131
	jne	.L8
	mov	edi, 10
	call	PHY_M_LEDC_LOS_CTRL@PLT
	mov	edi, 10
	mov	ebx, eax
	call	PHY_M_LEDC_INIT_CTRL@PLT
	mov	edi, 10
	or	ebx, eax
	call	PHY_M_LEDC_STA1_CTRL@PLT
	mov	edi, 10
	or	ebx, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, r12d
	call	PHY_M_LED_MO_DUP@PLT
	mov	edi, r12d
	mov	ebx, eax
	call	PHY_M_LED_MO_10@PLT
	mov	edi, r12d
	or	ebx, eax
	call	PHY_M_LED_MO_100@PLT
	mov	edi, r12d
	or	ebx, eax
	call	PHY_M_LED_MO_1000@PLT
	mov	edi, r12d
	or	ebx, eax
	call	PHY_M_LED_MO_RX@PLT
	mov	edi, r12d
	or	ebx, eax
	call	PHY_M_LED_MO_TX@PLT
	mov	ecx, ebx
	mov	edx, DWORD PTR PHY_MARV_LED_OVER[rip]
	mov	esi, r14d
	or	ecx, eax
	mov	rdi, r13
	call	gm_phy_write@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, 9
	call	PHY_M_LEDC_LOS_CTRL@PLT
	mov	edi, 9
	mov	ebx, eax
	call	PHY_M_LEDC_INIT_CTRL@PLT
	mov	edi, 9
	or	ebx, eax
	call	PHY_M_LEDC_STA1_CTRL@PLT
	mov	edi, 9
	or	ebx, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 1
	call	PHY_M_LEDC_LOS_CTRL@PLT
	mov	edi, 8
	mov	ebx, eax
	call	PHY_M_LEDC_INIT_CTRL@PLT
	mov	edi, 7
	or	ebx, eax
	call	PHY_M_LEDC_STA1_CTRL@PLT
	mov	edi, 7
	or	ebx, eax
	call	PHY_M_LEDC_STA0_CTRL@PLT
	mov	edx, DWORD PTR PHY_MARV_PHY_CTRL[rip]
	mov	esi, r14d
	mov	rdi, r13
	or	ebx, eax
	mov	ecx, ebx
	call	gm_phy_write@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	sky2_led, .-sky2_led
	.comm	PHY_MARV_PHY_CTRL,4,4
	.comm	PHY_MARV_LED_OVER,4,4
	.comm	PHY_MARV_EXT_ADR,4,4
	.comm	CHIP_ID_YUKON_SUPR,8,8
	.comm	CHIP_ID_YUKON_EX,8,8
	.comm	CHIP_ID_YUKON_EC_U,8,8
	.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_sky2.c_sky2_led.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sky2_led, %function
sky2_led:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r3, r0
	ldr	r7, [r6], #4
	ldr	r5, [r3, #8]
	mov	r0, r6
	mov	r4, r1
	bl	spin_lock_bh
	ldr	r2, .L14
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
	ldr	r2, .L14+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
	ldr	r2, .L14+8
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L3
.L2:
	ldr	r8, .L14+12
	mov	r1, r7
	ldr	r2, [r8]
	mov	r0, r5
	bl	gm_phy_read
	sub	r4, r4, #128
	mov	r9, r0
	mov	r3, #3
	mov	r1, r7
	mov	r0, r5
	ldr	r2, [r8]
	bl	gm_phy_write
	cmp	r4, #3
	ldrls	pc, [pc, r4, asl #2]
	b	.L4
.L6:
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
.L5:
	ldr	r3, .L14+16
	mov	r0, #10
	ldr	r10, [r3]
	bl	PHY_M_LEDC_LOS_CTRL
	mov	r4, r0
	mov	r0, #10
	bl	PHY_M_LEDC_INIT_CTRL
	mov	r3, r0
	mov	r0, #10
	orr	r4, r4, r3
	bl	PHY_M_LEDC_STA1_CTRL
	mov	r3, r0
	mov	r0, #10
.L12:
	orr	r4, r4, r3
	bl	PHY_M_LEDC_STA0_CTRL
	mov	r2, r10
	orr	r3, r4, r0
	mov	r1, r7
	mov	r0, r5
	bl	gm_phy_write
.L4:
	mov	r3, r9
	mov	r1, r7
	mov	r0, r5
	ldr	r2, [r8]
	bl	gm_phy_write
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	spin_unlock_bh
.L3:
	ldr	r3, .L14+20
	mov	r0, r4
	ldr	r9, [r3]
	bl	PHY_M_LED_MO_DUP
	mov	r8, r0
	mov	r0, r4
	bl	PHY_M_LED_MO_10
	mov	r3, r0
	mov	r0, r4
	orr	r8, r8, r3
	bl	PHY_M_LED_MO_100
	mov	r3, r0
	mov	r0, r4
	orr	r8, r8, r3
	bl	PHY_M_LED_MO_1000
	mov	r3, r0
	mov	r0, r4
	orr	r8, r8, r3
	bl	PHY_M_LED_MO_RX
	mov	r3, r0
	mov	r0, r4
	orr	r8, r8, r3
	bl	PHY_M_LED_MO_TX
	mov	r2, r9
	orr	r3, r8, r0
	mov	r1, r7
	mov	r0, r5
	bl	gm_phy_write
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	spin_unlock_bh
.L9:
	ldr	r3, .L14+16
	mov	r0, #9
	ldr	r10, [r3]
	bl	PHY_M_LEDC_LOS_CTRL
	mov	r4, r0
	mov	r0, #9
	bl	PHY_M_LEDC_INIT_CTRL
	mov	r3, r0
	mov	r0, #9
	orr	r4, r4, r3
	bl	PHY_M_LEDC_STA1_CTRL
	mov	r3, r0
	mov	r0, #9
	b	.L12
.L8:
	ldr	r3, .L14+16
	mov	r0, #8
	ldr	r10, [r3]
	bl	PHY_M_LEDC_LOS_CTRL
	mov	r4, r0
	mov	r0, #8
	bl	PHY_M_LEDC_INIT_CTRL
	mov	r3, r0
	mov	r0, #8
	orr	r4, r4, r3
	bl	PHY_M_LEDC_STA1_CTRL
	mov	r3, r0
	mov	r0, #8
	b	.L12
.L7:
	ldr	r3, .L14+16
	mov	r0, #1
	ldr	r10, [r3]
	bl	PHY_M_LEDC_LOS_CTRL
	mov	r4, r0
	mov	r0, #8
	bl	PHY_M_LEDC_INIT_CTRL
	mov	r3, r0
	mov	r0, #7
	orr	r4, r4, r3
	bl	PHY_M_LEDC_STA1_CTRL
	mov	r3, r0
	mov	r0, #7
	b	.L12
.L15:
	.align	2
.L14:
	.word	CHIP_ID_YUKON_EC_U
	.word	CHIP_ID_YUKON_EX
	.word	CHIP_ID_YUKON_SUPR
	.word	PHY_MARV_EXT_ADR
	.word	PHY_MARV_PHY_CTRL
	.word	PHY_MARV_LED_OVER
	.size	sky2_led, .-sky2_led
	.comm	PHY_MARV_PHY_CTRL,4,4
	.comm	PHY_MARV_LED_OVER,4,4
	.comm	PHY_MARV_EXT_ADR,4,4
	.comm	CHIP_ID_YUKON_SUPR,4,4
	.comm	CHIP_ID_YUKON_EX,4,4
	.comm	CHIP_ID_YUKON_EC_U,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
