	.file	"extr_leds-max77693.c_max77693_set_flash_current.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	max77693_set_flash_current, @function
max77693_set_flash_current:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	ecx, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r8d, DWORD PTR 8[rdi]
	mov	edx, DWORD PTR FLASH[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r9, rsp
	mov	r13, QWORD PTR 16[rdi]
	mov	ebp, DWORD PTR EINVAL[rip]
	call	max77693_distribute_currents@PLT
	movsx	rax, DWORD PTR FLED1[rip]
	cmp	eax, r12d
	je	.L2
	cmp	QWORD PTR [rbx], 0
	jne	.L2
	movsx	rdx, DWORD PTR FLED2[rip]
	cmp	r12d, edx
	je	.L5
	mov	eax, ebp
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR [rsp+rax*4]
	call	max77693_led_iout_to_reg@PLT
	mov	esi, DWORD PTR MAX77693_LED_REG_IFLASH1[rip]
	mov	rdi, r13
	mov	edx, eax
	call	regmap_write@PLT
	test	eax, eax
	js	.L1
	movsx	rdx, DWORD PTR FLED2[rip]
	cmp	edx, r12d
	je	.L7
	cmp	QWORD PTR [rbx], 0
	je	.L1
.L5:
	mov	edi, DWORD PTR [rsp+rdx*4]
	call	max77693_led_iout_to_reg@PLT
	mov	esi, DWORD PTR MAX77693_LED_REG_IFLASH2[rip]
	mov	rdi, r13
	mov	edx, eax
	call	regmap_write@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	movsx	rdx, r12d
	jmp	.L5
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	max77693_set_flash_current, .-max77693_set_flash_current
	.comm	MAX77693_LED_REG_IFLASH2,4,4
	.comm	MAX77693_LED_REG_IFLASH1,4,4
	.comm	FLED2,4,4
	.comm	FLED1,4,4
	.comm	FLASH,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_leds-max77693.c_max77693_set_flash_current.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	max77693_set_flash_current, %function
max77693_set_flash_current:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r6, r1
	ldr	r7, [r0, #4]
	sub	sp, sp, #28
	ldr	r4, .L14
	str	r7, [sp]
	add	lr, sp, #12
	mov	r3, r2
	ldr	ip, .L14+4
	ldr	r2, [r4]
	str	lr, [sp, #4]
	ldr	lr, .L14+8
	mov	r5, r0
	ldr	lr, [lr]
	str	lr, [sp, #20]
	mov	lr,#0
	ldr	r7, [r0, #8]
	ldr	r4, [ip]
	bl	max77693_distribute_currents
	ldr	r3, .L14+12
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L2
	ldr	r2, [r5]
	cmp	r2, #0
	bne	.L2
	ldr	r3, .L14+16
	ldr	r3, [r3]
	cmp	r6, r3
	beq	.L5
	rsb	r0, r4, #0
.L1:
	ldr	r3, .L14+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	add	r2, sp, #24
	add	r3, r2, r3, lsl #2
	ldr	r0, [r3, #-12]
	bl	max77693_led_iout_to_reg
	ldr	r3, .L14+20
	mov	r2, r0
	ldr	r1, [r3]
	mov	r0, r7
	bl	regmap_write
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L14+16
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L7
	ldr	r2, [r5]
	cmp	r2, #0
	beq	.L1
.L5:
	add	r2, sp, #24
	add	r3, r2, r3, lsl #2
	ldr	r0, [r3, #-12]
	bl	max77693_led_iout_to_reg
	ldr	r3, .L14+24
	mov	r2, r0
	ldr	r1, [r3]
	mov	r0, r7
	bl	regmap_write
	b	.L1
.L7:
	mov	r3, r6
	b	.L5
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	FLASH
	.word	EINVAL
	.word	.LC0
	.word	FLED1
	.word	FLED2
	.word	MAX77693_LED_REG_IFLASH1
	.word	MAX77693_LED_REG_IFLASH2
	.size	max77693_set_flash_current, .-max77693_set_flash_current
	.comm	MAX77693_LED_REG_IFLASH2,4,4
	.comm	MAX77693_LED_REG_IFLASH1,4,4
	.comm	FLED2,4,4
	.comm	FLED1,4,4
	.comm	FLASH,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
