#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double ceil(double);
double calc(double symbols, double mod, double num, double den, double bch,
            double pilots) {
  double fec_frame = 64800.0;
  double tsrate;
  tsrate =
      symbols /
      (fec_frame / mod + 90 + ceil((fec_frame / mod / 90 / 16 - 1)) * pilots) *
      (fec_frame * (num / den) - (16 * bch) - 80);
  return (tsrate);
}


x86 assembly (clang, -O0):
<calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0xeb9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0xe9e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe82(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe7e(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  -0x50(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm3
divsd  -0x20(%rbp),%xmm3
movsd  0xe38(%rip),%xmm2
mulsd  -0x28(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe04(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc>:
sub    $0x38,%rsp
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  0xec6(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
divsd  %xmm1,%xmm0
mulsd  0xeb0(%rip),%xmm0
addsd  0xeb0(%rip),%xmm0
call   1030 <ceil@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
divsd  0x28(%rsp),%xmm0
movsd  0x30(%rsp),%xmm2
mulsd  0xe83(%rip),%xmm2
mulsd  0xe5b(%rip),%xmm0
addsd  %xmm2,%xmm0
addsd  0xe77(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @calc(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 6.480000e+04, double* %13
%15 = load double, double* %7
%16 = load double, double* %13
%17 = load double, double* %8
%18 = fdiv double %16, %17
%19 = fadd double %18, 9.000000e+01
%20 = load double, double* %13
%21 = load double, double* %8
%22 = fdiv double %20, %21
%23 = fdiv double %22, 9.000000e+01
%24 = fdiv double %23, 1.600000e+01
%25 = fsub double %24, 1.000000e+00
%26 = call double @llvm.ceil.f64(double %25)
%27 = load double, double* %12
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double %19)
%29 = fdiv double %15, %28
%30 = load double, double* %13
%31 = load double, double* %9
%32 = load double, double* %10
%33 = fdiv double %31, %32
%34 = load double, double* %11
%35 = fmul double 1.600000e+01, %34
%36 = fneg double %35
%37 = call double @llvm.fmuladd.f64(double %30, double %33, double %36)
%38 = fsub double %37, 8.000000e+01
%39 = fmul double %29, %38
store double %39, double* %14
%40 = load double, double* %14
ret double %40
}

LLVM IR (-O2):
define double @calc(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fdiv double 6.480000e+04, %1
%8 = fadd double %7, 9.000000e+01
%9 = fdiv double %7, 9.000000e+01
%10 = fmul double %9, 6.250000e-02
%11 = fadd double %10, -1.000000e+00
%12 = tail call double @llvm.ceil.f64(double %11)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %5, double %8)
%14 = fdiv double %0, %13
%15 = fdiv double %2, %3
%16 = fmul double %4, -1.600000e+01
%17 = tail call double @llvm.fmuladd.f64(double %15, double 6.480000e+04, double %16)
%18 = fadd double %17, -8.000000e+01
%19 = fmul double %18, %14
ret double %19
}