	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ms_sensors_write_heater        ## -- Begin function ms_sensors_write_heater
	.p2align	4, 0x90
_ms_sensors_write_heater:               ## @ms_sensors_write_heater
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	leaq	-40(%rbp), %rdx
	movq	%rsi, %rdi
	movl	$10, %esi
	callq	_kstrtou8
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	cmpl	$2, -40(%rbp)
	jl	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r15), %rdi
	leaq	-36(%rbp), %rsi
	callq	_ms_sensors_read_config_reg
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_5:
	movl	$251, %eax
	andl	-36(%rbp), %eax
	movl	-40(%rbp), %edx
	shll	$2, %edx
	orl	%eax, %edx
	movl	%edx, -36(%rbp)
	movq	(%r15), %rdi
	movq	_MS_SENSORS_CONFIG_REG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_8
LBB0_7:
	movl	%r14d, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MS_SENSORS_CONFIG_REG_WRITE,4,2 ## @MS_SENSORS_CONFIG_REG_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to write config register\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ms_sensors_write_heater        ; -- Begin function ms_sensors_write_heater
	.p2align	2
_ms_sensors_write_heater:               ; @ms_sensors_write_heater
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x1
	mov	w1, #10
	bl	_kstrtou8
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_3:
	add	x22, x20, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x0, [x20]
	add	x1, sp, #8
	bl	_ms_sensors_read_config_reg
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_8
LBB0_5:
	ldr	w8, [sp, #8]
	mov	w9, #251
	and	w8, w8, w9
	ldr	w9, [sp, #12]
	orr	w2, w8, w9, lsl #2
	str	w2, [sp, #8]
	ldr	x0, [x20]
Lloh3:
	adrp	x8, _MS_SENSORS_CONFIG_REG_WRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MS_SENSORS_CONFIG_REG_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	cbz	w21, LBB0_7
; %bb.6:
	ldr	x0, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	mov	x21, x19
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MS_SENSORS_CONFIG_REG_WRITE,4,2 ; @MS_SENSORS_CONFIG_REG_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to write config register\n"

.subsections_via_symbols
