	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_plane_init                 ## -- Begin function ipu_plane_init
	.p2align	4, 0x90
_ipu_plane_init:                        ## @ipu_plane_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	%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
                                        ## kill: def $r9d killed $r9d def $r9
	movl	%r8d, %r14d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_ipu_format_modifiers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	cmpl	%r9d, (%rax)
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	movl	%ecx, %edx
	movl	%r8d, %ecx
	callq	_DRM_DEBUG_KMS
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	movq	%r15, 16(%r13)
	movl	%r12d, (%r13)
	movq	%r13, %r12
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, 4(%r13)
	movq	%r15, %rdi
	callq	_ipu_prg_present
	testq	%rax, %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_5
## %bb.4:
	movq	_pre_format_modifiers@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_5:
	addq	$8, %r13
	movq	_ipu_plane_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	subq	$8, %rsp
	movq	_ipu_plane_funcs@GOTPCREL(%rip), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	pushq	$0
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%r15
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r12, %rdi
	callq	_kfree
	movl	%r14d, %edi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movq	_ipu_plane_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_drm_plane_helper_add
	movq	_IPU_DP_FLOW_SYNC_BG@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_IPU_DP_FLOW_SYNC_FG@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	je	LBB0_9
## %bb.10:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_drm_plane_create_zpos_immutable_property
	jmp	LBB0_11
LBB0_9:
	xorl	%esi, %esi
	movb	-41(%rbp), %al                  ## 1-byte Reload
	movb	%al, %sil
	movq	%r13, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_drm_plane_create_zpos_property
LBB0_11:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ipu_format_modifiers,8,3       ## @ipu_format_modifiers
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %d, dp flow %d, possible_crtcs=0x%x\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate plane\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pre_format_modifiers,8,3       ## @pre_format_modifiers
	.comm	_ipu_plane_funcs,4,2            ## @ipu_plane_funcs
	.comm	_ipu_plane_formats,4,2          ## @ipu_plane_formats
L_.str.2:                               ## @.str.2
	.asciz	"failed to initialize plane\n"

	.comm	_ipu_plane_helper_funcs,4,2     ## @ipu_plane_helper_funcs
	.comm	_IPU_DP_FLOW_SYNC_BG,4,2        ## @IPU_DP_FLOW_SYNC_BG
	.comm	_IPU_DP_FLOW_SYNC_FG,4,2        ## @IPU_DP_FLOW_SYNC_FG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_plane_init                 ; -- Begin function ipu_plane_init
	.p2align	2
_ipu_plane_init:                        ; @ipu_plane_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x5
	mov	x23, x4
	mov	x20, x3
	mov	x26, x2
	mov	x25, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _ipu_format_modifiers@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ipu_format_modifiers@GOTPAGEOFF]
Lloh2:
	ldr	x27, [x8]
Lloh3:
	adrp	x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w5
	cset	w21, ne
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	mov	x2, x3
	mov	x3, x4
	bl	_DRM_DEBUG_KMS
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	x25, [x0, #16]
	stp	w26, w20, [x0]
	mov	x0, x25
	bl	_ipu_prg_present
Lloh11:
	adrp	x8, _pre_format_modifiers@GOTPAGE
Lloh12:
	ldr	x8, [x8, _pre_format_modifiers@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x26, x27, x8, eq
	add	x25, x19, #8
Lloh14:
	adrp	x8, _ipu_plane_formats@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ipu_plane_formats@GOTPAGEOFF]
Lloh16:
	ldr	w27, [x8]
	mov	x0, x27
	bl	_ARRAY_SIZE
	mov	x5, x0
	str	xzr, [sp]
Lloh17:
	adrp	x3, _ipu_plane_funcs@GOTPAGE
Lloh18:
	ldr	x3, [x3, _ipu_plane_funcs@GOTPAGEOFF]
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x4, x27
	mov	x6, x26
	mov	x7, x22
	bl	_drm_universal_plane_init
	cbz	w0, LBB0_5
; %bb.2:
	mov	x22, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
	b	LBB0_4
LBB0_3:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_5:
Lloh26:
	adrp	x1, _ipu_plane_helper_funcs@GOTPAGE
Lloh27:
	ldr	x1, [x1, _ipu_plane_helper_funcs@GOTPAGEOFF]
	mov	x0, x25
	bl	_drm_plane_helper_add
Lloh28:
	adrp	x8, _IPU_DP_FLOW_SYNC_BG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IPU_DP_FLOW_SYNC_BG@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _IPU_DP_FLOW_SYNC_FG@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IPU_DP_FLOW_SYNC_FG@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w8, w20
	mov	x0, x25
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_7
; %bb.6:
	mov	x1, x21
	mov	w2, #0
	mov	w3, #1
	bl	_drm_plane_create_zpos_property
	b	LBB0_8
LBB0_7:
	mov	w1, #0
	bl	_drm_plane_create_zpos_immutable_property
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ipu_format_modifiers,8,3       ; @ipu_format_modifiers
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %d, dp flow %d, possible_crtcs=0x%x\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate plane\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pre_format_modifiers,8,3       ; @pre_format_modifiers
	.comm	_ipu_plane_funcs,4,2            ; @ipu_plane_funcs
	.comm	_ipu_plane_formats,4,2          ; @ipu_plane_formats
l_.str.2:                               ; @.str.2
	.asciz	"failed to initialize plane\n"

	.comm	_ipu_plane_helper_funcs,4,2     ; @ipu_plane_helper_funcs
	.comm	_IPU_DP_FLOW_SYNC_BG,4,2        ; @IPU_DP_FLOW_SYNC_BG
	.comm	_IPU_DP_FLOW_SYNC_FG,4,2        ; @IPU_DP_FLOW_SYNC_FG
.subsections_via_symbols
