	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_primary_plane_create
_tegra_primary_plane_create:            ## @tegra_primary_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
	pushq	%rax
	.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, %r12
	callq	_tegra_plane_get_possible_crtcs
	movq	%rax, %r13
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	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
	movl	$2560, (%rax)                   ## imm = 0xA00
	movq	$0, 8(%rax)
	movq	%r15, 16(%rax)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movl	(%rax), %r9d
	movq	16(%rax), %r8
	movq	%rbx, %r15
	addq	$4, %r15
	subq	$8, %rsp
	movq	_tegra_plane_funcs@GOTPCREL(%rip), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	pushq	$0
	pushq	%r14
	pushq	8(%rax)
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_tegra_plane_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_drm_plane_helper_add
	movq	8(%rbx), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	$255, %ecx
	callq	_drm_plane_create_zpos_property
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DRM_MODE_REFLECT_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%esi, %edx
	movq	%r15, %rdi
	callq	_drm_plane_create_rotation_property
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
LBB0_7:
	movq	%r15, %rax
	addq	$8, %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, %r12d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r12d, %edi
LBB0_2:
	addq	$8, %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_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_tegra_plane_funcs,4,2          ## @tegra_plane_funcs
	.comm	_tegra_plane_helper_funcs,4,2   ## @tegra_plane_helper_funcs
	.comm	_DRM_MODE_ROTATE_0,4,2          ## @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_REFLECT_Y,4,2         ## @DRM_MODE_REFLECT_Y
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create rotation property: %d\n"

	.no_dead_strip	_tegra_primary_plane_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_primary_plane_create
_tegra_primary_plane_create:            ; @tegra_primary_plane_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x22, x0
	bl	_tegra_plane_get_possible_crtcs
	mov	x24, x0
Lloh0:
	adrp	x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
Lloh2:
	ldr	w23, [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_5
; %bb.1:
	mov	x21, x0
	mov	w8, #2560
	str	w8, [x0]
	stp	xzr, x19, [x0, #8]
	ldr	x8, [x19, #8]
	ldr	w5, [x8]
	ldp	x6, x4, [x8, #8]
	add	x20, x0, #4
	str	xzr, [sp]
Lloh6:
	adrp	x3, _tegra_plane_funcs@GOTPAGE
Lloh7:
	ldr	x3, [x3, _tegra_plane_funcs@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	mov	x7, x23
	bl	_drm_universal_plane_init
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh8:
	adrp	x1, _tegra_plane_helper_funcs@GOTPAGE
Lloh9:
	ldr	x1, [x1, _tegra_plane_helper_funcs@GOTPAGEOFF]
	mov	x0, x20
	bl	_drm_plane_helper_add
	ldr	x1, [x21, #8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #255
	bl	_drm_plane_create_zpos_property
Lloh10:
	adrp	x8, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _DRM_MODE_REFLECT_Y@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DRM_MODE_REFLECT_Y@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w2, w8, w1
	mov	x0, x20
	bl	_drm_plane_create_rotation_property
	tbz	w0, #31, LBB0_4
; %bb.3:
	mov	x2, x0
	ldr	w0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	x22, x0
	mov	x0, x21
	bl	_kfree
	mov	x0, x22
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_tegra_plane_funcs,4,2          ; @tegra_plane_funcs
	.comm	_tegra_plane_helper_funcs,4,2   ; @tegra_plane_helper_funcs
	.comm	_DRM_MODE_ROTATE_0,4,2          ; @DRM_MODE_ROTATE_0
	.comm	_DRM_MODE_REFLECT_Y,4,2         ; @DRM_MODE_REFLECT_Y
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create rotation property: %d\n"

	.no_dead_strip	_tegra_primary_plane_create
.subsections_via_symbols
