	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvc0_graph_init_gpc_0
_nvc0_graph_init_gpc_0:                 ## @nvc0_graph_init_gpc_0
	.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, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %esi
	movl	$8388608, %edi                  ## imm = 0x800000
	callq	_DIV_ROUND_UP
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_TPC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	7(%rax), %r13d
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$3, %r13d
	leaq	(,%r13,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_GPC_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$92, %edx
	callq	_TPC_UNIT
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_nv_wr32
	shll	$2, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movq	8(%r12), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_memcpy
	movl	(%r12), %r8d
	testl	%r8d, %r8d
	jle	LBB0_4
## %bb.1:
	movl	16(%r12), %edi
	movq	8(%r12), %r9
	movl	$-1, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%edx
	movl	%edx, %eax
	cltd
	idivl	%edi
	movslq	%edx, %rax
	movl	(%rbx,%rax,4), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r9,%rax,4), %r10d
	subl	%esi, %r10d
	leal	(,%r14,4), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r10d
	movl	%r14d, %ecx
	shrl	$3, %ecx
	orl	%r10d, (%r15,%rcx,4)
	leal	-1(%rsi), %ecx
	movl	%ecx, (%rbx,%rax,4)
	incl	%r14d
	cmpl	%r8d, %r14d
	jne	LBB0_2
LBB0_4:
	movl	$2432, %edi                     ## imm = 0x980
	callq	_GPC_BCAST
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	movl	$2436, %edi                     ## imm = 0x984
	callq	_GPC_BCAST
	movl	4(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	movl	$2440, %edi                     ## imm = 0x988
	callq	_GPC_BCAST
	movl	8(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	movl	$2444, %edi                     ## imm = 0x98C
	callq	_GPC_BCAST
	movl	12(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	cmpl	$0, 16(%r12)
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movl	$262144, %r14d                  ## imm = 0x40000
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movl	$2324, %esi                     ## imm = 0x914
	callq	_GPC_UNIT
	movl	20(%r12), %edx
	shll	$8, %edx
	movq	8(%r12), %rcx
	orl	(%rcx,%rbx,4), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	movl	%ebx, %edi
	movl	$2320, %esi                     ## imm = 0x910
	callq	_GPC_UNIT
	movl	(%r12), %edx
	orl	%r14d, %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_nv_wr32
	movl	%ebx, %edi
	movl	$2328, %esi                     ## imm = 0x918
	callq	_GPC_UNIT
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_nv_wr32
	incq	%rbx
	movslq	16(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
LBB0_7:
	movl	$7124, %edi                     ## imm = 0x1BD4
	callq	_GPC_BCAST
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	callq	_nv_wr32
	movl	$2220, %edi                     ## imm = 0x8AC
	callq	_GPC_BCAST
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$1050624, %esi                  ## imm = 0x100800
	callq	_nv_rd32
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nv_wr32
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TPC_MAX,4,2                    ## @TPC_MAX
	.comm	_GPC_MAX,4,2                    ## @GPC_MAX
	.no_dead_strip	_nvc0_graph_init_gpc_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvc0_graph_init_gpc_0
_nvc0_graph_init_gpc_0:                 ; @nvc0_graph_init_gpc_0
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	w1, [x0]
	mov	w0, #8388608
	bl	_DIV_ROUND_UP
	mov	x20, x0
Lloh3:
	adrp	x8, _TPC_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TPC_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w23, w8, #3
	lsl	x9, x23, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _GPC_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPC_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	mov	w0, #0
	mov	w1, #0
	mov	w2, #92
	bl	_TPC_UNIT
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_nv_wr32
	lsl	w2, w23, #2
	mov	x0, x21
	mov	w1, #0
	bl	_memset
	ldr	x1, [x19, #8]
	mov	x0, x22
	mov	w2, #8
	bl	_memcpy
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w9, #0
	ldr	w10, [x19, #16]
	ldr	x11, [x19, #8]
	mov	w12, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w12, w12, #1
	sdiv	w13, w12, w10
	msub	w12, w13, w10, w12
	ldr	w13, [x22, w12, sxtw #2]
	cbz	w13, LBB0_2
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x14, w12
	lsl	x14, x14, #2
	ldr	w15, [x11, x14]
	sub	w16, w13, #1
	str	w16, [x22, x14]
	sub	w13, w15, w13
	ubfiz	w14, w9, #2, #3
	lsr	w15, w9, #3
	lsl	x15, x15, #2
	ldr	w16, [x21, x15]
	lsl	w13, w13, w14
	orr	w13, w16, w13
	str	w13, [x21, x15]
	add	w9, w9, #1
	cmp	w9, w8
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #2432
	bl	_GPC_BCAST
	mov	x1, x0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_nv_wr32
	mov	w0, #2436
	bl	_GPC_BCAST
	mov	x1, x0
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_nv_wr32
	mov	w0, #2440
	bl	_GPC_BCAST
	mov	x1, x0
	ldr	w2, [x21, #8]
	mov	x0, x19
	bl	_nv_wr32
	mov	w0, #2444
	bl	_GPC_BCAST
	mov	x1, x0
	ldr	w2, [x21, #12]
	mov	x0, x19
	bl	_nv_wr32
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #2324
	bl	_GPC_UNIT
	mov	x1, x0
	ldr	w8, [x19, #20]
	ldr	x9, [x19, #8]
	ldr	w9, [x9, x21, lsl #2]
	orr	w2, w9, w8, lsl #8
	mov	x0, x19
	bl	_nv_wr32
	mov	x0, x21
	mov	w1, #2320
	bl	_GPC_UNIT
	mov	x1, x0
	ldr	w8, [x19]
	orr	w2, w8, #0x40000
	mov	x0, x19
	bl	_nv_wr32
	mov	x0, x21
	mov	w1, #2328
	bl	_GPC_UNIT
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_nv_wr32
	add	x21, x21, #1
	ldrsw	x8, [x19, #16]
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
	mov	w0, #7124
	bl	_GPC_BCAST
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_nv_wr32
	mov	w0, #2220
	bl	_GPC_BCAST
	mov	x20, x0
	mov	x0, x19
	mov	w1, #2048
	movk	w1, #16, lsl #16
	bl	_nv_rd32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_nv_wr32
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TPC_MAX,4,2                    ; @TPC_MAX
	.comm	_GPC_MAX,4,2                    ; @GPC_MAX
	.no_dead_strip	_nvc0_graph_init_gpc_0
.subsections_via_symbols
