	.file	"extr_max16065.c_max16065_probe.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	max16065_probe, @function
max16065_probe:
.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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rdi, QWORD PTR 8[rdi]
	mov	esi, DWORD PTR I2C_FUNC_SMBUS_BYTE_DATA[rip]
	or	esi, DWORD PTR I2C_FUNC_SMBUS_READ_WORD_DATA[rip]
	call	i2c_check_functionality@PLT
	test	eax, eax
	jne	.L2
	mov	r15d, DWORD PTR ENODEV[rip]
	neg	r15d
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
.L2:
	.cfi_restore_state
	lea	rax, 4[rbx]
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 56
	mov	rdi, rax
	mov	QWORD PTR 16[rsp], rax
	call	devm_kzalloc@PLT
	xor	edi, edi
	test	rax, rax
	mov	r14, rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L4
	mov	r15d, DWORD PTR ENOMEM[rip]
	neg	r15d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	QWORD PTR 48[r14], rbx
	lea	rdi, 40[r14]
	call	mutex_init@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rcx, QWORD PTR max16065_num_adc[rip]
	mov	DWORD PTR 28[rsp], 0
	mov	r9d, DWORD PTR [rcx+rax*4]
	mov	rcx, QWORD PTR max16065_have_current[rip]
	mov	DWORD PTR [r14], r9d
	mov	ecx, DWORD PTR [rcx+rax*4]
	mov	DWORD PTR 4[r14], ecx
	mov	rcx, QWORD PTR max16065_have_secondary[rip]
	mov	eax, DWORD PTR [rcx+rax*4]
	mov	DWORD PTR 24[rsp], eax
	test	eax, eax
	jne	.L31
.L5:
	xor	ebp, ebp
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, 4
	mov	edi, r9d
	call	DIV_ROUND_UP@PLT
	cmp	eax, r12d
	jle	.L32
	mov	edi, r12d
	call	MAX16065_SCALE@PLT
	mov	rdi, rbx
	mov	esi, eax
	call	i2c_smbus_read_byte_data@PLT
	mov	edi, eax
	mov	r15d, eax
	shr	edi, 31
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	mov	rdi, r12
	mov	r10, QWORD PTR max16065_adc_range[rip]
	xor	esi, esi
	sal	rdi, 4
.L7:
	mov	r9d, DWORD PTR [r14]
	lea	eax, [rsi+rbp]
	cmp	r9d, eax
	jle	.L8
	lea	ecx, [rsi+rsi]
	mov	eax, r15d
	add	esi, 1
	sar	eax, cl
	and	eax, 3
	mov	ecx, DWORD PTR [r10+rax*4]
	mov	rax, QWORD PTR 24[r14]
	mov	DWORD PTR [rax+rdi], ecx
	add	rdi, 4
	cmp	esi, 4
	jne	.L7
	mov	r9d, DWORD PTR [r14]
.L8:
	add	r12, 1
	add	ebp, 4
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L31:
	mov	esi, DWORD PTR MAX16065_SW_ENABLE[rip]
	mov	rdi, rbx
	call	i2c_smbus_read_byte_data@PLT
	mov	edi, eax
	mov	r15d, eax
	shr	edi, 31
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	and	r15d, DWORD PTR MAX16065_WARNING_OV[rip]
	mov	r9d, DWORD PTR [r14]
	mov	DWORD PTR 28[rsp], r15d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L32:
	mov	edi, DWORD PTR MAX16065_NUM_LIMIT[rip]
	mov	QWORD PTR [rsp], 0
	test	edi, edi
	jle	.L15
.L11:
	mov	rax, QWORD PTR [rsp]
	mov	edx, DWORD PTR 24[rsp]
	or	edx, eax
	mov	r12d, eax
	jne	.L14
.L16:
	add	QWORD PTR [rsp], 1
	mov	rax, QWORD PTR [rsp]
	cmp	DWORD PTR MAX16065_NUM_LIMIT[rip], eax
	jg	.L11
