	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_disp_dmac_create_         ## -- Begin function nv50_disp_dmac_create_
	.p2align	4, 0x90
_nv50_disp_dmac_create_:                ## @nv50_disp_dmac_create_
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdi, %rbx
	movq	16(%rbp), %r15
	movl	%r8d, %ecx
	movl	%r9d, %r8d
	movq	%r15, %r9
	callq	_nv50_disp_chan_create_
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	(%r15), %r15
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_nouveau_handle_ref
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rdi
	callq	_nv_mclass
	cmpl	$61, %eax
	je	LBB0_5
## %bb.4:
	cmpl	$2, %eax
	jne	LBB0_11
LBB0_5:
	movq	8(%r15), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	subl	%eax, %edx
	cmpl	$4095, %edx                     ## imm = 0xFFF
	jne	LBB0_11
## %bb.6:
	movl	8(%rcx), %ecx
	cmpl	$129, %ecx
	je	LBB0_10
## %bb.7:
	cmpl	$128, %ecx
	jne	LBB0_11
## %bb.8:
	sarl	$8, %eax
	jmp	LBB0_9
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_2:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_12:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	sarl	$8, %eax
	orl	$3, %eax
LBB0_9:
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_disp_dmac_create_         ; -- Begin function nv50_disp_dmac_create_
	.p2align	2
_nv50_disp_dmac_create_:                ; @nv50_disp_dmac_create_
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x6
	mov	x19, x3
	mov	x21, x0
	mov	x3, x4
	mov	x4, x5
	mov	x5, x6
	bl	_nv50_disp_chan_create_
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	x20, [x20]
	mov	x0, x21
	mov	x1, x19
	bl	_nouveau_handle_ref
	str	x0, [x20, #8]
	cbz	x0, LBB0_9
; %bb.2:
	bl	_nv_mclass
	cmp	w0, #61
	b.eq	LBB0_4
; %bb.3:
	cmp	w0, #2
	b.ne	LBB0_8
LBB0_4:
	ldr	x9, [x20, #8]
	ldp	w10, w8, [x9]
	sub	w10, w10, w8
	cmp	w10, #4095
	b.ne	LBB0_8
; %bb.5:
	ldr	w9, [x9, #8]
	cmp	w9, #129
	b.eq	LBB0_12
; %bb.6:
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.7:
	mov	w0, #0
	asr	w8, w8, #8
	str	w8, [x20]
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w0, #0
	asr	w8, w8, #8
	orr	w8, w8, #0x3
	str	w8, [x20]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
