	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_power_transition          ## -- Begin function acpi_power_transition
	.p2align	4, 0x90
_acpi_power_transition:                 ## @acpi_power_transition
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movl	%esi, %ebx
	movq	_ACPI_STATE_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, %eax
	jg	LBB0_3
## %bb.2:
	movq	_ACPI_STATE_D3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ebx, %ecx
	jge	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rdi, %r14
	movl	(%rdi), %edx
	cmpl	%eax, %edx
	jl	LBB0_7
## %bb.6:
	cmpl	%ecx, %edx
	jg	LBB0_7
## %bb.8:
	movq	8(%r14), %rsi
	movslq	%ebx, %rax
	shlq	$4, %rax
	cmpl	$0, (%rsi,%rax)
	movl	%edx, %ecx
	jle	LBB0_14
## %bb.9:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	leaq	(%rsi,%rax), %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rsi,%rax), %r12
	addq	$8, %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%r15,4), %edi
	movq	%r14, %rsi
	callq	_acpi_power_on
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jl	LBB0_11
## %bb.13:
	movl	(%r14), %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
LBB0_14:
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	je	LBB0_20
## %bb.15:
	movslq	%edx, %rcx
	shlq	$4, %rcx
	cmpl	$0, (%rsi,%rcx)
	jle	LBB0_20
## %bb.16:
	movl	%ebx, %r13d
	leaq	(%rsi,%rcx), %r15
	leaq	(%rsi,%rcx), %r12
	addq	$8, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r14, %rsi
	callq	_acpi_power_off_device
	testl	%eax, %eax
	jne	LBB0_12
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_17
## %bb.19:
	xorl	%eax, %eax
	movl	%r13d, %ebx
	jmp	LBB0_20
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_12:
	movq	_ACPI_STATE_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_20:
	movl	%ebx, (%r14)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_STATE_D0,4,2              ## @ACPI_STATE_D0
	.comm	_ACPI_STATE_D3,4,2              ## @ACPI_STATE_D3
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ACPI_STATE_UNKNOWN,4,2         ## @ACPI_STATE_UNKNOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_power_transition          ; -- Begin function acpi_power_transition
	.p2align	2
_acpi_power_transition:                 ; @acpi_power_transition
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x1
Lloh0:
	adrp	x8, _ACPI_STATE_D0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_STATE_D0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.gt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _ACPI_STATE_D3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ACPI_STATE_D3@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ge	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x19, x0
	ldr	w21, [x0]
	cmp	w21, w8
	ccmp	w21, w9, #0, ge
	b.le	LBB0_8
; %bb.7:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_4
LBB0_8:
	ldr	x22, [x19, #8]
	add	x23, x22, w20, sxtw #4
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.9:
	mov	x24, #0
	sxtw	x8, w20
	add	x8, x22, x8, lsl #4
	add	x25, x8, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w0, [x8, x24, lsl #2]
	mov	x1, x19
	bl	_acpi_power_on
	cbnz	w0, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_10
; %bb.12:
	ldr	w8, [x19]
	cmp	w8, w20
	b.eq	LBB0_18
	b	LBB0_14
LBB0_13:
	mov	x8, x21
	cmp	w8, w20
	b.eq	LBB0_18
LBB0_14:
	sxtw	x8, w21
	add	x21, x22, x8, lsl #4
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.15:
	mov	x22, #0
	add	x23, x21, #8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w0, [x8, x22, lsl #2]
	mov	x1, x19
	bl	_acpi_power_off_device
	cbnz	w0, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_16
LBB0_18:
	mov	w0, #0
	b	LBB0_20
LBB0_19:
Lloh10:
	adrp	x8, _ACPI_STATE_UNKNOWN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ACPI_STATE_UNKNOWN@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
LBB0_20:
	str	w20, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_STATE_D0,4,2              ; @ACPI_STATE_D0
	.comm	_ACPI_STATE_D3,4,2              ; @ACPI_STATE_D3
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ACPI_STATE_UNKNOWN,4,2         ; @ACPI_STATE_UNKNOWN
.subsections_via_symbols
