	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_frontend_drm_format_to_input_fmt
_sun4i_frontend_drm_format_to_input_fmt: ## @sun4i_frontend_drm_format_to_input_fmt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	callq	_drm_format_info_is_yuv_sampling_411
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	%rbx, %rdi
	callq	_drm_format_info_is_yuv_sampling_420
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	%rbx, %rdi
	callq	_drm_format_info_is_yuv_sampling_422
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	movq	%rbx, %rdi
	callq	_drm_format_info_is_yuv_sampling_444
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sun4i_frontend_drm_format_to_input_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_frontend_drm_format_to_input_fmt
_sun4i_frontend_drm_format_to_input_fmt: ; @sun4i_frontend_drm_format_to_input_fmt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x20, x0
	bl	_drm_format_info_is_yuv_sampling_411
	cbz	x0, LBB0_4
; %bb.2:
	mov	w0, #0
Lloh0:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411@GOTPAGEOFF]
	b	LBB0_10
LBB0_3:
	mov	w0, #0
Lloh2:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	mov	x0, x20
	bl	_drm_format_info_is_yuv_sampling_420
	cbz	x0, LBB0_6
; %bb.5:
	mov	w0, #0
Lloh4:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
	mov	x0, x20
	bl	_drm_format_info_is_yuv_sampling_422
	cbz	x0, LBB0_8
; %bb.7:
	mov	w0, #0
Lloh6:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_drm_format_info_is_yuv_sampling_444
	cbz	x0, LBB0_12
; %bb.9:
	mov	w0, #0
Lloh8:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV411
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV420
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV422
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_YUV444
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sun4i_frontend_drm_format_to_input_fmt
.subsections_via_symbols
