	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_drm_device_init
_nouveau_drm_device_init:               ## @nouveau_drm_device_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, 16(%r14)
	movq	%r14, 32(%rax)
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movq	%rax, %rdx
	callq	_nouveau_cli_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.3:
	leaq	12(%rbx), %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_nouveau_cli_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movl	$1, (%r14)
	movq	_nouveau_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_nvkm_dbgopt
	movl	%eax, %r12d
	leaq	20(%rbx), %rdi
	callq	_nvxx_client
	movl	%r12d, (%rax)
	leaq	28(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_spin_lock_init
	cmpl	$193, 16(%rbx)
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$557184, %esi                   ## imm = 0x88080
	movl	$2048, %edx                     ## imm = 0x800
	xorl	%ecx, %ecx
	callq	_nvif_mask
LBB0_6:
	movq	%rbx, %rdi
	callq	_nouveau_vga_init
	movq	%rbx, %rdi
	callq	_nouveau_ttm_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.7:
	movq	%r14, %rdi
	callq	_nouveau_bios_init
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:
	movq	%rbx, %rdi
	callq	_nouveau_accel_init
	movq	%r14, %rdi
	callq	_nouveau_display_create
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_9
LBB0_14:
	movq	%rbx, %rdi
	callq	_nouveau_accel_fini
	movq	%r14, %rdi
	callq	_nouveau_bios_takedown
LBB0_15:
	movq	%rbx, %rdi
	callq	_nouveau_ttm_fini
LBB0_16:
	movq	%rbx, %rdi
	callq	_nouveau_vga_fini
	movq	%r15, %rdi
	callq	_nouveau_cli_fini
LBB0_17:
	movq	%rbx, %rdi
	callq	_nouveau_cli_fini
LBB0_18:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_19
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_19:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpq	$0, 8(%r14)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_nouveau_display_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.13:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_nouveau_display_destroy
	jmp	LBB0_14
LBB0_11:
	movq	%rbx, %rdi
	callq	_nouveau_debugfs_init
	movq	%r14, %rdi
	callq	_nouveau_hwmon_init
	movq	%rbx, %rdi
	callq	_nouveau_svm_init
	movq	%rbx, %rdi
	callq	_nouveau_dmem_init
	movq	%r14, %rdi
	callq	_nouveau_fbcon_init
	movq	%r14, %rdi
	callq	_nouveau_led_init
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_nouveau_pmops_runtime
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movl	4(%r14), %edi
	callq	_pm_runtime_use_autosuspend
	movl	4(%r14), %edi
	movl	$5000, %esi                     ## imm = 0x1388
	callq	_pm_runtime_set_autosuspend_delay
	movl	4(%r14), %edi
	callq	_pm_runtime_set_active
	movl	4(%r14), %edi
	callq	_pm_runtime_allow
	movl	4(%r14), %edi
	callq	_pm_runtime_mark_last_busy
	movl	4(%r14), %edi
	callq	_pm_runtime_put
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRM-master"

L_.str.1:                               ## @.str.1
	.asciz	"DRM"

	.comm	_nouveau_debug,4,2              ## @nouveau_debug
	.no_dead_strip	_nouveau_drm_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_drm_device_init
_nouveau_drm_device_init:               ; @nouveau_drm_device_init
	.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, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	str	x0, [x19, #16]
	str	x19, [x0, #32]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x0
	bl	_nouveau_cli_init
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.2:
	add	x21, x20, #12
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_nouveau_cli_init
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
Lloh7:
	adrp	x8, _nouveau_debug@GOTPAGE
Lloh8:
	ldr	x8, [x8, _nouveau_debug@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nvkm_dbgopt
	mov	x22, x0
	add	x0, x20, #20
	bl	_nvxx_client
	str	w22, [x0]
	add	x0, x20, #28
	bl	_INIT_LIST_HEAD
	add	x0, x20, #24
	bl	_spin_lock_init
	ldr	w8, [x20, #16]
	cmp	w8, #193
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	mov	w1, #32896
	movk	w1, #8, lsl #16
	mov	w2, #2048
	mov	w3, #0
	bl	_nvif_mask
LBB0_5:
	mov	x0, x20
	bl	_nouveau_vga_init
	mov	x0, x20
	bl	_nouveau_ttm_init
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_nouveau_bios_init
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_nouveau_accel_init
	mov	x0, x19
	bl	_nouveau_display_create
	mov	x22, x0
	cbz	w0, LBB0_15
LBB0_8:
	mov	x0, x20
	bl	_nouveau_accel_fini
	mov	x0, x19
	bl	_nouveau_bios_takedown
LBB0_9:
	mov	x0, x20
	bl	_nouveau_ttm_fini
LBB0_10:
	mov	x0, x20
	bl	_nouveau_vga_fini
	mov	x0, x21
	bl	_nouveau_cli_fini
LBB0_11:
	mov	x0, x20
	bl	_nouveau_cli_fini
LBB0_12:
	mov	x0, x20
	bl	_kfree
	b	LBB0_14
LBB0_13:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_14:
	mov	x0, x22
	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_15:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_18
; %bb.16:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_nouveau_display_init
	cbz	w0, LBB0_18
; %bb.17:
	mov	x22, x0
	mov	x0, x19
	bl	_nouveau_display_destroy
	b	LBB0_8
LBB0_18:
	mov	x0, x20
	bl	_nouveau_debugfs_init
	mov	x0, x19
	bl	_nouveau_hwmon_init
	mov	x0, x20
	bl	_nouveau_svm_init
	mov	x0, x20
	bl	_nouveau_dmem_init
	mov	x0, x19
	bl	_nouveau_fbcon_init
	mov	x0, x19
	bl	_nouveau_led_init
	bl	_nouveau_pmops_runtime
	cbz	x0, LBB0_20
; %bb.19:
	ldr	w0, [x19, #4]
	bl	_pm_runtime_use_autosuspend
	ldr	w0, [x19, #4]
	mov	w1, #5000
	bl	_pm_runtime_set_autosuspend_delay
	ldr	w0, [x19, #4]
	bl	_pm_runtime_set_active
	ldr	w0, [x19, #4]
	bl	_pm_runtime_allow
	ldr	w0, [x19, #4]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #4]
	bl	_pm_runtime_put
LBB0_20:
	mov	w22, #0
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRM-master"

l_.str.1:                               ; @.str.1
	.asciz	"DRM"

	.comm	_nouveau_debug,4,2              ; @nouveau_debug
	.no_dead_strip	_nouveau_drm_device_init
.subsections_via_symbols
