	.file	"extr_w83793.c_store_pwm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	store_pwm, @function
store_pwm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR [rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	to_i2c_client@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	i2c_get_clientdata@PLT
	mov	rdi, r13
	mov	rbx, rax
	call	to_sensor_dev_attr_2@PLT
	lea	rdx, 16[rsp]
	mov	esi, 10
	mov	rdi, r15
	mov	r13d, DWORD PTR [rax]
	mov	r14d, DWORD PTR 4[rax]
	call	kstrtoul@PLT
	test	eax, eax
	je	.L8
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L9
	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
.L8:
	.cfi_restore_state
	lea	r12, 16[rbx]
	mov	rdi, r12
	call	mutex_lock@PLT
	movsx	rcx, r14d
	cmp	DWORD PTR PWM_STOP_TIME[rip], r13d
	mov	QWORD PTR 8[rsp], rcx
	je	.L10
	mov	rdi, QWORD PTR 16[rsp]
	mov	edx, 255
	xor	esi, esi
	call	clamp_val@PLT
	mov	esi, r13d
	mov	edi, r14d
	sar	eax, 2
	cdqe
	mov	QWORD PTR 16[rsp], rax
	call	W83793_REG_PWM@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	w83793_read_value@PLT
	mov	r15d, DWORD PTR 16[rsp]
	movsx	rdx, r13d
	mov	esi, r13d
	and	eax, 192
	mov	rcx, QWORD PTR 8[rsp]
	mov	edi, r14d
	or	r15d, eax
	mov	rax, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rax+rcx*8]
	mov	DWORD PTR [rax+rdx*4], r15d
	call	W83793_REG_PWM@PLT
	movsx	rdx, r15d
	mov	rdi, rbp
	mov	esi, eax
	call	w83793_write_value@PLT
.L4:
	mov	rdi, r12
	call	mutex_unlock@PLT
	mov	eax, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR 16[rsp]
	call	TIME_TO_REG@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	edi, r14d
	mov	QWORD PTR 16[rsp], rax
	mov	r13, rax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR [rax+rcx*8], r13
	call	W83793_REG_PWM_STOP_TIME@PLT
	mov	rdx, r13
	mov	rdi, rbp
	mov	esi, eax
	call	w83793_write_value@PLT
	jmp	.L4
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	store_pwm, .-store_pwm
	.comm	PWM_STOP_TIME,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_w83793.c_store_pwm.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	store_pwm, %function
store_pwm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r3
	ldr	r3, .L11
	sub	sp, sp, #8
	mov	r8, r1
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_i2c_client
	mov	r6, r0
	bl	i2c_get_clientdata
	mov	r5, r0
	mov	r0, r8
	bl	to_sensor_dev_attr_2
	mov	ip, r0
	mov	r2, sp
	ldm	ip, {r8, r9}
	mov	r0, r4
	mov	r1, #10
	bl	kstrtoul
	subs	r4, r0, #0
	beq	.L8
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	add	r10, r5, #8
	mov	r0, r10
	bl	mutex_lock
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L10
	mov	r2, #255
	mov	r1, r4
	ldr	r0, [sp]
	bl	clamp_val
	mov	r1, r8
	asr	r3, r0, #2
	mov	r0, r9
	str	r3, [sp]
	bl	W83793_REG_PWM
	mov	r1, r0
	mov	r0, r6
	bl	w83793_read_value
	ldr	r3, [r5, #4]
	ldr	r2, [sp]
	ldr	r3, [r3, r9, lsl #2]
	and	r0, r0, #192
	orr	r0, r0, r2
	str	r0, [r3, r8, lsl #2]
	mov	r1, r8
	mov	r0, r9
	bl	W83793_REG_PWM
	ldr	r3, [r5, #4]
	mov	r1, r0
	ldr	r3, [r3, r9, lsl #2]
	mov	r0, r6
	ldr	r2, [r3, r8, lsl #2]
	bl	w83793_write_value
.L4:
	mov	r0, r10
	bl	mutex_unlock
	mov	r4, r7
	b	.L1
.L10:
	ldr	r0, [sp]
	bl	TIME_TO_REG
	ldr	r3, [r5]
	str	r0, [sp]
	str	r0, [r3, r9, lsl #2]
	mov	r0, r9
	bl	W83793_REG_PWM_STOP_TIME
	ldr	r2, [sp]
	mov	r1, r0
	mov	r0, r6
	bl	w83793_write_value
	b	.L4
.L9:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	PWM_STOP_TIME
	.size	store_pwm, .-store_pwm
	.comm	PWM_STOP_TIME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
