void one_step_discrete(y, dt, yp, neq, t) double dt, *t;
double *y, *yp;
int neq;
{
  int j;
  set_wieners(dt, y, *t);
  rhs(*t, y, yp, neq);
  *t = *t + dt;
  for (j = 0; j < neq; j++) {
    y[j] = yp[j];
  }
}


x86 assembly (clang, -O0):
<one_step_discrete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1040 <set_wieners@plt>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x1,%al
call   1030 <rhs@plt>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11be <one_step_discrete+0x9e>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    118a <one_step_discrete+0x6a>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_step_discrete>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbp
mov    %edx,%r15d
mov    %rsi,%r14
movsd  %xmm0,(%rsp)
mov    %rdi,%rbx
movsd  (%rcx),%xmm1
mov    $0x2,%al
call   1040 <set_wieners@plt>
movsd  0x0(%rbp),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    $0x1,%al
call   1030 <rhs@plt>
movsd  (%rsp),%xmm0
addsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x0(%rbp)
test   %r15d,%r15d
jle    12d6 <one_step_discrete+0x1b6>
mov    %r15d,%eax
cmp    $0x4,%r15d
jb     118b <one_step_discrete+0x6b>
lea    (%r14,%rax,8),%rcx
cmp    %rbx,%rcx
jbe    1200 <one_step_discrete+0xe0>
lea    (%rbx,%rax,8),%rcx
cmp    %r14,%rcx
jbe    1200 <one_step_discrete+0xe0>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     11b5 <one_step_discrete+0x95>
nop
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    11a0 <one_step_discrete+0x80>
cmp    $0x3,%rdx
jb     12d6 <one_step_discrete+0x1b6>
nop
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x10(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rcx,8)
movsd  0x18(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    11c0 <one_step_discrete+0xa0>
jmp    12d6 <one_step_discrete+0x1b6>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rdi
jae    1223 <one_step_discrete+0x103>
xor    %edi,%edi
jmp    1292 <one_step_discrete+0x172>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopl   0x0(%rax)
movups (%r14,%rdi,8),%xmm0
movups 0x10(%r14,%rdi,8),%xmm1
movups %xmm0,(%rbx,%rdi,8)
movups %xmm1,0x10(%rbx,%rdi,8)
movups 0x20(%r14,%rdi,8),%xmm0
movups 0x30(%r14,%rdi,8),%xmm1
movups %xmm0,0x20(%rbx,%rdi,8)
movups %xmm1,0x30(%rbx,%rdi,8)
movups 0x40(%r14,%rdi,8),%xmm0
movups 0x50(%r14,%rdi,8),%xmm1
movups %xmm0,0x40(%rbx,%rdi,8)
movups %xmm1,0x50(%rbx,%rdi,8)
movupd 0x60(%r14,%rdi,8),%xmm0
movups 0x70(%r14,%rdi,8),%xmm1
movupd %xmm0,0x60(%rbx,%rdi,8)
movups %xmm1,0x70(%rbx,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1230 <one_step_discrete+0x110>
test   %rdx,%rdx
je     12cd <one_step_discrete+0x1ad>
lea    (%rbx,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%r14,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%rdx
xor    %ebp,%ebp
nopl   (%rax)
movupd -0x10(%rdi,%rbp,1),%xmm0
movups (%rdi,%rbp,1),%xmm1
movupd %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    12b0 <one_step_discrete+0x190>
cmp    %rax,%rcx
jne    118d <one_step_discrete+0x6d>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @one_step_discrete(double* %0, double %1, double* %2, i32 %3, double* %4) {
%6 = alloca double*
%7 = alloca double
%8 = alloca double*
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
store double* %0, double** %6
store double %1, double* %7
store double* %2, double** %8
store i32 %3, i32* %9
store double* %4, double** %10
%12 = load double, double* %7
%13 = load double*, double** %6
%14 = load double*, double** %10
%15 = load double, double* %14
%16 = call i32 (double, double*, double, ...) bitcast (i32 (...)* @set_wieners to i32 (double, double*, double, ...)*)(double %12, double* %13, double %15)
%17 = load double*, double** %10
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = load double*, double** %8
%21 = load i32, i32* %9
%22 = call i32 (double, double*, double*, i32, ...) bitcast (i32 (...)* @rhs to i32 (double, double*, double*, i32, ...)*)(double %18, double* %19, double* %20, i32 %21)
%23 = load double*, double** %10
%24 = load double, double* %23
%25 = load double, double* %7
%26 = fadd double %24, %25
%27 = load double*, double** %10
store double %26, double* %27
store i32 0, i32* %11
br label %28
28: ; preds = %42, %5
%29 = load i32, i32* %11
%30 = load i32, i32* %9
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %45
32: ; preds = %28
%33 = load double*, double** %8
%34 = load i32, i32* %11
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %33, i64 %35
%37 = load double, double* %36
%38 = load double*, double** %6
%39 = load i32, i32* %11
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double %37, double* %41
br label %42
42: ; preds = %32
%43 = load i32, i32* %11
%44 = add nsw i32 %43, 1
store i32 %44, i32* %11
br label %28
45: ; preds = %28
ret void
}

LLVM IR (-O2):
define void @one_step_discrete(double* %0, double %1, double* %2, i32 %3, double* nocapture %4) {
%6 = load double, double* %4
%7 = tail call i32 (double, double*, double, ...) bitcast (i32 (...)* @set_wieners to i32 (double, double*, double, ...)*)(double %1, double* %0, double %6)
%8 = load double, double* %4
%9 = tail call i32 (double, double*, double*, i32, ...) bitcast (i32 (...)* @rhs to i32 (double, double*, double*, i32, ...)*)(double %8, double* %0, double* %2, i32 %3)
%10 = load double, double* %4
%11 = fadd double %10, %1
store double %11, double* %4
%12 = icmp sgt i32 %3, 0
br i1 %12, label %13, label %138
13: ; preds = %5
%14 = zext i32 %3 to i64
%15 = icmp ult i32 %3, 4
br i1 %15, label %101, label %16
16: ; preds = %13
%17 = getelementptr double, double* %0, i64 %14
%18 = getelementptr double, double* %2, i64 %14
%19 = icmp ugt double* %18, %0
%20 = icmp ugt double* %17, %2
%21 = and i1 %19, %20
br i1 %21, label %101, label %22
22: ; preds = %16
%23 = and i64 %14, 4294967292
%24 = add nsw i64 %23, -4
%25 = lshr exact i64 %24, 2
%26 = add nuw nsw i64 %25, 1
%27 = and i64 %26, 3
%28 = icmp ult i64 %24, 12
br i1 %28, label %80, label %29
29: ; preds = %22
%30 = and i64 %26, 9223372036854775804
br label %31
31: ; preds = %31, %29
%32 = phi i64 [ 0, %29 ], [ %77, %31 ]
%33 = phi i64 [ 0, %29 ], [ %78, %31 ]
%34 = getelementptr inbounds double, double* %2, i64 %32
%35 = bitcast double* %34 to <2 x double>*
%36 = load <2 x double>, <2 x double>* %35
%37 = getelementptr inbounds double, double* %34, i64 2
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr inbounds double, double* %0, i64 %32
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %36, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> %39, <2 x double>* %43
%44 = or i64 %32, 4
%45 = getelementptr inbounds double, double* %2, i64 %44
%46 = bitcast double* %45 to <2 x double>*
%47 = load <2 x double>, <2 x double>* %46
%48 = getelementptr inbounds double, double* %45, i64 2
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = getelementptr inbounds double, double* %0, i64 %44
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %47, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %50, <2 x double>* %54
%55 = or i64 %32, 8
%56 = getelementptr inbounds double, double* %2, i64 %55
%57 = bitcast double* %56 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = getelementptr inbounds double, double* %56, i64 2
%60 = bitcast double* %59 to <2 x double>*
%61 = load <2 x double>, <2 x double>* %60
%62 = getelementptr inbounds double, double* %0, i64 %55
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %58, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %61, <2 x double>* %65
%66 = or i64 %32, 12
%67 = getelementptr inbounds double, double* %2, i64 %66
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds double, double* %67, i64 2
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = getelementptr inbounds double, double* %0, i64 %66
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %69, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %72, <2 x double>* %76
%77 = add nuw i64 %32, 16
%78 = add nuw i64 %33, 4
%79 = icmp eq i64 %78, %30
br i1 %79, label %80, label %31
80: ; preds = %31, %22
%81 = phi i64 [ 0, %22 ], [ %77, %31 ]
%82 = icmp eq i64 %27, 0
br i1 %82, label %99, label %83
83: ; preds = %80, %83
%84 = phi i64 [ %96, %83 ], [ %81, %80 ]
%85 = phi i64 [ %97, %83 ], [ 0, %80 ]
%86 = getelementptr inbounds double, double* %2, i64 %84
%87 = bitcast double* %86 to <2 x double>*
%88 = load <2 x double>, <2 x double>* %87
%89 = getelementptr inbounds double, double* %86, i64 2
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = getelementptr inbounds double, double* %0, i64 %84
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> %88, <2 x double>* %93
%94 = getelementptr inbounds double, double* %92, i64 2
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> %91, <2 x double>* %95
%96 = add nuw i64 %84, 4
%97 = add i64 %85, 1
%98 = icmp eq i64 %97, %27
br i1 %98, label %99, label %83
99: ; preds = %83, %80
%100 = icmp eq i64 %23, %14
br i1 %100, label %138, label %101
101: ; preds = %16, %13, %99
%102 = phi i64 [ 0, %16 ], [ 0, %13 ], [ %23, %99 ]
%103 = xor i64 %102, -1
%104 = add nsw i64 %103, %14
%105 = and i64 %14, 3
%106 = icmp eq i64 %105, 0
br i1 %106, label %116, label %107
107: ; preds = %101, %107
%108 = phi i64 [ %113, %107 ], [ %102, %101 ]
%109 = phi i64 [ %114, %107 ], [ 0, %101 ]
%110 = getelementptr inbounds double, double* %2, i64 %108
%111 = load double, double* %110
%112 = getelementptr inbounds double, double* %0, i64 %108
store double %111, double* %112
%113 = add nuw nsw i64 %108, 1
%114 = add i64 %109, 1
%115 = icmp eq i64 %114, %105
br i1 %115, label %116, label %107
116: ; preds = %107, %101
%117 = phi i64 [ %102, %101 ], [ %113, %107 ]
%118 = icmp ult i64 %104, 3
br i1 %118, label %138, label %119
119: ; preds = %116, %119
%120 = phi i64 [ %136, %119 ], [ %117, %116 ]
%121 = getelementptr inbounds double, double* %2, i64 %120
%122 = load double, double* %121
%123 = getelementptr inbounds double, double* %0, i64 %120
store double %122, double* %123
%124 = add nuw nsw i64 %120, 1
%125 = getelementptr inbounds double, double* %2, i64 %124
%126 = load double, double* %125
%127 = getelementptr inbounds double, double* %0, i64 %124
store double %126, double* %127
%128 = add nuw nsw i64 %120, 2
%129 = getelementptr inbounds double, double* %2, i64 %128
%130 = load double, double* %129
%131 = getelementptr inbounds double, double* %0, i64 %128
store double %130, double* %131
%132 = add nuw nsw i64 %120, 3
%133 = getelementptr inbounds double, double* %2, i64 %132
%134 = load double, double* %133
%135 = getelementptr inbounds double, double* %0, i64 %132
store double %134, double* %135
%136 = add nuw nsw i64 %120, 4
%137 = icmp eq i64 %136, %14
br i1 %137, label %138, label %119
138: ; preds = %116, %119, %99, %5
ret void
}