#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*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int apkMenu() {
  int user_key;
  system("@cls||clear");
  printf("=======================================\n");
  printf("   APK Menu                        |\n");
  printf("=======================================\n");
  printf("| [1] Create workspace for APK     |\n");
  printf("| [2] Install apktool              |\n");
  printf("| [3] Decompile .apk               |\n");
  printf("| [4] Build .apk                   |\n");
  printf("| [5] Deodex .apk                  |\n");
  printf("| [9] Information                  |\n");
  printf("=======================================\n");
  printf("[0] Exit\n");
  printf("\nWhat you want?: ");
  scanf("%d", &user_key);
  switch (user_key) {
  case 9: {
    printf("[1] Create workspace folders [Decompiled_Files, Deodexed_Files] to "
           "work with apktool.\n");
    printf("[2] Install apktool, IMPORTANT!\n");
    printf("[3] Decompiling .apk from executable to source code.\n");
    printf("[4] Build .apk from source code to executable (.apk)\n");
    printf("[5] Deodex .apk - if you have .odex file with your .apk, you must "
           "replace it to 'Deodexed_Files' folder to deodexing\n");
    break;
  }
  case 0:
    printf("Goodbye ;P\n");
    return 0;
    break;
  case 1:
    printf("Creating workspace.\n");
    system("cd ~/Universal_Tool/ && mkdir Decompiled_Files Deodexed_Files");
    getchar();
    printf("Done! [Press Enter]\n");
    getchar();
    apkMenu();
    break;
  case 2: {
    printf("\nInstalling apktool\n");
    system("sudo apt-get install lib32ncurses5 -y");
    system("cd ~/*/insides/apktool/ && sudo cp apktool.jar /usr/local/bin && "
           "sudo cp apktool /usr/local/bin");
    system("cd /usr/local/bin/ && sudo chmod a+x apktool");
    printf("\nApktool has been installed. [Press Enter]\n");
    getchar();
    getchar();
    apkMenu();
    break;
  }
  case 3: {
    char param[128];
    char apkd_name[32];
    printf("Enter name of your .apk, to decompile it: ");
    scanf("%s", apkd_name);
    sprintf(param, "cd ~/*/Decompiled_Files/ && apktool d %s", apkd_name);
    system(param);
    apkMenu();
    break;
  }
  case 4: {
    char param[128];
    char apkb_name[32];
    printf("Enter name of your decompiled apk folder, to build it: ");
    scanf("%s", apkb_name);
    sprintf(param, "cd ~/*/Decompiled_Files/ && apktool b %s", apkb_name);
    system(param);
    apkMenu();
    break;
  }
  case 5: {
    char param[128];
    char apkdex_name[32];
    printf("Enter name of your .apk, to deodex it: ");
    scanf("%s", apkdex_name);
    sprintf(param, "cd ~/*/Deodexed_Files/ && java -jar baksmali.jar deodex %s",
            apkdex_name);
    system(param);
    apkMenu();
    break;
  }
  default:
    printf("Make your choice!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<apkMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    0xeb6(%rip),%rdi
call   1030 <system@plt>
lea    0xeb6(%rip),%rdi
mov    %rdi,-0x200(%rbp)
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
mov    -0x200(%rbp),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1040 <printf@plt>
lea    0xf28(%rip),%rdi
call   1040 <printf@plt>
lea    0xf42(%rip),%rdi
call   1040 <printf@plt>
lea    0xf5c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x200(%rbp),%rdi
call   1040 <printf@plt>
lea    0xf6a(%rip),%rdi
call   1040 <printf@plt>
lea    0xf68(%rip),%rdi
call   1040 <printf@plt>
lea    0xf6e(%rip),%rdi
xor    %eax,%eax
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rax,-0x1f8(%rbp)
sub    $0x9,%rax
ja     1427 <apkMenu+0x2c7>
mov    -0x1f8(%rbp),%rax
lea    0xdbe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf34(%rip),%rdi
call   1040 <printf@plt>
lea    0xf7f(%rip),%rdi
call   1040 <printf@plt>
lea    0xf94(%rip),%rdi
call   1040 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1040 <printf@plt>
lea    0xfe8(%rip),%rdi
call   1040 <printf@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x104d(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    143a <apkMenu+0x2da>
lea    0x1041(%rip),%rdi
call   1040 <printf@plt>
lea    0x104a(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
lea    0x1075(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
call   1050 <apkMenu@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x106d(%rip),%rdi
call   1040 <printf@plt>
lea    0x1076(%rip),%rdi
call   1030 <system@plt>
lea    0x1090(%rip),%rdi
call   1030 <system@plt>
lea    0x10e4(%rip),%rdi
call   1030 <system@plt>
lea    0x1105(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
call   1050 <apkMenu@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x110d(%rip),%rdi
call   1040 <printf@plt>
lea    -0xb0(%rbp),%rsi
lea    0x11ac(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    -0xb0(%rbp),%rdx
lea    0x1109(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1030 <system@plt>
call   1050 <apkMenu@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x1110(%rip),%rdi
call   1040 <printf@plt>
lea    -0x150(%rbp),%rsi
lea    0x115b(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x130(%rbp),%rdi
lea    -0x150(%rbp),%rdx
lea    0x1119(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x130(%rbp),%rdi
call   1030 <system@plt>
call   1050 <apkMenu@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x1120(%rip),%rdi
call   1040 <printf@plt>
lea    -0x1f0(%rbp),%rsi
lea    0x110a(%rip),%rdi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    -0x1d0(%rbp),%rdi
lea    -0x1f0(%rbp),%rdx
lea    0x1119(%rip),%rsi
call   1080 <sprintf@plt>
lea    -0x1d0(%rbp),%rdi
call   1030 <system@plt>
call   1050 <apkMenu@plt>
jmp    1433 <apkMenu+0x2d3>
lea    0x1132(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apkMenu>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
lea    0xea7(%rip),%rdi
call   1040 <system@plt>
lea    0x11c8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x10b6(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x10c7(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f9(%rip),%rdi
call   1030 <puts@plt>
lea    0x1112(%rip),%rdi
call   1030 <puts@plt>
lea    0x112b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1144(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x117d(%rip),%rdi
call   1030 <puts@plt>
lea    0xe28(%rip),%rdi
call   1050 <printf@plt>
lea    0xe2e(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x9,%rax
ja     1323 <apkMenu+0x1b3>
lea    0xdc7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x11a4(%rip),%rdi
jmp    1363 <apkMenu+0x1f3>
lea    0x1170(%rip),%rdi
call   1030 <puts@plt>
lea    0xde8(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
lea    0x1165(%rip),%rdi
call   1030 <puts@plt>
jmp    12be <apkMenu+0x14e>
lea    0x1104(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf9(%rip),%rdi
call   1040 <system@plt>
lea    0xe13(%rip),%rdi
call   1040 <system@plt>
lea    0xe67(%rip),%rdi
call   1040 <system@plt>
lea    0x10e8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
jmp    13ab <apkMenu+0x23b>
lea    0xe69(%rip),%rdi
call   1050 <printf@plt>
lea    0xf0f(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe72(%rip),%rsi
jmp    1393 <apkMenu+0x223>
lea    0xef0(%rip),%rdi
call   1050 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xef6(%rip),%rsi
jmp    1393 <apkMenu+0x223>
lea    0x1223(%rip),%rdi
jmp    1363 <apkMenu+0x1f3>
lea    0x10c5(%rip),%rdi
call   1030 <puts@plt>
lea    0x110f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1123(%rip),%rdi
call   1030 <puts@plt>
lea    0x114c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1175(%rip),%rdi
call   1030 <puts@plt>
jmp    13b0 <apkMenu+0x240>
lea    0xe1d(%rip),%rdi
call   1050 <printf@plt>
lea    0xe6f(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe33(%rip),%rsi
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rdx
call   1090 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
call   1060 <apkMenu@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"@cls||clear\00"
@.str.1 = [41 x i8] c"=======================================\0A\00"
@.str.2 = [38 x i8] c" APK Menu |\0A\00"
@.str.3 = [38 x i8] c"| [1] Create workspace for APK |\0A\00"
@.str.4 = [38 x i8] c"| [2] Install apktool |\0A\00"
@.str.5 = [38 x i8] c"| [3] Decompile .apk |\0A\00"
@.str.6 = [38 x i8] c"| [4] Build .apk |\0A\00"
@.str.7 = [38 x i8] c"| [5] Deodex .apk |\0A\00"
@.str.8 = [38 x i8] c"| [9] Information |\0A\00"
@.str.9 = [10 x i8] c"[0] Exit\0A\00"
@.str.10 = [18 x i8] c"\0AWhat you want?: \00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [87 x i8] c"[1] Create workspace folders [Decompiled_Files, Deodexed_Files] to work with apktool.\0A\00"
@.str.13 = [33 x i8] c"[2] Install apktool, IMPORTANT!\0A\00"
@.str.14 = [54 x i8] c"[3] Decompiling .apk from executable to source code.\0A\00"
@.str.15 = [54 x i8] c"[4] Build .apk from source code to executable (.apk)\0A\00"
@.str.16 = [118 x i8] c"[5] Deodex .apk - if you have .odex file with your .apk, you must replace it to 'Deodexed_Files' folder to deodexing\0A\00"
@.str.17 = [12 x i8] c"Goodbye ;P\0A\00"
@.str.18 = [21 x i8] c"Creating workspace.\0A\00"
@.str.19 = [62 x i8] c"cd ~/Universal_Tool/ && mkdir Decompiled_Files Deodexed_Files\00"
@.str.20 = [21 x i8] c"Done! [Press Enter]\0A\00"
@.str.21 = [21 x i8] c"\0AInstalling apktool\0A\00"
@.str.22 = [38 x i8] c"sudo apt-get install lib32ncurses5 -y\00"
@.str.23 = [96 x i8] c"cd ~/*/insides/apktool/ && sudo cp apktool.jar /usr/local/bin && sudo cp apktool /usr/local/bin\00"
@.str.24 = [45 x i8] c"cd /usr/local/bin/ && sudo chmod a+x apktool\00"
@.str.25 = [44 x i8] c"\0AApktool has been installed. [Press Enter]\0A\00"
@.str.26 = [43 x i8] c"Enter name of your .apk, to decompile it: \00"
@.str.27 = [3 x i8] c"%s\00"
@.str.28 = [41 x i8] c"cd ~/*/Decompiled_Files/ && apktool d %s\00"
@.str.29 = [56 x i8] c"Enter name of your decompiled apk folder, to build it: \00"
@.str.30 = [41 x i8] c"cd ~/*/Decompiled_Files/ && apktool b %s\00"
@.str.31 = [40 x i8] c"Enter name of your .apk, to deodex it: \00"
@.str.32 = [59 x i8] c"cd ~/*/Deodexed_Files/ && java -jar baksmali.jar deodex %s\00"
@.str.33 = [19 x i8] c"Make your choice!\0A\00"
define i32 @apkMenu() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [128 x i8]
%4 = alloca [32 x i8]
%5 = alloca [128 x i8]
%6 = alloca [32 x i8]
%7 = alloca [128 x i8]
%8 = alloca [32 x i8]
%9 = call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %2)
%23 = load i32, i32* %2
switch i32 %23, label %78 [
i32 9, label %24
i32 0, label %30
i32 1, label %32
i32 2, label %39
i32 3, label %48
i32 4, label %58
i32 5, label %68
]
24: ; preds = %0
%25 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.12, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.14, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.15, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.16, i64 0, i64 0))
br label %80
30: ; preds = %0
%31 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0))
store i32 0, i32* %1
br label %81
32: ; preds = %0
%33 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.18, i64 0, i64 0))
%34 = call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.19, i64 0, i64 0))
%35 = call i32 (...) @getchar()
%36 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0))
%37 = call i32 (...) @getchar()
%38 = call i32 @apkMenu()
br label %80
39: ; preds = %0
%40 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0))
%42 = call i32 @system(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.23, i64 0, i64 0))
%43 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.25, i64 0, i64 0))
%45 = call i32 (...) @getchar()
%46 = call i32 (...) @getchar()
%47 = call i32 @apkMenu()
br label %80
48: ; preds = %0
%49 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.26, i64 0, i64 0))
%50 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %50)
%52 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%53 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%54 = call i32 @sprintf(i8* %52, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.28, i64 0, i64 0), i8* %53)
%55 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%56 = call i32 @system(i8* %55)
%57 = call i32 @apkMenu()
br label %80
58: ; preds = %0
%59 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.29, i64 0, i64 0))
%60 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %60)
%62 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%63 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%64 = call i32 @sprintf(i8* %62, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0), i8* %63)
%65 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%66 = call i32 @system(i8* %65)
%67 = call i32 @apkMenu()
br label %80
68: ; preds = %0
%69 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0))
%70 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%71 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %70)
%72 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%74 = call i32 @sprintf(i8* %72, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.32, i64 0, i64 0), i8* %73)
%75 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%76 = call i32 @system(i8* %75)
%77 = call i32 @apkMenu()
br label %80
78: ; preds = %0
%79 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.33, i64 0, i64 0))
br label %80
80: ; preds = %78, %68, %58, %48, %39, %32, %24
store i32 0, i32* %1
br label %81
81: ; preds = %80, %30
%82 = load i32, i32* %1
ret i32 %82
}

