#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 sqrt(double);
double A(const double j, const double j2, const double j3, const double m2,
         const double m3) {
  double a = j * j;
  double b = j2 - j3;
  double c = j2 + j3 + 1.0;
  double d = m2 + m3;
  return sqrt((a - b * b) * (c * c - a) * (a - d * d));
}


x86 assembly (clang, -O0):
<A>:
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  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A>:
mulsd  %xmm0,%xmm0
movapd %xmm1,%xmm5
subsd  %xmm2,%xmm5
addsd  %xmm2,%xmm1
addsd  0xed8(%rip),%xmm1
addsd  %xmm4,%xmm3
mulsd  %xmm5,%xmm5
movapd %xmm0,%xmm2
subsd  %xmm5,%xmm2
mulsd  %xmm1,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     115f <A+0x4f>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @A(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
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
%15 = load double, double* %6
%16 = load double, double* %6
%17 = fmul double %15, %16
store double %17, double* %11
%18 = load double, double* %7
%19 = load double, double* %8
%20 = fsub double %18, %19
store double %20, double* %12
%21 = load double, double* %7
%22 = load double, double* %8
%23 = fadd double %21, %22
%24 = fadd double %23, 1.000000e+00
store double %24, double* %13
%25 = load double, double* %9
%26 = load double, double* %10
%27 = fadd double %25, %26
store double %27, double* %14
%28 = load double, double* %11
%29 = load double, double* %12
%30 = load double, double* %12
%31 = fneg double %29
%32 = call double @llvm.fmuladd.f64(double %31, double %30, double %28)
%33 = load double, double* %13
%34 = load double, double* %13
%35 = load double, double* %11
%36 = fneg double %35
%37 = call double @llvm.fmuladd.f64(double %33, double %34, double %36)
%38 = fmul double %32, %37
%39 = load double, double* %11
%40 = load double, double* %14
%41 = load double, double* %14
%42 = fneg double %40
%43 = call double @llvm.fmuladd.f64(double %42, double %41, double %39)
%44 = fmul double %38, %43
%45 = call double @sqrt(double %44)
ret double %45
}

LLVM IR (-O2):
define double @A(double %0, double %1, double %2, double %3, double %4) {
%6 = fmul double %0, %0
%7 = fsub double %1, %2
%8 = fadd double %1, %2
%9 = fadd double %8, 1.000000e+00
%10 = fadd double %3, %4
%11 = fneg double %7
%12 = tail call double @llvm.fmuladd.f64(double %11, double %7, double %6)
%13 = fneg double %6
%14 = tail call double @llvm.fmuladd.f64(double %9, double %9, double %13)
%15 = fmul double %12, %14
%16 = fneg double %10
%17 = tail call double @llvm.fmuladd.f64(double %16, double %10, double %6)
%18 = fmul double %15, %17
%19 = tail call double @sqrt(double %18)
ret double %19
}