	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_battery_set_alarm
_acpi_battery_set_alarm:                ## @acpi_battery_set_alarm
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movb	(%rdi), %cl
	addb	$12, %cl
	movl	$1, %ebx
	shll	%cl, %ebx
	movq	8(%rdi), %r14
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.1:
	movl	(%r14), %edi
	movq	_SMBUS_READ_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_SBS_MANAGER@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-36(%rbp), %r8
	movl	$1, %ecx
	callq	_acpi_smbus_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	-36(%rbp), %eax
	movl	%eax, %ecx
	andl	$61440, %ecx                    ## imm = 0xF000
	cmpl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	andl	$4095, %eax                     ## imm = 0xFFF
	orl	%ebx, %eax
	movl	%eax, -36(%rbp)
	movl	(%r14), %edi
	movq	_SMBUS_WRITE_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	-36(%rbp), %r8
	movl	$1, %ecx
	movl	$2, %r9d
	callq	_acpi_smbus_write
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movl	(%r14), %edi
	movq	_SMBUS_WRITE_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ACPI_SBS_BATTERY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addq	$4, %r15
	movl	$1, %ecx
	movq	%r15, %r8
	movl	$2, %r9d
	callq	_acpi_smbus_write
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMBUS_READ_WORD,4,2            ## @SMBUS_READ_WORD
	.comm	_ACPI_SBS_MANAGER,4,2           ## @ACPI_SBS_MANAGER
	.comm	_SMBUS_WRITE_WORD,4,2           ## @SMBUS_WRITE_WORD
	.comm	_ACPI_SBS_BATTERY,4,2           ## @ACPI_SBS_BATTERY
	.no_dead_strip	_acpi_battery_set_alarm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_battery_set_alarm
_acpi_battery_set_alarm:                ; @acpi_battery_set_alarm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w22, [x19]
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _SMBUS_READ_WORD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMBUS_READ_WORD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x21, _ACPI_SBS_MANAGER@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ACPI_SBS_MANAGER@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x4, sp, #12
	mov	w3, #1
	bl	_acpi_smbus_read
	cbnz	w0, LBB0_5
; %bb.2:
	add	w8, w22, #12
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [sp, #12]
	and	w10, w9, #0xf000
	cmp	w10, w8
	b.eq	LBB0_4
; %bb.3:
	and	w9, w9, #0xfff
	orr	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _SMBUS_WRITE_WORD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMBUS_WRITE_WORD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x21]
	add	x4, sp, #12
	mov	w3, #1
	mov	w5, #2
	bl	_acpi_smbus_write
	cbnz	w0, LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _SMBUS_WRITE_WORD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMBUS_WRITE_WORD@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ACPI_SBS_BATTERY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ACPI_SBS_BATTERY@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x4, x19, #4
	mov	w3, #1
	mov	w5, #2
	bl	_acpi_smbus_write
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SMBUS_READ_WORD,4,2            ; @SMBUS_READ_WORD
	.comm	_ACPI_SBS_MANAGER,4,2           ; @ACPI_SBS_MANAGER
	.comm	_SMBUS_WRITE_WORD,4,2           ; @SMBUS_WRITE_WORD
	.comm	_ACPI_SBS_BATTERY,4,2           ; @ACPI_SBS_BATTERY
	.no_dead_strip	_acpi_battery_set_alarm
.subsections_via_symbols
