	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tilcdc_crtc_create             ## -- Begin function tilcdc_crtc_create
	.p2align	4, 0x90
_tilcdc_crtc_create:                    ## @tilcdc_crtc_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	%rdi, %r15
	movq	(%rdi), %rdi
	movq	8(%r15), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	leaq	36(%rax), %rdi
	callq	_init_completion
	movq	(%r15), %rdi
	movq	_TILCDC_PALETTE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	32(%rbx), %rdx
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%r14), %ecx
	callq	_dmam_alloc_coherent
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_TILCDC_PALETTE_FIRST_ENTRY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	leaq	20(%rbx), %r14
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_tilcdc_plane_init
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	leaq	16(%rbx), %rdi
	callq	_mutex_init
	leaq	12(%rbx), %rdi
	callq	_init_waitqueue_head
	leaq	8(%rbx), %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	_tilcdc_crtc_recover_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	_tilcdc_crtc_funcs@GOTPCREL(%rip), %r8
	leaq	L_.str(%rip), %r9
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_drm_crtc_init_with_planes
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_tilcdc_crtc_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_crtc_helper_add
	cmpq	$0, 8(%r13)
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movl	(%rax), %edi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_of_graph_get_port_by_id
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_10
LBB0_6:
	movq	%r14, (%r13)
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %r12d
LBB0_11:
	movq	%r14, %rdi
	callq	_tilcdc_crtc_destroy
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	(%r15), %rdi
	movl	(%rdi), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TILCDC_PALETTE_SIZE,4,2        ## @TILCDC_PALETTE_SIZE
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_TILCDC_PALETTE_FIRST_ENTRY,4,2 ## @TILCDC_PALETTE_FIRST_ENTRY
	.comm	_tilcdc_crtc_recover_work,4,2   ## @tilcdc_crtc_recover_work
	.comm	_tilcdc_crtc_funcs,4,2          ## @tilcdc_crtc_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tilcdc crtc"

	.comm	_tilcdc_crtc_helper_funcs,4,2   ## @tilcdc_crtc_helper_funcs
L_.str.1:                               ## @.str.1
	.asciz	"Port node not found in %pOF\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tilcdc_crtc_create             ; -- Begin function tilcdc_crtc_create
	.p2align	2
_tilcdc_crtc_create:                    ; @tilcdc_crtc_create
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldp	x0, x23, [x0]
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
	add	x0, x0, #36
	bl	_init_completion
	ldr	x0, [x19]
Lloh2:
	adrp	x8, _TILCDC_PALETTE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TILCDC_PALETTE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, x21, #32
	ldr	w8, [x20]
Lloh5:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_dmam_alloc_coherent
	str	x0, [x21, #24]
	cbz	x0, LBB0_7
; %bb.2:
Lloh8:
	adrp	x8, _TILCDC_PALETTE_FIRST_ENTRY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TILCDC_PALETTE_FIRST_ENTRY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0]
	add	x20, x21, #20
	mov	x0, x19
	mov	x1, x21
	bl	_tilcdc_plane_init
	tbnz	w0, #31, LBB0_8
; %bb.3:
	add	x0, x21, #16
	bl	_mutex_init
	add	x0, x21, #12
	bl	_init_waitqueue_head
	add	x0, x21, #8
	bl	_spin_lock_init
	add	x0, x21, #4
Lloh11:
	adrp	x8, _tilcdc_crtc_recover_work@GOTPAGE
Lloh12:
	ldr	x8, [x8, _tilcdc_crtc_recover_work@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh14:
	adrp	x4, _tilcdc_crtc_funcs@GOTPAGE
Lloh15:
	ldr	x4, [x4, _tilcdc_crtc_funcs@GOTPAGEOFF]
Lloh16:
	adrp	x5, l_.str@PAGE
Lloh17:
	add	x5, x5, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, #0
	bl	_drm_crtc_init_with_planes
	tbnz	w0, #31, LBB0_8
; %bb.4:
Lloh18:
	adrp	x1, _tilcdc_crtc_helper_funcs@GOTPAGE
Lloh19:
	ldr	x1, [x1, _tilcdc_crtc_helper_funcs@GOTPAGEOFF]
	mov	x0, x20
	bl	_drm_crtc_helper_add
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_of_graph_get_port_by_id
	str	w0, [x20]
	cbz	w0, LBB0_11
LBB0_6:
	mov	w22, #0
	str	x20, [x23]
	b	LBB0_10
LBB0_7:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_8:
	mov	x22, x0
LBB0_9:
	mov	x0, x20
	bl	_tilcdc_crtc_destroy
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x0, [x19]
	ldr	w2, [x0]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TILCDC_PALETTE_SIZE,4,2        ; @TILCDC_PALETTE_SIZE
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_TILCDC_PALETTE_FIRST_ENTRY,4,2 ; @TILCDC_PALETTE_FIRST_ENTRY
	.comm	_tilcdc_crtc_recover_work,4,2   ; @tilcdc_crtc_recover_work
	.comm	_tilcdc_crtc_funcs,4,2          ; @tilcdc_crtc_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tilcdc crtc"

	.comm	_tilcdc_crtc_helper_funcs,4,2   ; @tilcdc_crtc_helper_funcs
l_.str.1:                               ; @.str.1
	.asciz	"Port node not found in %pOF\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
