	.file	"extr_pcf50633-charger.c_pcf50633_mbc_usb_curlim_set.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"error setting usb curlim to %d mA\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"usb curlim to %d mA\n"
	.text
	.p2align 4
	.globl	pcf50633_mbc_usb_curlim_set
	.type	pcf50633_mbc_usb_curlim_set, @function
pcf50633_mbc_usb_curlim_set:
.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	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 4[rdi]
	call	platform_get_drvdata@PLT
	mov	rbx, rax
	cmp	r12d, 999
	jle	.L2
	mov	ecx, DWORD PTR PCF50633_MBCC7_USB_1000mA[rip]
	mov	r13d, 1000
.L3:
	mov	edx, DWORD PTR PCF50633_MBCC7_USB_MASK[rip]
	mov	esi, DWORD PTR PCF50633_REG_MBCC7[rip]
	mov	rdi, rbp
	call	pcf50633_reg_set_bit_mask@PLT
	mov	edx, r13d
	mov	r12d, eax
	test	eax, eax
	je	.L6
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rdi]
	mov	ecx, DWORD PTR [rax]
	test	ecx, ecx
	jne	.L17
.L8:
	mov	esi, DWORD PTR PCF50633_REG_MBCS2[rip]
	call	pcf50633_reg_read@PLT
	and	eax, DWORD PTR PCF50633_MBCS2_MBC_MASK[rip]
	cmp	DWORD PTR PCF50633_MBCS2_MBC_BAT_FULL[rip], eax
	mov	edx, DWORD PTR PCF50633_MBCC1_CHGENA[rip]
	jne	.L15
	mov	esi, DWORD PTR PCF50633_REG_MBCC1[rip]
	mov	rdi, rbp
	call	pcf50633_reg_clear_bits@PLT
	mov	edx, DWORD PTR PCF50633_MBCC1_CHGENA[rip]
.L15:
	mov	esi, DWORD PTR PCF50633_REG_MBCC1[rip]
	mov	rdi, rbp
	mov	ecx, edx
	call	pcf50633_reg_set_bit_mask@PLT
	mov	edi, DWORD PTR [rbx]
	call	power_supply_changed@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	call	dev_info@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rdi]
	mov	ecx, DWORD PTR [rax]
	test	ecx, ecx
	je	.L8
.L17:
	mov	eax, r13d
	mov	esi, DWORD PTR PCF50633_REG_MBCC5[rip]
	sal	eax, 8
	cdq
	idiv	ecx
	mov	edx, 255
	cmp	eax, 255
	cmovbe	edx, eax
	call	pcf50633_reg_write@PLT
	mov	rdi, QWORD PTR 8[rbx]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	r12d, 499
	jle	.L4
	mov	ecx, DWORD PTR PCF50633_MBCC7_USB_500mA[rip]
	mov	r13d, 500
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	r12d, 99
	jle	.L5
	mov	ecx, DWORD PTR PCF50633_MBCC7_USB_100mA[rip]
	mov	r13d, 100
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, DWORD PTR PCF50633_MBCC7_USB_SUSPEND[rip]
	xor	r13d, r13d
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	pcf50633_mbc_usb_curlim_set, .-pcf50633_mbc_usb_curlim_set
	.comm	PCF50633_REG_MBCS2,4,4
	.comm	PCF50633_REG_MBCC7,4,4
	.comm	PCF50633_REG_MBCC5,4,4
	.comm	PCF50633_REG_MBCC1,4,4
	.comm	PCF50633_MBCS2_MBC_MASK,4,4
	.comm	PCF50633_MBCS2_MBC_BAT_FULL,4,4
	.comm	PCF50633_MBCC7_USB_SUSPEND,4,4
	.comm	PCF50633_MBCC7_USB_MASK,4,4
	.comm	PCF50633_MBCC7_USB_500mA,4,4
	.comm	PCF50633_MBCC7_USB_100mA,4,4
	.comm	PCF50633_MBCC7_USB_1000mA,4,4
	.comm	PCF50633_MBCC1_CHGENA,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_pcf50633-charger.c_pcf50633_mbc_usb_curlim_set.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"error setting usb curlim to %d mA\012\000"
	.align	2
.LC1:
	.ascii	"usb curlim to %d mA\012\000"
	.global	__aeabi_idiv
	.text
	.align	2
	.global	pcf50633_mbc_usb_curlim_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	pcf50633_mbc_usb_curlim_set, %function
