	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pp_dpm_get_pp_num_states
_pp_dpm_get_pp_num_states:              ## @pp_dpm_get_pp_num_states
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	cmpl	$0, 24(%rbx)
	je	LBB0_3
## %bb.2:
	cmpq	$0, 16(%rbx)
	je	LBB0_3
## %bb.4:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	movq	16(%rbx), %rax
	movq	8(%r15), %r15
	xorl	%edx, %edx
	leaq	l_switch.table.pp_dpm_get_pp_num_states(%rip), %r8
	movq	_PP_StateClassificationFlag_Boot@GOTPCREL(%rip), %r10
	movq	_POWER_STATE_TYPE_INTERNAL_BOOT@GOTPCREL(%rip), %r11
	movq	_POWER_STATE_TYPE_DEFAULT@GOTPCREL(%rip), %r9
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movslq	%esi, %rcx
	movq	(%r8,%rcx,8), %rsi
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rsi), %ecx
	movl	%ecx, (%r15,%rdx,4)
	incq	%rdx
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%rbx), %rsi
	movslq	%edx, %rdi
	imulq	%rsi, %rdi
	movl	(%rax,%rdi), %esi
	addl	$-128, %esi
	cmpl	$3, %esi
	jb	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r10), %ecx
	movq	%r11, %rsi
	testl	%ecx, 4(%rdi,%rax)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r9, %rsi
	jmp	LBB0_10
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%r14d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_POWER_STATE_TYPE_BATTERY,4,2   ## @POWER_STATE_TYPE_BATTERY
	.comm	_POWER_STATE_TYPE_BALANCED,4,2  ## @POWER_STATE_TYPE_BALANCED
	.comm	_POWER_STATE_TYPE_PERFORMANCE,4,2 ## @POWER_STATE_TYPE_PERFORMANCE
	.comm	_PP_StateClassificationFlag_Boot,4,2 ## @PP_StateClassificationFlag_Boot
	.comm	_POWER_STATE_TYPE_INTERNAL_BOOT,4,2 ## @POWER_STATE_TYPE_INTERNAL_BOOT
	.comm	_POWER_STATE_TYPE_DEFAULT,4,2   ## @POWER_STATE_TYPE_DEFAULT
	.no_dead_strip	_pp_dpm_get_pp_num_states
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.pp_dpm_get_pp_num_states
l_switch.table.pp_dpm_get_pp_num_states:
	.quad	_POWER_STATE_TYPE_PERFORMANCE
	.quad	_POWER_STATE_TYPE_BATTERY
	.quad	_POWER_STATE_TYPE_BALANCED

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pp_dpm_get_pp_num_states
_pp_dpm_get_pp_num_states:              ; @pp_dpm_get_pp_num_states
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	cbz	x19, LBB0_9
; %bb.1:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_9
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.3:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	str	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x8, #0
	ldr	x9, [x19, #16]
	ldr	x10, [x21, #8]
Lloh0:
	adrp	x11, l_switch.table.pp_dpm_get_pp_num_states@PAGE
Lloh1:
	add	x11, x11, l_switch.table.pp_dpm_get_pp_num_states@PAGEOFF
Lloh2:
	adrp	x12, _PP_StateClassificationFlag_Boot@GOTPAGE
Lloh3:
	ldr	x12, [x12, _PP_StateClassificationFlag_Boot@GOTPAGEOFF]
Lloh4:
	adrp	x13, _POWER_STATE_TYPE_INTERNAL_BOOT@GOTPAGE
Lloh5:
	ldr	x13, [x13, _POWER_STATE_TYPE_INTERNAL_BOOT@GOTPAGEOFF]
Lloh6:
	adrp	x14, _POWER_STATE_TYPE_DEFAULT@GOTPAGE
Lloh7:
	ldr	x14, [x14, _POWER_STATE_TYPE_DEFAULT@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x15, [x11, w16, sxtw #3]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x15]
	str	w15, [x10, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x15, [x19]
	cmp	x8, x15
	b.ge	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x15, [x19, #4]
	sxtw	x16, w8
	madd	x15, x15, x16, x9
	ldr	w16, [x15]
	sub	w16, w16, #128
	cmp	w16, #3
	b.lo	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x15, #4]
	ldr	w16, [x12]
	tst	w16, w15
	csel	x15, x14, x13, eq
	b	LBB0_6
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_POWER_STATE_TYPE_BATTERY,4,2   ; @POWER_STATE_TYPE_BATTERY
	.comm	_POWER_STATE_TYPE_BALANCED,4,2  ; @POWER_STATE_TYPE_BALANCED
	.comm	_POWER_STATE_TYPE_PERFORMANCE,4,2 ; @POWER_STATE_TYPE_PERFORMANCE
	.comm	_PP_StateClassificationFlag_Boot,4,2 ; @PP_StateClassificationFlag_Boot
	.comm	_POWER_STATE_TYPE_INTERNAL_BOOT,4,2 ; @POWER_STATE_TYPE_INTERNAL_BOOT
	.comm	_POWER_STATE_TYPE_DEFAULT,4,2   ; @POWER_STATE_TYPE_DEFAULT
	.no_dead_strip	_pp_dpm_get_pp_num_states
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.pp_dpm_get_pp_num_states
l_switch.table.pp_dpm_get_pp_num_states:
	.quad	_POWER_STATE_TYPE_PERFORMANCE
	.quad	_POWER_STATE_TYPE_BATTERY
	.quad	_POWER_STATE_TYPE_BALANCED

.subsections_via_symbols
