	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_try_fmt_mplane
_fimc_try_fmt_mplane:                   ## @fimc_try_fmt_mplane
	.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
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	(%rsi), %rdi
	callq	_IS_M2M
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	24(%r13), %r14
	movq	(%r13), %rdi
	callq	_get_m2m_fmt_flags
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_fimc_find_format
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_4:
	leaq	8(%r13), %rbx
	movq	(%rbx), %rax
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rdx
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_6
## %bb.5:
	movq	%rcx, (%rbx)
	jmp	LBB0_7
LBB0_6:
	cmpq	%rcx, %rax
	jne	LBB0_1
LBB0_7:
	movq	(%r13), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setne	%dl
	movq	16(%r15), %rax
	movl	(%r15,%rdx,4), %ecx
	bsfl	%ecx, %ecx
	movl	$-1, %r12d
	cmovnel	%ecx, %r12d
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_tiled_fmt
	testq	%rax, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.8:
	movl	$5, %ebx
	movl	$6, %r12d
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_9:
	movl	8(%r15), %eax
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.10:
	movl	(%r14), %edi
	callq	_fimc_fmt_is_rgb
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	jmp	LBB0_12
LBB0_11:
	bsfl	%eax, %eax
	movl	$-1, %ebx
	cmovnel	%eax, %ebx
LBB0_12:
	leaq	20(%r13), %rdi
	leaq	16(%r13), %r8
	movq	16(%r15), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	$16, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	$8, %r9d
	pushq	$0
	pushq	%rbx
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	16(%r13), %edx
	movl	20(%r13), %esi
	movq	%r14, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_fimc_adjust_mplane_format
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pixel format lookup failed"

	.comm	_V4L2_FIELD_ANY,8,3             ## @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_fimc_try_fmt_mplane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_try_fmt_mplane
_fimc_try_fmt_mplane:                   ; @fimc_try_fmt_mplane
	.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	x20, x1
	ldr	x8, [x0]
	ldr	x24, [x8]
	mov	x19, x1
	ldr	x0, [x19], #8
	bl	_IS_M2M
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x20
	ldr	x0, [x21], #24
	bl	_get_m2m_fmt_flags
	mov	x2, x0
	mov	x0, x21
	mov	x1, #0
	mov	w3, #0
	bl	_fimc_find_format
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	cbz	x0, LBB0_4
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
Lloh5:
	adrp	x9, _V4L2_FIELD_ANY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_FIELD_ANY@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh7:
	ldr	x10, [x9]
Lloh8:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x10
	b.ne	LBB0_6
; %bb.5:
	str	x9, [x19]
	b	LBB0_7
LBB0_6:
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_7:
	ldr	x8, [x20]
Lloh11:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ne
	ldr	x9, [x24, #16]
	lsl	x8, x8, #2
	ldr	w10, [x24, x8]
	rbit	w11, w10
	clz	w11, w11
	cmp	w10, #0
	csinv	w23, w11, wzr, ne
	ldr	w22, [x9, x8]
	mov	x0, x21
	bl	_tiled_fmt
	cbz	x0, LBB0_9
; %bb.8:
	mov	w7, #5
	mov	w23, #6
	b	LBB0_12
LBB0_9:
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	w0, [x21]
	bl	_fimc_fmt_is_rgb
	cmp	x0, #0
	cset	w7, eq
	b	LBB0_12
LBB0_11:
	rbit	w9, w8
	clz	w9, w9
	cmp	w8, #0
	csinv	w7, w9, wzr, ne
LBB0_12:
	add	x0, x20, #20
	add	x4, x20, #16
	ldr	x8, [x24, #16]
	ldr	w6, [x8]
	str	wzr, [sp]
	mov	w1, #16
	mov	x2, x22
	mov	x3, x23
	mov	w5, #8
	bl	_v4l_bound_align_image
	ldp	w2, w1, [x20, #16]
	mov	x0, x21
	mov	x3, x19
	bl	_fimc_adjust_mplane_format
	mov	w0, #0
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pixel format lookup failed"

	.comm	_V4L2_FIELD_ANY,8,3             ; @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_fimc_try_fmt_mplane
.subsections_via_symbols
