#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 vx_y(double, double, int);
double vy_y(double, double, int);
double rhs_s2(double x, double y, double s1, double s2, int I, int Typ) {
  double dummy;
  double c(double x, double y, int I);
  double c_y(double x, double y, int I);
  double vx(double x, double y, int Typ);
  double vy(double x, double y, int Typ);
  double vx_x(double x, double y, int Typ);
  double vy_x(double x, double y, int Typ);
  dummy = -1 * (1.0 - vx(x, y, Typ) * s1 - vy(x, y, Typ) * s2) / c(x, y, I);
  return (dummy * c_y(x, y, I) - s1 * vx_y(x, y, Typ) - s2 * vy_y(x, y, Typ));
}


x86 assembly (clang, -O0):
<rhs_s2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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  0xe4c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1040 <vy@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdf5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x24(%rbp),%edi
call   1050 <c@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x24(%rbp),%edi
call   1070 <c_y@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1080 <vx_y@plt>
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%edi
call   1060 <vy_y@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rhs_s2>:
push   %rbp
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
movsd  %xmm3,0x40(%rsp)
movsd  %xmm2,0x38(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %esi,%edi
call   1030 <vx@plt>
mulsd  0x38(%rsp),%xmm0
movsd  0xe69(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
call   1040 <vy@plt>
mulsd  0x40(%rsp),%xmm0
movapd 0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
xorpd  0xe44(%rip),%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebp,%edi
call   1050 <c@plt>
movapd 0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebp,%edi
call   1070 <c_y@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
call   1080 <vx_y@plt>
mulsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
call   1060 <vy_y@plt>
mulsd  0x40(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @rhs_s2(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)
%28 = fmul double -1.000000e+00, %27
%29 = load double, double* %7
%30 = load double, double* %8
%31 = load i32, i32* %11
%32 = call double @c(double %29, double %30, i32 %31)
%33 = fdiv double %28, %32
store double %33, double* %13
%34 = load double, double* %13
%35 = load double, double* %7
%36 = load double, double* %8
%37 = load i32, i32* %11
%38 = call double @c_y(double %35, double %36, i32 %37)
%39 = load double, double* %9
%40 = load double, double* %7
%41 = load double, double* %8
%42 = load i32, i32* %12
%43 = call double @vx_y(double %40, double %41, i32 %42)
%44 = fmul double %39, %43
%45 = fneg double %44
%46 = call double @llvm.fmuladd.f64(double %34, double %38, double %45)
%47 = load double, double* %10
%48 = load double, double* %7
%49 = load double, double* %8
%50 = load i32, i32* %12
%51 = call double @vy_y(double %48, double %49, i32 %50)
%52 = fneg double %47
%53 = call double @llvm.fmuladd.f64(double %52, double %51, double %46)
ret double %53
}

LLVM IR (-O2):
define double @rhs_s2(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 = fneg double %12
%14 = tail call double @c(double %0, double %1, i32 %4)
%15 = fdiv double %13, %14
%16 = tail call double @c_y(double %0, double %1, i32 %4)
%17 = tail call double @vx_y(double %0, double %1, i32 %5)
%18 = fneg double %17
%19 = fmul double %18, %2
%20 = tail call double @llvm.fmuladd.f64(double %15, double %16, double %19)
%21 = tail call double @vy_y(double %0, double %1, i32 %5)
%22 = fneg double %3
%23 = tail call double @llvm.fmuladd.f64(double %22, double %21, double %20)
ret double %23
}