	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030battery_temperature
_twl4030battery_temperature:            ## @twl4030battery_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_TEMP_STEP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_TEMP_PSR_R@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_TWL_MODULE_MAIN_CHARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_BCICTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rsi
	callq	_twl_i2c_read_u8
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_14
## %bb.1:
	imull	%r14d, %ebx
	movl	%ebx, %eax
	cltd
	idivl	%r15d
	movq	_TWL4030_BCI_ITHSENS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	-28(%rbp), %ecx
	leal	(%rcx,%rcx,4), %ecx
	addl	%ecx, %ecx
	addl	$10, %ecx
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	cltd
	idivl	%ecx
	movl	%eax, %ecx
	movq	_twl4030_therm_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%eax, %eax
	cmpl	%ecx, 232(%rdx,%rax,4)
	jge	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, 228(%rdx,%rax,4)
	jge	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	56(%rax), %esi
	cmpl	%ecx, (%rdx,%rsi,4)
	jge	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$-56, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	55(%rax), %esi
	cmpl	%ecx, (%rdx,%rsi,4)
	jge	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$-4, %rax
	cmpl	%ecx, 232(%rdx,%rax,4)
	jl	LBB0_3
LBB0_10:
	addl	$58, %eax
	jmp	LBB0_13
LBB0_9:
	addl	$57, %eax
	jmp	LBB0_13
LBB0_11:
	addl	$56, %eax
	jmp	LBB0_13
LBB0_6:
	movl	$-1, %eax
	jmp	LBB0_13
LBB0_12:
	addl	$55, %eax
LBB0_13:
	incl	%eax
LBB0_14:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEMP_STEP_SIZE,4,2             ## @TEMP_STEP_SIZE
	.comm	_TEMP_PSR_R,4,2                 ## @TEMP_PSR_R
	.comm	_TWL_MODULE_MAIN_CHARGE,4,2     ## @TWL_MODULE_MAIN_CHARGE
	.comm	_REG_BCICTL2,4,2                ## @REG_BCICTL2
	.comm	_TWL4030_BCI_ITHSENS,4,2        ## @TWL4030_BCI_ITHSENS
	.comm	_twl4030_therm_tbl,8,3          ## @twl4030_therm_tbl
	.no_dead_strip	_twl4030battery_temperature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030battery_temperature
_twl4030battery_temperature:            ; @twl4030battery_temperature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
Lloh0:
	adrp	x8, _TEMP_STEP_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEMP_STEP_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _TEMP_PSR_R@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TEMP_PSR_R@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
Lloh6:
	adrp	x8, _TWL_MODULE_MAIN_CHARGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TWL_MODULE_MAIN_CHARGE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _REG_BCICTL2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_BCICTL2@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mul	w8, w20, w19
	sdiv	w8, w8, w21
	ldr	w9, [sp, #12]
Lloh12:
	adrp	x10, _TWL4030_BCI_ITHSENS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _TWL4030_BCI_ITHSENS@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	and	w9, w10, w9
	mov	w10, #10
	mul	w9, w9, w10
	add	w10, w9, #10
	mov	w9, #1000
	mul	w8, w8, w9
Lloh15:
	adrp	x9, _twl4030_therm_tbl@GOTPAGE
Lloh16:
	ldr	x9, [x9, _twl4030_therm_tbl@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	sdiv	w10, w8, w10
	mov	w8, #58
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, w8, uxtw #2]
	cmp	w11, w10
	b.ge	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w8, #1
	cmn	w8, #1
	b.ne	LBB0_2
LBB0_4:
	add	w0, w8, #1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TEMP_STEP_SIZE,4,2             ; @TEMP_STEP_SIZE
	.comm	_TEMP_PSR_R,4,2                 ; @TEMP_PSR_R
	.comm	_TWL_MODULE_MAIN_CHARGE,4,2     ; @TWL_MODULE_MAIN_CHARGE
	.comm	_REG_BCICTL2,4,2                ; @REG_BCICTL2
	.comm	_TWL4030_BCI_ITHSENS,4,2        ; @TWL4030_BCI_ITHSENS
	.comm	_twl4030_therm_tbl,8,3          ; @twl4030_therm_tbl
	.no_dead_strip	_twl4030battery_temperature
.subsections_via_symbols
