	.file	"extr_locomo.c_locomo_frontlight_set.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	locomo_frontlight_set
	.type	locomo_frontlight_set, @function
locomo_frontlight_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, ecx
	call	locomo_chip_driver@PLT
	mov	rbp, rax
	test	r14d, r14d
	je	.L2
	mov	esi, DWORD PTR LOCOMO_GPIO_FL_VR[rip]
	mov	edi, DWORD PTR 0[r13]
	mov	edx, 1
	call	locomo_gpio_write@PLT
.L3:
	xor	r13d, r13d
	mov	rdi, rbp
	mov	rsi, r13
	call	spin_lock_irqsave@PLT
	mov	edi, ebx
	mov	rsi, QWORD PTR LOCOMO_FRONTLIGHT[rip]
	add	rsi, QWORD PTR 8[rbp]
	add	rsi, QWORD PTR LOCOMO_ALS[rip]
	call	locomo_writel@PLT
	mov	edi, 100
	call	udelay@PLT
	mov	edi, r12d
	mov	rsi, QWORD PTR LOCOMO_FRONTLIGHT[rip]
	add	rsi, QWORD PTR 8[rbp]
	add	rsi, QWORD PTR LOCOMO_ALD[rip]
	call	locomo_writel@PLT
	or	ebx, DWORD PTR LOCOMO_ALC_EN[rip]
	mov	rsi, QWORD PTR LOCOMO_FRONTLIGHT[rip]
	mov	edi, ebx
	add	rsi, QWORD PTR 8[rbp]
	add	rsi, QWORD PTR LOCOMO_ALS[rip]
	call	locomo_writel@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r13
	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	spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR LOCOMO_GPIO_FL_VR[rip]
	mov	edi, DWORD PTR 0[r13]
	xor	edx, edx
	call	locomo_gpio_write@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	locomo_frontlight_set, .-locomo_frontlight_set
	.comm	LOCOMO_GPIO_FL_VR,4,4
	.comm	LOCOMO_FRONTLIGHT,8,8
	.comm	LOCOMO_ALS,8,8
	.comm	LOCOMO_ALD,8,8
	.comm	LOCOMO_ALC_EN,4,4
	.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_locomo.c_locomo_frontlight_set.c"
	.text
	.align	2
	.global	locomo_frontlight_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	locomo_frontlight_set, %function
locomo_frontlight_set:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r2
	mov	r7, r1
	mov	r5, r3
	mov	r8, r0
	bl	locomo_chip_driver
	cmp	r6, #0
	mov	r4, r0
	ldrne	r0, [r8]
	ldreq	r0, [r8]
	mov	r8, #0
	ldr	r3, .L6
	moveq	r2, r6
	ldrne	r1, [r3]
	ldreq	r1, [r3]
	movne	r2, #1
	ldr	r6, .L6+4
	bl	locomo_gpio_write
	ldr	r9, .L6+8
	mov	r1, r8
	mov	r0, r4
	bl	spin_lock_irqsave
	ldr	r2, [r6]
	ldr	r3, [r4, #4]
	ldr	r1, [r9]
	add	r3, r3, r2
	add	r1, r3, r1
	mov	r0, r5
	bl	locomo_writel
	mov	r0, #100
	bl	udelay
	ldr	r1, .L6+12
	ldr	r2, [r6]
	ldr	r3, [r4, #4]
	ldr	r1, [r1]
	add	r3, r3, r2
	add	r1, r3, r1
	mov	r0, r7
	bl	locomo_writel
	ldr	r0, .L6+16
	ldr	r2, [r6]
	ldr	r3, [r4, #4]
	ldr	r1, [r9]
	ldr	r0, [r0]
	add	r3, r3, r2
	add	r1, r3, r1
	orr	r0, r5, r0
	bl	locomo_writel
	mov	r1, r8
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	spin_unlock_irqrestore
.L7:
	.align	2
.L6:
	.word	LOCOMO_GPIO_FL_VR
	.word	LOCOMO_FRONTLIGHT
	.word	LOCOMO_ALS
	.word	LOCOMO_ALD
	.word	LOCOMO_ALC_EN
	.size	locomo_frontlight_set, .-locomo_frontlight_set
	.comm	LOCOMO_GPIO_FL_VR,4,4
	.comm	LOCOMO_FRONTLIGHT,4,4
	.comm	LOCOMO_ALS,4,4
	.comm	LOCOMO_ALD,4,4
	.comm	LOCOMO_ALC_EN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
