	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smu_fan_set_pwm
_smu_fan_set_pwm:                       ## @smu_fan_set_pwm
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %r14d
	movq	_SMU_FAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	16(%rdi), %edi
	callq	_max
	movl	12(%rbx), %edi
	movl	%eax, %esi
	callq	_min
	movzbl	%al, %r8d
	movl	%eax, %r15d
	movzbl	%ah, %edx
	movl	$14, -48(%rbp)
	movq	-40(%rbp), %rsi
	movl	$16, (%rsi)
	movb	4(%rbx), %cl
	movl	$1, %edi
	shll	%cl, %edi
	movl	%edi, 4(%rsi)
	movslq	4(%rbx), %rcx
	movl	%edx, 8(%rsi,%rcx,8)
	movslq	4(%rbx), %rcx
	movl	%r8d, 12(%rsi,%rcx,8)
	leaq	-48(%rbp), %rsi
	movl	%r14d, %edi
	movl	$1, %edx
	callq	_smu_run_cmd
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	%r15d, 8(%rbx)
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU_FAN,4,2                    ## @SMU_FAN
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.no_dead_strip	_smu_fan_set_pwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smu_fan_set_pwm
_smu_fan_set_pwm:                       ; @smu_fan_set_pwm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
Lloh0:
	adrp	x8, _SMU_FAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU_FAN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldp	w0, w21, [x0, #16]
	bl	_max
	mov	x1, x0
	ldr	w0, [x19, #12]
	bl	_min
	mov	x20, x0
	and	w8, w0, #0xff
	ubfx	w9, w0, #8, #8
	mov	w10, #14
	str	w10, [sp, #8]
	ldr	x10, [sp, #16]
	mov	w11, #16
	str	w11, [x10]
	ldr	w11, [x19, #4]
	mov	w12, #1
	lsl	w11, w12, w11
	str	w11, [x10, #4]
	ldrsw	x11, [x19, #4]
	add	x11, x10, x11, lsl #3
	str	w9, [x11, #8]
	ldrsw	x9, [x19, #4]
	add	x9, x10, x9, lsl #3
	str	w8, [x9, #12]
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #1
	bl	_smu_run_cmd
	cbnz	w0, LBB0_2
; %bb.1:
	str	w20, [x19, #8]
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU_FAN,4,2                    ; @SMU_FAN
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.no_dead_strip	_smu_fan_set_pwm
.subsections_via_symbols
