	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kirin_drm_private_init
_kirin_drm_private_init:                ## @kirin_drm_private_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_to_platform_device
	movq	%rax, %r12
	movl	8(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	leaq	8(%rax), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	*16(%rbx)
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, 24(%r15)
	cmpq	$0, (%rbx)
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.7:
	movq	16(%r15), %rsi
	movl	$8, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rax
	cmpq	8(%rbx), %r12
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_DRM_PLANE_TYPE_PRIMARY@GOTPCREL(%rip), %rax
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax), %edx
	addq	%r13, %rsi
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_kirin_drm_plane_init
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	16(%r15), %rsi
	movq	%r12, -8(%rsi,%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rsi,%r13)
	incq	%r12
	addq	$24, %r13
	cmpq	(%rbx), %r12
	jb	LBB0_8
	jmp	LBB0_12
LBB0_6:
	movq	16(%r15), %rsi
LBB0_12:
	movq	8(%rbx), %rax
	leaq	(%rax,%rax,2), %rax
	leaq	(%rsi,%rax,8), %rdx
	addq	$8, %rdx
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_kirin_drm_crtc_init
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r15)
	movq	%r15, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to alloc kirin_drm_private\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize kirin_priv hw ctx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ## @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ## @DRM_PLANE_TYPE_OVERLAY
	.no_dead_strip	_kirin_drm_private_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kirin_drm_private_init
_kirin_drm_private_init:                ; @kirin_drm_private_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_to_platform_device
	mov	x22, x0
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x8, [x20, #16]
	add	x23, x0, #8
	mov	x0, x22
	mov	x1, x23
	blr	x8
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	str	x22, [x21, #24]
	ldr	x8, [x20]
	cbz	x8, LBB0_10
; %bb.7:
	mov	x24, #0
	mov	x25, #0
	ldr	x8, [x21, #16]
Lloh11:
	adrp	x26, _DRM_PLANE_TYPE_PRIMARY@GOTPAGE
Lloh12:
	ldr	x26, [x26, _DRM_PLANE_TYPE_PRIMARY@GOTPAGEOFF]
Lloh13:
	adrp	x27, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh14:
	ldr	x27, [x27, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	cmp	x25, x9
	csel	x9, x26, x27, eq
	ldr	w2, [x9]
	add	x8, x8, x24
	add	x1, x8, #8
	mov	x0, x19
	mov	x3, x20
	bl	_kirin_drm_plane_init
	cbnz	w0, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x21, #16]
	add	x9, x8, x24
	str	x25, [x9]
	str	x22, [x9, #16]
	add	x25, x25, #1
	ldr	x9, [x20]
	add	x24, x24, #24
	cmp	x25, x9
	b.lo	LBB0_8
	b	LBB0_11
LBB0_10:
	ldr	x8, [x21, #16]
LBB0_11:
	ldr	x9, [x20, #8]
	mov	w10, #24
	madd	x8, x9, x10, x8
	add	x2, x8, #8
	mov	x0, x19
	mov	x1, x23
	mov	x3, x20
	bl	_kirin_drm_crtc_init
	cbnz	w0, LBB0_5
; %bb.12:
	str	x22, [x21]
	str	x21, [x19]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to alloc kirin_drm_private\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize kirin_priv hw ctx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRM_PLANE_TYPE_PRIMARY,4,2     ; @DRM_PLANE_TYPE_PRIMARY
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ; @DRM_PLANE_TYPE_OVERLAY
	.no_dead_strip	_kirin_drm_private_init
.subsections_via_symbols
