#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 */
struct sys33 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct sys33 *);
struct sys33 *init_system(char **);
int /*<<< orphan*/ print_system(double, struct sys33 *);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ react_system(struct sys33 *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
double strtod(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  if (argc != (1 + 6 + 4 + 2)) {
    printf("usage: %s "
           "<c1> <c2> <c3> <c4> <c5> <c6> "
           "<W> <X> <Y> <Z> "
           "<tint> <tmax>\n",
           argv[0]);
    exit(EXIT_FAILURE);
  }
  struct sys33 *sys = init_system(argv);
  double tint = strtod(argv[6 + 4 + 1], NULL);
  double tmax = strtod(argv[6 + 4 + 2], NULL);
  double tout = tint;
  double t = 0.0;
  print_system(t, sys);
  srand(time(NULL));
  while (t <= tmax) {
    t += react_system(sys);
    if (t >= tout) {
      print_system(t, sys);
      tout += tint;
    }
  }
  free(sys);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xd,-0x8(%rbp)
je     11d1 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe42(%rip),%rdi
call   1060 <printf@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1090 <init_system@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x58(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <strtod@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x60(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <strtod@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1050 <print_system@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
movsd  -0x38(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1298 <main+0x108>
mov    -0x18(%rbp),%rdi
call   10a0 <react_system@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     1293 <main+0x103>
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
call   1050 <print_system@plt>
movsd  -0x20(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    123a <main+0xaa>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2d30(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
cmp    $0xd,%edi
jne    120b <main+0x7b>
mov    %r14,%rdi
call   1090 <init_system@plt>
mov    %rax,%rbx
mov    0x58(%r14),%rdi
xor    %esi,%esi
call   1040 <strtod@plt>
movsd  %xmm0,0x18(%rsp)
mov    0x60(%r14),%rdi
xor    %esi,%esi
call   1040 <strtod@plt>
movsd  %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1050 <print_system@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xorpd  %xmm1,%xmm1
movsd  0x20(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jae    1228 <main+0x98>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    (%r14),%rsi
lea    0xdeb(%rip),%rdi
call   1060 <printf@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    124c <main+0xbc>
cs nopw 0x0(%rax,%rax,1)
movsd  0x20(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jb     11f5 <main+0x65>
movsd  %xmm1,0x10(%rsp)
mov    %rbx,%rdi
call   10a0 <react_system@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
ucomisd %xmm0,%xmm1
jb     1240 <main+0xb0>
movsd  %xmm0,0x8(%rsp)
movapd %xmm1,%xmm0
mov    %rbx,%rdi
movsd  %xmm1,0x10(%rsp)
call   1050 <print_system@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    1240 <main+0xb0>

LLVM IR (-O0):
%struct.sys33 = type { i32 }
@.str = [71 x i8] c"usage: %s <c1> <c2> <c3> <c4> <c5> <c6> <W> <X> <Y> <Z> <tint> <tmax>\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sys33*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 13
br i1 %12, label %13, label %20
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i32, i32* @EXIT_FAILURE
%19 = call i32 @exit(i32 %18)
unreachable
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = call %struct.sys33* @init_system(i8** %21)
store %struct.sys33* %22, %struct.sys33** %6
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 11
%25 = load i8*, i8** %24
%26 = call double @strtod(i8* %25, i32* null)
store double %26, double* %7
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 12
%29 = load i8*, i8** %28
%30 = call double @strtod(i8* %29, i32* null)
store double %30, double* %8
%31 = load double, double* %7
store double %31, double* %9
store double 0.000000e+00, double* %10
%32 = load double, double* %10
%33 = load %struct.sys33*, %struct.sys33** %6
%34 = call i32 @print_system(double %32, %struct.sys33* %33)
%35 = call i32 @time(i32* null)
%36 = call i32 @srand(i32 %35)
br label %37
37: ; preds = %57, %20
%38 = load double, double* %10
%39 = load double, double* %8
%40 = fcmp ole double %38, %39
br i1 %40, label %41, label %58
41: ; preds = %37
%42 = load %struct.sys33*, %struct.sys33** %6
%43 = call i64 @react_system(%struct.sys33* %42)
%44 = sitofp i64 %43 to double
%45 = load double, double* %10
%46 = fadd double %45, %44
store double %46, double* %10
%47 = load double, double* %10
%48 = load double, double* %9
%49 = fcmp oge double %47, %48
br i1 %49, label %50, label %57
50: ; preds = %41
%51 = load double, double* %10
%52 = load %struct.sys33*, %struct.sys33** %6
%53 = call i32 @print_system(double %51, %struct.sys33* %52)
%54 = load double, double* %7
%55 = load double, double* %9
%56 = fadd double %55, %54
store double %56, double* %9
br label %57
57: ; preds = %50, %41
br label %37
58: ; preds = %37
%59 = load %struct.sys33*, %struct.sys33** %6
%60 = call i32 @free(%struct.sys33* %59)
%61 = load i32, i32* @EXIT_SUCCESS
%62 = call i32 @exit(i32 %61)
unreachable
}

LLVM IR (-O2):
%struct.sys33 = type { i32 }
@.str = [71 x i8] c"usage: %s <c1> <c2> <c3> <c4> <c5> <c6> <W> <X> <Y> <Z> <tint> <tmax>\0A\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 13
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = tail call %struct.sys33* @init_system(i8** %1)
%11 = getelementptr inbounds i8*, i8** %1, i64 11
%12 = load i8*, i8** %11
%13 = tail call double @strtod(i8* nocapture %12, i32* null)
%14 = getelementptr inbounds i8*, i8** %1, i64 12
%15 = load i8*, i8** %14
%16 = tail call double @strtod(i8* nocapture %15, i32* null)
%17 = tail call i32 @print_system(double 0.000000e+00, %struct.sys33* %10)
%18 = tail call i32 @time(i32* null)
%19 = tail call i32 @srand(i32 %18)
%20 = fcmp ult double %16, 0.000000e+00
br i1 %20, label %34, label %21
21: ; preds = %9, %31
%22 = phi double [ %26, %31 ], [ 0.000000e+00, %9 ]
%23 = phi double [ %32, %31 ], [ %13, %9 ]
%24 = tail call i64 @react_system(%struct.sys33* %10)
%25 = sitofp i64 %24 to double
%26 = fadd double %22, %25
%27 = fcmp ult double %26, %23
br i1 %27, label %31, label %28
28: ; preds = %21
%29 = tail call i32 @print_system(double %26, %struct.sys33* %10)
%30 = fadd double %13, %23
br label %31
31: ; preds = %28, %21
%32 = phi double [ %30, %28 ], [ %23, %21 ]
%33 = fcmp ugt double %26, %16
br i1 %33, label %34, label %21
34: ; preds = %31, %9
%35 = tail call i32 @free(%struct.sys33* %10)
%36 = load i32, i32* @EXIT_SUCCESS
%37 = tail call i32 @exit(i32 %36)
unreachable
}