double rhs_x(double x, double y, double s1, double s2, int I, int Typ) {
  double dummy;
  double c(double x, double y, int I);
  double vx(double x, double y, int Typ);
  double vy(double x, double y, int Typ);
  dummy = (1.0 - vx(x, y, Typ) * s1 - vy(x, y, Typ) * s2);
  return ((c(x, y, I) * c(x, y, I) * s1 / dummy) + vx(x, y, Typ));
}


x86 assembly (clang, -O0):
<rhs_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1030 <vx@plt>
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe74(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1040 <vy@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x24(%rbp),%edi
call   1050 <c@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x24(%rbp),%edi
call   1050 <c@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1030 <vx@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhs_x>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %esi,%edi
call   1030 <vx@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0xe99(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
call   1040 <vy@plt>
mulsd  0x18(%rsp),%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebp,%edi
call   1050 <c@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebp,%edi
call   1050 <c@plt>
mulsd  0x18(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
divsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
call   1030 <vx@plt>
addsd  (%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @rhs_x(double %0, double %1, double %2, double %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load double, double* %7
%15 = load double, double* %8
%16 = load i32, i32* %12
%17 = call double @vx(double %14, double %15, i32 %16)
%18 = load double, double* %9
%19 = fneg double %17
%20 = call double @llvm.fmuladd.f64(double %19, double %18, double 1.000000e+00)
%21 = load double, double* %7
%22 = load double, double* %8
%23 = load i32, i32* %12
%24 = call double @vy(double %21, double %22, i32 %23)
%25 = load double, double* %10
%26 = fneg double %24
%27 = call double @llvm.fmuladd.f64(double %26, double %25, double %20)
store double %27, double* %13
%28 = load double, double* %7
%29 = load double, double* %8
%30 = load i32, i32* %11
%31 = call double @c(double %28, double %29, i32 %30)
%32 = load double, double* %7
%33 = load double, double* %8
%34 = load i32, i32* %11
%35 = call double @c(double %32, double %33, i32 %34)
%36 = fmul double %31, %35
%37 = load double, double* %9
%38 = fmul double %36, %37
%39 = load double, double* %13
%40 = fdiv double %38, %39
%41 = load double, double* %7
%42 = load double, double* %8
%43 = load i32, i32* %12
%44 = call double @vx(double %41, double %42, i32 %43)
%45 = fadd double %40, %44
ret double %45
}

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