	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function gm20b_grctx_generate_main
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
	.long	1065353216                      ## 0x3f800000
LCPI0_2:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
LCPI0_3:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_gm20b_grctx_generate_main:             ## @gm20b_grctx_generate_main
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	40(%rdi), %r15
	movq	32(%rdi), %rax
	movq	(%rax), %r12
	movl	24(%rdi), %esi
	callq	_gf100_gr_mmio
	movq	%r13, %rdi
	callq	_gf100_gr_wait_idle
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	$4211028, %esi                  ## imm = 0x404154
	movl	$-1, %edx
	xorl	%ecx, %ecx
	callq	_nvkm_mask
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	*24(%r12)
	movq	%r13, %rdi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	callq	*16(%r12)
	movq	%r13, %rdi
	callq	_gf100_grctx_generate_floorsweep
	movq	%r15, %rdi
	movl	$4220112, %esi                  ## imm = 0x4064D0
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220116, %esi                  ## imm = 0x4064D4
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220120, %esi                  ## imm = 0x4064D8
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220124, %esi                  ## imm = 0x4064DC
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220128, %esi                  ## imm = 0x4064E0
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220132, %esi                  ## imm = 0x4064E4
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220136, %esi                  ## imm = 0x4064E8
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4220140, %esi                  ## imm = 0x4064EC
	xorl	%edx, %edx
	callq	_nvkm_wr32
	movl	(%r13), %edx
	shll	$8, %edx
	orl	4(%r13), %edx
	movq	%r15, %rdi
	movl	$4217600, %esi                  ## imm = 0x405B00
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$4260104, %esi                  ## imm = 0x410108
	callq	_nvkm_rd32
	orl	$-2147483648, %eax              ## imm = 0x80000000
	movq	%r15, %rdi
	movl	$4229384, %esi                  ## imm = 0x408908
	movl	%eax, %edx
	callq	_nvkm_wr32
	movl	4(%r13), %r8d
	testl	%r8d, %r8d
	jle	LBB0_8
## %bb.1:
	movq	8(%r13), %rsi
	cmpl	$8, %r8d
	jae	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	movl	%r8d, %edi
	andl	$-8, %edi
	leaq	(,%r8,4), %rax
	andq	$-32, %rax
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [0,1,2,3]
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [1065353216,1065353216,1065353216,1065353216]
	pcmpeqd	%xmm10, %xmm10
	movdqa	LCPI0_2(%rip), %xmm8            ## xmm8 = [16,16,16,16]
	movdqa	LCPI0_3(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rcx), %xmm7
	movdqu	16(%rsi,%rcx), %xmm5
	pslld	$23, %xmm7
	paddd	%xmm2, %xmm7
	cvttps2dq	%xmm7, %xmm7
	pxor	%xmm6, %xmm6
	psubd	%xmm7, %xmm6
	pslld	$23, %xmm5
	paddd	%xmm2, %xmm5
	cvttps2dq	%xmm5, %xmm5
	pxor	%xmm7, %xmm7
	psubd	%xmm5, %xmm7
	pxor	%xmm10, %xmm6
	pxor	%xmm10, %xmm7
	movdqa	%xmm4, %xmm5
	pslld	$2, %xmm5
	paddd	%xmm8, %xmm5
	movdqa	%xmm4, %xmm1
	pslld	$25, %xmm1
	paddd	%xmm2, %xmm1
	cvttps2dq	%xmm1, %xmm1
	pmulld	%xmm6, %xmm1
	por	%xmm1, %xmm0
	pslld	$23, %xmm5
	paddd	%xmm2, %xmm5
	cvttps2dq	%xmm5, %xmm1
	pmulld	%xmm7, %xmm1
	por	%xmm1, %xmm3
	paddd	%xmm9, %xmm4
	addq	$32, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_4
## %bb.5:
	por	%xmm0, %xmm3
	pshufd	$238, %xmm3, %xmm0              ## xmm0 = xmm3[2,3,2,3]
	por	%xmm3, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpq	%r8, %rdi
	je	LBB0_8
