	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_overlay_init
_nv04_overlay_init:                     ## @nv04_overlay_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_nouveau_drm
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %r15
	addq	$8, %r15
	movq	_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	_nv04_plane_funcs@GOTPCREL(%rip), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	movl	$2, %r9d
	callq	_drm_plane_init
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movl	$33554431, %r8d                 ## imm = 0x1FFFFFF
	callq	_drm_property_create_range
	movq	%rax, 24(%rbx)
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movl	$1024, %r8d                     ## imm = 0x400
	callq	_drm_property_create_range
	movq	%rax, 16(%rbx)
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movl	$0, (%rbx)
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_drm_object_attach_property
	movl	$512, 4(%rbx)                   ## imm = 0x200
	movq	16(%rbx), %rsi
	movq	%r15, %rdi
	movl	$512, %edx                      ## imm = 0x200
	callq	_drm_object_attach_property
	movq	%r15, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_drm_plane_force_disable        ## TAILCALL
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_drm_plane_cleanup
LBB0_5:
	movq	%rbx, %rdi
	callq	_kfree
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_NV_ERROR                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_nv04_plane_funcs,4,2           ## @nv04_plane_funcs
	.comm	_formats,4,2                    ## @formats
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"colorkey"

L_.str.1:                               ## @.str.1
	.asciz	"brightness"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create plane\n"

	.no_dead_strip	_nv04_overlay_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv04_overlay_init
_nv04_overlay_init:                     ; @nv04_overlay_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	x22, x0
	bl	_nouveau_drm
	mov	x19, 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_5
; %bb.1:
	mov	x20, x0
	add	x21, x0, #8
Lloh3:
	adrp	x8, _formats@GOTPAGE
Lloh4:
	ldr	x8, [x8, _formats@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x3, _nv04_plane_funcs@GOTPAGE
Lloh7:
	ldr	x3, [x3, _nv04_plane_funcs@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x21
	mov	w2, #1
	mov	w5, #2
	mov	w6, #0
	bl	_drm_plane_init
	cbnz	w0, LBB0_4
; %bb.2:
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	w1, #0
	mov	w3, #0
	mov	w4, #33554431
	bl	_drm_property_create_range
	str	x0, [x20, #24]
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w1, #0
	mov	w3, #0
	mov	w4, #1024
	bl	_drm_property_create_range
	str	x0, [x20, #16]
	ldr	x1, [x20, #24]
	cmp	x1, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x21
	bl	_drm_plane_cleanup
LBB0_4:
	mov	x0, x20
	bl	_kfree
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	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
	b	_NV_ERROR
LBB0_5:
	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
LBB0_6:
	str	wzr, [x20]
	mov	x0, x21
	mov	w2, #0
	bl	_drm_object_attach_property
	mov	w8, #512
	str	w8, [x20, #4]
	ldr	x1, [x20, #16]
	mov	x0, x21
	mov	w2, #512
	bl	_drm_object_attach_property
	mov	x0, x21
	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
	b	_drm_plane_force_disable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_nv04_plane_funcs,4,2           ; @nv04_plane_funcs
	.comm	_formats,4,2                    ; @formats
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"colorkey"

l_.str.1:                               ; @.str.1
	.asciz	"brightness"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create plane\n"

	.no_dead_strip	_nv04_overlay_init
.subsections_via_symbols