pcf50633_mbc_usb_curlim_set:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r4, r0
	ldr	r0, [r0, #4]
	bl	platform_get_drvdata
	cmp	r6, #1000
	mov	r5, r0
	blt	.L2
	mov	r8, #1000
	ldr	r3, .L17
	ldr	r3, [r3]
.L3:
	ldr	r2, .L17+4
	ldr	r1, .L17+8
	ldr	r2, [r2]
	mov	r0, r4
	ldr	r1, [r1]
	bl	pcf50633_reg_set_bit_mask
	subs	r7, r0, #0
	mov	r2, r8
	beq	.L6
	ldr	r1, .L17+12
	ldr	r0, [r4]
	bl	dev_err
.L7:
	ldr	r6, [r5, #4]
	ldr	r3, [r6]
	ldr	r1, [r3]
	cmp	r1, #0
	bne	.L16
.L8:
	ldr	r3, .L17+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	pcf50633_reg_read
	ldr	r2, .L17+20
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r0, r0, r2
	cmp	r3, r0
	beq	.L9
	ldr	r3, .L17+28
	ldr	r1, .L17+32
	ldr	r3, [r3]
	mov	r0, r4
	mov	r2, r3
	ldr	r1, [r1]
	bl	pcf50633_reg_set_bit_mask
.L10:
	ldr	r0, [r5]
	bl	power_supply_changed
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	cmp	r6, #500
	blt	.L4
	ldr	r3, .L17+36
	mov	r8, #500
	ldr	r3, [r3]
	b	.L3
.L6:
	ldr	r1, .L17+40
	ldr	r0, [r4]
	bl	dev_info
	b	.L7
.L4:
	cmp	r6, #99
	ldrgt	r3, .L17+44
	ldrle	r3, .L17+48
	movgt	r8, #100
	movle	r8, #0
	ldr	r3, [r3]
	b	.L3
.L9:
	ldr	r8, .L17+28
	ldr	r6, .L17+32
	ldr	r2, [r8]
	ldr	r1, [r6]
	mov	r0, r4
	bl	pcf50633_reg_clear_bits
	ldr	r3, [r8]
	mov	r0, r4
	mov	r2, r3
	ldr	r1, [r6]
	bl	pcf50633_reg_set_bit_mask
	b	.L10
.L16:
	lsl	r0, r8, #8
	bl	__aeabi_idiv
	ldr	r3, .L17+52
	cmp	r0, #255
	movcc	r2, r0
	movcs	r2, #255
	mov	r0, r6
	ldr	r1, [r3]
	bl	pcf50633_reg_write
	ldr	r6, [r5, #4]
	b	.L8
.L18:
	.align	2
.L17:
	.word	PCF50633_MBCC7_USB_1000mA
	.word	PCF50633_MBCC7_USB_MASK
	.word	PCF50633_REG_MBCC7
	.word	.LC0
	.word	PCF50633_REG_MBCS2
	.word	PCF50633_MBCS2_MBC_MASK
	.word	PCF50633_MBCS2_MBC_BAT_FULL
	.word	PCF50633_MBCC1_CHGENA
	.word	PCF50633_REG_MBCC1
	.word	PCF50633_MBCC7_USB_500mA
	.word	.LC1
	.word	PCF50633_MBCC7_USB_100mA
	.word	PCF50633_MBCC7_USB_SUSPEND
	.word	PCF50633_REG_MBCC5
	.size	pcf50633_mbc_usb_curlim_set, .-pcf50633_mbc_usb_curlim_set
	.comm	PCF50633_REG_MBCS2,4,4
	.comm	PCF50633_REG_MBCC7,4,4
	.comm	PCF50633_REG_MBCC5,4,4
	.comm	PCF50633_REG_MBCC1,4,4
	.comm	PCF50633_MBCS2_MBC_MASK,4,4
	.comm	PCF50633_MBCS2_MBC_BAT_FULL,4,4
	.comm	PCF50633_MBCC7_USB_SUSPEND,4,4
	.comm	PCF50633_MBCC7_USB_MASK,4,4
	.comm	PCF50633_MBCC7_USB_500mA,4,4
	.comm	PCF50633_MBCC7_USB_100mA,4,4
	.comm	PCF50633_MBCC7_USB_1000mA,4,4
	.comm	PCF50633_MBCC1_CHGENA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
