	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwmgr_handle_task              ## -- Begin function hwmgr_handle_task
	.p2align	4, 0x90
_hwmgr_handle_task:                     ## @hwmgr_handle_task
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
                                        ## kill: def $esi killed $esi def $rsi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	addl	$-128, %esi
	cmpl	$3, %esi
	ja	LBB0_3
## %bb.4:
	movq	%rdi, %rbx
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_14:
	movq	%rbx, %rdi
	movl	$1, %esi
LBB0_9:
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_psm_adjust_power_state_dynamic ## TAILCALL
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_10:
	movq	$0, -16(%rbp)
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.11:
	movl	(%rdx), %edi
	callq	_power_state_convert
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_psm_set_user_performance_state
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_psm_adjust_power_state_dynamic
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_phm_pre_display_configuration_changed
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movq	%rbx, %rdi
	callq	_phm_set_cpu_power_state
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	%rbx, %rdi
	callq	_psm_set_performance_states
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	jmp	LBB0_9
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_10
	.long	L0_0_set_5
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwmgr_handle_task              ; -- Begin function hwmgr_handle_task
	.p2align	2
_hwmgr_handle_task:                     ; @hwmgr_handle_task
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_9
; %bb.1:
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.2:
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x19
	mov	w1, #1
LBB0_4:
	mov	x2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_psm_adjust_power_state_dynamic
LBB0_5:
	mov	w0, #0
	b	LBB0_10
LBB0_6:
	str	xzr, [sp, #8]
	cbz	x2, LBB0_9
; %bb.7:
	ldr	w0, [x2]
	bl	_power_state_convert
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_psm_set_user_performance_state
	cbnz	w0, LBB0_10
; %bb.8:
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_psm_adjust_power_state_dynamic
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
	mov	x0, x19
	bl	_phm_pre_display_configuration_changed
	cbnz	w0, LBB0_10
; %bb.12:
	mov	x0, x19
	bl	_phm_set_cpu_power_state
	cbnz	w0, LBB0_10
; %bb.13:
	mov	x0, x19
	bl	_psm_set_performance_states
	cbnz	w0, LBB0_10
; %bb.14:
	mov	x0, x19
	mov	w1, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
