#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 atol(char *);
int /*<<< orphan*/ lxc_mmap();
int /*<<< orphan*/ lxc_mpmap();
int /*<<< orphan*/ multiprocesses();
int main(int argc, char *argv[]) {
  int type = 0;
  if (argc > 1) {
    type = atol(argv[1]);
  }
  switch (type) {
  case 0:
    break;
  case 1:
    break;
  case 2:
    multiprocesses();
    break;
  case 3:
    lxc_mmap();
    break;
  case 4:
    lxc_mpmap();
    break;
  default:
    break;
  }
  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    1177 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x4,%rax
ja     11ca <main+0x8a>
mov    -0x20(%rbp),%rax
lea    0xe6d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    11cf <main+0x8f>
jmp    11cf <main+0x8f>
mov    $0x0,%al
call   1040 <multiprocesses@plt>
jmp    11cf <main+0x8f>
mov    $0x0,%al
call   1030 <lxc_mmap@plt>
jmp    11cf <main+0x8f>
mov    $0x0,%al
call   1060 <lxc_mpmap@plt>
jmp    11cf <main+0x8f>
jmp    11cf <main+0x8f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1177 <main+0x37>
mov    0x8(%rsi),%rdi
call   1050 <atol@plt>
cmp    $0x4,%eax
je     1167 <main+0x27>
cmp    $0x3,%eax
je     1170 <main+0x30>
cmp    $0x2,%eax
jne    1177 <main+0x37>
xor    %eax,%eax
call   1040 <multiprocesses@plt>
jmp    1177 <main+0x37>
xor    %eax,%eax
call   1060 <lxc_mpmap@plt>
jmp    1177 <main+0x37>
xor    %eax,%eax
call   1030 <lxc_mmap@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atol(i8* %12)
store i32 %13, i32* %6
br label %14
14: ; preds = %9, %2
%15 = load i32, i32* %6
switch i32 %15, label %24 [
i32 0, label %16
i32 1, label %17
i32 2, label %18
i32 3, label %20
i32 4, label %22
]
16: ; preds = %14
br label %25
17: ; preds = %14
br label %25
18: ; preds = %14
%19 = call i32 (...) @multiprocesses()
br label %25
20: ; preds = %14
%21 = call i32 (...) @lxc_mmap()
br label %25
22: ; preds = %14
%23 = call i32 (...) @lxc_mpmap()
br label %25
24: ; preds = %14
br label %25
25: ; preds = %24, %22, %20, %18, %17, %16
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
switch i32 %7, label %14 [
i32 4, label %12
i32 3, label %10
i32 2, label %8
]
8: ; preds = %4
%9 = tail call i32 (...) @multiprocesses()
br label %14
10: ; preds = %4
%11 = tail call i32 (...) @lxc_mmap()
br label %14
12: ; preds = %4
%13 = tail call i32 (...) @lxc_mpmap()
br label %14
14: ; preds = %2, %4, %12, %10, %8
ret i32 0
}