	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zoran_v4l2_calc_bufsize
_zoran_v4l2_calc_bufsize:               ## @zoran_v4l2_calc_bufsize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	4(%rdi), %ecx
	imull	(%rdi), %ecx
	imull	8(%rdi), %ecx
	movl	$524288, %eax                   ## imm = 0x80000
	xorl	%edx, %edx
	idivl	%ecx
	movl	$2, %ecx
	decl	%eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%edx
	addl	%ecx, %ecx
	cmpl	$1, %eax
	movl	%edx, %eax
	ja	LBB0_2
LBB0_3:
	movq	_jpg_bufsize@GOTPCREL(%rip), %rdx
	cmpl	$8193, %ecx                     ## imm = 0x2001
	movl	$8192, %eax                     ## imm = 0x2000
	cmovgel	%ecx, %eax
	movl	(%rdx), %edx
	cmpl	%edx, %ecx
	cmovgl	%edx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jpg_bufsize,4,2                ## @jpg_bufsize
	.no_dead_strip	_zoran_v4l2_calc_bufsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zoran_v4l2_calc_bufsize
_zoran_v4l2_calc_bufsize:               ; @zoran_v4l2_calc_bufsize
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x0]
	mul	w8, w9, w8
	ldr	w9, [x0, #8]
	mul	w8, w8, w9
	mov	w9, #524288
	sdiv	w8, w9, w8
	subs	w9, w8, #1
	b.eq	LBB0_3
; %bb.1:
	mov	w8, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w9, #1
	lsl	w8, w8, #1
	cmp	w9, #1
	mov	x9, x10
	b.hi	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w8, #2
LBB0_4:
Lloh0:
	adrp	x9, _jpg_bufsize@GOTPAGE
Lloh1:
	ldr	x9, [x9, _jpg_bufsize@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #8192
	cmp	w8, #2, lsl #12                 ; =8192
	csel	w10, w8, w10, gt
	cmp	w8, w9
	csel	w0, w9, w10, gt
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_jpg_bufsize,4,2                ; @jpg_bufsize
	.no_dead_strip	_zoran_v4l2_calc_bufsize
.subsections_via_symbols
