	.file	"extr_leds-lp5523.c_lp5523_selftest.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"LED %d FAIL\n"
	.text
	.p2align 4
	.type	lp5523_selftest, @function
lp5523_selftest:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 16[rsp], rdx
	lea	r15, 32[rsp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	to_i2c_client@PLT
	mov	edi, eax
	call	i2c_get_clientdata@PLT
	mov	rbp, QWORD PTR 8[rax]
	mov	rbx, rax
	mov	rdi, rbp
	mov	r13, QWORD PTR 8[rbp]
	call	mutex_lock@PLT
	mov	esi, DWORD PTR LP5523_REG_STATUS[rip]
	mov	rdx, r15
	mov	rdi, rbp
	call	lp55xx_read@PLT
	test	eax, eax
	js	.L2
	mov	rax, QWORD PTR LP55XX_CLOCK_EXT[rip]
	cmp	QWORD PTR 0[r13], rax
	jne	.L3
	mov	rax, QWORD PTR 32[rsp]
	test	QWORD PTR LP5523_EXT_CLK_USED[rip], rax
	je	.L2
.L3:
	mov	edx, DWORD PTR LP5523_EN_LEDTEST[rip]
	mov	rsi, QWORD PTR LP5523_REG_LED_TEST_CTRL[rip]
	mov	rdi, rbp
	or	edx, 16
	call	lp55xx_write@PLT
	mov	esi, 6000
	mov	edi, 3000
	call	usleep_range@PLT
	mov	esi, DWORD PTR LP5523_REG_STATUS[rip]
	mov	rdx, r15
	mov	rdi, rbp
	call	lp55xx_read@PLT
	test	eax, eax
	js	.L2
	mov	rax, QWORD PTR 32[rsp]
	test	QWORD PTR LP5523_LEDTEST_DONE[rip], rax
	je	.L27
.L4:
	mov	esi, DWORD PTR LP5523_REG_LED_TEST_ADC[rip]
	lea	rdx, 48[rsp]
	mov	rdi, rbp
	call	lp55xx_read@PLT
	test	eax, eax
	js	.L2
	mov	esi, DWORD PTR LP5523_MAX_LEDS[rip]
	sub	QWORD PTR 48[rsp], 1
	test	esi, esi
	jle	.L5
	lea	rax, 40[rsp]
	mov	DWORD PTR 12[rsp], 0
	xor	r12d, r12d
	mov	QWORD PTR 24[rsp], rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR LP5523_REG_LED_TEST_ADC[rip]
	mov	rdi, rbp
	call	lp55xx_read@PLT
	test	eax, eax
	js	.L2
	mov	rax, QWORD PTR 40[rsp]
	cmp	rax, QWORD PTR 48[rsp]
	jge	.L8
	cmp	rax, QWORD PTR LP5523_ADC_SHORTCIRC_LIM[rip]
	jge	.L9
.L8:
	movsx	rdi, DWORD PTR 12[rsp]
	mov	edx, r14d
	add	rdi, QWORD PTR 16[rsp]
	xor	eax, eax
	lea	rsi, .LC0[rip]
	call	sprintf@PLT
	add	DWORD PTR 12[rsp], eax
.L9:
	mov	rsi, QWORD PTR LP5523_REG_LED_PWM_BASE[rip]
	xor	edx, edx
	mov	rdi, rbp
	add	rbx, 16
	add	rsi, r12
	call	lp55xx_write@PLT
	mov	rsi, QWORD PTR LP5523_REG_LED_CURRENT_BASE[rip]
	mov	edx, DWORD PTR -16[rbx]
	mov	rdi, rbp
	add	rsi, r12
	call	lp55xx_write@PLT
.L6:
	add	r12, 1
	cmp	DWORD PTR LP5523_MAX_LEDS[rip], r12d
	jle	.L28
.L10:
	mov	rax, QWORD PTR 8[r13]
	mov	r14d, r12d
	mov	edx, DWORD PTR [rax+r12*4]
	test	edx, edx
	je	.L6
	mov	rsi, QWORD PTR LP5523_REG_LED_CURRENT_BASE[rip]
	mov	rdi, rbp
	add	rsi, r12
	call	lp55xx_write@PLT
	mov	rsi, QWORD PTR LP5523_REG_LED_PWM_BASE[rip]
	mov	edx, 255
	mov	rdi, rbp
	add	rsi, r12
	call	lp55xx_write@PLT
	mov	esi, 4000
	mov	edi, 2000
	call	usleep_range@PLT
	mov	edx, DWORD PTR LP5523_EN_LEDTEST[rip]
	mov	rsi, QWORD PTR LP5523_REG_LED_TEST_CTRL[rip]
	mov	rdi, rbp
	or	edx, r12d
	call	lp55xx_write@PLT
	mov	esi, 6000
	mov	edi, 3000
	call	usleep_range@PLT
	mov	esi, DWORD PTR LP5523_REG_STATUS[rip]
	mov	rdx, r15
	mov	rdi, rbp
	call	lp55xx_read@PLT
	test	eax, eax
	js	.L2
	mov	rax, QWORD PTR 32[rsp]
	test	QWORD PTR LP5523_LEDTEST_DONE[rip], rax
	jne	.L7
	mov	esi, 6000
	mov	edi, 3000
	call	usleep_range@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR 16[rsp]
	mov	edx, 10
	mov	DWORD PTR 12[rsp], 5
	mov	DWORD PTR [rax], 1279869254
	mov	WORD PTR 4[rax], dx
.L12:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	mov	eax, DWORD PTR 12[rsp]
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	ecx, DWORD PTR 12[rsp]
	test	ecx, ecx
	jne	.L12
.L5:
	mov	rax, QWORD PTR 16[rsp]
	mov	DWORD PTR 12[rsp], 3
	mov	DWORD PTR [rax], 674639
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	mov	esi, 6000
	mov	edi, 3000
	call	usleep_range@PLT
	jmp	.L4
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lp5523_selftest, .-lp5523_selftest
	.comm	LP55XX_CLOCK_EXT,8,8
	.comm	LP5523_REG_STATUS,4,4
	.comm	LP5523_REG_LED_TEST_CTRL,8,8
	.comm	LP5523_REG_LED_TEST_ADC,4,4
	.comm	LP5523_REG_LED_PWM_BASE,8,8
	.comm	LP5523_REG_LED_CURRENT_BASE,8,8
	.comm	LP5523_MAX_LEDS,4,4
	.comm	LP5523_LEDTEST_DONE,8,8
	.comm	LP5523_EXT_CLK_USED,8,8
	.comm	LP5523_EN_LEDTEST,4,4
	.comm	LP5523_ADC_SHORTCIRC_LIM,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_leds-lp5523.c_lp5523_selftest.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"LED %d FAIL\012\000"
	.align	2
.LC1:
	.ascii	"OK\012\000"
	.align	2
.LC2:
	.ascii	"FAIL\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lp5523_selftest, %function
lp5523_selftest:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L32
	sub	sp, sp, #28
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	str	r2, [sp, #4]
	bl	to_i2c_client
	bl	i2c_get_clientdata
	ldr	r4, [r0, #4]
	str	r0, [sp]
	mov	r0, r4
	ldr	r7, [r4, #4]
	bl	mutex_lock
	ldr	r3, .L32+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #8
	bl	lp55xx_read
	cmp	r0, #0
	blt	.L2
	ldr	r3, .L32+8
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L3
	ldr	r3, .L32+12
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L2
.L3:
	ldr	fp, .L32+16
	ldr	r3, .L32+20
	ldr	r2, [fp]
	ldr	r1, [r3]
	orr	r2, r2, #16
	mov	r0, r4
	bl	lp55xx_write
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	usleep_range
	ldr	r3, .L32+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #8
	bl	lp55xx_read
	cmp	r0, #0
	blt	.L2
	ldr	r3, .L32+32
	ldr	r2, [sp, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L29
.L4:
	ldr	r3, .L32+36
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #16
	bl	lp55xx_read
	cmp	r0, #0
	blt	.L2
	ldr	r8, .L32+40
	ldr	r3, [sp, #16]
	ldr	r2, [r8]
	sub	r3, r3, #1
	cmp	r2, #0
	str	r3, [sp, #16]
	ble	.L5
	mov	r6, #0
	ldr	r10, .L32+44
	mov	r5, r6
	ldr	r9, .L32+48
	b	.L10
.L7:
	ldr	r3, .L32+36
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #12
	bl	lp55xx_read
	cmp	r0, #0
	blt	.L2
	ldr	r2, [sp, #12]
	ldr	r1, [sp, #16]
	cmp	r2, r1
	bge	.L8
	ldr	r3, .L32+52
	ldr	r1, [r3]
	cmp	r2, r1
	bge	.L9
.L8:
	ldr	r3, [sp, #4]
	mov	r2, r5
	add	r0, r3, r6
	ldr	r1, .L32+56
	bl	sprintf
	add	r6, r6, r0
.L9:
	ldr	r1, [r9]
	mov	r2, #0
	add	r1, r5, r1
	mov	r0, r4
	bl	lp55xx_write
	ldr	r3, [sp]
	ldr	r1, [r10]
	ldr	r2, [r3], #8
	mov	r0, r4
	add	r1, r5, r1
	str	r3, [sp]
	bl	lp55xx_write
.L6:
	ldr	r2, [r8]
	add	r5, r5, #1
	cmp	r2, r5
	ble	.L30
.L10:
	ldr	r2, [r7, #4]
	ldr	r2, [r2, r5, lsl #2]
	cmp	r2, #0
	beq	.L6
	ldr	r1, [r10]
	mov	r0, r4
	add	r1, r5, r1
	bl	lp55xx_write
	ldr	r1, [r9]
	mov	r2, #255
	add	r1, r5, r1
	mov	r0, r4
	bl	lp55xx_write
	mov	r1, #4000
	mov	r0, #2000
	bl	usleep_range
	ldr	r3, .L32+20
	ldr	r2, [fp]
	ldr	r1, [r3]
	orr	r2, r5, r2
	mov	r0, r4
	bl	lp55xx_write
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	usleep_range
	ldr	r3, .L32+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #8
	bl	lp55xx_read
	cmp	r0, #0
	blt	.L2
	ldr	r3, .L32+32
	ldr	r1, [sp, #8]
	ldr	r2, [r3]
	tst	r1, r2
	bne	.L7
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	usleep_range
	b	.L7
.L2:
	mov	r2, #6
	ldr	r0, [sp, #4]
	ldr	r1, .L32+60
	bl	memcpy
	mov	r6, #5
.L12:
	mov	r0, r4
	bl	mutex_unlock
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	cmp	r6, #0
	bne	.L12
.L5:
	mov	r2, #4
	ldr	r0, [sp, #4]
	ldr	r1, .L32+64
	bl	memcpy
	mov	r6, #3
	b	.L12
.L29:
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	usleep_range
	b	.L4
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	.LC3
	.word	LP5523_REG_STATUS
	.word	LP55XX_CLOCK_EXT
	.word	LP5523_EXT_CLK_USED
	.word	LP5523_EN_LEDTEST
	.word	LP5523_REG_LED_TEST_CTRL
	.word	6000
	.word	3000
	.word	LP5523_LEDTEST_DONE
	.word	LP5523_REG_LED_TEST_ADC
	.word	LP5523_MAX_LEDS
	.word	LP5523_REG_LED_CURRENT_BASE
	.word	LP5523_REG_LED_PWM_BASE
	.word	LP5523_ADC_SHORTCIRC_LIM
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	lp5523_selftest, .-lp5523_selftest
	.comm	LP55XX_CLOCK_EXT,4,4
	.comm	LP5523_REG_STATUS,4,4
	.comm	LP5523_REG_LED_TEST_CTRL,4,4
	.comm	LP5523_REG_LED_TEST_ADC,4,4
	.comm	LP5523_REG_LED_PWM_BASE,4,4
	.comm	LP5523_REG_LED_CURRENT_BASE,4,4
	.comm	LP5523_MAX_LEDS,4,4
	.comm	LP5523_LEDTEST_DONE,4,4
	.comm	LP5523_EXT_CLK_USED,4,4
	.comm	LP5523_EN_LEDTEST,4,4
	.comm	LP5523_ADC_SHORTCIRC_LIM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
