	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_gpuobj_ctor
_nvkm_gpuobj_ctor:                      ## @nvkm_gpuobj_ctor
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%ecx, %ebx
	movl	%edx, %r9d
	movq	%rsi, %r12
	testq	%r8, %r8
	je	LBB0_10
## %bb.1:
	movq	%r8, %r15
	leaq	8(%r8), %r13
	testl	%r9d, %r9d
	js	LBB0_3
## %bb.2:
	movl	%r9d, %edi
	movl	$1, %esi
	callq	_max
	leaq	32(%r14), %rcx
	movq	%rcx, (%rsp)
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	movq	%r12, %r8
	movl	%eax, %r9d
	callq	_nvkm_mm_head
	testl	%eax, %eax
	jne	LBB0_13
	jmp	LBB0_5
LBB0_10:
	movq	_NVKM_MEM_TARGET_INST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r9d, %ecx
	negl	%ecx
	cmovsl	%r9d, %ecx
	leaq	12(%r14), %r9
	movq	%r12, %rdx
	movl	%ebx, %r8d
	callq	_nvkm_memory_new
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	_nvkm_gpuobj_heap@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movl	12(%r14), %edi
	callq	_nvkm_memory_addr
	movq	%rax, 16(%r14)
	movl	12(%r14), %edi
	callq	_nvkm_memory_size
	movq	%rax, %rcx
	movq	%rax, (%r14)
	jmp	LBB0_12
LBB0_3:
	negl	%r9d
	leaq	32(%r14), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	movq	%r12, %r8
	callq	_nvkm_mm_tail
	testl	%eax, %eax
	je	LBB0_5
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, 40(%r14)
	movq	_nvkm_gpuobj_func@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movq	32(%r14), %rax
	movq	8(%rax), %rcx
	addq	16(%r15), %rcx
	movq	%rcx, 16(%r14)
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.6:
	movq	%r14, %rdi
	callq	_nvkm_kmap
	cmpq	$0, (%r14)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_nvkm_wo32
	addq	$4, %rbx
	cmpq	(%r14), %rbx
	jl	LBB0_8
LBB0_9:
	movq	%r14, %rdi
	callq	_nvkm_done
	movq	(%r14), %rcx
LBB0_12:
	addq	$8, %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_mm_init                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nvkm_gpuobj_func,4,2           ## @nvkm_gpuobj_func
	.comm	_NVKM_MEM_TARGET_INST,4,2       ## @NVKM_MEM_TARGET_INST
	.comm	_nvkm_gpuobj_heap,4,2           ## @nvkm_gpuobj_heap
	.no_dead_strip	_nvkm_gpuobj_ctor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_gpuobj_ctor
_nvkm_gpuobj_ctor:                      ; @nvkm_gpuobj_ctor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x5
	mov	x20, x3
	mov	x22, x1
	cbz	x4, LBB0_3
; %bb.1:
	mov	x21, x4
	add	x23, x4, #8
	tbnz	w2, #31, LBB0_5
; %bb.2:
	mov	x0, x2
	mov	w1, #1
	bl	_max
	mov	x5, x0
	add	x6, x19, #32
	mov	x0, x23
	mov	w1, #0
	mov	w2, #1
	mov	x3, x22
	mov	x4, x22
	bl	_nvkm_mm_head
	cbnz	w0, LBB0_6
	b	LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _NVKM_MEM_TARGET_INST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVKM_MEM_TARGET_INST@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cmp	w2, #0
	cneg	w3, w2, mi
	add	x5, x19, #12
	mov	x2, x22
	mov	x4, x20
	bl	_nvkm_memory_new
	cbnz	w0, LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _nvkm_gpuobj_heap@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nvkm_gpuobj_heap@GOTPAGEOFF]
	str	x8, [x19, #24]
	ldr	w0, [x19, #12]
	bl	_nvkm_memory_addr
	str	x0, [x19, #16]
	ldr	w0, [x19, #12]
	bl	_nvkm_memory_size
	mov	x3, x0
	str	x0, [x19]
	b	LBB0_12
LBB0_5:
	neg	w5, w2
	add	x6, x19, #32
	mov	x0, x23
	mov	w1, #0
	mov	w2, #1
	mov	x3, x22
	mov	x4, x22
	bl	_nvkm_mm_tail
	cbz	w0, LBB0_7
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	str	x21, [x19, #40]
Lloh5:
	adrp	x8, _nvkm_gpuobj_func@GOTPAGE
Lloh6:
	ldr	x8, [x8, _nvkm_gpuobj_func@GOTPAGEOFF]
	ldr	x9, [x21, #16]
	ldr	x10, [x19, #32]
	ldp	x3, x11, [x10]
	add	x9, x11, x9
	stp	x9, x8, [x19, #16]
	str	x3, [x19]
	cbz	w20, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_nvkm_kmap
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_nvkm_wo32
	add	x20, x20, #4
	ldr	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_11:
	mov	x0, x19
	bl	_nvkm_done
	ldr	x3, [x19]
LBB0_12:
	add	x0, x19, #8
	mov	w1, #0
	mov	w2, #0
	mov	w4, #1
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_nvkm_mm_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_nvkm_gpuobj_func,4,2           ; @nvkm_gpuobj_func
	.comm	_NVKM_MEM_TARGET_INST,4,2       ; @NVKM_MEM_TARGET_INST
	.comm	_nvkm_gpuobj_heap,4,2           ; @nvkm_gpuobj_heap
	.no_dead_strip	_nvkm_gpuobj_ctor
.subsections_via_symbols
