	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_jpeg_find_format
_mtk_jpeg_find_format:                  ## @mtk_jpeg_find_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_MTK_JPEG_FMT_TYPE_OUTPUT@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_MTK_JPEG_FMT_FLAG_DEC_OUTPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MTK_JPEG_FMT_FLAG_DEC_CAPTURE@GOTPCREL(%rip), %rax
LBB0_3:
	movq	_MTK_JPEG_NUM_FORMATS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.4:
	movl	(%rax), %edx
	movq	_mtk_jpeg_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$16, %rax
	decq	%rcx
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rax)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%edx, 8(%rax)
	je	LBB0_7
## %bb.9:
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_JPEG_FMT_TYPE_OUTPUT,4,2   ## @MTK_JPEG_FMT_TYPE_OUTPUT
	.comm	_MTK_JPEG_FMT_FLAG_DEC_OUTPUT,4,2 ## @MTK_JPEG_FMT_FLAG_DEC_OUTPUT
	.comm	_MTK_JPEG_FMT_FLAG_DEC_CAPTURE,4,2 ## @MTK_JPEG_FMT_FLAG_DEC_CAPTURE
	.comm	_MTK_JPEG_NUM_FORMATS,4,2       ## @MTK_JPEG_NUM_FORMATS
	.comm	_mtk_jpeg_formats,8,3           ## @mtk_jpeg_formats
	.no_dead_strip	_mtk_jpeg_find_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_jpeg_find_format
_mtk_jpeg_find_format:                  ; @mtk_jpeg_find_format
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _MTK_JPEG_FMT_TYPE_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_JPEG_FMT_TYPE_OUTPUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MTK_JPEG_FMT_FLAG_DEC_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTK_JPEG_FMT_FLAG_DEC_OUTPUT@GOTPAGEOFF]
Lloh4:
	adrp	x10, _MTK_JPEG_FMT_FLAG_DEC_CAPTURE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MTK_JPEG_FMT_FLAG_DEC_CAPTURE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w8, w2
	csel	x9, x9, x10, eq
Lloh7:
	adrp	x8, _MTK_JPEG_NUM_FORMATS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MTK_JPEG_NUM_FORMATS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cbz	w8, LBB0_6
; %bb.1:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _mtk_jpeg_formats@GOTPAGE
Lloh11:
	ldr	x10, [x10, _mtk_jpeg_formats@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x10]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x0, #16
	subs	x8, x8, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x0]
	cmp	x10, x1
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x0, #8]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.5:
	ret
LBB0_6:
	mov	x0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_JPEG_FMT_TYPE_OUTPUT,4,2   ; @MTK_JPEG_FMT_TYPE_OUTPUT
	.comm	_MTK_JPEG_FMT_FLAG_DEC_OUTPUT,4,2 ; @MTK_JPEG_FMT_FLAG_DEC_OUTPUT
	.comm	_MTK_JPEG_FMT_FLAG_DEC_CAPTURE,4,2 ; @MTK_JPEG_FMT_FLAG_DEC_CAPTURE
	.comm	_MTK_JPEG_NUM_FORMATS,4,2       ; @MTK_JPEG_NUM_FORMATS
	.comm	_mtk_jpeg_formats,8,3           ; @mtk_jpeg_formats
	.no_dead_strip	_mtk_jpeg_find_format
.subsections_via_symbols
