	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbs_get_battery_property
_sbs_get_battery_property:              ## @sbs_get_battery_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	%rcx, %r15
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_i2c_get_clientdata
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_sbs_data@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movslq	%ebx, %rbx
	shlq	$4, %rbx
	movl	12(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_sbs_read_word_data
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%r12), %rcx
	movl	%eax, %edx
	cmpq	%rdx, (%rcx,%rbx)
	jg	LBB0_23
## %bb.3:
	cmpl	8(%rcx,%rbx), %eax
	jle	LBB0_4
LBB0_23:
	movq	_POWER_SUPPLY_PROP_STATUS@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	jne	LBB0_25
## %bb.24:
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_28
LBB0_1:
	movl	%eax, %r12d
	jmp	LBB0_29
LBB0_25:
	movq	_POWER_SUPPLY_PROP_CAPACITY@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	jne	LBB0_27
## %bb.26:
	movl	%eax, %edi
	movl	$100, %esi
	callq	_min
	movl	%eax, (%r15)
	jmp	LBB0_28
LBB0_4:
	movq	%r15, %rbx
	movl	%eax, (%r15)
	movq	_POWER_SUPPLY_PROP_CAPACITY_LEVEL@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	jne	LBB0_13
## %bb.5:
	movq	_BATTERY_INITIALIZED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.8:
	movq	_BATTERY_FULL_CHARGED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_27:
	movl	$0, (%r15)
	jmp	LBB0_28
LBB0_13:
	movq	_POWER_SUPPLY_PROP_STATUS@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpl	%r13d, (%rcx)
	jne	LBB0_29
## %bb.14:
	movq	_BATTERY_FULL_CHARGED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_BATTERY_DISCHARGING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	jne	LBB0_15
## %bb.16:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_6:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_15:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
LBB0_17:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	testl	%ecx, %ecx
	je	LBB0_19
## %bb.18:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_sbs_status_correct
	cmpq	$0, (%r15)
	je	LBB0_20
## %bb.21:
	movslq	(%rbx), %rax
	cmpq	%rax, 8(%r15)
	je	LBB0_29
## %bb.22:
	movq	%r15, %rdi
	addq	$20, %rdi
	callq	_cancel_delayed_work_sync
	movl	16(%r15), %edi
	callq	_power_supply_changed
	movq	$0, (%r15)
	jmp	LBB0_29
LBB0_10:
	movq	_BATTERY_FULL_DISCHARGED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_20:
	movslq	(%rbx), %rax
	movq	%rax, 8(%r15)
	jmp	LBB0_29
LBB0_12:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_28:
	xorl	%r12d, %r12d
LBB0_29:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sbs_data,8,3                   ## @sbs_data
	.comm	_POWER_SUPPLY_PROP_CAPACITY_LEVEL,4,2 ## @POWER_SUPPLY_PROP_CAPACITY_LEVEL
	.comm	_BATTERY_INITIALIZED,4,2        ## @BATTERY_INITIALIZED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN
	.comm	_BATTERY_FULL_CHARGED,4,2       ## @BATTERY_FULL_CHARGED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_BATTERY_FULL_DISCHARGED,4,2    ## @BATTERY_FULL_DISCHARGED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_PROP_STATUS,4,2   ## @POWER_SUPPLY_PROP_STATUS
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_BATTERY_DISCHARGING,4,2        ## @BATTERY_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,8,3 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_PROP_CAPACITY,4,2 ## @POWER_SUPPLY_PROP_CAPACITY
	.no_dead_strip	_sbs_get_battery_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbs_get_battery_property
_sbs_get_battery_property:              ; @sbs_get_battery_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, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	bl	_i2c_get_clientdata
	mov	x20, x0
Lloh0:
	adrp	x24, _sbs_data@GOTPAGE
