	.file	"extr_da9052-regulator.c_da9052_dcdc_set_current_limit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	da9052_dcdc_set_current_limit, @function
da9052_dcdc_set_current_limit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	rdev_get_drvdata@PLT
	mov	rdi, r12
	mov	r13, rax
	call	rdev_get_id@PLT
	mov	r9, QWORD PTR 0[r13]
	mov	rcx, QWORD PTR DA9052[rip]
	xor	edx, edx
	cmp	QWORD PTR [r9], rcx
	je	.L2
	xor	edx, edx
	test	eax, eax
	setne	dl
	add	edx, 1
.L2:
	mov	edi, DWORD PTR DA9052_CURRENT_RANGE[rip]
	sub	edi, 1
	js	.L3
	mov	rcx, QWORD PTR da9052_current_limits[rip]
	movsx	rdx, edx
	movsx	rdi, edi
	mov	rsi, QWORD PTR [rcx+rdx*8]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8d, DWORD PTR [rsi+rdi*4]
	mov	ecx, edi
	cmp	r8d, ebx
	jl	.L12
	cmp	r8d, ebp
	jle	.L4
.L12:
	sub	rdi, 1
	test	edi, edi
	jns	.L6
.L3:
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	esi, eax
	shr	esi, 31
	add	esi, eax
	sar	esi
	movsx	rsi, esi
	add	rsi, QWORD PTR DA9052_BUCKA_REG[rip]
	test	al, 1
	je	.L8
	mov	edx, DWORD PTR DA9052_BUCK_ILIM_MASK_ODD[rip]
	sal	ecx, 6
.L21:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r9
	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
	jmp	da9052_reg_update@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, DWORD PTR DA9052_BUCK_ILIM_MASK_EVEN[rip]
	sal	ecx, 2
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	da9052_dcdc_set_current_limit, .-da9052_dcdc_set_current_limit
	.comm	da9052_current_limits,8,8
	.comm	EINVAL,4,4
	.comm	DA9052_CURRENT_RANGE,4,4
	.comm	DA9052_BUCK_ILIM_MASK_ODD,4,4
	.comm	DA9052_BUCK_ILIM_MASK_EVEN,4,4
	.comm	DA9052_BUCKA_REG,8,8
	.comm	DA9052,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_da9052-regulator.c_da9052_dcdc_set_current_limit.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	da9052_dcdc_set_current_limit, %function
da9052_dcdc_set_current_limit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r2
	mov	r7, r0
	mov	r5, r1
	bl	rdev_get_drvdata
	mov	r4, r0
	mov	r0, r7
	bl	rdev_get_id
	ldr	r7, [r4]
	ldr	r3, .L17
	ldr	ip, [r7]
	ldr	r3, [r3]
	mov	r2, r0
	cmp	ip, r3
	moveq	r0, #0
	beq	.L2
	cmp	r2, #0
	movne	r0, #2
	moveq	r0, #1
.L2:
	ldr	r3, .L17+4
	ldr	r1, [r3]
	subs	r3, r1, #1
	bmi	.L3
	ldr	ip, .L17+8
	ldr	ip, [ip]
	ldr	lr, [ip, r0, lsl #2]
	add	lr, lr, r1, lsl #2
.L5:
	ldr	ip, [lr, #-4]!
	cmp	ip, r5
	movlt	r4, #0
	movge	r4, #1
	cmp	ip, r6
	movgt	r4, #0
	cmp	r4, #0
	bne	.L4
	subs	r3, r3, #1
	bcs	.L5
.L3:
	ldr	r3, .L17+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r1, .L17+16
	tst	r2, #1
	ldr	r1, [r1]
	add	r2, r2, r2, lsr #31
	add	r1, r1, r2, asr #1
	bne	.L16
	ldr	r2, .L17+20
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r2, [r2]
	lsl	r3, r3, #2
	b	da9052_reg_update
.L16:
	ldr	r2, .L17+24
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r2, [r2]
	lsl	r3, r3, #6
	b	da9052_reg_update
.L18:
	.align	2
.L17:
	.word	DA9052
	.word	DA9052_CURRENT_RANGE
	.word	da9052_current_limits
	.word	EINVAL
	.word	DA9052_BUCKA_REG
	.word	DA9052_BUCK_ILIM_MASK_EVEN
	.word	DA9052_BUCK_ILIM_MASK_ODD
	.size	da9052_dcdc_set_current_limit, .-da9052_dcdc_set_current_limit
	.comm	da9052_current_limits,4,4
	.comm	EINVAL,4,4
	.comm	DA9052_CURRENT_RANGE,4,4
	.comm	DA9052_BUCK_ILIM_MASK_ODD,4,4
	.comm	DA9052_BUCK_ILIM_MASK_EVEN,4,4
	.comm	DA9052_BUCKA_REG,4,4
	.comm	DA9052,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
