	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf108_grctx_generate_attrib    ## -- Begin function gf108_grctx_generate_attrib
	.p2align	4, 0x90
_gf108_grctx_generate_attrib:           ## @gf108_grctx_generate_attrib
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %r12
	movq	16(%r12), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %esi
	addl	8(%rbx), %esi
	movl	4(%rbx), %r15d
	imull	(%r12), %esi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	shll	$5, %esi
	xorl	%r14d, %r14d
	movl	$4096, %edx                     ## imm = 0x1000
	xorl	%ecx, %ecx
	callq	_mmio_vram
	movl	%eax, %r8d
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$4294672, %esi                  ## imm = 0x418810
	movl	$-2147483648, %edx              ## imm = 0x80000000
	movl	$12, %ecx
	movl	%r8d, %ebx
	callq	_mmio_refn
	movq	%r13, %rdi
	movl	$4298824, %esi                  ## imm = 0x419848
	movl	$268435456, %edx                ## imm = 0x10000000
	movl	$12, %ecx
	movl	%ebx, %r8d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	callq	_mmio_refn
	shll	$16, %r15d
	movl	%r15d, %edx
	orl	%r12d, %edx
	movq	%r13, %rdi
	movl	$4216880, %esi                  ## imm = 0x405830
	callq	_mmio_wr32
	leal	3(%r12), %edx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %edx
	shll	$14, %edx
	orl	$65535, %edx                    ## imm = 0xFFFF
	movq	%r13, %rdi
	movl	$4220100, %esi                  ## imm = 0x4064C4
	callq	_mmio_wr32
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movl	4(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	imull	-64(%rbp), %esi                 ## 4-byte Folded Reload
	orl	$268435456, %r15d               ## imm = 0x10000000
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	shll	$16, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rcx
	xorl	%edi, %edi
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdi
	movslq	%eax, %rdx
	cmpq	%rdx, %rdi
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, (%rcx,%rdi,4)
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%ebx, %esi
	movl	$1280, %edx                     ## imm = 0x500
	callq	_TPC_UNIT
	movl	%eax, %r12d
	leal	32(%r12), %esi
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	leal	1(%r14), %edx
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	orl	%r13d, %edx
	movq	%r15, %rdi
	callq	_mmio_skip
	movl	%r14d, %edx
	orl	%r13d, %edx
	movq	%r15, %rdi
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	callq	_mmio_wr32
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	addl	8(%r13), %r14d
	addl	$68, %r12d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	-56(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_mmio_wr32
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	addl	12(%r13), %esi
	incl	%ebx
	movq	8(%r12), %rcx
	cmpl	(%rcx,%rdi,4), %ebx
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r12), %eax
	jmp	LBB0_6
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gf108_grctx_generate_attrib    ; -- Begin function gf108_grctx_generate_attrib
	.p2align	2
_gf108_grctx_generate_attrib:           ; @gf108_grctx_generate_attrib
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x26, [x0]
	ldr	x8, [x26, #16]
	ldr	x25, [x8]
	ldp	w21, w24, [x25]
	ldp	w8, w9, [x25, #8]
	add	w8, w9, w8
	ldr	w9, [x26]
	mul	w8, w8, w9
	lsl	w1, w8, #5
	mov	w2, #4096
	mov	w3, #0
	bl	_mmio_vram
	mov	x20, x0
	ldr	w22, [x25, #8]
	ldr	w23, [x26]
	mov	x0, x19
	mov	w1, #34832
	movk	w1, #65, lsl #16
	mov	w2, #-2147483648
	mov	w3, #12
	mov	x4, x20
	bl	_mmio_refn
	mov	x0, x19
	mov	w1, #38984
	movk	w1, #65, lsl #16
	mov	w2, #268435456
	mov	w3, #12
	mov	x4, x20
	bl	_mmio_refn
	lsl	w24, w24, #16
	orr	w2, w24, w21
	mov	w20, #22576
	movk	w20, #64, lsl #16
	mov	x0, x19
	mov	w1, #22576
	movk	w1, #64, lsl #16
	bl	_mmio_wr32
	add	w8, w21, #3
	cmp	w21, #0
	csel	w8, w8, w21, lt
	lsl	w8, w8, #14
	orr	w2, w8, #0xffff
	add	w1, w20, #3220
	mov	x0, x19
	bl	_mmio_wr32
	ldr	w8, [x26, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x11, x26
	mov	x12, #0
	mov	w26, #0
	mul	w27, w23, w22
	orr	w20, w24, #0x10000000
	ldr	x9, [x11, #8]
	lsl	w28, w21, #16
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	str	x11, [sp]                       ; 8-byte Folded Spill
	mov	w20, w20
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x12, x12, #1
	cmp	x12, w8, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w10, [x9, x12, lsl #2]
	cmp	w10, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x24, x12
	mov	x0, x24
	mov	x1, x21
	mov	w2, #1280
	bl	_TPC_UNIT
	mov	x22, x0
	add	w23, w0, #32
	add	w8, w26, #1
	orr	w2, w8, w20
	mov	x0, x19
	mov	x1, x23
	bl	_mmio_skip
	orr	w2, w26, w20
	mov	x0, x19
	mov	x1, x23
	bl	_mmio_wr32
	ldr	w8, [x25, #8]
	add	w26, w8, w26
	add	w1, w22, #68
	orr	w2, w27, w28
	mov	x0, x19
	bl	_mmio_wr32
	mov	x12, x24
	ldr	x11, [sp]                       ; 8-byte Folded Reload
	ldr	w8, [x25, #12]
	add	w27, w8, w27
	add	w21, w21, #1
	ldr	x9, [x11, #8]
	ldr	w8, [x9, x24, lsl #2]
	cmp	w21, w8
	b.lt	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x11, #4]
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
