#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*/ apt_clean(char *);
int /*<<< orphan*/ apt_fullupgrade(char *);
int /*<<< orphan*/ apt_update(char *);
int /*<<< orphan*/ clam_scan_util(char *, int);
int /*<<< orphan*/ clapt_complete(char *);
int /*<<< orphan*/ clapt_confirm(char *);
int /*<<< orphan*/ clapt_help();
int /*<<< orphan*/ clapt_init();
int /*<<< orphan*/ clapt_lock_apt(char *);
int /*<<< orphan*/ clapt_version();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  int c;
  char cmd[32], prog[32];
  strcpy(prog, "clAPT");
  if (argc < 2) {
    clapt_confirm(prog);
    clapt_init();
    clapt_lock_apt(prog);
    apt_update(prog);
    apt_fullupgrade(prog);
    clam_scan_util(prog, 0);
    apt_clean(prog);
  } else {
    strcpy(cmd, argv[1]);
    if ((strcmp(cmd, "--complete") == 0) || (strcmp(cmd, "--update") == 0) ||
        (strcmp(cmd, "--upgrade") == 0) || (strcmp(cmd, "--upscan") == 0) ||
        (strcmp(cmd, "--fullscan") == 0) || (strcmp(cmd, "--clean") == 0))
      clapt_init();
    if ((c = strcmp(cmd, "-V")) == 0 || (c = strcmp(cmd, "--version")) == 0) {
      clapt_version();
    } else if ((c = strcmp(cmd, "--update")) == 0) {
      clapt_lock_apt(prog);
      apt_update(prog);
    } else if ((c = strcmp(cmd, "--upgrade")) == 0) {
      clapt_lock_apt(prog);
      apt_fullupgrade(prog);
    } else if ((c = strcmp(cmd, "-h")) == 0 || (c = strcmp(cmd, "--help")) == 0)
      clapt_help();
    else if ((c = strcmp(cmd, "--upscan")) == 0)
      clam_scan_util(prog, 0);
    else if ((c = strcmp(cmd, "--complete")) == 0)
      clapt_complete(prog);
    else if ((c = strcmp(cmd, "--fullscan")) == 0)
      clam_scan_util(prog, 1);
    else if ((c = strcmp(cmd, "--clean")) == 0)
      apt_clean(prog);
    else {
      printf("%s: The option selected is not valid. Please see '--help'.\n",
             prog);
      exit(1);
    }
  }
  printf("Thank you for using %s :)\n", prog);
  exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xdff(%rip),%rsi