Lloh1:
	ldr	x24, [x24, _sbs_data@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x8, x8, w23, sxtw #4
	ldr	w1, [x8, #12]
	mov	x0, x21
	bl	_sbs_read_word_data
	tbnz	w0, #31, LBB0_23
; %bb.1:
	sxtw	x8, w23
	ldr	x9, [x24]
	lsl	x10, x8, #4
	ldr	x10, [x9, x10]
	cmp	x10, w0, uxtw
	b.gt	LBB0_3
; %bb.2:
	add	x8, x9, x8, lsl #4
	ldr	w8, [x8, #8]
	cmp	w0, w8
	b.le	LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _POWER_SUPPLY_PROP_STATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POWER_SUPPLY_PROP_STATUS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
Lloh5:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	w8, [x19]
	b	LBB0_23
LBB0_5:
Lloh8:
	adrp	x8, _POWER_SUPPLY_PROP_CAPACITY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_PROP_CAPACITY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_11
; %bb.6:
	mov	w1, #100
	bl	_min
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_23
LBB0_7:
	str	w0, [x19]
Lloh11:
	adrp	x8, _POWER_SUPPLY_PROP_CAPACITY_LEVEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_SUPPLY_PROP_CAPACITY_LEVEL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_12
; %bb.8:
Lloh14:
	adrp	x8, _BATTERY_INITIALIZED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BATTERY_INITIALIZED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.9:
Lloh17:
	adrp	x8, _BATTERY_FULL_CHARGED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BATTERY_FULL_CHARGED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_17
; %bb.10:
	mov	w0, #0
Lloh20:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGEOFF]
	b	LBB0_22
LBB0_11:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_23
LBB0_12:
Lloh22:
	adrp	x8, _POWER_SUPPLY_PROP_STATUS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _POWER_SUPPLY_PROP_STATUS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_15
; %bb.13:
Lloh25:
	adrp	x8, _BATTERY_FULL_CHARGED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BATTERY_FULL_CHARGED@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _BATTERY_DISCHARGING@GOTPAGE
Lloh29:
	ldr	x9, [x9, _BATTERY_DISCHARGING@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh32:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
Lloh33:
	adrp	x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh34:
	ldr	x11, [x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	tst	w9, w0
	csel	x9, x10, x11, eq
Lloh35:
	adrp	x10, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh36:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x21
	mov	x1, x19
	bl	_sbs_status_correct
	ldr	x8, [x20]
	cbz	x8, LBB0_19
; %bb.14:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_20
LBB0_15:
	mov	w0, #0
	b	LBB0_23
LBB0_16:
	mov	w0, #0
Lloh37:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN@GOTPAGEOFF]
	b	LBB0_22
LBB0_17:
Lloh39:
	adrp	x8, _BATTERY_FULL_DISCHARGED@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BATTERY_FULL_DISCHARGED@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_21
; %bb.18:
	mov	w0, #0
Lloh42:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGEOFF]
	b	LBB0_22
LBB0_19:
	mov	w0, #0
	ldrsw	x8, [x19]
	str	x8, [x20, #8]
	b	LBB0_23
LBB0_20:
	add	x0, x20, #20
	bl	_cancel_delayed_work_sync
	ldr	w0, [x20, #16]
	bl	_power_supply_changed
	mov	w0, #0
	str	xzr, [x20]
	b	LBB0_23
LBB0_21:
	mov	w0, #0
Lloh44:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_23:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_sbs_data,8,3                   ; @sbs_data
	.comm	_POWER_SUPPLY_PROP_CAPACITY_LEVEL,4,2 ; @POWER_SUPPLY_PROP_CAPACITY_LEVEL
	.comm	_BATTERY_INITIALIZED,4,2        ; @BATTERY_INITIALIZED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN
	.comm	_BATTERY_FULL_CHARGED,4,2       ; @BATTERY_FULL_CHARGED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_BATTERY_FULL_DISCHARGED,4,2    ; @BATTERY_FULL_DISCHARGED
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.comm	_POWER_SUPPLY_PROP_STATUS,4,2   ; @POWER_SUPPLY_PROP_STATUS
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_BATTERY_DISCHARGING,4,2        ; @BATTERY_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,8,3 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.comm	_POWER_SUPPLY_PROP_CAPACITY,4,2 ; @POWER_SUPPLY_PROP_CAPACITY
	.no_dead_strip	_sbs_get_battery_property
.subsections_via_symbols
