	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pp_get_power_limit
_pp_get_power_limit:                    ## @pp_get_power_limit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	%rdi, %rbx
	cmpl	$0, 24(%rdi)
	je	LBB0_3
## %bb.4:
	movl	%edx, %r12d
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.5:
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.6:
	movl	12(%rbx), %ecx
	addl	$100, %ecx
	imull	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	jmp	LBB0_8
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	movl	4(%rbx), %eax
LBB0_8:
	movl	%eax, (%r15)
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_pp_get_power_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pp_get_power_limit
_pp_get_power_limit:                    ; @pp_get_power_limit
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_6
; %bb.3:
	mov	x22, x2
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	cbz	w22, LBB0_7
; %bb.4:
	ldr	w8, [x21]
	str	w8, [x19]
	ldr	x9, [x21, #16]
	cbz	x9, LBB0_9
; %bb.5:
	ldr	w9, [x21, #12]
	add	w9, w9, #100
	mul	w8, w9, w8
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_7:
	ldr	w8, [x21, #4]
LBB0_8:
	str	w8, [x19]
LBB0_9:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_pp_get_power_limit
.subsections_via_symbols