call   1040 <strcpy@plt>
cmpl   $0x2,-0x8(%rbp)
jge    1254 <main+0x74>
lea    -0x60(%rbp),%rdi
call   10f0 <clapt_confirm@plt>
mov    $0x0,%al
call   1050 <clapt_init@plt>
lea    -0x60(%rbp),%rdi
call   10b0 <clapt_lock_apt@plt>
lea    -0x60(%rbp),%rdi
call   10e0 <apt_update@plt>
lea    -0x60(%rbp),%rdi
call   1070 <apt_fullupgrade@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
call   1030 <clam_scan_util@plt>
lea    -0x60(%rbp),%rdi
call   10c0 <apt_clean@plt>
jmp    14e1 <main+0x301>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <strcpy@plt>
lea    -0x40(%rbp),%rdi
lea    0xd96(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12fb <main+0x11b>
lea    -0x40(%rbp),%rdi
lea    0xd88(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12fb <main+0x11b>
lea    -0x40(%rbp),%rdi
lea    0xd78(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12fb <main+0x11b>
lea    -0x40(%rbp),%rdi
lea    0xd69(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12fb <main+0x11b>
lea    -0x40(%rbp),%rdi
lea    0xd59(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12fb <main+0x11b>
lea    -0x40(%rbp),%rdi
lea    0xd4b(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1302 <main+0x122>
mov    $0x0,%al
call   1050 <clapt_init@plt>
lea    -0x40(%rbp),%rdi
lea    0xd33(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     133a <main+0x15a>
lea    -0x40(%rbp),%rdi
lea    0xd1a(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1346 <main+0x166>
mov    $0x0,%al
call   10d0 <clapt_version@plt>
jmp    14dc <main+0x2fc>
lea    -0x40(%rbp),%rdi
lea    0xcc0(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1379 <main+0x199>
lea    -0x60(%rbp),%rdi
call   10b0 <clapt_lock_apt@plt>
lea    -0x60(%rbp),%rdi
call   10e0 <apt_update@plt>
jmp    14d7 <main+0x2f7>
lea    -0x40(%rbp),%rdi
lea    0xc96(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    13ac <main+0x1cc>
lea    -0x60(%rbp),%rdi
call   10b0 <clapt_lock_apt@plt>
lea    -0x60(%rbp),%rdi
call   1070 <apt_fullupgrade@plt>
jmp    14d2 <main+0x2f2>
lea    -0x40(%rbp),%rdi
lea    0xc96(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     13e4 <main+0x204>
lea    -0x40(%rbp),%rdi
lea    0xc7d(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    13f0 <main+0x210>
mov    $0x0,%al
call   1080 <clapt_help@plt>
jmp    14cd <main+0x2ed>
lea    -0x40(%rbp),%rdi
lea    0xc29(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    141c <main+0x23c>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
call   1030 <clam_scan_util@plt>
jmp    14c8 <main+0x2e8>
lea    -0x40(%rbp),%rdi
lea    0xbdf(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1446 <main+0x266>
lea    -0x60(%rbp),%rdi
call   10a0 <clapt_complete@plt>
jmp    14c3 <main+0x2e3>
lea    -0x40(%rbp),%rdi
lea    0xbdc(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    1475 <main+0x295>
lea    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1030 <clam_scan_util@plt>
jmp    14be <main+0x2de>
lea    -0x40(%rbp),%rdi
lea    0xbb8(%rip),%rsi
call   1090 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    149f <main+0x2bf>
lea    -0x60(%rbp),%rdi
call   10c0 <apt_clean@plt>
jmp    14b9 <main+0x2d9>
lea    -0x60(%rbp),%rsi
lea    0xbad(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
jmp    14be <main+0x2de>
jmp    14c3 <main+0x2e3>
jmp    14c8 <main+0x2e8>
jmp    14cd <main+0x2ed>
jmp    14d2 <main+0x2f2>
jmp    14d7 <main+0x2f7>
jmp    14dc <main+0x2fc>
jmp    14e1 <main+0x301>
lea    -0x60(%rbp),%rsi
lea    0xba7(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe1c(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1040 <strcpy@plt>
cmp    $0x1,%ebp
jg     1236 <main+0x66>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10e0 <clapt_confirm@plt>
xor    %eax,%eax
call   1050 <clapt_init@plt>
mov    %rbx,%rdi
call   10a0 <clapt_lock_apt@plt>
mov    %rbx,%rdi
call   10d0 <apt_update@plt>
mov    %rbx,%rdi
call   1070 <apt_fullupgrade@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <clam_scan_util@plt>
mov    %rbx,%rdi
call   10b0 <apt_clean@plt>
jmp    132a <main+0x15a>
movabs $0x656c706d6f632d2d,%r14
70 6c 65
movabs $0x6574656c706d6f,%rbp
mov    0x8(%rbx),%rsi
mov    %rsp,%rdi
call   1040 <strcpy@plt>
mov    (%rsp),%rax
xor    %r14,%rax
mov    0x3(%rsp),%rcx
xor    %rbp,%rcx
or     %rax,%rcx
je     12ee <main+0x11e>
movabs $0x6574616470752d2d,%rax
61 74 65
xor    (%rsp),%rax
movzbl 0x8(%rsp),%ecx
or     %rax,%rcx
je     12ee <main+0x11e>
movabs $0x6461726770752d2d,%rax
72 61 64
xor    (%rsp),%rax
movzwl 0x8(%rsp),%ecx
xor    $0x65,%rcx
or     %rax,%rcx
je     12ee <main+0x11e>
movabs $0x6e61637370752d2d,%rax
63 61 6e
xor    (%rsp),%rax
movzbl 0x8(%rsp),%ecx
or     %rax,%rcx
je     12ee <main+0x11e>
mov    (%rsp),%rax
movabs $0x63736c6c75662d2d,%rcx
6c 73 63
xor    %rax,%rcx
movabs $0x6e6163736c6c75,%rdx
xor    0x3(%rsp),%rdx
or     %rcx,%rdx
je     12ee <main+0x11e>
movabs $0x6e61656c632d2d,%rcx
cmp    %rcx,%rax
jne    12f5 <main+0x125>
xor    %eax,%eax
call   1050 <clapt_init@plt>
mov    $0x562d,%eax
xor    (%rsp),%eax
movzbl 0x2(%rsp),%ecx
or     %ax,%cx
je     1323 <main+0x153>
movabs $0x6f69737265762d2d,%rax
73 69 6f
xor    (%rsp),%rax
movzwl 0x8(%rsp),%ecx
xor    $0x6e,%rcx
or     %rax,%rcx
jne    1345 <main+0x175>
xor    %eax,%eax
call   10c0 <clapt_version@plt>
lea    0xd5a(%rip),%rdi
lea    0x20(%rsp),%rsi
call   1060 <printf@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
movabs $0x6574616470752d2d,%rax
61 74 65
xor    (%rsp),%rax
movzbl 0x8(%rsp),%ecx
or     %rax,%rcx
jne    1374 <main+0x1a4>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <clapt_lock_apt@plt>
mov    %rbx,%rdi
call   10d0 <apt_update@plt>
jmp    132a <main+0x15a>
movabs $0x6461726770752d2d,%rax
72 61 64
xor    (%rsp),%rax
movzwl 0x8(%rsp),%ecx
xor    $0x65,%rcx
or     %rax,%rcx
jne    13a7 <main+0x1d7>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <clapt_lock_apt@plt>
mov    %rbx,%rdi
call   1070 <apt_fullupgrade@plt>
jmp    132a <main+0x15a>
mov    $0x682d,%eax
xor    (%rsp),%eax
movzbl 0x2(%rsp),%ecx
or     %ax,%cx
je     13ce <main+0x1fe>
mov    $0x65682d2d,%eax
xor    (%rsp),%eax
mov    $0x706c65,%ecx
xor    0x3(%rsp),%ecx
or     %eax,%ecx
jne    13da <main+0x20a>
xor    %eax,%eax
call   1080 <clapt_help@plt>
jmp    132a <main+0x15a>
movabs $0x6e61637370752d2d,%rax
63 61 6e
xor    (%rsp),%rax
movzbl 0x8(%rsp),%ecx
or     %rax,%rcx
jne    13fb <main+0x22b>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
jmp    1444 <main+0x274>
xor    (%rsp),%r14
xor    0x3(%rsp),%rbp
or     %r14,%rbp
jne    1418 <main+0x248>
lea    0x20(%rsp),%rdi
call   1090 <clapt_complete@plt>
jmp    132a <main+0x15a>
movabs $0x63736c6c75662d2d,%rax
6c 73 63
xor    (%rsp),%rax
movabs $0x6e6163736c6c75,%rcx
xor    0x3(%rsp),%rcx
or     %rax,%rcx
jne    144e <main+0x27e>
lea    0x20(%rsp),%rdi
mov    $0x1,%esi
call   1030 <clam_scan_util@plt>
jmp    132a <main+0x15a>
movabs $0x6e61656c632d2d,%rax
cmp    %rax,(%rsp)
jne    1468 <main+0x298>
lea    0x20(%rsp),%rdi
jmp    122c <main+0x5c>
lea    0xbe0(%rip),%rdi
jmp    1331 <main+0x161>

LLVM IR (-O0):
@.str = [6 x i8] c"clAPT\00"
@.str.1 = [11 x i8] c"--complete\00"
@.str.2 = [9 x i8] c"--update\00"
@.str.3 = [10 x i8] c"--upgrade\00"
@.str.4 = [9 x i8] c"--upscan\00"
@.str.5 = [11 x i8] c"--fullscan\00"
@.str.6 = [8 x i8] c"--clean\00"
@.str.7 = [3 x i8] c"-V\00"
@.str.8 = [10 x i8] c"--version\00"
@.str.9 = [3 x i8] c"-h\00"
@.str.10 = [7 x i8] c"--help\00"
@.str.11 = [60 x i8] c"%s: The option selected is not valid. Please see '--help'.\0A\00"
@.str.12 = [27 x i8] c"Thank you for using %s :)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [32 x i8]
%8 = alloca [32 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %27
13: ; preds = %2
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%15 = call i32 @clapt_confirm(i8* %14)
%16 = call i32 (...) @clapt_init()
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%18 = call i32 @clapt_lock_apt(i8* %17)
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%20 = call i32 @apt_update(i8* %19)
%21 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%22 = call i32 @apt_fullupgrade(i8* %21)
%23 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%24 = call i32 @clam_scan_util(i8* %23, i32 0)
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%26 = call i32 @apt_clean(i8* %25)
br label %136
27: ; preds = %2
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i32 @strcpy(i8* %28, i8* %31)
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %56, label %36
36: ; preds = %27
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %56, label %40
40: ; preds = %36
%41 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%42 = call i32 @strcmp(i8* %41, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %56, label %44
44: ; preds = %40
%45 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %56, label %48
48: ; preds = %44
%49 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%51 = icmp eq i32 %50, 0
br i1 %51, label %56, label %52
52: ; preds = %48
%53 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%54 = call i32 @strcmp(i8* %53, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %52, %48, %44, %40, %36, %27
%57 = call i32 (...) @clapt_init()
br label %58
58: ; preds = %56, %52
%59 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%60 = call i32 @strcmp(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32 %60, i32* %6
%61 = icmp eq i32 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %58
%63 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%64 = call i32 @strcmp(i8* %63, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
store i32 %64, i32* %6
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %62, %58
%67 = call i32 (...) @clapt_version()
br label %135
68: ; preds = %62
%69 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%70 = call i32 @strcmp(i8* %69, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 %70, i32* %6
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %68
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%74 = call i32 @clapt_lock_apt(i8* %73)
%75 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%76 = call i32 @apt_update(i8* %75)
br label %134
77: ; preds = %68
%78 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%79 = call i32 @strcmp(i8* %78, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
store i32 %79, i32* %6
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %86
81: ; preds = %77
%82 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%83 = call i32 @clapt_lock_apt(i8* %82)
%84 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%85 = call i32 @apt_fullupgrade(i8* %84)
br label %133
86: ; preds = %77
%87 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%88 = call i32 @strcmp(i8* %87, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
store i32 %88, i32* %6
%89 = icmp eq i32 %88, 0
br i1 %89, label %94, label %90
90: ; preds = %86
%91 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%92 = call i32 @strcmp(i8* %91, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
store i32 %92, i32* %6
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %90, %86
%95 = call i32 (...) @clapt_help()
br label %132
96: ; preds = %90
%97 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%98 = call i32 @strcmp(i8* %97, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
store i32 %98, i32* %6
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %103
100: ; preds = %96
%101 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%102 = call i32 @clam_scan_util(i8* %101, i32 0)
br label %131
103: ; preds = %96
%104 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%105 = call i32 @strcmp(i8* %104, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i32 %105, i32* %6
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %103
%108 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%109 = call i32 @clapt_complete(i8* %108)
br label %130
110: ; preds = %103
%111 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%112 = call i32 @strcmp(i8* %111, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i32 %112, i32* %6
%113 = icmp eq i32 %112, 0
br i1 %113, label %114, label %117
114: ; preds = %110
%115 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%116 = call i32 @clam_scan_util(i8* %115, i32 1)
br label %129
117: ; preds = %110
%118 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%119 = call i32 @strcmp(i8* %118, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
store i32 %119, i32* %6
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %124
121: ; preds = %117
%122 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%123 = call i32 @apt_clean(i8* %122)
br label %128
124: ; preds = %117
%125 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%126 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0), i8* %125)
%127 = call i32 @exit(i32 1)
unreachable
128: ; preds = %121
br label %129
129: ; preds = %128, %114
br label %130
130: ; preds = %129, %107
br label %131
131: ; preds = %130, %100
br label %132
132: ; preds = %131, %94
br label %133
133: ; preds = %132, %81
br label %134
134: ; preds = %133, %72
br label %135
135: ; preds = %134, %66
br label %136
136: ; preds = %135, %13
%137 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%138 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i8* %137)
%139 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"clAPT\00"
@.str.1 = [11 x i8] c"--complete\00"
@.str.2 = [9 x i8] c"--update\00"
@.str.3 = [10 x i8] c"--upgrade\00"
@.str.4 = [9 x i8] c"--upscan\00"
@.str.5 = [11 x i8] c"--fullscan\00"
@.str.7 = [3 x i8] c"-V\00"
@.str.8 = [10 x i8] c"--version\00"
@.str.9 = [3 x i8] c"-h\00"
@.str.10 = [7 x i8] c"--help\00"
@.str.11 = [60 x i8] c"%s: The option selected is not valid. Please see '--help'.\0A\00"
@.str.12 = [27 x i8] c"Thank you for using %s :)\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp slt i32 %0, 2
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = call i32 @clapt_confirm(i8* %6)
%11 = call i32 (...) @clapt_init()
%12 = call i32 @clapt_lock_apt(i8* %6)
%13 = call i32 @apt_update(i8* %6)
%14 = call i32 @apt_fullupgrade(i8* %6)
%15 = call i32 @clam_scan_util(i8* %6, i32 0)
%16 = call i32 @apt_clean(i8* %6)
br label %93
17: ; preds = %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcpy(i8* %5, i8* %19)
%21 = call i32 @bcmp(i8* dereferenceable(11) %5, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 11)
%22 = icmp eq i32 %21, 0
br i1 %22, label %39, label %23
23: ; preds = %17
%24 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 9)
%25 = icmp eq i32 %24, 0
br i1 %25, label %39, label %26
26: ; preds = %23
%27 = call i32 @bcmp(i8* dereferenceable(10) %5, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 10)
%28 = icmp eq i32 %27, 0
br i1 %28, label %39, label %29
29: ; preds = %26
%30 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 9)
%31 = icmp eq i32 %30, 0
br i1 %31, label %39, label %32
32: ; preds = %29
%33 = call i32 @bcmp(i8* dereferenceable(11) %5, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i64 11)
%34 = icmp eq i32 %33, 0
%35 = bitcast [32 x i8]* %3 to i64*
%36 = load i64, i64* %35
%37 = icmp eq i64 %36, 31069335676202285
%38 = select i1 %34, i1 true, i1 %37
br i1 %38, label %39, label %41
39: ; preds = %32, %29, %26, %23, %17
%40 = call i32 (...) @clapt_init()
br label %41
41: ; preds = %32, %39
%42 = call i32 @bcmp(i8* dereferenceable(3) %5, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i64 3)
%43 = icmp eq i32 %42, 0
br i1 %43, label %47, label %44
44: ; preds = %41
%45 = call i32 @bcmp(i8* dereferenceable(10) %5, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i64 10)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44, %41
%48 = call i32 (...) @clapt_version()
br label %93
49: ; preds = %44
%50 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i64 9)
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = call i32 @clapt_lock_apt(i8* %6)
%54 = call i32 @apt_update(i8* %6)
br label %93
55: ; preds = %49
%56 = call i32 @bcmp(i8* dereferenceable(10) %5, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 10)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = call i32 @clapt_lock_apt(i8* %6)
%60 = call i32 @apt_fullupgrade(i8* %6)
br label %93
61: ; preds = %55
%62 = call i32 @bcmp(i8* dereferenceable(3) %5, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i64 3)
%63 = icmp eq i32 %62, 0
br i1 %63, label %67, label %64
64: ; preds = %61
%65 = call i32 @bcmp(i8* dereferenceable(7) %5, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i64 7)
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %64, %61
%68 = call i32 (...) @clapt_help()
br label %93
69: ; preds = %64
%70 = call i32 @bcmp(i8* dereferenceable(9) %5, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i64 9)
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 @clam_scan_util(i8* %6, i32 0)
br label %93
74: ; preds = %69
%75 = call i32 @bcmp(i8* dereferenceable(11) %5, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 11)
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = call i32 @clapt_complete(i8* %6)
br label %93
79: ; preds = %74
%80 = call i32 @bcmp(i8* dereferenceable(11) %5, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i64 11)
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 @clam_scan_util(i8* %6, i32 1)
br label %93
84: ; preds = %79
%85 = bitcast [32 x i8]* %3 to i64*
%86 = load i64, i64* %85
%87 = icmp eq i64 %86, 31069335676202285
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = call i32 @apt_clean(i8* %6)
br label %93
90: ; preds = %84
%91 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.11, i64 0, i64 0), i8* %6)
%92 = call i32 @exit(i32 1)
unreachable
93: ; preds = %47, %58, %72, %82, %88, %77, %67, %52, %9
%94 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i8* %6)
%95 = call i32 @exit(i32 1)
unreachable
}