#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int show_help(unsigned int id) {
  switch (id) {
  case 1:
  case 2:
    printf("\e[4mUSAGE:\e[0m machelper usb|hdd [option] ...\n"
           "\e[4mOPTION:\e[0m\n"
           "\t-config <name>\t\tChoose a laptop config.plist\n"
           "\t-ethernet <name>\tChoose a ethernet kext\n"
           "\t-help\t\t\tShow this help menu\n"
           "\t-raid\t\t\tIf SATA is in RAID mode\n"
           "\t-excludeOs\t\tExclude Mac OS installation (for USB only)\n"
           "\t-os <name>\t\tChoose an OS (default: El Capitan)\n"
           "\t-method <name>\t\tChoose a method (default: BaseBinaries Clone)\n"
           "\t-src <source>\t\t(Only for RawImage Method) Image Source\n"
           "\t-mbrPatch <path>\tPath to the folder where OSInstaller and\n"
           "\t\t\t\tOSInstall.mpkg located\n"
           "\t-replaceKernel <source>\tSource of the kernel to be replaced\n"
           "\t-excludeClover\t\t(For real Mac) Exclude Clover Installation\n"
           "\e[4mNote:\e[0m Keep the <name> blank to show help.\n");
    break;
  case 3:
    printf(
        "\e[4mUSAGE:\e[0m machelper mount_efi [-i|-help] [-mountPoint <path>]\n"
        "\t-help\t\t\tShow this help menu\n"
        "\t-i\t\t\tInteractive way of mounting EFI which allows\n"
        "\t\t\t\tuser to select the EFI partition from a list.\n"
        "\t-mountPoint <path>\tSpecify a mount point to mount the EFI\n"
        "\t\t\t\tpartition of the HDD/SSD.\n");
    break;
  case 4:
    printf("\e[4mUSAGE:\e[0m machelper kext <option>\n"
           "\e[4mOPTION:\e[0m\n"
           "\t-help\t\t\tShow this help menu\n"
           "\t-install <source>\tInstall a kext, fix permissions & rebuil\n"
           "\t-uninstall <source>\tUninstall a kext\n"
           "\t-fixPermissions\t\tFix permissions of the Kexts at /S/L/E\n"
           "\t-rebuildCache\t\tRebuild Kernel Cache\n");
    break;
  case 5:
    printf("\e[4mUSAGE:\e[0m machelper mount_efi [-disassemble|-help] <dest>\n"
           "\t<dest>\t\t\tDestination to save DSDT/SSDTs\n"
           "\t-disassemble\t\tDisassemble DSDT/SSDTs too\n"
           "\t-help\t\t\tShow this help menu\n");
    break;
  case 6:
    printf("\e[4mUSAGE:\e[0m machelper recovery <option>\n"
           "\e[4mOPTION:\e[0m\n"
           "\t-copyClover\t\tCopy Clover EFI from USB to HDD/SSD\n"
           "\t-disableHibernation\tDisable Hibernation to fix sleep problems\n"
           "\t-fixAppleId\t\tReset network preferences to fix Apple ID\n"
           "\t-help\t\t\tShow this help menu\n"
           "\t-init\t\t\tChecks and mounts root when booting with \n"
           "\t\t\t\tSingle User Mode. This is essentially a shortcut\n"
           "\t\t\t\tfor `fsck -y` and `mount -uw /`\n"
           "\t-installOnUSB\t\tInstall 'machelper' on USB (only for \n"
           "\t\t\t\tBaseBinaries Clone Method)\n"
           "\t-listUnsigned\t\tList unsigned kext(s)\n"
           "\t-removeKext <source>\tUninstall/Remove a kext (backup to "
           "~/Desktop)\n"
           "\t-replaceKernel <source>\tReplace Kernel (backup to ~/Desktop)\n");
    break;
  case 11:
    printf(
        "\e[4mUSAGE:\e[0m machelper usb|hdd -config <name>\n"
        "\e[4mNAME:\e[0m\n"
        "\t\e[1mHD3000_1366x768\e[0m\t\tIntel HD3000 (1366x768)\n"
        "\t\e[1mHD3000_1366x768_7series\e[0m\tIntel HD3000 (1366x768) 7series\n"
        "\t\e[1mHD3000_1600x900\e[0m\t\tIntel HD3000 (1600x900)\n"
        "\t\e[1mHD3000_1600x900_7series\e[0m\tIntel HD3000 (1600x900) 7series\n"
        "\t\e[1mHD4000_1366x768\e[0m\t\tIntel HD4000 (1366x768)\n"
        "\t\e[1mHD4000_1366x768_6series\e[0m\tIntel HD4000 (1366x768) 6series\n"
        "\t\e[1mHD4000_1600x900\e[0m\t\tIntel HD4000 (1600x900)\n"
        "\t\e[1mHD4000_1600x900_6series\e[0m\tIntel HD4000 (1600x900) 6series\n"
        "\t\e[1mHD4600_4400_4200\e[0m\tIntel HD4600, 4400, 4200\n"
        "\t\e[1mHD5000_5100_5200\e[0m\tIntel HD5000, 5100, 5200\n"
        "\t\e[1mHD5600\e[0m\t\tIntel HD5600\n"
        "\t\e[1mHD5300_5500_6000\e[0m\tIntel HD5300, 5500, 6000\n"
        "\t\e[1mHD5600\e[0m\t\t\t\tIntel HD5600\n"
        "\e[4mNOTE:\e[0m There are \e[1mtwo \e[4mDropTables\e[0m in the "
        "config.plist file. Use the alternate if needed with DropOEM and "
        "Generate equals true. (From my experience, Broadwell PCs often "
        "require the \e[1malternate DropTables\e[0m with "
        "\e[1mDropOEM=true\e[0m and \e[1mGenerate=true\e[0m.) It should be "
        "furthur noted that choosing a config that needs \e[1mCI Patch\e[0m, "
        "\e[1mFakePCIID\e[0m along with \e[1mIntel HD Graphics\e[0m will be "
        "installed at /EFI/CLOVER/kexts/Other/.\n");
    break;
  case 12:
    printf(
        "\e[4mUSAGE:\e[0m machelper usb|hdd -ethernet <name>\n"
        "\e[4mNAME:\e[0m\n"
        "\t\e[1mRealtekRTL8100\e[0m\t\tFor Realtek RTL8100, RTL8101E, "
        "RTL8102E,\n"
        "\t\t\t\tRTL8103E, RTL8105E, RTL8106E, RTL8106EUS,\n"
        "\t\t\t\tRTL8401E and RTL8402\n"
        "\t\e[1mRealtekRTL8111\e[0m\t\tFor Realtek RTL8111x and RTL8168x\n"
        "\t\e[1mIntelMausiEthernet\e[0m\tFor Intel 82578LM, 82578LC, 82578DM,\n"
        "\t\t\t\t82578DC, 82579LM, 82579V, I217LM,\n"
        "\t\t\t\tI217V, I218LM, I218V, I218LM2,\n"
        "\t\t\t\tI218V2 and I218LM3\n"
        "\t\e[1mAtherosE2200Ethernet\e[0m\tFor Atheros AR816x, AR817x,\n"
        "\t\t\t\tKiller E220x and Killer 2400\n"
        "\t\e[1mBroadcomBCM57xx\e[0m\t\tFor Broadcom BCM57xx\n"
        "\t\e[1mAppleIntelE1000e\e[0m\tAppleIntel E1000e\n"
        "\e[4mNOTE:\e[0m if you have got a kext for your ethernet, please send "
        "it to me.\n");
    break;
  case 13:
    printf("\e[4mUSAGE:\e[0m machelper usb|hdd -mbrPatch <path>\n"
           "Here <path> is the destination (folder) where OSInstaller and\n"
           "OSInstall.mpkg are located.\n"
           "\e[4mNote:\e[0m Two files must be contained in the folder "
           "(<path>).\n");
    break;
  case 14:
    printf(
        "\e[4mUSAGE:\e[0m machelper usb|hdd -method <name>\n"
        "\e[4mNAME:\e[0m\n"
        "\t\e[1mBaseBinaries\e[0m\t\tBaseBinaries Clone (InstallESD) Method "
        "(Default)\n"
        "\t\e[1mcreateinstallmedia\e[0m\tCreateInstallMedia Method (Creates "
        "Recovery Partition)\n"
        "\t\e[1mRawImage\e[0m\t\tUse raw image specified by \e[1m-src "
        "<source>\e[0m\n"
        "\t\t\t\tSupported extensions: img, iso, raw, <volume>\n"
        "\e[4mNote:\e[0m RawImage Method is just a shortcut for BaseBinaries "
        "Clone Method. "
        "That means, RawImage is just an image file containing the files that "
        "are extracted using "
        "the BaseBinaries Clone Method. So, if you have 'Install OS X <OS X "
        "Name>.app', you should "
        "follow the BaseBinaries Clone Method, instead of RawImage Method.\n");
    break;
  case 15:
    printf("\e[4mUSAGE:\e[0m machelper usb|hdd -os <name>\n"
           "\e[4mNAME:\e[0m\n"
           "\t\e[1mMavericks\e[0m\t\tOS X Mavericks (10.9.x) Image\n"
           "\t\e[1mYosemite\e[0m\t\tOS X Yosemite (10.10.x) Image\n"
           "\t\e[1mEl Capitan\e[0m\t\tOS X El Capitan (10.11.x) Image "
           "[default]\n");
    break;
  case 16:
    printf("\e[4mUSAGE:\e[0m machelper usb|hdd -method RawImage -src <source>\n"
           "Here <source> is the path of the raw image \e[4malong with the "
           "kernel file\e[0m.\n");
    break;
  case 17:
    printf("\e[4mUSAGE:\e[0m machelper usb|hdd -replaceKernel <source>\n"
           "Here <source> is the path of the kernel \e[4malong with the kernel "
           "file\e[0m.\n");
    break;
  case 31:
    printf("\e[4mUSAGE:\e[0m machelper mount_efi [-i] [-mountPoint <path>]\n"
           "Here <path> is the folder to be used as a mount point to mount the "
           "EFI.\n"
           "\e[4mNote:\e[0m You must create that folder.\n");
    break;
  case 41:
  case 42:
    printf("\e[4mUSAGE:\e[0m machelper kext -install|-uninstall <source>\n"
           "Here <source> is the kext file to be installed at /S/L/E.\n");
    break;
  case 68:
  case 69:
    printf("\e[4mUSAGE:\e[0m machelper recovery -removeKext|-replaceKernel "
           "<source>\n"
           "Here <source> is the kext file to be installed or replaced.\n");
    break;
  case 0:
  default:
    printf("\e[1mMac OS Installation Helper\e[0m\n"
           "2016 (c) Muntashir Akon\n\n"
           "\e[4mUSAGE:\e[0m machelper <verb> [option] ...\n"
           "\e[4mVERB:\e[0m\n"
           "\t\e[1musb\e[0m\t\t\tCreate a bootable USB\n"
           "\t\e[1mhdd\e[0m\t\t\tConfigure HDD/SSD\n"
           "\t\e[1mmount_efi\e[0m\t\tMount EFI Partition\n"
           "\t\e[1mkext\e[0m\t\t\tkext (Kernel Extension) Management\n"
           "\t\e[1mextract_dsdt\e[0m\t\tExtracts DSDT/SSDTs\n"
           "\t\e[1mrecovery\e[0m\t\tRecovery Options for machelper\n"
           "\t\e[1mversion\e[0m\t\t\tShow the current machelper version\n"
           "\e[4mNote:\e[0m Type -help after each <verb> to show help.\n");
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x45,%rax
ja     1244 <show_help+0x134>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfd1(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1274(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1382(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1486(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1525(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x179f(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1c3d(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1ed6(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x1f94(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x2218(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x22e4(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x2363(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x23d8(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x2478(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
lea    0x24dd(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <show_help+0x140>
jmp    1244 <show_help+0x134>
lea    0x254a(%rip),%rdi
call   1030 <printf@plt>
mov    0x3d89(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rax
mov    %edi,%eax
add    $0xffffffff,%eax
cmp    $0x44,%eax
ja     1168 <show_help+0x58>
lea    0x23ad(%rip),%rdi
lea    0xed7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x105d(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0xfd2(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x2266(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x2149(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x2091(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x1dfe(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x2613(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x193e(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x168c(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x15b5(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x1318(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x1233(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x119b(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x110d(%rip),%rdi
jmp    11b7 <show_help+0xa7>
lea    0x1054(%rip),%rdi
call   1030 <puts@plt>
mov    0x3e1d(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [692 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd [option] ...\0A\1B[4mOPTION:\1B[0m\0A\09-config <name>\09\09Choose a laptop config.plist\0A\09-ethernet <name>\09Choose a ethernet kext\0A\09-help\09\09\09Show this help menu\0A\09-raid\09\09\09If SATA is in RAID mode\0A\09-excludeOs\09\09Exclude Mac OS installation (for USB only)\0A\09-os <name>\09\09Choose an OS (default: El Capitan)\0A\09-method <name>\09\09Choose a method (default: BaseBinaries Clone)\0A\09-src <source>\09\09(Only for RawImage Method) Image Source\0A\09-mbrPatch <path>\09Path to the folder where OSInstaller and\0A\09\09\09\09OSInstall.mpkg located\0A\09-replaceKernel <source>\09Source of the kernel to be replaced\0A\09-excludeClover\09\09(For real Mac) Exclude Clover Installation\0A\1B[4mNote:\1B[0m Keep the <name> blank to show help.\0A\00"
@.str.1 = [287 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-i|-help] [-mountPoint <path>]\0A\09-help\09\09\09Show this help menu\0A\09-i\09\09\09Interactive way of mounting EFI which allows\0A\09\09\09\09user to select the EFI partition from a list.\0A\09-mountPoint <path>\09Specify a mount point to mount the EFI\0A\09\09\09\09partition of the HDD/SSD.\0A\00"
@.str.2 = [277 x i8] c"\1B[4mUSAGE:\1B[0m machelper kext <option>\0A\1B[4mOPTION:\1B[0m\0A\09-help\09\09\09Show this help menu\0A\09-install <source>\09Install a kext, fix permissions & rebuil\0A\09-uninstall <source>\09Uninstall a kext\0A\09-fixPermissions\09\09Fix permissions of the Kexts at /S/L/E\0A\09-rebuildCache\09\09Rebuild Kernel Cache\0A\00"
@.str.3 = [176 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-disassemble|-help] <dest>\0A\09<dest>\09\09\09Destination to save DSDT/SSDTs\0A\09-disassemble\09\09Disassemble DSDT/SSDTs too\0A\09-help\09\09\09Show this help menu\0A\00"
@.str.4 = [651 x i8] c"\1B[4mUSAGE:\1B[0m machelper recovery <option>\0A\1B[4mOPTION:\1B[0m\0A\09-copyClover\09\09Copy Clover EFI from USB to HDD/SSD\0A\09-disableHibernation\09Disable Hibernation to fix sleep problems\0A\09-fixAppleId\09\09Reset network preferences to fix Apple ID\0A\09-help\09\09\09Show this help menu\0A\09-init\09\09\09Checks and mounts root when booting with \0A\09\09\09\09Single User Mode. This is essentially a shortcut\0A\09\09\09\09for `fsck -y` and `mount -uw /`\0A\09-installOnUSB\09\09Install 'machelper' on USB (only for \0A\09\09\09\09BaseBinaries Clone Method)\0A\09-listUnsigned\09\09List unsigned kext(s)\0A\09-removeKext <source>\09Uninstall/Remove a kext (backup to ~/Desktop)\0A\09-replaceKernel <source>\09Replace Kernel (backup to ~/Desktop)\0A\00"
@.str.5 = [1199 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -config <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mHD3000_1366x768\1B[0m\09\09Intel HD3000 (1366x768)\0A\09\1B[1mHD3000_1366x768_7series\1B[0m\09Intel HD3000 (1366x768) 7series\0A\09\1B[1mHD3000_1600x900\1B[0m\09\09Intel HD3000 (1600x900)\0A\09\1B[1mHD3000_1600x900_7series\1B[0m\09Intel HD3000 (1600x900) 7series\0A\09\1B[1mHD4000_1366x768\1B[0m\09\09Intel HD4000 (1366x768)\0A\09\1B[1mHD4000_1366x768_6series\1B[0m\09Intel HD4000 (1366x768) 6series\0A\09\1B[1mHD4000_1600x900\1B[0m\09\09Intel HD4000 (1600x900)\0A\09\1B[1mHD4000_1600x900_6series\1B[0m\09Intel HD4000 (1600x900) 6series\0A\09\1B[1mHD4600_4400_4200\1B[0m\09Intel HD4600, 4400, 4200\0A\09\1B[1mHD5000_5100_5200\1B[0m\09Intel HD5000, 5100, 5200\0A\09\1B[1mHD5600\1B[0m\09\09Intel HD5600\0A\09\1B[1mHD5300_5500_6000\1B[0m\09Intel HD5300, 5500, 6000\0A\09\1B[1mHD5600\1B[0m\09\09\09\09Intel HD5600\0A\1B[4mNOTE:\1B[0m There are \1B[1mtwo \1B[4mDropTables\1B[0m in the config.plist file. Use the alternate if needed with DropOEM and Generate equals true. (From my experience, Broadwell PCs often require the \1B[1malternate DropTables\1B[0m with \1B[1mDropOEM=true\1B[0m and \1B[1mGenerate=true\1B[0m.) It should be furthur noted that choosing a config that needs \1B[1mCI Patch\1B[0m, \1B[1mFakePCIID\1B[0m along with \1B[1mIntel HD Graphics\1B[0m will be installed at /EFI/CLOVER/kexts/Other/.\0A\00"
@.str.6 = [682 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -ethernet <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mRealtekRTL8100\1B[0m\09\09For Realtek RTL8100, RTL8101E, RTL8102E,\0A\09\09\09\09RTL8103E, RTL8105E, RTL8106E, RTL8106EUS,\0A\09\09\09\09RTL8401E and RTL8402\0A\09\1B[1mRealtekRTL8111\1B[0m\09\09For Realtek RTL8111x and RTL8168x\0A\09\1B[1mIntelMausiEthernet\1B[0m\09For Intel 82578LM, 82578LC, 82578DM,\0A\09\09\09\0982578DC, 82579LM, 82579V, I217LM,\0A\09\09\09\09I217V, I218LM, I218V, I218LM2,\0A\09\09\09\09I218V2 and I218LM3\0A\09\1B[1mAtherosE2200Ethernet\1B[0m\09For Atheros AR816x, AR817x,\0A\09\09\09\09Killer E220x and Killer 2400\0A\09\1B[1mBroadcomBCM57xx\1B[0m\09\09For Broadcom BCM57xx\0A\09\1B[1mAppleIntelE1000e\1B[0m\09AppleIntel E1000e\0A\1B[4mNOTE:\1B[0m if you have got a kext for your ethernet, please send it to me.\0A\00"
@.str.7 = [207 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -mbrPatch <path>\0AHere <path> is the destination (folder) where OSInstaller and\0AOSInstall.mpkg are located.\0A\1B[4mNote:\1B[0m Two files must be contained in the folder (<path>).\0A\00"
@.str.8 = [661 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -method <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mBaseBinaries\1B[0m\09\09BaseBinaries Clone (InstallESD) Method (Default)\0A\09\1B[1mcreateinstallmedia\1B[0m\09CreateInstallMedia Method (Creates Recovery Partition)\0A\09\1B[1mRawImage\1B[0m\09\09Use raw image specified by \1B[1m-src <source>\1B[0m\0A\09\09\09\09Supported extensions: img, iso, raw, <volume>\0A\1B[4mNote:\1B[0m RawImage Method is just a shortcut for BaseBinaries Clone Method. That means, RawImage is just an image file containing the files that are extracted using the BaseBinaries Clone Method. So, if you have 'Install OS X <OS X Name>.app', you should follow the BaseBinaries Clone Method, instead of RawImage Method.\0A\00"
@.str.9 = [221 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -os <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mMavericks\1B[0m\09\09OS X Mavericks (10.9.x) Image\0A\09\1B[1mYosemite\1B[0m\09\09OS X Yosemite (10.10.x) Image\0A\09\1B[1mEl Capitan\1B[0m\09\09OS X El Capitan (10.11.x) Image [default]\0A\00"
@.str.10 = [144 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -method RawImage -src <source>\0AHere <source> is the path of the raw image \1B[4malong with the kernel file\1B[0m.\0A\00"
@.str.11 = [134 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -replaceKernel <source>\0AHere <source> is the path of the kernel \1B[4malong with the kernel file\1B[0m.\0A\00"
@.str.12 = [177 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-i] [-mountPoint <path>]\0AHere <path> is the folder to be used as a mount point to mount the EFI.\0A\1B[4mNote:\1B[0m You must create that folder.\0A\00"
@.str.13 = [118 x i8] c"\1B[4mUSAGE:\1B[0m machelper kext -install|-uninstall <source>\0AHere <source> is the kext file to be installed at /S/L/E.\0A\00"
@.str.14 = [131 x i8] c"\1B[4mUSAGE:\1B[0m machelper recovery -removeKext|-replaceKernel <source>\0AHere <source> is the kext file to be installed or replaced.\0A\00"
@.str.15 = [485 x i8] c"\1B[1mMac OS Installation Helper\1B[0m\0A2016 (c) Muntashir Akon\0A\0A\1B[4mUSAGE:\1B[0m machelper <verb> [option] ...\0A\1B[4mVERB:\1B[0m\0A\09\1B[1musb\1B[0m\09\09\09Create a bootable USB\0A\09\1B[1mhdd\1B[0m\09\09\09Configure HDD/SSD\0A\09\1B[1mmount_efi\1B[0m\09\09Mount EFI Partition\0A\09\1B[1mkext\1B[0m\09\09\09kext (Kernel Extension) Management\0A\09\1B[1mextract_dsdt\1B[0m\09\09Extracts DSDT/SSDTs\0A\09\1B[1mrecovery\1B[0m\09\09Recovery Options for machelper\0A\09\1B[1mversion\1B[0m\09\09\09Show the current machelper version\0A\1B[4mNote:\1B[0m Type -help after each <verb> to show help.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @show_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %35 [
i32 1, label %4
i32 2, label %4
i32 3, label %6
i32 4, label %8
i32 5, label %10
i32 6, label %12
i32 11, label %14
i32 12, label %16
i32 13, label %18
i32 14, label %20
i32 15, label %22
i32 16, label %24
i32 17, label %26
i32 31, label %28
i32 41, label %30
i32 42, label %30
i32 68, label %32
i32 69, label %32
i32 0, label %34
]
4: ; preds = %1, %1
%5 = call i32 @printf(i8* getelementptr inbounds ([692 x i8], [692 x i8]* @.str, i64 0, i64 0))
br label %37
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([287 x i8], [287 x i8]* @.str.1, i64 0, i64 0))
br label %37
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([277 x i8], [277 x i8]* @.str.2, i64 0, i64 0))
br label %37
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str.3, i64 0, i64 0))
br label %37
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([651 x i8], [651 x i8]* @.str.4, i64 0, i64 0))
br label %37
14: ; preds = %1
%15 = call i32 @printf(i8* getelementptr inbounds ([1199 x i8], [1199 x i8]* @.str.5, i64 0, i64 0))
br label %37
16: ; preds = %1
%17 = call i32 @printf(i8* getelementptr inbounds ([682 x i8], [682 x i8]* @.str.6, i64 0, i64 0))
br label %37
18: ; preds = %1
%19 = call i32 @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str.7, i64 0, i64 0))
br label %37
20: ; preds = %1
%21 = call i32 @printf(i8* getelementptr inbounds ([661 x i8], [661 x i8]* @.str.8, i64 0, i64 0))
br label %37
22: ; preds = %1
%23 = call i32 @printf(i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str.9, i64 0, i64 0))
br label %37
24: ; preds = %1
%25 = call i32 @printf(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.10, i64 0, i64 0))
br label %37
26: ; preds = %1
%27 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.11, i64 0, i64 0))
br label %37
28: ; preds = %1
%29 = call i32 @printf(i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str.12, i64 0, i64 0))
br label %37
30: ; preds = %1, %1
%31 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.13, i64 0, i64 0))
br label %37
32: ; preds = %1, %1
%33 = call i32 @printf(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str.14, i64 0, i64 0))
br label %37
34: ; preds = %1
br label %35
35: ; preds = %1, %34
%36 = call i32 @printf(i8* getelementptr inbounds ([485 x i8], [485 x i8]* @.str.15, i64 0, i64 0))
br label %37
37: ; preds = %35, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
%38 = load i32, i32* @EXIT_SUCCESS
ret i32 %38
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [130 x i8] c"\1B[4mUSAGE:\1B[0m machelper recovery -removeKext|-replaceKernel <source>\0AHere <source> is the kext file to be installed or replaced.\00"
@str.16 = [117 x i8] c"\1B[4mUSAGE:\1B[0m machelper kext -install|-uninstall <source>\0AHere <source> is the kext file to be installed at /S/L/E.\00"
@str.17 = [176 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-i] [-mountPoint <path>]\0AHere <path> is the folder to be used as a mount point to mount the EFI.\0A\1B[4mNote:\1B[0m You must create that folder.\00"
@str.18 = [133 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -replaceKernel <source>\0AHere <source> is the path of the kernel \1B[4malong with the kernel file\1B[0m.\00"
@str.19 = [143 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -method RawImage -src <source>\0AHere <source> is the path of the raw image \1B[4malong with the kernel file\1B[0m.\00"
@str.20 = [220 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -os <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mMavericks\1B[0m\09\09OS X Mavericks (10.9.x) Image\0A\09\1B[1mYosemite\1B[0m\09\09OS X Yosemite (10.10.x) Image\0A\09\1B[1mEl Capitan\1B[0m\09\09OS X El Capitan (10.11.x) Image [default]\00"
@str.21 = [660 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -method <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mBaseBinaries\1B[0m\09\09BaseBinaries Clone (InstallESD) Method (Default)\0A\09\1B[1mcreateinstallmedia\1B[0m\09CreateInstallMedia Method (Creates Recovery Partition)\0A\09\1B[1mRawImage\1B[0m\09\09Use raw image specified by \1B[1m-src <source>\1B[0m\0A\09\09\09\09Supported extensions: img, iso, raw, <volume>\0A\1B[4mNote:\1B[0m RawImage Method is just a shortcut for BaseBinaries Clone Method. That means, RawImage is just an image file containing the files that are extracted using the BaseBinaries Clone Method. So, if you have 'Install OS X <OS X Name>.app', you should follow the BaseBinaries Clone Method, instead of RawImage Method.\00"
@str.22 = [206 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -mbrPatch <path>\0AHere <path> is the destination (folder) where OSInstaller and\0AOSInstall.mpkg are located.\0A\1B[4mNote:\1B[0m Two files must be contained in the folder (<path>).\00"
@str.23 = [681 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -ethernet <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mRealtekRTL8100\1B[0m\09\09For Realtek RTL8100, RTL8101E, RTL8102E,\0A\09\09\09\09RTL8103E, RTL8105E, RTL8106E, RTL8106EUS,\0A\09\09\09\09RTL8401E and RTL8402\0A\09\1B[1mRealtekRTL8111\1B[0m\09\09For Realtek RTL8111x and RTL8168x\0A\09\1B[1mIntelMausiEthernet\1B[0m\09For Intel 82578LM, 82578LC, 82578DM,\0A\09\09\09\0982578DC, 82579LM, 82579V, I217LM,\0A\09\09\09\09I217V, I218LM, I218V, I218LM2,\0A\09\09\09\09I218V2 and I218LM3\0A\09\1B[1mAtherosE2200Ethernet\1B[0m\09For Atheros AR816x, AR817x,\0A\09\09\09\09Killer E220x and Killer 2400\0A\09\1B[1mBroadcomBCM57xx\1B[0m\09\09For Broadcom BCM57xx\0A\09\1B[1mAppleIntelE1000e\1B[0m\09AppleIntel E1000e\0A\1B[4mNOTE:\1B[0m if you have got a kext for your ethernet, please send it to me.\00"
@str.24 = [1198 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd -config <name>\0A\1B[4mNAME:\1B[0m\0A\09\1B[1mHD3000_1366x768\1B[0m\09\09Intel HD3000 (1366x768)\0A\09\1B[1mHD3000_1366x768_7series\1B[0m\09Intel HD3000 (1366x768) 7series\0A\09\1B[1mHD3000_1600x900\1B[0m\09\09Intel HD3000 (1600x900)\0A\09\1B[1mHD3000_1600x900_7series\1B[0m\09Intel HD3000 (1600x900) 7series\0A\09\1B[1mHD4000_1366x768\1B[0m\09\09Intel HD4000 (1366x768)\0A\09\1B[1mHD4000_1366x768_6series\1B[0m\09Intel HD4000 (1366x768) 6series\0A\09\1B[1mHD4000_1600x900\1B[0m\09\09Intel HD4000 (1600x900)\0A\09\1B[1mHD4000_1600x900_6series\1B[0m\09Intel HD4000 (1600x900) 6series\0A\09\1B[1mHD4600_4400_4200\1B[0m\09Intel HD4600, 4400, 4200\0A\09\1B[1mHD5000_5100_5200\1B[0m\09Intel HD5000, 5100, 5200\0A\09\1B[1mHD5600\1B[0m\09\09Intel HD5600\0A\09\1B[1mHD5300_5500_6000\1B[0m\09Intel HD5300, 5500, 6000\0A\09\1B[1mHD5600\1B[0m\09\09\09\09Intel HD5600\0A\1B[4mNOTE:\1B[0m There are \1B[1mtwo \1B[4mDropTables\1B[0m in the config.plist file. Use the alternate if needed with DropOEM and Generate equals true. (From my experience, Broadwell PCs often require the \1B[1malternate DropTables\1B[0m with \1B[1mDropOEM=true\1B[0m and \1B[1mGenerate=true\1B[0m.) It should be furthur noted that choosing a config that needs \1B[1mCI Patch\1B[0m, \1B[1mFakePCIID\1B[0m along with \1B[1mIntel HD Graphics\1B[0m will be installed at /EFI/CLOVER/kexts/Other/.\00"
@str.25 = [650 x i8] c"\1B[4mUSAGE:\1B[0m machelper recovery <option>\0A\1B[4mOPTION:\1B[0m\0A\09-copyClover\09\09Copy Clover EFI from USB to HDD/SSD\0A\09-disableHibernation\09Disable Hibernation to fix sleep problems\0A\09-fixAppleId\09\09Reset network preferences to fix Apple ID\0A\09-help\09\09\09Show this help menu\0A\09-init\09\09\09Checks and mounts root when booting with \0A\09\09\09\09Single User Mode. This is essentially a shortcut\0A\09\09\09\09for `fsck -y` and `mount -uw /`\0A\09-installOnUSB\09\09Install 'machelper' on USB (only for \0A\09\09\09\09BaseBinaries Clone Method)\0A\09-listUnsigned\09\09List unsigned kext(s)\0A\09-removeKext <source>\09Uninstall/Remove a kext (backup to ~/Desktop)\0A\09-replaceKernel <source>\09Replace Kernel (backup to ~/Desktop)\00"
@str.26 = [175 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-disassemble|-help] <dest>\0A\09<dest>\09\09\09Destination to save DSDT/SSDTs\0A\09-disassemble\09\09Disassemble DSDT/SSDTs too\0A\09-help\09\09\09Show this help menu\00"
@str.27 = [276 x i8] c"\1B[4mUSAGE:\1B[0m machelper kext <option>\0A\1B[4mOPTION:\1B[0m\0A\09-help\09\09\09Show this help menu\0A\09-install <source>\09Install a kext, fix permissions & rebuil\0A\09-uninstall <source>\09Uninstall a kext\0A\09-fixPermissions\09\09Fix permissions of the Kexts at /S/L/E\0A\09-rebuildCache\09\09Rebuild Kernel Cache\00"
@str.28 = [286 x i8] c"\1B[4mUSAGE:\1B[0m machelper mount_efi [-i|-help] [-mountPoint <path>]\0A\09-help\09\09\09Show this help menu\0A\09-i\09\09\09Interactive way of mounting EFI which allows\0A\09\09\09\09user to select the EFI partition from a list.\0A\09-mountPoint <path>\09Specify a mount point to mount the EFI\0A\09\09\09\09partition of the HDD/SSD.\00"
@str.29 = [691 x i8] c"\1B[4mUSAGE:\1B[0m machelper usb|hdd [option] ...\0A\1B[4mOPTION:\1B[0m\0A\09-config <name>\09\09Choose a laptop config.plist\0A\09-ethernet <name>\09Choose a ethernet kext\0A\09-help\09\09\09Show this help menu\0A\09-raid\09\09\09If SATA is in RAID mode\0A\09-excludeOs\09\09Exclude Mac OS installation (for USB only)\0A\09-os <name>\09\09Choose an OS (default: El Capitan)\0A\09-method <name>\09\09Choose a method (default: BaseBinaries Clone)\0A\09-src <source>\09\09(Only for RawImage Method) Image Source\0A\09-mbrPatch <path>\09Path to the folder where OSInstaller and\0A\09\09\09\09OSInstall.mpkg located\0A\09-replaceKernel <source>\09Source of the kernel to be replaced\0A\09-excludeClover\09\09(For real Mac) Exclude Clover Installation\0A\1B[4mNote:\1B[0m Keep the <name> blank to show help.\00"
@str.30 = [484 x i8] c"\1B[1mMac OS Installation Helper\1B[0m\0A2016 (c) Muntashir Akon\0A\0A\1B[4mUSAGE:\1B[0m machelper <verb> [option] ...\0A\1B[4mVERB:\1B[0m\0A\09\1B[1musb\1B[0m\09\09\09Create a bootable USB\0A\09\1B[1mhdd\1B[0m\09\09\09Configure HDD/SSD\0A\09\1B[1mmount_efi\1B[0m\09\09Mount EFI Partition\0A\09\1B[1mkext\1B[0m\09\09\09kext (Kernel Extension) Management\0A\09\1B[1mextract_dsdt\1B[0m\09\09Extracts DSDT/SSDTs\0A\09\1B[1mrecovery\1B[0m\09\09Recovery Options for machelper\0A\09\1B[1mversion\1B[0m\09\09\09Show the current machelper version\0A\1B[4mNote:\1B[0m Type -help after each <verb> to show help.\00"
define i32 @show_help(i32 %0) {
switch i32 %0, label %16 [
i32 1, label %17
i32 2, label %17
i32 3, label %2
i32 4, label %3
i32 5, label %4
i32 6, label %5
i32 11, label %6
i32 12, label %7
i32 13, label %8
i32 14, label %9
i32 15, label %10
i32 16, label %11
i32 17, label %12
i32 31, label %13
i32 41, label %14
i32 42, label %14
i32 68, label %15
i32 69, label %15
]
2: ; preds = %1
br label %17
3: ; preds = %1
br label %17
4: ; preds = %1
br label %17
5: ; preds = %1
br label %17
6: ; preds = %1
br label %17
7: ; preds = %1
br label %17
8: ; preds = %1
br label %17
9: ; preds = %1
br label %17
10: ; preds = %1
br label %17
11: ; preds = %1
br label %17
12: ; preds = %1
br label %17
13: ; preds = %1
br label %17
14: ; preds = %1, %1
br label %17
15: ; preds = %1, %1
br label %17
16: ; preds = %1
br label %17
17: ; preds = %1, %1, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%18 = phi i8* [ getelementptr inbounds ([484 x i8], [484 x i8]* @str.30, i64 0, i64 0), %16 ], [ getelementptr inbounds ([130 x i8], [130 x i8]* @str, i64 0, i64 0), %15 ], [ getelementptr inbounds ([117 x i8], [117 x i8]* @str.16, i64 0, i64 0), %14 ], [ getelementptr inbounds ([176 x i8], [176 x i8]* @str.17, i64 0, i64 0), %13 ], [ getelementptr inbounds ([133 x i8], [133 x i8]* @str.18, i64 0, i64 0), %12 ], [ getelementptr inbounds ([143 x i8], [143 x i8]* @str.19, i64 0, i64 0), %11 ], [ getelementptr inbounds ([220 x i8], [220 x i8]* @str.20, i64 0, i64 0), %10 ], [ getelementptr inbounds ([660 x i8], [660 x i8]* @str.21, i64 0, i64 0), %9 ], [ getelementptr inbounds ([206 x i8], [206 x i8]* @str.22, i64 0, i64 0), %8 ], [ getelementptr inbounds ([681 x i8], [681 x i8]* @str.23, i64 0, i64 0), %7 ], [ getelementptr inbounds ([1198 x i8], [1198 x i8]* @str.24, i64 0, i64 0), %6 ], [ getelementptr inbounds ([650 x i8], [650 x i8]* @str.25, i64 0, i64 0), %5 ], [ getelementptr inbounds ([175 x i8], [175 x i8]* @str.26, i64 0, i64 0), %4 ], [ getelementptr inbounds ([276 x i8], [276 x i8]* @str.27, i64 0, i64 0), %3 ], [ getelementptr inbounds ([286 x i8], [286 x i8]* @str.28, i64 0, i64 0), %2 ], [ getelementptr inbounds ([691 x i8], [691 x i8]* @str.29, i64 0, i64 0), %1 ], [ getelementptr inbounds ([691 x i8], [691 x i8]* @str.29, i64 0, i64 0), %1 ]
%19 = tail call i32 @puts(i8* dereferenceable(1) %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}