#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*/ system(char *);
int portMenu(void) {
  char yes = 'y', answer;
  int user_key;
  system("@cls||clear");
  printf("=======================================\n");
  printf("   Porting Menu                   |\n");
  printf("EXPEREMENTAL FEATURE! ONLY FOR DEVELOPERS!\n");
  printf("=======================================\n");
  printf("| [1] Make workspace for porting  |\n");
  printf("| [2] Port CM-based ROM           |\n");
  printf("=======================================\n");
  printf("\n[0] Exit\n");
  printf("\nWhat you want?: ");
  scanf("%d", &user_key);
  switch (user_key) {
  case 0:
    printf("Goodbye! :P");
    return 0;
  case 1: {
    printf("Creating workspace\n");
    printf("Creating base folder\n");
    system("cd ~/Universal_Tool-master/ && mkdir base");
    printf("Creating port folder\n");
    system("cd ~/Universal_Tool-master/ && mkdir port");
    printf("Done\n");
    break;
  }
  case 2: {
    getchar();
    printf("Throw your .zip archive with stock ROM in 'base' folder and ROM, "
           "which you want porting to 'port' folder, then press 'Enter'.\n");
    getchar();
    printf("Unpacking stock ROM...\n");
    system("cd ~/*/base/ && unzip *.zip");
    printf("Unpacking stock ROM: Done\n");
    printf("Unpacking port ROM...\n");
    system("cd ~/*/port/ && unzip *.zip");
    printf("Unpacking port ROM: Done\n");
    printf("Decompiling base framework-res.apk\n");
    system(
        "cd ~/*/base/system/framework/ && cp framework-res.apk "
        "~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv "
        "framework-res.apk framework-base.apk && apktool d framework-base.apk");
    printf(
        "Copying power_profile.xml and storage_list.xml to workspace folder\n");
    system("cd ~/*/Decompiled_Files/framework-base/res/xml && cp "
           "power_profile.xml storage_list.xml ~/*/workspace");
    printf("Decompiling port framework-res.apk\n");
    system(
        "cd ~/*/port/system/framework/ && cp framework-res.apk "
        "~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv "
        "framework-res.apk framework-port.apk && apktool d framework-port.apk");
    printf("Copying power_profile.xml and storage_list.xml in "
           "framework-port.apk\n");
    system("cd ~/*/workspace/ && cp storage_list.xml power_profile.xml "
           "~/*/Decompiled_Files/framework-port/res/xml/");
    printf("Building port framework-res.apk\n");
    system("cd ~/*/Decompiled_Files/ && apktool b framework-port");
    printf("Copying port framework-res.apk to 'port' folder\n");
    system(
        "cd ~/*/Decompiled_Files/ && mv framework-port.apk framework-res.apk "
        "&& cp framework-res.apk ~/*/port/system/framework");
    printf("Deleting app, fonts, framework, media, priv-app folders from "
           "'base'\n");
    system("cd ~/*/base/system && rm -rf app font framework media priv-app");
    printf("Copying app, fonts, framework, media, priv-app folders from 'port' "
           "to 'base'\n");
    system("cd ~/*/port/system && cp -a app fonts framework media priv-app "
           "~/*/base/system");
    printf("Unpacking boot.img\n");
    system("cd ~/*/base/ && mkdir boot");
    system("cp ~/*/insides/boot/* ~/*/base/boot");
    system("cp ~/*/base/boot.img ~/*/base/boot");
    system("cd ~/*/base/boot/ && ./unpackbootimg -i boot.img");
    system("cd ~/*/base/boot/ && mkdir ramdisk");
    system("cd ~/*/base/boot/ && mv boot.img-ramdisk.gz ramdisk");
    system(
        "cd ~/*/base/boot/ramdisk && gzip -dc boot.img-ramdisk.gz | cpio -i");
    printf("\nboot.img and ramdisk ready(in folder ~/Universal_Tool/base/. "
           "When you finish work with ramdisk, press enter.\n");
    getchar();
    printf("Do you want open build.prop and edit some str-r-rings?[Y/N]: ");
    scanf("%c", &answer);
    if (answer == yes)
      system("gedit ~/*/base/system/build.prop");
    else {
      printf("Okay, let's continue?[Enter]");
      getchar();
    }
    printf("Repack boot.img\n");
    system("cd ~/*/base/boot/ && ./mkbootfs ./ramdisk | gzip > "
           "boot.img-ramdisk.gz");
    system("cd ~/*/base/boot/ && ./mkbootimg --cmdline 'no_console_suspend=1 "
           "console=null' --kernel boot.img-kernel --ramdisk "
           "boot.img-ramdisk.gz -o boot-new.img");
    printf("boot-new.img ready!\n");
    printf("Renaming boot-new.img to boot.img\n");
    system("cd ~/*/base/boot/ && mv boot-new.img ~/*/base/boot.img");
    printf("Deleting some trash :P\n");
    system("cd ~/*/base/ && rm -rf boot *.zip");
    printf("Finally, repacking portrom.zip\n");
    system("cd ~/*/base/ && zip -r portrom.zip *");
    printf("Done!\n");
    getchar();
    break;
  }
  default:
    printf("Make your choice\n");
    return portMenu();
  }
  return 0;
}


