	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun8i_vi_layer_init_one        ## -- Begin function sun8i_vi_layer_init_one
	.p2align	4, 0x90
_sun8i_vi_layer_init_one:               ## @sun8i_vi_layer_init_one
	.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	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rdi), %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, %r12
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	leaq	24(%rax), %r13
	movq	_sun8i_vi_layer_formats@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	_DRM_PLANE_TYPE_OVERLAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movq	_sun8i_vi_layer_funcs@GOTPCREL(%rip), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	pushq	$0
	pushq	%r10
	pushq	$0
	callq	_drm_universal_plane_init
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	addl	%eax, %ecx
	decl	%ecx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_drm_plane_create_zpos_property
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	movq	_DRM_COLOR_YCBCR_BT601@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	_DRM_COLOR_YCBCR_BT709@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r14d
	movq	_DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_DRM_COLOR_YCBCR_FULL_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	_DRM_COLOR_YCBCR_BT709@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_drm_plane_create_color_properties
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	callq	_dev_err
	movl	%r14d, %edi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_10:
	movq	_sun8i_vi_layer_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_drm_plane_helper_add
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r12)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movq	$0, 8(%r12)
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sun8i_vi_layer_funcs,4,2       ## @sun8i_vi_layer_funcs
	.comm	_sun8i_vi_layer_formats,4,2     ## @sun8i_vi_layer_formats
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ## @DRM_PLANE_TYPE_OVERLAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't initialize layer\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't add zpos property\n"

	.comm	_DRM_COLOR_YCBCR_BT601,4,2      ## @DRM_COLOR_YCBCR_BT601
	.comm	_DRM_COLOR_YCBCR_BT709,4,2      ## @DRM_COLOR_YCBCR_BT709
	.comm	_DRM_COLOR_YCBCR_LIMITED_RANGE,4,2 ## @DRM_COLOR_YCBCR_LIMITED_RANGE
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,4,2 ## @DRM_COLOR_YCBCR_FULL_RANGE
L_.str.2:                               ## @.str.2
	.asciz	"Couldn't add encoding and range properties!\n"

	.comm	_sun8i_vi_layer_helper_funcs,4,2 ## @sun8i_vi_layer_helper_funcs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun8i_vi_layer_init_one        ; -- Begin function sun8i_vi_layer_init_one
	.p2align	2
_sun8i_vi_layer_init_one:               ; @sun8i_vi_layer_init_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
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	x22, x0
	add	x23, x0, #24
Lloh3:
	adrp	x8, _sun8i_vi_layer_formats@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sun8i_vi_layer_formats@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	x0, x24
	bl	_ARRAY_SIZE
	mov	x5, x0
Lloh6:
	adrp	x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_PLANE_TYPE_OVERLAY@GOTPAGEOFF]
Lloh8:
	ldr	w7, [x8]
	str	xzr, [sp]
Lloh9:
	adrp	x3, _sun8i_vi_layer_funcs@GOTPAGE
Lloh10:
	ldr	x3, [x3, _sun8i_vi_layer_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x23
	mov	w2, #0
	mov	x4, x24
	mov	x6, #0
	bl	_drm_universal_plane_init
	cbz	w0, LBB0_4
; %bb.2:
	mov	x24, x0
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_3:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
	ldr	x8, [x20]
	ldp	w9, w8, [x8]
	add	w8, w9, w8
	sub	w3, w8, #1
	mov	x0, x23
	mov	x1, x19
	mov	w2, #0
	bl	_drm_plane_create_zpos_property
	cbz	w0, LBB0_6
; %bb.5:
	mov	x24, x0
	ldr	w0, [x21]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _DRM_COLOR_YCBCR_BT601@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_BT601@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_BIT
	mov	x24, x0
Lloh21:
	adrp	x26, _DRM_COLOR_YCBCR_BT709@GOTPAGE
Lloh22:
	ldr	x26, [x26, _DRM_COLOR_YCBCR_BT709@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_BIT
	orr	w24, w0, w24
Lloh23:
	adrp	x27, _DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPAGE
Lloh24:
	ldr	x27, [x27, _DRM_COLOR_YCBCR_LIMITED_RANGE@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	_BIT
	mov	x25, x0
Lloh25:
	adrp	x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DRM_COLOR_YCBCR_FULL_RANGE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w25
	ldr	w3, [x26]
	ldr	w4, [x27]
	mov	x0, x23
	mov	x1, x24
	bl	_drm_plane_create_color_properties
	cbz	w0, LBB0_10
; %bb.7:
	mov	x24, x0
	ldr	w0, [x21]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	bl	_dev_err
	mov	x0, x24
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_10:
Lloh30:
	adrp	x1, _sun8i_vi_layer_helper_funcs@GOTPAGE
Lloh31:
	ldr	x1, [x1, _sun8i_vi_layer_helper_funcs@GOTPAGEOFF]
	mov	x0, x23
	bl	_drm_plane_helper_add
	str	w19, [x22]
	stp	xzr, x20, [x22, #8]
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sun8i_vi_layer_funcs,4,2       ; @sun8i_vi_layer_funcs
	.comm	_sun8i_vi_layer_formats,4,2     ; @sun8i_vi_layer_formats
	.comm	_DRM_PLANE_TYPE_OVERLAY,4,2     ; @DRM_PLANE_TYPE_OVERLAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't initialize layer\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't add zpos property\n"

	.comm	_DRM_COLOR_YCBCR_BT601,4,2      ; @DRM_COLOR_YCBCR_BT601
	.comm	_DRM_COLOR_YCBCR_BT709,4,2      ; @DRM_COLOR_YCBCR_BT709
	.comm	_DRM_COLOR_YCBCR_LIMITED_RANGE,4,2 ; @DRM_COLOR_YCBCR_LIMITED_RANGE
	.comm	_DRM_COLOR_YCBCR_FULL_RANGE,4,2 ; @DRM_COLOR_YCBCR_FULL_RANGE
l_.str.2:                               ; @.str.2
	.asciz	"Couldn't add encoding and range properties!\n"

	.comm	_sun8i_vi_layer_helper_funcs,4,2 ; @sun8i_vi_layer_helper_funcs
.subsections_via_symbols
