	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smbb_bat_temp_handler
_smbb_bat_temp_handler:                 ## @smbb_bat_temp_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movl	24(%rsi), %edi
	movq	_SMBB_BAT_TEMP_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	-20(%rbp), %ecx
	movq	_TEMP_STATUS_OK@GOTPCREL(%rip), %rdx
	movq	_STATUS_BAT_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, (%rdx)
	je	LBB0_3
## %bb.2:
	orl	%eax, 8(%rbx)
	jmp	LBB0_5
LBB0_3:
	notl	%eax
	andl	8(%rbx), %eax
	movl	%eax, 8(%rbx)
	movq	_TEMP_STATUS_HOT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_5
## %bb.4:
	movq	_STATUS_BAT_HOT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	(%rbx), %edi
	callq	_power_supply_changed
LBB0_6:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMBB_BAT_TEMP_STATUS,8,3       ## @SMBB_BAT_TEMP_STATUS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_TEMP_STATUS_OK,4,2             ## @TEMP_STATUS_OK
	.comm	_STATUS_BAT_OK,4,2              ## @STATUS_BAT_OK
	.comm	_TEMP_STATUS_HOT,4,2            ## @TEMP_STATUS_HOT
	.comm	_STATUS_BAT_HOT,4,2             ## @STATUS_BAT_HOT
	.no_dead_strip	_smbb_bat_temp_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smbb_bat_temp_handler
_smbb_bat_temp_handler:                 ; @smbb_bat_temp_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	w0, [x1, #24]
	ldr	x8, [x1, #16]
Lloh0:
	adrp	x9, _SMBB_BAT_TEMP_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SMBB_BAT_TEMP_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_7
; %bb.1:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
Lloh3:
	adrp	x9, _TEMP_STATUS_OK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TEMP_STATUS_OK@GOTPAGEOFF]
	ldr	w8, [sp, #12]
Lloh5:
	ldr	w10, [x9]
Lloh6:
	adrp	x9, _STATUS_BAT_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _STATUS_BAT_OK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w10, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x19, #8]
	b	LBB0_5
LBB0_3:
	ldr	w10, [x19, #8]
	bic	w9, w10, w9
	str	w9, [x19, #8]
Lloh9:
	adrp	x10, _TEMP_STATUS_HOT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TEMP_STATUS_HOT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_6
; %bb.4:
Lloh12:
	adrp	x8, _STATUS_BAT_HOT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STATUS_BAT_HOT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_5:
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_6:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	w0, [x19]
	bl	_power_supply_changed
LBB0_7:
Lloh15:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SMBB_BAT_TEMP_STATUS,8,3       ; @SMBB_BAT_TEMP_STATUS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_TEMP_STATUS_OK,4,2             ; @TEMP_STATUS_OK
	.comm	_STATUS_BAT_OK,4,2              ; @STATUS_BAT_OK
	.comm	_TEMP_STATUS_HOT,4,2            ; @TEMP_STATUS_HOT
	.comm	_STATUS_BAT_HOT,4,2             ; @STATUS_BAT_HOT
	.no_dead_strip	_smbb_bat_temp_handler
.subsections_via_symbols
