	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function correct_framerate
LCPI0_0:
	.quad	0x3fa999999999999a              ## double 0.050000000000000003
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_correct_framerate
	.p2align	4, 0x90
_correct_framerate:                     ## @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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	jle	LBB0_8
## %bb.1:
	movq	8(%rdi), %rax
	testq	%rax, %rax
	jle	LBB0_8
## %bb.2:
	movq	%rsi, %rbx
	cmpl	$1, (%rsi)
	je	LBB0_8
## %bb.3:
	imulq	$90000, %rax, %rdx              ## imm = 0x15F90
	movq	%rdx, -32(%rbp)
	movq	%rcx, -16(%rbp)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-32(%rbp), %rdi
	leaq	-16(%rbp), %rsi
	callq	_hb_limit_rational64
	movl	-32(%rbp), %eax
	leaq	8(%rbx), %rdi
	movl	%eax, 8(%rbx)
	cvtsi2sdq	-16(%rbp), %xmm0
	movsd	%xmm0, 16(%rbx)
	movl	$2, %esi
	callq	_hb_video_framerate_get_close
	movq	%rax, -16(%rbp)
	testq	%rax, %rax
	jle	LBB0_4
## %bb.5:
	leaq	-40(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	callq	_hb_video_framerate_get_limits
	movl	-20(%rbp), %eax
	movl	%eax, 8(%rbx)
	cvtsi2sdq	-16(%rbp), %xmm1
	movsd	%xmm1, 16(%rbx)
	jmp	LBB0_6
LBB0_4:
	movl	8(%rbx), %eax
	movsd	16(%rbx), %xmm1                 ## xmm1 = mem[0],zero
LBB0_6:
	xorps	%xmm0, %xmm0
	cvtsi2sdq	32(%rbx), %xmm0
	cvtsi2sd	%eax, %xmm2
	unpcklpd	%xmm2, %xmm0                    ## xmm0 = xmm0[0],xmm2[0]
	movsd	24(%rbx), %xmm2                 ## xmm2 = mem[0],zero
	unpcklpd	%xmm1, %xmm2                    ## xmm2 = xmm2[0],xmm1[0]
	divpd	%xmm2, %xmm0
	movapd	%xmm0, %xmm1
	unpckhpd	%xmm0, %xmm1                    ## xmm1 = xmm1[1],xmm0[1]
	subsd	%xmm1, %xmm0
	callq	_ABS
	ucomisd	LCPI0_0(%rip), %xmm0
	jbe	LBB0_8
## %bb.7:
	movq	32(%rbx), %rsi
	movsd	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	movl	8(%rbx), %edx
	movsd	16(%rbx), %xmm1                 ## xmm1 = mem[0],zero
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"work: correcting framerate, %d/%d -> %d/%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_correct_framerate              ; -- Begin function correct_framerate
	.p2align	2
_correct_framerate:                     ; @correct_framerate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x3, [x0]
	cmp	x3, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	x8, [x0, #8]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x19, x1
	ldr	w9, [x1]
	cmp	w9, #1
	b.eq	LBB0_8
; %bb.3:
	mov	w9, #24464
	movk	w9, #1, lsl #16
	mul	x2, x8, x9
	stp	x3, x2, [sp, #16]
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_hb_limit_rational64
	ldr	x8, [sp, #24]
	mov	x0, x19
	str	w8, [x0, #8]!
	ldr	d0, [sp, #16]
	scvtf	d0, d0
	str	d0, [x0, #8]
	mov	w1, #2
	bl	_hb_video_framerate_get_close
	str	x0, [sp, #16]
	cmp	x0, #0
	b.le	LBB0_5
; %bb.4:
	add	x0, sp, #12
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_hb_video_framerate_get_limits
	ldr	w8, [sp, #4]
	str	w8, [x19, #8]
	ldr	d0, [sp, #16]
	scvtf	d0, d0
	str	d0, [x19, #16]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x19, #8]
	ldr	d0, [x19, #16]
LBB0_6:
	ldp	d2, d1, [x19, #24]
	scvtf	d1, d1
	fdiv	d1, d1, d2
	scvtf	d2, w8
	fdiv	d0, d2, d0
	fsub	d0, d1, d0
	bl	_ABS
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16297, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.le	LBB0_8
; %bb.7:
	ldr	x1, [x19, #32]
	ldr	w2, [x19, #8]
	ldp	d1, d0, [x19, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"work: correcting framerate, %d/%d -> %d/%d"

.subsections_via_symbols
