	.file	"extr_mc13892-regulator.c_mc13892_sw_regulator_set_voltage_sel.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mc13892_sw_regulator_set_voltage_sel, @function
mc13892_sw_regulator_set_voltage_sel:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	rdev_get_drvdata@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	rdev_get_id@PLT
	mov	rdx, QWORD PTR MC13892_SWITCHERS0[rip]
	movsx	rbx, eax
	mov	rax, QWORD PTR mc13892_regulators[rip]
	sal	rbx, 4
	add	rax, rbx
	mov	r14d, DWORD PTR [rax]
	cmp	QWORD PTR 8[rax], rdx
	je	.L2
	mov	rcx, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR MC13892_SWITCHERS0_SWxHI[rip]
	mov	edx, r12d
	mov	rcx, QWORD PTR [rcx]
	or	r14d, eax
	cmp	DWORD PTR [rcx+rdx*4], 1375000
	jle	.L3
	sub	r12d, DWORD PTR MC13892_SWxHI_SEL_OFFSET[rip]
	or	r12d, eax
.L2:
	mov	edi, DWORD PTR 0[r13]
	call	mc13xxx_lock@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	ecx, r12d
	mov	edx, r14d
	mov	rax, QWORD PTR mc13892_regulators[rip]
	mov	rsi, QWORD PTR 8[rax+rbx]
	call	mc13xxx_reg_rmw@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	r12d, eax
	call	mc13xxx_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	not	eax
	and	r12d, eax
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	mc13892_sw_regulator_set_voltage_sel, .-mc13892_sw_regulator_set_voltage_sel
	.comm	mc13892_regulators,8,8
	.comm	MC13892_SWxHI_SEL_OFFSET,8,8
	.comm	MC13892_SWITCHERS0_SWxHI,4,4
	.comm	MC13892_SWITCHERS0,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_mc13892-regulator.c_mc13892_sw_regulator_set_voltage_sel.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mc13892_sw_regulator_set_voltage_sel, %function
mc13892_sw_regulator_set_voltage_sel:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r1
	mov	r7, r0
	bl	rdev_get_drvdata
	mov	r6, r0
	mov	r0, r7
	bl	rdev_get_id
	ldr	r9, .L6
	ldr	r2, .L6+4
	ldr	r3, [r9]
	ldr	r2, [r2]
	add	r1, r3, r0, lsl #3
	ldr	r1, [r1, #4]
	ldr	r8, [r3, r0, lsl #3]
	cmp	r1, r2
	lsl	r4, r0, #3
	beq	.L2
	ldr	r2, [r7]
	ldr	r3, .L6+8
	ldr	r1, [r2]
	ldr	r2, .L6+12
	ldr	r1, [r1, r5, lsl #2]
	ldr	r2, [r2]
	cmp	r1, r3
	ldrgt	r3, .L6+16
	orr	r8, r8, r2
	ldrgt	r3, [r3]
	bicle	r5, r5, r2
	subgt	r5, r5, r3
	orrgt	r5, r2, r5
.L2:
	ldr	r0, [r6]
	bl	mc13xxx_lock
	ldr	ip, [r9]
	mov	r3, r5
	add	r4, ip, r4
	ldr	r1, [r4, #4]
	mov	r2, r8
	ldr	r0, [r6]
	bl	mc13xxx_reg_rmw
	mov	r4, r0
	ldr	r0, [r6]
	bl	mc13xxx_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	.align	2
.L6:
	.word	mc13892_regulators
	.word	MC13892_SWITCHERS0
	.word	1375000
	.word	MC13892_SWITCHERS0_SWxHI
	.word	MC13892_SWxHI_SEL_OFFSET
	.size	mc13892_sw_regulator_set_voltage_sel, .-mc13892_sw_regulator_set_voltage_sel
	.comm	mc13892_regulators,4,4
	.comm	MC13892_SWxHI_SEL_OFFSET,4,4
	.comm	MC13892_SWITCHERS0_SWxHI,4,4
	.comm	MC13892_SWITCHERS0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
