#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 calcstrsum(char *);
int /*<<< orphan*/ makefile(char **, char *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printhelp();
int main(int argc, char **argv) {
  if (argc == 1 || calcstrsum(argv[1]) == 425 || calcstrsum(argv[1]) == 149)
    printhelp();
  else {
    makefile(argv, argv[1], argc);
  }
  printf("Testing");
  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   $0x1,-0x8(%rbp)
je     1190 <main+0x50>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <calcstrsum@plt>
cmp    $0x1a9,%eax
je     1190 <main+0x50>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <calcstrsum@plt>
cmp    $0x95,%eax
jne    119c <main+0x5c>
mov    $0x0,%al
call   1060 <printhelp@plt>
jmp    11b0 <main+0x70>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x8(%rbp),%edx
call   1040 <makefile@plt>
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
je     116e <main+0x2e>
mov    %rsi,%r14
mov    %edi,%ebx
mov    0x8(%rsi),%rdi
call   1050 <calcstrsum@plt>
cmp    $0x1a9,%eax
je     116e <main+0x2e>
mov    0x8(%r14),%rdi
call   1050 <calcstrsum@plt>
cmp    $0x95,%eax
jne    118b <main+0x4b>
xor    %eax,%eax
call   1060 <printhelp@plt>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x8(%r14),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <makefile@plt>
jmp    1175 <main+0x35>

LLVM IR (-O0):
@.str = [8 x i8] c"Testing\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 eq i32 %6, 1
br i1 %7, label %20, label %8
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @calcstrsum(i8* %11)
%13 = icmp eq i32 %12, 425
br i1 %13, label %20, label %14
14: ; preds = %8
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @calcstrsum(i8* %17)
%19 = icmp eq i32 %18, 149
br i1 %19, label %20, label %22
20: ; preds = %14, %8, %2
%21 = call i32 (...) @printhelp()
br label %29
22: ; preds = %14
%23 = load i8**, i8*** %5
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = load i32, i32* %4
%28 = call i32 @makefile(i8** %23, i8* %26, i32 %27)
br label %29
29: ; preds = %22, %20
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Testing\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @calcstrsum(i8* %6)
%8 = icmp eq i32 %7, 425
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = load i8*, i8** %5
%11 = tail call i32 @calcstrsum(i8* %10)
%12 = icmp eq i32 %11, 149
br i1 %12, label %13, label %15
13: ; preds = %9, %4, %2
%14 = tail call i32 (...) @printhelp()
br label %18
15: ; preds = %9
%16 = load i8*, i8** %5
%17 = tail call i32 @makefile(i8** %1, i8* %16, i32 %0)
br label %18
18: ; preds = %15, %13
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}