	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ov_bitrate                     ## -- Begin function ov_bitrate
	.p2align	4, 0x90
_ov_bitrate:                            ## @ov_bitrate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_OPENED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_1
## %bb.2:
	movl	8(%rdi), %r9d
	cmpl	%esi, %r9d
	jle	LBB0_1
## %bb.3:
	movq	40(%rdi), %rax
	testl	%esi, %esi
	je	LBB0_11
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	testl	%r9d, %r9d
	jle	LBB0_1
## %bb.6:
	movq	32(%rdi), %rcx
	movq	(%rcx), %rax
	testq	%rax, %rax
	jg	LBB0_34
## %bb.7:
	movl	8(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_32
## %bb.8:
	movl	12(%rcx), %ecx
	jmp	LBB0_9
LBB0_1:
	movq	_OV_EINVAL@GOTPCREL(%rip), %rax
LBB0_33:
	movq	(%rax), %rax
LBB0_34:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	testl	%esi, %esi
	js	LBB0_12
## %bb.27:
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	16(%rdi), %rax
	movq	24(%rdi), %rcx
	movl	%esi, %edx
	movl	4(%rax,%rdx,4), %eax
	subl	(%rcx,%rdx,4), %eax
	imull	$8000, %eax, %ebx               ## imm = 0x1F40
	jmp	LBB0_26
LBB0_12:
	testl	%r9d, %r9d
	jle	LBB0_13
## %bb.14:
	movq	16(%rdi), %r10
	movq	24(%rdi), %rdx
	cmpl	$8, %r9d
	jae	LBB0_16
## %bb.15:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_29:
	movq	32(%rdi), %rcx
	movl	%esi, %edx
	shlq	$4, %rdx
	movq	(%rcx,%rdx), %rax
	testq	%rax, %rax
	jg	LBB0_34
## %bb.30:
	movl	8(%rcx,%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_32
## %bb.31:
	movl	12(%rcx,%rdx), %ecx
LBB0_9:
	testl	%ecx, %ecx
	jle	LBB0_34
## %bb.10:
	addq	%rax, %rcx
	shrq	%rcx
	movq	%rcx, %rax
	jmp	LBB0_34
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_16:
	movl	%r9d, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movq	%r8, %rax
	andq	$-2, %rax
	pxor	%xmm2, %xmm2
	xorl	%ebx, %ebx
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movdqu	4(%r10,%rbx,4), %xmm4
	movdqu	20(%r10,%rbx,4), %xmm5
	movdqu	36(%r10,%rbx,4), %xmm0
	movdqu	52(%r10,%rbx,4), %xmm1
	movdqu	(%rdx,%rbx,4), %xmm6
	psubd	%xmm6, %xmm4
	movdqu	16(%rdx,%rbx,4), %xmm6
	psubd	%xmm6, %xmm5
	movdqu	32(%rdx,%rbx,4), %xmm6
	psubd	%xmm6, %xmm0
	movdqu	48(%rdx,%rbx,4), %xmm6
	psubd	%xmm6, %xmm1
	pslld	$3, %xmm4
	paddd	%xmm2, %xmm4
	pslld	$3, %xmm5
	paddd	%xmm3, %xmm5
	pslld	$3, %xmm0
	paddd	%xmm4, %xmm0
	pslld	$3, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rbx
	movdqa	%xmm0, %xmm2
	movdqa	%xmm1, %xmm3
	addq	$-2, %rax
	jne	LBB0_19
	jmp	LBB0_20
LBB0_32:
	movq	_OV_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_17:
	pxor	%xmm0, %xmm0
	xorl	%ebx, %ebx
	pxor	%xmm1, %xmm1
LBB0_20:
	testb	$1, %r8b
	je	LBB0_22
## %bb.21:
	leaq	(,%rbx,4), %rax
	orq	$4, %rax
	movdqu	(%r10,%rax), %xmm2
	movdqu	16(%r10,%rax), %xmm3
	movdqu	(%rdx,%rbx,4), %xmm4
	psubd	%xmm4, %xmm2
	movdqu	16(%rdx,%rbx,4), %xmm4
	psubd	%xmm4, %xmm3
	pslld	$3, %xmm2
	paddd	%xmm2, %xmm0
	pslld	$3, %xmm3
	paddd	%xmm3, %xmm1
LBB0_22:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpq	%r9, %rcx
	je	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r10,%rcx,4), %ebx
	subl	(%rdx,%rcx,4), %ebx
	leaq	1(%rcx), %rsi
	leal	(%rax,%rbx,8), %eax
	movq	%rsi, %rcx
	cmpq	%rsi, %r9
	jne	LBB0_23
LBB0_24:
	imull	$1000, %eax, %ebx               ## imm = 0x3E8
LBB0_25:
	movl	$-1, %esi
LBB0_26:
	callq	_ov_time_total
	movl	%eax, %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	cltq
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
	.comm	_OPENED,8,3                     ## @OPENED
	.comm	_OV_EINVAL,8,3                  ## @OV_EINVAL
	.comm	_OV_FALSE,8,3                   ## @OV_FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ov_bitrate                     ; -- Begin function ov_bitrate
	.p2align	2
_ov_bitrate:                            ; @ov_bitrate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _OPENED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OPENED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.1:
	ldr	w8, [x0, #8]
	cmp	w8, w1
	b.le	LBB0_8
; %bb.2:
	ldr	x9, [x0, #40]
	cbz	w1, LBB0_11
; %bb.3:
	cbnz	x9, LBB0_11
; %bb.4:
	cmp	w8, #0
	b.le	LBB0_8
; %bb.5:
	ldr	x8, [x0, #32]
	ldr	x0, [x8]
	cmp	x0, #0
	b.gt	LBB0_10
; %bb.6:
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_29
; %bb.7:
	ldr	w8, [x8, #12]
	cmp	w8, #1
	add	x8, x8, x9
	lsr	x8, x8, #1
	csel	x0, x9, x8, lt
	b	LBB0_10
LBB0_8:
Lloh3:
	adrp	x8, _OV_EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OV_EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	x0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	tbnz	w1, #31, LBB0_14
; %bb.12:
	cbz	x9, LBB0_17
; %bb.13:
	add	w8, w1, #1
	ldp	x9, x10, [x0, #16]
	ldr	w8, [x9, w8, uxtw #2]
	ldr	w9, [x10, w1, uxtw #2]
	sub	w8, w8, w9
	mov	w9, #8000
	mul	w19, w8, w9
	b	LBB0_28
LBB0_14:
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.15:
	ldp	x9, x10, [x0, #16]
	cmp	w8, #16
	b.hs	LBB0_21
; %bb.16:
	mov	x11, #0
	mov	w12, #0
	b	LBB0_24
LBB0_17:
	ldr	x8, [x0, #32]
	mov	w9, w1
	lsl	x10, x9, #4
	ldr	x0, [x8, x10]
	cmp	x0, #0
	b.gt	LBB0_10
; %bb.18:
	add	x9, x8, x9, lsl #4
	ldr	w8, [x9, #8]
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.19:
	ldr	w9, [x9, #12]
	cmp	w9, #1
	add	x9, x9, x8
	lsr	x9, x9, #1
	csel	x0, x8, x9, lt
	b	LBB0_10
LBB0_20:
	mov	w19, #0
	b	LBB0_27
LBB0_21:
	and	x11, x8, #0xfffffff0
	add	x12, x10, #32
	add	x13, x9, #36
	movi.2d	v0, #0000000000000000
	mov	x14, x11
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x13, #-32]
	ldp	q6, q7, [x13], #64
	ldp	q16, q17, [x12, #-32]
	ldp	q18, q19, [x12], #64
	sub.4s	v4, v4, v16
	sub.4s	v5, v5, v17
	sub.4s	v6, v6, v18
	sub.4s	v7, v7, v19
	shl.4s	v4, v4, #3
	shl.4s	v5, v5, #3
	shl.4s	v6, v6, #3
	shl.4s	v7, v7, #3
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x14, x14, #16
	b.ne	LBB0_22
; %bb.23:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x11, x8
	b.eq	LBB0_26
LBB0_24:
	lsl	x13, x11, #2
	add	x10, x10, x13
	sub	x8, x8, x11
	add	x9, x13, x9
	add	x9, x9, #4
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	ldr	w13, [x10], #4
	sub	w11, w11, w13
	add	w12, w12, w11, lsl #3
	subs	x8, x8, #1
	b.ne	LBB0_25
LBB0_26:
	mov	w8, #1000
	mul	w19, w12, w8
LBB0_27:
	mov	w1, #-1
LBB0_28:
	bl	_ov_time_total
	sdiv	w8, w19, w0
	sxtw	x0, w8
	b	LBB0_10
LBB0_29:
Lloh5:
	adrp	x8, _OV_FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OV_FALSE@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_OPENED,8,3                     ; @OPENED
	.comm	_OV_EINVAL,8,3                  ; @OV_EINVAL
	.comm	_OV_FALSE,8,3                   ; @OV_FALSE
.subsections_via_symbols
