	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_disp_dmac_new_            ## -- Begin function nv50_disp_dmac_new_
	.p2align	4, 0x90
_nv50_disp_dmac_new_:                   ## @nv50_disp_dmac_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r9d
	movq	24(%rbp), %rbx
	movq	16(%rbp), %rax
	movq	(%rax), %r12
	movl	%ecx, %r8d
	pushq	%rbx
	pushq	%rax
	callq	_nv50_disp_chan_new_
	addq	$16, %rsp
	movl	%eax, %r13d
	movq	(%rbx), %rdi
	callq	_nv50_disp_chan
	testl	%r13d, %r13d
	je	LBB0_1
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_nvkm_umem_search
	movl	%eax, 4(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	4(%r15), %edi
	testq	%rax, %rax
	je	LBB0_2
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	callq	_nvkm_memory_size
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jle	LBB0_3
## %bb.4:
	movl	4(%r15), %edi
	callq	_nvkm_memory_target
                                        ## kill: def $eax killed $eax def $rax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_3
## %bb.5:
	addl	$-127, %eax
	movl	%eax, (%r15)
	movl	4(%r15), %edi
	callq	_nvkm_memory_addr
	sarl	$8, %eax
	orl	%eax, (%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.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_new_            ; -- Begin function nv50_disp_dmac_new_
	.p2align	2
_nv50_disp_dmac_new_:                   ; @nv50_disp_dmac_new_
	.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	x19, x7
	mov	x20, x5
	mov	x5, x4
	ldr	x22, [x6]
	mov	x4, x3
	bl	_nv50_disp_chan_new_
	mov	x21, x0
	ldr	x0, [x19]
	bl	_nv50_disp_chan
	cbz	w21, LBB0_2
LBB0_1:
	mov	x0, x21
	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_2:
	mov	x19, x0
	mov	x0, x22
	mov	x1, x20
	bl	_nvkm_umem_search
	str	w0, [x19, #4]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x19, #4]
	cbz	x8, LBB0_4
; %bb.3:
	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
	b	_PTR_ERR
LBB0_4:
	bl	_nvkm_memory_size
	cmp	w0, #4095
	b.le	LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
	bl	_nvkm_memory_target
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_7
; %bb.6:
	sub	w8, w0, #127
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_nvkm_memory_addr
	mov	w21, #0
	ldr	w8, [x19]
	orr	w8, w8, w0, asr #8
	str	w8, [x19]
	b	LBB0_1
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
