	.file	"extr_lp8788_bl.c_lp8788_backlight_configure.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"invalid mode: %d\n"
	.text
	.p2align 4
	.type	lp8788_backlight_configure, @function
lp8788_backlight_configure:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rax, QWORD PTR 16[rdi]
	mov	rbx, rdi
	test	rax, rax
	je	.L10
	mov	edx, DWORD PTR [rax]
	mov	esi, DWORD PTR 16[rax]
	mov	DWORD PTR default_bl_config[rip], edx
	mov	edx, DWORD PTR 4[rax]
	mov	DWORD PTR default_bl_config[rip+4], edx
	mov	edx, DWORD PTR 8[rax]
	mov	DWORD PTR default_bl_config[rip+8], edx
	mov	edx, DWORD PTR 12[rax]
	mov	eax, DWORD PTR 20[rax]
	mov	DWORD PTR default_bl_config[rip+16], esi
	mov	DWORD PTR default_bl_config[rip+12], edx
	mov	DWORD PTR default_bl_config[rip+20], eax
.L3:
	mov	ecx, DWORD PTR LP8788_BL_RAMP_RISE_SHIFT[rip]
	mov	rdi, QWORD PTR 8[rbx]
	sal	edx, cl
	or	edx, esi
	mov	esi, DWORD PTR LP8788_BL_RAMP[rip]
	call	lp8788_write_byte@PLT
	test	eax, eax
	jne	.L1
	mov	ecx, DWORD PTR LP8788_BL_FULLSCALE_SHIFT[rip]
	mov	edx, DWORD PTR default_bl_config[rip+8]
	mov	eax, DWORD PTR default_bl_config[rip+4]
	mov	r8d, DWORD PTR default_bl_config[rip]
	sal	edx, cl
	mov	ecx, DWORD PTR LP8788_BL_DIM_MODE_SHIFT[rip]
	mov	rdi, QWORD PTR 8[rbx]
	sal	eax, cl
	or	edx, eax
	cmp	r8d, 128
	je	.L5
	lea	eax, -129[r8]
	cmp	eax, 1
	ja	.L6
	mov	ecx, DWORD PTR LP8788_BL_PWM_POLARITY_SHIFT[rip]
	mov	esi, DWORD PTR default_bl_config[rip+20]
	mov	eax, DWORD PTR LP8788_BL_EN[rip]
	or	eax, DWORD PTR LP8788_BL_PWM_INPUT_EN[rip]
	mov	DWORD PTR [rbx], r8d
	sal	esi, cl
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	eax, esi
	mov	esi, DWORD PTR LP8788_BL_CONFIG[rip]
	or	edx, eax
	jmp	lp8788_write_byte@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR [rdi]
	mov	edx, r8d
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	or	edx, DWORD PTR LP8788_BL_EN[rip]
	mov	esi, DWORD PTR LP8788_BL_CONFIG[rip]
	mov	DWORD PTR [rbx], r8d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	lp8788_write_byte@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edx, DWORD PTR default_bl_config[rip+12]
	mov	esi, DWORD PTR default_bl_config[rip+16]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	lp8788_backlight_configure, .-lp8788_backlight_configure
	.comm	default_bl_config,24,16
	.comm	LP8788_BL_RAMP_RISE_SHIFT,4,4
	.comm	LP8788_BL_RAMP,4,4
	.comm	LP8788_BL_PWM_POLARITY_SHIFT,4,4
	.comm	LP8788_BL_PWM_INPUT_EN,4,4
	.comm	LP8788_BL_FULLSCALE_SHIFT,4,4
	.comm	LP8788_BL_EN,4,4
	.comm	LP8788_BL_DIM_MODE_SHIFT,4,4
	.comm	LP8788_BL_CONFIG,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_lp8788_bl.c_lp8788_backlight_configure.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"invalid mode: %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lp8788_backlight_configure, %function
lp8788_backlight_configure:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #8]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	mov	r5, r0
	ldr	r4, .L11
	beq	.L10
	ldmib	r3, {r0, r1}
	ldr	r2, [r3]
	str	r0, [r4, #4]
	str	r2, [r4]
	ldr	r0, [r3, #16]
	ldr	r2, [r3, #12]
	ldr	r3, [r3, #20]
	str	r1, [r4, #8]
	str	r2, [r4, #12]
	str	r3, [r4, #20]
	str	r0, [r4, #16]
.L3:
	ldr	r3, .L11+4
	ldr	r1, .L11+8
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r2, r0, r2, lsl r3
	ldr	r0, [r5, #4]
	bl	lp8788_write_byte
	cmp	r0, #0
	popne	{r4, r5, r6, pc}
	ldr	r3, .L11+12
	ldr	r2, .L11+16
	ldr	r1, [r3]
	ldr	r3, [r4, #4]
	ldr	ip, [r4]
	lsl	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, [r4, #8]
	cmp	ip, #128
	ldr	r0, [r5, #4]
	orr	r3, r3, r1, lsl r2
	beq	.L5
	sub	r2, ip, #129
	cmp	r2, #1
	bhi	.L6
	ldr	lr, .L11+20
	ldr	r1, .L11+24
	ldr	r2, .L11+28
	ldr	r6, [lr]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	lr, [r4, #20]
	orr	r1, r1, r6
	orr	r1, r1, lr, lsl r2
	orr	r2, r1, r3
.L7:
	ldr	r3, .L11+32
	str	ip, [r5]
	ldr	r1, [r3]
	pop	{r4, r5, r6, lr}
	b	lp8788_write_byte
.L5:
	ldr	r2, .L11+24
	ldr	r2, [r2]
	orr	r2, r3, r2
	b	.L7
.L6:
	mov	r2, ip
	ldr	r1, .L11+36
	ldr	r0, [r0]
	bl	dev_err
	ldr	r3, .L11+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #16]
	b	.L3
.L12:
	.align	2
.L11:
	.word	default_bl_config
	.word	LP8788_BL_RAMP_RISE_SHIFT
	.word	LP8788_BL_RAMP
	.word	LP8788_BL_DIM_MODE_SHIFT
	.word	LP8788_BL_FULLSCALE_SHIFT
	.word	LP8788_BL_PWM_INPUT_EN
	.word	LP8788_BL_EN
	.word	LP8788_BL_PWM_POLARITY_SHIFT
	.word	LP8788_BL_CONFIG
	.word	.LC0
	.word	EINVAL
	.size	lp8788_backlight_configure, .-lp8788_backlight_configure
	.comm	default_bl_config,24,4
	.comm	LP8788_BL_RAMP_RISE_SHIFT,4,4
	.comm	LP8788_BL_RAMP,4,4
	.comm	LP8788_BL_PWM_POLARITY_SHIFT,4,4
	.comm	LP8788_BL_PWM_INPUT_EN,4,4
	.comm	LP8788_BL_FULLSCALE_SHIFT,4,4
	.comm	LP8788_BL_EN,4,4
	.comm	LP8788_BL_DIM_MODE_SHIFT,4,4
	.comm	LP8788_BL_CONFIG,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
