	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_crtc_create               ## -- Begin function nv04_crtc_create
	.p2align	4, 0x90
_nv04_crtc_create:                      ## @nv04_crtc_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	$0, 24(%rax)
	movl	%r14d, (%rax)
	movq	_NV_DPMS_CLEARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_nv_crtc_save@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_nv_crtc_restore@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	leaq	8(%rbx), %r12
	movq	%r15, %rdi
	callq	_create_primary_plane
	movq	_nv04_crtc_funcs@GOTPCREL(%rip), %r8
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_drm_crtc_init_with_planes
	movq	_nv04_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_drm_crtc_helper_add
	movq	%r12, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_drm_mode_crtc_set_gamma_size
	movq	%r15, %rdi
	callq	_nouveau_drm
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	%rbx, %r15
	addq	$4, %r15
	movq	%r15, 16(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	%rax, %rdi
	movl	$16384, %esi                    ## imm = 0x4000
	movl	$256, %edx                      ## imm = 0x100
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nouveau_bo_new
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	(%r15), %edi
	movl	(%r12), %esi
	xorl	%edx, %edx
	callq	_nouveau_bo_pin
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %edi
	callq	_nouveau_bo_map
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	callq	_nouveau_bo_unpin
LBB0_6:
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_nouveau_bo_ref
LBB0_7:
	movq	%rbx, %rdi
	callq	_nv04_cursor_init
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NV_DPMS_CLEARED,4,2            ## @NV_DPMS_CLEARED
	.comm	_nv_crtc_save,4,2               ## @nv_crtc_save
	.comm	_nv_crtc_restore,4,2            ## @nv_crtc_restore
	.comm	_nv04_crtc_funcs,4,2            ## @nv04_crtc_funcs
	.comm	_nv04_crtc_helper_funcs,4,2     ## @nv04_crtc_helper_funcs
	.comm	_TTM_PL_FLAG_VRAM,4,2           ## @TTM_PL_FLAG_VRAM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv04_crtc_create               ; -- Begin function nv04_crtc_create
	.p2align	2
_nv04_crtc_create:                      ; @nv04_crtc_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	xzr, [x0, #24]
Lloh3:
	adrp	x8, _NV_DPMS_CLEARED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV_DPMS_CLEARED@GOTPAGEOFF]
	str	w21, [x0]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #20]
Lloh6:
	adrp	x8, _nv_crtc_save@GOTPAGE
Lloh7:
	ldr	x8, [x8, _nv_crtc_save@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _nv_crtc_restore@GOTPAGE
Lloh10:
	ldr	x9, [x9, _nv_crtc_restore@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #12]
	add	x21, x0, #8
	mov	x0, x20
	bl	_create_primary_plane
	mov	x2, x0
Lloh12:
	adrp	x4, _nv04_crtc_funcs@GOTPAGE
Lloh13:
	ldr	x4, [x4, _nv04_crtc_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	mov	x3, #0
	mov	x5, #0
	bl	_drm_crtc_init_with_planes
Lloh14:
	adrp	x1, _nv04_crtc_helper_funcs@GOTPAGE
Lloh15:
	ldr	x1, [x1, _nv04_crtc_helper_funcs@GOTPAGEOFF]
	mov	x0, x21
	bl	_drm_crtc_helper_add
	mov	x0, x21
	mov	w1, #256
	bl	_drm_mode_crtc_set_gamma_size
	mov	x0, x20
	bl	_nouveau_drm
Lloh16:
	adrp	x21, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh17:
	ldr	x21, [x21, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x20, x19, #4
	str	x20, [sp]
	mov	w1, #16384
	mov	w2, #256
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_nouveau_bo_new
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_nouveau_bo_pin
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20]
	bl	_nouveau_bo_map
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x20]
	bl	_nouveau_bo_unpin
LBB0_5:
	mov	x0, #0
	mov	x1, x20
	bl	_nouveau_bo_ref
LBB0_6:
	mov	x0, x19
	bl	_nv04_cursor_init
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NV_DPMS_CLEARED,4,2            ; @NV_DPMS_CLEARED
	.comm	_nv_crtc_save,4,2               ; @nv_crtc_save
	.comm	_nv_crtc_restore,4,2            ; @nv_crtc_restore
	.comm	_nv04_crtc_funcs,4,2            ; @nv04_crtc_funcs
	.comm	_nv04_crtc_helper_funcs,4,2     ; @nv04_crtc_helper_funcs
	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
.subsections_via_symbols
