#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*/ printf(char *, double, ...);
int /*<<< orphan*/ stormer_verlet(double *, double *, double, int, double);
int /*<<< orphan*/ velocity_verlet(double *, double *, double, int, double);
int /*<<< orphan*/ verlet(double *, double, int, double);
int main() {
  double time, vel;
  verlet(&time, 5.0, -10, 0.01);
  printf("Time for Verlet integration is: %lf\n", time);
  stormer_verlet(&time, &vel, 5.0, -10, 0.01);
  printf("Time and velocity for Stormer Verlet integration is: %lf, %lf\n",
         time, vel);
  velocity_verlet(&time, &vel, 5.0, -10, 0.01);
  printf("Time and velocity for velocity Verlet integration is: %lf, %lf\n",
         time, vel);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
movsd  0xea5(%rip),%xmm0
mov    $0xfffffff6,%esi
movsd  0xea0(%rip),%xmm1
call   1060 <verlet@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
movsd  0xe70(%rip),%xmm0
mov    $0xfffffff6,%edx
movsd  0xe6b(%rip),%xmm1
call   1050 <stormer_verlet@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe82(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
movsd  0xe36(%rip),%xmm0
mov    $0xfffffff6,%edx
movsd  0xe31(%rip),%xmm1
call   1040 <velocity_verlet@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe87(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0x8(%rsp),%r14
movsd  0xeac(%rip),%xmm0
movsd  0xeac(%rip),%xmm1
mov    %r14,%rdi
mov    $0xfffffff6,%esi
call   1060 <verlet@plt>
movsd  0x8(%rsp),%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0x10(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  0xe70(%rip),%xmm0
mov    $0xfffffff6,%edx
movsd  0xe6b(%rip),%xmm1
call   1050 <stormer_verlet@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0xe80(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  0xe36(%rip),%xmm0
mov    $0xfffffff6,%edx
movsd  0xe31(%rip),%xmm1
call   1040 <velocity_verlet@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0xe85(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Time for Verlet integration is: %lf\0A\00"
@.str.1 = [63 x i8] c"Time and velocity for Stormer Verlet integration is: %lf, %lf\0A\00"
@.str.2 = [64 x i8] c"Time and velocity for velocity Verlet integration is: %lf, %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @verlet(double* %2, double 5.000000e+00, i32 -10, double 1.000000e-02)
%5 = load double, double* %2
%6 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %5)
%7 = call i32 @stormer_verlet(double* %2, double* %3, double 5.000000e+00, i32 -10, double 1.000000e-02)
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), double %8, double %9)
%11 = call i32 @velocity_verlet(double* %2, double* %3, double 5.000000e+00, i32 -10, double 1.000000e-02)
%12 = load double, double* %2
%13 = load double, double* %3
%14 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), double %12, double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"Time for Verlet integration is: %lf\0A\00"
@.str.1 = [63 x i8] c"Time and velocity for Stormer Verlet integration is: %lf, %lf\0A\00"
@.str.2 = [64 x i8] c"Time and velocity for velocity Verlet integration is: %lf, %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @verlet(double* %1, double 5.000000e+00, i32 -10, double 1.000000e-02)
%6 = load double, double* %1
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %6)
%8 = call i32 @stormer_verlet(double* %1, double* %2, double 5.000000e+00, i32 -10, double 1.000000e-02)
%9 = load double, double* %1
%10 = load double, double* %2
%11 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), double %9, double %10)
%12 = call i32 @velocity_verlet(double* %1, double* %2, double 5.000000e+00, i32 -10, double 1.000000e-02)
%13 = load double, double* %1
%14 = load double, double* %2
%15 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0), double %13, double %14)
ret i32 0
}