	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc294x_get_temperature
_ltc294x_get_temperature:               ## @ltc294x_get_temperature
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rax
	movq	_LTC2942_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$6000, %eax                     ## imm = 0x1770
	movl	$5100, %ebx                     ## imm = 0x13EC
	movq	_LTC2943_REG_TEMPERATURE_MSB@GOTPCREL(%rip), %rcx
	cmoveq	_LTC2942_REG_TEMPERATURE_MSB@GOTPCREL(%rip), %rcx
	cmovel	%eax, %ebx
	movl	(%rcx), %esi
	movl	8(%rdi), %edi
	leaq	-32(%rbp), %rdx
	movl	$2, %ecx
	callq	_ltc294x_read_regs
	movl	-32(%rbp), %ecx
	shll	$8, %ecx
	orl	-28(%rbp), %ecx
	imull	%ebx, %ecx
	movslq	%ecx, %rcx
	imulq	$-2147450879, %rcx, %rdx        ## imm = 0x80008001
	shrq	$32, %rdx
	addl	%edx, %ecx
	movl	%ecx, %edx
	sarl	$15, %edx
	shrl	$31, %ecx
	addl	%edx, %ecx
	addl	$-2722, %ecx                    ## imm = 0xF55E
	movl	%ecx, (%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LTC2942_ID,8,3                 ## @LTC2942_ID
	.comm	_LTC2942_REG_TEMPERATURE_MSB,4,2 ## @LTC2942_REG_TEMPERATURE_MSB
	.comm	_LTC2943_REG_TEMPERATURE_MSB,4,2 ## @LTC2943_REG_TEMPERATURE_MSB
	.no_dead_strip	_ltc294x_get_temperature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc294x_get_temperature
_ltc294x_get_temperature:               ; @ltc294x_get_temperature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _LTC2942_ID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LTC2942_ID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	w10, #5100
Lloh6:
	adrp	x11, _LTC2942_REG_TEMPERATURE_MSB@GOTPAGE
Lloh7:
	ldr	x11, [x11, _LTC2942_REG_TEMPERATURE_MSB@GOTPAGEOFF]
Lloh8:
	adrp	x12, _LTC2943_REG_TEMPERATURE_MSB@GOTPAGE
Lloh9:
	ldr	x12, [x12, _LTC2943_REG_TEMPERATURE_MSB@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x12, eq
	mov	w9, #6000
	csel	w20, w9, w10, eq
	ldr	w1, [x8]
	ldr	w0, [x0, #8]
	mov	x2, sp
	mov	w3, #2
	bl	_ltc294x_read_regs
	ldp	w8, w9, [sp]
	orr	w8, w9, w8, lsl #8
	mul	w8, w8, w20
	mov	w9, #32769
	movk	w9, #32768, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #15
	add	w8, w9, w8, lsr #31
	sub	w8, w8, #2722
	str	w8, [x19]
	ldr	x8, [sp, #8]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LTC2942_ID,8,3                 ; @LTC2942_ID
	.comm	_LTC2942_REG_TEMPERATURE_MSB,4,2 ; @LTC2942_REG_TEMPERATURE_MSB
	.comm	_LTC2943_REG_TEMPERATURE_MSB,4,2 ; @LTC2943_REG_TEMPERATURE_MSB
	.no_dead_strip	_ltc294x_get_temperature
.subsections_via_symbols
