	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_bat_get_property
_twl4030_madc_bat_get_property:         ## @twl4030_madc_bat_get_property
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	addl	$-128, %ebx
	cmpl	$9, %ebx
	ja	LBB0_3
## %bb.1:
	movq	%rax, %r15
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_voltage
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	jmp	LBB0_18
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_4:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_voltage
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_twl4030_madc_bat_voltscale
	movq	(%r15), %rcx
	movslq	(%rcx), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	imull	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	leal	(%rax,%rax,8), %eax
	jmp	LBB0_18
LBB0_5:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_temp
	jmp	LBB0_18
LBB0_6:
	movq	_POWER_SUPPLY_TECHNOLOGY_LION@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_7:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_voltage
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_twl4030_madc_bat_voltscale
	cmpl	$96, %eax
	jl	LBB0_14
## %bb.8:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_9:
	movl	$1, (%r14)
	jmp	LBB0_19
LBB0_10:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_current
	jmp	LBB0_18
LBB0_11:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_voltage
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_twl4030_madc_bat_voltscale
	movq	(%r15), %rcx
	imull	(%rcx), %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	movl	%eax, (%r14)
	jmp	LBB0_19
LBB0_12:
	movq	(%r15), %rax
	jmp	LBB0_17
LBB0_13:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_voltage
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_twl4030_madc_bat_voltscale
	jmp	LBB0_18
LBB0_14:
	movq	%r15, %rdi
	callq	_twl4030_madc_bat_get_charging_status
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
LBB0_18:
	movl	%eax, (%r14)
LBB0_19:
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ## @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_twl4030_madc_bat_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_madc_bat_get_property
_twl4030_madc_bat_get_property:         ; @twl4030_madc_bat_get_property
	.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	x19, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	sub	w8, w21, #128
	cmp	w8, #9
	b.hi	LBB0_3
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_voltage
	mov	x8, x0
	mov	w0, #0
	mov	w9, #1000
	mul	w8, w8, w9
	b	LBB0_19
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_4:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_voltage
	mov	x1, x0
	mov	x0, x20
	bl	_twl4030_madc_bat_voltscale
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20]
	ldrsw	x9, [x9]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	mul	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	add	w8, w8, w8, lsl #3
	b	LBB0_19
LBB0_5:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_temp
	b	LBB0_14
LBB0_6:
	mov	w0, #0
Lloh5:
	adrp	x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGEOFF]
	b	LBB0_18
LBB0_7:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_voltage
	mov	x1, x0
	mov	x0, x20
	bl	_twl4030_madc_bat_voltscale
	cmp	w0, #96
	b.lt	LBB0_15
; %bb.8:
	mov	w0, #0
Lloh7:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	b	LBB0_18
LBB0_9:
	mov	w0, #0
	mov	w8, #1
	b	LBB0_19
LBB0_10:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_current
	b	LBB0_14
LBB0_11:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_voltage
	mov	x1, x0
	mov	x0, x20
	bl	_twl4030_madc_bat_voltscale
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20]
	ldr	w9, [x9]
	mul	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	b	LBB0_19
LBB0_12:
	mov	w0, #0
	ldr	x8, [x20]
	b	LBB0_18
LBB0_13:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_voltage
	mov	x1, x0
	mov	x0, x20
	bl	_twl4030_madc_bat_voltscale
LBB0_14:
	mov	x8, x0
	mov	w0, #0
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	bl	_twl4030_madc_bat_get_charging_status
	cbz	w0, LBB0_17
; %bb.16:
	mov	w0, #0
Lloh9:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh11:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
LBB0_19:
	str	w8, [x19]
LBB0_20:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ; @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_twl4030_madc_bat_get_property
.subsections_via_symbols
