	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_btemp_batctrl_volt_to_res
_ab8500_btemp_batctrl_volt_to_res:      ## @ab8500_btemp_batctrl_volt_to_res
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_is_ab8500_1p1_or_earlier
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	imull	$450000, %ebx, %eax             ## imm = 0x6DDD0
	jmp	LBB0_5
LBB0_2:
	movq	8(%r14), %rcx
	movq	(%rcx), %rax
	movq	_ABx500_ADC_THERM_BATCTRL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_4
## %bb.3:
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	imull	8(%rcx), %r15d
	subl	%r15d, %eax
	cltd
	idivl	(%r14)
	jmp	LBB0_6
LBB0_4:
	imull	$80000, %ebx, %eax              ## imm = 0x13880
LBB0_5:
	movl	$1800, %ecx                     ## imm = 0x708
	subl	%ebx, %ecx
	cltd
	idivl	%ecx
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABx500_ADC_THERM_BATCTRL,8,3   ## @ABx500_ADC_THERM_BATCTRL
	.no_dead_strip	_ab8500_btemp_batctrl_volt_to_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_btemp_batctrl_volt_to_res
_ab8500_btemp_batctrl_volt_to_res:      ; @ab8500_btemp_batctrl_volt_to_res
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #16]
	bl	_is_ab8500_1p1_or_earlier
	cbz	x0, LBB0_2
; %bb.1:
	mov	w8, #56784
	movk	w8, #6, lsl #16
	b	LBB0_5
LBB0_2:
	ldr	x8, [x21, #8]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _ABx500_ADC_THERM_BATCTRL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ABx500_ADC_THERM_BATCTRL@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
	mov	w9, #1000
	mul	w9, w19, w9
	ldr	w8, [x8, #8]
	msub	w8, w8, w20, w9
	ldr	w9, [x21]
	b	LBB0_6
LBB0_4:
	mov	w8, #14464
	movk	w8, #1, lsl #16
LBB0_5:
	mul	w8, w19, w8
	mov	w9, #1800
	sub	w9, w9, w19
LBB0_6:
	sdiv	w0, w8, w9
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ABx500_ADC_THERM_BATCTRL,8,3   ; @ABx500_ADC_THERM_BATCTRL
	.no_dead_strip	_ab8500_btemp_batctrl_volt_to_res
.subsections_via_symbols
