#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 *, ...);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  printf("if2k_remove_tool running\n");
  do {
    printf("%s\n", "/sbin/kextunload /System/Library/Extensions/if2kext.kext");
    system("/sbin/kextunload /System/Library/Extensions/if2kext.kext");
  } while (0);
  do {
    printf("%s\n", "/bin/launchctl unload com.internetfilter.if2kd");
    system("/bin/launchctl unload com.internetfilter.if2kd");
  } while (0);
  do {
    printf("%s\n", "/bin/launchctl stop com.internetfilter.if2kd");
    system("/bin/launchctl stop com.internetfilter.if2kd");
  } while (0);
  do {
    printf("%s\n", "rm -r -f /System/Library/Extensions/if2kext.kext");
    system("rm -r -f /System/Library/Extensions/if2kext.kext");
  } while (0);
  do {
    printf("%s\n",
           "rm -r -f /Library/LaunchDaemons/com.internetfilter.if2kd.plist");
    system("rm -r -f /Library/LaunchDaemons/com.internetfilter.if2kd.plist");
  } while (0);
  do {
    printf("%s\n", "rm -r -f /Library/If2k");
    system("rm -r -f /Library/If2k");
  } while (0);
  do {
    printf("%s\n", "rm -r -f /Library/Receipts/if2ksystem.pkg");
    system("rm -r -f /Library/Receipts/if2ksystem.pkg");
  } while (0);
  do {
    printf("%s\n", "rm -r -f /Library/StartupItems/if2k");
    system("rm -r -f /Library/StartupItems/if2k");
  } while (0);
  do {
    printf("%s\n", "rm -r -f /Library/StartupItems/If2k");
    system("rm -r -f /Library/StartupItems/If2k");
  } while (0);
  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)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebe(%rip),%rdi
call   1030 <system@plt>
jmp    116a <main+0x4a>
lea    0xea9(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
jmp    1190 <main+0x70>
lea    0xe83(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
jmp    11b6 <main+0x96>
lea    0xe5d(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
jmp    11dc <main+0xbc>
lea    0xe37(%rip),%rdi
lea    0xefa(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <system@plt>
jmp    1202 <main+0xe2>
lea    0xe11(%rip),%rdi
lea    0xf13(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <system@plt>
jmp    1228 <main+0x108>
lea    0xdeb(%rip),%rdi
lea    0xf04(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <system@plt>
jmp    124e <main+0x12e>
lea    0xdc5(%rip),%rdi
lea    0xf08(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <system@plt>
jmp    1274 <main+0x154>
lea    0xd9f(%rip),%rdi
lea    0xf06(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0x1066(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xeee(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf06(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf1c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf36(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf5e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf5e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf71(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xf7e(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"if2k_remove_tool running\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [57 x i8] c"/sbin/kextunload /System/Library/Extensions/if2kext.kext\00"
@.str.3 = [47 x i8] c"/bin/launchctl unload com.internetfilter.if2kd\00"
@.str.4 = [45 x i8] c"/bin/launchctl stop com.internetfilter.if2kd\00"
@.str.5 = [49 x i8] c"rm -r -f /System/Library/Extensions/if2kext.kext\00"
@.str.6 = [63 x i8] c"rm -r -f /Library/LaunchDaemons/com.internetfilter.if2kd.plist\00"
@.str.7 = [23 x i8] c"rm -r -f /Library/If2k\00"
@.str.8 = [42 x i8] c"rm -r -f /Library/Receipts/if2ksystem.pkg\00"
@.str.9 = [36 x i8] c"rm -r -f /Library/StartupItems/if2k\00"
@.str.10 = [36 x i8] c"rm -r -f /Library/StartupItems/If2k\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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
br label %14
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %15
br label %19
19: ; preds = %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%21 = call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
br label %22
22: ; preds = %19
br label %23
23: ; preds = %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
br label %26
26: ; preds = %23
br label %27
27: ; preds = %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
br label %30
30: ; preds = %27
br label %31
31: ; preds = %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%33 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
br label %34
34: ; preds = %31
br label %35
35: ; preds = %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%37 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
br label %38
38: ; preds = %35
br label %39
39: ; preds = %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
br label %42
42: ; preds = %39
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [57 x i8] c"/sbin/kextunload /System/Library/Extensions/if2kext.kext\00"
@.str.3 = [47 x i8] c"/bin/launchctl unload com.internetfilter.if2kd\00"
@.str.4 = [45 x i8] c"/bin/launchctl stop com.internetfilter.if2kd\00"
@.str.5 = [49 x i8] c"rm -r -f /System/Library/Extensions/if2kext.kext\00"
@.str.6 = [63 x i8] c"rm -r -f /Library/LaunchDaemons/com.internetfilter.if2kd.plist\00"
@.str.7 = [23 x i8] c"rm -r -f /Library/If2k\00"
@.str.8 = [42 x i8] c"rm -r -f /Library/Receipts/if2ksystem.pkg\00"
@.str.9 = [36 x i8] c"rm -r -f /Library/StartupItems/if2k\00"
@.str.10 = [36 x i8] c"rm -r -f /Library/StartupItems/If2k\00"
@str = [25 x i8] c"if2k_remove_tool running\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%13 = tail call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%17 = tail call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%19 = tail call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%21 = tail call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}