	.file	"extr_adt7475.c_set_pwm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_pwm, @function
set_pwm:
.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
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	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	to_sensor_dev_attr_2@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	to_i2c_client@PLT
	mov	rdi, rax
	mov	r13, rax
	call	i2c_get_clientdata@PLT
	lea	rdx, 16[rsp]
	mov	esi, 10
	mov	rdi, r14
	mov	rbp, rax
	call	strict_strtol@PLT
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR EINVAL[rip]
	neg	rax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L13
	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
.L2:
	.cfi_restore_state
	lea	r14, 8[rbp]
	mov	rdi, r14
	call	mutex_lock@PLT
	movsx	rax, DWORD PTR [rbx]
	cmp	eax, 129
	je	.L4
	cmp	eax, 130
	je	.L5
	xor	r15d, r15d
	cmp	eax, 128
	je	.L14
.L7:
	mov	rcx, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR 8[rbx]
	xor	esi, esi
	mov	rdi, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR [rcx+rax*8]
	lea	rcx, [rax+rdx*4]
	mov	edx, 255
	mov	QWORD PTR 8[rsp], rcx
	call	SENSORS_LIMIT@PLT
	mov	rcx, QWORD PTR 8[rsp]
	mov	esi, r15d
	mov	rdi, r13
	mov	rdx, QWORD PTR 8[rbx]
	mov	DWORD PTR [rcx], eax
	mov	rax, QWORD PTR 0[rbp]
	movsx	rcx, DWORD PTR [rbx]
	mov	rax, QWORD PTR [rax+rcx*8]
	mov	edx, DWORD PTR [rax+rdx*4]
	call	i2c_smbus_write_byte_data@PLT
.L11:
	mov	rdi, r14
	call	mutex_unlock@PLT
	mov	rax, r12
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR 8[rbx]
	call	PWM_MAX_REG@PLT
	movzx	r15d, al
	movsx	rax, DWORD PTR [rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, QWORD PTR 8[rbx]
	call	PWM_MIN_REG@PLT
	movzx	r15d, al
	movsx	rax, DWORD PTR [rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR 8[rbx]
	call	PWM_CONFIG_REG@PLT
	mov	rcx, QWORD PTR CONTROL[rip]
	mov	rdx, QWORD PTR 8[rbx]
	mov	edi, eax
	mov	rax, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR [rax+rcx*8]
	lea	r15, [rax+rdx*4]
	call	adt7475_read@PLT
	mov	rdx, QWORD PTR CONTROL[rip]
	mov	rdi, QWORD PTR 8[rbx]
	mov	DWORD PTR [r15], eax
	mov	rax, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	eax, DWORD PTR [rax+rdi*4]
	xor	al, -32
	test	al, -32
	jne	.L11
	call	PWM_REG@PLT
	movzx	r15d, al
	movsx	rax, DWORD PTR [rbx]
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	set_pwm, .-set_pwm
	.comm	EINVAL,8,8
	.comm	CONTROL,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_adt7475.c_set_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	set_pwm, %function
set_pwm:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r3
	ldr	r3, .L14
	sub	sp, sp, #12
	mov	r7, r0
	mov	r0, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_sensor_dev_attr_2
	mov	r6, r0
	mov	r0, r7
	bl	to_i2c_client
	mov	r8, r0
	bl	i2c_get_clientdata
	mov	r2, sp
	mov	r7, r0
	mov	r1, #10
	mov	r0, r5
	bl	strict_strtol
	subs	r5, r0, #0
	beq	.L2
	ldr	r3, .L14+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	add	r9, r7, #4
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, [r6]
	cmp	r3, #129
	beq	.L4
	cmp	r3, #130
	beq	.L5
	cmp	r3, #128
	beq	.L6
.L7:
	ldr	ip, [r7]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [sp]
	ldr	r10, [ip, r3, lsl #2]
	ldr	fp, [r6, #4]
	bl	SENSORS_LIMIT
	ldr	r3, [r7]
	str	r0, [r10, fp, lsl #2]
	ldm	r6, {r1, r2}
	ldr	r3, [r3, r1, lsl #2]
	mov	r0, r8
	mov	r1, r5
	ldr	r2, [r3, r2, lsl #2]
	bl	i2c_smbus_write_byte_data
.L11:
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r4
	b	.L1
.L4:
	ldr	r0, [r6, #4]
	bl	PWM_MAX_REG
	ldr	r3, [r6]
	mov	r5, r0
	b	.L7
.L6:
	ldr	r0, [r6, #4]
	bl	PWM_MIN_REG
	ldr	r3, [r6]
	mov	r5, r0
	b	.L7
.L5:
	ldr	r5, .L14+8
	ldr	r0, [r6, #4]
	bl	PWM_CONFIG_REG
	ldr	r2, [r5]
	ldr	r3, [r7]
	ldr	fp, [r6, #4]
	ldr	r10, [r3, r2, lsl #2]
	bl	adt7475_read
	ldr	r2, [r5]
	ldr	r3, [r7]
	str	r0, [r10, fp, lsl #2]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r0, [r6, #4]
	ldr	r3, [r3, r0, lsl #2]
	eor	r3, r3, #224
	tst	r3, #224
	bne	.L11
	bl	PWM_REG
	ldr	r3, [r6]
	mov	r5, r0
	b	.L7
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	EINVAL
	.word	CONTROL
	.size	set_pwm, .-set_pwm
	.comm	EINVAL,4,4
	.comm	CONTROL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
