	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_fanpwm_create             ## -- Begin function nvkm_fanpwm_create
	.p2align	4, 0x90
_nvkm_fanpwm_create:                    ## @nvkm_fanpwm_create
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	16(%rdi), %rbx
	movq	8(%rbx), %rdi
	movq	$0, -32(%rbp)
	leaq	-32(%rbp), %rsi
	callq	_nvbios_fan_parse
	movl	(%rbx), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_nvkm_boolopt
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	8(%r15), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_4
## %bb.2:
	movq	-32(%rbp), %rcx
	movq	_NVBIOS_THERM_FAN_TOGGLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movl	(%r14), %esi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	movq	%r15, %rdi
	callq	*(%rax)
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_6
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	leaq	8(%rax), %rcx
	movq	%rcx, (%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.1(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_nvkm_fanpwm_get@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rax)
	movq	_nvkm_fanpwm_set@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvFanPWM"

	.comm	_NVBIOS_THERM_FAN_TOGGLE,8,3    ## @NVBIOS_THERM_FAN_TOGGLE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"PWM"

	.comm	_nvkm_fanpwm_get,4,2            ## @nvkm_fanpwm_get
	.comm	_nvkm_fanpwm_set,4,2            ## @nvkm_fanpwm_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_fanpwm_create             ; -- Begin function nvkm_fanpwm_create
	.p2align	2
_nvkm_fanpwm_create:                    ; @nvkm_fanpwm_create
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
	ldr	x0, [x21, #8]
	str	xzr, [sp, #8]
	add	x1, sp, #8
	bl	_nvbios_fan_parse
	ldr	w0, [x21]
	ldr	w2, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nvkm_boolopt
Lloh2:
	adrp	x21, _ENODEV@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ENODEV@GOTPAGEOFF]
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_4
; %bb.2:
	ldr	x9, [sp, #8]
Lloh4:
	adrp	x10, _NVBIOS_THERM_FAN_TOGGLE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _NVBIOS_THERM_FAN_TOGGLE@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x8]
	ldr	w1, [x19]
	add	x2, sp, #4
	mov	x3, sp
	mov	x0, x20
	blr	x8
	ldr	w8, [x21]
	cmn	w0, w8
	b.ne	LBB0_7
LBB0_4:
	ldr	w8, [x21]
LBB0_5:
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	add	x9, x0, #8
	str	x9, [x20]
	cbz	x0, LBB0_9
; %bb.8:
	mov	x8, x0
	mov	w0, #0
Lloh10:
	adrp	x9, l_.str.1@PAGE
Lloh11:
	add	x9, x9, l_.str.1@PAGEOFF
	str	x9, [x8, #8]
Lloh12:
	adrp	x9, _nvkm_fanpwm_get@GOTPAGE
Lloh13:
	ldr	x9, [x9, _nvkm_fanpwm_get@GOTPAGEOFF]
Lloh14:
	adrp	x10, _nvkm_fanpwm_set@GOTPAGE
Lloh15:
	ldr	x10, [x10, _nvkm_fanpwm_set@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	ldr	w10, [x10]
	stp	w10, w9, [x8, #16]
	ldr	x9, [x19]
	str	x9, [x8]
	b	LBB0_6
LBB0_9:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvFanPWM"

	.comm	_NVBIOS_THERM_FAN_TOGGLE,8,3    ; @NVBIOS_THERM_FAN_TOGGLE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"PWM"

	.comm	_nvkm_fanpwm_get,4,2            ; @nvkm_fanpwm_get
	.comm	_nvkm_fanpwm_set,4,2            ; @nvkm_fanpwm_set
.subsections_via_symbols
