	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_thermal_resume
_acpi_thermal_resume:                   ## @acpi_thermal_resume
	.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
	pushq	%rax
	.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_2
## %bb.1:
	movq	%rdi, %rbx
	callq	_acpi_driver_data
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_acpi_driver_data
	movq	%rax, %r12
	movq	_ACPI_THERMAL_MAX_ACTIVE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.4:
	movq	(%r12), %rax
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	movl	$0, (%rax,%r15,8)
	xorl	%ecx, %ecx
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	orl	%ecx, 8(%r12)
	incq	%rbx
	movq	_ACPI_THERMAL_MAX_ACTIVE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_16
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%rbx,%rbx,2), %r15
	cmpl	$0, 4(%rax,%r15,8)
	je	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, (%rax,%r15,8)
	cmpl	$0, 8(%rax,%r15,8)
	jle	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rax,%r15,8), %rax
	movl	(%rax,%r13,4), %edi
	movq	%r14, %rsi
	callq	_acpi_bus_get_power
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	-44(%rbp), %eax
	movq	_ACPI_STATE_D0@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=2
	incq	%r13
	movq	(%r12), %rax
	movslq	8(%rax,%r15,8), %rcx
	cmpq	%rcx, %r13
	jl	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax,%r15,8), %ecx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %ecx
	jmp	LBB0_15
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_16:
	movq	%r12, %rdi
	callq	_acpi_thermal_check
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ACPI_THERMAL_MAX_ACTIVE,4,2    ## @ACPI_THERMAL_MAX_ACTIVE
	.comm	_ACPI_STATE_D0,4,2              ## @ACPI_STATE_D0
	.comm	_AE_OK,4,2                      ## @AE_OK
	.no_dead_strip	_acpi_thermal_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_thermal_resume
_acpi_thermal_resume:                   ; @acpi_thermal_resume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	bl	_acpi_driver_data
	cbz	x0, LBB0_14
; %bb.2:
	mov	x0, x19
	bl	_acpi_driver_data
	mov	x19, x0
Lloh0:
	adrp	x20, _ACPI_THERMAL_MAX_ACTIVE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ACPI_THERMAL_MAX_ACTIVE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.3:
	mov	x21, #0
	ldr	x8, [x19]
	mov	w22, #24
Lloh2:
	adrp	x23, _ACPI_STATE_D0@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ACPI_STATE_D0@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w9, #0
	ldr	x8, [x19]
	mul	x10, x21, x22
	str	wzr, [x8, x10]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w10, [x19, #8]
	orr	w9, w10, w9
	str	w9, [x19, #8]
	add	x21, x21, #1
	ldrsw	x9, [x20]
	cmp	x21, x9
	b.ge	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cbz	x8, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x9, x21, x22, x8
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x10, x21, x22, x8
	mov	w9, #1
	str	w9, [x10]
	ldr	w10, [x10, #8]
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, #0
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	madd	x8, x21, x22, x8
	ldr	x8, [x8, #16]
	ldr	w0, [x8, x24, lsl #2]
	add	x1, sp, #12
	bl	_acpi_bus_get_power
	cbnz	w0, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x24, x24, #1
	ldr	x8, [x19]
	madd	x9, x21, x22, x8
	ldrsw	x9, [x9, #8]
	cmp	x24, x9
	b.lt	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mul	x9, x21, x22
	ldr	w9, [x8, x9]
	b	LBB0_5
LBB0_14:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_acpi_thermal_check
Lloh7:
	adrp	x8, _AE_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_16:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ACPI_THERMAL_MAX_ACTIVE,4,2    ; @ACPI_THERMAL_MAX_ACTIVE
	.comm	_ACPI_STATE_D0,4,2              ; @ACPI_STATE_D0
	.comm	_AE_OK,4,2                      ; @AE_OK
	.no_dead_strip	_acpi_thermal_resume
.subsections_via_symbols
