	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max31785_pwm_enable
_max31785_pwm_enable:                   ## @max31785_pwm_enable
	.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
	cmpl	$3, %edx
	ja	LBB0_4
## %bb.1:
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$32767, %eax                    ## imm = 0x7FFF
	movl	%edx, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	_percent@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_pmbus_get_fan_rate_cached
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movl	%eax, %edi
	callq	_max31785_scale_pwm
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_7:
	movq	_PB_FAN_1_RPM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_rpm@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_pmbus_get_fan_rate_cached
	testl	%eax, %eax
	jns	LBB0_6
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$65535, %eax                    ## imm = 0xFFFF
	xorl	%ebx, %ebx
LBB0_6:
	movq	_PB_FAN_1_RPM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	%eax, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmbus_update_fan               ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_percent,4,2                    ## @percent
	.comm	_PB_FAN_1_RPM,4,2               ## @PB_FAN_1_RPM
	.comm	_rpm,4,2                        ## @rpm
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_max31785_pwm_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max31785_pwm_enable
_max31785_pwm_enable:                   ; @max31785_pwm_enable
	.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
	cmp	w2, #3
	b.hi	LBB0_4
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	w5, #32767
	mov	w8, w2
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
Lloh2:
	adrp	x22, _PB_FAN_1_RPM@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PB_FAN_1_RPM@GOTPAGEOFF]
	br	x10
LBB0_2:
Lloh4:
	adrp	x8, _percent@GOTPAGE
Lloh5:
	ldr	x8, [x8, _percent@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_pmbus_get_fan_rate_cached
	mov	x5, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x0, x5
	bl	_max31785_scale_pwm
	mov	x5, x0
	mov	w21, #0
	b	LBB0_8
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w5, w8
	b	LBB0_6
LBB0_5:
	ldr	w21, [x22]
Lloh10:
	adrp	x8, _rpm@GOTPAGE
Lloh11:
	ldr	x8, [x8, _rpm@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_pmbus_get_fan_rate_cached
	mov	x5, x0
	tbz	w0, #31, LBB0_8
LBB0_6:
	mov	x0, x5
	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
LBB0_7:
	mov	w21, #0
	mov	w5, #65535
LBB0_8:
	ldr	w4, [x22]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	mov	x3, x21
	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
	b	_pmbus_update_fan
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_percent,4,2                    ; @percent
	.comm	_PB_FAN_1_RPM,4,2               ; @PB_FAN_1_RPM
	.comm	_rpm,4,2                        ; @rpm
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_max31785_pwm_enable
.subsections_via_symbols