LLVM IR (-O2):
@.str = [12 x i8] c"@cls||clear\00"
@.str.10 = [18 x i8] c"\0AWhat you want?: \00"
@.str.11 = [3 x i8] c"%d\00"
@.str.19 = [62 x i8] c"cd ~/Universal_Tool/ && mkdir Decompiled_Files Deodexed_Files\00"
@.str.22 = [38 x i8] c"sudo apt-get install lib32ncurses5 -y\00"
@.str.23 = [96 x i8] c"cd ~/*/insides/apktool/ && sudo cp apktool.jar /usr/local/bin && sudo cp apktool /usr/local/bin\00"
@.str.24 = [45 x i8] c"cd /usr/local/bin/ && sudo chmod a+x apktool\00"
@.str.26 = [43 x i8] c"Enter name of your .apk, to decompile it: \00"
@.str.27 = [3 x i8] c"%s\00"
@.str.28 = [41 x i8] c"cd ~/*/Decompiled_Files/ && apktool d %s\00"
@.str.29 = [56 x i8] c"Enter name of your decompiled apk folder, to build it: \00"
@.str.30 = [41 x i8] c"cd ~/*/Decompiled_Files/ && apktool b %s\00"
@.str.31 = [40 x i8] c"Enter name of your .apk, to deodex it: \00"
@.str.32 = [59 x i8] c"cd ~/*/Deodexed_Files/ && java -jar baksmali.jar deodex %s\00"
@str.34 = [37 x i8] c" APK Menu |\00"
@str.36 = [37 x i8] c"| [1] Create workspace for APK |\00"
@str.37 = [37 x i8] c"| [2] Install apktool |\00"
@str.38 = [37 x i8] c"| [3] Decompile .apk |\00"
@str.39 = [37 x i8] c"| [4] Build .apk |\00"
@str.40 = [37 x i8] c"| [5] Deodex .apk |\00"
@str.41 = [37 x i8] c"| [9] Information |\00"
@str.42 = [40 x i8] c"=======================================\00"
@str.43 = [9 x i8] c"[0] Exit\00"
@str.44 = [20 x i8] c"\0AInstalling apktool\00"
@str.45 = [43 x i8] c"\0AApktool has been installed. [Press Enter]\00"
@str.46 = [20 x i8] c"Creating workspace.\00"
@str.47 = [20 x i8] c"Done! [Press Enter]\00"
@str.48 = [11 x i8] c"Goodbye ;P\00"
@str.49 = [86 x i8] c"[1] Create workspace folders [Decompiled_Files, Deodexed_Files] to work with apktool.\00"
@str.50 = [32 x i8] c"[2] Install apktool, IMPORTANT!\00"
@str.51 = [53 x i8] c"[3] Decompiling .apk from executable to source code.\00"
@str.52 = [53 x i8] c"[4] Build .apk from source code to executable (.apk)\00"
@str.53 = [117 x i8] c"[5] Deodex .apk - if you have .odex file with your .apk, you must replace it to 'Deodexed_Files' folder to deodexing\00"
@str.54 = [18 x i8] c"Make your choice!\00"
define i32 @apkMenu() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [32 x i8]
%4 = alloca [128 x i8]
%5 = alloca [32 x i8]
%6 = alloca [128 x i8]
%7 = alloca [32 x i8]
%8 = bitcast i32* %1 to i8*
%9 = tail call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.42, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.34, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.42, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.36, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.37, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.38, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.39, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.40, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.41, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.42, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.43, i64 0, i64 0))
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %1)
%23 = load i32, i32* %1
switch i32 %23, label %72 [
i32 9, label %24
i32 0, label %30
i32 1, label %32
i32 2, label %39
i32 3, label %48
i32 4, label %56
i32 5, label %64
]
24: ; preds = %0
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str.49, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.50, i64 0, i64 0))
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.51, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.52, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str.53, i64 0, i64 0))
br label %74
30: ; preds = %0
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.48, i64 0, i64 0))
br label %74
32: ; preds = %0
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.46, i64 0, i64 0))
%34 = call i32 @system(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.19, i64 0, i64 0))
%35 = call i32 (...) @getchar()
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.47, i64 0, i64 0))
%37 = call i32 (...) @getchar()
%38 = call i32 @apkMenu()
br label %74
39: ; preds = %0
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.44, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.22, i64 0, i64 0))
%42 = call i32 @system(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.23, i64 0, i64 0))
%43 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.24, i64 0, i64 0))
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.45, i64 0, i64 0))
%45 = call i32 (...) @getchar()
%46 = call i32 (...) @getchar()
%47 = call i32 @apkMenu()
br label %74
48: ; preds = %0
%49 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%50 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%51 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.26, i64 0, i64 0))
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %50)
%53 = call i32 @sprintf(i8* %49, i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.28, i64 0, i64 0), i8* %50)
%54 = call i32 @system(i8* %49)
%55 = call i32 @apkMenu()
br label %74
56: ; preds = %0
%57 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%58 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%59 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.29, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %58)
%61 = call i32 @sprintf(i8* %57, i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.30, i64 0, i64 0), i8* %58)
%62 = call i32 @system(i8* %57)
%63 = call i32 @apkMenu()
br label %74
64: ; preds = %0
%65 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%66 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%67 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.31, i64 0, i64 0))
%68 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8* %66)
%69 = call i32 @sprintf(i8* %65, i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.32, i64 0, i64 0), i8* %66)
%70 = call i32 @system(i8* %65)
%71 = call i32 @apkMenu()
br label %74
72: ; preds = %0
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.54, i64 0, i64 0))
br label %74
74: ; preds = %24, %32, %39, %48, %56, %64, %72, %30
ret i32 0
}