	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_battery_get_property
_cpcap_battery_get_property:            ## @cpcap_battery_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_cpcap_battery_update_status
	testl	%eax, %eax
	js	LBB0_41
## %bb.1:
	movq	%r13, %rdi
	callq	_cpcap_battery_latest
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_cpcap_battery_previous
	addl	$-128, %ebx
	cmpl	$14, %ebx
	ja	LBB0_4
## %bb.2:
	movq	%rax, %r12
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	%r13, %rdi
	callq	_cpcap_battery_get_voltage
	jmp	LBB0_39
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_41
LBB0_5:
	movl	8(%r13), %eax
	jmp	LBB0_39
LBB0_6:
	movl	4(%r13), %eax
	jmp	LBB0_39
LBB0_7:
	movl	(%r15), %eax
	jmp	LBB0_39
LBB0_8:
	movl	(%r13), %eax
	jmp	LBB0_39
LBB0_9:
	movq	%r13, %rdi
	callq	_cpcap_battery_full
	testl	%eax, %eax
	je	LBB0_30
## %bb.10:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_11:
	movq	_POWER_SUPPLY_SCOPE_SYSTEM@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_12:
	movl	(%r15), %eax
	movq	_CPCAP_NO_BATTERY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_24
## %bb.13:
	movl	$1, (%r14)
	jmp	LBB0_40
LBB0_14:
	movslq	12(%r15), %rax
	imulq	$1759218605, %rax, %rdi         ## imm = 0x68DB8BAD
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$44, %rdi
	addl	%eax, %edi
	imull	4(%r15), %edi
	jmp	LBB0_27
LBB0_15:
	movq	32(%r15), %rsi
	subq	32(%r12), %rsi
	jne	LBB0_25
## %bb.16:
	movq	%r13, %rdi
	callq	_cpcap_battery_cc_get_avg_current
	movslq	12(%r15), %rcx
	imulq	$1759218605, %rcx, %rdi         ## imm = 0x68DB8BAD
	movq	%rdi, %rcx
	shrq	$63, %rcx
	sarq	$44, %rdi
	jmp	LBB0_26
LBB0_17:
	movl	4(%r15), %eax
	jmp	LBB0_39
LBB0_18:
	movq	32(%r15), %rsi
	subq	32(%r12), %rsi
	jne	LBB0_29
## %bb.19:
	movq	%r13, %rdi
	callq	_cpcap_battery_cc_get_avg_current
	jmp	LBB0_28
LBB0_20:
	movl	12(%r13), %eax
	jmp	LBB0_39
LBB0_21:
	movl	8(%r15), %eax
	jmp	LBB0_39
LBB0_22:
	movq	%r13, %rdi
	callq	_cpcap_battery_full
	testl	%eax, %eax
	je	LBB0_31
## %bb.23:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_24:
	movl	$0, (%r14)
	jmp	LBB0_40
LBB0_25:
	movq	24(%r15), %rdx
	subq	24(%r12), %rdx
	movl	16(%r15), %ecx
	movq	%r13, %rdi
	callq	_cpcap_battery_cc_to_ua
	movl	12(%r12), %ecx
	addl	12(%r15), %ecx
	movslq	%ecx, %rcx
	imulq	$1759218605, %rcx, %rdi         ## imm = 0x68DB8BAD
	movq	%rdi, %rcx
	shrq	$63, %rcx
	sarq	$45, %rdi
LBB0_26:
	addl	%ecx, %edi
	imull	%eax, %edi
LBB0_27:
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$100, %esi
	callq	_div64_s64
LBB0_28:
	movl	%eax, (%r14)
	jmp	LBB0_40
LBB0_29:
	movq	24(%r15), %rdx
	subq	24(%r12), %rdx
	movl	16(%r15), %ecx
	movq	%r13, %rdi
	callq	_cpcap_battery_cc_to_ua
	jmp	LBB0_28
LBB0_30:
	movq	%r13, %rdi
	callq	_cpcap_battery_cc_get_avg_current
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_31:
	movl	12(%r15), %eax
	cmpl	$3750000, %eax                  ## imm = 0x393870
	jl	LBB0_33
## %bb.32:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_33:
	cmpl	$3300000, %eax                  ## imm = 0x325AA0
	jl	LBB0_35
## %bb.34:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_35:
	cmpl	$3100001, %eax                  ## imm = 0x2F4D61
	jl	LBB0_37
## %bb.36:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_38
LBB0_37:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPCREL(%rip), %rax
LBB0_38:
	movl	(%rax), %eax
LBB0_39:
	movl	%eax, (%r14)
LBB0_40:
	xorl	%eax, %eax
LBB0_41:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-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_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_20
	.long	L0_0_set_21
	.long	L0_0_set_22
	.end_data_region
                                        ## -- End function
	.comm	_CPCAP_NO_BATTERY,4,2           ## @CPCAP_NO_BATTERY
	.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_CAPACITY_LEVEL_FULL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_HIGH
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN
	.comm	_POWER_SUPPLY_SCOPE_SYSTEM,4,2  ## @POWER_SUPPLY_SCOPE_SYSTEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cpcap_battery_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_battery_get_property
_cpcap_battery_get_property:            ; @cpcap_battery_get_property
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x23, x1
	bl	_power_supply_get_drvdata
	mov	x21, x0
	bl	_cpcap_battery_update_status
	tbnz	w0, #31, LBB0_40
; %bb.1:
	mov	x0, x21
	bl	_cpcap_battery_latest
	mov	x20, x0
	mov	x0, x21
	bl	_cpcap_battery_previous
	sub	w8, w23, #128
	cmp	w8, #14
	b.hi	LBB0_4
