	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk20a_gr_aiv_to_init           ## -- Begin function gk20a_gr_aiv_to_init
	.p2align	4, 0x90
_gk20a_gr_aiv_to_init:                  ## @gk20a_gr_aiv_to_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	leaq	-40(%rbp), %rdx
	callq	_gf100_gr_ctor_fw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	-40(%rbp), %r15d
	movl	%r15d, %ebx
	sarl	$3, %ebx
	movl	%ebx, %edi
	shll	$4, %edi
	addl	$32, %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rcx
	addq	$16, %rcx
	movq	%rcx, (%rax)
	cmpl	$8, %r15d
	jl	LBB0_6
## %bb.4:
	cmpl	$2, %ebx
	movl	$1, %ecx
	cmovgel	%ebx, %ecx
	movq	-32(%rbp), %rdx
	shlq	$3, %rcx
	xorl	%esi, %esi
	movabsq	$4294967297, %rdi               ## imm = 0x100000001
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rdx,%rsi), %ebx
	movl	%ebx, 28(%rax,%rsi,2)
	movl	(%rdx,%rsi), %ebx
	movl	%ebx, 24(%rax,%rsi,2)
	movq	%rdi, 16(%rax,%rsi,2)
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_5
LBB0_6:
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	leaq	-40(%rbp), %rdi
	callq	_gf100_gr_dtor_fw
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk20a_gr_aiv_to_init           ; -- Begin function gk20a_gr_aiv_to_init
	.p2align	2
_gk20a_gr_aiv_to_init:                  ; @gk20a_gr_aiv_to_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x2, sp
	bl	_gf100_gr_ctor_fw
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.1:
	ldr	w21, [sp]
	asr	w20, w21, #3
	lsl	w8, w20, #4
	add	w0, w8, #32
	bl	_vzalloc
	cbz	x0, LBB0_5
; %bb.2:
	add	x8, x0, #16
	str	x8, [x0]
	cmp	w21, #8
	b.lt	LBB0_11
; %bb.3:
	ldr	x9, [sp, #8]
	cmp	w20, #1
	csinc	w8, w20, wzr, gt
	cmp	w8, #8
	b.hs	LBB0_6
; %bb.4:
	mov	x10, #0
	b	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_6:
	and	x10, x8, #0x7ffffff8
	add	x11, x9, #32
	add	x12, x0, #80
	movi.4s	v0, #1
	mov	x13, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	x14, x11, #32
	ld2.4s	{ v6, v7 }, [x14]
	ld2.4s	{ v2, v3 }, [x11]
	sub	x14, x12, #64
	mov.16b	v1, v0
	mov.16b	v4, v0
	mov.16b	v5, v0
	st4.4s	{ v4, v5, v6, v7 }, [x14]
	st4.4s	{ v0, v1, v2, v3 }, [x12]
	add	x11, x11, #64
	add	x12, x12, #128
	subs	x13, x13, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x8
	b.eq	LBB0_11
LBB0_9:
	add	x9, x9, x10, lsl #3
	add	x11, x0, x10, lsl #4
	add	x11, x11, #24
	sub	x8, x8, x10
	movi.2s	v0, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x9], #8
	stp	d0, d1, [x11, #-8]
	add	x11, x11, #16
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	mov	w20, #0
	str	x0, [x19]
LBB0_12:
	mov	x0, sp
	bl	_gf100_gr_dtor_fw
LBB0_13:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
