	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function xvid_correct_framerate
LCPI0_0:
	.long	0x447a0000                      ## float 1000
LCPI0_2:
	.long	0x42c80000                      ## float 100
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x408f400000000000              ## double 1000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xvid_correct_framerate:                ## @xvid_correct_framerate
	.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
	movq	%rdi, %r14
	movl	(%rdi), %r15d
	movl	4(%rdi), %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_av_gcd
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ebx
LBB0_2:
	cmpl	$65000, %r15d                   ## imm = 0xFDE8
	jg	LBB0_4
## %bb.3:
	cmpl	$65000, %ebx                    ## imm = 0xFDE8
	jle	LBB0_9
LBB0_4:
	cvtsi2ss	%r15d, %xmm1
	cvtsi2ss	%ebx, %xmm0
	divss	%xmm0, %xmm1
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	mulss	%xmm1, %xmm0
	callq	_roundf
	divsd	LCPI0_1(%rip), %xmm0
	xorps	%xmm1, %xmm1
	cvtsd2ss	%xmm0, %xmm1
	cvttss2si	%xmm1, %r12d
	cvttps2dq	%xmm1, %xmm0
	cvtdq2ps	%xmm0, %xmm0
	movl	$1, %r13d
	ucomiss	%xmm0, %xmm1
	movaps	%xmm1, -64(%rbp)                ## 16-byte Spill
	jbe	LBB0_6
## %bb.5:
	imull	$1000, %r12d, %r12d             ## imm = 0x3E8
	addl	$1000, %r12d                    ## imm = 0x3E8
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r12d, %xmm0
	divss	%xmm1, %xmm0
	callq	_roundf
	cvttsd2si	%xmm0, %r13d
LBB0_6:
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	_av_gcd
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.7:
	movl	%eax, %ecx
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
LBB0_8:
	movaps	-64(%rbp), %xmm0                ## 16-byte Reload
	cmpl	%r13d, %ebx
	jle	LBB0_9
## %bb.10:
	movl	%r12d, (%r14)
	movl	%r13d, 4(%r14)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movaps	%xmm0, %xmm1
	movss	-44(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm2, %xmm1
	divss	%xmm2, %xmm1
	mulss	LCPI0_2(%rip), %xmm1
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
LBB0_9:
	movl	%r15d, (%r14)
	movl	%ebx, 4(%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Xvid: framerate re-estimated: %.2f, %.3f%% correction\n"

	.no_dead_strip	_xvid_correct_framerate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xvid_correct_framerate
_xvid_correct_framerate:                ; @xvid_correct_framerate
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	ldp	w21, w20, [x0]
	mov	x0, x21
	mov	x1, x20
	bl	_av_gcd
	cmp	w0, #2
	b.lt	LBB0_2
; %bb.1:
	sdiv	w21, w21, w0
	sdiv	w20, w20, w0
LBB0_2:
	mov	w8, #65000
	cmp	w21, w8
	ccmp	w20, w8, #0, le
	b.le	LBB0_10
; %bb.3:
	scvtf	s0, w21
	scvtf	s1, w20
	fdiv	s9, s0, s1
	mov	w8, #1148846080
	fmov	s0, w8
	fmul	s0, s9, s0
	bl	_roundf
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	fcvt	s8, d0
	fcvtzs	s0, s8
	fcvtzs	w22, s8
	scvtf	s0, s0
	fcmp	s8, s0
	b.le	LBB0_5
; %bb.4:
	mov	w8, #1000
	mul	w8, w22, w8
	add	w22, w8, #1000
	scvtf	s0, w22
	fdiv	s0, s0, s8
	bl	_roundf
	fcvtzs	w23, d0
	b	LBB0_6
LBB0_5:
	mov	w23, #1
LBB0_6:
	mov	x0, x22
	mov	x1, x23
	bl	_av_gcd
	cmp	w0, #2
	b.lt	LBB0_8
; %bb.7:
	sdiv	w22, w22, w0
	sdiv	w23, w23, w0
LBB0_8:
	cmp	w20, w23
	b.le	LBB0_10
; %bb.9:
	stp	w22, w23, [x19]
Lloh0:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	fsub	s0, s8, s9
	fdiv	s0, s0, s9
	mov	w8, #1120403456
	fmov	s1, w8
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	fmul	s1, s0, s1
	mov	x0, x19
	fmov	s0, s8
	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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	b	_av_log
LBB0_10:
	stp	w21, w20, [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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Xvid: framerate re-estimated: %.2f, %.3f%% correction\n"

	.no_dead_strip	_xvid_correct_framerate
.subsections_via_symbols
