#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 */
typedef int /*<<< orphan*/ argv;

/* Variables and functions */
double atof(char const *);
int /*<<< orphan*/ displayHelp();
double momentum(double, double);
int /*<<< orphan*/ printf(char *, double, ...);
double torque(double, double);
double torques(double, double, double);
int main(int argc, const char *argv[]) {
  if (argc > 1) {
    int i, j;
    for (i = 1; i < argc; i++) {
      switch (*(char *)argv[i]) {
      case 0x2D: {
        for (j = 0; j < sizeof(argv[i]); j++) {
          switch (argv[i][j]) {
          case 0x74: {
            if (argv[i + 3]) {
              printf("Torque of r:%.2f, F:%.2f, theta:%.2f;\n",
                     atof(argv[i + 1]), atof(argv[i + 2]), atof(argv[i + 3]));
              if (argc > i) {
                printf("Torque = %f\n",
                       torques(atof(argv[i + 1]), atof(argv[i + 2]),
                               atof(argv[i + 3])));
              }
            } else {
              printf("Torque of r:%.2f, F:%.2f;\n", atof(argv[i + 1]),
                     atof(argv[i + 2]));
              if (argc > i) {
                printf("Torque = %f\n",
                       torque(atof(argv[i + 1]), atof(argv[i + 2])));
              }
            }
            break;
          }
          case 0x68: {
            displayHelp();
            break;
          }
          case 0x6D: {
            if (argv[i + 2]) {
              printf("Momentum of m:%.2f, v:%.2f;\n", atof(argv[i + 1]),
                     atof(argv[i + 2]));
              printf("Momentum = %f\n",
                     momentum(atof(argv[i + 1]), atof(argv[i + 2])));
            }
          }
          }
        }
        break;
      }
      }
    }
  } else {
    displayHelp();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    149b <main+0x33b>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1496 <main+0x336>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%al
sub    $0x2d,%al
jne    1483 <main+0x323>
jmp    11ae <main+0x4e>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    $0x8,%rax
jae    147e <main+0x31e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x68,%eax
je     13af <main+0x24f>
jmp    11e8 <main+0x88>
mov    -0x1c(%rbp),%eax
sub    $0x6d,%eax
je     13bb <main+0x25b>
jmp    11f9 <main+0x99>
mov    -0x1c(%rbp),%eax
sub    $0x74,%eax
jne    146b <main+0x30b>
jmp    120a <main+0xaa>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1306 <main+0x1a6>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
lea    0xd7e(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1301 <main+0x1a1>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
call   1080 <torques@plt>
lea    0xd2d(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    13aa <main+0x24a>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
lea    0xcee(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    13a5 <main+0x245>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
call   1060 <torque@plt>
lea    0xc89(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    13aa <main+0x24a>
jmp    146b <main+0x30b>
mov    $0x0,%al
call   1070 <displayHelp@plt>
jmp    146b <main+0x30b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1466 <main+0x306>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
lea    0xc3c(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
call   1040 <momentum@plt>
lea    0xc0d(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    146b <main+0x30b>
jmp    1470 <main+0x310>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11b5 <main+0x55>
jmp    1483 <main+0x323>
jmp    1488 <main+0x328>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1187 <main+0x27>
jmp    14a2 <main+0x342>
mov    $0x0,%al
call   1070 <displayHelp@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cmp    $0x2,%edi
jl     1372 <main+0x212>
mov    %rsi,%rbx
mov    %edi,%ecx
mov    $0x1,%r15d
mov    %rcx,0x10(%rsp)
jmp    11a1 <main+0x41>
nopl   0x0(%rax)
mov    %r14,%r15
mov    0x10(%rsp),%rcx
cmp    %rcx,%r14
je     1379 <main+0x219>
mov    (%rbx,%r15,8),%rax
cmpb   $0x2d,(%rax)
jne    1360 <main+0x200>
lea    0x1(%r15),%r14
mov    $0x2d,%al
mov    $0x1,%r13d
nopw   0x0(%rax,%rax,1)
movsbl %al,%eax
cmp    $0x68,%eax
je     12f0 <main+0x190>
cmp    $0x6d,%eax
je     1280 <main+0x120>
cmp    $0x74,%eax
jne    1340 <main+0x1e0>
mov    0x8(%rbx,%r15,8),%rdi
mov    0x18(%rbx,%r15,8),%r12
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    0x10(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
test   %r12,%r12
je     12f9 <main+0x199>
mov    %r12,%rdi
movsd  %xmm1,0x8(%rsp)
call   1030 <atof@plt>
movaps %xmm0,%xmm2
lea    0xde0(%rip),%rdi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    $0x3,%al
call   1050 <printf@plt>
mov    0x8(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    0x10(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x18(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm2
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1080 <torques@plt>
jmp    1332 <main+0x1d2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%rbx,%r15,8),%rbp
test   %rbp,%rbp
je     1340 <main+0x1e0>
mov    0x8(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    %rbp,%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
lea    0xda0(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x8(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    0x10(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1040 <momentum@plt>
lea    0xd84(%rip),%rdi
jmp    1339 <main+0x1d9>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <displayHelp@plt>
jmp    1340 <main+0x1e0>
lea    0xd34(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
mov    0x8(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%rsp)
mov    0x10(%rbx,%r15,8),%rdi
call   1030 <atof@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1060 <torque@plt>
lea    0xcee(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cmp    $0x8,%r13
je     1190 <main+0x30>
mov    (%rbx,%r15,8),%rax
movzbl (%rax,%r13,1),%eax
add    $0x1,%r13
jmp    11c0 <main+0x60>
nopl   0x0(%rax)
add    $0x1,%r15
mov    %r15,%r14
cmp    %rcx,%r14
jne    11a1 <main+0x41>
jmp    1379 <main+0x219>
xor    %eax,%eax
call   1070 <displayHelp@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Torque of r:%.2f, F:%.2f, theta:%.2f;\0A\00"
@.str.1 = [13 x i8] c"Torque = %f\0A\00"
@.str.2 = [27 x i8] c"Torque of r:%.2f, F:%.2f;\0A\00"
@.str.3 = [29 x i8] c"Momentum of m:%.2f, v:%.2f;\0A\00"
@.str.4 = [15 x i8] c"Momentum = %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %189
10: ; preds = %2
store i32 1, i32* %6
br label %11
11: ; preds = %185, %10
%12 = load i32, i32* %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %188
15: ; preds = %11
%16 = load i8**, i8*** %5
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8*, i8** %16, i64 %18
%20 = load i8*, i8** %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
switch i32 %22, label %184 [
i32 45, label %23
]
23: ; preds = %15
store i32 0, i32* %7
br label %24
24: ; preds = %180, %23
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = icmp ult i64 %26, 8
br i1 %27, label %28, label %183
28: ; preds = %24
%29 = load i8**, i8*** %5
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
switch i32 %38, label %179 [
i32 116, label %39
i32 104, label %136
i32 109, label %138
]
39: ; preds = %28
%40 = load i8**, i8*** %5
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8*, i8** %40, i64 %43
%45 = load i8*, i8** %44
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %98
47: ; preds = %39
%48 = load i8**, i8*** %5
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8*, i8** %48, i64 %51
%53 = load i8*, i8** %52
%54 = call double @atof(i8* %53)
%55 = load i8**, i8*** %5
%56 = load i32, i32* %6
%57 = add nsw i32 %56, 2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8*, i8** %55, i64 %58
%60 = load i8*, i8** %59
%61 = call double @atof(i8* %60)
%62 = load i8**, i8*** %5
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8*, i8** %62, i64 %65
%67 = load i8*, i8** %66
%68 = call double @atof(i8* %67)
%69 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), double %54, double %61, double %68)
%70 = load i32, i32* %4
%71 = load i32, i32* %6
%72 = icmp sgt i32 %70, %71
br i1 %72, label %73, label %97
73: ; preds = %47
%74 = load i8**, i8*** %5
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %74, i64 %77
%79 = load i8*, i8** %78
%80 = call double @atof(i8* %79)
%81 = load i8**, i8*** %5
%82 = load i32, i32* %6
%83 = add nsw i32 %82, 2
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %81, i64 %84
%86 = load i8*, i8** %85
%87 = call double @atof(i8* %86)
%88 = load i8**, i8*** %5
%89 = load i32, i32* %6
%90 = add nsw i32 %89, 3
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %88, i64 %91
%93 = load i8*, i8** %92
%94 = call double @atof(i8* %93)
%95 = call double @torques(double %80, double %87, double %94)
%96 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %95)
br label %97
97: ; preds = %73, %47
br label %135
98: ; preds = %39
%99 = load i8**, i8*** %5
%100 = load i32, i32* %6
%101 = add nsw i32 %100, 1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8*, i8** %99, i64 %102
%104 = load i8*, i8** %103
%105 = call double @atof(i8* %104)
%106 = load i8**, i8*** %5
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 2
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i8*, i8** %106, i64 %109
%111 = load i8*, i8** %110
%112 = call double @atof(i8* %111)
%113 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %105, double %112)
%114 = load i32, i32* %4
%115 = load i32, i32* %6
%116 = icmp sgt i32 %114, %115
br i1 %116, label %117, label %134
117: ; preds = %98
%118 = load i8**, i8*** %5
%119 = load i32, i32* %6
%120 = add nsw i32 %119, 1
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i8*, i8** %118, i64 %121
%123 = load i8*, i8** %122
%124 = call double @atof(i8* %123)
%125 = load i8**, i8*** %5
%126 = load i32, i32* %6
%127 = add nsw i32 %126, 2
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8*, i8** %125, i64 %128
%130 = load i8*, i8** %129
%131 = call double @atof(i8* %130)
%132 = call double @torque(double %124, double %131)
%133 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %132)
br label %134
134: ; preds = %117, %98
br label %135
135: ; preds = %134, %97
br label %179
136: ; preds = %28
%137 = call i32 (...) @displayHelp()
br label %179
138: ; preds = %28
%139 = load i8**, i8*** %5
%140 = load i32, i32* %6
%141 = add nsw i32 %140, 2
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds i8*, i8** %139, i64 %142
%144 = load i8*, i8** %143
%145 = icmp ne i8* %144, null
br i1 %145, label %146, label %178
146: ; preds = %138
%147 = load i8**, i8*** %5
%148 = load i32, i32* %6
%149 = add nsw i32 %148, 1
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8*, i8** %147, i64 %150
%152 = load i8*, i8** %151
%153 = call double @atof(i8* %152)
%154 = load i8**, i8*** %5
%155 = load i32, i32* %6
%156 = add nsw i32 %155, 2
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i8*, i8** %154, i64 %157
%159 = load i8*, i8** %158
%160 = call double @atof(i8* %159)
%161 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %153, double %160)
%162 = load i8**, i8*** %5
%163 = load i32, i32* %6
%164 = add nsw i32 %163, 1
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i8*, i8** %162, i64 %165
%167 = load i8*, i8** %166
%168 = call double @atof(i8* %167)
%169 = load i8**, i8*** %5
%170 = load i32, i32* %6
%171 = add nsw i32 %170, 2
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds i8*, i8** %169, i64 %172
%174 = load i8*, i8** %173
%175 = call double @atof(i8* %174)
%176 = call double @momentum(double %168, double %175)
%177 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %176)
br label %178
178: ; preds = %146, %138
br label %179
179: ; preds = %178, %28, %136, %135
br label %180
180: ; preds = %179
%181 = load i32, i32* %7
%182 = add nsw i32 %181, 1
store i32 %182, i32* %7
br label %24
183: ; preds = %24
br label %184
184: ; preds = %15, %183
br label %185
185: ; preds = %184
%186 = load i32, i32* %6
%187 = add nsw i32 %186, 1
store i32 %187, i32* %6
br label %11
188: ; preds = %11
br label %191
189: ; preds = %2
%190 = call i32 (...) @displayHelp()
br label %191
191: ; preds = %189, %188
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Torque of r:%.2f, F:%.2f, theta:%.2f;\0A\00"
@.str.1 = [13 x i8] c"Torque = %f\0A\00"
@.str.2 = [27 x i8] c"Torque of r:%.2f, F:%.2f;\0A\00"
@.str.3 = [29 x i8] c"Momentum of m:%.2f, v:%.2f;\0A\00"
@.str.4 = [15 x i8] c"Momentum = %f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %77
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %74
%7 = phi i64 [ 1, %4 ], [ %75, %74 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 45
br i1 %11, label %14, label %12
12: ; preds = %6
%13 = add nuw nsw i64 %7, 1
br label %74
14: ; preds = %6
%15 = add nuw nsw i64 %7, 2
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = add nuw nsw i64 %7, 1
%18 = getelementptr inbounds i8*, i8** %1, i64 %17
%19 = add nuw nsw i64 %7, 3
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
br label %21
21: ; preds = %70, %14
%22 = phi i8 [ 45, %14 ], [ %73, %70 ]
%23 = phi i64 [ 0, %14 ], [ %68, %70 ]
%24 = sext i8 %22 to i32
switch i32 %24, label %67 [
i32 116, label %25
i32 104, label %51
i32 109, label %53
]
25: ; preds = %21
%26 = load i8*, i8** %20
%27 = icmp eq i8* %26, null
%28 = load i8*, i8** %18
%29 = tail call double @atof(i8* %28)
%30 = load i8*, i8** %16
%31 = tail call double @atof(i8* %30)
br i1 %27, label %43, label %32
32: ; preds = %25
%33 = tail call double @atof(i8* %26)
%34 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), double %29, double %31, double %33)
%35 = load i8*, i8** %18
%36 = tail call double @atof(i8* %35)
%37 = load i8*, i8** %16
%38 = tail call double @atof(i8* %37)
%39 = load i8*, i8** %20
%40 = tail call double @atof(i8* %39)
%41 = tail call double @torques(double %36, double %38, double %40)
%42 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %41)
br label %67
43: ; preds = %25
%44 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %29, double %31)
%45 = load i8*, i8** %18
%46 = tail call double @atof(i8* %45)
%47 = load i8*, i8** %16
%48 = tail call double @atof(i8* %47)
%49 = tail call double @torque(double %46, double %48)
%50 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %49)
br label %67
51: ; preds = %21
%52 = tail call i32 (...) @displayHelp()
br label %67
53: ; preds = %21
%54 = load i8*, i8** %16
%55 = icmp eq i8* %54, null
br i1 %55, label %67, label %56
56: ; preds = %53
%57 = load i8*, i8** %18
%58 = tail call double @atof(i8* %57)
%59 = tail call double @atof(i8* %54)
%60 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %58, double %59)
%61 = load i8*, i8** %18
%62 = tail call double @atof(i8* %61)
%63 = load i8*, i8** %16
%64 = tail call double @atof(i8* %63)
%65 = tail call double @momentum(double %62, double %64)
%66 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), double %65)
br label %67
67: ; preds = %51, %21, %43, %32, %56, %53
%68 = add nuw nsw i64 %23, 1
%69 = icmp eq i64 %68, 8
br i1 %69, label %74, label %70
70: ; preds = %67
%71 = load i8*, i8** %8
%72 = getelementptr inbounds i8, i8* %71, i64 %68
%73 = load i8, i8* %72
br label %21
74: ; preds = %67, %12
%75 = phi i64 [ %13, %12 ], [ %17, %67 ]
%76 = icmp eq i64 %75, %5
br i1 %76, label %79, label %6
77: ; preds = %2
%78 = tail call i32 (...) @displayHelp()
br label %79
79: ; preds = %74, %77
ret i32 0
}