#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*/ execl(char *, char *, char *, char *, ...);
int /*<<< orphan*/ printf(char *);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char **argv) {
  if (argc == 2) {
    execl("/usr/lib/latch/system/pair.py", "pair.py", argv[1], NULL);
  } else if (argc == 4 && strncmp("-f", argv[2], 2) == 0) {
    execl("/usr/lib/latch/system/pair.py", "pair.py", argv[1], "-f", argv[3],
          NULL);
  } else {
    printf("use 'pairSYS <TOKEN> [-f latch.conf]'\n");
  }
  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   $0x2,-0x8(%rbp)
jne    1176 <main+0x46>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xea1(%rip),%rdi
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x0,%al
call   1050 <execl@plt>
jmp    11ea <main+0xba>
cmpl   $0x4,-0x8(%rbp)
jne    11d9 <main+0xa9>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11d9 <main+0xa9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%r8
lea    0xe46(%rip),%rdi
lea    0xe55(%rip),%rsi
lea    0xe56(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r9d
mov    $0x0,%al
call   1050 <execl@plt>
jmp    11e5 <main+0xb5>
lea    0xe41(%rip),%rdi
call   1040 <printf@plt>
jmp    11ea <main+0xba>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x4,%edi
je     115b <main+0x2b>
cmp    $0x2,%edi
jne    1175 <main+0x45>
mov    0x8(%rbx),%rdx
lea    0xeb7(%rip),%rdi
lea    0xec6(%rip),%rsi
xor    %ecx,%ecx
xor    %eax,%eax
call   1050 <execl@plt>
jmp    11aa <main+0x7a>
mov    0x10(%rbx),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1183 <main+0x53>
lea    0xea5(%rip),%rdi
call   1040 <puts@plt>
jmp    11aa <main+0x7a>
mov    0x8(%rbx),%rdx
mov    0x18(%rbx),%r8
lea    0xe6e(%rip),%rdi
lea    0xe7d(%rip),%rsi
lea    0xe7e(%rip),%rcx
xor    %r9d,%r9d
xor    %eax,%eax
call   1050 <execl@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"/usr/lib/latch/system/pair.py\00"
@.str.1 = [8 x i8] c"pair.py\00"
@.str.2 = [3 x i8] c"-f\00"
@.str.3 = [39 x i8] c"use 'pairSYS <TOKEN> [-f latch.conf]'\0A\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, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 (i8*, i8*, i8*, i8*, ...) @execl(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* null)
br label %33
13: ; preds = %2
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 4
br i1 %15, label %16, label %30
16: ; preds = %13
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %19, i32 2)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %16
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = call i32 (i8*, i8*, i8*, i8*, ...) @execl(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %28, i8* null)
br label %32
30: ; preds = %16, %13
%31 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %30, %22
br label %33
33: ; preds = %32, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"/usr/lib/latch/system/pair.py\00"
@.str.1 = [8 x i8] c"pair.py\00"
@.str.2 = [3 x i8] c"-f\00"
@str = [38 x i8] c"use 'pairSYS <TOKEN> [-f latch.conf]'\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %18 [
i32 2, label %3
i32 4, label %7
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 (i8*, i8*, i8*, i8*, ...) @execl(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* null)
br label %20
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %9, i32 2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %7
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8*, i8** %1, i64 3
%16 = load i8*, i8** %15
%17 = tail call i32 (i8*, i8*, i8*, i8*, ...) @execl(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %16, i8* null)
br label %20
18: ; preds = %2, %7
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
br label %20
20: ; preds = %12, %18, %3
ret i32 0
}