	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ab8500_gpadc_ad_to_voltage     ## -- Begin function ab8500_gpadc_ad_to_voltage
	.p2align	4, 0x90
_ab8500_gpadc_ad_to_voltage:            ## @ab8500_gpadc_ad_to_voltage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	addl	$-128, %esi
	cmpl	$15, %esi
	ja	LBB0_17
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	8(%rdi), %rcx
	movq	_ADC_INPUT_BTEMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rcx,%rsi,8), %eax
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	_ADC_CH_BTEMP_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_BTEMP_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movq	8(%rdi), %rcx
	movq	_ADC_INPUT_VBAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rcx,%rsi,8), %eax
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_ADC_CH_VBAT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_VBAT_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_12:
	movq	_ADC_CH_CHG_I_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_CHG_I_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_17:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rdi), %rcx
	movq	_ADC_INPUT_VMAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rcx,%rsi,8), %eax
	testl	%eax, %eax
	je	LBB0_3
LBB0_9:
	imull	%edx, %eax
	addl	4(%rcx,%rsi,8), %eax
	movq	_CALIB_SCALE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	popq	%rbp
	retq
LBB0_3:
	movq	_ADC_CH_CHG_V_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_CHG_V_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_14:
	movq	8(%rdi), %rcx
	movq	_ADC_INPUT_IBAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	(%rcx,%rsi,8), %eax
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	imull	%edx, %eax
	addl	4(%rcx,%rsi,8), %eax
	movq	_CALIB_SHIFT_IBAT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	popq	%rbp
	retq
LBB0_10:
	movq	_ADC_CH_DIETEMP_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_DIETEMP_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_13:
	movq	_ADC_CH_BKBAT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_BKBAT_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_11:
	movq	_ADC_CH_ACCDET2_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_ACCDET2_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_15:
	movq	_ADC_CH_IBAT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ADC_CH_IBAT_MAX@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	subl	%ecx, %eax
	imull	%edx, %eax
	movq	_ADC_RESOLUTION@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	addl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_12
	.long	L0_0_set_7
	.long	L0_0_set_14
	.long	L0_0_set_10
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_11
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_ADC_INPUT_VMAIN,8,3            ## @ADC_INPUT_VMAIN
	.comm	_ADC_CH_CHG_V_MIN,4,2           ## @ADC_CH_CHG_V_MIN
	.comm	_ADC_CH_CHG_V_MAX,4,2           ## @ADC_CH_CHG_V_MAX
	.comm	_ADC_RESOLUTION,4,2             ## @ADC_RESOLUTION
	.comm	_CALIB_SCALE,4,2                ## @CALIB_SCALE
	.comm	_ADC_INPUT_BTEMP,8,3            ## @ADC_INPUT_BTEMP
	.comm	_ADC_CH_BTEMP_MIN,4,2           ## @ADC_CH_BTEMP_MIN
	.comm	_ADC_CH_BTEMP_MAX,4,2           ## @ADC_CH_BTEMP_MAX
	.comm	_ADC_INPUT_VBAT,8,3             ## @ADC_INPUT_VBAT
	.comm	_ADC_CH_VBAT_MIN,4,2            ## @ADC_CH_VBAT_MIN
	.comm	_ADC_CH_VBAT_MAX,4,2            ## @ADC_CH_VBAT_MAX
	.comm	_ADC_CH_DIETEMP_MIN,4,2         ## @ADC_CH_DIETEMP_MIN
	.comm	_ADC_CH_DIETEMP_MAX,4,2         ## @ADC_CH_DIETEMP_MAX
	.comm	_ADC_CH_ACCDET2_MIN,4,2         ## @ADC_CH_ACCDET2_MIN
	.comm	_ADC_CH_ACCDET2_MAX,4,2         ## @ADC_CH_ACCDET2_MAX
	.comm	_ADC_CH_CHG_I_MIN,4,2           ## @ADC_CH_CHG_I_MIN
	.comm	_ADC_CH_CHG_I_MAX,4,2           ## @ADC_CH_CHG_I_MAX
	.comm	_ADC_CH_BKBAT_MIN,4,2           ## @ADC_CH_BKBAT_MIN
	.comm	_ADC_CH_BKBAT_MAX,4,2           ## @ADC_CH_BKBAT_MAX
	.comm	_ADC_INPUT_IBAT,8,3             ## @ADC_INPUT_IBAT
	.comm	_ADC_CH_IBAT_MIN,4,2            ## @ADC_CH_IBAT_MIN
	.comm	_ADC_CH_IBAT_MAX,4,2            ## @ADC_CH_IBAT_MAX
	.comm	_CALIB_SHIFT_IBAT,4,2           ## @CALIB_SHIFT_IBAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown channel, not possible to convert\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ab8500_gpadc_ad_to_voltage     ; -- Begin function ab8500_gpadc_ad_to_voltage
	.p2align	2
_ab8500_gpadc_ad_to_voltage:            ; @ab8500_gpadc_ad_to_voltage
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub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@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _ADC_CH_CHG_I_MAX@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ADC_CH_CHG_I_MAX@GOTPAGEOFF]
	b	LBB0_17
