	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm95241_write_chip
_lm95241_write_chip:                    ## @lm95241_write_chip
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	movq	%rax, %r12
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$128, %ebx
	jne	LBB0_7
## %bb.1:
	movq	_CFG_CRMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	(%r12), %edx
	cmpq	$130, %r15
	jge	LBB0_3
## %bb.2:
	movq	_CFG_CR0076@GOTPCREL(%rip), %rcx
	movl	$76, %eax
	jmp	LBB0_6
LBB0_7:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	cmpq	$590, %r15                      ## imm = 0x24E
	jae	LBB0_5
## %bb.4:
	movq	_CFG_CR0182@GOTPCREL(%rip), %rcx
	movl	$182, %eax
	jmp	LBB0_6
LBB0_5:
	cmpq	$1850, %r15                     ## imm = 0x73A
	movl	$1000, %ecx                     ## imm = 0x3E8
	movl	$2700, %eax                     ## imm = 0xA8C
	cmovbl	%ecx, %eax
	movq	_CFG_CR2700@GOTPCREL(%rip), %rcx
	cmovbq	_CFG_CR1000@GOTPCREL(%rip), %rcx
LBB0_6:
	orl	(%rcx), %edx
	movl	%eax, 4(%r12)
	movl	%edx, (%r12)
	movl	12(%r12), %edi
	movq	_LM95241_REG_RW_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_CRMASK,4,2                 ## @CFG_CRMASK
	.comm	_CFG_CR0076,4,2                 ## @CFG_CR0076
	.comm	_CFG_CR0182,4,2                 ## @CFG_CR0182
	.comm	_CFG_CR1000,4,2                 ## @CFG_CR1000
	.comm	_CFG_CR2700,4,2                 ## @CFG_CR2700
	.comm	_LM95241_REG_RW_CONFIG,4,2      ## @LM95241_REG_RW_CONFIG
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_lm95241_write_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm95241_write_chip
_lm95241_write_chip:                    ; @lm95241_write_chip
	.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, x3
	mov	x22, x1
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	cmp	w22, #128
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _CFG_CRMASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CFG_CRMASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh3:
	adrp	x9, _CFG_CR0076@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CFG_CR0076@GOTPAGEOFF]
	mov	w10, #76
Lloh5:
	adrp	x11, _CFG_CR0182@GOTPAGE
Lloh6:
	ldr	x11, [x11, _CFG_CR0182@GOTPAGEOFF]
	mov	w12, #182
	mov	w13, #2700
Lloh7:
	adrp	x14, _CFG_CR2700@GOTPAGE
Lloh8:
	ldr	x14, [x14, _CFG_CR2700@GOTPAGEOFF]
Lloh9:
	adrp	x15, _CFG_CR1000@GOTPAGE
Lloh10:
	ldr	x15, [x15, _CFG_CR1000@GOTPAGEOFF]
	cmp	x21, #1850
	csel	x14, x15, x14, lo
	mov	w15, #1000
	csel	w13, w15, w13, lo
	cmp	x21, #590
	csel	x11, x11, x14, lo
	csel	w12, w12, w13, lo
	cmp	x21, #130
	csel	x9, x9, x11, lt
	csel	w10, w10, w12, lt
	ldr	w9, [x9]
	orr	w2, w9, w8
	stp	w2, w10, [x20]
	ldr	w0, [x20, #12]
Lloh11:
	adrp	x8, _LM95241_REG_RW_CONFIG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LM95241_REG_RW_CONFIG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_i2c_smbus_write_byte_data
	mov	x20, x0
	b	LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	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
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_CRMASK,4,2                 ; @CFG_CRMASK
	.comm	_CFG_CR0076,4,2                 ; @CFG_CR0076
	.comm	_CFG_CR0182,4,2                 ; @CFG_CR0182
	.comm	_CFG_CR1000,4,2                 ; @CFG_CR1000
	.comm	_CFG_CR2700,4,2                 ; @CFG_CR2700
	.comm	_LM95241_REG_RW_CONFIG,4,2      ; @LM95241_REG_RW_CONFIG
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_lm95241_write_chip
.subsections_via_symbols
