	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_calculate_adjusted_tdp_limits
_si_calculate_adjusted_tdp_limits:      ## @si_calculate_adjusted_tdp_limits
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	%edx, 8(%rdi)
	jge	LBB0_1
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbp
	retq
LBB0_1:
	movl	(%rdi), %r9d
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	addl	$100, %edx
	imull	%r9d, %edx
	movslq	%edx, %rdx
	imulq	$1374389535, %rdx, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$37, %rdx
	addl	%esi, %edx
	movl	%edx, (%rcx)
	addl	4(%rdi), %edx
	subl	(%rdi), %edx
	jmp	LBB0_4
LBB0_3:
	movl	$100, %esi
	subl	%edx, %esi
	imull	%r9d, %esi
	movslq	%esi, %rdx
	imulq	$1374389535, %rdx, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rdx
	shrq	$63, %rdx
	sarq	$37, %rsi
	addl	%edx, %esi
	movl	%esi, (%rcx)
	movl	(%rdi), %eax
	movl	4(%rdi), %edx
	subl	%esi, %eax
	xorl	%esi, %esi
	subl	%eax, %edx
	cmovlel	%esi, %edx
LBB0_4:
	movl	%edx, (%r8)
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.5:
	addl	%r9d, %r9d
	cmpl	%r9d, %ecx
	jg	LBB0_8
## %bb.6:
	testl	%edx, %edx
	jle	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	cmpl	%ecx, %edx
	jle	LBB0_9
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_si_calculate_adjusted_tdp_limits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_calculate_adjusted_tdp_limits
_si_calculate_adjusted_tdp_limits:      ; @si_calculate_adjusted_tdp_limits
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0, #8]
	cmp	w8, w2
	b.lt	LBB0_7
; %bb.1:
	ldr	w8, [x0]
	cbz	w1, LBB0_3
; %bb.2:
	add	w9, w2, #100
	mul	w9, w8, w9
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	str	w9, [x3]
	ldp	w11, w10, [x0]
	add	w9, w10, w9
	sub	w9, w9, w11
	b	LBB0_4
LBB0_3:
	mov	w9, #100
	sub	w9, w9, w2
	mul	w9, w8, w9
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	str	w9, [x3]
	ldp	w10, w11, [x0]
	sub	w9, w10, w9
	subs	w9, w11, w9
	csel	w9, w9, wzr, gt
LBB0_4:
	str	w9, [x4]
	ldr	w10, [x3]
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.5:
	lsl	w8, w8, #1
	cmp	w10, w8
	b.gt	LBB0_7
; %bb.6:
	cmp	w9, #1
	ccmp	w9, w10, #0, ge
	b.le	LBB0_8
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_8:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_si_calculate_adjusted_tdp_limits
.subsections_via_symbols