; %bb.2:
	mov	x22, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x21
	bl	_cpcap_battery_get_voltage
	mov	x8, x0
	mov	w0, #0
	b	LBB0_39
LBB0_4:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_40
LBB0_5:
	mov	w0, #0
	ldr	w8, [x21, #8]
	b	LBB0_39
LBB0_6:
	mov	w0, #0
	ldr	w8, [x21, #4]
	b	LBB0_39
LBB0_7:
	mov	w0, #0
	ldr	w8, [x20]
	b	LBB0_39
LBB0_8:
	mov	w0, #0
	ldr	w8, [x21]
	b	LBB0_39
LBB0_9:
	mov	x0, x21
	bl	_cpcap_battery_full
	cbz	w0, LBB0_30
; %bb.10:
	mov	w0, #0
Lloh5:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	b	LBB0_38
LBB0_11:
	mov	w0, #0
Lloh7:
	adrp	x8, _POWER_SUPPLY_SCOPE_SYSTEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _POWER_SUPPLY_SCOPE_SYSTEM@GOTPAGEOFF]
	b	LBB0_38
LBB0_12:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _CPCAP_NO_BATTERY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CPCAP_NO_BATTERY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_24
; %bb.13:
	mov	w0, #0
	mov	w8, #1
	b	LBB0_39
LBB0_14:
	ldrsw	x8, [x20, #12]
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #44
	add	w8, w8, w9
	ldr	w9, [x20, #4]
	mul	w0, w8, w9
	b	LBB0_27
LBB0_15:
	ldr	x8, [x20, #32]
	ldr	x9, [x22, #32]
	subs	x1, x8, x9
	b.ne	LBB0_25
; %bb.16:
	mov	x0, x21
	bl	_cpcap_battery_cc_get_avg_current
	ldrsw	x8, [x20, #12]
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #44
	b	LBB0_26
LBB0_17:
	mov	w0, #0
	ldr	w8, [x20, #4]
	b	LBB0_39
LBB0_18:
	ldr	x8, [x20, #32]
	ldr	x9, [x22, #32]
	subs	x1, x8, x9
	b.ne	LBB0_29
; %bb.19:
	mov	x0, x21
	bl	_cpcap_battery_cc_get_avg_current
	b	LBB0_28
LBB0_20:
	mov	w0, #0
	ldr	w8, [x21, #12]
	b	LBB0_39
LBB0_21:
	mov	w0, #0
	ldr	w8, [x20, #8]
	b	LBB0_39
LBB0_22:
	mov	x0, x21
	bl	_cpcap_battery_full
	cbz	w0, LBB0_31
; %bb.23:
	mov	w0, #0
Lloh12:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGEOFF]
	b	LBB0_38
LBB0_24:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_40
LBB0_25:
	ldr	x8, [x20, #24]
	ldr	x9, [x22, #24]
	sub	x2, x8, x9
	ldr	w3, [x20, #16]
	mov	x0, x21
	bl	_cpcap_battery_cc_to_ua
	ldr	w8, [x20, #12]
	ldr	w9, [x22, #12]
	add	w8, w9, w8
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #45
LBB0_26:
	add	w8, w8, w9
	mul	w0, w8, w0
LBB0_27:
	mov	w1, #100
	bl	_div64_s64
LBB0_28:
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_40
LBB0_29:
	ldr	x8, [x20, #24]
	ldr	x9, [x22, #24]
	sub	x2, x8, x9
	ldr	w3, [x20, #16]
	mov	x0, x21
	bl	_cpcap_battery_cc_to_ua
	b	LBB0_28
LBB0_30:
	mov	x0, x21
	bl	_cpcap_battery_cc_get_avg_current
	mov	w0, #0
Lloh14:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	b	LBB0_38
LBB0_31:
	ldr	w8, [x20, #12]
	mov	w9, #14448
	movk	w9, #57, lsl #16
	cmp	w8, w9
	b.lt	LBB0_33
; %bb.32:
	mov	w0, #0
Lloh16:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_HIGH@GOTPAGEOFF]
	b	LBB0_38
LBB0_33:
	mov	w9, #23200
	movk	w9, #50, lsl #16
	cmp	w8, w9
	b.lt	LBB0_35
; %bb.34:
	mov	w0, #0
Lloh18:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGEOFF]
	b	LBB0_38
LBB0_35:
	mov	w9, #19809
	movk	w9, #47, lsl #16
	cmp	w8, w9
	b.lt	LBB0_37
; %bb.36:
	mov	w0, #0
Lloh20:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGE
Lloh21:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGEOFF]
	b	LBB0_38
LBB0_37:
	mov	w0, #0
Lloh22:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGEOFF]
LBB0_38:
	ldr	w8, [x8]
LBB0_39:
	str	w8, [x19]
LBB0_40:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_14-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_17-LBB0_3)>>2
	.byte	(LBB0_18-LBB0_3)>>2
	.byte	(LBB0_20-LBB0_3)>>2
	.byte	(LBB0_21-LBB0_3)>>2
	.byte	(LBB0_22-LBB0_3)>>2
                                        ; -- End function
	.comm	_CPCAP_NO_BATTERY,4,2           ; @CPCAP_NO_BATTERY
	.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_CAPACITY_LEVEL_FULL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_HIGH,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_HIGH
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN
	.comm	_POWER_SUPPLY_SCOPE_SYSTEM,4,2  ; @POWER_SUPPLY_SCOPE_SYSTEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cpcap_battery_get_property
.subsections_via_symbols
