	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbsm_alert
_sbsm_alert:                            ## @sbsm_alert
	.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
	callq	_i2c_get_clientdata
	movq	%rax, %r15
	movl	28(%rax), %edi
	movq	_SBSM_CMD_BATSYSSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sbsm_read_word
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movl	(%r15), %r12d
	xorl	%eax, %r12d
	movl	%eax, (%r15)
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
LBB0_3:
	movl	28(%r15), %edi
	movq	_SBSM_CMD_BATSYSSTATECONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sbsm_read_word
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	4(%r15), %eax
	xorl	%ebx, %eax
	movq	_SBSM_BIT_AC_PRESENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	andl	8(%r15), %r14d
	orl	%r14d, %r12d
	movl	24(%r15), %edi
	callq	_power_supply_changed
LBB0_6:
	movl	%ebx, 4(%r15)
	movq	_SBSM_MAX_BATS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	movq	_sbsm_do_alert@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rdi
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_device_for_each_child
	jmp	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ## @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ## @SBSM_CMD_BATSYSSTATECONT
	.comm	_SBSM_BIT_AC_PRESENT,4,2        ## @SBSM_BIT_AC_PRESENT
	.comm	_SBSM_MAX_BATS,4,2              ## @SBSM_MAX_BATS
	.comm	_sbsm_do_alert,4,2              ## @sbsm_do_alert
	.no_dead_strip	_sbsm_alert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbsm_alert
_sbsm_alert:                            ; @sbsm_alert
	.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
	bl	_i2c_get_clientdata
	mov	x19, x0
	ldr	w0, [x0, #28]
Lloh0:
	adrp	x8, _SBSM_CMD_BATSYSSTATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sbsm_read_word
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19]
	eor	w22, w8, w0
	str	w0, [x19]
	b	LBB0_3
LBB0_2:
	mov	w22, #0
	mov	w20, #0
LBB0_3:
	ldr	w0, [x19, #28]
Lloh3:
	adrp	x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_sbsm_read_word
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.4:
	ldr	w8, [x19, #4]
	eor	w8, w8, w21
Lloh6:
	adrp	x9, _SBSM_BIT_AC_PRESENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SBSM_BIT_AC_PRESENT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x19, #8]
	and	w8, w8, w20
	orr	w22, w8, w22
	ldr	w0, [x19, #24]
	bl	_power_supply_changed
LBB0_6:
	str	w21, [x19, #4]
Lloh9:
	adrp	x21, _SBSM_MAX_BATS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SBSM_MAX_BATS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x20, #0
Lloh11:
	adrp	x23, _sbsm_do_alert@GOTPAGE
Lloh12:
	ldr	x23, [x23, _sbsm_do_alert@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x21]
	cmp	x20, x8
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x0, [x8, x20, lsl #3]
	ldr	w2, [x23]
	mov	x1, #0
	bl	_device_for_each_child
	b	LBB0_8
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ; @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ; @SBSM_CMD_BATSYSSTATECONT
	.comm	_SBSM_BIT_AC_PRESENT,4,2        ; @SBSM_BIT_AC_PRESENT
	.comm	_SBSM_MAX_BATS,4,2              ; @SBSM_MAX_BATS
	.comm	_sbsm_do_alert,4,2              ; @sbsm_do_alert
	.no_dead_strip	_sbsm_alert
.subsections_via_symbols
