	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_voltage_to_temp
_ab8500_voltage_to_temp:                ## @ab8500_voltage_to_temp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	4(%rdi), %ecx
	testl	%ecx, %ecx
	js	LBB0_2
## %bb.1:
	subl	%esi, %ecx
	jle	LBB0_2
## %bb.4:
	movq	%rdx, %r8
	movq	16(%rdi), %r9
	imull	8(%rdi), %esi
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	(%r9), %edx
	cmpl	%edx, %eax
	jg	LBB0_2
## %bb.5:
	movslq	(%rdi), %rcx
	cmpl	-8(%r9,%rcx,8), %eax
	jge	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_6:
	addl	$-2, %ecx
	movslq	%ecx, %r10
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %rdi
	movl	%edx, %r11d
	movl	%eax, %ecx
	subl	%edx, %ecx
	jle	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%r10, %rdi
	jge	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%r9,%rdi,8), %edx
	incq	%rdi
	movq	%rdi, %rsi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	8(%r9,%rdi,8), %edx
	cmpl	%edx, %eax
	jg	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	1(%rdi), %rsi
	cmpq	%r10, %rdi
	jl	LBB0_7
LBB0_10:
	movl	%edi, %eax
	movl	4(%r9,%rax,8), %eax
	imull	$1000, %eax, %r10d              ## imm = 0x3E8
	incl	%edi
	movl	(%r9,%rdi,8), %esi
	movl	4(%r9,%rdi,8), %edx
	subl	%eax, %edx
	imull	%edx, %ecx
	imull	$1000, %ecx, %eax               ## imm = 0x3E8
	subl	%r11d, %esi
	cltd
	idivl	%esi
	addl	%r10d, %eax
	movl	%eax, (%r8)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ab8500_voltage_to_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_voltage_to_temp
_ab8500_voltage_to_temp:                ; @ab8500_voltage_to_temp
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0, #4]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	subs	w9, w8, w1
	b.le	LBB0_4
; %bb.2:
	ldr	x8, [x0, #16]
	ldr	w10, [x0, #8]
	mul	w10, w10, w1
	sdiv	w9, w10, w9
	ldr	w11, [x8]
	cmp	w9, w11
	b.gt	LBB0_4
; %bb.3:
	ldrsw	x10, [x0]
	add	x12, x8, x10, lsl #3
	ldur	w12, [x12, #-8]
	cmp	w9, w12
	b.ge	LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_5:
	mov	x14, #0
	sub	x10, x10, #2
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x14, x15, #1
	lsl	x11, x14, #3
	ldr	w11, [x8, x11]
	cmp	w9, w11
	ccmp	x15, x10, #0, le
	b.ge	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x15, x14
	mov	x12, x11
	subs	w13, w9, w11
	b.le	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	x15, x10
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x14, x15, #1
	lsl	x11, x14, #3
	ldr	w11, [x8, x11]
	b	LBB0_7
LBB0_10:
	mov	w0, #0
	add	x9, x8, w15, uxtw #3
	ldr	w9, [x9, #4]
	add	w10, w15, #1
	add	x8, x8, w10, uxtw #3
	ldp	w8, w10, [x8]
	sub	w10, w10, w9
	mul	w10, w13, w10
	mov	w11, #1000
	mul	w10, w10, w11
	sub	w8, w8, w12
	sdiv	w8, w10, w8
	madd	w8, w9, w11, w8
	str	w8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ab8500_voltage_to_temp
.subsections_via_symbols
