	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fcu_fan_set_rpm
_fcu_fan_set_rpm:                       ## @fcu_fan_set_rpm
	.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
	movl	12(%rdi), %edi
	callq	_device_get_softc
	movq	%rax, %r14
	movl	24(%rbx), %edi
	movl	%r15d, %esi
	callq	_max
	movl	20(%rbx), %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r15d
	movq	(%rbx), %rdx
	movq	_FCU_FAN_RPM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_2
## %bb.1:
	movl	16(%rbx), %edi
	callq	_FCU_RPM_SET
	movl	%r15d, 8(%rbx)
	movq	_fcu_rpm_shift@GOTPCREL(%rip), %rcx
	movb	(%rcx), %dl
	movb	$8, %cl
	subb	%dl, %cl
	movl	%r15d, %esi
	sarl	%cl, %esi
	movl	%edx, %ecx
	shll	%cl, %r15d
	movb	%sil, -26(%rbp)
	movb	%r15b, -25(%rbp)
	movl	(%r14), %esi
	movl	4(%r14), %edi
	leaq	-26(%rbp), %rcx
	movl	%eax, %edx
	movl	$2, %r8d
	callq	_fcu_write
	movq	_EIO@GOTPCREL(%rip), %rcx
	sarq	$63, %rax
	andl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCU_FAN_RPM,8,3                ## @FCU_FAN_RPM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown fan type: %d\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_fcu_rpm_shift,4,2              ## @fcu_rpm_shift
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_fcu_fan_set_rpm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fcu_fan_set_rpm
_fcu_fan_set_rpm:                       ; @fcu_fan_set_rpm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #12]
	bl	_device_get_softc
	mov	x19, x0
	ldr	w0, [x20, #24]
	mov	x1, x21
	bl	_max
	mov	x1, x0
	ldr	w0, [x20, #20]
	bl	_min
	ldr	x2, [x20]
Lloh0:
	adrp	x8, _FCU_FAN_RPM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCU_FAN_RPM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x20, #16]
	bl	_FCU_RPM_SET
	mov	x2, x0
	str	w21, [x20, #8]
Lloh3:
	adrp	x8, _fcu_rpm_shift@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fcu_rpm_shift@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #8
	sub	w9, w9, w8
	asr	w9, w21, w9
	strb	w9, [sp, #14]
	lsl	w8, w21, w8
	strb	w8, [sp, #15]
	ldp	w1, w0, [x19]
	add	x3, sp, #14
	mov	w4, #2
	bl	_fcu_write
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	asr	x9, x0, #63
	and	w0, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20, #12]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_printf
Lloh11:
	adrp	x8, _ENXIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FCU_FAN_RPM,8,3                ; @FCU_FAN_RPM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown fan type: %d\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_fcu_rpm_shift,4,2              ; @fcu_rpm_shift
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_fcu_fan_set_rpm
.subsections_via_symbols
