	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_vadc_map_voltage_temp
_qcom_vadc_map_voltage_temp:            ## @qcom_vadc_map_voltage_temp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	cmpl	$2, %esi
	jl	LBB0_4
## %bb.3:
	movq	(%rdi), %rax
	cmpq	16(%rdi), %rax
	setl	%r8b
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_4:
	cmpl	$1, %esi
	jne	LBB0_13
## %bb.5:
	xorl	%r8d, %r8d
LBB0_6:
	movl	%esi, %r9d
	xorl	%r10d, %r10d
	movq	%rdi, %rax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rdx, %r11
	jg	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r10
	addq	$16, %rax
	cmpq	%r10, %r9
	je	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %r11
	testb	%r8b, %r8b
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rdx, %r11
	jge	LBB0_10
LBB0_12:
	testl	%r10d, %r10d
	je	LBB0_13
LBB0_15:
	cmpl	%esi, %r10d
	jne	LBB0_17
## %bb.16:
	movslq	%esi, %rax
	shlq	$4, %rax
	movl	-8(%rax,%rdi), %eax
	movl	%eax, (%rcx)
	jmp	LBB0_21
LBB0_11:
	movl	%r9d, %r10d
	testl	%r10d, %r10d
	jne	LBB0_15
LBB0_13:
	movl	8(%rdi), %eax
	movl	%eax, (%rcx)
	jmp	LBB0_21
LBB0_17:
	movl	%r10d, %eax
	shlq	$4, %rax
	movslq	8(%rdi,%rax), %r9
	movslq	%r10d, %rsi
	shlq	$4, %rsi
	movslq	-8(%rsi,%rdi), %r8
	subq	%r8, %r9
	movq	-16(%rsi,%rdi), %rsi
	subq	%rsi, %rdx
	imulq	%r9, %rdx
	movq	(%rdi,%rax), %rdi
	subq	%rsi, %rdi
	movq	%rdx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_18
## %bb.19:
	movq	%rdx, %rax
	cqto
	idivq	%rdi
	jmp	LBB0_20
LBB0_18:
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
LBB0_20:
	addl	%r8d, %eax
	movl	%eax, (%rcx)
LBB0_21:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_qcom_vadc_map_voltage_temp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_vadc_map_voltage_temp
_qcom_vadc_map_voltage_temp:            ; @qcom_vadc_map_voltage_temp
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_3
; %bb.1:
	cmp	w1, #2
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x0]
	ldr	x9, [x0, #16]
	cmp	x8, x9
	cset	w8, lt
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_4:
	cmp	w1, #1
	b.ne	LBB0_15
; %bb.5:
	mov	w8, #0
LBB0_6:
	mov	x9, #0
	mov	w10, w1
	mov	x11, x0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	b.gt	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #1
	add	x11, x11, #16
	cmp	x10, x9
	b.eq	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	cmp	x12, x2
	tbnz	w8, #0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	b.ge	LBB0_8
LBB0_11:
	cbz	w9, LBB0_15
LBB0_12:
	cmp	w9, w1
	b.ne	LBB0_16
; %bb.13:
	mov	w8, #0
	add	x9, x0, w1, sxtw #4
	ldur	w9, [x9, #-8]
	b	LBB0_17
LBB0_14:
	mov	x9, x10
	cbnz	w9, LBB0_12
LBB0_15:
	mov	w8, #0
	ldr	w9, [x0, #8]
	b	LBB0_17
LBB0_16:
	mov	w8, #0
	add	x10, x0, w9, uxtw #4
	ldrsw	x11, [x10, #8]
	add	x9, x0, w9, sxtw #4
	ldursw	x12, [x9, #-8]
	sub	x11, x11, x12
	ldur	x9, [x9, #-16]
	sub	x13, x2, x9
	mul	x11, x13, x11
	ldr	x10, [x10]
	sub	x9, x10, x9
	sdiv	x9, x11, x9
	add	w9, w12, w9
LBB0_17:
	str	w9, [x3]
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_qcom_vadc_map_voltage_temp
.subsections_via_symbols
