	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_power_get_state
_acpi_power_get_state:                  ## @acpi_power_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -32(%rbp)
	movl	$5, -56(%rbp)
	leaq	-37(%rbp), %rax
	movq	%rax, -48(%rbp)
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	leaq	-32(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_integer
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	testb	$1, -32(%rbp)
	jne	LBB0_6
## %bb.7:
	movq	_ACPI_POWER_RESOURCE_STATE_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_ACPI_POWER_RESOURCE_STATE_ON@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_ACPI_SINGLE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	callq	_acpi_get_name
	cmpl	$0, (%r14)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdi
	cmovel	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_DEBUG_PRINT
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_STA"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ACPI_POWER_RESOURCE_STATE_ON,4,2 ## @ACPI_POWER_RESOURCE_STATE_ON
	.comm	_ACPI_POWER_RESOURCE_STATE_OFF,4,2 ## @ACPI_POWER_RESOURCE_STATE_OFF
	.comm	_ACPI_SINGLE_NAME,4,2           ## @ACPI_SINGLE_NAME
	.comm	_ACPI_DB_INFO,4,2               ## @ACPI_DB_INFO
L_.str.2:                               ## @.str.2
	.asciz	"on"

L_.str.3:                               ## @.str.3
	.asciz	"off"

	.no_dead_strip	_acpi_power_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_power_get_state
_acpi_power_get_state:                  ; @acpi_power_get_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	str	xzr, [sp, #24]
	mov	w8, #5
	str	w8, [sp]
	add	x8, sp, #19
	str	x8, [sp, #8]
	cbz	w0, LBB0_4
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_4
; %bb.2:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #24
	mov	x2, #0
	bl	_acpi_evaluate_integer
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, _ACPI_POWER_RESOURCE_STATE_ON@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ACPI_POWER_RESOURCE_STATE_ON@GOTPAGEOFF]
Lloh8:
	adrp	x10, _ACPI_POWER_RESOURCE_STATE_OFF@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ACPI_POWER_RESOURCE_STATE_OFF@GOTPAGEOFF]
	tst	x8, #0x1
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19]
Lloh10:
	adrp	x8, _ACPI_SINGLE_NAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ACPI_SINGLE_NAME@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	bl	_acpi_get_name
	ldr	w8, [x19]
Lloh13:
	adrp	x9, l_.str.2@PAGE
Lloh14:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh15:
	adrp	x10, l_.str.3@PAGE
Lloh16:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	w0, w10, w9, eq
	bl	_ACPI_DEBUG_PRINT
	mov	w0, #0
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_STA"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ACPI_POWER_RESOURCE_STATE_ON,4,2 ; @ACPI_POWER_RESOURCE_STATE_ON
	.comm	_ACPI_POWER_RESOURCE_STATE_OFF,4,2 ; @ACPI_POWER_RESOURCE_STATE_OFF
	.comm	_ACPI_SINGLE_NAME,4,2           ; @ACPI_SINGLE_NAME
	.comm	_ACPI_DB_INFO,4,2               ; @ACPI_DB_INFO
l_.str.2:                               ; @.str.2
	.asciz	"on"

l_.str.3:                               ; @.str.3
	.asciz	"off"

	.no_dead_strip	_acpi_power_get_state
.subsections_via_symbols
