	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_wmi_fan_init
_asus_wmi_fan_init:                     ## @asus_wmi_fan_init
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_FAN_TYPE_NONE@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	%rax, (%rdi)
	movl	$-1, 8(%rdi)
	movq	_ASUS_WMI_DEVID_CPU_FAN_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_asus_wmi_dev_is_present
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_FAN_TYPE_SPEC83@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_asus_wmi_has_agfn_fan
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_FAN_TYPE_AGFN@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	cmpq	(%r14), %rax
	jne	LBB0_8
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_asus_fan_set_auto
	movq	_ASUS_FAN_CTRL_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FAN_TYPE_NONE,8,3              ## @FAN_TYPE_NONE
	.comm	_ASUS_WMI_DEVID_CPU_FAN_CTRL,4,2 ## @ASUS_WMI_DEVID_CPU_FAN_CTRL
	.comm	_FAN_TYPE_SPEC83,8,3            ## @FAN_TYPE_SPEC83
	.comm	_FAN_TYPE_AGFN,8,3              ## @FAN_TYPE_AGFN
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ASUS_FAN_CTRL_AUTO,4,2         ## @ASUS_FAN_CTRL_AUTO
	.no_dead_strip	_asus_wmi_fan_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asus_wmi_fan_init
_asus_wmi_fan_init:                     ; @asus_wmi_fan_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _FAN_TYPE_NONE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FAN_TYPE_NONE@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [x0]
	mov	w8, #-1
	str	w8, [x0, #8]
Lloh2:
	adrp	x8, _ASUS_WMI_DEVID_CPU_FAN_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ASUS_WMI_DEVID_CPU_FAN_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_asus_wmi_dev_is_present
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _FAN_TYPE_SPEC83@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FAN_TYPE_SPEC83@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_asus_wmi_has_agfn_fan
	cbz	x0, LBB0_9
; %bb.3:
Lloh7:
	adrp	x8, _FAN_TYPE_AGFN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FAN_TYPE_AGFN@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_5:
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_asus_fan_set_auto
	mov	w0, #0
Lloh12:
	adrp	x8, _ASUS_FAN_CTRL_AUTO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ASUS_FAN_CTRL_AUTO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x8, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_FAN_TYPE_NONE,8,3              ; @FAN_TYPE_NONE
	.comm	_ASUS_WMI_DEVID_CPU_FAN_CTRL,4,2 ; @ASUS_WMI_DEVID_CPU_FAN_CTRL
	.comm	_FAN_TYPE_SPEC83,8,3            ; @FAN_TYPE_SPEC83
	.comm	_FAN_TYPE_AGFN,8,3              ; @FAN_TYPE_AGFN
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASUS_FAN_CTRL_AUTO,4,2         ; @ASUS_FAN_CTRL_AUTO
	.no_dead_strip	_asus_wmi_fan_init
.subsections_via_symbols
