	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_mdp_find_fmt
_mtk_mdp_find_fmt:                      ## @mtk_mdp_find_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_MTK_MDP_FMT_FLAG_CAPTURE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_MTK_MDP_FMT_FLAG_OUTPUT@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %r13
	movq	_mtk_mdp_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	callq	_ARRAY_SIZE
	addq	$16, %rbx
	cmpq	%rax, %r14
	jae	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	testq	%r13, (%rdi,%rbx)
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%r15, 8(%rdi,%rbx)
	jne	LBB0_5
## %bb.8:
	addq	%rbx, %rdi
	movq	%rdi, %rax
	jmp	LBB0_11
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_MDP_FMT_FLAG_OUTPUT,8,3    ## @MTK_MDP_FMT_FLAG_OUTPUT
	.comm	_MTK_MDP_FMT_FLAG_CAPTURE,8,3   ## @MTK_MDP_FMT_FLAG_CAPTURE
	.comm	_mtk_mdp_formats,8,3            ## @mtk_mdp_formats
	.no_dead_strip	_mtk_mdp_find_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_mdp_find_fmt
_mtk_mdp_find_fmt:                      ; @mtk_mdp_find_fmt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	x0, x1
	bl	_V4L2_TYPE_IS_OUTPUT
Lloh0:
	adrp	x8, _MTK_MDP_FMT_FLAG_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_MDP_FMT_FLAG_OUTPUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MTK_MDP_FMT_FLAG_CAPTURE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTK_MDP_FMT_FLAG_CAPTURE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	x20, [x8]
Lloh4:
	adrp	x21, _mtk_mdp_formats@GOTPAGE
Lloh5:
	ldr	x21, [x21, _mtk_mdp_formats@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #16
	cmp	x23, x0
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	x8, [x0, x22]
	tst	x8, x20
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x0, x22
	ldr	x9, [x8, #8]
	cmp	x9, x19
	b.ne	LBB0_2
	b	LBB0_6
LBB0_5:
	mov	x8, #0
LBB0_6:
	mov	x0, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_MDP_FMT_FLAG_OUTPUT,8,3    ; @MTK_MDP_FMT_FLAG_OUTPUT
	.comm	_MTK_MDP_FMT_FLAG_CAPTURE,8,3   ; @MTK_MDP_FMT_FLAG_CAPTURE
	.comm	_mtk_mdp_formats,8,3            ; @mtk_mdp_formats
	.no_dead_strip	_mtk_mdp_find_fmt
.subsections_via_symbols
