	.file	"extr_lm87.c_fan_div_store.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fan_div_store, @function
fan_div_store:
.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
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	dev_get_drvdata@PLT
	mov	rdi, rax
	mov	r14, rax
	call	i2c_get_clientdata@PLT
	mov	rdi, r13
	mov	rbx, rax
	call	to_sensor_dev_attr@PLT
	lea	rdx, 16[rsp]
	mov	esi, 10
	mov	rdi, r12
	mov	r13d, DWORD PTR [rax]
	call	kstrtol@PLT
	test	eax, eax
	je	.L16
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L16:
	.cfi_restore_state
	lea	r15, 16[rbx]
	movsx	r12, r13d
	mov	rdi, r15
	call	mutex_lock@PLT
	lea	rax, 0[0+r12*4]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rax+r12*4]
	call	FAN_DIV_FROM_REG@PLT
	mov	esi, eax
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR [rax+r12*4]
	call	FAN_FROM_REG@PLT
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 16[rsp]
	cmp	rax, 4
	je	.L3
	jg	.L4
	cmp	rax, 1
	je	.L5
	cmp	rax, 2
	jne	.L7
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rax+r12*4], 1
.L9:
	mov	esi, DWORD PTR LM87_REG_VID_FAN_DIV[rip]
	mov	rdi, r14
	call	lm87_read_value@PLT
	mov	edx, eax
	test	r13d, r13d
	je	.L10
	cmp	r13d, 1
	je	.L11
.L12:
	mov	esi, DWORD PTR LM87_REG_VID_FAN_DIV[rip]
	mov	rdi, r14
	call	lm87_write_value@PLT
	mov	rsi, QWORD PTR 16[rsp]
	mov	rdi, QWORD PTR [rsp]
	lea	rdx, 0[0+r12*4]
	add	rdx, QWORD PTR [rbx]
	mov	QWORD PTR 8[rsp], rdx
	call	FAN_TO_REG@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	edi, r13d
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR [rbx]
	mov	r12d, DWORD PTR [rax+r12*4]
	call	LM87_REG_FAN_MIN@PLT
	mov	rdi, r14
	mov	esi, eax
	mov	edx, r12d
	call	lm87_write_value@PLT
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	eax, ebp
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	rax, 8
	jne	.L7
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rax+r12*4], 3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 8[rbx]
	and	edx, 63
	mov	eax, DWORD PTR 4[rax]
	sal	eax, 6
	or	edx, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[rbx]
	and	edx, 207
	mov	eax, DWORD PTR [rax]
	sal	eax, 4
	or	edx, eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r15
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rax+r12*4], 0
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rax+r12*4], 2
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fan_div_store, .-fan_div_store
	.comm	LM87_REG_VID_FAN_DIV,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_lm87.c_fan_div_store.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fan_div_store, %function
fan_div_store:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r3
	ldr	r3, .L18
	sub	sp, sp, #8
	mov	r5, r2
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	dev_get_drvdata
	mov	r6, r0
	bl	i2c_get_clientdata
	mov	r4, r0
	mov	r0, r7
	bl	to_sensor_dev_attr
	mov	r3, r0
	mov	r2, sp
	mov	r0, r5
	mov	r1, #10
	ldr	r5, [r3]
	bl	kstrtol
	cmp	r0, #0
	beq	.L16
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	add	r9, r4, #8
	mov	r0, r9
	bl	mutex_lock
	ldm	r4, {r2, r3}
	ldr	r0, [r3, r5, lsl #2]
	ldr	r7, [r2, r5, lsl #2]
	bl	FAN_DIV_FROM_REG
	mov	r1, r0
	mov	r0, r7
	bl	FAN_FROM_REG
	ldr	r3, [sp]
	mov	r7, r0
	sub	r3, r3, #1
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L8
	.word	.L7
	.word	.L3
	.word	.L6
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L4
.L3:
	mov	r0, r9
	bl	mutex_unlock
	ldr	r3, .L18+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L4:
	mov	r2, #3
	ldr	r3, [r4, #4]
	str	r2, [r3, r5, lsl #2]
.L9:
	ldr	r10, .L18+8
	mov	r0, r6
	ldr	r1, [r10]
	bl	lm87_read_value
	cmp	r5, #0
	mov	r2, r0
	beq	.L10
	cmp	r5, #1
	ldreq	r3, [r4, #4]
	andeq	r2, r0, #63
	ldreq	r0, [r3, #4]
	orreq	r2, r2, r0, lsl #6
.L12:
	ldr	r1, [r10]
	mov	r0, r6
	bl	lm87_write_value
	ldr	r1, [sp]
	mov	r0, r7
	ldr	r7, [r4]
	bl	FAN_TO_REG
	mov	r3, r0
	mov	r0, r5
	str	r3, [r7, r5, lsl #2]
	bl	LM87_REG_FAN_MIN
	ldr	r3, [r4]
	mov	r1, r0
	ldr	r2, [r3, r5, lsl #2]
	mov	r0, r6
	bl	lm87_write_value
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r8
	b	.L1
.L6:
	mov	r2, #2
	ldr	r3, [r4, #4]
	str	r2, [r3, r5, lsl #2]
	b	.L9
.L7:
	mov	r2, #1
	ldr	r3, [r4, #4]
	str	r2, [r3, r5, lsl #2]
	b	.L9
.L8:
	mov	r2, #0
	ldr	r3, [r4, #4]
	str	r2, [r3, r5, lsl #2]
	b	.L9
.L10:
	ldr	r3, [r4, #4]
	and	r2, r0, #207
	ldr	r0, [r3]
	orr	r2, r2, r0, lsl #4
	b	.L12
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	EINVAL
	.word	LM87_REG_VID_FAN_DIV
	.size	fan_div_store, .-fan_div_store
	.comm	LM87_REG_VID_FAN_DIV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