.L15:
	mov	r9, QWORD PTR 16[r14]
	mov	esi, DWORD PTR 24[rsp]
	mov	ebp, 1
	lea	rax, max16065_basic_group[rip]
	mov	QWORD PTR [r9], rax
	test	esi, esi
	je	.L13
	mov	edx, DWORD PTR 28[rsp]
	lea	rax, max16065_max_group[rip]
	mov	ebp, 2
	lea	rcx, max16065_min_group[rip]
	test	edx, edx
	cmove	rax, rcx
	mov	QWORD PTR 8[r9], rax
.L13:
	mov	eax, DWORD PTR 4[r14]
	test	eax, eax
	je	.L19
	mov	esi, DWORD PTR MAX16065_CURR_CONTROL[rip]
	mov	rdi, rbx
	call	i2c_smbus_read_byte_data@PLT
	mov	edi, eax
	mov	r15d, eax
	shr	edi, 31
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	mov	r9, QWORD PTR 16[r14]
	test	DWORD PTR MAX16065_CURR_ENABLE[rip], r15d
	je	.L20
	mov	ecx, r15d
	mov	eax, 6
	sar	ecx, 2
	and	ecx, 3
	sal	eax, cl
	mov	rcx, QWORD PTR max16065_csp_adc_range[rip]
	mov	DWORD PTR 8[r14], eax
	mov	eax, r15d
	sar	eax
	and	eax, 1
	mov	esi, DWORD PTR [rcx+rax*4]
	mov	rax, QWORD PTR 24[r14]
	mov	rcx, QWORD PTR MAX16065_NUM_ADC[rip]
	mov	DWORD PTR [rax+rcx*4], esi
	lea	rax, max16065_current_group[rip]
	mov	QWORD PTR [r9+rbp*8], rax
.L19:
	mov	rdi, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR [rbx]
	mov	rdx, r14
	mov	rcx, r9
	call	devm_hwmon_device_register_with_groups@PLT
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, rax
	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
	jmp	PTR_ERR_OR_ZERO@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	ecx, DWORD PTR [r14]
	test	ecx, ecx
	jle	.L16
	mov	rax, QWORD PTR [rsp]
	xor	r13d, r13d
	sal	rax, 3
	mov	QWORD PTR 8[rsp], rax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rax, QWORD PTR 32[r14]
	mov	rdx, QWORD PTR 8[rsp]
	mov	edi, r15d
	mov	rax, QWORD PTR [rax+rdx]
	lea	rbp, [rax+r13*4]
	mov	rax, QWORD PTR 24[r14]
	mov	esi, DWORD PTR [rax+r13*4]
	add	r13, 1
	call	LIMIT_TO_MV@PLT
	mov	DWORD PTR 0[rbp], eax
	cmp	DWORD PTR [r14], r13d
	jle	.L16
.L17:
	mov	esi, r13d
	mov	edi, r12d
	call	MAX16065_LIMIT@PLT
	mov	rdi, rbx
	mov	esi, eax
	call	i2c_smbus_read_byte_data@PLT
	mov	edi, eax
	mov	r15d, eax
	shr	edi, 31
	call	unlikely@PLT
	test	rax, rax
	je	.L33
	jmp	.L1
.L20:
	mov	DWORD PTR 4[r14], 0
	jmp	.L19
	.cfi_endproc
.LFE0:
	.size	max16065_probe, .-max16065_probe
	.comm	max16065_num_adc,8,8
	.comm	max16065_min_group,4,4
	.comm	max16065_max_group,4,4
	.comm	max16065_have_secondary,8,8
	.comm	max16065_have_current,8,8
	.comm	max16065_current_group,4,4
	.comm	max16065_csp_adc_range,8,8
	.comm	max16065_basic_group,4,4
	.comm	max16065_adc_range,8,8
	.comm	MAX16065_WARNING_OV,4,4
	.comm	MAX16065_SW_ENABLE,4,4
	.comm	MAX16065_NUM_LIMIT,4,4
	.comm	MAX16065_NUM_ADC,8,8
	.comm	MAX16065_CURR_ENABLE,4,4
	.comm	MAX16065_CURR_CONTROL,4,4
	.comm	I2C_FUNC_SMBUS_READ_WORD_DATA,4,4
	.comm	I2C_FUNC_SMBUS_BYTE_DATA,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_max16065.c_max16065_probe.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	max16065_probe, %function
