	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_set_fan_pulses
_do_set_fan_pulses:                     ## @do_set_fan_pulses
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_g762_update_client
	movq	%rax, %rbx
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	cmpq	$4, %r15
	je	LBB0_5
## %bb.2:
	cmpq	$2, %r15
	jne	LBB0_4
## %bb.3:
	movq	_G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	8(%r14), %edx
	jmp	LBB0_6
LBB0_5:
	movq	_G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPCREL(%rip), %rax
	movl	8(%r14), %edx
	orl	(%rax), %edx
LBB0_6:
	movl	%edx, 8(%r14)
	movl	12(%r14), %edi
	movq	_G762_REG_FAN_CMD1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	movl	$0, (%r14)
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_7:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_G762_REG_FAN_CMD1_PULSE_PER_REV,4,2 ## @G762_REG_FAN_CMD1_PULSE_PER_REV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_G762_REG_FAN_CMD1,4,2          ## @G762_REG_FAN_CMD1
	.no_dead_strip	_do_set_fan_pulses
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_set_fan_pulses
_do_set_fan_pulses:                     ; @do_set_fan_pulses
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	bl	_g762_update_client
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	cmp	x21, #4
	b.eq	LBB0_5
; %bb.3:
	cmp	x21, #2
	b.ne	LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	bic	w2, w9, w8
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _G762_REG_FAN_CMD1_PULSE_PER_REV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w2, w9, w8
LBB0_6:
	str	w2, [x20, #8]
	ldr	w0, [x20, #12]
Lloh6:
	adrp	x8, _G762_REG_FAN_CMD1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _G762_REG_FAN_CMD1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	str	wzr, [x20]
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_G762_REG_FAN_CMD1_PULSE_PER_REV,4,2 ; @G762_REG_FAN_CMD1_PULSE_PER_REV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_G762_REG_FAN_CMD1,4,2          ; @G762_REG_FAN_CMD1
	.no_dead_strip	_do_set_fan_pulses
.subsections_via_symbols
