	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function komeda_plane_add
_komeda_plane_add:                      ## @komeda_plane_add
	.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	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rdi), %r14
	movl	$0, -44(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	addq	$8, %r12
	movq	%r15, (%rax)
	movl	16(%r15), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_komeda_get_layer_fourcc_list
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_get_possible_crtcs
	movl	%eax, %r14d
	movq	%r13, %rbx
	movl	-44(%rbp), %r13d
	movq	_komeda_supported_modifiers@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_get_plane_type
                                        ## kill: def $eax killed $eax def $rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %r11d
	leaq	L_.str(%rip), %r10
	movq	_komeda_plane_funcs@GOTPCREL(%rip), %rcx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	movl	%r13d, %r9d
	pushq	%r11
	pushq	%r10
	pushq	%rax
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_komeda_put_fourcc_list
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.3:
	movq	_komeda_plane_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_drm_plane_helper_add
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edx
	movq	%r12, %rdi
	callq	_drm_plane_create_rotation_property
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	%r12, %rdi
	callq	_drm_plane_create_alpha_property
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	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	%r12, %rdi
	movl	%ebx, %esi
	callq	_drm_plane_create_blend_mode_property
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	_DRM_COLOR_YCBCR_BT601@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	_DRM_COLOR_YCBCR_BT709@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r14d
	movq	_DRM_COLOR_YCBCR_BT2020@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r14d
	movq	_DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_DRM_COLOR_YCBCR_FULL_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movl	(%r13), %ecx
	movl	(%r15), %r8d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_drm_plane_create_color_properties
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$8, %ecx
	callq	_drm_plane_create_zpos_property
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movq	%r12, %rdi
	callq	_komeda_plane_destroy
	movl	%r14d, %ebx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_komeda_set_crtc_plane_mask
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_komeda_plane_funcs,4,2         ## @komeda_plane_funcs
	.comm	_komeda_supported_modifiers,4,2 ## @komeda_supported_modifiers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_komeda_plane_helper_funcs,4,2  ## @komeda_plane_helper_funcs
	.comm	_DRM_MODE_ROTATE_0,4,2          ## @DRM_MODE_ROTATE_0
	.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
	.comm	_DRM_COLOR_YCBCR_BT601,4,2      ## @DRM_COLOR_YCBCR_BT601
	.comm	_DRM_COLOR_YCBCR_BT709,4,2      ## @DRM_COLOR_YCBCR_BT709
	.comm	_DRM_COLOR_YCBCR_BT2020,4,2     ## @DRM_COLOR_YCBCR_BT2020
	.comm	_DRM_COLOR_YCBCR_LIMITED_RANGE,4,2 ## @DRM_COLOR_YCBCR_LIMITED_RANGE
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,4,2 ## @DRM_COLOR_YCBCR_FULL_RANGE
	.no_dead_strip	_komeda_plane_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function komeda_plane_add
_komeda_plane_add:                      ; @komeda_plane_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	str	x20, [x21], #8
	ldr	w1, [x20, #16]
	add	x2, sp, #12
	mov	x0, x22
	bl	_komeda_get_layer_fourcc_list
	mov	x23, x0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_get_possible_crtcs
	mov	x22, x0
	ldr	w24, [sp, #12]
Lloh3:
	adrp	x8, _komeda_supported_modifiers@GOTPAGE
Lloh4:
	ldr	x8, [x8, _komeda_supported_modifiers@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_get_plane_type
	mov	x7, x0
	ldr	w8, [x20, #8]
Lloh6:
	adrp	x9, l_.str@PAGE
Lloh7:
	add	x9, x9, l_.str@PAGEOFF
	str	w8, [sp, #8]
	str	x9, [sp]
Lloh8:
	adrp	x3, _komeda_plane_funcs@GOTPAGE
Lloh9:
	ldr	x3, [x3, _komeda_plane_funcs@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x4, x23
	mov	x5, x24
	mov	x6, x25
	bl	_drm_universal_plane_init
	mov	x22, x0
	mov	x0, x23
	bl	_komeda_put_fourcc_list
	cbnz	w22, LBB0_7
; %bb.2:
Lloh10:
	adrp	x1, _komeda_plane_helper_funcs@GOTPAGE
Lloh11:
	ldr	x1, [x1, _komeda_plane_helper_funcs@GOTPAGEOFF]
	mov	x0, x21
	bl	_drm_plane_helper_add
Lloh12:
	adrp	x8, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x20, #12]
	mov	x0, x21
	bl	_drm_plane_create_rotation_property
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x21
	bl	_drm_plane_create_alpha_property
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.4:
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	x22, 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	w22, w0, w22
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, w22, w0
	mov	x0, x21
	bl	_drm_plane_create_blend_mode_property
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
Lloh24:
	adrp	x24, _DRM_COLOR_YCBCR_BT601@GOTPAGE
Lloh25:
	ldr	x24, [x24, _DRM_COLOR_YCBCR_BT601@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_BIT
	mov	x22, x0
Lloh26:
	adrp	x8, _DRM_COLOR_YCBCR_BT709@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_BT709@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_BIT
	orr	w22, w0, w22
Lloh29:
	adrp	x8, _DRM_COLOR_YCBCR_BT2020@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_BT2020@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_BIT
	orr	w22, w22, w0
Lloh32:
	adrp	x25, _DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPAGE
Lloh33:
	ldr	x25, [x25, _DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_BIT
	mov	x23, x0
Lloh34:
	adrp	x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w23
	ldr	w3, [x24]
	ldr	w4, [x25]
	mov	x0, x21
	mov	x1, x22
	bl	_drm_plane_create_color_properties
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #8
	bl	_drm_plane_create_zpos_property
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_7:
	mov	x0, x21
	bl	_komeda_plane_destroy
	b	LBB0_9
LBB0_8:
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_10:
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_komeda_set_crtc_plane_mask
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_komeda_plane_funcs,4,2         ; @komeda_plane_funcs
	.comm	_komeda_supported_modifiers,4,2 ; @komeda_supported_modifiers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_komeda_plane_helper_funcs,4,2  ; @komeda_plane_helper_funcs
	.comm	_DRM_MODE_ROTATE_0,4,2          ; @DRM_MODE_ROTATE_0
	.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
	.comm	_DRM_COLOR_YCBCR_BT601,4,2      ; @DRM_COLOR_YCBCR_BT601
	.comm	_DRM_COLOR_YCBCR_BT709,4,2      ; @DRM_COLOR_YCBCR_BT709
	.comm	_DRM_COLOR_YCBCR_BT2020,4,2     ; @DRM_COLOR_YCBCR_BT2020
	.comm	_DRM_COLOR_YCBCR_LIMITED_RANGE,4,2 ; @DRM_COLOR_YCBCR_LIMITED_RANGE
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,4,2 ; @DRM_COLOR_YCBCR_FULL_RANGE
	.no_dead_strip	_komeda_plane_add
.subsections_via_symbols
