#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*/ printf(char *, char *);
int /*<<< orphan*/ show_error_message();
scalar_t__ strcmp(char const *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char const *argv[]) {
  if (argc >= 2) {
    if (strcmp(argv[1], "on") == 0 || strcmp(argv[1], "true") == 0) {
      system("defaults write com.apple.finder AppleShowAllFiles TRUE && "
             "killall Finder");
      printf("%s\n", "All hidden files and directories are visible now.");
    } else if (strcmp(argv[1], "off") == 0 || strcmp(argv[1], "false") == 0) {
      system("defaults write com.apple.finder AppleShowAllFiles FALSE && "
             "killall Finder");
      printf("%s\n", "All hidden files and directories are invisible now.");
    } else if (strcmp(argv[1], "-v") == 0 ||
               strcmp(argv[1], "--version") == 0) {
      printf("%s\n", "hiddenfiles v1.1 - 10-23-2015");
    } else {
      show_error_message();
    }
  } else {
    show_error_message();
  }
  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)
jl     128a <main+0x14a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xfa7(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     119c <main+0x5c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe73(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11c0 <main+0x80>
lea    0xe62(%rip),%rdi
call   1030 <system@plt>
lea    0xe9f(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1040 <printf@plt>
jmp    1285 <main+0x145>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11fc <main+0xbc>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe9b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1220 <main+0xe0>
lea    0xe8b(%rip),%rdi
call   1030 <system@plt>
lea    0xe3f(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <printf@plt>
jmp    1280 <main+0x140>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xedd(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     125c <main+0x11c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xec2(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1274 <main+0x134>
lea    0xdeb(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <printf@plt>
jmp    127b <main+0x13b>
mov    $0x0,%al
call   1060 <show_error_message@plt>
jmp    1280 <main+0x140>
jmp    1285 <main+0x145>
jmp    1291 <main+0x151>
mov    $0x0,%al
call   1060 <show_error_message@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     11cb <main+0x8b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xfbe(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11d4 <main+0x94>
mov    0x8(%rbx),%rdi
lea    0xe93(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11d4 <main+0x94>
mov    0x8(%rbx),%rdi
lea    0xf02(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11f0 <main+0xb0>
mov    0x8(%rbx),%rdi
lea    0xef1(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11f0 <main+0xb0>
mov    0x8(%rbx),%rdi
lea    0xf60(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     120c <main+0xcc>
mov    0x8(%rbx),%rdi
lea    0xf4e(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     120c <main+0xcc>
xor    %eax,%eax
call   1060 <show_error_message@plt>
jmp    121f <main+0xdf>
lea    0xe2a(%rip),%rdi
call   1030 <system@plt>
lea    0xe67(%rip),%rdi
lea    0xe64(%rip),%rsi
jmp    121a <main+0xda>
lea    0xe97(%rip),%rdi
call   1030 <system@plt>
lea    0xe4b(%rip),%rdi
lea    0xece(%rip),%rsi
jmp    121a <main+0xda>
lea    0xe3b(%rip),%rdi
lea    0xeff(%rip),%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"on\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [73 x i8] c"defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [50 x i8] c"All hidden files and directories are visible now.\00"
@.str.5 = [4 x i8] c"off\00"
@.str.6 = [6 x i8] c"false\00"
@.str.7 = [74 x i8] c"defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder\00"
@.str.8 = [52 x i8] c"All hidden files and directories are invisible now.\00"
@.str.9 = [3 x i8] c"-v\00"
@.str.10 = [10 x i8] c"--version\00"
@.str.11 = [30 x i8] c"hiddenfiles v1.1 - 10-23-2015\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 sge i32 %6, 2
br i1 %7, label %8, label %57
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
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 i64 @strcmp(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %14, %8
%21 = call i32 @system(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
br label %56
23: ; preds = %14
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %35, label %29
29: ; preds = %23
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %29, %23
%36 = call i32 @system(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
br label %55
38: ; preds = %29
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = load i8*, i8** %40
%42 = call i64 @strcmp(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %50, label %44
44: ; preds = %38
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i64 1
%47 = load i8*, i8** %46
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %44, %38
%51 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
br label %54
52: ; preds = %44
%53 = call i32 (...) @show_error_message()
br label %54
54: ; preds = %52, %50
br label %55
55: ; preds = %54, %35
br label %56
56: ; preds = %55, %20
br label %59
57: ; preds = %2
%58 = call i32 (...) @show_error_message()
br label %59
59: ; preds = %57, %56
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"on\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [73 x i8] c"defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [50 x i8] c"All hidden files and directories are visible now.\00"
@.str.5 = [4 x i8] c"off\00"
@.str.6 = [6 x i8] c"false\00"
@.str.7 = [74 x i8] c"defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder\00"
@.str.8 = [52 x i8] c"All hidden files and directories are invisible now.\00"
@.str.9 = [3 x i8] c"-v\00"
@.str.10 = [10 x i8] c"--version\00"
@.str.11 = [30 x i8] c"hiddenfiles v1.1 - 10-23-2015\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %39
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%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* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9, %4
%14 = tail call i32 @system(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
br label %41
16: ; preds = %9
%17 = load i8*, i8** %5
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %24, label %20
20: ; preds = %16
%21 = load i8*, i8** %5
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %20, %16
%25 = tail call i32 @system(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0))
%26 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
br label %41
27: ; preds = %20
%28 = load i8*, i8** %5
%29 = tail call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i8*, i8** %5
%33 = tail call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31, %27
%36 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0))
br label %41
37: ; preds = %31
%38 = tail call i32 (...) @show_error_message()
br label %41
39: ; preds = %2
%40 = tail call i32 (...) @show_error_message()
br label %41
41: ; preds = %13, %35, %37, %24, %39
ret i32 0
}