	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nve0_graph_ctor
_nve0_graph_ctor:                       ## @nve0_graph_ctor
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_nv_device
	movq	%rax, %r15
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	_nouveau_graph_create
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r12)
	testl	%ebx, %ebx
	jne	LBB0_22
## %bb.1:
	movq	-48(%rbp), %rdi
	callq	_nv_subdev
	movl	$402657280, (%rax)              ## imm = 0x18001000
	movq	_nve0_graph_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi
	callq	_nv_subdev
	movl	%ebx, 4(%rax)
	movq	-48(%rbp), %rdi
	callq	_nv_engine
	movq	_nve0_graph_cclass@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_nve0_graph_sclass@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi
	callq	_nv_engine
	movl	%ebx, (%rax)
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_nouveau_boolopt
	movq	-48(%rbp), %r9
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r9, %rdi
	callq	_nv_info
	movq	-48(%rbp), %rdi
	leaq	52(%rdi), %rdx
	leaq	L_.str.2(%rip), %rsi
	callq	_nvc0_graph_ctor_fw
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	-48(%rbp), %rdi
	leaq	48(%rdi), %rdx
	leaq	L_.str.3(%rip), %rsi
	callq	_nvc0_graph_ctor_fw
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	-48(%rbp), %rdi
	leaq	44(%rdi), %rdx
	leaq	L_.str.4(%rip), %rsi
	callq	_nvc0_graph_ctor_fw
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rdi
	leaq	40(%rdi), %rdx
	leaq	L_.str.5(%rip), %rsi
	callq	_nvc0_graph_ctor_fw
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_7:
	movq	-48(%rbp), %r9
	movl	$1, (%r9)
LBB0_8:
	addq	$36, %r9
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	movl	$256, %ecx                      ## imm = 0x100
	xorl	%r8d, %r8d
	callq	_nouveau_gpuobj_new
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.9:
	movq	-48(%rbp), %r9
	addq	$32, %r9
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4096, %edx                     ## imm = 0x1000
	movl	$256, %ecx                      ## imm = 0x100
	xorl	%r8d, %r8d
	callq	_nouveau_gpuobj_new
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.10:
	movl	$-4, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addl	$4, %ebx
	movq	-48(%rbp), %rax
	movl	36(%rax), %edi
	movl	%ebx, %esi
	movl	$16, %edx
	callq	_nv_wo32
	movq	-48(%rbp), %rax
	movl	32(%rax), %edi
	movl	%ebx, %esi
	movl	$16, %edx
	callq	_nv_wo32
	cmpl	$4092, %ebx                     ## imm = 0xFFC
	jb	LBB0_11