x86 assembly (clang, -O0):
<portMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movb   $0x79,-0x5(%rbp)
lea    0xe9d(%rip),%rdi
call   1030 <system@plt>
lea    0xe9d(%rip),%rdi
mov    %rdi,-0x18(%rbp)
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeff(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1040 <printf@plt>
lea    0xf14(%rip),%rdi
xor    %eax,%eax
lea    -0xc(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1219 <portMenu+0xc9>
jmp    11f7 <portMenu+0xa7>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1231 <portMenu+0xe1>
jmp    1208 <portMenu+0xb8>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     127e <portMenu+0x12e>
jmp    14f5 <portMenu+0x3a5>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1515 <portMenu+0x3c5>
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
call   1030 <system@plt>
lea    0xef4(%rip),%rdi
call   1040 <printf@plt>
lea    0xefe(%rip),%rdi
call   1030 <system@plt>
lea    0xfe4(%rip),%rdi
call   1040 <printf@plt>
jmp    150e <portMenu+0x3be>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xf04(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xf70(%rip),%rdi
call   1040 <printf@plt>
lea    0xf7c(%rip),%rdi
call   1030 <system@plt>
lea    0xf8c(%rip),%rdi
call   1040 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa6(%rip),%rdi
call   1030 <system@plt>
lea    0xfb6(%rip),%rdi
call   1040 <printf@plt>
lea    0xfc4(%rip),%rdi
call   1040 <printf@plt>
lea    0xfdc(%rip),%rdi
call   1030 <system@plt>
lea    0x1083(%rip),%rdi
call   1040 <printf@plt>
lea    0x10bb(%rip),%rdi
call   1030 <system@plt>
lea    0x1115(%rip),%rdi
call   1040 <printf@plt>
lea    0x112d(%rip),%rdi
call   1030 <system@plt>
lea    0x11d4(%rip),%rdi
call   1040 <printf@plt>
lea    0x120e(%rip),%rdi
call   1030 <system@plt>
lea    0x126a(%rip),%rdi
call   1040 <printf@plt>
lea    0x127f(%rip),%rdi
call   1030 <system@plt>
lea    0x12a8(%rip),%rdi
call   1040 <printf@plt>
lea    0x12cd(%rip),%rdi
call   1030 <system@plt>
lea    0x1337(%rip),%rdi
call   1040 <printf@plt>
lea    0x1370(%rip),%rdi
call   1030 <system@plt>
lea    0x13a3(%rip),%rdi
call   1040 <printf@plt>
lea    0x13e5(%rip),%rdi
call   1030 <system@plt>
lea    0x1428(%rip),%rdi
call   1040 <printf@plt>
lea    0x1430(%rip),%rdi
call   1030 <system@plt>
lea    0x143f(%rip),%rdi
call   1030 <system@plt>
lea    0x1457(%rip),%rdi
call   1030 <system@plt>
lea    0x146e(%rip),%rdi
call   1030 <system@plt>
lea    0x1493(%rip),%rdi
call   1030 <system@plt>
lea    0x14aa(%rip),%rdi
call   1030 <system@plt>
lea    0x14d2(%rip),%rdi
call   1030 <system@plt>
lea    0x1509(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0x1565(%rip),%rdi
call   1040 <printf@plt>
lea    0x1597(%rip),%rdi
lea    -0x6(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
movsbl -0x6(%rbp),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1452 <portMenu+0x302>
lea    0x1578(%rip),%rdi
call   1030 <system@plt>
jmp    1465 <portMenu+0x315>
lea    0x1588(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0x1592(%rip),%rdi
call   1040 <printf@plt>
lea    0x1597(%rip),%rdi
call   1030 <system@plt>
lea    0x15d2(%rip),%rdi
call   1030 <system@plt>
lea    0x165c(%rip),%rdi
call   1040 <printf@plt>
lea    0x1665(%rip),%rdi
call   1040 <printf@plt>
lea    0x167c(%rip),%rdi
call   1030 <system@plt>
lea    0x16a7(%rip),%rdi
call   1040 <printf@plt>
lea    0x16b3(%rip),%rdi
call   1030 <system@plt>
lea    0x16c9(%rip),%rdi
call   1040 <printf@plt>
lea    0x16dd(%rip),%rdi
call   1030 <system@plt>
lea    0x16f6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
jmp    150e <portMenu+0x3be>
lea    0x16e5(%rip),%rdi
call   1040 <printf@plt>
call   1060 <portMenu@plt>
mov    %eax,-0x4(%rbp)
jmp    1515 <portMenu+0x3c5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<portMenu>:
push   %rbx
sub    $0x10,%rsp
lea    0xe94(%rip),%rdi
call   1040 <system@plt>
lea    0x164c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x15a6(%rip),%rdi
call   1030 <puts@plt>
lea    0x15be(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x15d5(%rip),%rdi
call   1030 <puts@plt>
lea    0x15ed(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x1625(%rip),%rdi
call   1030 <puts@plt>
lea    0xe39(%rip),%rdi
call   1050 <printf@plt>
lea    0xe3f(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
je     125f <portMenu+0xff>
cmp    $0x1,%eax
je     1212 <portMenu+0xb2>
test   %eax,%eax
jne    1428 <portMenu+0x2c8>
lea    0xe19(%rip),%rdi
call   1050 <printf@plt>
jmp    14dc <portMenu+0x37c>
lea    0x196d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1974(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfc(%rip),%rdi
call   1040 <system@plt>
lea    0x1971(%rip),%rdi
call   1030 <puts@plt>
lea    0xe0e(%rip),%rdi
call   1040 <system@plt>
lea    0x164b(%rip),%rdi
call   1030 <puts@plt>
jmp    14dc <portMenu+0x37c>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0x1589(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0x15f4(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf5(%rip),%rdi
call   1040 <system@plt>
lea    0x15f3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1601(%rip),%rdi
call   1030 <puts@plt>
lea    0xded(%rip),%rdi
call   1040 <system@plt>
lea    0x15ff(%rip),%rdi
call   1030 <puts@plt>
lea    0x160c(%rip),%rdi
call   1030 <puts@plt>
lea    0xde5(%rip),%rdi
call   1040 <system@plt>
lea    0x1617(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
call   1040 <system@plt>
lea    0x1642(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
call   1040 <system@plt>
lea    0x164d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf69(%rip),%rdi
call   1040 <system@plt>
lea    0x167a(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb9(%rip),%rdi
call   1040 <system@plt>
lea    0x1682(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd6(%rip),%rdi
call   1040 <system@plt>
lea    0x169a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1034(%rip),%rdi
call   1040 <system@plt>
lea    0x16c6(%rip),%rdi
call   1030 <puts@plt>
lea    0x105b(%rip),%rdi
call   1040 <system@plt>
lea    0x16fb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1092(%rip),%rdi
call   1040 <system@plt>
lea    0x10a1(%rip),%rdi
call   1040 <system@plt>
lea    0x10b9(%rip),%rdi
call   1040 <system@plt>
lea    0x10d0(%rip),%rdi
call   1040 <system@plt>
lea    0x10f5(%rip),%rdi
call   1040 <system@plt>
lea    0x110c(%rip),%rdi
call   1040 <system@plt>
lea    0x1134(%rip),%rdi
call   1040 <system@plt>
lea    0x16ae(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0x1158(%rip),%rdi
call   1050 <printf@plt>
lea    0x118a(%rip),%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
cmpb   $0x79,0xb(%rsp)
jne    143e <portMenu+0x2de>
lea    0x1173(%rip),%rdi
call   1040 <system@plt>
jmp    1451 <portMenu+0x2f1>
lea    0x1794(%rip),%rdi
call   1030 <puts@plt>
call   1070 <portMenu@plt>
jmp    14dc <portMenu+0x37c>
lea    0x1170(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
lea    0x16ac(%rip),%rdi
call   1030 <puts@plt>
lea    0x116e(%rip),%rdi
call   1040 <system@plt>
lea    0x11a9(%rip),%rdi
call   1040 <system@plt>
lea    0x1698(%rip),%rdi
call   1030 <puts@plt>
lea    0x16a0(%rip),%rdi
call   1030 <puts@plt>
lea    0x121b(%rip),%rdi
call   1040 <system@plt>
lea    0x16aa(%rip),%rdi
call   1030 <puts@plt>
lea    0x123a(%rip),%rdi
call   1040 <system@plt>
lea    0x16a9(%rip),%rdi
call   1030 <puts@plt>
lea    0x1244(%rip),%rdi
call   1040 <system@plt>
lea    0x16b0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"@cls||clear\00"
@.str.1 = [41 x i8] c"=======================================\0A\00"
@.str.2 = [37 x i8] c" Porting Menu |\0A\00"
@.str.3 = [44 x i8] c"EXPEREMENTAL FEATURE! ONLY FOR DEVELOPERS!\0A\00"
@.str.4 = [37 x i8] c"| [1] Make workspace for porting |\0A\00"
@.str.5 = [37 x i8] c"| [2] Port CM-based ROM |\0A\00"
@.str.6 = [11 x i8] c"\0A[0] Exit\0A\00"
@.str.7 = [18 x i8] c"\0AWhat you want?: \00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [12 x i8] c"Goodbye! :P\00"
@.str.10 = [20 x i8] c"Creating workspace\0A\00"
@.str.11 = [22 x i8] c"Creating base folder\0A\00"
@.str.12 = [42 x i8] c"cd ~/Universal_Tool-master/ && mkdir base\00"
@.str.13 = [22 x i8] c"Creating port folder\0A\00"
@.str.14 = [42 x i8] c"cd ~/Universal_Tool-master/ && mkdir port\00"
@.str.15 = [6 x i8] c"Done\0A\00"
@.str.16 = [127 x i8] c"Throw your .zip archive with stock ROM in 'base' folder and ROM, which you want porting to 'port' folder, then press 'Enter'.\0A\00"
@.str.17 = [24 x i8] c"Unpacking stock ROM...\0A\00"
@.str.18 = [28 x i8] c"cd ~/*/base/ && unzip *.zip\00"
@.str.19 = [27 x i8] c"Unpacking stock ROM: Done\0A\00"
@.str.20 = [23 x i8] c"Unpacking port ROM...\0A\00"
@.str.21 = [28 x i8] c"cd ~/*/port/ && unzip *.zip\00"
@.str.22 = [26 x i8] c"Unpacking port ROM: Done\0A\00"
@.str.23 = [36 x i8] c"Decompiling base framework-res.apk\0A\00"
@.str.24 = [179 x i8] c"cd ~/*/base/system/framework/ && cp framework-res.apk ~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv framework-res.apk framework-base.apk && apktool d framework-base.apk\00"
@.str.25 = [68 x i8] c"Copying power_profile.xml and storage_list.xml to workspace folder\0A\00"
@.str.26 = [102 x i8] c"cd ~/*/Decompiled_Files/framework-base/res/xml && cp power_profile.xml storage_list.xml ~/*/workspace\00"
@.str.27 = [36 x i8] c"Decompiling port framework-res.apk\0A\00"
@.str.28 = [179 x i8] c"cd ~/*/port/system/framework/ && cp framework-res.apk ~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv framework-res.apk framework-port.apk && apktool d framework-port.apk\00"
@.str.29 = [70 x i8] c"Copying power_profile.xml and storage_list.xml in framework-port.apk\0A\00"
@.str.30 = [104 x i8] c"cd ~/*/workspace/ && cp storage_list.xml power_profile.xml ~/*/Decompiled_Files/framework-port/res/xml/\00"
@.str.31 = [33 x i8] c"Building port framework-res.apk\0A\00"
@.str.32 = [53 x i8] c"cd ~/*/Decompiled_Files/ && apktool b framework-port\00"
@.str.33 = [49 x i8] c"Copying port framework-res.apk to 'port' folder\0A\00"
@.str.34 = [118 x i8] c"cd ~/*/Decompiled_Files/ && mv framework-port.apk framework-res.apk && cp framework-res.apk ~/*/port/system/framework\00"
@.str.35 = [69 x i8] c"Deleting app, fonts, framework, media, priv-app folders from 'base'\0A\00"
@.str.36 = [63 x i8] c"cd ~/*/base/system && rm -rf app font framework media priv-app\00"
@.str.37 = [78 x i8] c"Copying app, fonts, framework, media, priv-app folders from 'port' to 'base'\0A\00"
@.str.38 = [79 x i8] c"cd ~/*/port/system && cp -a app fonts framework media priv-app ~/*/base/system\00"
@.str.39 = [20 x i8] c"Unpacking boot.img\0A\00"
@.str.40 = [27 x i8] c"cd ~/*/base/ && mkdir boot\00"
@.str.41 = [36 x i8] c"cp ~/*/insides/boot/* ~/*/base/boot\00"
@.str.42 = [35 x i8] c"cp ~/*/base/boot.img ~/*/base/boot\00"
@.str.43 = [49 x i8] c"cd ~/*/base/boot/ && ./unpackbootimg -i boot.img\00"
@.str.44 = [35 x i8] c"cd ~/*/base/boot/ && mkdir ramdisk\00"
@.str.45 = [52 x i8] c"cd ~/*/base/boot/ && mv boot.img-ramdisk.gz ramdisk\00"
@.str.46 = [67 x i8] c"cd ~/*/base/boot/ramdisk && gzip -dc boot.img-ramdisk.gz | cpio -i\00"
@.str.47 = [111 x i8] c"\0Aboot.img and ramdisk ready(in folder ~/Universal_Tool/base/. When you finish work with ramdisk, press enter.\0A\00"
@.str.48 = [62 x i8] c"Do you want open build.prop and edit some str-r-rings?[Y/N]: \00"
@.str.49 = [3 x i8] c"%c\00"
@.str.50 = [33 x i8] c"gedit ~/*/base/system/build.prop\00"
@.str.51 = [29 x i8] c"Okay, let's continue?[Enter]\00"
@.str.52 = [17 x i8] c"Repack boot.img\0A\00"
@.str.53 = [71 x i8] c"cd ~/*/base/boot/ && ./mkbootfs ./ramdisk | gzip > boot.img-ramdisk.gz\00"
@.str.54 = [150 x i8] c"cd ~/*/base/boot/ && ./mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz -o boot-new.img\00"
@.str.55 = [21 x i8] c"boot-new.img ready!\0A\00"
@.str.56 = [35 x i8] c"Renaming boot-new.img to boot.img\0A\00"
@.str.57 = [55 x i8] c"cd ~/*/base/boot/ && mv boot-new.img ~/*/base/boot.img\00"
@.str.58 = [24 x i8] c"Deleting some trash :P\0A\00"
@.str.59 = [34 x i8] c"cd ~/*/base/ && rm -rf boot *.zip\00"
@.str.60 = [32 x i8] c"Finally, repacking portrom.zip\0A\00"
@.str.61 = [37 x i8] c"cd ~/*/base/ && zip -r portrom.zip *\00"
@.str.62 = [7 x i8] c"Done!\0A\00"
@.str.63 = [18 x i8] c"Make your choice\0A\00"
define i32 @portMenu() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i32
store i8 121, i8* %2
%5 = call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, 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 ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %4)
%16 = load i32, i32* %4
switch i32 %16, label %87 [
i32 0, label %17
i32 1, label %19
i32 2, label %26
]
17: ; preds = %0
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %1
br label %91
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
%22 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%24 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
br label %90
26: ; preds = %0
%27 = call i32 (...) @getchar()
%28 = call i32 @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.16, i64 0, i64 0))
%29 = call i32 (...) @getchar()
%30 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
%31 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.18, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i64 0, i64 0))
%33 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
%34 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.21, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.23, i64 0, i64 0))
%37 = call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str.24, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.25, i64 0, i64 0))
%39 = call i32 @system(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.26, i64 0, i64 0))
%40 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.27, i64 0, i64 0))
%41 = call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str.28, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.29, i64 0, i64 0))
%43 = call i32 @system(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.30, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.31, i64 0, i64 0))
%45 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.32, i64 0, i64 0))
%46 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.33, i64 0, i64 0))
%47 = call i32 @system(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.34, i64 0, i64 0))
%48 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.35, i64 0, i64 0))
%49 = call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.36, i64 0, i64 0))
%50 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.37, i64 0, i64 0))
%51 = call i32 @system(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.38, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.39, i64 0, i64 0))
%53 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.40, i64 0, i64 0))
%54 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.41, i64 0, i64 0))
%55 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.42, i64 0, i64 0))
%56 = call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.43, i64 0, i64 0))
%57 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.44, i64 0, i64 0))
%58 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.45, i64 0, i64 0))
%59 = call i32 @system(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.46, i64 0, i64 0))
%60 = call i32 @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.47, i64 0, i64 0))
%61 = call i32 (...) @getchar()
%62 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.48, i64 0, i64 0))
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.49, i64 0, i64 0), i8* %3)
%64 = load i8, i8* %3
%65 = sext i8 %64 to i32
%66 = load i8, i8* %2
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %65, %67
br i1 %68, label %69, label %71
69: ; preds = %26
%70 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
br label %74
71: ; preds = %26
%72 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.51, i64 0, i64 0))
%73 = call i32 (...) @getchar()
br label %74
74: ; preds = %71, %69
%75 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.52, i64 0, i64 0))
%76 = call i32 @system(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.53, i64 0, i64 0))
%77 = call i32 @system(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.54, i64 0, i64 0))
%78 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.55, i64 0, i64 0))
%79 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.56, i64 0, i64 0))
%80 = call i32 @system(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.57, i64 0, i64 0))
%81 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.58, i64 0, i64 0))
%82 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.59, i64 0, i64 0))
%83 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.60, i64 0, i64 0))
%84 = call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.61, i64 0, i64 0))
%85 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.62, i64 0, i64 0))
%86 = call i32 (...) @getchar()
br label %90
87: ; preds = %0
%88 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.63, i64 0, i64 0))
%89 = call i32 @portMenu()
store i32 %89, i32* %1
br label %91
90: ; preds = %74, %19
store i32 0, i32* %1
br label %91
91: ; preds = %90, %87, %17
%92 = load i32, i32* %1
ret i32 %92
}

