	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_format_by_index
_find_format_by_index:                  ## @find_format_by_index
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	_vdec_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %ecx
	xorl	%eax, %eax
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	cmpl	%r15d, %ecx
	jb	LBB0_15
## %bb.1:
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.2:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %edx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r14), %r15
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movzbl	%al, %eax
	addl	%eax, %r12d
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	addq	$16, %r15
	cmpq	%r14, %rdx
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, -8(%r15)
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	$1, %al
	cmpq	%rbx, (%r13)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r15), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, %rbx
	callq	_venus_helper_check_codec
	movq	%rbx, %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testq	%rax, %rax
	setne	%al
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%al, %al
	je	LBB0_3
## %bb.10:
	movl	%r14d, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_11:
	cmpl	%ecx, %eax
	jne	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_14:
	movl	%eax, %eax
	shlq	$4, %rax
	addq	%rax, %r14
	movq	%r14, %rax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vdec_formats,8,3               ## @vdec_formats
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_find_format_by_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_format_by_index
_find_format_by_index:                  ; @find_format_by_index
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _vdec_formats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vdec_formats@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	x0, x19
	bl	_ARRAY_SIZE
	cmp	w0, w22
	b.lo	LBB0_11
; %bb.1:
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.2:
	mov	x24, #0
	mov	w25, #0
	add	x26, x19, #8
Lloh3:
	adrp	x27, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
	mov	w28, w20
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w8, #1
	cmp	w25, w22
	b.ne	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	tbnz	w8, #0, LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, w8
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x24, #1
	add	x26, x26, #16
	cmp	x28, x24
	b.eq	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x8, [x26, #-8]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x27]
	cmp	x8, x21
	b.ne	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x26]
	mov	x0, x23
	bl	_venus_helper_check_codec
	cmp	x0, #0
	cset	w8, ne
	cmp	w25, w22
	b.eq	LBB0_4
	b	LBB0_5
LBB0_10:
	cmp	w24, w20
	b.ne	LBB0_14
LBB0_11:
	mov	x0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w24, #0
	cmp	w24, w20
	b.eq	LBB0_11
LBB0_14:
	add	x0, x19, w24, uxtw #4
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_vdec_formats,8,3               ; @vdec_formats
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_find_format_by_index
.subsections_via_symbols
