	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv40_fan_pwm_get
_nv40_fan_pwm_get:                      ## @nv40_fan_pwm_get
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %rbx
	cmpl	$9, %esi
	je	LBB0_4
## %bb.1:
	movl	%esi, %edx
	cmpl	$2, %esi
	jne	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	movl	$4336, %esi                     ## imm = 0x10F0
	callq	_nv_rd32
	testl	%eax, %eax
	jns	LBB0_7
## %bb.3:
	movl	%eax, %ecx
	shrl	$16, %ecx
	andl	$32767, %ecx                    ## imm = 0x7FFF
	movl	%ecx, (%r14)
	andl	$32767, %eax                    ## imm = 0x7FFF
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	%rbx, %rdi
	movl	$5620, %esi                     ## imm = 0x15F4
	callq	_nv_rd32
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nv_error
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$5624, %esi                     ## imm = 0x15F8
	callq	_nv_rd32
	movl	%eax, (%r15)
	andl	$2147483647, %r12d              ## imm = 0x7FFFFFFF
	movl	%r12d, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown pwm ctrl for gpio %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nv40_fan_pwm_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv40_fan_pwm_get
_nv40_fan_pwm_get:                      ; @nv40_fan_pwm_get
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x0
	cmp	w1, #9
	b.eq	LBB0_4
; %bb.1:
	mov	x2, x1
	cmp	w1, #2
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x21
	mov	w1, #4336
	bl	_nv_rd32
	tbz	w0, #31, LBB0_5
; %bb.3:
	mov	x8, x0
	mov	w0, #0
	ubfx	w9, w8, #16, #15
	str	w9, [x19]
	and	w8, w8, #0x7fff
	str	w8, [x20]
	b	LBB0_8
LBB0_4:
	mov	x0, x21
	mov	w1, #5620
	bl	_nv_rd32
	tbnz	w0, #31, LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nv_error
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	mov	x22, x0
	mov	x0, x21
	mov	w1, #5624
	bl	_nv_rd32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20]
	and	w8, w22, #0x7fffffff
	str	w8, [x19]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown pwm ctrl for gpio %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nv40_fan_pwm_get
.subsections_via_symbols
