	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fcu_fan_get_rpm
_fcu_fan_get_rpm:                       ## @fcu_fan_get_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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	12(%rdi), %edi
	callq	_device_get_softc
	movq	%rax, %r15
	movq	(%rbx), %rdx
	movq	_FCU_FAN_RPM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_10
## %bb.1:
	movq	_FCU_RPM_AVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %esi
	movl	4(%r15), %edi
	leaq	-32(%rbp), %rcx
	callq	_fcu_read_1
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_13
## %bb.2:
	movl	-32(%rbp), %eax
	movl	8(%rbx), %edx
	btl	%edx, %eax
	jae	LBB0_3
## %bb.4:
	movq	_FCU_RPM_FAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %esi
	movl	4(%r15), %edi
	leaq	-28(%rbp), %rcx
	callq	_fcu_read_1
	testq	%rax, %rax
	js	LBB0_13
## %bb.5:
	movl	-28(%rbp), %eax
	movl	8(%rbx), %edx
	btl	%edx, %eax
	jae	LBB0_7
## %bb.6:
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
LBB0_10:
	movl	12(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_device_printf
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
LBB0_7:
	movq	_FCU_RPM_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %esi
	movl	4(%r15), %edi
	leaq	-36(%rbp), %rcx
	callq	_fcu_read_1
	testq	%rax, %rax
	js	LBB0_13
## %bb.8:
	movl	-36(%rbp), %eax
	movl	8(%rbx), %edx
	btl	%edx, %eax
	jae	LBB0_9
## %bb.11:
	movl	%edx, %edi
	callq	_FCU_RPM_READ
	movl	(%r15), %esi
	movl	4(%r15), %edi
	leaq	-48(%rbp), %rcx
	movl	%eax, %edx
	callq	_fcu_read_1
	testq	%rax, %rax
	js	LBB0_13
## %bb.12:
	movq	_fcu_rpm_shift@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	$8, %cl
	subb	%al, %cl
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %r14d
	shll	%cl, %edx
	movl	%eax, %ecx
	sarl	%cl, %r14d
	orl	%edx, %r14d
	jmp	LBB0_13
LBB0_9:
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_FCU_FAN_RPM,8,3                ## @FCU_FAN_RPM
	.comm	_FCU_RPM_AVAILABLE,4,2          ## @FCU_RPM_AVAILABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RPM Fan not available ID: %d\n"

	.comm	_FCU_RPM_FAIL,4,2               ## @FCU_RPM_FAIL
L_.str.1:                               ## @.str.1
	.asciz	"RPM Fan failed ID: %d\n"

	.comm	_FCU_RPM_ACTIVE,4,2             ## @FCU_RPM_ACTIVE
L_.str.2:                               ## @.str.2
	.asciz	"RPM Fan not active ID: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unknown fan type: %d\n"

	.comm	_fcu_rpm_shift,4,2              ## @fcu_rpm_shift
	.no_dead_strip	_fcu_fan_get_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_get_rpm
_fcu_fan_get_rpm:                       ; @fcu_fan_get_rpm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	stp	xzr, xzr, [sp, #16]
	str	wzr, [sp, #12]
	ldr	w0, [x0, #12]
	bl	_device_get_softc
	ldr	x2, [x19]
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_6
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _FCU_RPM_AVAILABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FCU_RPM_AVAILABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w0, [x0, #4]
	ldr	w1, [x20]
	add	x3, sp, #16
	bl	_fcu_read_1
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	w8, [sp, #16]
	ldr	w2, [x19, #8]
	lsr	w8, w8, w2
	tbz	w8, #0, LBB0_10
; %bb.3:
Lloh6:
	adrp	x8, _FCU_RPM_FAIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FCU_RPM_FAIL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldp	w1, w0, [x20]
	add	x3, sp, #12
	bl	_fcu_read_1
	tbnz	x0, #63, LBB0_8
; %bb.4:
	ldr	w8, [sp, #12]
	ldr	w2, [x19, #8]
	lsr	w8, w8, w2
	tbz	w8, #0, LBB0_11
; %bb.5:
	ldr	w0, [x19, #12]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #12]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_device_printf
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	w0, [x19, #12]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_11:
Lloh15:
	adrp	x8, _FCU_RPM_ACTIVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FCU_RPM_ACTIVE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldp	w1, w0, [x20]
	add	x3, sp, #20
	bl	_fcu_read_1
	tbnz	x0, #63, LBB0_8
; %bb.12:
	ldr	w8, [sp, #20]
	ldr	w2, [x19, #8]
	lsr	w8, w8, w2
	tbz	w8, #0, LBB0_15
; %bb.13:
	mov	x0, x2
	bl	_FCU_RPM_READ
	mov	x2, x0
	ldp	w1, w0, [x20]
	add	x3, sp, #24
	bl	_fcu_read_1
	tbnz	x0, #63, LBB0_8
; %bb.14:
Lloh18:
	adrp	x8, _fcu_rpm_shift@GOTPAGE
Lloh19:
	ldr	x8, [x8, _fcu_rpm_shift@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mov	w9, #8
	sub	w9, w9, w8
	ldp	w10, w11, [sp, #24]
	lsl	w9, w10, w9
	asr	w8, w11, w8
	orr	w0, w9, w8
	b	LBB0_9
LBB0_15:
	ldr	w0, [x19, #12]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_FCU_FAN_RPM,8,3                ; @FCU_FAN_RPM
	.comm	_FCU_RPM_AVAILABLE,4,2          ; @FCU_RPM_AVAILABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RPM Fan not available ID: %d\n"

	.comm	_FCU_RPM_FAIL,4,2               ; @FCU_RPM_FAIL
l_.str.1:                               ; @.str.1
	.asciz	"RPM Fan failed ID: %d\n"

	.comm	_FCU_RPM_ACTIVE,4,2             ; @FCU_RPM_ACTIVE
l_.str.2:                               ; @.str.2
	.asciz	"RPM Fan not active ID: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unknown fan type: %d\n"

	.comm	_fcu_rpm_shift,4,2              ; @fcu_rpm_shift
	.no_dead_strip	_fcu_fan_get_rpm
.subsections_via_symbols
