	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zoran_try_fmt_vid_cap
_zoran_try_fmt_vid_cap:                 ## @zoran_try_fmt_vid_cap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	(%rdx), %rax
	movq	_V4L2_PIX_FMT_MJPEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.10:
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_zoran_try_fmt_vid_out          ## TAILCALL
LBB0_1:
	movq	(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_NUM_FORMATS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.5:
	movq	_zoran_formats@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	(%rbx), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	addq	$16, %rdx
	cmpq	%rcx, %rax
	jne	LBB0_6
	jmp	LBB0_8
LBB0_2:
	xorl	%ecx, %ecx
LBB0_3:
	cmpl	%eax, %ecx
	jne	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	movq	_zoran_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	shlq	$4, %rcx
	movl	8(%rax,%rcx), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	leaq	12(%rbx), %rdi
	movq	_BUZ_MIN_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BUZ_MAX_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%r8d, %r8d
	cmpl	$2, %eax
	sete	%r8b
	movl	$2, %ecx
	subl	%r8d, %ecx
	addq	$8, %rbx
	movq	_BUZ_MIN_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_BUZ_MAX_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%rbx, %r8
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_PIX_FMT_MJPEG,8,3         ## @V4L2_PIX_FMT_MJPEG
	.comm	_NUM_FORMATS,4,2                ## @NUM_FORMATS
	.comm	_zoran_formats,8,3              ## @zoran_formats
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BUZ_MIN_WIDTH,4,2              ## @BUZ_MIN_WIDTH
	.comm	_BUZ_MAX_WIDTH,4,2              ## @BUZ_MAX_WIDTH
	.comm	_BUZ_MIN_HEIGHT,4,2             ## @BUZ_MIN_HEIGHT
	.comm	_BUZ_MAX_HEIGHT,4,2             ## @BUZ_MAX_HEIGHT
	.no_dead_strip	_zoran_try_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zoran_try_fmt_vid_cap
_zoran_try_fmt_vid_cap:                 ; @zoran_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _V4L2_PIX_FMT_MJPEG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_PIX_FMT_MJPEG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_zoran_try_fmt_vid_out
LBB0_2:
	ldr	x19, [x1]
	mov	x0, x19
	bl	_mutex_lock
Lloh3:
	adrp	x8, _NUM_FORMATS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NUM_FORMATS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x9, #0
Lloh6:
	adrp	x10, _zoran_formats@GOTPAGE
Lloh7:
	ldr	x10, [x10, _zoran_formats@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x11, [x20]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	cmp	x12, x11
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	add	x10, x10, #16
	cmp	x8, x9
	b.ne	LBB0_4
	b	LBB0_8
LBB0_6:
	mov	w9, #0
LBB0_7:
	cmp	w9, w8
	b.ne	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
Lloh12:
	adrp	x8, _zoran_formats@GOTPAGE
Lloh13:
	ldr	x8, [x8, _zoran_formats@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x8, x8, w9, uxtw #4
	ldr	w0, [x8, #8]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	add	x8, x20, #12
Lloh15:
	adrp	x9, _BUZ_MIN_WIDTH@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BUZ_MIN_WIDTH@GOTPAGEOFF]
Lloh17:
	adrp	x10, _BUZ_MAX_WIDTH@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BUZ_MAX_WIDTH@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
Lloh20:
	ldr	w2, [x10]
	cmp	w0, #2
	mov	w9, #1
	cinc	w3, w9, ne
	add	x4, x20, #8
Lloh21:
	adrp	x9, _BUZ_MIN_HEIGHT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BUZ_MIN_HEIGHT@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x9]
Lloh24:
	adrp	x9, _BUZ_MAX_HEIGHT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BUZ_MAX_HEIGHT@GOTPAGEOFF]
Lloh26:
	ldr	w6, [x9]
	str	wzr, [sp]
	mov	x0, x8
	mov	w7, #0
	bl	_v4l_bound_align_image
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_PIX_FMT_MJPEG,8,3         ; @V4L2_PIX_FMT_MJPEG
	.comm	_NUM_FORMATS,4,2                ; @NUM_FORMATS
	.comm	_zoran_formats,8,3              ; @zoran_formats
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BUZ_MIN_WIDTH,4,2              ; @BUZ_MIN_WIDTH
	.comm	_BUZ_MAX_WIDTH,4,2              ; @BUZ_MAX_WIDTH
	.comm	_BUZ_MIN_HEIGHT,4,2             ; @BUZ_MIN_HEIGHT
	.comm	_BUZ_MAX_HEIGHT,4,2             ; @BUZ_MAX_HEIGHT
	.no_dead_strip	_zoran_try_fmt_vid_cap
.subsections_via_symbols