max16065_probe:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, .L35
	mov	r6, r1
	ldr	r1, .L35+4
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r5, r0
	sub	sp, sp, #12
	ldr	r0, [r0, #8]
	orr	r1, r1, r2
	bl	i2c_check_functionality
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L35+8
	ldr	r2, [r3]
	rsb	r10, r2, #0
.L1:
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L35+12
	add	r9, r5, #4
	mov	r1, #32
	ldr	r2, [r3]
	mov	r0, r9
	bl	devm_kzalloc
	mov	r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L35+16
	ldr	r2, [r3]
	rsb	r10, r2, #0
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	str	r5, [r4, #28]
	add	r0, r4, #24
	bl	mutex_init
	ldr	r2, .L35+20
	ldr	r3, [r6]
	ldr	r1, [r2]
	ldr	r2, .L35+24
	ldr	r0, [r1, r3, lsl #2]
	ldr	r1, [r2]
	str	r0, [r4]
	ldr	r2, .L35+28
	ldr	r1, [r1, r3, lsl #2]
	ldr	r2, [r2]
	str	r1, [r4, #4]
	ldr	r8, [r2, r3, lsl #2]
	cmp	r8, #0
	streq	r8, [sp, #4]
	bne	.L32
.L5:
	mov	r1, #4
	mov	r7, #0
	bl	DIV_ROUND_UP
	cmp	r0, r7
	ldr	r6, .L35+32
	ble	.L33
.L10:
	mov	r0, r7
	bl	MAX16065_SCALE
	mov	r1, r0
	mov	r0, r5
	bl	i2c_smbus_read_byte_data
	mov	r10, r0
	lsr	r0, r0, #31
	bl	unlikely
	subs	r3, r0, #0
	bne	.L1
	ldr	lr, [r6]
	lsl	r1, r7, #2
.L7:
	ldr	r0, [r4]
	asr	ip, r10, r3
	cmp	r0, r1
	and	ip, ip, #3
	add	r3, r3, #2
	ble	.L8
	ldr	ip, [lr, ip, lsl #2]
	ldr	r0, [r4, #16]
	cmp	r3, #8
	str	ip, [r0, r1, lsl #2]
	add	r1, r1, #1
	bne	.L7
	ldr	r0, [r4]
.L8:
	mov	r1, #4
	bl	DIV_ROUND_UP
	add	r7, r7, #1
	cmp	r0, r7
	bgt	.L10
.L33:
	ldr	r3, .L35+36
	ldr	r3, [r3]
	cmp	r3, #0
	movgt	r6, #0
	ble	.L15
.L11:
	orrs	r3, r8, r6
	bne	.L14
.L16:
	ldr	r3, .L35+36
	add	r6, r6, #1
	ldr	r3, [r3]
	cmp	r3, r6
	bgt	.L11
.L15:
	ldr	r3, [r4, #12]
	ldr	r2, .L35+40
	cmp	r8, #0
	moveq	r6, #1
	str	r2, [r3]
	beq	.L13
	ldr	r0, [sp, #4]
	ldr	r2, .L35+44
	ldr	r1, .L35+48
	cmp	r0, #0
	movne	r10, r2
	moveq	r10, r1
	mov	r6, #2
	str	r10, [r3, #4]
.L13:
	ldr	r2, [r4, #4]
	cmp	r2, #0
	beq	.L19
	ldr	r3, .L35+52
	mov	r0, r5
	ldr	r1, [r3]
	bl	i2c_smbus_read_byte_data
	mov	r10, r0
	lsr	r0, r0, #31
	bl	unlikely
	cmp	r0, #0
	bne	.L1
	ldr	r1, .L35+56
	ldr	r3, [r4, #12]
	ldr	r1, [r1]
	ands	r1, r10, r1
	streq	r1, [r4, #4]
	beq	.L19
	mov	r1, #6
	ldr	ip, .L35+60
	asr	r0, r10, #2
	and	r0, r0, #3
	ldr	ip, [ip]
	lsl	r1, r1, r0
	asr	r2, r10, #1
	ldr	r0, .L35+64
	str	r1, [r4, #8]
	and	r2, r2, #1
	ldr	ip, [ip, r2, lsl #2]
	ldr	r0, [r0]
	ldr	r1, [r4, #16]
	ldr	r2, .L35+68
	str	ip, [r1, r0, lsl #2]
	str	r2, [r3, r6, lsl #2]
.L19:
	mov	r2, r4
	mov	r0, r9
	ldr	r1, [r5]
	bl	devm_hwmon_device_register_with_groups
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	PTR_ERR_OR_ZERO
.L32:
	ldr	r3, .L35+72
	mov	r0, r5
	ldr	r1, [r3]
	bl	i2c_smbus_read_byte_data
	mov	r10, r0
	lsr	r0, r0, #31
	bl	unlikely
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L35+76
	ldr	r0, [r4]
	ldr	r3, [r3]
	and	r3, r10, r3
	str	r3, [sp, #4]
	b	.L5
.L14:
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L16
	mov	fp, #0
	lsl	r7, r6, #2
	b	.L17
.L34:
	ldr	r1, [r4, #16]
	ldr	ip, [r4, #20]
	mov	r0, r10
	ldr	r1, [r1, fp, lsl #2]
	ldr	r10, [ip, r7]
	bl	LIMIT_TO_MV
	str	r0, [r10, fp, lsl #2]
	ldr	r2, [r4]
	add	fp, fp, #1
	cmp	r2, fp
	ble	.L16
.L17:
	mov	r1, fp
	mov	r0, r6
	bl	MAX16065_LIMIT
	mov	r1, r0
	mov	r0, r5
	bl	i2c_smbus_read_byte_data
	mov	r10, r0
	lsr	r0, r0, #31
	bl	unlikely
	cmp	r0, #0
	beq	.L34
	b	.L1
.L36:
	.align	2
.L35:
	.word	I2C_FUNC_SMBUS_READ_WORD_DATA
	.word	I2C_FUNC_SMBUS_BYTE_DATA
	.word	ENODEV
	.word	GFP_KERNEL
	.word	ENOMEM
	.word	max16065_num_adc
	.word	max16065_have_current
	.word	max16065_have_secondary
	.word	max16065_adc_range
	.word	MAX16065_NUM_LIMIT
	.word	max16065_basic_group
	.word	max16065_max_group
	.word	max16065_min_group
	.word	MAX16065_CURR_CONTROL
	.word	MAX16065_CURR_ENABLE
	.word	max16065_csp_adc_range
	.word	MAX16065_NUM_ADC
	.word	max16065_current_group
	.word	MAX16065_SW_ENABLE
	.word	MAX16065_WARNING_OV
	.size	max16065_probe, .-max16065_probe
	.comm	max16065_num_adc,4,4
	.comm	max16065_min_group,4,4
	.comm	max16065_max_group,4,4
	.comm	max16065_have_secondary,4,4
	.comm	max16065_have_current,4,4
	.comm	max16065_current_group,4,4
	.comm	max16065_csp_adc_range,4,4
	.comm	max16065_basic_group,4,4
	.comm	max16065_adc_range,4,4
	.comm	MAX16065_WARNING_OV,4,4
	.comm	MAX16065_SW_ENABLE,4,4
	.comm	MAX16065_NUM_LIMIT,4,4
	.comm	MAX16065_NUM_ADC,4,4
	.comm	MAX16065_CURR_ENABLE,4,4
	.comm	MAX16065_CURR_CONTROL,4,4
	.comm	I2C_FUNC_SMBUS_READ_WORD_DATA,4,4
	.comm	I2C_FUNC_SMBUS_BYTE_DATA,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
