	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_layers_init
_sun8i_layers_init:                     ## @sun8i_layers_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_engine_to_sun8i_mixer
	movq	%rax, %r12
	movl	(%r14), %edi
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	leal	1(%rcx,%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$8, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	movq	(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_sun8i_vi_layer_init_one
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, (%r15,%rbx,8)
	incq	%rbx
	movq	(%r12), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_3
LBB0_8:
	cmpl	$0, 4(%rax)
	jle	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_sun8i_ui_layer_init_one
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rax
	movslq	(%rax), %rax
	addq	%rbx, %rax
	movq	%r13, (%r15,%rax,8)
	movq	(%r12), %rax
	incq	%rbx
	cmpl	4(%rax), %ebx
	jl	LBB0_10
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_11:
	movl	(%r14), %edi
	testl	%ebx, %ebx
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't initialize overlay plane\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't initialize %s plane\n"

L_.str.2:                               ## @.str.2
	.asciz	"overlay"

L_.str.3:                               ## @.str.3
	.asciz	"primary"

	.no_dead_strip	_sun8i_layers_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_layers_init
_sun8i_layers_init:                     ; @sun8i_layers_init
	.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, x0
	mov	x0, x1
	bl	_engine_to_sun8i_mixer
	mov	x20, x0
	ldr	w0, [x19]
	ldr	x8, [x20]
	ldp	w9, w8, [x8]
	add	w8, w9, w8
	add	w1, w8, #1
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w2, #8
	bl	_devm_kcalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_sun8i_vi_layer_init_one
	mov	x23, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x23, [x21, x22, lsl #3]
	add	x22, x22, #1
	ldr	x8, [x20]
	ldrsw	x9, [x8]
	cmp	x22, x9
	b.lt	LBB0_3
LBB0_5:
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_sun8i_ui_layer_init_one
	mov	x23, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20]
	ldrsw	x8, [x8]
	add	x8, x22, x8
	str	x23, [x21, x8, lsl #3]
	ldr	x8, [x20]
	ldr	w8, [x8, #4]
	add	x22, x22, #1
	cmp	w22, w8
	b.lt	LBB0_7
LBB0_9:
	mov	x0, x21
	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_10:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_11:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19]
Lloh8:
	adrp	x8, l_.str.2@PAGE
Lloh9:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w22, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	bl	_dev_err
	mov	x0, x23
	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_CAST
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't initialize overlay plane\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't initialize %s plane\n"

l_.str.2:                               ; @.str.2
	.asciz	"overlay"

l_.str.3:                               ; @.str.3
	.asciz	"primary"

	.no_dead_strip	_sun8i_layers_init
.subsections_via_symbols
