	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function nv04_crtc_create
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
	.long	1024                            ## 0x400
LCPI0_2:
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
	.long	2048                            ## 0x800
LCPI0_3:
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
	.long	3072                            ## 0xc00
LCPI0_4:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_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	%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	%esi, %r12d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r13
	movq	%rax, %r14
	movq	16(%r13), %rax
	movq	24(%r13), %rcx
	movq	32(%r13), %rdx
	movq	%rcx, %rsi
	subq	%rax, %rsi
	cmpq	$32, %rsi
	jb	LBB0_7
## %bb.2:
	movq	%rdx, %rsi
	subq	%rax, %rsi
	cmpq	$32, %rsi
	jb	LBB0_7
## %bb.3:
	movq	%rdx, %rsi
	subq	%rcx, %rsi
	cmpq	$32, %rsi
	jb	LBB0_7
## %bb.4:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%esi, %esi
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [1024,1024,1024,1024]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [2048,2048,2048,2048]
	movdqa	LCPI0_3(%rip), %xmm3            ## xmm3 = [3072,3072,3072,3072]
	movdqa	LCPI0_4(%rip), %xmm4            ## xmm4 = [16,16,16,16]
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm5
	pslld	$8, %xmm5
	movdqa	%xmm5, %xmm6
	paddd	%xmm1, %xmm6
	movdqu	%xmm5, (%rax,%rsi,4)
	movdqu	%xmm6, 16(%rax,%rsi,4)
	movdqu	%xmm5, (%rcx,%rsi,4)
	movdqu	%xmm6, 16(%rcx,%rsi,4)
	movdqu	%xmm5, (%rdx,%rsi,4)
	movdqu	%xmm6, 16(%rdx,%rsi,4)
	movdqa	%xmm5, %xmm6
	paddd	%xmm2, %xmm6
	paddd	%xmm3, %xmm5
	movdqu	%xmm6, 32(%rax,%rsi,4)
	movdqu	%xmm5, 48(%rax,%rsi,4)
	movdqu	%xmm6, 32(%rcx,%rsi,4)
	movdqu	%xmm5, 48(%rcx,%rsi,4)
	movdqu	%xmm6, 32(%rdx,%rsi,4)
	movdqu	%xmm5, 48(%rdx,%rsi,4)
	addq	$16, %rsi
	paddd	%xmm4, %xmm0
	cmpq	$256, %rsi                      ## imm = 0x100
	jne	LBB0_5
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_7:
	movl	$256, %esi                      ## imm = 0x100
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	-256(%rsi), %ebx
	movl	%ebx, (%rax,%rdi,4)
	movl	%ebx, (%rcx,%rdi,4)
	movl	%ebx, (%rdx,%rdi,4)
	movl	%esi, 4(%rax,%rdi,4)
	movl	%esi, 4(%rcx,%rdi,4)
	movl	%esi, 4(%rdx,%rdi,4)
	addq	$2, %rdi
	addl	$512, %esi                      ## imm = 0x200
	cmpq	$256, %rdi                      ## imm = 0x100
	jne	LBB0_8
LBB0_9:
	movq	$0, 40(%r14)
	movl	%r12d, (%r14)
	movq	_NV_DPMS_CLEARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	leaq	8(%r13), %rbx
	movq	_nv04_crtc_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_crtc_init
	movq	_nv04_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_drm_crtc_helper_add
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_drm_mode_crtc_set_gamma_size
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	addq	$4, %r13
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	$16384, %esi                    ## imm = 0x4000
	movl	$256, %edx                      ## imm = 0x100
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r13
	pushq	$0
	callq	_nouveau_bo_new
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movl	(%r13), %edi
	movl	(%r12), %esi
	callq	_nouveau_bo_pin
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	(%r13), %edi
	callq	_nouveau_bo_map
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	(%r13), %edi
	callq	_nouveau_bo_unpin
LBB0_13:
	xorl	%edi, %edi
	movq	%r13, %rsi
	callq	_nouveau_bo_ref
LBB0_14:
	movq	%r14, %rdi
	callq	_nv04_cursor_init
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_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
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function nv04_crtc_create
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_nv04_crtc_create
	.p2align	2
_nv04_crtc_create:                      ; @nv04_crtc_create
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldp	x10, x8, [x0, #16]
	ldr	x9, [x0, #32]
	sub	x11, x8, x10
	cmp	x11, #64
	b.lo	LBB0_7
; %bb.2:
	sub	x11, x9, x10
	cmp	x11, #64
	b.lo	LBB0_7
; %bb.3:
	sub	x11, x9, x8
	cmp	x11, #64
	b.lo	LBB0_7
; %bb.4:
	mov	x11, #0
Lloh3:
	adrp	x12, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x12, lCPI0_0@PAGEOFF]
	add	x10, x10, #32
	movi.4s	v1, #4, lsl #8
	movi.4s	v2, #8, lsl #8
	movi.4s	v3, #12, lsl #8
	movi.4s	v4, #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	shl.4s	v5, v0, #8
	add.4s	v6, v5, v1
	add	x12, x10, x11
	stp	q5, q6, [x12, #-32]
	add.4s	v7, v5, v2
	add.4s	v16, v5, v3
	stp	q7, q16, [x12]
	add	x12, x8, x11
	stp	q5, q6, [x12]
	stp	q7, q16, [x12, #32]
	add	x12, x9, x11
	stp	q5, q6, [x12]
	add.4s	v0, v0, v4
	add	x11, x11, #64
	stp	q7, q16, [x12, #32]
	cmp	x11, #1024
	b.ne	LBB0_5
	b	LBB0_9
LBB0_6:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_7:
	mov	x11, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x10], #4
	str	w11, [x8], #4
	str	w11, [x9], #4
	add	x11, x11, #256
	cmp	x11, #16, lsl #12               ; =65536
	b.ne	LBB0_8
LBB0_9:
	str	xzr, [x19, #40]
	str	w21, [x19]
Lloh8:
	adrp	x8, _NV_DPMS_CLEARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NV_DPMS_CLEARED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	add	x21, x19, #8
Lloh11:
	adrp	x2, _nv04_crtc_funcs@GOTPAGE
Lloh12:
	ldr	x2, [x2, _nv04_crtc_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x21
	bl	_drm_crtc_init
Lloh13:
	adrp	x1, _nv04_crtc_helper_funcs@GOTPAGE
Lloh14:
	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
Lloh15:
	adrp	x22, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh16:
	ldr	x22, [x22, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x21, x19, #4
	mov	x0, x20
	mov	w1, #16384
	mov	w2, #256
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, x21
	bl	_nouveau_bo_new
	cbnz	w0, LBB0_14
; %bb.10:
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_nouveau_bo_pin
	cbnz	w0, LBB0_13
; %bb.11:
	ldr	w0, [x21]
	bl	_nouveau_bo_map
	cbz	w0, LBB0_14
; %bb.12:
	ldr	w0, [x21]
	bl	_nouveau_bo_unpin
LBB0_13:
	mov	x0, #0
	mov	x1, x21
	bl	_nouveau_bo_ref
LBB0_14:
	mov	x0, x19
	bl	_nv04_cursor_init
	mov	w0, #0
LBB0_15:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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	_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
