	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvd0_dmaobj_bind
_nvd0_dmaobj_bind:                      ## @nvd0_dmaobj_bind
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	_NV_ENGCTX_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_nv_iclass
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_8
## %bb.1:
	movl	(%rbx), %edi
	callq	_nv_mclass
	addl	$-129, %eax
	cmpl	$6, %eax
	jae	LBB0_2
## %bb.3:
	movl	(%r15), %r13d
	movl	4(%r15), %eax
	movq	_NVD0_DMA_CONF0_ENABLE@GOTPCREL(%rip), %rcx
	testl	%r13d, (%rcx)
	je	LBB0_4
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_2
LBB0_6:
	movq	_NVD0_DMA_CONF0_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_NVD0_DMA_CONF0_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movl	$24, %edx
	movl	$32, %ecx
	xorl	%r8d, %r8d
	movq	%r14, %r9
	callq	_nouveau_gpuobj_new
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	%r13d, %eax
	shll	$20, %eax
	andl	%r13d, %r12d
	sarl	$4, %r12d
	orl	%eax, %r12d
	orl	$9, %r12d
	movq	(%r14), %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_nv_wo32
	movq	(%r14), %rdi
	movl	8(%r15), %edx
	sarl	$8, %edx
	movl	$4, %esi
	callq	_nv_wo32
	movq	(%r14), %rdi
	movl	12(%r15), %edx
	sarl	$8, %edx
	movl	$8, %esi
	callq	_nv_wo32
	movq	(%r14), %rdi
	movl	$12, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movq	(%r14), %rdi
	movl	$16, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	movq	(%r14), %rdi
	movl	$20, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_NV_MEM_TARGET_VM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	_NVD0_DMA_CONF0_TYPE_LINEAR@GOTPCREL(%rip), %rcx
	cmoveq	_NVD0_DMA_CONF0_TYPE_VM@GOTPCREL(%rip), %rcx
	movq	_NVD0_DMA_CONF0_PAGE_SP@GOTPCREL(%rip), %rdx
	cmoveq	_NVD0_DMA_CONF0_PAGE_LP@GOTPCREL(%rip), %rdx
	orl	(%rcx), %r13d
	movl	%r13d, (%r15)
	orl	(%rdx), %r13d
	movl	%r13d, (%r15)
	cmpl	$128, %eax
	je	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_ENGCTX_CLASS,4,2            ## @NV_ENGCTX_CLASS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVD0_DMA_CONF0_ENABLE,4,2      ## @NVD0_DMA_CONF0_ENABLE
	.comm	_NV_MEM_TARGET_VM,4,2           ## @NV_MEM_TARGET_VM
	.comm	_NVD0_DMA_CONF0_TYPE_VM,4,2     ## @NVD0_DMA_CONF0_TYPE_VM
	.comm	_NVD0_DMA_CONF0_PAGE_LP,4,2     ## @NVD0_DMA_CONF0_PAGE_LP
	.comm	_NVD0_DMA_CONF0_TYPE_LINEAR,4,2 ## @NVD0_DMA_CONF0_TYPE_LINEAR
	.comm	_NVD0_DMA_CONF0_PAGE_SP,4,2     ## @NVD0_DMA_CONF0_PAGE_SP
	.comm	_NVD0_DMA_CONF0_TYPE,4,2        ## @NVD0_DMA_CONF0_TYPE
	.comm	_NVD0_DMA_CONF0_PAGE,4,2        ## @NVD0_DMA_CONF0_PAGE
	.no_dead_strip	_nvd0_dmaobj_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvd0_dmaobj_bind
