	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_dmaobj_ctor
_nouveau_dmaobj_ctor:                   ## @nouveau_dmaobj_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$15, %r8d
	ja	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movq	%r9, %r14
	movq	%rcx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	-48(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_nouveau_object_create
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r14)
	testl	%ebx, %ebx
	je	LBB0_3
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r12), %eax
	movq	_NV_DMA_TARGET_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	addl	$-128, %ecx
	cmpl	$5, %ecx
	jae	LBB0_1
## %bb.4:
	movslq	%ecx, %rcx
	leaq	l_switch.table.nouveau_dmaobj_ctor(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %edx
	movq	-48(%rbp), %rcx
	movl	%edx, 16(%rcx)
	movq	_NV_DMA_ACCESS_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	addl	$-133, %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.5:
	cltq
	leaq	l_switch.table.nouveau_dmaobj_ctor.1(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rcx)
	movl	12(%r12), %eax
	movl	%eax, 8(%rcx)
	movl	8(%r12), %eax
	movl	%eax, 4(%rcx)
	movl	4(%r12), %eax
	movl	%eax, (%rcx)
	movq	%r13, %rdi
	callq	_nv_mclass
	xorl	%ebx, %ebx
	cmpl	$137, %eax
	je	LBB0_8
## %bb.6:
	movq	(%r14), %rsi
	movq	-48(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	callq	*(%r15)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_nouveau_object_ref
	movq	-56(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NV_DMA_TARGET_MASK,4,2         ## @NV_DMA_TARGET_MASK
	.comm	_NV_MEM_TARGET_VM,4,2           ## @NV_MEM_TARGET_VM
	.comm	_NV_MEM_TARGET_VRAM,4,2         ## @NV_MEM_TARGET_VRAM
	.comm	_NV_MEM_TARGET_PCI,4,2          ## @NV_MEM_TARGET_PCI
	.comm	_NV_MEM_TARGET_PCI_NOSNOOP,4,2  ## @NV_MEM_TARGET_PCI_NOSNOOP
	.comm	_NV_DMA_ACCESS_MASK,4,2         ## @NV_DMA_ACCESS_MASK
	.comm	_NV_MEM_ACCESS_VM,4,2           ## @NV_MEM_ACCESS_VM
	.comm	_NV_MEM_ACCESS_RO,4,2           ## @NV_MEM_ACCESS_RO
	.comm	_NV_MEM_ACCESS_WO,4,2           ## @NV_MEM_ACCESS_WO
	.comm	_NV_MEM_ACCESS_RW,4,2           ## @NV_MEM_ACCESS_RW
	.no_dead_strip	_nouveau_dmaobj_ctor
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.nouveau_dmaobj_ctor
l_switch.table.nouveau_dmaobj_ctor:
	.quad	_NV_MEM_TARGET_VRAM
	.quad	_NV_MEM_TARGET_VM
	.quad	_NV_MEM_TARGET_PCI_NOSNOOP
	.quad	_NV_MEM_TARGET_PCI
	.quad	_NV_MEM_TARGET_PCI_NOSNOOP

	.p2align	3                               ## @switch.table.nouveau_dmaobj_ctor.1
l_switch.table.nouveau_dmaobj_ctor.1:
	.quad	_NV_MEM_ACCESS_WO
	.quad	_NV_MEM_ACCESS_VM
	.quad	_NV_MEM_ACCESS_RW
	.quad	_NV_MEM_ACCESS_RO

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_dmaobj_ctor
_nouveau_dmaobj_ctor:                   ; @nouveau_dmaobj_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cmp	w4, #15
	b.hi	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_3
LBB0_2:
	mov	x19, x5
	mov	x22, x3
	mov	x20, x1
	mov	x21, x0
	add	x4, sp, #8
	mov	w3, #0
	bl	_nouveau_object_create
	mov	x23, x0
	ldr	x0, [sp, #8]
	bl	_nv_object
	str	x0, [x19]
	cbz	w23, LBB0_4
LBB0_3:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
LBB0_4:
	ldr	w9, [x22]
Lloh3:
	adrp	x8, _NV_DMA_TARGET_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV_DMA_TARGET_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w9
	sub	w8, w8, #128
	cmp	w8, #5
	b.hs	LBB0_1
; %bb.5:
Lloh6:
	adrp	x10, l_switch.table.nouveau_dmaobj_ctor@PAGE
Lloh7:
	add	x10, x10, l_switch.table.nouveau_dmaobj_ctor@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	w10, [x8]
	ldr	x8, [sp, #8]
	str	w10, [x8, #16]
Lloh8:
	adrp	x10, _NV_DMA_ACCESS_MASK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _NV_DMA_ACCESS_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	and	w9, w10, w9
	sub	w9, w9, #133
	cmp	w9, #4
	b.hs	LBB0_1
; %bb.6:
Lloh11:
	adrp	x10, l_switch.table.nouveau_dmaobj_ctor.1@PAGE
Lloh12:
	add	x10, x10, l_switch.table.nouveau_dmaobj_ctor.1@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x8, #12]
	ldr	w9, [x22, #12]
	str	w9, [x8, #8]
	ldur	d0, [x22, #4]
	str	d0, [x8]
	mov	x0, x21
	bl	_nv_mclass
	cmp	w0, #137
	b.ne	LBB0_8
; %bb.7:
	mov	w23, #0
	b	LBB0_3
LBB0_8:
	ldr	x8, [x20]
	ldr	x1, [x19]
	ldr	x2, [sp, #8]
	mov	x3, sp
	mov	x0, x20
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_3
; %bb.9:
	mov	x0, #0
	mov	x1, x19
	bl	_nouveau_object_ref
	ldr	x0, [sp]
	bl	_nv_object
	str	x0, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NV_DMA_TARGET_MASK,4,2         ; @NV_DMA_TARGET_MASK
	.comm	_NV_MEM_TARGET_VM,4,2           ; @NV_MEM_TARGET_VM
	.comm	_NV_MEM_TARGET_VRAM,4,2         ; @NV_MEM_TARGET_VRAM
	.comm	_NV_MEM_TARGET_PCI,4,2          ; @NV_MEM_TARGET_PCI
	.comm	_NV_MEM_TARGET_PCI_NOSNOOP,4,2  ; @NV_MEM_TARGET_PCI_NOSNOOP
	.comm	_NV_DMA_ACCESS_MASK,4,2         ; @NV_DMA_ACCESS_MASK
	.comm	_NV_MEM_ACCESS_VM,4,2           ; @NV_MEM_ACCESS_VM
	.comm	_NV_MEM_ACCESS_RO,4,2           ; @NV_MEM_ACCESS_RO
	.comm	_NV_MEM_ACCESS_WO,4,2           ; @NV_MEM_ACCESS_WO
	.comm	_NV_MEM_ACCESS_RW,4,2           ; @NV_MEM_ACCESS_RW
	.no_dead_strip	_nouveau_dmaobj_ctor
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.nouveau_dmaobj_ctor
l_switch.table.nouveau_dmaobj_ctor:
	.quad	_NV_MEM_TARGET_VRAM
	.quad	_NV_MEM_TARGET_VM
	.quad	_NV_MEM_TARGET_PCI_NOSNOOP
	.quad	_NV_MEM_TARGET_PCI
	.quad	_NV_MEM_TARGET_PCI_NOSNOOP

	.p2align	3                               ; @switch.table.nouveau_dmaobj_ctor.1
l_switch.table.nouveau_dmaobj_ctor.1:
	.quad	_NV_MEM_ACCESS_WO
	.quad	_NV_MEM_ACCESS_VM
	.quad	_NV_MEM_ACCESS_RW
	.quad	_NV_MEM_ACCESS_RO

.subsections_via_symbols