## %bb.12:
	movq	-48(%rbp), %rdi
	movl	$4232708, %esi                  ## imm = 0x409604
	callq	_nv_rd32
	andl	$31, %eax
	movq	-48(%rbp), %rdi
	movl	%eax, 4(%rdi)
	movl	$4232708, %esi                  ## imm = 0x409604
	callq	_nv_rd32
	shrl	$16, %eax
	andl	$31, %eax
	movq	-48(%rbp), %r14
	movl	%eax, 8(%r14)
	cmpl	$0, 4(%r14)
	jle	LBB0_15
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movl	$9736, %esi                     ## imm = 0x2608
	callq	_GPC_UNIT
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_nv_rd32
	movq	-48(%rbp), %r14
	movq	16(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	addl	%eax, 24(%r14)
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_14
LBB0_15:
	movq	%r14, %rdi
	callq	_nv_device
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	leal	-230(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_16
## %bb.20:
	movq	-48(%rbp), %rax
LBB0_21:
	movl	$1, 28(%rax)
	jmp	LBB0_22
LBB0_16:
	cmpl	$228, %eax
	jne	LBB0_22
## %bb.17:
	movq	-48(%rbp), %rax
	movl	24(%rax), %ecx
	cmpl	$7, %ecx
	je	LBB0_21
## %bb.18:
	cmpl	$8, %ecx
	jne	LBB0_22
## %bb.19:
	movl	$3, 28(%rax)
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nve0_graph_intr,4,2            ## @nve0_graph_intr
	.comm	_nve0_graph_cclass,4,2          ## @nve0_graph_cclass
	.comm	_nve0_graph_sclass,4,2          ## @nve0_graph_sclass
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvGrUseFW"

L_.str.1:                               ## @.str.1
	.asciz	"using external firmware\n"

L_.str.2:                               ## @.str.2
	.asciz	"fuc409c"

L_.str.3:                               ## @.str.3
	.asciz	"fuc409d"

L_.str.4:                               ## @.str.4
	.asciz	"fuc41ac"

L_.str.5:                               ## @.str.5
	.asciz	"fuc41ad"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_nve0_graph_ctor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nve0_graph_ctor
_nve0_graph_ctor:                       ; @nve0_graph_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x5
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	bl	_nv_device
	mov	x20, x0
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	mov	w3, #1
	bl	_nouveau_graph_create
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_nv_object
	str	x0, [x22]
	cbnz	w21, LBB0_24
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_nv_subdev
	mov	w8, #4096
	movk	w8, #6144, lsl #16
	str	w8, [x0]
Lloh0:
	adrp	x8, _nve0_graph_intr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nve0_graph_intr@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_subdev
	str	w21, [x0, #4]
	ldr	x0, [sp, #8]
	bl	_nv_engine
Lloh3:
	adrp	x8, _nve0_graph_cclass@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nve0_graph_cclass@GOTPAGEOFF]
	str	x8, [x0, #8]
Lloh5:
	adrp	x8, _nve0_graph_sclass@GOTPAGE
Lloh6:
	ldr	x8, [x8, _nve0_graph_sclass@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_engine
	str	w21, [x0]
	ldr	w0, [x20, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	bl	_nouveau_boolopt
	mov	x8, x0
	ldr	x0, [sp, #8]
	cbz	x8, LBB0_8
; %bb.2:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nv_info
	ldr	x0, [sp, #8]
	add	x2, x0, #52
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_nvc0_graph_ctor_fw
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	x0, [sp, #8]
	add	x2, x0, #48
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_nvc0_graph_ctor_fw
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x0, [sp, #8]
	add	x2, x0, #44
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_nvc0_graph_ctor_fw
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x0, [sp, #8]
	add	x2, x0, #40
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_nvc0_graph_ctor_fw
	cbz	x0, LBB0_7
LBB0_6:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_7:
	ldr	x0, [sp, #8]
	mov	w8, #1
	str	w8, [x0]
LBB0_8:
	add	x5, x0, #36
	mov	x0, x19
	mov	x1, #0
	mov	w2, #4096
	mov	w3, #256
	mov	w4, #0
	bl	_nouveau_gpuobj_new
	mov	x21, x0
	cbnz	w0, LBB0_24
; %bb.9:
	ldr	x8, [sp, #8]
	add	x5, x8, #32
	mov	x0, x19
	mov	x1, #0
	mov	w2, #4096
	mov	w3, #256
	mov	w4, #0
	bl	_nouveau_gpuobj_new
	mov	x21, x0
	cbnz	w0, LBB0_24
; %bb.10:
	mov	w19, #-4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #4
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #36]
	mov	x1, x19
	mov	w2, #16
	bl	_nv_wo32
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #32]
	mov	x1, x19
	mov	w2, #16
	bl	_nv_wo32
	cmp	w19, #4092
	b.lo	LBB0_11
; %bb.12:
	ldr	x0, [sp, #8]
	mov	w1, #38404
	movk	w1, #64, lsl #16
	bl	_nv_rd32
	and	w8, w0, #0x1f
	ldr	x0, [sp, #8]
	str	w8, [x0, #4]
	mov	w1, #38404
	movk	w1, #64, lsl #16
	bl	_nv_rd32
	ubfx	w8, w0, #16, #5
	ldr	x19, [sp, #8]
	str	w8, [x19, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x20, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #9736
	bl	_GPC_UNIT
	mov	x1, x0
	mov	x0, x19
	bl	_nv_rd32
	ldr	x19, [sp, #8]
	ldr	x8, [x19, #16]
	str	w0, [x8, x20, lsl #2]
	ldr	w8, [x19, #24]
	add	w8, w8, w0
	str	w8, [x19, #24]
	add	x20, x20, #1
	ldrsw	x8, [x19, #4]
	cmp	x20, x8
	b.lt	LBB0_14
LBB0_15:
	mov	x0, x19
	bl	_nv_device
	ldr	w8, [x0]
	sub	w9, w8, #230
	cmp	w9, #2
	b.hs	LBB0_19
; %bb.16:
	mov	w21, #0
	ldr	x8, [sp, #8]
LBB0_17:
	mov	w9, #1
LBB0_18:
	str	w9, [x8, #28]
	b	LBB0_24
LBB0_19:
	cmp	w8, #228
	b.ne	LBB0_23
; %bb.20:
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #24]
	cmp	w9, #7
	b.eq	LBB0_25
; %bb.21:
	cmp	w9, #8
	b.ne	LBB0_23
; %bb.22:
	mov	w21, #0
	mov	w9, #3
	b	LBB0_18
LBB0_23:
	mov	w21, #0
LBB0_24:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_25:
	mov	w21, #0
	b	LBB0_17
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_nve0_graph_intr,4,2            ; @nve0_graph_intr
	.comm	_nve0_graph_cclass,4,2          ; @nve0_graph_cclass
	.comm	_nve0_graph_sclass,4,2          ; @nve0_graph_sclass
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvGrUseFW"

l_.str.1:                               ; @.str.1
	.asciz	"using external firmware\n"

l_.str.2:                               ; @.str.2
	.asciz	"fuc409c"

l_.str.3:                               ; @.str.3
	.asciz	"fuc409d"

l_.str.4:                               ; @.str.4
	.asciz	"fuc41ac"

l_.str.5:                               ; @.str.5
	.asciz	"fuc41ad"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_nve0_graph_ctor
.subsections_via_symbols
