#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 */
int /*<<< orphan*/ rhs(double, double, double, double, double, double);
void one_step(double g, double a, double sig, double tau, double dt,
              double *stot, int ntran) {
  int i, j;
  for (i = 0; i < ntran; i++) {
    rhs(g, a, sig, tau, dt, *stot);
  }
}


x86 assembly (clang, -O0):
<one_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %esi,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    117f <one_step+0x6f>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm5
call   1030 <rhs@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    113f <one_step+0x2f>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_step>:
push   %r14
push   %rbx
sub    $0x28,%rsp
test   %esi,%esi
jle    116c <one_step+0x5c>
mov    %esi,%ebx
mov    %rdi,%r14
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
nopl   (%rax)
movsd  (%r14),%xmm5
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
call   1030 <rhs@plt>
add    $0xffffffff,%ebx
jne    1140 <one_step+0x30>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @one_step(double %0, double %1, double %2, double %3, double %4, double* %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store i32 %6, i32* %14
store i32 0, i32* %15
br label %17
17: ; preds = %30, %7
%18 = load i32, i32* %15
%19 = load i32, i32* %14
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %33
21: ; preds = %17
%22 = load double, double* %8
%23 = load double, double* %9
%24 = load double, double* %10
%25 = load double, double* %11
%26 = load double, double* %12
%27 = load double*, double** %13
%28 = load double, double* %27
%29 = call i32 @rhs(double %22, double %23, double %24, double %25, double %26, double %28)
br label %30
30: ; preds = %21
%31 = load i32, i32* %15
%32 = add nsw i32 %31, 1
store i32 %32, i32* %15
br label %17
33: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @one_step(double %0, double %1, double %2, double %3, double %4, double* nocapture %5, i32 %6) {
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %15
9: ; preds = %7, %9
%10 = phi i32 [ %13, %9 ], [ 0, %7 ]
%11 = load double, double* %5
%12 = tail call i32 @rhs(double %0, double %1, double %2, double %3, double %4, double %11)
%13 = add nuw nsw i32 %10, 1
%14 = icmp eq i32 %13, %6
br i1 %14, label %15, label %9
15: ; preds = %9, %7
ret void
}