#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 M_PI;
double atan(double);
double log(double);
double sqrt(double);
double identicalAlignedParallelRects1(double a, double b, double c) {
  double X2, Y2, sqrt1pX2, sqrt1pY2;
  double X = a / c;
  double Y = b / c;
  X2 = X * X;
  Y2 = Y * Y;
  sqrt1pX2 = sqrt(1.0 + X2);
  sqrt1pY2 = sqrt(1.0 + Y2);
  return 2.0 *
         (0.5 * log((1.0 + X2) * (1.0 + Y2) / (1 + X2 + Y2)) +
          X * sqrt1pY2 * atan(X / sqrt1pY2) +
          Y * sqrt1pX2 * atan(Y / sqrt1pX2) - X * atan(X) - Y * atan(Y)) /
         (M_PI * X * Y);
}


x86 assembly (clang, -O0):
<identicalAlignedParallelRects1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe82(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe6b(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xe54(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xe47(%rip),%xmm1
addsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe36(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
addsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <log@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
call   1030 <atan@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xdd9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
call   1030 <atan@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1030 <atan@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1030 <atan@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xcff(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    0x2cdc(%rip),%rax
movsd  (%rax),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<identicalAlignedParallelRects1>:
sub    $0x68,%rsp
unpcklpd %xmm0,%xmm1
unpcklpd %xmm2,%xmm2
divpd  %xmm2,%xmm1
movapd %xmm1,0x50(%rsp)
movapd %xmm1,%xmm0
mulpd  %xmm1,%xmm0
movapd 0xeaa(%rip),%xmm1
movapd %xmm0,0x30(%rsp)
addpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movapd %xmm1,0x10(%rsp)
movapd %xmm0,0x20(%rsp)
jb     1184 <identicalAlignedParallelRects1+0x54>
sqrtsd %xmm0,%xmm0
jmp    1193 <identicalAlignedParallelRects1+0x63>
call   1050 <sqrt@plt>
xorpd  %xmm2,%xmm2
movapd 0x10(%rsp),%xmm1
movsd  %xmm0,0x8(%rsp)
ucomisd %xmm2,%xmm1
jb     11a8 <identicalAlignedParallelRects1+0x78>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11b7 <identicalAlignedParallelRects1+0x87>
movapd %xmm1,%xmm0
call   1050 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
movsd  %xmm0,0x48(%rsp)
movapd 0x30(%rsp),%xmm0
movapd 0x20(%rsp),%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <log@plt>
movsd  %xmm0,0x30(%rsp)
movapd 0x50(%rsp),%xmm0
unpckhpd %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
movapd %xmm0,%xmm2
movsd  0x48(%rsp),%xmm1
mulsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
divsd  %xmm1,%xmm0
call   1030 <atan@plt>
movsd  0x30(%rsp),%xmm1
mulsd  0xdf1(%rip),%xmm1
mulsd  0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x30(%rsp)
movapd 0x50(%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
divsd  %xmm1,%xmm0
call   1030 <atan@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
call   1030 <atan@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd 0x50(%rsp),%xmm0
call   1030 <atan@plt>
movapd 0x50(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm0,%xmm2
addsd  %xmm2,%xmm2
movapd %xmm2,%xmm0
mov    0x2d35(%rip),%rax
movsd  (%rax),%xmm2
mulsd  0x10(%rsp),%xmm2
mulsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
add    $0x68,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @identicalAlignedParallelRects1(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%13 = load double, double* %4
%14 = load double, double* %6
%15 = fdiv double %13, %14
store double %15, double* %11
%16 = load double, double* %5
%17 = load double, double* %6
%18 = fdiv double %16, %17
store double %18, double* %12
%19 = load double, double* %11
%20 = load double, double* %11
%21 = fmul double %19, %20
store double %21, double* %7
%22 = load double, double* %12
%23 = load double, double* %12
%24 = fmul double %22, %23
store double %24, double* %8
%25 = load double, double* %7
%26 = fadd double 1.000000e+00, %25
%27 = call double @sqrt(double %26)
store double %27, double* %9
%28 = load double, double* %8
%29 = fadd double 1.000000e+00, %28
%30 = call double @sqrt(double %29)
store double %30, double* %10
%31 = load double, double* %7
%32 = fadd double 1.000000e+00, %31
%33 = load double, double* %8
%34 = fadd double 1.000000e+00, %33
%35 = fmul double %32, %34
%36 = load double, double* %7
%37 = fadd double 1.000000e+00, %36
%38 = load double, double* %8
%39 = fadd double %37, %38
%40 = fdiv double %35, %39
%41 = call double @log(double %40)
%42 = load double, double* %11
%43 = load double, double* %10
%44 = fmul double %42, %43
%45 = load double, double* %11
%46 = load double, double* %10
%47 = fdiv double %45, %46
%48 = call double @atan(double %47)
%49 = fmul double %44, %48
%50 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %41, double %49)
%51 = load double, double* %12
%52 = load double, double* %9
%53 = fmul double %51, %52
%54 = load double, double* %12
%55 = load double, double* %9
%56 = fdiv double %54, %55
%57 = call double @atan(double %56)
%58 = call double @llvm.fmuladd.f64(double %53, double %57, double %50)
%59 = load double, double* %11
%60 = load double, double* %11
%61 = call double @atan(double %60)
%62 = fneg double %59
%63 = call double @llvm.fmuladd.f64(double %62, double %61, double %58)
%64 = load double, double* %12
%65 = load double, double* %12
%66 = call double @atan(double %65)
%67 = fneg double %64
%68 = call double @llvm.fmuladd.f64(double %67, double %66, double %63)
%69 = fmul double 2.000000e+00, %68
%70 = load double, double* @M_PI
%71 = load double, double* %11
%72 = fmul double %70, %71
%73 = load double, double* %12
%74 = fmul double %72, %73
%75 = fdiv double %69, %74
ret double %75
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @identicalAlignedParallelRects1(double %0, double %1, double %2) {
%4 = insertelement <2 x double> poison, double %1, i64 0
%5 = insertelement <2 x double> %4, double %0, i64 1
%6 = insertelement <2 x double> poison, double %2, i64 0
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> zeroinitializer
%8 = fdiv <2 x double> %5, %7
%9 = fmul <2 x double> %8, %8
%10 = fadd <2 x double> %9, <double 1.000000e+00, double 1.000000e+00>
%11 = extractelement <2 x double> %10, i64 1
%12 = tail call double @sqrt(double %11)
%13 = extractelement <2 x double> %10, i64 0
%14 = tail call double @sqrt(double %13)
%15 = fmul double %11, %13
%16 = extractelement <2 x double> %9, i64 0
%17 = fadd double %16, %11
%18 = fdiv double %15, %17
%19 = tail call double @log(double %18)
%20 = extractelement <2 x double> %8, i64 1
%21 = fmul double %20, %14
%22 = fdiv double %20, %14
%23 = tail call double @atan(double %22)
%24 = fmul double %21, %23
%25 = tail call double @llvm.fmuladd.f64(double %19, double 5.000000e-01, double %24)
%26 = extractelement <2 x double> %8, i64 0
%27 = fmul double %26, %12
%28 = fdiv double %26, %12
%29 = tail call double @atan(double %28)
%30 = tail call double @llvm.fmuladd.f64(double %27, double %29, double %25)
%31 = tail call double @atan(double %20)
%32 = fneg double %20
%33 = tail call double @llvm.fmuladd.f64(double %32, double %31, double %30)
%34 = tail call double @atan(double %26)
%35 = fneg double %26
%36 = tail call double @llvm.fmuladd.f64(double %35, double %34, double %33)
%37 = fmul double %36, 2.000000e+00
%38 = load double, double* @M_PI
%39 = fmul double %20, %38
%40 = fmul double %26, %39
%41 = fdiv double %37, %40
ret double %41
}