#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*/ core_tests();
int /*<<< orphan*/ create_symbol_path_tests();
int /*<<< orphan*/ diff_tests();
int /*<<< orphan*/ merge_tests();
int /*<<< orphan*/ serialization_tests();
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ test_client_protocol();
int /*<<< orphan*/ test_server_protocol();
int main(int argc, char *argv[]) {
  int test_command = 0;
  ;
  if (argc > 1) {
    if (strcmp("server", argv[1]) == 0)
      test_command = 1;
    else if (strcmp("client", argv[1]) == 0)
      test_command = 2;
  }
  core_tests();
  serialization_tests();
  diff_tests();
  merge_tests();
  create_symbol_path_tests();
  if (test_command == 1)
    test_server_protocol();
  if (test_command == 2)
    test_client_protocol();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1200 <main+0x80>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe4a(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    11d1 <main+0x51>
movl   $0x1,-0x14(%rbp)
jmp    11fb <main+0x7b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe27(%rip),%rdi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    11f6 <main+0x76>
movl   $0x2,-0x14(%rbp)
jmp    11fb <main+0x7b>
jmp    1200 <main+0x80>
mov    $0x0,%al
call   10a0 <core_tests@plt>
mov    $0x0,%al
call   1090 <serialization_tests@plt>
mov    $0x0,%al
call   1080 <diff_tests@plt>
mov    $0x0,%al
call   1040 <merge_tests@plt>
mov    $0x0,%al
call   1050 <create_symbol_path_tests@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1234 <main+0xb4>
mov    $0x0,%al
call   1060 <test_server_protocol@plt>
cmpl   $0x2,-0x14(%rbp)
jne    1245 <main+0xc5>
mov    $0x0,%al
call   1030 <test_client_protocol@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     11ba <main+0x3a>
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xe6a(%rip),%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11be <main+0x3e>
mov    0x8(%rbx),%rsi
lea    0xe5c(%rip),%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
sete   %bl
xor    %ebp,%ebp
jmp    11c3 <main+0x43>
xor    %ebp,%ebp
jmp    11c1 <main+0x41>
mov    $0x1,%bpl
xor    %ebx,%ebx
xor    %eax,%eax
call   10a0 <core_tests@plt>
xor    %eax,%eax
call   1090 <serialization_tests@plt>
xor    %eax,%eax
call   1080 <diff_tests@plt>
xor    %eax,%eax
call   1040 <merge_tests@plt>
xor    %eax,%eax
call   1050 <create_symbol_path_tests@plt>
test   %bpl,%bpl
je     11f2 <main+0x72>
xor    %eax,%eax
call   1060 <test_server_protocol@plt>
test   %bl,%bl
je     11fd <main+0x7d>
xor    %eax,%eax
call   1030 <test_client_protocol@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"server\00"
@.str.1 = [7 x i8] c"client\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %25
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %6
br label %24
16: ; preds = %9
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 2, i32* %6
br label %23
23: ; preds = %22, %16
br label %24
24: ; preds = %23, %15
br label %25
25: ; preds = %24, %2
%26 = call i32 (...) @core_tests()
%27 = call i32 (...) @serialization_tests()
%28 = call i32 (...) @diff_tests()
%29 = call i32 (...) @merge_tests()
%30 = call i32 (...) @create_symbol_path_tests()
%31 = load i32, i32* %6
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %35
33: ; preds = %25
%34 = call i32 (...) @test_server_protocol()
br label %35
35: ; preds = %33, %25
%36 = load i32, i32* %6
%37 = icmp eq i32 %36, 2
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (...) @test_client_protocol()
br label %40
40: ; preds = %38, %35
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"server\00"
@.str.1 = [7 x i8] c"client\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = load i8*, i8** %5
%11 = tail call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = icmp eq i64 %11, 0
br label %13
13: ; preds = %9, %4, %2
%14 = phi i1 [ false, %2 ], [ true, %4 ], [ false, %9 ]
%15 = phi i1 [ false, %2 ], [ false, %4 ], [ %12, %9 ]
%16 = tail call i32 (...) @core_tests()
%17 = tail call i32 (...) @serialization_tests()
%18 = tail call i32 (...) @diff_tests()
%19 = tail call i32 (...) @merge_tests()
%20 = tail call i32 (...) @create_symbol_path_tests()
br i1 %14, label %21, label %23
21: ; preds = %13
%22 = tail call i32 (...) @test_server_protocol()
br label %23
23: ; preds = %21, %13
br i1 %15, label %24, label %26
24: ; preds = %23
%25 = tail call i32 (...) @test_client_protocol()
br label %26
26: ; preds = %24, %23
ret i32 0
}