	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_disp_pioc_init
_nv50_disp_pioc_init:                   ## @nv50_disp_pioc_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %r14
	callq	_nv50_disp_chan_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	%r14d, %r12d
	shll	$4, %r12d
	addl	$6357504, %r12d                 ## imm = 0x610200
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$8192, %edx                     ## imm = 0x2000
	callq	_nv_wr32
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_nv_wait
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	$196608, %edx                   ## imm = 0x30000
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_nv_wait
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rbx
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rbx
LBB0_5:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_nv_rd32
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_nv_error
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout0: 0x%08x\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"timeout1: 0x%08x\n"

	.no_dead_strip	_nv50_disp_pioc_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_pioc_init
_nv50_disp_pioc_init:                   ; @nv50_disp_pioc_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]
	bl	_nv50_disp_chan_init
	cbnz	w0, LBB0_7
; %bb.1:
	mov	w8, #512
	movk	w8, #97, lsl #16
	add	w21, w8, w20, lsl #4
	mov	x0, x20
	mov	x1, x21
	mov	w2, #8192
	bl	_nv_wr32
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_nv_wait
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_nv_wr32
	mov	x0, x20
	mov	x1, x21
	mov	w2, #196608
	mov	w3, #65536
	bl	_nv_wait
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x20
	mov	x1, x21
	bl	_nv_rd32
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_nv_error
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout0: 0x%08x\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"timeout1: 0x%08x\n"

	.no_dead_strip	_nv50_disp_pioc_init
.subsections_via_symbols
