#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 fB(int, int, int, double, double, double, int, double);
double fact_ratio2(int, int);
double pow(double, int);
double B_term(int i1, int i2, int r1, int r2, int u, int l1, int l2, int l3,
              int l4, double Px, double Ax, double Bx, double Qx, double Cx,
              double Dx, double gamma1, double gamma2, double delta) {
  return fB(i1, l1, l2, Px, Ax, Bx, r1, gamma1) * pow(-1, i2) *
         fB(i2, l3, l4, Qx, Cx, Dx, r2, gamma2) * pow(-1, u) *
         fact_ratio2(i1 + i2 - 2 * (r1 + r2), u) *
         pow(Qx - Px, i1 + i2 - 2 * (r1 + r2) - 2 * u) /
         pow(delta, i1 + i2 - 2 * (r1 + r2) - u);
}


x86 assembly (clang, -O0):
<B_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  0x28(%rbp),%xmm8
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
movsd  %xmm5,-0x48(%rbp)
movsd  %xmm6,-0x50(%rbp)
movsd  %xmm7,-0x58(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    0x10(%rbp),%edx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mov    -0xc(%rbp),%ecx
movsd  -0x50(%rbp),%xmm3
call   1030 <fB@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x8(%rbp),%edi
movsd  0xe42(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8(%rbp),%edi
mov    0x18(%rbp),%esi
mov    0x20(%rbp),%edx
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mov    -0x10(%rbp),%ecx
movsd  -0x58(%rbp),%xmm3
call   1030 <fB@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x14(%rbp),%edi
movsd  0xde8(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
mov    -0x14(%rbp),%esi
call   1050 <fact_ratio2@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0x28(%rbp),%xmm0
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    %eax,%edi
sub    -0x14(%rbp),%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B_term>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movsd  %xmm7,0x8(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm0,0x30(%rsp)
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%r12d
mov    0x78(%rsp),%r13d
mov    0x70(%rsp),%edx
mov    %r9d,%esi
mov    %r15d,%ecx
movaps %xmm6,%xmm3
call   1030 <fB@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe72(%rip),%xmm0
mov    %ebx,%edi
call   1040 <pow@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %ebx,%edi
mov    %r13d,%esi
mov    0x80(%rsp),%edx
movsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
mov    %ebp,%ecx
movsd  0x8(%rsp),%xmm3
call   1030 <fB@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe20(%rip),%xmm0
mov    %r14d,%edi
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
add    %r12d,%ebx
add    %r15d,%ebp
add    %ebp,%ebp
sub    %ebp,%ebx
mov    %ebx,%edi
mov    %r14d,%esi
call   1050 <fact_ratio2@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
mov    %ebx,%edi
sub    %r14d,%edi
sub    %r14d,%edi
call   1040 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
sub    %r14d,%ebx
movsd  0x88(%rsp),%xmm0
mov    %ebx,%edi
call   1040 <pow@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @B_term(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17) {
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
store i32 %0, i32* %19
store i32 %1, i32* %20
store i32 %2, i32* %21
store i32 %3, i32* %22
store i32 %4, i32* %23
store i32 %5, i32* %24
store i32 %6, i32* %25
store i32 %7, i32* %26
store i32 %8, i32* %27
store double %9, double* %28
store double %10, double* %29
store double %11, double* %30
store double %12, double* %31
store double %13, double* %32
store double %14, double* %33
store double %15, double* %34
store double %16, double* %35
store double %17, double* %36
%37 = load i32, i32* %19
%38 = load i32, i32* %24
%39 = load i32, i32* %25
%40 = load double, double* %28
%41 = load double, double* %29
%42 = load double, double* %30
%43 = load i32, i32* %21
%44 = load double, double* %34
%45 = call double @fB(i32 %37, i32 %38, i32 %39, double %40, double %41, double %42, i32 %43, double %44)
%46 = load i32, i32* %20
%47 = call double @pow(double -1.000000e+00, i32 %46)
%48 = fmul double %45, %47
%49 = load i32, i32* %20
%50 = load i32, i32* %26
%51 = load i32, i32* %27
%52 = load double, double* %31
%53 = load double, double* %32
%54 = load double, double* %33
%55 = load i32, i32* %22
%56 = load double, double* %35
%57 = call double @fB(i32 %49, i32 %50, i32 %51, double %52, double %53, double %54, i32 %55, double %56)
%58 = fmul double %48, %57
%59 = load i32, i32* %23
%60 = call double @pow(double -1.000000e+00, i32 %59)
%61 = fmul double %58, %60
%62 = load i32, i32* %19
%63 = load i32, i32* %20
%64 = add nsw i32 %62, %63
%65 = load i32, i32* %21
%66 = load i32, i32* %22
%67 = add nsw i32 %65, %66
%68 = mul nsw i32 2, %67
%69 = sub nsw i32 %64, %68
%70 = load i32, i32* %23
%71 = call double @fact_ratio2(i32 %69, i32 %70)
%72 = fmul double %61, %71
%73 = load double, double* %31
%74 = load double, double* %28
%75 = fsub double %73, %74
%76 = load i32, i32* %19
%77 = load i32, i32* %20
%78 = add nsw i32 %76, %77
%79 = load i32, i32* %21
%80 = load i32, i32* %22
%81 = add nsw i32 %79, %80
%82 = mul nsw i32 2, %81
%83 = sub nsw i32 %78, %82
%84 = load i32, i32* %23
%85 = mul nsw i32 2, %84
%86 = sub nsw i32 %83, %85
%87 = call double @pow(double %75, i32 %86)
%88 = fmul double %72, %87
%89 = load double, double* %36
%90 = load i32, i32* %19
%91 = load i32, i32* %20
%92 = add nsw i32 %90, %91
%93 = load i32, i32* %21
%94 = load i32, i32* %22
%95 = add nsw i32 %93, %94
%96 = mul nsw i32 2, %95
%97 = sub nsw i32 %92, %96
%98 = load i32, i32* %23
%99 = sub nsw i32 %97, %98
%100 = call double @pow(double %89, i32 %99)
%101 = fdiv double %88, %100
ret double %101
}

LLVM IR (-O2):
define double @B_term(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, double %16, double %17) {
%19 = tail call double @fB(i32 %0, i32 %5, i32 %6, double %9, double %10, double %11, i32 %2, double %15)
%20 = tail call double @pow(double -1.000000e+00, i32 %1)
%21 = fmul double %19, %20
%22 = tail call double @fB(i32 %1, i32 %7, i32 %8, double %12, double %13, double %14, i32 %3, double %16)
%23 = fmul double %21, %22
%24 = tail call double @pow(double -1.000000e+00, i32 %4)
%25 = fmul double %23, %24
%26 = add nsw i32 %1, %0
%27 = add nsw i32 %3, %2
%28 = mul i32 %27, -2
%29 = add i32 %26, %28
%30 = tail call double @fact_ratio2(i32 %29, i32 %4)
%31 = fmul double %25, %30
%32 = fsub double %12, %9
%33 = mul i32 %4, -2
%34 = add i32 %29, %33
%35 = tail call double @pow(double %32, i32 %34)
%36 = fmul double %31, %35
%37 = sub nsw i32 %29, %4
%38 = tail call double @pow(double %17, i32 %37)
%39 = fdiv double %36, %38
ret double %39
}