	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpp_solar_battery_event
_hidpp_solar_battery_event:             ## @hidpp_solar_battery_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rsi), %rax
	cmpq	(%rdi), %rax
	jne	LBB0_16
## %bb.1:
	movl	(%rsi), %ecx
	movl	%ecx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.2:
	movq	_EVENT_SOLAR_BATTERY_BROADCAST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_16
LBB0_3:
	movq	16(%rsi), %rdx
	movl	(%rdx), %eax
	cmpl	$129, %ecx
	jne	LBB0_6
## %bb.4:
	movl	4(%rdx), %ecx
	shll	$8, %ecx
	orl	8(%rdx), %ecx
	cmpl	$201, %ecx
	jl	LBB0_8
## %bb.5:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rdx
	jmp	LBB0_9
LBB0_6:
	movl	8(%rdi), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_10
## %bb.7:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rdx
	cmpl	$100, %eax
	je	LBB0_11
	jmp	LBB0_12
LBB0_8:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rdx
LBB0_9:
	movl	8(%rdi), %ecx
	cmpl	$100, %eax
	jne	LBB0_12
LBB0_11:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rdx
LBB0_12:
	movl	(%rdx), %edx
	movl	$1, 12(%rdi)
	cmpl	%ecx, %eax
	jne	LBB0_14
## %bb.13:
	cmpl	16(%rdi), %edx
	je	LBB0_16
LBB0_14:
	movl	%eax, 8(%rdi)
	movl	%edx, 16(%rdi)
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_power_supply_changed
LBB0_16:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_10:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rdx
	cmpl	$100, %eax
	jne	LBB0_12
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EVENT_SOLAR_BATTERY_BROADCAST,4,2 ## @EVENT_SOLAR_BATTERY_BROADCAST
	.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_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_hidpp_solar_battery_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpp_solar_battery_event
_hidpp_solar_battery_event:             ; @hidpp_solar_battery_event
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x1, #8]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _EVENT_SOLAR_BATTERY_BROADCAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVENT_SOLAR_BATTERY_BROADCAST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w10, w9, #0xfffffffe
	cmp	w10, #128
	ccmp	w9, w8, #4, ne
	b.ne	LBB0_9
; %bb.2:
	ldr	x10, [x1, #16]
	ldr	w8, [x10]
	cmp	w9, #129
	b.ne	LBB0_4
; %bb.3:
	ldp	w9, w10, [x10, #4]
Lloh3:
	adrp	x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh4:
	ldr	x11, [x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	orr	w9, w10, w9, lsl #8
Lloh5:
	adrp	x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh6:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	cmp	w9, #200
	csel	x10, x10, x11, gt
	ldr	w9, [x0, #8]
	b	LBB0_5
LBB0_4:
	ldr	w9, [x0, #8]
Lloh7:
	adrp	x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh8:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
Lloh9:
	adrp	x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh10:
	ldr	x11, [x11, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	cmp	w8, w9
	csel	x10, x11, x10, lt
LBB0_5:
Lloh11:
	adrp	x11, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh12:
	ldr	x11, [x11, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	cmp	w8, #100
	csel	x10, x11, x10, eq
	ldr	w10, [x10]
	mov	w11, #1
	str	w11, [x0, #12]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	ldr	w9, [x0, #16]
	cmp	w10, w9
	b.eq	LBB0_9
LBB0_7:
	str	w8, [x0, #8]
	str	w10, [x0, #16]
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_power_supply_changed
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EVENT_SOLAR_BATTERY_BROADCAST,4,2 ; @EVENT_SOLAR_BATTERY_BROADCAST
	.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_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_hidpp_solar_battery_event
.subsections_via_symbols
