	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_fanpwm_get
_nouveau_fanpwm_get:                    ## @nouveau_fanpwm_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	callq	_nouveau_gpio
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nv_device
	movl	(%rax), %r12d
	movl	8(%r15), %esi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	callq	*(%rbx)
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	-40(%rbp), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.2:
	movl	-36(%rbp), %esi
	callq	_max
	movl	%eax, %ecx
	movl	%eax, -40(%rbp)
	movq	_NV_40@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_5
## %bb.3:
	movq	(%r15), %rax
	testb	$1, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	-36(%rbp), %eax
	jmp	LBB0_6
LBB0_7:
	movl	8(%r15), %ecx
	movl	12(%r15), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*(%r14)
	imull	$100, %eax, %eax
	jmp	LBB0_8
LBB0_5:
	movl	%ecx, %eax
	subl	-36(%rbp), %eax
LBB0_6:
	imull	$100, %eax, %eax
	cltd
	idivl	%ecx
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_40,4,2                      ## @NV_40
	.no_dead_strip	_nouveau_fanpwm_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_fanpwm_get
_nouveau_fanpwm_get:                    ; @nouveau_fanpwm_get
	.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	x20, x0
	ldr	x21, [x0]
	bl	_nouveau_gpio
	mov	x19, x0
	mov	x0, x20
	bl	_nv_device
	ldr	w22, [x0]
	ldr	x8, [x20]
	ldr	w1, [x21, #8]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	blr	x8
	mov	x8, x0
	ldr	w0, [sp, #12]
	cmp	w8, #0
	ccmp	w0, #0, #4, eq
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldp	w3, w2, [x21, #8]
	mov	x0, x19
	mov	w1, #0
	blr	x8
	mov	w8, #100
	mul	w0, w0, w8
	b	LBB0_7
LBB0_2:
	ldr	w1, [sp, #8]
	bl	_max
	str	w0, [sp, #12]
Lloh0:
	adrp	x8, _NV_40@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_40@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_5
; %bb.3:
	ldr	x8, [x21]
	ldrb	w8, [x8]
	tbnz	w8, #0, LBB0_5
; %bb.4:
	ldr	w8, [sp, #8]
	b	LBB0_6
LBB0_5:
	ldr	w8, [sp, #8]
	sub	w8, w0, w8
LBB0_6:
	mov	w9, #100
	mul	w8, w8, w9
	sdiv	w0, w8, w0
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_40,4,2                      ; @NV_40
	.no_dead_strip	_nouveau_fanpwm_get
.subsections_via_symbols
