	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_sysfs_init
_nouveau_sysfs_init:                    ## @nouveau_sysfs_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nouveau_drm
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_pm
	movq	%rax, %r13
	movq	(%rbx), %r12
	movq	_dev_attr_performance_level@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_device_create_file
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %r12
	leaq	(%r12,%r15), %r14
	movq	40(%r12,%r15), %rax
	movq	%rax, (%r12,%r15)
	movq	_S_IRUGO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12,%r15)
	movq	_nouveau_pm_get_perflvl_info@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12,%r15)
	movq	$0, 16(%r12,%r15)
	movq	%r14, %rdi
	callq	_sysfs_attr_init
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	addq	$48, %r15
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_4:
	movl	%eax, %r14d
	movl	32(%r12,%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_NV_ERROR
	movq	$0, (%r12,%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_nouveau_pm_fini
LBB0_7:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_attr_performance_level,32,3 ## @dev_attr_performance_level
	.comm	_S_IRUGO,4,2                    ## @S_IRUGO
	.comm	_nouveau_pm_get_perflvl_info,4,2 ## @nouveau_pm_get_perflvl_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed pervlvl %d sysfs: %d\n"

	.no_dead_strip	_nouveau_sysfs_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_sysfs_init
_nouveau_sysfs_init:                    ; @nouveau_sysfs_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_nouveau_drm
	mov	x20, x0
	mov	x0, x19
	bl	_nouveau_pm
	mov	x21, x0
	ldr	x22, [x19]
Lloh0:
	adrp	x1, _dev_attr_performance_level@GOTPAGE
Lloh1:
	ldr	x1, [x1, _dev_attr_performance_level@GOTPAGEOFF]
	mov	x0, x22
	bl	_device_create_file
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x26, #0
	mov	x23, #0
Lloh2:
	adrp	x27, _S_IRUGO@GOTPAGE
Lloh3:
	ldr	x27, [x27, _S_IRUGO@GOTPAGEOFF]
Lloh4:
	adrp	x28, _nouveau_pm_get_perflvl_info@GOTPAGE
Lloh5:
	ldr	x28, [x28, _nouveau_pm_get_perflvl_info@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	x24, x8, x26
	ldr	x8, [x24, #40]
	str	x8, [x24]
	ldr	w8, [x27]
	str	w8, [x24, #8]
	ldr	w8, [x28]
	str	w8, [x24, #24]
	str	xzr, [x24, #16]
	mov	x0, x24
	bl	_sysfs_attr_init
	mov	x0, x22
	mov	x1, x24
	bl	_device_create_file
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x26, x26, #48
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_5:
	mov	w25, #0
	b	LBB0_7
LBB0_6:
	mov	x25, x0
	ldr	w2, [x24, #32]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x23
	bl	_NV_ERROR
	str	xzr, [x24]
	mov	x0, x19
	bl	_nouveau_pm_fini
LBB0_7:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_attr_performance_level,32,3 ; @dev_attr_performance_level
	.comm	_S_IRUGO,4,2                    ; @S_IRUGO
	.comm	_nouveau_pm_get_perflvl_info,4,2 ; @nouveau_pm_get_perflvl_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed pervlvl %d sysfs: %d\n"

	.no_dead_strip	_nouveau_sysfs_init
.subsections_via_symbols