_nvd0_dmaobj_bind:                      ; @nvd0_dmaobj_bind
	.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, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _NV_ENGCTX_CLASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_ENGCTX_CLASS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_nv_iclass
	cbz	w0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
	ldr	w0, [x21]
	bl	_nv_mclass
	sub	w8, w0, #129
	cmp	w8, #6
	b.hs	LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _NVD0_DMA_CONF0_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVD0_DMA_CONF0_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldp	w22, w8, [x20]
	tst	w9, w22
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _NVD0_DMA_CONF0_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NVD0_DMA_CONF0_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
Lloh9:
	adrp	x8, _NVD0_DMA_CONF0_PAGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVD0_DMA_CONF0_PAGE@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
	mov	x0, x21
	mov	x1, x21
	mov	w2, #24
	mov	w3, #32
	mov	w4, #0
	mov	x5, x19
	bl	_nouveau_gpuobj_new
	cbnz	w0, LBB0_9
; %bb.6:
	and	w8, w23, w22
	lsl	w8, w8, #20
	and	w9, w24, w22
	orr	w8, w8, w9, asr #4
	mov	w9, #9
	orr	w2, w8, w9
	ldr	x0, [x19]
	mov	w1, #0
	bl	_nv_wo32
	ldr	x0, [x19]
	ldr	w8, [x20, #8]
	asr	w2, w8, #8
	mov	w1, #4
	bl	_nv_wo32
	ldr	x0, [x19]
	ldr	w8, [x20, #12]
	asr	w2, w8, #8
	mov	w1, #8
	bl	_nv_wo32
	ldr	x0, [x19]
	mov	w1, #12
	mov	w2, #0
	bl	_nv_wo32
	ldr	x0, [x19]
	mov	w1, #16
	mov	w2, #0
	bl	_nv_wo32
	ldr	x0, [x19]
	mov	w1, #20
	mov	w2, #0
	bl	_nv_wo32
	b	LBB0_1
LBB0_7:
Lloh12:
	adrp	x9, _NV_MEM_TARGET_VM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NV_MEM_TARGET_VM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _NVD0_DMA_CONF0_TYPE_VM@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NVD0_DMA_CONF0_TYPE_VM@GOTPAGEOFF]
Lloh17:
	adrp	x11, _NVD0_DMA_CONF0_TYPE_LINEAR@GOTPAGE
Lloh18:
	ldr	x11, [x11, _NVD0_DMA_CONF0_TYPE_LINEAR@GOTPAGEOFF]
	cmp	w8, w9
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	orr	w9, w9, w22
	str	w9, [x20]
Lloh19:
	adrp	x10, _NVD0_DMA_CONF0_PAGE_LP@GOTPAGE
Lloh20:
	ldr	x10, [x10, _NVD0_DMA_CONF0_PAGE_LP@GOTPAGEOFF]
Lloh21:
	adrp	x11, _NVD0_DMA_CONF0_PAGE_SP@GOTPAGE
Lloh22:
	ldr	x11, [x11, _NVD0_DMA_CONF0_PAGE_SP@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	orr	w22, w10, w9
	str	w22, [x20]
	cmp	w8, #128
	b.eq	LBB0_5
LBB0_8:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_ENGCTX_CLASS,4,2            ; @NV_ENGCTX_CLASS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVD0_DMA_CONF0_ENABLE,4,2      ; @NVD0_DMA_CONF0_ENABLE
	.comm	_NV_MEM_TARGET_VM,4,2           ; @NV_MEM_TARGET_VM
	.comm	_NVD0_DMA_CONF0_TYPE_VM,4,2     ; @NVD0_DMA_CONF0_TYPE_VM
	.comm	_NVD0_DMA_CONF0_PAGE_LP,4,2     ; @NVD0_DMA_CONF0_PAGE_LP
	.comm	_NVD0_DMA_CONF0_TYPE_LINEAR,4,2 ; @NVD0_DMA_CONF0_TYPE_LINEAR
	.comm	_NVD0_DMA_CONF0_PAGE_SP,4,2     ; @NVD0_DMA_CONF0_PAGE_SP
	.comm	_NVD0_DMA_CONF0_TYPE,4,2        ; @NVD0_DMA_CONF0_TYPE
	.comm	_NVD0_DMA_CONF0_PAGE,4,2        ; @NVD0_DMA_CONF0_PAGE
	.no_dead_strip	_nvd0_dmaobj_bind
.subsections_via_symbols
