	.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_mode
_sun4i_frontend_drm_format_to_input_mode: ## @sun4i_frontend_drm_format_to_input_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_DRM_FORMAT_MOD_ALLWINNER_TILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rdi), %ecx
	cmpl	$3, %ecx
	je	LBB0_8
## %bb.1:
	cmpl	$2, %ecx
	je	LBB0_4
## %bb.2:
	cmpl	$1, %ecx
	jne	LBB0_11
## %bb.3:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	cmpq	%rsi, %rax
	jne	LBB0_5
## %bb.6:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	cmpq	%rsi, %rax
	jne	LBB0_9
## %bb.10:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_5:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	movq	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_MOD_ALLWINNER_TILED,8,3 ## @DRM_FORMAT_MOD_ALLWINNER_TILED
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR,4,2 ## @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sun4i_frontend_drm_format_to_input_mode
.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_mode
_sun4i_frontend_drm_format_to_input_mode: ; @sun4i_frontend_drm_format_to_input_mode
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DRM_FORMAT_MOD_ALLWINNER_TILED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRM_FORMAT_MOD_ALLWINNER_TILED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x0]
	cmp	w9, #3
	b.eq	LBB0_4
; %bb.1:
	cmp	w9, #2
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #1
	b.ne	LBB0_8
; %bb.3:
	mov	w0, #0
Lloh3:
	adrp	x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	w0, #0
Lloh5:
	adrp	x9, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR@GOTPAGEOFF]
Lloh7:
	adrp	x10, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR@GOTPAGE
Lloh8:
	ldr	x10, [x10, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	w0, #0
Lloh9:
	adrp	x9, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR@GOTPAGEOFF]
Lloh11:
	adrp	x10, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR@GOTPAGEOFF]
LBB0_6:
	cmp	x8, x1
	csel	x8, x9, x10, eq
LBB0_7:
	ldr	w8, [x8]
	str	w8, [x2]
	ret
LBB0_8:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_MOD_ALLWINNER_TILED,8,3 ; @DRM_FORMAT_MOD_ALLWINNER_TILED
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_SEMIPLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_SEMIPLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_MB32_PLANAR
	.comm	_SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR,4,2 ; @SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PLANAR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sun4i_frontend_drm_format_to_input_mode
.subsections_via_symbols
