#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);
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    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %esi,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    117f <one_step+0x6f>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm5
call   1030 <rhs@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    113f <one_step+0x2f>
mov    -0x4(%rbp),%eax
add    $0x50,%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 i32 @one_step(double %0, double %1, double %2, double %3, double %4, double* %5, i32 %6) {
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double* %5, double** %14
store i32 %6, i32* %15
store i32 0, i32* %16
br label %18
18: ; preds = %31, %7
%19 = load i32, i32* %16
%20 = load i32, i32* %15
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %18
%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** %14
%29 = load double, double* %28
%30 = call i32 @rhs(double %23, double %24, double %25, double %26, double %27, double %29)
br label %31
31: ; preds = %22
%32 = load i32, i32* %16
%33 = add nsw i32 %32, 1
store i32 %33, i32* %16
br label %18
34: ; preds = %18
%35 = load i32, i32* %8
ret i32 %35
}

LLVM IR (-O2):
define i32 @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 i32 undef
}