	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_enum_fmt
_vidioc_enum_fmt:                       ## @vidioc_enum_fmt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_NUM_FORMATS@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_1
## %bb.4:
	movq	_mtk_video_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_MTK_FMT_DEC@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_MTK_FMT_FRAME@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	xorl	%ecx, %ecx
	xorl	%r11d, %r11d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rcx
	addq	$16, %rdx
	cmpq	%rcx, %r10
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rax
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r8, %rax
	jne	LBB0_10
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r9, %rax
	jne	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	(%rdi), %r11d
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r11d
	jmp	LBB0_10
LBB0_1:
	xorl	%ecx, %ecx
LBB0_2:
	cmpl	%r10d, %ecx
	jne	LBB0_3
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	_mtk_video_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	shlq	$4, %rcx
	movl	12(%rax,%rcx), %edx
	movl	%edx, 8(%rdi)
	movl	8(%rax,%rcx), %eax
	movl	%eax, 4(%rdi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_FORMATS,4,2                ## @NUM_FORMATS
	.comm	_mtk_video_formats,8,3          ## @mtk_video_formats
	.comm	_MTK_FMT_DEC,8,3                ## @MTK_FMT_DEC
	.comm	_MTK_FMT_FRAME,8,3              ## @MTK_FMT_FRAME
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vidioc_enum_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_enum_fmt
_vidioc_enum_fmt:                       ; @vidioc_enum_fmt
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _NUM_FORMATS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_FORMATS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x9, #0
	mov	w10, #0
Lloh3:
	adrp	x11, _mtk_video_formats@GOTPAGE
Lloh4:
	ldr	x11, [x11, _mtk_video_formats@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
Lloh6:
	adrp	x12, _MTK_FMT_DEC@GOTPAGE
Lloh7:
	ldr	x12, [x12, _MTK_FMT_DEC@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
Lloh9:
	adrp	x13, _MTK_FMT_FRAME@GOTPAGE
Lloh10:
	ldr	x13, [x13, _MTK_FMT_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	x13, [x13]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	x11, x11, #16
	cmp	x8, x9
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11]
	cbz	w1, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x14, x12
	b.ne	LBB0_2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x14, x13
	b.ne	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w14, [x0]
	cmp	w10, w14
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w10, w10, #1
	b	LBB0_2
LBB0_8:
	mov	w9, #0
LBB0_9:
	cmp	w9, w8
	b.ne	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_11:
Lloh15:
	adrp	x10, _mtk_video_formats@GOTPAGE
Lloh16:
	ldr	x10, [x10, _mtk_video_formats@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	add	x9, x10, w9, uxtw #4
	ldr	d0, [x9, #8]
	stur	d0, [x0, #4]
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_FORMATS,4,2                ; @NUM_FORMATS
	.comm	_mtk_video_formats,8,3          ; @mtk_video_formats
	.comm	_MTK_FMT_DEC,8,3                ; @MTK_FMT_DEC
	.comm	_MTK_FMT_FRAME,8,3              ; @MTK_FMT_FRAME
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_enum_fmt
.subsections_via_symbols
