	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk20a_gr_av_to_method          ## -- Begin function gk20a_gr_av_to_method
	.p2align	4, 0x90
_gk20a_gr_av_to_method:                 ## @gk20a_gr_av_to_method
	.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_12
## %bb.1:
	movl	-40(%rbp), %r15d
	movl	%r15d, %ebx
	sarl	$3, %ebx
	leal	(%rbx,%rbx,2), %eax
	leal	280(,%rax,8), %edi
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	cmpl	$8, %r15d
	jl	LBB0_10
## %bb.5:
	movq	%rax, %rcx
	addq	$256, %rcx                      ## imm = 0x100
	movq	-32(%rbp), %r10
	cmpl	$2, %ebx
	movl	$1, %r9d
	cmovgel	%ebx, %r9d
	xorl	%edi, %edi
	movabsq	$4294967297, %r8                ## imm = 0x100000001
	xorl	%r15d, %r15d
	xorl	%r11d, %r11d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	shrq	$14, %rdx
	andl	$-4, %edx
	movq	%rdx, 16(%rcx)
	movl	4(%r10,%rdi,8), %edx
	movl	%edx, 8(%rcx)
	movq	%r8, (%rcx)
	incq	%rdi
	addq	$24, %rcx
	cmpq	%rdi, %r9
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r10,%rdi,8), %edx
	movzwl	%dx, %esi
	cmpq	%rsi, %r11
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rbx
	shlq	$4, %rbx
	movq	%rcx, 8(%rax,%rbx)
	movq	%rsi, (%rax,%rbx)
	cmpq	$15, %r15
	jge	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	movq	%rsi, %r11
	jmp	LBB0_9
LBB0_10:
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_13:
	movq	%rax, %rdi
	callq	_vfree
	movq	_ENOSPC@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	leaq	-40(%rbp), %rdi
	callq	_gf100_gr_dtor_fw
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENOSPC,4,2                     ## @ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk20a_gr_av_to_method          ; -- Begin function gk20a_gr_av_to_method
	.p2align	2
_gk20a_gr_av_to_method:                 ; @gk20a_gr_av_to_method
	.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
	mov	w8, #24
	mul	w8, w20, w8
	add	w0, w8, #280
	bl	_vzalloc
	cbz	x0, LBB0_9
; %bb.2:
	cmp	w21, #8
	b.lt	LBB0_8
; %bb.3:
	mov	x8, #0
	mov	x9, #0
	mov	x12, #0
	ldr	x10, [sp, #8]
	cmp	w20, #1
	csinc	w11, w20, wzr, gt
	add	x10, x10, #4
	mov	w13, #24
	umull	x11, w11, w13
	movi.2s	v0, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	lsr	x14, x14, #14
	and	x14, x14, #0x3fffc
	str	x14, [x13, #272]
	ldr	w14, [x10], #8
	str	w14, [x13, #264]
	str	d0, [x13, #256]
	add	x8, x8, #24
	cmp	x11, x8
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x13, x0, x8
	ldur	w14, [x10, #-4]
	and	x15, x14, #0xffff
	cmp	x12, x15
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x12, x13, #256
	add	x16, x0, x9, lsl #4
	stp	x15, x12, [x16]
	cmp	x9, #15
	b.ge	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	mov	x12, x15
	b	LBB0_4
LBB0_8:
	mov	w20, #0
	str	x0, [x19]
	b	LBB0_12
LBB0_9:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
	bl	_vfree
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w20, w8
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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENOSPC,4,2                     ; @ENOSPC
.subsections_via_symbols