LBB0_6:
	leal	(,%rdi,4), %eax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi,%rdi,4), %ecx
	movl	$-1, %edx
	shll	%cl, %edx
	notl	%edx
	movl	%eax, %ecx
	shll	%cl, %edx
	orl	%edx, %ebx
	incq	%rdi
	addl	$4, %eax
	cmpq	%rdi, %r8
	jne	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	movl	$4211140, %esi                  ## imm = 0x4041C4
	movl	%ebx, %edx
	callq	_nvkm_wr32
	movq	%r13, %rdi
	callq	_gm200_grctx_generate_smid_config
	movq	%r13, %rdi
	callq	_gf100_gr_wait_idle
	movq	%r15, %rdi
	movl	$4211028, %esi                  ## imm = 0x404154
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_nvkm_wr32
	movq	%r13, %rdi
	callq	_gf100_gr_wait_idle
	movl	20(%r13), %esi
	movq	%r13, %rdi
	callq	_gf100_gr_mthd
	movq	%r13, %rdi
	callq	_gf100_gr_wait_idle
	movl	16(%r13), %esi
	movq	%r13, %rdi
	callq	_gf100_gr_icmd
	movq	%r14, %rdi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	*8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gm20b_grctx_generate_main
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function gm20b_grctx_generate_main
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_gm20b_grctx_generate_main:             ; @gm20b_grctx_generate_main
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	w24, #16724
	movk	w24, #64, lsl #16
	ldp	x8, x21, [x0, #32]
	ldr	x23, [x8]
	ldr	w1, [x0, #24]
	bl	_gf100_gr_mmio
	mov	x0, x20
	bl	_gf100_gr_wait_idle
	mov	x0, x21
	mov	w1, #16724
	movk	w1, #64, lsl #16
	mov	w2, #-1
	mov	w3, #0
	bl	_nvkm_mask
	mov	x22, x0
	ldr	x8, [x23, #24]
	mov	x0, x19
	blr	x8
	ldr	x8, [x23, #16]
	mov	x0, x20
	blr	x8
	mov	x0, x20
	bl	_gf100_grctx_generate_floorsweep
	mov	w25, #23296
	movk	w25, #64, lsl #16
	add	w1, w25, #2512
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2516
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2520
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2524
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2528
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2532
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2536
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	add	w1, w25, #2540
	mov	x0, x21
	mov	w2, #0
	bl	_nvkm_wr32
	ldp	w8, w9, [x20]
	orr	w2, w9, w8, lsl #8
	mov	x0, x21
	mov	w1, #23296
	movk	w1, #64, lsl #16
	bl	_nvkm_wr32
	mov	x0, x21
	mov	w1, #264
	movk	w1, #65, lsl #16
	bl	_nvkm_rd32
	orr	w2, w0, #0x80000000
	mov	x0, x21
	mov	w1, #35080
	movk	w1, #64, lsl #16
	bl	_nvkm_wr32
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x20, #8]
	cmp	w8, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x10, #0
	mov	w2, #0
	b	LBB0_7
LBB0_3:
	mov	w2, #0
	b	LBB0_9
LBB0_4:
	and	x10, x8, #0xfffffff0
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0xffffffffffffffff
Lloh0:
	adrp	x11, lCPI0_0@PAGE
Lloh1:
	ldr	q2, [x11, lCPI0_0@PAGEOFF]
	add	x11, x9, #32
	movi.4s	v3, #16
	movi.4s	v4, #32
	movi.4s	v5, #48
	mov	x12, x10
	movi.2d	v6, #0000000000000000
	movi.2d	v7, #0000000000000000
	movi.2d	v16, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q17, q18, [x11, #-32]
	ldp	q19, q20, [x11], #64
	ushl.4s	v17, v1, v17
	ushl.4s	v18, v1, v18
	ushl.4s	v19, v1, v19
	ushl.4s	v20, v1, v20
	mvn.16b	v17, v17
	mvn.16b	v18, v18
	mvn.16b	v19, v19
	mvn.16b	v20, v20
	shl.4s	v21, v2, #2
	add.4s	v22, v21, v3
	add.4s	v23, v21, v4
	add.4s	v24, v21, v5
	ushl.4s	v17, v17, v21
	ushl.4s	v18, v18, v22
	ushl.4s	v19, v19, v23
	ushl.4s	v20, v20, v24
	orr.16b	v0, v17, v0
	orr.16b	v6, v18, v6
	orr.16b	v7, v19, v7
	orr.16b	v16, v20, v16
	add.4s	v2, v2, v3
	subs	x12, x12, #16
	b.ne	LBB0_5
; %bb.6:
	orr.16b	v0, v6, v0
	orr.16b	v0, v7, v0
	orr.16b	v0, v16, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w11, s0
	mov.s	w12, v0[1]
	orr	w2, w11, w12
	cmp	x10, x8
	b.eq	LBB0_9
LBB0_7:
	lsl	w11, w10, #2
	sub	x8, x8, x10
	mov	w12, #-1
	add	x9, x9, x10, lsl #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #4
	lsl	w10, w12, w10
	mvn	w10, w10
	lsl	w10, w10, w11
	orr	w2, w10, w2
	add	w11, w11, #4
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
	add	w1, w24, #112
	mov	x0, x21
	bl	_nvkm_wr32
	mov	x0, x20
	bl	_gm200_grctx_generate_smid_config
	mov	x0, x20
	bl	_gf100_gr_wait_idle
	mov	x0, x21
	mov	w1, #16724
	movk	w1, #64, lsl #16
	mov	x2, x22
	bl	_nvkm_wr32
	mov	x0, x20
	bl	_gf100_gr_wait_idle
	ldr	w1, [x20, #20]
	mov	x0, x20
	bl	_gf100_gr_mthd
	mov	x0, x20
	bl	_gf100_gr_wait_idle
	ldr	w1, [x20, #16]
	mov	x0, x20
	bl	_gf100_gr_icmd
	ldr	x8, [x23, #8]
	mov	x0, x19
	blr	x8
	ldr	x1, [x23]
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gm20b_grctx_generate_main
.subsections_via_symbols
