	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_wndw_prepare_fb
_nv50_wndw_prepare_fb:                  ## @nv50_wndw_prepare_fb
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_nouveau_framebuffer
	movq	%rax, %r15
	movl	4(%rbx), %edi
	callq	_nouveau_drm
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nv50_wndw
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_nv50_wndw_atom
	movq	%rax, %r13
	movl	(%rbx), %edx
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_NV_ATOMIC
	cmpl	$0, 12(%r13)
	je	LBB0_11
## %bb.1:
	movq	(%r15), %rdi
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_nouveau_bo_pin
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_nv50_wndw_ctxdma_new
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%r15), %rdi
	callq	_nouveau_bo_unpin
	movq	%r12, %rdi
	jmp	LBB0_9
LBB0_5:
	movl	(%r12), %eax
	movq	24(%r13), %rcx
	movl	%eax, (%rcx)
LBB0_6:
	movq	(%r15), %rax
	movl	4(%rax), %edi
	callq	_dma_resv_get_excl_rcu
	movl	%eax, 8(%r13)
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	16(%r13), %rcx
	movl	%eax, (%rcx)
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movl	(%r13), %esi
	movl	4(%r13), %edi
	callq	_nv50_head_atom_get
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%r15, %rdi
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_10:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	*(%rax)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	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	"%s prepare: %p\n"

	.comm	_TTM_PL_FLAG_VRAM,4,2           ## @TTM_PL_FLAG_VRAM
	.no_dead_strip	_nv50_wndw_prepare_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_wndw_prepare_fb
_nv50_wndw_prepare_fb:                  ; @nv50_wndw_prepare_fb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	mov	x23, x0
	ldr	w0, [x1]
	bl	_nouveau_framebuffer
	mov	x21, x0
	ldr	w0, [x23, #4]
	bl	_nouveau_drm
	mov	x24, x0
	mov	x0, x23
	bl	_nv50_wndw
	mov	x19, x0
	mov	x0, x22
	bl	_nv50_wndw_atom
	mov	x20, x0
	ldr	w2, [x23]
	ldr	w3, [x22]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	bl	_NV_ATOMIC
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_11
; %bb.1:
	ldr	x0, [x21]
Lloh2:
	adrp	x8, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_nouveau_bo_pin
	cbnz	w0, LBB0_12
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_nv50_wndw_ctxdma_new
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x21]
	bl	_nouveau_bo_unpin
	mov	x0, x22
	b	LBB0_9
LBB0_5:
	ldr	w8, [x22]
	ldr	x9, [x20, #24]
	str	w8, [x9]
LBB0_6:
	ldr	x8, [x21]
	ldr	w0, [x8, #4]
	bl	_dma_resv_get_excl_rcu
	str	w0, [x20, #8]
	ldr	x8, [x21]
	ldr	w8, [x8]
	ldr	x9, [x20, #16]
	str	w8, [x9]
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.7:
	ldp	w1, w0, [x20]
	bl	_nv50_head_atom_get
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x21
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_10:
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	blr	x8
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s prepare: %p\n"

	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
	.no_dead_strip	_nv50_wndw_prepare_fb
.subsections_via_symbols
