	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_backend_update_yuv_format
_sun4i_backend_update_yuv_format:       ## @sun4i_backend_update_yuv_format
	.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	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	(%rdx), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movl	(%r12), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_SUN4I_BACKEND_IYUVCTL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_sunxi_bt601_yuv2rgb_coef@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %r13d
	movl	%r15d, %edi
	callq	_SUN4I_BACKEND_YGCOEF_REG
	movq	(%r14), %rcx
	movl	(%rcx,%r15,4), %edx
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_regmap_write
	incq	%r15
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jl	LBB0_2
LBB0_3:
	movl	(%rbx), %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_SUN4I_BACKEND_ATTCTL_REG0
	movq	_SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%eax, %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movq	%r12, %rdi
	callq	_drm_format_info_is_yuv_packed
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	callq	_drm_format_info_is_yuv_sampling_422
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	orl	(%rax), %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_DRM_DEBUG_DRIVER
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_7:
	leal	-128(%r15), %eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.8:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	_SUN4I_BACKEND_IYUVCTL_FBPS_UYVY@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_15
LBB0_11:
	movq	_SUN4I_BACKEND_IYUVCTL_FBPS_VYUY@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_SUN4I_BACKEND_IYUVCTL_FBPS_YUYV@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_SUN4I_BACKEND_IYUVCTL_FBPS_YVYU@GOTPCREL(%rip), %rax
LBB0_14:
	orl	(%rax), %r14d
LBB0_15:
	movl	(%rbx), %edi
	movq	_SUN4I_BACKEND_IYUVCTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_regmap_write
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_SUN4I_BACKEND_IYUVCTL_EN,4,2   ## @SUN4I_BACKEND_IYUVCTL_EN
	.comm	_sunxi_bt601_yuv2rgb_coef,8,3   ## @sunxi_bt601_yuv2rgb_coef
	.comm	_SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN,4,2 ## @SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN
	.comm	_SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422,4,2 ## @SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported YUV format (0x%x)\n"

	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_VYUY,4,2 ## @SUN4I_BACKEND_IYUVCTL_FBPS_VYUY
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_UYVY,4,2 ## @SUN4I_BACKEND_IYUVCTL_FBPS_UYVY
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_YVYU,4,2 ## @SUN4I_BACKEND_IYUVCTL_FBPS_YVYU
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_YUYV,4,2 ## @SUN4I_BACKEND_IYUVCTL_FBPS_YUYV
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported YUV pixel sequence (0x%x)\n"

	.comm	_SUN4I_BACKEND_IYUVCTL_REG,4,2  ## @SUN4I_BACKEND_IYUVCTL_REG
	.no_dead_strip	_sun4i_backend_update_yuv_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_backend_update_yuv_format
_sun4i_backend_update_yuv_format:       ; @sun4i_backend_update_yuv_format
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x2]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	w21, [x22]
Lloh0:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_EN@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x26, _sunxi_bt601_yuv2rgb_coef@GOTPAGE
Lloh4:
	ldr	x26, [x26, _sunxi_bt601_yuv2rgb_coef@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x19]
	mov	x0, x24
	bl	_SUN4I_BACKEND_YGCOEF_REG
	mov	x1, x0
	ldr	x8, [x26]
	ldr	w2, [x8, x24, lsl #2]
	mov	x0, x25
	bl	_regmap_write
	add	x24, x24, #1
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	x24, w0, sxtw
	b.lt	LBB0_2
LBB0_3:
	ldr	w24, [x19]
	mov	x0, x23
	bl	_SUN4I_BACKEND_ATTCTL_REG0
	mov	x1, x0
Lloh5:
	adrp	x8, _SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x0, x22
	bl	_drm_format_info_is_yuv_packed
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_drm_format_info_is_yuv_sampling_422
	cbz	x0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w20, w8, w20
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_DRM_DEBUG_DRIVER
LBB0_7:
	sub	w8, w21, #128
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.8:
Lloh13:
	adrp	x9, lJTI0_0@PAGE
Lloh14:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh15:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_FBPS_UYVY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_FBPS_UYVY@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_DRM_DEBUG_DRIVER
	b	LBB0_15
LBB0_11:
Lloh19:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_FBPS_VYUY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_FBPS_VYUY@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh21:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_FBPS_YUYV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_FBPS_YUYV@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh23:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_FBPS_YVYU@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_FBPS_YVYU@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_15:
	ldr	w0, [x19]
Lloh25:
	adrp	x8, _SUN4I_BACKEND_IYUVCTL_REG@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SUN4I_BACKEND_IYUVCTL_REG@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_regmap_write
	mov	w0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
                                        ; -- End function
	.comm	_SUN4I_BACKEND_IYUVCTL_EN,4,2   ; @SUN4I_BACKEND_IYUVCTL_EN
	.comm	_sunxi_bt601_yuv2rgb_coef,8,3   ; @sunxi_bt601_yuv2rgb_coef
	.comm	_SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN,4,2 ; @SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN
	.comm	_SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422,4,2 ; @SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported YUV format (0x%x)\n"

	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_VYUY,4,2 ; @SUN4I_BACKEND_IYUVCTL_FBPS_VYUY
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_UYVY,4,2 ; @SUN4I_BACKEND_IYUVCTL_FBPS_UYVY
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_YVYU,4,2 ; @SUN4I_BACKEND_IYUVCTL_FBPS_YVYU
	.comm	_SUN4I_BACKEND_IYUVCTL_FBPS_YUYV,4,2 ; @SUN4I_BACKEND_IYUVCTL_FBPS_YUYV
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported YUV pixel sequence (0x%x)\n"

	.comm	_SUN4I_BACKEND_IYUVCTL_REG,4,2  ; @SUN4I_BACKEND_IYUVCTL_REG
	.no_dead_strip	_sun4i_backend_update_yuv_format
.subsections_via_symbols
