	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_ramht_new                 ## -- Begin function nvkm_ramht_new
	.p2align	4, 0x90
_nvkm_ramht_new:                        ## @nvkm_ramht_new
	.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	%r8, %r13
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %r12d
	sarl	$3, %r12d
	movl	%r12d, %edx
	callq	_struct_size
	movl	%eax, %edi
	callq	_vzalloc
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, 16(%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	%r12d, (%rbx)
	movl	%r12d, %edi
	callq	_order_base_2
	movl	%eax, 32(%rbx)
	movl	(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_4
## %bb.3:
	movq	24(%rbx), %rdi
	shlq	$2, %rdx
	movl	$255, %esi
	callq	_memset
LBB0_4:
	movq	8(%rbx), %r8
	movq	16(%rbx), %rdi
	addq	$4, %rbx
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	movq	%rbx, %r9
	callq	_nvkm_gpuobj_new
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvkm_ramht_del
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_data,4,2                       ## @data
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_ramht_new                 ; -- Begin function nvkm_ramht_new
	.p2align	2
_nvkm_ramht_new:                        ; @nvkm_ramht_new
	.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, x4
	mov	x23, x3
	mov	x20, x2
	mov	x21, x1
	mov	x25, x0
	asr	w24, w1, #3
Lloh0:
	adrp	x8, _data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _data@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x24
	bl	_struct_size
	bl	_vzalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, x0
	stp	x23, x25, [x0, #8]
	str	w24, [x0]
	mov	x0, x24
	bl	_order_base_2
	str	w0, [x22, #32]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	x0, [x22, #24]
	lsl	x2, x8, #2
	mov	w1, #255
	bl	_memset
LBB0_3:
	ldp	x4, x0, [x22, #8]
	add	x5, x22, #4
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	bl	_nvkm_gpuobj_new
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_nvkm_ramht_del
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_data,4,2                       ; @data
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
