#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 */
scalar_t__ detectPresence(char *);
char *dialogNameOnly();
int *getMajorMinorPatch(char *);
scalar_t__ isDarwin();
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcpy(char *, char *);
scalar_t__ strlen(char *);
scalar_t__ whiptailPresentOnly();
char const *terminalName() {
  static char lTerminalName[128] = "*";
  char lShellName[64] = "*";
  int *lArray;
  if (lTerminalName[0] == '*') {
    if (detectPresence("bash")) {
      strcpy(lShellName, "bash -c ");
    } else if (strlen(dialogNameOnly()) || whiptailPresentOnly()) {
      strcpy(lShellName, "sh -c ");
    } else {
      strcpy(lTerminalName, "");
      return NULL;
    }
    if (isDarwin()) {
      if (strcpy(lTerminalName, "/opt/X11/bin/xterm") &&
          detectPresence(lTerminalName)) {
        strcat(lTerminalName,
               " -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e ");
        strcat(lTerminalName, lShellName);
      } else {
        strcpy(lTerminalName, "");
      }
    } else if (strcpy(lTerminalName, "xterm") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName,
             " -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "terminator") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -x ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "lxterminal") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "konsole") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "kterm") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "tilix") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "xfce4-terminal") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -x ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "mate-terminal") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -x ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "Eterm") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "evilvte") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "pterm") &&
               detectPresence(lTerminalName)) {
      strcat(lTerminalName, " -e ");
      strcat(lTerminalName, lShellName);
    } else if (strcpy(lTerminalName, "gnome-terminal") &&
               detectPresence(lTerminalName) &&
               (lArray = getMajorMinorPatch(lTerminalName)) &&
               ((lArray[0] < 3) || (lArray[0] == 3 && lArray[1] <= 6))) {
      strcat(lTerminalName, " --disable-factory -x ");
      strcat(lTerminalName, lShellName);
    } else {
      strcpy(lTerminalName, "");
    }
  }
  if (strlen(lTerminalName)) {
    return lTerminalName;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<terminalName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
movb   $0x2a,-0x50(%rbp)
movsbl 0x2ebd(%rip),%eax
cmp    $0x2a,%eax
jne    17a9 <terminalName+0x619>
lea    0xe3d(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     11e7 <terminalName+0x57>
lea    -0x50(%rbp),%rdi
lea    0xe28(%rip),%rsi
call   1040 <strcpy@plt>
jmp    124b <terminalName+0xbb>
mov    $0x0,%al
call   1090 <dialogNameOnly@plt>
mov    %rax,%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jne    1211 <terminalName+0x81>
mov    $0x0,%al
call   1030 <whiptailPresentOnly@plt>
cmp    $0x0,%rax
je     1226 <terminalName+0x96>
lea    -0x50(%rbp),%rdi
lea    0xdeb(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1246 <terminalName+0xb6>
lea    0x2e43(%rip),%rdi
lea    0xdd9(%rip),%rsi
call   1040 <strcpy@plt>
movq   $0x0,-0x8(%rbp)
jmp    17d7 <terminalName+0x647>
jmp    124b <terminalName+0xbb>
mov    $0x0,%al
call   1070 <isDarwin@plt>
cmp    $0x0,%rax
je     12cf <terminalName+0x13f>
lea    0x2e0d(%rip),%rdi
lea    0xda4(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     12b7 <terminalName+0x127>
lea    0x2df0(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     12b7 <terminalName+0x127>
lea    0x2dda(%rip),%rdi
lea    0xd84(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2dc3(%rip),%rdi
call   10a0 <strcat@plt>
jmp    12ca <terminalName+0x13a>
lea    0x2db2(%rip),%rdi
lea    0xd48(%rip),%rsi
call   1040 <strcpy@plt>
jmp    17a4 <terminalName+0x614>
lea    0x2d9a(%rip),%rdi
lea    0xd3e(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     132a <terminalName+0x19a>
lea    0x2d7d(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     132a <terminalName+0x19a>
lea    0x2d67(%rip),%rdi
lea    0xd11(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2d50(%rip),%rdi
call   10a0 <strcat@plt>
jmp    179f <terminalName+0x60f>
lea    0x2d3f(%rip),%rdi
lea    0xd23(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     1385 <terminalName+0x1f5>
lea    0x2d22(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     1385 <terminalName+0x1f5>
lea    0x2d0c(%rip),%rdi
lea    0xd6c(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2cf5(%rip),%rdi
call   10a0 <strcat@plt>
jmp    179a <terminalName+0x60a>
lea    0x2ce4(%rip),%rdi
lea    0xcd3(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     13e0 <terminalName+0x250>
lea    0x2cc7(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     13e0 <terminalName+0x250>
lea    0x2cb1(%rip),%rdi
lea    0xc90(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2c9a(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1795 <terminalName+0x605>
lea    0x2c89(%rip),%rdi
lea    0xc83(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     143b <terminalName+0x2ab>
lea    0x2c6c(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     143b <terminalName+0x2ab>
lea    0x2c56(%rip),%rdi
lea    0xc35(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2c3f(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1790 <terminalName+0x600>
lea    0x2c2e(%rip),%rdi
lea    0xc30(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     1496 <terminalName+0x306>
lea    0x2c11(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     1496 <terminalName+0x306>
lea    0x2bfb(%rip),%rdi
lea    0xbda(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2be4(%rip),%rdi
call   10a0 <strcat@plt>
jmp    178b <terminalName+0x5fb>
lea    0x2bd3(%rip),%rdi
lea    0xbdb(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     14f1 <terminalName+0x361>
lea    0x2bb6(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     14f1 <terminalName+0x361>
lea    0x2ba0(%rip),%rdi
lea    0xb7f(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2b89(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1786 <terminalName+0x5f6>
lea    0x2b78(%rip),%rdi
lea    0xb86(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     154c <terminalName+0x3bc>
lea    0x2b5b(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     154c <terminalName+0x3bc>
lea    0x2b45(%rip),%rdi
lea    0xba5(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2b2e(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1781 <terminalName+0x5f1>
lea    0x2b1d(%rip),%rdi
lea    0xb3a(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     15a7 <terminalName+0x417>
lea    0x2b00(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     15a7 <terminalName+0x417>
lea    0x2aea(%rip),%rdi
lea    0xb4a(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2ad3(%rip),%rdi
call   10a0 <strcat@plt>
jmp    177c <terminalName+0x5ec>
lea    0x2ac2(%rip),%rdi
lea    0xaed(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     1602 <terminalName+0x472>
lea    0x2aa5(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     1602 <terminalName+0x472>
lea    0x2a8f(%rip),%rdi
lea    0xa6e(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2a78(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1777 <terminalName+0x5e7>
lea    0x2a67(%rip),%rdi
lea    0xa98(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     165d <terminalName+0x4cd>
lea    0x2a4a(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     165d <terminalName+0x4cd>
lea    0x2a34(%rip),%rdi
lea    0xa13(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2a1d(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1772 <terminalName+0x5e2>
lea    0x2a0c(%rip),%rdi
lea    0xa45(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     16b8 <terminalName+0x528>
lea    0x29ef(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     16b8 <terminalName+0x528>
lea    0x29d9(%rip),%rdi
lea    0x9b8(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x29c2(%rip),%rdi
call   10a0 <strcat@plt>
jmp    176d <terminalName+0x5dd>
lea    0x29b1(%rip),%rdi
lea    0x9f0(%rip),%rsi
call   1040 <strcpy@plt>
cmp    $0x0,%rax
je     1755 <terminalName+0x5c5>
lea    0x2994(%rip),%rdi
call   1080 <detectPresence@plt>
cmp    $0x0,%rax
je     1755 <terminalName+0x5c5>
lea    0x297e(%rip),%rdi
call   10b0 <getMajorMinorPatch@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
je     1755 <terminalName+0x5c5>
mov    -0x58(%rbp),%rax
cmpl   $0x3,(%rax)
jl     172d <terminalName+0x59d>
mov    -0x58(%rbp),%rax
cmpl   $0x3,(%rax)
jne    1755 <terminalName+0x5c5>
mov    -0x58(%rbp),%rax
cmpl   $0x6,0x4(%rax)
jg     1755 <terminalName+0x5c5>
lea    0x293c(%rip),%rdi
lea    0x98a(%rip),%rsi
call   10a0 <strcat@plt>
lea    -0x50(%rbp),%rsi
lea    0x2925(%rip),%rdi
call   10a0 <strcat@plt>
jmp    1768 <terminalName+0x5d8>
lea    0x2914(%rip),%rdi
lea    0x8aa(%rip),%rsi
call   1040 <strcpy@plt>
jmp    176d <terminalName+0x5dd>
jmp    1772 <terminalName+0x5e2>
jmp    1777 <terminalName+0x5e7>
jmp    177c <terminalName+0x5ec>
jmp    1781 <terminalName+0x5f1>
jmp    1786 <terminalName+0x5f6>
jmp    178b <terminalName+0x5fb>
jmp    1790 <terminalName+0x600>
jmp    1795 <terminalName+0x605>
jmp    179a <terminalName+0x60a>
jmp    179f <terminalName+0x60f>
jmp    17a4 <terminalName+0x614>
jmp    17a9 <terminalName+0x619>
lea    0x28c0(%rip),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
je     17cf <terminalName+0x63f>
lea    0x28aa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    17d7 <terminalName+0x647>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminalName>:
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movb   $0x2a,(%rsp)
cmpb   $0x2a,0x2eca(%rip)
jne    1367 <terminalName+0x1f7>
lea    0xe5d(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
je     11b6 <terminalName+0x46>
lea    0xe51(%rip),%rbx
jmp    11d9 <terminalName+0x69>
xor    %eax,%eax
call   1070 <dialogNameOnly@plt>
lea    0xe43(%rip),%rbx
cmpb   $0x0,(%rax)
jne    11d9 <terminalName+0x69>
xor    %eax,%eax
call   1030 <whiptailPresentOnly@plt>
test   %rax,%rax
je     1381 <terminalName+0x211>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
xor    %eax,%eax
call   1050 <isDarwin@plt>
lea    0x2e6e(%rip),%rdi
test   %rax,%rax
je     1231 <terminalName+0xc1>
lea    0xe10(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     1219 <terminalName+0xa9>
lea    0x2e51(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1253 <terminalName+0xe3>
lea    0x2e40(%rip),%rdi
lea    0xde6(%rip),%rsi
call   1040 <strcpy@plt>
jmp    1367 <terminalName+0x1f7>
lea    0xde3(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     1266 <terminalName+0xf6>
lea    0x2e17(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
je     1266 <terminalName+0xf6>
lea    0x2e06(%rip),%rbx
lea    0xdc0(%rip),%rsi
jmp    1354 <terminalName+0x1e4>
lea    0x2df3(%rip),%rdi
lea    0xde7(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     12a2 <terminalName+0x132>
lea    0x2ddb(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
je     12a2 <terminalName+0x132>
lea    0x2dca(%rip),%rbx
lea    0xe3a(%rip),%rsi
jmp    1354 <terminalName+0x1e4>
lea    0x2db7(%rip),%rdi
lea    0xdb6(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     12cb <terminalName+0x15b>
lea    0x2d9f(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2d8e(%rip),%rdi
lea    0xd98(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     12f4 <terminalName+0x184>
lea    0x2d76(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2d65(%rip),%rdi
lea    0xd77(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     131d <terminalName+0x1ad>
lea    0x2d4d(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2d3c(%rip),%rdi
lea    0xd54(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     1398 <terminalName+0x228>
lea    0x2d24(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
je     1398 <terminalName+0x228>
lea    0x2d13(%rip),%rbx
lea    0xd02(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcat@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1080 <strcat@plt>
lea    0x2cf2(%rip),%rcx
xor    %eax,%eax
cmpb   $0x0,0x2ce9(%rip)
cmovne %rcx,%rax
add    $0x40,%rsp
pop    %rbx
ret
lea    0x2cd8(%rip),%rdi
lea    0xc7e(%rip),%rsi
call   1040 <strcpy@plt>
xor    %eax,%eax
jmp    137b <terminalName+0x20b>
lea    0x2cc1(%rip),%rdi
lea    0xcdf(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     13c5 <terminalName+0x255>
lea    0x2ca9(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    128f <terminalName+0x11f>
lea    0x2c94(%rip),%rdi
lea    0xcc1(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     13f2 <terminalName+0x282>
lea    0x2c7c(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    128f <terminalName+0x11f>
lea    0x2c67(%rip),%rdi
lea    0xca2(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     141f <terminalName+0x2af>
lea    0x2c4f(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2c3a(%rip),%rdi
lea    0xc7b(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     144c <terminalName+0x2dc>
lea    0x2c22(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2c0d(%rip),%rdi
lea    0xc56(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     1479 <terminalName+0x309>
lea    0x2bf5(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
jne    1346 <terminalName+0x1d6>
lea    0x2be0(%rip),%rdi
lea    0xc2f(%rip),%rsi
call   1040 <strcpy@plt>
test   %rax,%rax
je     1219 <terminalName+0xa9>
lea    0x2bc4(%rip),%rdi
call   1060 <detectPresence@plt>
test   %rax,%rax
je     1219 <terminalName+0xa9>
lea    0x2baf(%rip),%rdi
call   1090 <getMajorMinorPatch@plt>
test   %rax,%rax
je     1219 <terminalName+0xa9>
cmpl   $0x3,(%rax)
jge    14d7 <terminalName+0x367>
lea    0x2b95(%rip),%rbx
lea    0xbf3(%rip),%rsi
jmp    1354 <terminalName+0x1e4>
jne    1219 <terminalName+0xa9>
cmpl   $0x6,0x4(%rax)
jg     1219 <terminalName+0xa9>
jmp    14c4 <terminalName+0x354>

LLVM IR (-O0):
@terminalName.lTerminalName = internal global [128 x i8] c"*\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [5 x i8] c"bash\00"
@.str.1 = [9 x i8] c"bash -c \00"
@.str.2 = [7 x i8] c"sh -c \00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [19 x i8] c"/opt/X11/bin/xterm\00"
@.str.5 = [58 x i8] c" -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e \00"
@.str.6 = [6 x i8] c"xterm\00"
@.str.7 = [11 x i8] c"terminator\00"
@.str.8 = [5 x i8] c" -x \00"
@.str.9 = [11 x i8] c"lxterminal\00"
@.str.10 = [5 x i8] c" -e \00"
@.str.11 = [8 x i8] c"konsole\00"
@.str.12 = [6 x i8] c"kterm\00"
@.str.13 = [6 x i8] c"tilix\00"
@.str.14 = [15 x i8] c"xfce4-terminal\00"
@.str.15 = [14 x i8] c"mate-terminal\00"
@.str.16 = [6 x i8] c"Eterm\00"
@.str.17 = [8 x i8] c"evilvte\00"
@.str.18 = [6 x i8] c"pterm\00"
@.str.19 = [15 x i8] c"gnome-terminal\00"
@.str.20 = [23 x i8] c" --disable-factory -x \00"
define i8* @terminalName() {
%1 = alloca i8*
%2 = alloca [64 x i8]
%3 = alloca i32*
%4 = bitcast [64 x i8]* %2 to i8*
%5 = bitcast i8* %4 to [64 x i8]*
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i32 0, i32 0
store i8 42, i8* %6
%7 = load i8, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0)
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 42
br i1 %9, label %10, label %198
10: ; preds = %0
%11 = call i64 @detectPresence(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%15 = call i64 @strcpy(i8* %14, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %29
16: ; preds = %10
%17 = call i8* (...) @dialogNameOnly()
%18 = call i64 @strlen(i8* %17)
%19 = icmp ne i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %16
%21 = call i64 (...) @whiptailPresentOnly()
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20, %16
%24 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%25 = call i64 @strcpy(i8* %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %28
26: ; preds = %20
%27 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i8* null, i8** %1
br label %203
28: ; preds = %23
br label %29
29: ; preds = %28, %13
%30 = call i64 (...) @isDarwin()
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %45
32: ; preds = %29
%33 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %42
35: ; preds = %32
%36 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%41 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %40)
br label %44
42: ; preds = %35, %32
%43 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %44
44: ; preds = %42, %38
br label %197
45: ; preds = %29
%46 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %48
%52 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%53 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%54 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %53)
br label %196
55: ; preds = %48, %45
%56 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %65
58: ; preds = %55
%59 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%63 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%64 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %63)
br label %195
65: ; preds = %58, %55
%66 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %75
68: ; preds = %65
%69 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %68
%72 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%73 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%74 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %73)
br label %194
75: ; preds = %68, %65
%76 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %85
78: ; preds = %75
%79 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%80 = icmp ne i64 %79, 0
br i1 %80, label %81, label %85
81: ; preds = %78
%82 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%83 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%84 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %83)
br label %193
85: ; preds = %78, %75
%86 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %95
88: ; preds = %85
%89 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %95
91: ; preds = %88
%92 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%93 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%94 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %93)
br label %192
95: ; preds = %88, %85
%96 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%97 = icmp ne i64 %96, 0
br i1 %97, label %98, label %105
98: ; preds = %95
%99 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%100 = icmp ne i64 %99, 0
br i1 %100, label %101, label %105
101: ; preds = %98
%102 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%103 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%104 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %103)
br label %191
105: ; preds = %98, %95
%106 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0))
%107 = icmp ne i64 %106, 0
br i1 %107, label %108, label %115
108: ; preds = %105
%109 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%110 = icmp ne i64 %109, 0
br i1 %110, label %111, label %115
111: ; preds = %108
%112 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%113 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%114 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %113)
br label %190
115: ; preds = %108, %105
%116 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
%117 = icmp ne i64 %116, 0
br i1 %117, label %118, label %125
118: ; preds = %115
%119 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%120 = icmp ne i64 %119, 0
br i1 %120, label %121, label %125
121: ; preds = %118
%122 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%123 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%124 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %123)
br label %189
125: ; preds = %118, %115
%126 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%127 = icmp ne i64 %126, 0
br i1 %127, label %128, label %135
128: ; preds = %125
%129 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %135
131: ; preds = %128
%132 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%133 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%134 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %133)
br label %188
135: ; preds = %128, %125
%136 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%137 = icmp ne i64 %136, 0
br i1 %137, label %138, label %145
138: ; preds = %135
%139 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %145
141: ; preds = %138
%142 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%143 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%144 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %143)
br label %187
145: ; preds = %138, %135
%146 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
%147 = icmp ne i64 %146, 0
br i1 %147, label %148, label %155
148: ; preds = %145
%149 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%150 = icmp ne i64 %149, 0
br i1 %150, label %151, label %155
151: ; preds = %148
%152 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%153 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%154 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %153)
br label %186
155: ; preds = %148, %145
%156 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%157 = icmp ne i64 %156, 0
br i1 %157, label %158, label %183
158: ; preds = %155
%159 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%160 = icmp ne i64 %159, 0
br i1 %160, label %161, label %183
161: ; preds = %158
%162 = call i32* @getMajorMinorPatch(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
store i32* %162, i32** %3
%163 = icmp ne i32* %162, null
br i1 %163, label %164, label %183
164: ; preds = %161
%165 = load i32*, i32** %3
%166 = getelementptr inbounds i32, i32* %165, i64 0
%167 = load i32, i32* %166
%168 = icmp slt i32 %167, 3
br i1 %168, label %179, label %169
169: ; preds = %164
%170 = load i32*, i32** %3
%171 = getelementptr inbounds i32, i32* %170, i64 0
%172 = load i32, i32* %171
%173 = icmp eq i32 %172, 3
br i1 %173, label %174, label %183
174: ; preds = %169
%175 = load i32*, i32** %3
%176 = getelementptr inbounds i32, i32* %175, i64 1
%177 = load i32, i32* %176
%178 = icmp sle i32 %177, 6
br i1 %178, label %179, label %183
179: ; preds = %174, %164
%180 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
%181 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%182 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %181)
br label %185
183: ; preds = %174, %169, %161, %158, %155
%184 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %185
185: ; preds = %183, %179
br label %186
186: ; preds = %185, %151
br label %187
187: ; preds = %186, %141
br label %188
188: ; preds = %187, %131
br label %189
189: ; preds = %188, %121
br label %190
190: ; preds = %189, %111
br label %191
191: ; preds = %190, %101
br label %192
192: ; preds = %191, %91
br label %193
193: ; preds = %192, %81
br label %194
194: ; preds = %193, %71
br label %195
195: ; preds = %194, %61
br label %196
196: ; preds = %195, %51
br label %197
197: ; preds = %196, %44
br label %198
198: ; preds = %197, %0
%199 = call i64 @strlen(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%200 = icmp ne i64 %199, 0
br i1 %200, label %201, label %202
201: ; preds = %198
store i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8** %1
br label %203
202: ; preds = %198
store i8* null, i8** %1
br label %203
203: ; preds = %202, %201, %26
%204 = load i8*, i8** %1
ret i8* %204
}

LLVM IR (-O2):
@terminalName.lTerminalName = internal global [128 x i8] c"*\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [5 x i8] c"bash\00"
@.str.1 = [9 x i8] c"bash -c \00"
@.str.2 = [7 x i8] c"sh -c \00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [19 x i8] c"/opt/X11/bin/xterm\00"
@.str.5 = [58 x i8] c" -fa 'DejaVu Sans Mono' -fs 10 -title tinyfiledialogs -e \00"
@.str.6 = [6 x i8] c"xterm\00"
@.str.7 = [11 x i8] c"terminator\00"
@.str.8 = [5 x i8] c" -x \00"
@.str.9 = [11 x i8] c"lxterminal\00"
@.str.10 = [5 x i8] c" -e \00"
@.str.11 = [8 x i8] c"konsole\00"
@.str.12 = [6 x i8] c"kterm\00"
@.str.13 = [6 x i8] c"tilix\00"
@.str.14 = [15 x i8] c"xfce4-terminal\00"
@.str.15 = [14 x i8] c"mate-terminal\00"
@.str.16 = [6 x i8] c"Eterm\00"
@.str.17 = [8 x i8] c"evilvte\00"
@.str.18 = [6 x i8] c"pterm\00"
@.str.19 = [15 x i8] c"gnome-terminal\00"
@.str.20 = [23 x i8] c" --disable-factory -x \00"
define i8* @terminalName() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
store i8 42, i8* %2
%3 = load i8, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0)
%4 = icmp eq i8 %3, 42
br i1 %4, label %5, label %155
5: ; preds = %0
%6 = tail call i64 @detectPresence(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = tail call i8* (...) @dialogNameOnly()
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = tail call i64 (...) @whiptailPresentOnly()
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %159
17: ; preds = %8, %12, %5
%18 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %5 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %12 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %8 ]
%19 = call i64 @strcpy(i8* %2, i8* %18)
%20 = call i64 (...) @isDarwin()
%21 = icmp eq i64 %20, 0
br i1 %21, label %33, label %22
22: ; preds = %17
%23 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %31, label %25
25: ; preds = %22
%26 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %31, label %28
28: ; preds = %25
%29 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
31: ; preds = %25, %22
%32 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %155
33: ; preds = %17
%34 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %42, label %36
36: ; preds = %33
%37 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %36
%40 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%41 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
42: ; preds = %36, %33
%43 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %51, label %45
45: ; preds = %42
%46 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %51, label %48
48: ; preds = %45
%49 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%50 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
51: ; preds = %45, %42
%52 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %60, label %54
54: ; preds = %51
%55 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %54
%58 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
60: ; preds = %54, %51
%61 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %69, label %63
63: ; preds = %60
%64 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %69, label %66
66: ; preds = %63
%67 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%68 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
69: ; preds = %63, %60
%70 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %78, label %72
72: ; preds = %69
%73 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %78, label %75
75: ; preds = %72
%76 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%77 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
78: ; preds = %72, %69
%79 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
%80 = icmp eq i64 %79, 0
br i1 %80, label %87, label %81
81: ; preds = %78
%82 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %87, label %84
84: ; preds = %81
%85 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%86 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
87: ; preds = %81, %78
%88 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %96, label %90
90: ; preds = %87
%91 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%92 = icmp eq i64 %91, 0
br i1 %92, label %96, label %93
93: ; preds = %90
%94 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%95 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
96: ; preds = %90, %87
%97 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %105, label %99
99: ; preds = %96
%100 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%101 = icmp eq i64 %100, 0
br i1 %101, label %105, label %102
102: ; preds = %99
%103 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%104 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
105: ; preds = %99, %96
%106 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
%107 = icmp eq i64 %106, 0
br i1 %107, label %114, label %108
108: ; preds = %105
%109 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %114, label %111
111: ; preds = %108
%112 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%113 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
114: ; preds = %108, %105
%115 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
br i1 %116, label %123, label %117
117: ; preds = %114
%118 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%119 = icmp eq i64 %118, 0
br i1 %119, label %123, label %120
120: ; preds = %117
%121 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%122 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
123: ; preds = %117, %114
%124 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0))
%125 = icmp eq i64 %124, 0
br i1 %125, label %132, label %126
126: ; preds = %123
%127 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%128 = icmp eq i64 %127, 0
br i1 %128, label %132, label %129
129: ; preds = %126
%130 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%131 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
132: ; preds = %126, %123
%133 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%134 = icmp eq i64 %133, 0
br i1 %134, label %153, label %135
135: ; preds = %132
%136 = call i64 @detectPresence(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%137 = icmp eq i64 %136, 0
br i1 %137, label %153, label %138
138: ; preds = %135
%139 = call i32* @getMajorMinorPatch(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0))
%140 = icmp eq i32* %139, null
br i1 %140, label %153, label %141
141: ; preds = %138
%142 = load i32, i32* %139
%143 = icmp slt i32 %142, 3
br i1 %143, label %150, label %144
144: ; preds = %141
%145 = icmp eq i32 %142, 3
br i1 %145, label %146, label %153
146: ; preds = %144
%147 = getelementptr inbounds i32, i32* %139, i64 1
%148 = load i32, i32* %147
%149 = icmp slt i32 %148, 7
br i1 %149, label %150, label %153
150: ; preds = %146, %141
%151 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0))
%152 = call i32 @strcat(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* %2)
br label %155
153: ; preds = %146, %144, %138, %135, %132
%154 = call i64 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %155
155: ; preds = %31, %28, %48, %66, %84, %102, %120, %150, %153, %129, %111, %93, %75, %57, %39, %0
%156 = load i8, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0)
%157 = icmp eq i8 %156, 0
%158 = select i1 %157, i8* null, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @terminalName.lTerminalName, i64 0, i64 0)
br label %159
159: ; preds = %155, %15
%160 = phi i8* [ null, %15 ], [ %158, %155 ]
ret i8* %160
}