	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_therm_fan_ctor         ## -- Begin function nouveau_therm_fan_ctor
	.p2align	4, 0x90
_nouveau_therm_fan_ctor:                ## @nouveau_therm_fan_ctor
	.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
	callq	_nouveau_gpio
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_bios
	movq	%rax, %r14
	movq	_DCB_GPIO_FAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %r8
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$255, %ecx
	callq	*(%r15)
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	-40(%rbp), %rax
	movq	_DCB_GPIO_LOG_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nv_debug
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_7
LBB0_3:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nouveau_fanpwm_create
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nouveau_fantog_create
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	movq	%rbx, %rdi
	callq	_nouveau_fannil_create
	testl	%eax, %eax
	jne	LBB0_13
LBB0_7:
	movq	(%rbx), %rax
	movl	40(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nv_info
	movq	_DCB_GPIO_FAN_SENSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%rbx), %r8
	addq	$24, %r8
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$255, %ecx
	callq	*(%r15)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	_DCB_GPIO_UNUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdi
	movl	%eax, 32(%rdi)
	jmp	LBB0_10
LBB0_8:
	movq	(%rbx), %rdi
LBB0_10:
	movq	%rbx, 16(%rdi)
	addq	$12, %rdi
	movq	_nouveau_fan_alarm@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nouveau_alarm_init
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	callq	_nouveau_therm_fan_set_defaults
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%r14, %rdi
	callq	_nvbios_perf_fan_parse
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_nvbios_therm_fan_parse
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nv_error
LBB0_12:
	movq	%rbx, %rdi
	callq	_nouveau_therm_fan_safety_checks
	xorl	%eax, %eax
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCB_GPIO_FAN,4,2               ## @DCB_GPIO_FAN
	.comm	_DCB_GPIO_LOG_DIR_IN,4,2        ## @DCB_GPIO_LOG_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIO_FAN is in input mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"FAN control: %s\n"

	.comm	_DCB_GPIO_FAN_SENSE,4,2         ## @DCB_GPIO_FAN_SENSE
	.comm	_DCB_GPIO_UNUSED,4,2            ## @DCB_GPIO_UNUSED
	.comm	_nouveau_fan_alarm,4,2          ## @nouveau_fan_alarm
L_.str.2:                               ## @.str.2
	.asciz	"parsing the thermal table failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_therm_fan_ctor         ; -- Begin function nouveau_therm_fan_ctor
	.p2align	2
_nouveau_therm_fan_ctor:                ; @nouveau_therm_fan_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_nouveau_gpio
	mov	x21, x0
	mov	x0, x19
	bl	_nouveau_bios
	mov	x20, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _DCB_GPIO_FAN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DCB_GPIO_FAN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	x4, sp
	mov	x0, x21
	mov	w1, #0
	mov	w3, #255
	blr	x8
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	x8, [sp]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DCB_GPIO_LOG_DIR_IN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DCB_GPIO_LOG_DIR_IN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_debug
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	cbnz	w0, LBB0_5
	b	LBB0_6
LBB0_3:
	mov	x1, sp
	mov	x0, x19
	bl	_nouveau_fanpwm_create
	cbz	w0, LBB0_6
; %bb.4:
	mov	x1, sp
	mov	x0, x19
	bl	_nouveau_fantog_create
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_nouveau_fannil_create
	cbnz	w0, LBB0_12
LBB0_6:
	ldr	x8, [x19]
	ldr	w2, [x8, #40]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nv_info
	ldr	x8, [x21]
Lloh13:
	adrp	x9, _DCB_GPIO_FAN_SENSE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DCB_GPIO_FAN_SENSE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x9]
	ldr	x9, [x19]
	add	x4, x9, #24
	mov	x0, x21
	mov	w1, #0
	mov	w3, #255
	blr	x8
	cbz	w0, LBB0_8
; %bb.7:
Lloh16:
	adrp	x8, _DCB_GPIO_UNUSED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DCB_GPIO_UNUSED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x8]
	ldr	x8, [x19]
	str	w9, [x8, #32]
	b	LBB0_9
LBB0_8:
	ldr	x8, [x19]
LBB0_9:
	str	x19, [x8, #16]
	add	x0, x8, #12
Lloh19:
	adrp	x8, _nouveau_fan_alarm@GOTPAGE
Lloh20:
	ldr	x8, [x8, _nouveau_fan_alarm@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_nouveau_alarm_init
	ldr	x8, [x19]
	add	x0, x8, #8
	bl	_spin_lock_init
	mov	x0, x19
	bl	_nouveau_therm_fan_set_defaults
	ldr	x8, [x19]
	add	x1, x8, #4
	mov	x0, x20
	bl	_nvbios_perf_fan_parse
	ldr	x1, [x19]
	mov	x0, x20
	bl	_nvbios_therm_fan_parse
	cbz	x0, LBB0_11
; %bb.10:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_nv_error
LBB0_11:
	mov	x0, x19
	bl	_nouveau_therm_fan_safety_checks
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DCB_GPIO_FAN,4,2               ; @DCB_GPIO_FAN
	.comm	_DCB_GPIO_LOG_DIR_IN,4,2        ; @DCB_GPIO_LOG_DIR_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO_FAN is in input mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"FAN control: %s\n"

	.comm	_DCB_GPIO_FAN_SENSE,4,2         ; @DCB_GPIO_FAN_SENSE
	.comm	_DCB_GPIO_UNUSED,4,2            ; @DCB_GPIO_UNUSED
	.comm	_nouveau_fan_alarm,4,2          ; @nouveau_fan_alarm
l_.str.2:                               ; @.str.2
	.asciz	"parsing the thermal table failed\n"

.subsections_via_symbols
