	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_disp_dmac_init
_nv50_disp_dmac_init:                   ## @nv50_disp_dmac_init
	.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	%rdi, %r14
	movq	(%rdi), %r15
	addq	$4, %rdi
	callq	_nv50_disp_chan_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r15, %r13
	shrq	$32, %r13
	movl	$65537, %edx                    ## imm = 0x10001
	movl	%r13d, %ecx
	shll	%cl, %edx
	movq	%r15, %rdi
	movl	$6357032, %esi                  ## imm = 0x610028
	movl	%edx, %ecx
	callq	_nv_mask
	movl	%r13d, %r12d
	shll	$4, %r12d
	leal	6357508(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_nv_wr32
	leal	6357512(%r12), %esi
	movq	%r15, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_nv_wr32
	leal	6357516(%r12), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_nv_wr32
	addl	$6357504, %r12d                 ## imm = 0x610200
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$16, %edx
	movl	$16, %ecx
	callq	_nv_mask
	shll	$12, %r13d
	addl	$6553600, %r13d                 ## imm = 0x640000
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_nv_wr32
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$19, %edx
	callq	_nv_wr32
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$-2147483648, %edx              ## imm = 0x80000000
	xorl	%ecx, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_nv_rd32
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_nv_error
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init timeout, 0x%08x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_nv50_disp_dmac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_disp_dmac_init
_nv50_disp_dmac_init:                   ; @nv50_disp_dmac_init
	.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, x0
	ldr	x20, [x0], #4
	bl	_nv50_disp_chan_init
	cbnz	w0, LBB0_3
; %bb.1:
	lsr	x22, x20, #32
	mov	w8, #65537
	lsl	w2, w8, w22
	mov	w21, #40
	movk	w21, #97, lsl #16
	mov	x0, x20
	mov	w1, #40
	movk	w1, #97, lsl #16
	mov	x3, x2
	bl	_nv_mask
	add	w21, w21, w22, lsl #4
	add	w1, w21, #476
	ldr	w2, [x19]
	mov	x0, x20
	bl	_nv_wr32
	add	w1, w21, #480
	mov	x0, x20
	mov	w2, #65536
	bl	_nv_wr32
	add	w1, w21, #484
	mov	x0, x20
	mov	x2, x22
	bl	_nv_wr32
	add	w21, w21, #472
	mov	x0, x20
	mov	x1, x21
	mov	w2, #16
	mov	w3, #16
	bl	_nv_mask
	lsl	w8, w22, #12
	add	w1, w8, #1600, lsl #12          ; =6553600
	mov	x0, x20
	mov	w2, #0
	bl	_nv_wr32
	mov	x0, x20
	mov	x1, x21
	mov	w2, #19
	bl	_nv_wr32
	mov	x0, x20
	mov	x1, x21
	mov	w2, #-2147483648
	mov	w3, #0
	bl	_nv_wait
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_nv_rd32
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init timeout, 0x%08x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_nv50_disp_dmac_init
.subsections_via_symbols
