#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*/ cutpoints(char *, char *, char *, char *);
int /*<<< orphan*/ scan(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ xerrf(char *, char *, char *);
int main(int argc, char **argv) {
  if (argc < 4)
    xerrf("Usage: %s --scan ifile ofile (levelfile | '')\n"
          "  or   %s timespec ifile ofile sfile\n",
          argv[0], argv[0]);
  if (strcmp(argv[1], "--scan") == 0)
    scan(argv[2], argv[3], argv[4]);
  else
    cutpoints(argv[1], argv[2], argv[3], argv[4]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    117a <main+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe8b(%rip),%rdi
call   1030 <xerrf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xecb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11ba <main+0x7a>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdx
call   1060 <scan@plt>
jmp    11df <main+0x9f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
call   1050 <cutpoints@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x3,%edi
jg     115b <main+0x1b>
mov    (%rbx),%rdx
lea    0xead(%rip),%rdi
mov    %rdx,%rsi
call   1030 <xerrf@plt>
mov    0x8(%rbx),%rdi
lea    0xeee(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1187 <main+0x47>
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rsi
mov    0x18(%rbx),%rdx
mov    0x20(%rbx),%rcx
call   1050 <cutpoints@plt>
jmp    1198 <main+0x58>
mov    0x10(%rbx),%rdi
mov    0x18(%rbx),%rsi
mov    0x20(%rbx),%rdx
call   1060 <scan@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [84 x i8] c"Usage: %s --scan ifile ofile (levelfile | '')\0A or %s timespec ifile ofile sfile\0A\00"
@.str.1 = [7 x i8] c"--scan\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @xerrf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %14)
br label %16
16: ; preds = %8, %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %33
22: ; preds = %16
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 4
%31 = load i8*, i8** %30
%32 = call i32 @scan(i8* %25, i8* %28, i8* %31)
br label %47
33: ; preds = %16
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 1
%36 = load i8*, i8** %35
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 2
%39 = load i8*, i8** %38
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 3
%42 = load i8*, i8** %41
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 4
%45 = load i8*, i8** %44
%46 = call i32 @cutpoints(i8* %36, i8* %39, i8* %42, i8* %45)
br label %47
47: ; preds = %33, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [84 x i8] c"Usage: %s --scan ifile ofile (levelfile | '')\0A or %s timespec ifile ofile sfile\0A\00"
@.str.1 = [7 x i8] c"--scan\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 4
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @xerrf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %7
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8*, i8** %1, i64 4
%18 = load i8*, i8** %17
%19 = tail call i32 @scan(i8* %14, i8* %16, i8* %18)
br label %29
20: ; preds = %7
%21 = load i8*, i8** %8
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8*, i8** %1, i64 4
%27 = load i8*, i8** %26
%28 = tail call i32 @cutpoints(i8* %21, i8* %23, i8* %25, i8* %27)
br label %29
29: ; preds = %20, %12
ret i32 0
}