LBB0_7:
	ldr	w0, [x0]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x8, [x0, #8]
Lloh28:
	adrp	x9, _ADC_INPUT_VMAIN@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ADC_INPUT_VMAIN@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	lsl	x10, x9, #3
	ldr	w10, [x8, x10]
	cbz	w10, LBB0_10
LBB0_9:
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	madd	w8, w10, w2, w8
Lloh31:
	adrp	x9, _CALIB_SCALE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CALIB_SCALE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	sdiv	w0, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh34:
	adrp	x8, _ADC_CH_CHG_V_MIN@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ADC_CH_CHG_V_MIN@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _ADC_CH_CHG_V_MAX@GOTPAGE
Lloh38:
	ldr	x9, [x9, _ADC_CH_CHG_V_MAX@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
	ldr	x8, [x0, #8]
Lloh39:
	adrp	x9, _ADC_INPUT_IBAT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _ADC_INPUT_IBAT@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	lsl	x10, x9, #3
	ldr	w10, [x8, x10]
	cbz	w10, LBB0_16
; %bb.12:
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	madd	w8, w10, w2, w8
Lloh42:
	adrp	x9, _CALIB_SHIFT_IBAT@GOTPAGE
Lloh43:
	ldr	x9, [x9, _CALIB_SHIFT_IBAT@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	asr	w0, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh45:
	adrp	x8, _ADC_CH_DIETEMP_MIN@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ADC_CH_DIETEMP_MIN@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	adrp	x9, _ADC_CH_DIETEMP_MAX@GOTPAGE
Lloh49:
	ldr	x9, [x9, _ADC_CH_DIETEMP_MAX@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
Lloh50:
	adrp	x8, _ADC_CH_BKBAT_MIN@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ADC_CH_BKBAT_MIN@GOTPAGEOFF]
Lloh52:
	ldr	w8, [x8]
Lloh53:
	adrp	x9, _ADC_CH_BKBAT_MAX@GOTPAGE
Lloh54:
	ldr	x9, [x9, _ADC_CH_BKBAT_MAX@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
Lloh55:
	adrp	x8, _ADC_CH_ACCDET2_MIN@GOTPAGE
Lloh56:
	ldr	x8, [x8, _ADC_CH_ACCDET2_MIN@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
Lloh58:
	adrp	x9, _ADC_CH_ACCDET2_MAX@GOTPAGE
Lloh59:
	ldr	x9, [x9, _ADC_CH_ACCDET2_MAX@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh60:
	adrp	x8, _ADC_CH_IBAT_MIN@GOTPAGE
Lloh61:
	ldr	x8, [x8, _ADC_CH_IBAT_MIN@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
Lloh63:
	adrp	x9, _ADC_CH_IBAT_MAX@GOTPAGE
Lloh64:
	ldr	x9, [x9, _ADC_CH_IBAT_MAX@GOTPAGEOFF]
LBB0_17:
	ldr	w9, [x9]
	sub	w9, w9, w8
	mul	w9, w9, w2
Lloh65:
	adrp	x10, _ADC_RESOLUTION@GOTPAGE
Lloh66:
	ldr	x10, [x10, _ADC_RESOLUTION@GOTPAGEOFF]
Lloh67:
	ldr	w10, [x10]
	sdiv	w9, w9, w10
	add	w0, w9, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_ADC_INPUT_VMAIN,8,3            ; @ADC_INPUT_VMAIN
	.comm	_ADC_CH_CHG_V_MIN,4,2           ; @ADC_CH_CHG_V_MIN
	.comm	_ADC_CH_CHG_V_MAX,4,2           ; @ADC_CH_CHG_V_MAX
	.comm	_ADC_RESOLUTION,4,2             ; @ADC_RESOLUTION
	.comm	_CALIB_SCALE,4,2                ; @CALIB_SCALE
	.comm	_ADC_INPUT_BTEMP,8,3            ; @ADC_INPUT_BTEMP
	.comm	_ADC_CH_BTEMP_MIN,4,2           ; @ADC_CH_BTEMP_MIN
	.comm	_ADC_CH_BTEMP_MAX,4,2           ; @ADC_CH_BTEMP_MAX
	.comm	_ADC_INPUT_VBAT,8,3             ; @ADC_INPUT_VBAT
	.comm	_ADC_CH_VBAT_MIN,4,2            ; @ADC_CH_VBAT_MIN
	.comm	_ADC_CH_VBAT_MAX,4,2            ; @ADC_CH_VBAT_MAX
	.comm	_ADC_CH_DIETEMP_MIN,4,2         ; @ADC_CH_DIETEMP_MIN
	.comm	_ADC_CH_DIETEMP_MAX,4,2         ; @ADC_CH_DIETEMP_MAX
	.comm	_ADC_CH_ACCDET2_MIN,4,2         ; @ADC_CH_ACCDET2_MIN
	.comm	_ADC_CH_ACCDET2_MAX,4,2         ; @ADC_CH_ACCDET2_MAX
	.comm	_ADC_CH_CHG_I_MIN,4,2           ; @ADC_CH_CHG_I_MIN
	.comm	_ADC_CH_CHG_I_MAX,4,2           ; @ADC_CH_CHG_I_MAX
	.comm	_ADC_CH_BKBAT_MIN,4,2           ; @ADC_CH_BKBAT_MIN
	.comm	_ADC_CH_BKBAT_MAX,4,2           ; @ADC_CH_BKBAT_MAX
	.comm	_ADC_INPUT_IBAT,8,3             ; @ADC_INPUT_IBAT
	.comm	_ADC_CH_IBAT_MIN,4,2            ; @ADC_CH_IBAT_MIN
	.comm	_ADC_CH_IBAT_MAX,4,2            ; @ADC_CH_IBAT_MAX
	.comm	_CALIB_SHIFT_IBAT,4,2           ; @CALIB_SHIFT_IBAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown channel, not possible to convert\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
