	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_fan_ctrl_start_smc_fan_control
_ci_fan_ctrl_start_smc_fan_control:     ## @ci_fan_ctrl_start_smc_fan_control
	.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	%rdi, %rbx
	callq	_ci_get_pi
	movq	%rax, %r14
	cmpq	$0, 8(%rax)
	movq	_PPSMC_StartFanControl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	je	LBB0_4
## %bb.1:
	movq	_FAN_CONTROL_FUZZY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ci_send_msg_to_smc_with_parameter
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.3:
	movq	_PPSMC_MSG_SetFanPwmMax@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ci_send_msg_to_smc_with_parameter
	cmpq	(%r15), %rax
	jne	LBB0_2
LBB0_5:
	movl	$1, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_FAN_CONTROL_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ci_send_msg_to_smc_with_parameter
	movq	_PPSMC_Result_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_StartFanControl,4,2      ## @PPSMC_StartFanControl
	.comm	_FAN_CONTROL_FUZZY,4,2          ## @FAN_CONTROL_FUZZY
	.comm	_PPSMC_Result_OK,8,3            ## @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_MSG_SetFanPwmMax,4,2     ## @PPSMC_MSG_SetFanPwmMax
	.comm	_FAN_CONTROL_TABLE,4,2          ## @FAN_CONTROL_TABLE
	.no_dead_strip	_ci_fan_ctrl_start_smc_fan_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_fan_ctrl_start_smc_fan_control
_ci_fan_ctrl_start_smc_fan_control:     ; @ci_fan_ctrl_start_smc_fan_control
	.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	x20, x0
	bl	_ci_get_pi
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _PPSMC_StartFanControl@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PPSMC_StartFanControl@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _FAN_CONTROL_FUZZY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FAN_CONTROL_FUZZY@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ci_send_msg_to_smc_with_parameter
Lloh6:
	adrp	x21, _PPSMC_Result_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PPSMC_Result_OK@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _PPSMC_MSG_SetFanPwmMax@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PPSMC_MSG_SetFanPwmMax@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x20
	bl	_ci_send_msg_to_smc_with_parameter
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
Lloh14:
	adrp	x8, _FAN_CONTROL_TABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FAN_CONTROL_TABLE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ci_send_msg_to_smc_with_parameter
Lloh17:
	adrp	x8, _PPSMC_Result_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PPSMC_Result_OK@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_StartFanControl,4,2      ; @PPSMC_StartFanControl
	.comm	_FAN_CONTROL_FUZZY,4,2          ; @FAN_CONTROL_FUZZY
	.comm	_PPSMC_Result_OK,8,3            ; @PPSMC_Result_OK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_MSG_SetFanPwmMax,4,2     ; @PPSMC_MSG_SetFanPwmMax
	.comm	_FAN_CONTROL_TABLE,4,2          ; @FAN_CONTROL_TABLE
	.no_dead_strip	_ci_fan_ctrl_start_smc_fan_control
.subsections_via_symbols
