	.file	"extr_sky81452-backlight.c_sky81452_bl_init_device.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sky81452_bl_init_device, @function
sky81452_bl_init_device:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmp	QWORD PTR 24[rsi], 0
	mov	ebx, DWORD PTR SKY81452_IGPW[rip]
	jne	.L2
	xor	ebx, ebx
.L2:
	cmp	QWORD PTR 16[rsi], 0
	je	.L3
	or	ebx, DWORD PTR SKY81452_PWMMD[rip]
.L3:
	cmp	QWORD PTR 8[rsi], 0
	jne	.L4
	or	ebx, DWORD PTR SKY81452_PHASE[rip]
.L4:
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 2300
	je	.L17
	cmp	eax, 2750
	je	.L6
.L8:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	or	ebx, DWORD PTR SKY81452_ILIM[rip]
.L6:
	mov	r12d, DWORD PTR 4[rsi]
	lea	eax, -4[r12]
	cmp	eax, 3
	ja	.L8
	mov	edi, DWORD PTR SKY81452_VSHRT[rip]
	call	CTZ@PLT
	mov	edx, 7
	mov	esi, DWORD PTR SKY81452_REG2[rip]
	mov	rdi, rbp
	sub	edx, r12d
	mov	ecx, eax
	sal	edx, cl
	or	edx, ebx
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	regmap_write@PLT
	.cfi_endproc
.LFE0:
	.size	sky81452_bl_init_device, .-sky81452_bl_init_device
	.comm	SKY81452_VSHRT,4,4
	.comm	SKY81452_REG2,4,4
	.comm	SKY81452_PWMMD,4,4
	.comm	SKY81452_PHASE,4,4
	.comm	SKY81452_ILIM,4,4
	.comm	SKY81452_IGPW,4,4
	.comm	EINVAL,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_sky81452-backlight.c_sky81452_bl_init_device.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sky81452_bl_init_device, %function
sky81452_bl_init_device:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r1, #16]
	push	{r4, r5, r6, lr}
	cmp	r2, #0
	moveq	r5, r2
	ldrne	r3, .L17
	ldr	ip, .L17+4
	ldrne	r5, [r3]
	ldr	r3, [r1, #12]
	mov	r6, r0
	cmp	r3, #0
	ldrne	r3, .L17+8
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	ldr	r3, [r1, #8]
	cmp	r3, #0
	ldreq	r3, .L17+12
	ldreq	r3, [r3]
	orreq	r5, r5, r3
	ldr	r3, [r1]
	cmp	r3, ip
	beq	.L16
	ldr	r2, .L17+16
	cmp	r3, r2
	beq	.L6
.L8:
	ldr	r3, .L17+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r3, .L17+24
	ldr	r3, [r3]
	orr	r5, r5, r3
.L6:
	ldr	r4, [r1, #4]
	sub	r3, r4, #4
	cmp	r3, #3
	bhi	.L8
	ldr	r3, .L17+28
	rsb	r4, r4, #7
	ldr	r0, [r3]
	bl	CTZ
	ldr	r3, .L17+32
	orr	r2, r5, r4, lsl r0
	ldr	r1, [r3]
	mov	r0, r6
	pop	{r4, r5, r6, lr}
	b	regmap_write
.L18:
	.align	2
.L17:
	.word	SKY81452_IGPW
	.word	2300
	.word	SKY81452_PWMMD
	.word	SKY81452_PHASE
	.word	2750
	.word	EINVAL
	.word	SKY81452_ILIM
	.word	SKY81452_VSHRT
	.word	SKY81452_REG2
	.size	sky81452_bl_init_device, .-sky81452_bl_init_device
	.comm	SKY81452_VSHRT,4,4
	.comm	SKY81452_REG2,4,4
	.comm	SKY81452_PWMMD,4,4
	.comm	SKY81452_PHASE,4,4
	.comm	SKY81452_ILIM,4,4
	.comm	SKY81452_IGPW,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
