#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 pow(double, double const);
double square(double);
double Iq(double q, double fractal_dim_mass, double fractal_dim_surf,
          double rg_cluster, double rg_primary) {
  const double Dm = 0.5 * fractal_dim_mass;
  const double Dt = 0.5 * (6.0 - (fractal_dim_mass + fractal_dim_surf));
  const double t1 =
      Dm == 0. ? 1.0 : pow(1.0 + square(q * rg_cluster) / (3.0 * Dm), -Dm);
  const double t2 =
      Dt == 0. ? 1.0 : pow(1.0 + square(q * rg_primary) / (3.0 * Dt), -Dt);
  const double form = t1 * t2;
  return form;
}


x86 assembly (clang, -O0):
<Iq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  0xeb7(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xea3(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xe8f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11a4 <Iq+0x84>
jp     11a4 <Iq+0x84>
movsd  0xe76(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    11f9 <Iq+0xd9>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <square@plt>
movaps %xmm0,%xmm1
movsd  0xe5a(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe41(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    122d <Iq+0x10d>
jp     122d <Iq+0x10d>
movsd  0xded(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1282 <Iq+0x162>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1030 <square@plt>
movaps %xmm0,%xmm1
movsd  0xdd1(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdb8(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Iq>:
sub    $0x48,%rsp
movapd %xmm0,%xmm5
movsd  0xed0(%rip),%xmm0
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm7
mulsd  %xmm0,%xmm7
movsd  0xec4(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
xorpd  %xmm6,%xmm6
ucomisd %xmm6,%xmm7
movapd %xmm0,%xmm2
jne    1164 <Iq+0x44>
jnp    11da <Iq+0xba>
mulsd  %xmm5,%xmm3
movapd %xmm3,%xmm0
movapd %xmm1,0x10(%rsp)
movsd  %xmm4,0x8(%rsp)
movsd  %xmm5,0x28(%rsp)
movapd %xmm7,0x30(%rsp)
call   1030 <square@plt>
movsd  0xe87(%rip),%xmm1
movapd 0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  0xe69(%rip),%xmm0
xorpd  0xe71(%rip),%xmm2
movapd %xmm2,%xmm1
call   1040 <pow@plt>
xorpd  %xmm6,%xmm6
movsd  0x28(%rsp),%xmm5
movsd  0x8(%rsp),%xmm4
movapd 0x10(%rsp),%xmm1
movapd %xmm0,%xmm2
movsd  0xe36(%rip),%xmm0
ucomisd %xmm6,%xmm1
jne    11e2 <Iq+0xc2>
jnp    1230 <Iq+0x110>
mulsd  %xmm4,%xmm5
movapd %xmm5,%xmm0
movapd %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1030 <square@plt>
movsd  0xe15(%rip),%xmm1
movapd 0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
addsd  0xdf7(%rip),%xmm0
xorpd  0xdff(%rip),%xmm2
movapd %xmm2,%xmm1
call   1040 <pow@plt>
movsd  0x8(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @Iq(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%16 = load double, double* %7
%17 = fmul double 5.000000e-01, %16
store double %17, double* %11
%18 = load double, double* %7
%19 = load double, double* %8
%20 = fadd double %18, %19
%21 = fsub double 6.000000e+00, %20
%22 = fmul double 5.000000e-01, %21
store double %22, double* %12
%23 = load double, double* %11
%24 = fcmp oeq double %23, 0.000000e+00
br i1 %24, label %25, label %26
25: ; preds = %5
br label %38
26: ; preds = %5
%27 = load double, double* %6
%28 = load double, double* %9
%29 = fmul double %27, %28
%30 = call double @square(double %29)
%31 = load double, double* %11
%32 = fmul double 3.000000e+00, %31
%33 = fdiv double %30, %32
%34 = fadd double 1.000000e+00, %33
%35 = load double, double* %11
%36 = fneg double %35
%37 = call double @pow(double %34, double %36)
br label %38
38: ; preds = %26, %25
%39 = phi double [ 1.000000e+00, %25 ], [ %37, %26 ]
store double %39, double* %13
%40 = load double, double* %12
%41 = fcmp oeq double %40, 0.000000e+00
br i1 %41, label %42, label %43
42: ; preds = %38
br label %55
43: ; preds = %38
%44 = load double, double* %6
%45 = load double, double* %10
%46 = fmul double %44, %45
%47 = call double @square(double %46)
%48 = load double, double* %12
%49 = fmul double 3.000000e+00, %48
%50 = fdiv double %47, %49
%51 = fadd double 1.000000e+00, %50
%52 = load double, double* %12
%53 = fneg double %52
%54 = call double @pow(double %51, double %53)
br label %55
55: ; preds = %43, %42
%56 = phi double [ 1.000000e+00, %42 ], [ %54, %43 ]
store double %56, double* %14
%57 = load double, double* %13
%58 = load double, double* %14
%59 = fmul double %57, %58
store double %59, double* %15
%60 = load double, double* %15
ret double %60
}

LLVM IR (-O2):
define double @Iq(double %0, double %1, double %2, double %3, double %4) {
%6 = fmul double %1, 5.000000e-01
%7 = fadd double %1, %2
%8 = fsub double 6.000000e+00, %7
%9 = fmul double %8, 5.000000e-01
%10 = fcmp oeq double %6, 0.000000e+00
br i1 %10, label %19, label %11
11: ; preds = %5
%12 = fmul double %0, %3
%13 = tail call double @square(double %12)
%14 = fmul double %6, 3.000000e+00
%15 = fdiv double %13, %14
%16 = fadd double %15, 1.000000e+00
%17 = fneg double %6
%18 = tail call double @pow(double %16, double %17)
br label %19
19: ; preds = %5, %11
%20 = phi double [ %18, %11 ], [ 1.000000e+00, %5 ]
%21 = fcmp oeq double %9, 0.000000e+00
br i1 %21, label %30, label %22
22: ; preds = %19
%23 = fmul double %0, %4
%24 = tail call double @square(double %23)
%25 = fmul double %9, 3.000000e+00
%26 = fdiv double %24, %25
%27 = fadd double %26, 1.000000e+00
%28 = fneg double %9
%29 = tail call double @pow(double %27, double %28)
br label %30
30: ; preds = %19, %22
%31 = phi double [ %29, %22 ], [ 1.000000e+00, %19 ]
%32 = fmul double %20, %31
ret double %32
}