	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_pwm_fan
_get_pwm_fan:                           ## @get_pwm_fan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_fcu_fans@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdx
	movq	_FCU_FAN_PWM@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_1
## %bb.3:
	movl	8(%rax,%rcx), %ebx
	movq	_FCU_FAN_ABSENT_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	-18(%rbp), %rsi
	movl	$1, %r14d
	movl	$43, %edi
	movl	$1, %edx
	callq	_fan_read_reg
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.6:
	movzbl	-18(%rbp), %eax
	movl	%ebx, %ecx
	shll	%cl, %r14d
	btl	%ebx, %eax
	jae	LBB0_8
## %bb.7:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_8:
	leaq	-17(%rbp), %rsi
	movl	$45, %edi
	movl	$1, %edx
	callq	_fan_read_reg
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.9:
	movzbl	-17(%rbp), %eax
	testl	%eax, %r14d
	je	LBB0_10
## %bb.11:
	leal	(%rbx,%rbx), %edi
	addl	$48, %edi
	leaq	-20(%rbp), %rsi
	movl	$1, %edx
	callq	_fan_read_reg
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.12:
	movzbl	-20(%rbp), %eax
	imull	$1000, %eax, %ecx               ## imm = 0x3E8
	movl	$3437316539, %eax               ## imm = 0xCCE149BB
	imulq	%rcx, %rax
	shrq	$43, %rax
	jmp	LBB0_13
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_fcu_fans,8,3                   ## @fcu_fans
	.comm	_FCU_FAN_PWM,8,3                ## @FCU_FAN_PWM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FCU_FAN_ABSENT_ID,4,2          ## @FCU_FAN_ABSENT_ID
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_get_pwm_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_pwm_fan
_get_pwm_fan:                           ; @get_pwm_fan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _fcu_fans@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fcu_fans@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sbfiz	x9, x0, #4, #32
	ldr	x9, [x8, x9]
Lloh3:
	adrp	x10, _FCU_FAN_PWM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FCU_FAN_PWM@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
	sxtw	x9, w0
	add	x8, x8, x9, lsl #4
	ldr	w19, [x8, #8]
Lloh6:
	adrp	x8, _FCU_FAN_ABSENT_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FCU_FAN_ABSENT_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_5
LBB0_2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	mov	w20, #1
	add	x1, sp, #15
	mov	w0, #43
	mov	w2, #1
	bl	_fan_read_reg
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.6:
	ldrb	w8, [sp, #15]
	lsl	w20, w20, w19
	tst	w20, w8
	b.eq	LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _EFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_3
LBB0_8:
	add	x1, sp, #14
	mov	w0, #45
	mov	w2, #1
	bl	_fan_read_reg
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.9:
	ldrb	w8, [sp, #14]
	tst	w20, w8
	b.eq	LBB0_13
; %bb.10:
	lsl	w8, w19, #1
	add	w0, w8, #48
	add	x1, sp, #12
	mov	w2, #1
	bl	_fan_read_reg
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.11:
	ldrb	w8, [sp, #12]
	mov	w9, #1000
	mul	w8, w8, w9
	mov	w9, #18875
	movk	w9, #52449, lsl #16
	umull	x8, w8, w9
	lsr	x0, x8, #43
	b	LBB0_4
LBB0_12:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_13:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_fcu_fans,8,3                   ; @fcu_fans
	.comm	_FCU_FAN_PWM,8,3                ; @FCU_FAN_PWM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FCU_FAN_ABSENT_ID,4,2          ; @FCU_FAN_ABSENT_ID
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_get_pwm_fan
.subsections_via_symbols
