	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_shared_plane_create      ## -- Begin function tegra_shared_plane_create
	.p2align	4, 0x90
_tegra_shared_plane_create:             ## @tegra_shared_plane_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	leal	(%r13,%r13,2), %eax
	shll	$8, %eax
	addl	$2560, %eax                     ## imm = 0xA00
	movl	%eax, (%rbx)
	movl	%r13d, 4(%rbx)
	movq	(%r15), %rax
	movl	%r12d, %ecx
	leaq	(%rax,%rcx,4), %rdx
	movq	%rdx, 16(%rbx)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %edx
	movl	%edx, (%rax,%rcx,4)
	movq	%rbx, %r15
	addq	$8, %r15
	movq	_tegra_shared_plane_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	movq	(%r12), %r8
	movq	_tegra_shared_plane_modifiers@GOTPCREL(%rip), %r10
	subq	$8, %rsp
	movq	_tegra_plane_funcs@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$7, %edx
	movl	%eax, %r9d
	pushq	$0
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	(%r10)
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_tegra_shared_plane_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_plane_helper_add
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$255, %ecx
	callq	_drm_plane_create_zpos_property
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %edi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ## @DRM_PLANE_TYPE_OVERLAY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_tegra_shared_plane_formats,8,3 ## @tegra_shared_plane_formats
	.comm	_tegra_shared_plane_modifiers,8,3 ## @tegra_shared_plane_modifiers
	.comm	_tegra_plane_funcs,4,2          ## @tegra_plane_funcs
	.comm	_tegra_shared_plane_helper_funcs,4,2 ## @tegra_shared_plane_helper_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tegra_shared_plane_create      ; -- Begin function tegra_shared_plane_create
	.p2align	2
_tegra_shared_plane_create:             ; @tegra_shared_plane_create
	.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	x24, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x8, [x0]
	ldr	x25, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	w8, #768
	mul	w8, w24, w8
	add	w8, w8, #2560
	stp	w8, w24, [x0]
	ldr	x8, [x25]
	mov	w9, w23
	lsl	x9, x9, #2
	add	x10, x8, x9
	str	x10, [x0, #16]
	ldr	w10, [x22]
	str	w10, [x8, x9]
	add	x22, x0, #8
Lloh6:
	adrp	x23, _tegra_shared_plane_formats@GOTPAGE
Lloh7:
	ldr	x23, [x23, _tegra_shared_plane_formats@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	mov	x5, x0
	ldr	x4, [x23]
Lloh8:
	adrp	x8, _tegra_shared_plane_modifiers@GOTPAGE
Lloh9:
	ldr	x8, [x8, _tegra_shared_plane_modifiers@GOTPAGEOFF]
Lloh10:
	ldr	x6, [x8]
	str	xzr, [sp]
Lloh11:
	adrp	x3, _tegra_plane_funcs@GOTPAGE
Lloh12:
	ldr	x3, [x3, _tegra_plane_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #7
	mov	x7, x19
	bl	_drm_universal_plane_init
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh13:
	adrp	x1, _tegra_shared_plane_helper_funcs@GOTPAGE
Lloh14:
	ldr	x1, [x1, _tegra_shared_plane_helper_funcs@GOTPAGEOFF]
	mov	x0, x22
	bl	_drm_plane_helper_add
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	mov	w3, #255
	bl	_drm_plane_create_zpos_property
	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_3:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	x19, x0
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
LBB0_5:
	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
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ; @DRM_PLANE_TYPE_OVERLAY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_tegra_shared_plane_formats,8,3 ; @tegra_shared_plane_formats
	.comm	_tegra_shared_plane_modifiers,8,3 ; @tegra_shared_plane_modifiers
	.comm	_tegra_plane_funcs,4,2          ; @tegra_plane_funcs
	.comm	_tegra_shared_plane_helper_funcs,4,2 ; @tegra_shared_plane_helper_funcs
.subsections_via_symbols
