	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_battery_get_state
_acpi_battery_get_state:                ## @acpi_battery_get_state
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	callq	_acpi_battery_present
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_cache_time@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	addq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_8
LBB0_3:
	leaq	16(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	24(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	leaq	-64(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r12d, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_EXCEPTION
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_5:
	movl	-64(%rbp), %r14d
	movq	_state_offsets@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_extract_package
	movl	%eax, %r14d
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movl	-64(%rbp), %edi
	callq	_kfree
	movq	_QUIRK_SIGNED16_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.6:
	movl	4(%r15), %eax
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	movl	%ecx, 4(%r15)
LBB0_8:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_cache_time,4,2                 ## @cache_time
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_BST"

	.comm	_AE_INFO,4,2                    ## @AE_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Evaluating _BST"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_state_offsets,4,2              ## @state_offsets
	.comm	_QUIRK_SIGNED16_CURRENT,4,2     ## @QUIRK_SIGNED16_CURRENT
	.no_dead_strip	_acpi_battery_get_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_battery_get_state
_acpi_battery_get_state:                ; @acpi_battery_get_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	bl	_acpi_battery_present
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x21, [x19, #8]
	cbz	x21, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
Lloh6:
	adrp	x8, _cache_time@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cache_time@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x1, x0, x21
	mov	x0, x20
	bl	_time_before
	cbz	x0, LBB0_4
LBB0_3:
	mov	w20, #0
	b	LBB0_9
LBB0_4:
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	x2, #0
	bl	_acpi_evaluate_object
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_6
; %bb.5:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_EXCEPTION
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_6:
	ldr	w20, [sp, #8]
Lloh16:
	adrp	x8, _state_offsets@GOTPAGE
Lloh17:
	ldr	x8, [x8, _state_offsets@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_extract_package
	mov	x20, x0
Lloh19:
	adrp	x8, _jiffies@GOTPAGE
Lloh20:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w0, [sp, #8]
	bl	_kfree
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _QUIRK_SIGNED16_CURRENT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _QUIRK_SIGNED16_CURRENT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	ldr	w8, [x19, #4]
	cmn	w8, #1
	b.eq	LBB0_9
; %bb.8:
	cmp	w8, #0
	cneg	w8, w8, mi
	str	w8, [x19, #4]
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_cache_time,4,2                 ; @cache_time
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_BST"

	.comm	_AE_INFO,4,2                    ; @AE_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Evaluating _BST"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_state_offsets,4,2              ; @state_offsets
	.comm	_QUIRK_SIGNED16_CURRENT,4,2     ; @QUIRK_SIGNED16_CURRENT
	.no_dead_strip	_acpi_battery_get_state
.subsections_via_symbols
