	.file	"extr_g762.c_do_set_fan_div.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	do_set_fan_div, @function
do_set_fan_div:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	g762_update_client@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L13
	lea	r12, 4[rbp]
	mov	rdi, r12
	call	mutex_lock@PLT
	cmp	rbx, 4
	je	.L3
	ja	.L4
	cmp	rbx, 1
	je	.L5
	cmp	rbx, 2
	jne	.L7
	mov	eax, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID1[rip]
	mov	edx, DWORD PTR 8[rbp]
	or	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID0[rip]
	not	eax
	and	edx, eax
	mov	DWORD PTR 8[rbp], edx
.L9:
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR G762_REG_FAN_CMD1[rip]
	call	i2c_smbus_write_byte_data@PLT
	mov	DWORD PTR 0[rbp], 0
	mov	r13d, eax
.L10:
	mov	rdi, r12
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L4:
	.cfi_restore_state
	cmp	rbx, 8
	jne	.L7
	mov	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID0[rip]
	or	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID1[rip]
	or	edx, DWORD PTR 8[rbp]
	mov	DWORD PTR 8[rbp], edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	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
	jmp	PTR_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID0[rip]
	or	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID1[rip]
	not	edx
	and	edx, DWORD PTR 8[rbp]
	mov	DWORD PTR 8[rbp], edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r13d, DWORD PTR EINVAL[rip]
	neg	r13d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID0[rip]
	not	edx
	and	edx, DWORD PTR 8[rbp]
	or	edx, DWORD PTR G762_REG_FAN_CMD1_CLK_DIV_ID1[rip]
	mov	DWORD PTR 8[rbp], edx
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	do_set_fan_div, .-do_set_fan_div
	.comm	G762_REG_FAN_CMD1_CLK_DIV_ID1,4,4
	.comm	G762_REG_FAN_CMD1_CLK_DIV_ID0,4,4
	.comm	G762_REG_FAN_CMD1,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_g762.c_do_set_fan_div.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_set_fan_div, %function
do_set_fan_div:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r1
	bl	g762_update_client
	mov	r4, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L13
	add	r6, r4, #4
	mov	r0, r6
	bl	mutex_lock
	sub	r1, r5, #1
	cmp	r1, #7
	ldrls	pc, [pc, r1, asl #2]
	b	.L3
.L5:
	.word	.L8
	.word	.L7
	.word	.L3
	.word	.L6
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L4
.L13:
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	PTR_ERR
.L3:
	ldr	r3, .L14
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L10:
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L8:
	ldr	r2, .L14+4
	ldr	r3, .L14+8
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4, #8]
	orr	r3, r3, r1
	bic	r2, r2, r3
	str	r2, [r4, #8]
.L9:
	ldr	r3, .L14+12
	ldr	r0, [r4, #12]
	ldr	r1, [r3]
	bl	i2c_smbus_write_byte_data
	mov	r3, #0
	mov	r5, r0
	str	r3, [r4]
	b	.L10
.L7:
	ldr	r2, .L14+8
	ldr	r3, .L14+4
	ldr	r1, [r2]
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	orr	r2, r2, r1
	bic	r2, r2, r3
	str	r2, [r4, #8]
	b	.L9
.L6:
	ldr	r2, .L14+8
	ldr	r3, .L14+4
	ldr	r1, [r2]
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	bic	r2, r2, r1
	orr	r2, r2, r3
	str	r2, [r4, #8]
	b	.L9
.L4:
	ldr	r3, .L14+4
	ldr	r2, .L14+8
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r4, #8]
	orr	r2, r2, r1
	orr	r2, r2, r3
	str	r2, [r4, #8]
	b	.L9
.L15:
	.align	2
.L14:
	.word	EINVAL
	.word	G762_REG_FAN_CMD1_CLK_DIV_ID1
	.word	G762_REG_FAN_CMD1_CLK_DIV_ID0
	.word	G762_REG_FAN_CMD1
	.size	do_set_fan_div, .-do_set_fan_div
	.comm	G762_REG_FAN_CMD1_CLK_DIV_ID1,4,4
	.comm	G762_REG_FAN_CMD1_CLK_DIV_ID0,4,4
	.comm	G762_REG_FAN_CMD1,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
