	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_compute_sample_count
_mxf_compute_sample_count:              ## @mxf_compute_sample_count
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rsi), %rbx
	movl	(%rbx), %edi
	callq	_av_inv_q
	movq	%rax, %r12
	movl	16(%r15), %edi
	callq	_av_inv_q
	movq	%rax, %r10
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r10, %r14
	shrq	$32, %r14
	movl	%r10d, %eax
	cltd
	idivl	%r14d
	cmpl	$48000, %eax                    ## imm = 0xBB80
	movq	%r12, %rbx
	jne	LBB0_9
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movq	%r10, %r12
	callq	_ff_mxf_get_samples_per_frame
	movq	%r12, %r10
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	(%rax), %rcx
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	testq	%rcx, %rcx
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ecx, %r14d
	movq	8(%rax,%rbx,8), %rcx
	incq	%rbx
	testq	%rcx, %rcx
	jne	LBB0_4
LBB0_6:
	movl	%ebx, %edi
	callq	_av_assert2
	movl	%r13d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r13d
	imull	%r14d, %r13d
	testl	%edx, %edx
	jle	LBB0_20
## %bb.7:
	movq	(%r12), %rax
	movl	%edx, %ecx
	cmpl	$4, %edx
	jae	LBB0_12
## %bb.8:
	xorl	%edx, %edx
	jmp	LBB0_19
LBB0_9:
	movq	%rbx, %r9
	shrq	$32, %r9
	movl	%r10d, %eax
	imull	%ebx, %eax
	movl	%r14d, %ecx
	imull	%r9d, %ecx
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %r8d
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%r14
	pushq	%r10
	movq	%r10, %rbx
	callq	_av_log
	movq	%rbx, %r10
	addq	$16, %rsp
LBB0_11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	%r13d, %edi
	movq	%r10, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_rescale_q                   ## TAILCALL
LBB0_12:
	movl	%ecx, %edx
	andl	$-4, %edx
	movd	%r13d, %xmm0
	leaq	-4(%rdx), %rsi
	movq	%rsi, %rbx
	shrq	$2, %rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.14:
	movq	%rbx, %rsi
	andq	$-2, %rsi
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rax,%rdi,8), %xmm2
	movdqu	16(%rax,%rdi,8), %xmm3
	movdqu	32(%rax,%rdi,8), %xmm4
	movdqu	48(%rax,%rdi,8), %xmm5
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	paddd	%xmm1, %xmm3
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm5, %xmm1              ## xmm1 = xmm5[0,2,2,3]
	paddd	%xmm3, %xmm1
	addq	$8, %rdi
	addq	$-2, %rsi
	jne	LBB0_15
## %bb.16:
	testb	$1, %bl
	je	LBB0_18
LBB0_17:
	movdqu	(%rax,%rdi,8), %xmm2
	movdqu	16(%rax,%rdi,8), %xmm3
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
LBB0_18:
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %r13d
	cmpq	%rcx, %rdx
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rax,%rdx,8), %r13d
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_19
LBB0_20:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	testb	$1, %bl
	jne	LBB0_17
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"seeking detected on stream #%d with time base (%d/%d) and sample rate (%d/%d), audio pts won't be accurate.\n"

	.no_dead_strip	_mxf_compute_sample_count
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_compute_sample_count
_mxf_compute_sample_count:              ; @mxf_compute_sample_count
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x22, x1
	mov	x24, x0
	ldr	x26, [x1, #24]
	ldr	w0, [x26]
	bl	_av_inv_q
	mov	x23, x0
	ldr	w0, [x22, #16]
	bl	_av_inv_q
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.1:
	mov	x21, x0
	lsr	x25, x0, #32
	sdiv	w8, w21, w25
	mov	w9, #48000
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [x24]
	mov	x1, x23
	bl	_ff_mxf_get_samples_per_frame
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x9, [x8]
	cbz	x9, LBB0_9
; %bb.4:
	mov	x21, #0
	mov	w22, #0
	add	x8, x8, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w22, w9
	ldr	x9, [x8, x21, lsl #3]
	add	x21, x21, #1
	cbnz	x9, LBB0_5
	b	LBB0_10
LBB0_6:
	lsr	x5, x23, #32
	mul	w8, w21, w23
	mul	w9, w25, w5
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w0, [x24]
Lloh3:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w3, [x22]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x4, x23
                                        ; kill: def $w5 killed $w5 killed $x5
	mov	x6, x21
	mov	x7, x25
	bl	_av_log
LBB0_8:
	ldr	w2, [x26]
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_av_rescale_q
LBB0_9:
	mov	w21, #0
	mov	w22, #0
LBB0_10:
	mov	x0, x21
	bl	_av_assert2
	sdiv	w8, w19, w21
	mul	w11, w8, w22
	msub	w8, w8, w21, w19
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	ldr	x9, [x20]
	cmp	w8, #8
	b.hs	LBB0_14
; %bb.12:
	mov	x10, #0
	b	LBB0_17
LBB0_13:
	mov	x19, x11
	b	LBB0_19
LBB0_14:
	movi	d0, #0000000000000000
	mov.s	v0[0], w11
	and	x10, x8, #0xfffffff8
	movi.2d	v1, #0000000000000000
	add	x11, x9, #32
	mov	x12, x10
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	subs	x12, x12, #8
	b.ne	LBB0_15
; %bb.16:
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w11, s0
	mov	x19, x11
	cmp	x10, x8
	b.eq	LBB0_19
LBB0_17:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
	mov	x19, x11
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9], #8
	add	w19, w19, w10
	subs	x8, x8, #1
	b.ne	LBB0_18
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVMEDIA_TYPE_AUDIO,8,3         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"seeking detected on stream #%d with time base (%d/%d) and sample rate (%d/%d), audio pts won't be accurate.\n"

	.no_dead_strip	_mxf_compute_sample_count
.subsections_via_symbols
