	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_wndw_new_                 ## -- Begin function nv50_wndw_new_
	.p2align	4, 0x90
_nv50_wndw_new_:                        ## @nv50_wndw_new_
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%r8d, %r15d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	40(%rbp), %r12
	movq	%rsi, %rdi
	callq	_nouveau_drm
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_nv50_disp
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	32(%rbp), %rax
	movl	24(%rbp), %ecx
	movq	16(%rbp), %r12
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 8(%rbx)
	movl	%r15d, (%rbx)
	movl	%ecx, 48(%rbx)
	movq	%rax, 56(%rbx)
	leaq	40(%rbx), %rax
	leaq	24(%rbx), %rdi
	movq	%rax, 32(%rbx)
	callq	_INIT_LIST_HEAD
	xorl	%r9d, %r9d
	movq	%r15, %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14,%r9,8)
	leaq	1(%r9), %r9
	jne	LBB0_3
## %bb.4:
	decl	%r9d
	leaq	4(%rbx), %r15
	subq	$8, %rsp
	leaq	L_.str(%rip), %r10
	movq	_nv50_wndw@GOTPCREL(%rip), %rcx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r14, %r8
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%rax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_drm_universal_plane_init
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movq	40(%rbp), %rbx
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_nv50_wndw_helper@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_plane_helper_add
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.7:
	movq	%rbx, %rdx
	addq	$20, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_nv50_lut_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.8:
	movq	8(%rbx), %rax
LBB0_9:
	movq	_nv50_wndw_notify@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_nv50_wndw_zpos_default
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	$254, %ecx
	callq	_drm_plane_create_zpos_property
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:
	movq	%r15, %rdi
	callq	_drm_plane_create_alpha_property
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.12:
	movq	_DRM_MODE_BLEND_PIXEL_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_DRM_MODE_BLEND_PREMULTI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_DRM_MODE_BLEND_COVERAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_drm_plane_create_blend_mode_property
	jmp	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_drm_plane_create_zpos_immutable_property
LBB0_14:
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nv50_wndw,4,2                  ## @nv50_wndw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-%d"

	.comm	_nv50_wndw_helper,4,2           ## @nv50_wndw_helper
	.comm	_nv50_wndw_notify,4,2           ## @nv50_wndw_notify
	.comm	_DRM_MODE_BLEND_PIXEL_NONE,4,2  ## @DRM_MODE_BLEND_PIXEL_NONE
	.comm	_DRM_MODE_BLEND_PREMULTI,4,2    ## @DRM_MODE_BLEND_PREMULTI
	.comm	_DRM_MODE_BLEND_COVERAGE,4,2    ## @DRM_MODE_BLEND_COVERAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_wndw_new_                 ; -- Begin function nv50_wndw_new_
	.p2align	2
_nv50_wndw_new_:                        ; @nv50_wndw_new_
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x25, x6
	mov	x24, x5
	mov	x28, x4
	mov	x27, x3
	mov	x23, x2
	mov	x26, x1
	mov	x21, x0
	ldr	x22, [x29, #24]
	mov	x0, x1
	bl	_nouveau_drm
	str	x0, [sp, #40]                   ; 8-byte Folded Spill
	mov	x0, x26
	bl	_nv50_disp
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	str	x0, [x22]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x29, #16]
	str	x21, [x0, #8]
	str	w28, [x0]
	str	w19, [x0, #48]
	str	x8, [x0, #56]
	add	x8, x0, #40
	add	x0, x0, #24
	str	x8, [x20, #32]
	bl	_INIT_LIST_HEAD
	mov	x8, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24, x8, lsl #3]
	add	x8, x8, #1
	cbnz	x9, LBB0_2
; %bb.3:
	sub	w5, w8, #1
	add	x19, x20, #4
	str	w28, [sp, #16]
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	stp	x8, x27, [sp]
Lloh5:
	adrp	x3, _nv50_wndw@GOTPAGE
Lloh6:
	ldr	x3, [x3, _nv50_wndw@GOTPAGEOFF]
	mov	x0, x26
	mov	x1, x19
	mov	x2, x25
	mov	x4, x24
	mov	x6, #0
	mov	x7, x23
	bl	_drm_universal_plane_init
	cbz	w0, LBB0_7
; %bb.4:
	mov	x23, x0
	ldr	x0, [x22]
	bl	_kfree
	str	xzr, [x22]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_6:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_7:
Lloh10:
	adrp	x1, _nv50_wndw_helper@GOTPAGE
Lloh11:
	ldr	x1, [x1, _nv50_wndw_helper@GOTPAGEOFF]
	mov	x0, x19
	bl	_drm_plane_helper_add
	ldr	x8, [x20, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.8:
	add	x2, x20, #20
	ldp	x0, x1, [sp, #32]               ; 16-byte Folded Reload
	bl	_nv50_lut_init
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.9:
	ldr	x8, [x20, #8]
LBB0_10:
Lloh12:
	adrp	x9, _nv50_wndw_notify@GOTPAGE
Lloh13:
	ldr	x9, [x9, _nv50_wndw_notify@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	str	w9, [x20, #16]
	ldr	x20, [x8]
	mov	x0, x19
	bl	_nv50_wndw_zpos_default
	mov	x1, x0
	cbz	x20, LBB0_14
; %bb.11:
	mov	x0, x19
	mov	w2, #0
	mov	w3, #254
	bl	_drm_plane_create_zpos_property
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.12:
	mov	x0, x19
	bl	_drm_plane_create_alpha_property
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.13:
Lloh15:
	adrp	x8, _DRM_MODE_BLEND_PIXEL_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DRM_MODE_BLEND_PIXEL_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_BIT
	mov	x20, x0
Lloh18:
	adrp	x8, _DRM_MODE_BLEND_PREMULTI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRM_MODE_BLEND_PREMULTI@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_BIT
	orr	w20, w0, w20
Lloh21:
	adrp	x8, _DRM_MODE_BLEND_COVERAGE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DRM_MODE_BLEND_COVERAGE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_BIT
	orr	w1, w20, w0
	mov	x0, x19
	bl	_drm_plane_create_blend_mode_property
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_drm_plane_create_zpos_immutable_property
LBB0_15:
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.16:
	mov	w23, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nv50_wndw,4,2                  ; @nv50_wndw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-%d"

	.comm	_nv50_wndw_helper,4,2           ; @nv50_wndw_helper
	.comm	_nv50_wndw_notify,4,2           ; @nv50_wndw_notify
	.comm	_DRM_MODE_BLEND_PIXEL_NONE,4,2  ; @DRM_MODE_BLEND_PIXEL_NONE
	.comm	_DRM_MODE_BLEND_PREMULTI,4,2    ; @DRM_MODE_BLEND_PREMULTI
	.comm	_DRM_MODE_BLEND_COVERAGE,4,2    ; @DRM_MODE_BLEND_COVERAGE
.subsections_via_symbols
