	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wf_fcu_add_fan
_wf_fcu_add_fan:                        ## @wf_fcu_add_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, 48(%rax)
	movl	%r12d, (%rax)
	leaq	16(%rax), %r12
	movq	%r15, 16(%rax)
	movq	%rax, 40(%rax)
	movq	_FCU_FAN_RPM@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_strncmp
	movq	%rbx, %rdi
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	callq	_wf_fcu_get_rpmfan_minmax
	jmp	LBB0_4
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movabsq	$429496729610, %rax             ## imm = 0x640000000A
	movq	%rax, 4(%rbx)
	movq	_wf_fcu_fan_pwm_ops@GOTPCREL(%rip), %rax
	movq	_WF_CONTROL_PWM_FAN@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	callq	_wf_fcu_get_pump_minmax
LBB0_4:
	movq	_wf_fcu_fan_rpm_ops@GOTPCREL(%rip), %rax
	movq	_WF_CONTROL_RPM_FAN@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rbx)
	movq	%rax, 24(%rbx)
	movq	%r12, %rdi
	callq	_wf_register_control
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_err
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_8:
	addq	$12, %rbx
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_list_add
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kref_get                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_FCU_FAN_RPM,4,2                ## @FCU_FAN_RPM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu-pump"

	.comm	_WF_CONTROL_RPM_FAN,4,2         ## @WF_CONTROL_RPM_FAN
	.comm	_wf_fcu_fan_rpm_ops,4,2         ## @wf_fcu_fan_rpm_ops
	.comm	_WF_CONTROL_PWM_FAN,4,2         ## @WF_CONTROL_PWM_FAN
	.comm	_wf_fcu_fan_pwm_ops,4,2         ## @wf_fcu_fan_pwm_ops
L_.str.1:                               ## @.str.1
	.asciz	"wf_fcu: Failed to register fan %s\n"

	.no_dead_strip	_wf_fcu_add_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wf_fcu_add_fan
lCPI0_0:
	.long	10                              ; 0xa
	.long	100                             ; 0x64
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_wf_fcu_add_fan:                        ; @wf_fcu_add_fan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	str	w22, [x0]
	mov	x22, x0
	str	x20, [x22, #16]!
	stp	x0, x19, [x0, #40]
Lloh3:
	adrp	x8, _FCU_FAN_RPM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FCU_FAN_RPM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x23, l_.str@PAGE
Lloh7:
	add	x23, x23, l_.str@PAGEOFF
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x23
	bl	_strncmp
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, x21
	bl	_wf_fcu_get_rpmfan_minmax
	b	LBB0_7
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x21, #4]
Lloh10:
	adrp	x8, _wf_fcu_fan_pwm_ops@GOTPAGE
Lloh11:
	ldr	x8, [x8, _wf_fcu_fan_pwm_ops@GOTPAGEOFF]
Lloh12:
	adrp	x9, _WF_CONTROL_PWM_FAN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WF_CONTROL_PWM_FAN@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_wf_fcu_get_pump_minmax
LBB0_7:
Lloh14:
	adrp	x8, _wf_fcu_fan_rpm_ops@GOTPAGE
Lloh15:
	ldr	x8, [x8, _wf_fcu_fan_rpm_ops@GOTPAGEOFF]
Lloh16:
	adrp	x9, _WF_CONTROL_RPM_FAN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WF_CONTROL_RPM_FAN@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x9]
	str	w9, [x21, #32]
	str	x8, [x21, #24]
	mov	x0, x22
	bl	_wf_register_control
	cbz	x0, LBB0_10
; %bb.9:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_err
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kfree
LBB0_10:
	add	x0, x21, #12
	add	x1, x19, #4
	bl	_list_add
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kref_get
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdrp	Lloh8, Lloh10
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_FCU_FAN_RPM,4,2                ; @FCU_FAN_RPM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu-pump"

	.comm	_WF_CONTROL_RPM_FAN,4,2         ; @WF_CONTROL_RPM_FAN
	.comm	_wf_fcu_fan_rpm_ops,4,2         ; @wf_fcu_fan_rpm_ops
	.comm	_WF_CONTROL_PWM_FAN,4,2         ; @WF_CONTROL_PWM_FAN
	.comm	_wf_fcu_fan_pwm_ops,4,2         ; @wf_fcu_fan_pwm_ops
l_.str.1:                               ; @.str.1
	.asciz	"wf_fcu: Failed to register fan %s\n"

	.no_dead_strip	_wf_fcu_add_fan
.subsections_via_symbols