LLVM IR (-O2):
@.str = [12 x i8] c"@cls||clear\00"
@.str.7 = [18 x i8] c"\0AWhat you want?: \00"
@.str.8 = [3 x i8] c"%d\00"
@.str.9 = [12 x i8] c"Goodbye! :P\00"
@.str.12 = [42 x i8] c"cd ~/Universal_Tool-master/ && mkdir base\00"
@.str.14 = [42 x i8] c"cd ~/Universal_Tool-master/ && mkdir port\00"
@.str.18 = [28 x i8] c"cd ~/*/base/ && unzip *.zip\00"
@.str.21 = [28 x i8] c"cd ~/*/port/ && unzip *.zip\00"
@.str.24 = [179 x i8] c"cd ~/*/base/system/framework/ && cp framework-res.apk ~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv framework-res.apk framework-base.apk && apktool d framework-base.apk\00"
@.str.26 = [102 x i8] c"cd ~/*/Decompiled_Files/framework-base/res/xml && cp power_profile.xml storage_list.xml ~/*/workspace\00"
@.str.28 = [179 x i8] c"cd ~/*/port/system/framework/ && cp framework-res.apk ~/*/Decompiled_Files/ && cd ~/*/Decompiled_Files/ && mv framework-res.apk framework-port.apk && apktool d framework-port.apk\00"
@.str.30 = [104 x i8] c"cd ~/*/workspace/ && cp storage_list.xml power_profile.xml ~/*/Decompiled_Files/framework-port/res/xml/\00"
@.str.32 = [53 x i8] c"cd ~/*/Decompiled_Files/ && apktool b framework-port\00"
@.str.34 = [118 x i8] c"cd ~/*/Decompiled_Files/ && mv framework-port.apk framework-res.apk && cp framework-res.apk ~/*/port/system/framework\00"
@.str.36 = [63 x i8] c"cd ~/*/base/system && rm -rf app font framework media priv-app\00"
@.str.38 = [79 x i8] c"cd ~/*/port/system && cp -a app fonts framework media priv-app ~/*/base/system\00"
@.str.40 = [27 x i8] c"cd ~/*/base/ && mkdir boot\00"
@.str.41 = [36 x i8] c"cp ~/*/insides/boot/* ~/*/base/boot\00"
@.str.42 = [35 x i8] c"cp ~/*/base/boot.img ~/*/base/boot\00"
@.str.43 = [49 x i8] c"cd ~/*/base/boot/ && ./unpackbootimg -i boot.img\00"
@.str.44 = [35 x i8] c"cd ~/*/base/boot/ && mkdir ramdisk\00"
@.str.45 = [52 x i8] c"cd ~/*/base/boot/ && mv boot.img-ramdisk.gz ramdisk\00"
@.str.46 = [67 x i8] c"cd ~/*/base/boot/ramdisk && gzip -dc boot.img-ramdisk.gz | cpio -i\00"
@.str.48 = [62 x i8] c"Do you want open build.prop and edit some str-r-rings?[Y/N]: \00"
@.str.49 = [3 x i8] c"%c\00"
@.str.50 = [33 x i8] c"gedit ~/*/base/system/build.prop\00"
@.str.51 = [29 x i8] c"Okay, let's continue?[Enter]\00"
@.str.53 = [71 x i8] c"cd ~/*/base/boot/ && ./mkbootfs ./ramdisk | gzip > boot.img-ramdisk.gz\00"
@.str.54 = [150 x i8] c"cd ~/*/base/boot/ && ./mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.gz -o boot-new.img\00"
@.str.57 = [55 x i8] c"cd ~/*/base/boot/ && mv boot-new.img ~/*/base/boot.img\00"
@.str.59 = [34 x i8] c"cd ~/*/base/ && rm -rf boot *.zip\00"
@.str.61 = [37 x i8] c"cd ~/*/base/ && zip -r portrom.zip *\00"
@str.64 = [36 x i8] c" Porting Menu |\00"
@str.65 = [43 x i8] c"EXPEREMENTAL FEATURE! ONLY FOR DEVELOPERS!\00"
@str.67 = [36 x i8] c"| [1] Make workspace for porting |\00"
@str.68 = [36 x i8] c"| [2] Port CM-based ROM |\00"
@str.69 = [40 x i8] c"=======================================\00"
@str.70 = [10 x i8] c"\0A[0] Exit\00"
@str.71 = [126 x i8] c"Throw your .zip archive with stock ROM in 'base' folder and ROM, which you want porting to 'port' folder, then press 'Enter'.\00"
@str.72 = [23 x i8] c"Unpacking stock ROM...\00"
@str.73 = [26 x i8] c"Unpacking stock ROM: Done\00"
@str.74 = [22 x i8] c"Unpacking port ROM...\00"
@str.75 = [25 x i8] c"Unpacking port ROM: Done\00"
@str.76 = [35 x i8] c"Decompiling base framework-res.apk\00"
@str.77 = [67 x i8] c"Copying power_profile.xml and storage_list.xml to workspace folder\00"
@str.78 = [35 x i8] c"Decompiling port framework-res.apk\00"
@str.79 = [69 x i8] c"Copying power_profile.xml and storage_list.xml in framework-port.apk\00"
@str.80 = [32 x i8] c"Building port framework-res.apk\00"
@str.81 = [48 x i8] c"Copying port framework-res.apk to 'port' folder\00"
@str.82 = [68 x i8] c"Deleting app, fonts, framework, media, priv-app folders from 'base'\00"
@str.83 = [77 x i8] c"Copying app, fonts, framework, media, priv-app folders from 'port' to 'base'\00"
@str.84 = [19 x i8] c"Unpacking boot.img\00"
@str.85 = [110 x i8] c"\0Aboot.img and ramdisk ready(in folder ~/Universal_Tool/base/. When you finish work with ramdisk, press enter.\00"
@str.86 = [16 x i8] c"Repack boot.img\00"
@str.87 = [20 x i8] c"boot-new.img ready!\00"
@str.88 = [34 x i8] c"Renaming boot-new.img to boot.img\00"
@str.89 = [23 x i8] c"Deleting some trash :P\00"
@str.90 = [31 x i8] c"Finally, repacking portrom.zip\00"
@str.91 = [6 x i8] c"Done!\00"
@str.92 = [19 x i8] c"Creating workspace\00"
@str.93 = [21 x i8] c"Creating base folder\00"
@str.94 = [21 x i8] c"Creating port folder\00"
@str.95 = [5 x i8] c"Done\00"
@str.96 = [17 x i8] c"Make your choice\00"
define i32 @portMenu() {
%1 = alloca i8
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @system(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.69, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.64, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.65, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.69, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.67, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.68, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.69, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.70, i64 0, i64 0))
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
switch i32 %15, label %83 [
i32 0, label %16
i32 1, label %18
i32 2, label %25
]
16: ; preds = %0
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
br label %86
18: ; preds = %0
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.92, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.93, i64 0, i64 0))
%21 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.94, i64 0, i64 0))
%23 = call i32 @system(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.95, i64 0, i64 0))
br label %86
25: ; preds = %0
%26 = call i32 (...) @getchar()
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.71, i64 0, i64 0))
%28 = call i32 (...) @getchar()
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.72, i64 0, i64 0))
%30 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.18, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.73, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.74, i64 0, i64 0))
%33 = call i32 @system(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.21, i64 0, i64 0))
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.75, i64 0, i64 0))
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.76, i64 0, i64 0))
%36 = call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str.24, i64 0, i64 0))
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.77, i64 0, i64 0))
%38 = call i32 @system(i8* getelementptr inbounds ([102 x i8], [102 x i8]* @.str.26, i64 0, i64 0))
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.78, i64 0, i64 0))
%40 = call i32 @system(i8* getelementptr inbounds ([179 x i8], [179 x i8]* @.str.28, i64 0, i64 0))
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.79, i64 0, i64 0))
%42 = call i32 @system(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.30, i64 0, i64 0))
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.80, i64 0, i64 0))
%44 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.32, i64 0, i64 0))
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.81, i64 0, i64 0))
%46 = call i32 @system(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.34, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.82, i64 0, i64 0))
%48 = call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.36, i64 0, i64 0))
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.83, i64 0, i64 0))
%50 = call i32 @system(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.38, i64 0, i64 0))
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.84, i64 0, i64 0))
%52 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.40, i64 0, i64 0))
%53 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.41, i64 0, i64 0))
%54 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.42, i64 0, i64 0))
%55 = call i32 @system(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.43, i64 0, i64 0))
%56 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.44, i64 0, i64 0))
%57 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.45, i64 0, i64 0))
%58 = call i32 @system(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.46, i64 0, i64 0))
%59 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @str.85, i64 0, i64 0))
%60 = call i32 (...) @getchar()
%61 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.48, i64 0, i64 0))
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.49, i64 0, i64 0), i8* %1)
%63 = load i8, i8* %1
%64 = icmp eq i8 %63, 121
br i1 %64, label %65, label %67
65: ; preds = %25
%66 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.50, i64 0, i64 0))
br label %70
67: ; preds = %25
%68 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.51, i64 0, i64 0))
%69 = call i32 (...) @getchar()
br label %70
70: ; preds = %67, %65
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.86, i64 0, i64 0))
%72 = call i32 @system(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.53, i64 0, i64 0))
%73 = call i32 @system(i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str.54, i64 0, i64 0))
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.87, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.88, i64 0, i64 0))
%76 = call i32 @system(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.57, i64 0, i64 0))
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.89, i64 0, i64 0))
%78 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.59, i64 0, i64 0))
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.90, i64 0, i64 0))
%80 = call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.61, i64 0, i64 0))
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.91, i64 0, i64 0))
%82 = call i32 (...) @getchar()
br label %86
83: ; preds = %0
%84 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.96, i64 0, i64 0))
%85 = call i32 @portMenu()
br label %86
86: ; preds = %18, %70, %83, %16
ret i32 0
}