	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_dpm_set_fan_speed_percent
_si_dpm_set_fan_speed_percent:          ## @si_dpm_set_fan_speed_percent
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_si_get_pi
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.5:
	cmpl	$101, %r15d
	jge	LBB0_4
## %bb.6:
	movq	_CG_FDO_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %r14d
	movq	_FMAX_DUTY100_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	_FMAX_DUTY100_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r14d
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.7:
	imull	%r15d, %r14d
	movl	%r14d, %edi
	movl	$100, %esi
	callq	_do_div
	movq	_CG_FDO_CTRL0@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	_FDO_STATIC_DUTY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	%r14d, %edi
	callq	_FDO_STATIC_DUTY
	orl	%eax, %ebx
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_WREG32
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CG_FDO_CTRL1,4,2               ## @CG_FDO_CTRL1
	.comm	_FMAX_DUTY100_MASK,4,2          ## @FMAX_DUTY100_MASK
	.comm	_FMAX_DUTY100_SHIFT,4,2         ## @FMAX_DUTY100_SHIFT
	.comm	_CG_FDO_CTRL0,4,2               ## @CG_FDO_CTRL0
	.comm	_FDO_STATIC_DUTY_MASK,4,2       ## @FDO_STATIC_DUTY_MASK
	.no_dead_strip	_si_dpm_set_fan_speed_percent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_dpm_set_fan_speed_percent
_si_dpm_set_fan_speed_percent:          ; @si_dpm_set_fan_speed_percent
	.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	x19, x1
	mov	x20, x0
	bl	_si_get_pi
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	ldr	x8, [x0]
	cbnz	x8, LBB0_6
; %bb.3:
	cmp	w19, #101
	b.ge	LBB0_6
; %bb.4:
Lloh2:
	adrp	x8, _CG_FDO_CTRL1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CG_FDO_CTRL1@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_RREG32
Lloh5:
	adrp	x8, _FMAX_DUTY100_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FMAX_DUTY100_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh8:
	adrp	x9, _FMAX_DUTY100_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FMAX_DUTY100_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cbz	w8, LBB0_6
; %bb.5:
	mul	w19, w8, w19
	mov	x0, x19
	mov	w1, #100
	bl	_do_div
Lloh11:
	adrp	x20, _CG_FDO_CTRL0@GOTPAGE
Lloh12:
	ldr	x20, [x20, _CG_FDO_CTRL0@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
Lloh13:
	adrp	x8, _FDO_STATIC_DUTY_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FDO_STATIC_DUTY_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w21, w0, w8
	mov	x0, x19
	bl	_FDO_STATIC_DUTY
	orr	w1, w21, w0
	ldr	w0, [x20]
	bl	_WREG32
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CG_FDO_CTRL1,4,2               ; @CG_FDO_CTRL1
	.comm	_FMAX_DUTY100_MASK,4,2          ; @FMAX_DUTY100_MASK
	.comm	_FMAX_DUTY100_SHIFT,4,2         ; @FMAX_DUTY100_SHIFT
	.comm	_CG_FDO_CTRL0,4,2               ; @CG_FDO_CTRL0
	.comm	_FDO_STATIC_DUTY_MASK,4,2       ; @FDO_STATIC_DUTY_MASK
	.no_dead_strip	_si_dpm_set_fan_speed_percent
.subsections_via_symbols
