#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 */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_hour;
  int tm_min;
  int tm_sec;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct sockaddr {
  int dummy;
};
struct addrinfo {
  int /*<<< orphan*/ ai_addrlen;
  int /*<<< orphan*/ ai_addr;
  int /*<<< orphan*/ ai_protocol;
  int /*<<< orphan*/ ai_socktype;
  int /*<<< orphan*/ ai_family;
  struct addrinfo *ai_next;
  int /*<<< orphan*/ ai_flags;
};
typedef int socklen_t;
typedef scalar_t__ pid_t;
typedef int /*<<< orphan*/ name;
typedef int /*<<< orphan*/ hints;
typedef int /*<<< orphan*/ cli_addr;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AI_PASSIVE;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ LOG_INFO;
int O_APPEND;
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ STDOUT_FILENO;
int accept(int, struct sockaddr *, int *);
int bind(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup2(int, int /*<<< orphan*/);
int /*<<< orphan*/ execl(char *, char *, char *, char *, char *, char *, char *,
                         char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
scalar_t__ fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
scalar_t__ getaddrinfo(int /*<<< orphan*/ *, char *, struct addrinfo *,
                       struct addrinfo **);
int /*<<< orphan*/ getnameinfo(struct sockaddr *, int, char *, int,
                               int /*<<< orphan*/ *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int /*<<< orphan*/ inet_ntop(int /*<<< orphan*/, int /*<<< orphan*/ *, char *,
                             int);
int listen(int, int);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(struct addrinfo *, int /*<<< orphan*/, int);
int open(char *, int);
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ sleep(int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  FILE *logfile = NULL;
  struct sockaddr_in cli_addr;
  socklen_t addr_size;
  struct addrinfo hints, *res, *p;
  int sockfd, new_fd;
  memset(&hints, 0, sizeof(hints));
  hints.ai_family = AF_INET;
  hints.ai_socktype = SOCK_STREAM;
  hints.ai_flags = AI_PASSIVE;
  if (getaddrinfo(NULL, "62085", &hints, &res) != 0) {
    logfile = fopen("/var/log/delchef/delchef.log", "a");
    time_t ltime = time(NULL);
    struct tm *ctime = localtime(&ltime);
    fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
            ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour, ctime->tm_min,
            ctime->tm_sec);
    fprintf(logfile, "%s", "getaddrinfo() error");
    fprintf(logfile, "\n");
    fclose(logfile);
    syslog(LOG_ERR, "%s", "getaddrinfo() error");
    ;
    exit(1);
  }
  for (p = res; p != NULL; p = p->ai_next) {
    if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) {
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error creating socket");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error creating socket");
      ;
      continue;
    }
    int yes = 1;
    if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1) {
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error settings socket options");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error settings socket options");
      ;
      exit(1);
    }
    if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
      close(sockfd);
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error binding socket");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error binding socket");
      ;
      continue;
    }
    break;
  }
  if (p == NULL) {
    close(sockfd);
    logfile = fopen("/var/log/delchef/delchef.log", "a");
    time_t ltime = time(NULL);
    struct tm *ctime = localtime(&ltime);
    fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
            ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour, ctime->tm_min,
            ctime->tm_sec);
    fprintf(logfile, "%s", "Error binding socket");
    fprintf(logfile, "\n");
    fclose(logfile);
    syslog(LOG_ERR, "%s", "Error binding socket");
    ;
    exit(1);
  }
  freeaddrinfo(res);
  if (listen(sockfd, 10) == -1) {
    close(sockfd);
    logfile = fopen("/var/log/delchef/delchef.log", "a");
    time_t ltime = time(NULL);
    struct tm *ctime = localtime(&ltime);
    fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
            ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour, ctime->tm_min,
            ctime->tm_sec);
    fprintf(logfile, "%s", "Error listening");
    fprintf(logfile, "\n");
    fclose(logfile);
    syslog(LOG_ERR, "%s", "Error listening");
    ;
    exit(1);
  }
  logfile = fopen("/var/log/delchef/delchef.log", "a");
  time_t ltime = time(NULL);
  struct tm *ctime = localtime(&ltime);
  fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
          ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour, ctime->tm_min,
          ctime->tm_sec);
  fprintf(logfile, "%s", "Waiting for connections");
  fprintf(logfile, "\n");
  fclose(logfile);
  syslog(LOG_INFO, "%s", "Waiting for connections");
  ;
  addr_size = sizeof(cli_addr);
  char name[100];
  char ip[INET_ADDRSTRLEN];
  while (1) {
    if (new_fd =
            accept(sockfd, (struct sockaddr *)&cli_addr, &addr_size) == -1) {
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error accepting connection");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error accepting connection");
      ;
      continue;
    }
    inet_ntop(AF_INET, &(cli_addr.sin_addr), ip, INET_ADDRSTRLEN);
    close(new_fd);
    getnameinfo((struct sockaddr *)&cli_addr, sizeof(cli_addr), name,
                sizeof(name), NULL, 0, 0);
    logfile = fopen("/var/log/delchef/delchef.log", "a");
    time_t ltime = time(NULL);
    struct tm *ctime = localtime(&ltime);
    fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
            ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour, ctime->tm_min,
            ctime->tm_sec);
    fprintf(logfile, "Received connection from %s [%s]", ip, name);
    fprintf(logfile, "\n");
    fclose(logfile);
    syslog(LOG_INFO, "Received connection from %s [%s]", ip, name);
    ;
    pid_t pid;
    pid = fork();
    if (pid == 0) {
      int out =
          open("/var/log/delchef/delchef.log", O_CREAT | O_RDWR | O_APPEND);
      if (out == -1) {
        logfile = fopen("/var/log/delchef/delchef.log", "a");
        time_t ltime = time(NULL);
        struct tm *ctime = localtime(&ltime);
        fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
                ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
                ctime->tm_min, ctime->tm_sec);
        fprintf(logfile, "%s", "Error opening log for child");
        fprintf(logfile, "\n");
        fclose(logfile);
        syslog(LOG_ERR, "%s", "Error opening log for child");
        ;
      }
      dup2(out, STDOUT_FILENO);
      dup2(out, STDERR_FILENO);
      close(out);
      execl("/usr/bin/knife", "/usr/bin/knife", "client", "delete", name, "-y",
            "-u", "delchef", "-k", "/etc/chef/delchef.pem", NULL);
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error executing execl()");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error executing execl()");
      ;
      exit(1);
    } else if (pid < 0) {
      logfile = fopen("/var/log/delchef/delchef.log", "a");
      time_t ltime = time(NULL);
      struct tm *ctime = localtime(&ltime);
      fprintf(logfile, "[%02d/%02d/%04d - %02d:%02d:%02d]: ", ctime->tm_mday,
              ctime->tm_mon, ctime->tm_year + 1900, ctime->tm_hour,
              ctime->tm_min, ctime->tm_sec);
      fprintf(logfile, "%s", "Error forking a new process");
      fprintf(logfile, "\n");
      fclose(logfile);
      syslog(LOG_ERR, "%s", "Error forking a new process");
      ;
      exit(1);
    }
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x1d8,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x58(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1080 <memset@plt>
mov    0x3d17(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
mov    0x3cfb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    0x3d07(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0x1d2f(%rip),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x60(%rbp),%rcx
call   1140 <getaddrinfo@plt>
cmp    $0x0,%rax
je     13c9 <main+0x159>
lea    0x1d17(%rip),%rdi
lea    0x1d2d(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x74(%rbp)
lea    -0x74(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x80(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x80(%rbp),%rax
mov    (%rax),%edx
mov    -0x80(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x80(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x80(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x80(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x80(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1ccf(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1cd1(%rip),%rsi
lea    0x1ccd(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1ccf(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x3bd8(%rip),%rax
mov    (%rax),%edi
lea    0x1c98(%rip),%rsi
lea    0x1c94(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
mov    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
je     1762 <main+0x4f2>
mov    -0x68(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x68(%rbp),%rax
mov    0xc(%rax),%esi
mov    -0x68(%rbp),%rax
mov    0x8(%rax),%edx
call   1190 <socket@plt>
mov    %eax,-0x6c(%rbp)
cmp    $0xffffffff,%eax
jne    14f9 <main+0x289>
lea    0x1bfd(%rip),%rdi
lea    0x1c13(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x84(%rbp)
lea    -0x84(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x90(%rbp),%rax
mov    (%rax),%edx
mov    -0x90(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x90(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x90(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x90(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x90(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1b9a(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1b9c(%rip),%rsi
lea    0x1bae(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1b9a(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x3aa3(%rip),%rax
mov    (%rax),%edi
lea    0x1b63(%rip),%rsi
lea    0x1b75(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
jmp    1751 <main+0x4e1>
movl   $0x1,-0x94(%rbp)
mov    -0x6c(%rbp),%edi
mov    0x3ac3(%rip),%rax
mov    (%rax),%esi
mov    0x3a82(%rip),%rax
mov    (%rax),%edx
lea    -0x94(%rbp),%rcx
mov    $0x4,%r8d
call   1050 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    162f <main+0x3bf>
lea    0x1acc(%rip),%rdi
lea    0x1ae2(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x98(%rbp)
lea    -0x98(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xa0(%rbp),%rax
mov    (%rax),%edx
mov    -0xa0(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0xa0(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0xa0(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0xa0(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0xa0(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1a69(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1a6b(%rip),%rsi
lea    0x1a93(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1a69(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x3972(%rip),%rax
mov    (%rax),%edi
lea    0x1a32(%rip),%rsi
lea    0x1a5a(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
mov    -0x6c(%rbp),%edi
mov    -0x68(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x68(%rbp),%rax
mov    (%rax),%edx
call   10f0 <bind@plt>
cmp    $0xffffffff,%eax
jne    174c <main+0x4dc>
mov    -0x6c(%rbp),%edi
call   1090 <close@plt>
lea    0x19aa(%rip),%rdi
lea    0x19c0(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa4(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xb0(%rbp),%rax
mov    (%rax),%edx
mov    -0xb0(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0xb0(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0xb0(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0xb0(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0xb0(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1947(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1949(%rip),%rsi
lea    0x198f(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1947(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x3850(%rip),%rax
mov    (%rax),%edi
lea    0x1910(%rip),%rsi
lea    0x1956(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
jmp    1751 <main+0x4e1>
jmp    1762 <main+0x4f2>
mov    -0x68(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x68(%rbp)
jmp    13d1 <main+0x161>
cmpq   $0x0,-0x68(%rbp)
jne    1871 <main+0x601>
mov    -0x6c(%rbp),%edi
call   1090 <close@plt>
lea    0x188a(%rip),%rdi
lea    0x18a0(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0xb4(%rbp)
lea    -0xb4(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0xc0(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xc0(%rbp),%rax
mov    (%rax),%edx
mov    -0xc0(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0xc0(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0xc0(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0xc0(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0xc0(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1827(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1829(%rip),%rsi
lea    0x186f(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1827(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x3730(%rip),%rax
mov    (%rax),%edi
lea    0x17f0(%rip),%rsi
lea    0x1836(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
mov    -0x60(%rbp),%rdi
call   1180 <freeaddrinfo@plt>
mov    -0x6c(%rbp),%edi
mov    $0xa,%esi
call   10e0 <listen@plt>
cmp    $0xffffffff,%eax
jne    1994 <main+0x724>
mov    -0x6c(%rbp),%edi
call   1090 <close@plt>
lea    0x1767(%rip),%rdi
lea    0x177d(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0xc4(%rbp)
lea    -0xc4(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0xd0(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    (%rax),%edx
mov    -0xd0(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0xd0(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0xd0(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0xd0(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1704(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1706(%rip),%rsi
lea    0x1761(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1704(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x360d(%rip),%rax
mov    (%rax),%edi
lea    0x16cd(%rip),%rsi
lea    0x1728(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
lea    0x166b(%rip),%rdi
lea    0x1681(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,-0x1dc(%rbp)
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0xd4(%rbp)
lea    -0xd4(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,%rcx
mov    -0x1dc(%rbp),%eax
mov    %rcx,-0xe0(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0xe0(%rbp),%rsi
mov    (%rsi),%edx
mov    0x4(%rsi),%ecx
mov    0x8(%rsi),%r8d
add    $0x76c,%r8d
mov    0xc(%rsi),%r9d
mov    0x10(%rsi),%r10d
mov    0x14(%rsi),%r11d
sub    $0x10,%rsp
mov    %rsp,%rsi
mov    %r11d,0x8(%rsi)
mov    %r10d,(%rsi)
lea    0x160d(%rip),%rsi
mov    %al,-0x1c1(%rbp)
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x1c1(%rbp),%al
mov    -0x20(%rbp),%rdi
lea    0x1611(%rip),%rsi
mov    %rsi,-0x1d8(%rbp)
lea    0x1675(%rip),%rdx
mov    %rdx,-0x1d0(%rbp)
call   10b0 <fprintf@plt>
mov    -0x1c1(%rbp),%al
mov    -0x20(%rbp),%rdi
lea    0x15fd(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x1d8(%rbp),%rsi
mov    -0x1d0(%rbp),%rdx
mov    -0x1c1(%rbp),%al
mov    0x3504(%rip),%rcx
mov    (%rcx),%edi
call   10d0 <syslog@plt>
movl   $0x4,-0x2c(%rbp)
mov    0x3507(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x158(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x160(%rbp)
jmp    1ad4 <main+0x864>
mov    -0x6c(%rbp),%edi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
call   1120 <accept@plt>
cmp    $0xffffffff,%eax
sete   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x70(%rbp)
test   $0x1,%al
jne    1b02 <main+0x892>
jmp    1bf9 <main+0x989>
lea    0x14fd(%rip),%rdi
lea    0x1513(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x164(%rbp)
lea    -0x164(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x170(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x170(%rbp),%rax
mov    (%rax),%edx
mov    -0x170(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x170(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x170(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x170(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x170(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x149a(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x149c(%rip),%rsi
lea    0x151f(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x149a(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x33a3(%rip),%rax
mov    (%rax),%edi
lea    0x1463(%rip),%rsi
lea    0x14e6(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
jmp    1acf <main+0x85f>
mov    -0x1c0(%rbp),%rdx
mov    0x33b9(%rip),%rax
mov    (%rax),%edi
lea    -0x28(%rbp),%rsi
mov    0x3394(%rip),%rax
mov    (%rax),%ecx
call   1030 <inet_ntop@plt>
mov    -0x70(%rbp),%edi
call   1090 <close@plt>
lea    -0x28(%rbp),%rdi
lea    -0x150(%rbp),%rdx
mov    $0x4,%esi
mov    $0x64,%ecx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
sub    $0x10,%rsp
movl   $0x0,(%rsp)
call   10a0 <getnameinfo@plt>
add    $0x10,%rsp
lea    0x13ab(%rip),%rdi
lea    0x13c1(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x174(%rbp)
lea    -0x174(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x180(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x180(%rbp),%rax
mov    (%rax),%edx
mov    -0x180(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x180(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x180(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x180(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x180(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1348(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x1c0(%rbp),%rdx
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    -0x150(%rbp),%rcx
lea    0x13e1(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1341(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x1c0(%rbp),%rdx
mov    0x3253(%rip),%rax
mov    (%rax),%edi
lea    -0x150(%rbp),%rcx
lea    0x13a1(%rip),%rsi
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x0,%al
call   1170 <fork@plt>
mov    %rax,-0x188(%rbp)
cmpq   $0x0,-0x188(%rbp)
jne    2038 <main+0xdc8>
mov    0x3281(%rip),%rax
mov    (%rax),%esi
mov    0x3258(%rip),%rax
or     (%rax),%esi
mov    0x31ef(%rip),%rax
or     (%rax),%esi
lea    0x1274(%rip),%rdi
call   1100 <open@plt>
mov    %eax,-0x18c(%rbp)
cmpl   $0xffffffff,-0x18c(%rbp)
jne    1e9c <main+0xc2c>
lea    0x1255(%rip),%rdi
lea    0x126b(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x190(%rbp)
lea    -0x190(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x198(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x198(%rbp),%rax
mov    (%rax),%edx
mov    -0x198(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x198(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x198(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x198(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x198(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x11f2(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x11f4(%rip),%rsi
lea    0x12b3(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x11f2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x30fb(%rip),%rax
mov    (%rax),%edi
lea    0x11bb(%rip),%rsi
lea    0x127a(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    -0x18c(%rbp),%edi
mov    0x313f(%rip),%rax
mov    (%rax),%esi
call   1070 <dup2@plt>
mov    -0x18c(%rbp),%edi
mov    0x30e3(%rip),%rax
mov    (%rax),%esi
call   1070 <dup2@plt>
mov    -0x18c(%rbp),%edi
call   1090 <close@plt>
lea    -0x150(%rbp),%r8
lea    0x124e(%rip),%rsi
lea    0x1256(%rip),%rdx
lea    0x1256(%rip),%rcx
lea    0x1256(%rip),%r9
lea    0x1252(%rip),%rbx
lea    0x124e(%rip),%r11
lea    0x124f(%rip),%r10
lea    0x124b(%rip),%rax
xor    %edi,%edi
sub    $0x30,%rsp
mov    %rsi,%rdi
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
movq   $0x0,0x20(%rsp)
call   1150 <execl@plt>
add    $0x30,%rsp
lea    0x10c3(%rip),%rdi
lea    0x10d9(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x19c(%rbp)
lea    -0x19c(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x1a8(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x1a8(%rbp),%rax
mov    (%rax),%edx
mov    -0x1a8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x1a8(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x1a8(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x1a8(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x1a8(%rbp),%rax
mov    0x14(%rax),%eax
lea    0x1060(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0x1062(%rip),%rsi
lea    0x1181(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0x1060(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x2f69(%rip),%rax
mov    (%rax),%edi
lea    0x1029(%rip),%rsi
lea    0x1148(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
cmpq   $0x0,-0x188(%rbp)
jge    2142 <main+0xed2>
lea    0xfb9(%rip),%rdi
lea    0xfcf(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,-0x1ac(%rbp)
lea    -0x1ac(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x1b8(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x1b8(%rbp),%rax
mov    (%rax),%edx
mov    -0x1b8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x1b8(%rbp),%rax
mov    0x8(%rax),%r8d
add    $0x76c,%r8d
mov    -0x1b8(%rbp),%rax
mov    0xc(%rax),%r9d
mov    -0x1b8(%rbp),%rax
mov    0x10(%rax),%r10d
mov    -0x1b8(%rbp),%rax
mov    0x14(%rax),%eax
lea    0xf56(%rip),%rsi
sub    $0x10,%rsp
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   10b0 <fprintf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rdi
lea    0xf58(%rip),%rsi
lea    0x108f(%rip),%rdx
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
lea    0xf56(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
call   1060 <fclose@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xf1f(%rip),%rsi
lea    0x1056(%rip),%rdx
mov    $0x0,%al
call   10d0 <syslog@plt>
mov    $0x1,%edi
call   1130 <exit@plt>
jmp    2147 <main+0xed7>
mov    $0x1,%edi
call   1160 <sleep@plt>
jmp    1acf <main+0x85f>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
lea    -0xe8(%rbp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1080 <memset@plt>
mov    0x2cff(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xd8(%rbp)
mov    0x2ce0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xdc(%rbp)
mov    0x2ce9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc8(%rbp)
lea    0xd12(%rip),%rsi
lea    -0x48(%rbp),%rcx
xor    %edi,%edi
mov    %rbx,%rdx
call   1160 <getaddrinfo@plt>
test   %rax,%rax
jne    14f5 <main+0x265>
mov    -0x48(%rbp),%r14
mov    0x2c70(%rip),%r12
jmp    13d8 <main+0x148>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xcdf(%rip),%rdi
lea    0xcf5(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0xc0(%rbp)
lea    -0xc0(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
mov    $0x76c,%esi
add    %esi,%r8d
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
mov    %rbx,%rdi
lea    0xcaf(%rip),%rsi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
mov    $0x15,%esi
mov    $0x1,%edx
lea    0xcca(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   10b0 <fputc@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    (%r12),%edi
lea    0xc88(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10e0 <syslog@plt>
mov    0x18(%r14),%r14
test   %r14,%r14
je     1597 <main+0x307>
mov    0x10(%r14),%edi
mov    0x8(%r14),%edx
mov    0xc(%r14),%esi
call   11b0 <socket@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     1320 <main+0x90>
movl   $0x1,-0xc0(%rbp)
mov    0x2bca(%rip),%rax
mov    (%rax),%esi
mov    0x2b89(%rip),%rax
mov    (%rax),%edx
mov    %r13d,%edi
lea    -0xc0(%rbp),%rcx
mov    $0x4,%r8d
call   1050 <setsockopt@plt>
cmp    $0xffffffff,%eax
je     1613 <main+0x383>
mov    (%r14),%edx
mov    0x4(%r14),%esi
mov    %r13d,%edi
call   1100 <bind@plt>
cmp    $0xffffffff,%eax
jne    1681 <main+0x3f1>
mov    %r13d,%edi
call   1090 <close@plt>
lea    0xbb0(%rip),%rdi
lea    0xbc6(%rip),%rsi
call   1120 <fopen@plt>
mov    %r12,%r15
mov    %rax,%r12
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
mov    $0x76c,%esi
add    %esi,%r8d
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%ebx
mov    %r12,%rdi
lea    0xb84(%rip),%rsi
xor    %eax,%eax
push   %rbx
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
mov    $0x14,%esi
mov    $0x1,%edx
lea    0xbd4(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   10b0 <fputc@plt>
mov    %r12,%rdi
mov    %r15,%r12
call   1060 <fclose@plt>
mov    (%r15),%edi
lea    0xb5c(%rip),%rsi
mov    %rbx,%rdx
jmp    13c4 <main+0x134>
lea    0xb0a(%rip),%rdi
lea    0xb20(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0xc0(%rbp)
lea    -0xc0(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0xadf(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0xaed(%rip),%r14
mov    $0x13,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   10b0 <fputc@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    0x29f0(%rip),%rax
mov    (%rax),%edi
jmp    1bc6 <main+0x936>
mov    %r13d,%edi
call   1090 <close@plt>
lea    0xa60(%rip),%rdi
lea    0xa76(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0xc0(%rbp)
lea    -0xc0(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0xa35(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0xa8b(%rip),%r14
mov    $0x14,%esi
jmp    1b9d <main+0x90d>
lea    0x9ec(%rip),%rdi
lea    0xa02(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0x9c7(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x9ff(%rip),%r14
mov    $0x1d,%esi
jmp    1b9d <main+0x90d>
mov    -0x48(%rbp),%rdi
call   11a0 <freeaddrinfo@plt>
mov    %r13d,%edi
mov    $0xa,%esi
call   10f0 <listen@plt>
cmp    $0xffffffff,%eax
jne    1718 <main+0x488>
mov    %r13d,%edi
call   1090 <close@plt>
lea    0x95b(%rip),%rdi
lea    0x971(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0xc0(%rbp)
lea    -0xc0(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0x930(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x99b(%rip),%r14
mov    $0xf,%esi
jmp    1b9d <main+0x90d>
lea    0x8e7(%rip),%rdi
lea    0x8fd(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%r14
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x3c(%rbp)
lea    -0x3c(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    $0x76c,%esi
mov    0x8(%rax),%r8d
add    %esi,%r8d
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%ebx
lea    0x8c1(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
push   %rbx
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x93d(%rip),%rbx
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   10b0 <fputc@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    0x27e3(%rip),%rax
mov    (%rax),%edi
lea    0x893(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <syslog@plt>
movl   $0x4,-0x40(%rbp)
mov    0x27da(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
lea    -0x30(%rbp),%r14
mov    -0x50(%rbp),%r15
jmp    18a8 <main+0x618>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x7ff(%rip),%rdi
lea    0x815(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%r12
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
mov    $0x76c,%esi
add    %esi,%r8d
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%ebx
mov    %r12,%rdi
lea    0x7d6(%rip),%rsi
xor    %eax,%eax
push   %rbx
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
mov    $0x1a,%esi
mov    $0x1,%edx
lea    0x863(%rip),%rbx
mov    %rbx,%rdi
mov    %r12,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   10b0 <fputc@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    0x26eb(%rip),%rax
mov    (%rax),%edi
lea    0x7ab(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <syslog@plt>
mov    %r13d,%edi
mov    %r14,%rsi
lea    -0x40(%rbp),%rdx
call   1130 <accept@plt>
cmp    $0xffffffff,%eax
je     1800 <main+0x570>
mov    0x26f9(%rip),%rax
mov    (%rax),%edi
mov    0x26d8(%rip),%rax
mov    (%rax),%ecx
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <inet_ntop@plt>
xor    %edi,%edi
call   1090 <close@plt>
sub    $0x8,%rsp
mov    %r14,%rdi
mov    $0x4,%esi
lea    -0xc0(%rbp),%r14
mov    %r14,%rdx
mov    $0x64,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
call   10a0 <getnameinfo@plt>
add    $0x10,%rsp
lea    0x6ef(%rip),%rdi
lea    0x705(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%r12
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
mov    0x8(%rax),%r8d
mov    $0x76c,%esi
add    %esi,%r8d
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%ebx
mov    %r12,%rdi
lea    0x6c6(%rip),%rsi
xor    %eax,%eax
push   %rbx
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
mov    %r12,%rdi
lea    0x775(%rip),%rbx
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10c0 <fprintf@plt>
mov    $0xa,%edi
mov    %r12,%rsi
call   10b0 <fputc@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    0x25ed(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   10e0 <syslog@plt>
xor    %eax,%eax
call   1190 <fork@plt>
test   %rax,%rax
je     19da <main+0x74a>
js     1be1 <main+0x951>
mov    $0x1,%edi
call   1180 <sleep@plt>
lea    -0x30(%rbp),%r14
jmp    18a8 <main+0x618>
mov    0x2617(%rip),%rax
mov    0x25f0(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2585(%rip),%rax
or     (%rax),%esi
lea    0x60a(%rip),%rdi
call   1110 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
mov    0x2573(%rip),%r12
jne    1ab6 <main+0x826>
lea    0x5ec(%rip),%rdi
lea    0x602(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%r14
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x34(%rbp)
lea    -0x34(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0x5c7(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x696(%rip),%r15
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %r15,%rdi
mov    %r14,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   10b0 <fputc@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
mov    (%r12),%edi
lea    0x59d(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   10e0 <syslog@plt>
mov    0x252b(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1070 <dup2@plt>
mov    0x24d3(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1070 <dup2@plt>
mov    %ebx,%edi
call   1090 <close@plt>
sub    $0x8,%rsp
lea    0x66f(%rip),%rax
lea    0x665(%rip),%rbx
lea    0x656(%rip),%r10
lea    0x64c(%rip),%r11
lea    0x625(%rip),%rdi
lea    0x62d(%rip),%rdx
lea    0x62d(%rip),%rcx
lea    0x62d(%rip),%r9
lea    -0xc0(%rbp),%r8
mov    %rdi,%rsi
push   $0x0
push   %rax
push   %rbx
push   %r10
push   %r11
call   1170 <execl@plt>
add    $0x30,%rsp
lea    0x4cb(%rip),%rdi
lea    0x4e1(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x34(%rbp)
lea    -0x34(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0x4a6(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x5d5(%rip),%r14
mov    $0x17,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   1150 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   10b0 <fputc@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    (%r12),%edi
lea    0x47c(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10e0 <syslog@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    0x41e(%rip),%rdi
lea    0x434(%rip),%rsi
call   1120 <fopen@plt>
mov    %rax,%rbx
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,-0x34(%rbp)
lea    -0x34(%rbp),%rdi
call   1040 <localtime@plt>
mov    (%rax),%edx
mov    $0x76c,%r8d
add    0x8(%rax),%r8d
mov    0x4(%rax),%ecx
mov    0xc(%rax),%r9d
mov    0x10(%rax),%r10d
mov    0x14(%rax),%r11d
lea    0x3f9(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
push   %r11
push   %r10
call   10c0 <fprintf@plt>
add    $0x10,%rsp
lea    0x540(%rip),%r14
mov    $0x1b,%esi
jmp    1564 <main+0x2d4>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo*, i32 }
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@AI_PASSIVE = global i32 0
@.str = [6 x i8] c"62085\00"
@.str.1 = [29 x i8] c"/var/log/delchef/delchef.log\00"
@.str.2 = [2 x i8] c"a\00"
@.str.3 = [36 x i8] c"[%02d/%02d/%04d - %02d:%02d:%02d]: \00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [20 x i8] c"getaddrinfo() error\00"
@.str.6 = [2 x i8] c"\0A\00"
@LOG_ERR = global i32 0
@.str.7 = [22 x i8] c"Error creating socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.8 = [30 x i8] c"Error settings socket options\00"
@.str.9 = [21 x i8] c"Error binding socket\00"
@.str.10 = [16 x i8] c"Error listening\00"
@.str.11 = [24 x i8] c"Waiting for connections\00"
@LOG_INFO = global i32 0
@INET_ADDRSTRLEN = global i32 0
@.str.12 = [27 x i8] c"Error accepting connection\00"
@.str.13 = [33 x i8] c"Received connection from %s [%s]\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@O_APPEND = global i32 0
@.str.14 = [28 x i8] c"Error opening log for child\00"
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
@.str.15 = [15 x i8] c"/usr/bin/knife\00"
@.str.16 = [7 x i8] c"client\00"
@.str.17 = [7 x i8] c"delete\00"
@.str.18 = [3 x i8] c"-y\00"
@.str.19 = [3 x i8] c"-u\00"
@.str.20 = [8 x i8] c"delchef\00"
@.str.21 = [3 x i8] c"-k\00"
@.str.22 = [22 x i8] c"/etc/chef/delchef.pem\00"
@.str.23 = [24 x i8] c"Error executing execl()\00"
@.str.24 = [28 x i8] c"Error forking a new process\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca %struct.sockaddr_in
%8 = alloca i32
%9 = alloca %struct.addrinfo
%10 = alloca %struct.addrinfo*
%11 = alloca %struct.addrinfo*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca %struct.tm*
%16 = alloca i32
%17 = alloca %struct.tm*
%18 = alloca i32
%19 = alloca i32
%20 = alloca %struct.tm*
%21 = alloca i32
%22 = alloca %struct.tm*
%23 = alloca i32
%24 = alloca %struct.tm*
%25 = alloca i32
%26 = alloca %struct.tm*
%27 = alloca i32
%28 = alloca %struct.tm*
%29 = alloca [100 x i8]
%30 = alloca i8*
%31 = alloca i64
%32 = alloca i32
%33 = alloca %struct.tm*
%34 = alloca i32
%35 = alloca %struct.tm*
%36 = alloca i64
%37 = alloca i32
%38 = alloca i32
%39 = alloca %struct.tm*
%40 = alloca i32
%41 = alloca %struct.tm*
%42 = alloca i32
%43 = alloca %struct.tm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
%44 = call i32 @memset(%struct.addrinfo* %9, i32 0, i32 40)
%45 = load i32, i32* @AF_INET
%46 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 4
store i32 %45, i32* %46
%47 = load i32, i32* @SOCK_STREAM
%48 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 3
store i32 %47, i32* %48
%49 = load i32, i32* @AI_PASSIVE
%50 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %9, i32 0, i32 6
store i32 %49, i32* %50
%51 = call i64 @getaddrinfo(i32* null, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.addrinfo* %9, %struct.addrinfo** %10)
%52 = icmp ne i64 %51, 0
br i1 %52, label %53, label %87
53: ; preds = %2
%54 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %54, i32** %6
%55 = call i32 @time(i32* null)
store i32 %55, i32* %14
%56 = call %struct.tm* @localtime(i32* %14)
store %struct.tm* %56, %struct.tm** %15
%57 = load i32*, i32** %6
%58 = load %struct.tm*, %struct.tm** %15
%59 = getelementptr inbounds %struct.tm, %struct.tm* %58, i32 0, i32 0
%60 = load i32, i32* %59
%61 = load %struct.tm*, %struct.tm** %15
%62 = getelementptr inbounds %struct.tm, %struct.tm* %61, i32 0, i32 1
%63 = load i32, i32* %62
%64 = load %struct.tm*, %struct.tm** %15
%65 = getelementptr inbounds %struct.tm, %struct.tm* %64, i32 0, i32 2
%66 = load i32, i32* %65
%67 = add nsw i32 %66, 1900
%68 = load %struct.tm*, %struct.tm** %15
%69 = getelementptr inbounds %struct.tm, %struct.tm* %68, i32 0, i32 3
%70 = load i32, i32* %69
%71 = load %struct.tm*, %struct.tm** %15
%72 = getelementptr inbounds %struct.tm, %struct.tm* %71, i32 0, i32 4
%73 = load i32, i32* %72
%74 = load %struct.tm*, %struct.tm** %15
%75 = getelementptr inbounds %struct.tm, %struct.tm* %74, i32 0, i32 5
%76 = load i32, i32* %75
%77 = call i32 (i32*, i8*, ...) @fprintf(i32* %57, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %60, i32 %63, i32 %67, i32 %70, i32 %73, i32 %76)
%78 = load i32*, i32** %6
%79 = call i32 (i32*, i8*, ...) @fprintf(i32* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%80 = load i32*, i32** %6
%81 = call i32 (i32*, i8*, ...) @fprintf(i32* %80, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%82 = load i32*, i32** %6
%83 = call i32 @fclose(i32* %82)
%84 = load i32, i32* @LOG_ERR
%85 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %84, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%86 = call i32 @exit(i32 1)
unreachable
87: ; preds = %2
%88 = load %struct.addrinfo*, %struct.addrinfo** %10
store %struct.addrinfo* %88, %struct.addrinfo** %11
br label %89
89: ; preds = %223, %87
%90 = load %struct.addrinfo*, %struct.addrinfo** %11
%91 = icmp ne %struct.addrinfo* %90, null
br i1 %91, label %92, label %227
92: ; preds = %89
%93 = load %struct.addrinfo*, %struct.addrinfo** %11
%94 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %93, i32 0, i32 4
%95 = load i32, i32* %94
%96 = load %struct.addrinfo*, %struct.addrinfo** %11
%97 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %96, i32 0, i32 3
%98 = load i32, i32* %97
%99 = load %struct.addrinfo*, %struct.addrinfo** %11
%100 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %99, i32 0, i32 2
%101 = load i32, i32* %100
%102 = call i32 @socket(i32 %95, i32 %98, i32 %101)
store i32 %102, i32* %12
%103 = icmp eq i32 %102, -1
br i1 %103, label %104, label %137
104: ; preds = %92
%105 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %105, i32** %6
%106 = call i32 @time(i32* null)
store i32 %106, i32* %16
%107 = call %struct.tm* @localtime(i32* %16)
store %struct.tm* %107, %struct.tm** %17
%108 = load i32*, i32** %6
%109 = load %struct.tm*, %struct.tm** %17
%110 = getelementptr inbounds %struct.tm, %struct.tm* %109, i32 0, i32 0
%111 = load i32, i32* %110
%112 = load %struct.tm*, %struct.tm** %17
%113 = getelementptr inbounds %struct.tm, %struct.tm* %112, i32 0, i32 1
%114 = load i32, i32* %113
%115 = load %struct.tm*, %struct.tm** %17
%116 = getelementptr inbounds %struct.tm, %struct.tm* %115, i32 0, i32 2
%117 = load i32, i32* %116
%118 = add nsw i32 %117, 1900
%119 = load %struct.tm*, %struct.tm** %17
%120 = getelementptr inbounds %struct.tm, %struct.tm* %119, i32 0, i32 3
%121 = load i32, i32* %120
%122 = load %struct.tm*, %struct.tm** %17
%123 = getelementptr inbounds %struct.tm, %struct.tm* %122, i32 0, i32 4
%124 = load i32, i32* %123
%125 = load %struct.tm*, %struct.tm** %17
%126 = getelementptr inbounds %struct.tm, %struct.tm* %125, i32 0, i32 5
%127 = load i32, i32* %126
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %108, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %111, i32 %114, i32 %118, i32 %121, i32 %124, i32 %127)
%129 = load i32*, i32** %6
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%131 = load i32*, i32** %6
%132 = call i32 (i32*, i8*, ...) @fprintf(i32* %131, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%133 = load i32*, i32** %6
%134 = call i32 @fclose(i32* %133)
%135 = load i32, i32* @LOG_ERR
%136 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %135, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
br label %223
137: ; preds = %92
store i32 1, i32* %18
%138 = load i32, i32* %12
%139 = load i32, i32* @SOL_SOCKET
%140 = load i32, i32* @SO_REUSEADDR
%141 = call i32 @setsockopt(i32 %138, i32 %139, i32 %140, i32* %18, i32 4)
%142 = icmp eq i32 %141, -1
br i1 %142, label %143, label %177
143: ; preds = %137
%144 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %144, i32** %6
%145 = call i32 @time(i32* null)
store i32 %145, i32* %19
%146 = call %struct.tm* @localtime(i32* %19)
store %struct.tm* %146, %struct.tm** %20
%147 = load i32*, i32** %6
%148 = load %struct.tm*, %struct.tm** %20
%149 = getelementptr inbounds %struct.tm, %struct.tm* %148, i32 0, i32 0
%150 = load i32, i32* %149
%151 = load %struct.tm*, %struct.tm** %20
%152 = getelementptr inbounds %struct.tm, %struct.tm* %151, i32 0, i32 1
%153 = load i32, i32* %152
%154 = load %struct.tm*, %struct.tm** %20
%155 = getelementptr inbounds %struct.tm, %struct.tm* %154, i32 0, i32 2
%156 = load i32, i32* %155
%157 = add nsw i32 %156, 1900
%158 = load %struct.tm*, %struct.tm** %20
%159 = getelementptr inbounds %struct.tm, %struct.tm* %158, i32 0, i32 3
%160 = load i32, i32* %159
%161 = load %struct.tm*, %struct.tm** %20
%162 = getelementptr inbounds %struct.tm, %struct.tm* %161, i32 0, i32 4
%163 = load i32, i32* %162
%164 = load %struct.tm*, %struct.tm** %20
%165 = getelementptr inbounds %struct.tm, %struct.tm* %164, i32 0, i32 5
%166 = load i32, i32* %165
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %147, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %150, i32 %153, i32 %157, i32 %160, i32 %163, i32 %166)
%168 = load i32*, i32** %6
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
%170 = load i32*, i32** %6
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%172 = load i32*, i32** %6
%173 = call i32 @fclose(i32* %172)
%174 = load i32, i32* @LOG_ERR
%175 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %174, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
%176 = call i32 @exit(i32 1)
unreachable
177: ; preds = %137
%178 = load i32, i32* %12
%179 = load %struct.addrinfo*, %struct.addrinfo** %11
%180 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %179, i32 0, i32 1
%181 = load i32, i32* %180
%182 = load %struct.addrinfo*, %struct.addrinfo** %11
%183 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %182, i32 0, i32 0
%184 = load i32, i32* %183
%185 = call i32 @bind(i32 %178, i32 %181, i32 %184)
%186 = icmp eq i32 %185, -1
br i1 %186, label %187, label %222
187: ; preds = %177
%188 = load i32, i32* %12
%189 = call i32 @close(i32 %188)
%190 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %190, i32** %6
%191 = call i32 @time(i32* null)
store i32 %191, i32* %21
%192 = call %struct.tm* @localtime(i32* %21)
store %struct.tm* %192, %struct.tm** %22
%193 = load i32*, i32** %6
%194 = load %struct.tm*, %struct.tm** %22
%195 = getelementptr inbounds %struct.tm, %struct.tm* %194, i32 0, i32 0
%196 = load i32, i32* %195
%197 = load %struct.tm*, %struct.tm** %22
%198 = getelementptr inbounds %struct.tm, %struct.tm* %197, i32 0, i32 1
%199 = load i32, i32* %198
%200 = load %struct.tm*, %struct.tm** %22
%201 = getelementptr inbounds %struct.tm, %struct.tm* %200, i32 0, i32 2
%202 = load i32, i32* %201
%203 = add nsw i32 %202, 1900
%204 = load %struct.tm*, %struct.tm** %22
%205 = getelementptr inbounds %struct.tm, %struct.tm* %204, i32 0, i32 3
%206 = load i32, i32* %205
%207 = load %struct.tm*, %struct.tm** %22
%208 = getelementptr inbounds %struct.tm, %struct.tm* %207, i32 0, i32 4
%209 = load i32, i32* %208
%210 = load %struct.tm*, %struct.tm** %22
%211 = getelementptr inbounds %struct.tm, %struct.tm* %210, i32 0, i32 5
%212 = load i32, i32* %211
%213 = call i32 (i32*, i8*, ...) @fprintf(i32* %193, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %196, i32 %199, i32 %203, i32 %206, i32 %209, i32 %212)
%214 = load i32*, i32** %6
%215 = call i32 (i32*, i8*, ...) @fprintf(i32* %214, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%216 = load i32*, i32** %6
%217 = call i32 (i32*, i8*, ...) @fprintf(i32* %216, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%218 = load i32*, i32** %6
%219 = call i32 @fclose(i32* %218)
%220 = load i32, i32* @LOG_ERR
%221 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %220, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
br label %223
222: ; preds = %177
br label %227
223: ; preds = %187, %104
%224 = load %struct.addrinfo*, %struct.addrinfo** %11
%225 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %224, i32 0, i32 5
%226 = load %struct.addrinfo*, %struct.addrinfo** %225
store %struct.addrinfo* %226, %struct.addrinfo** %11
br label %89
227: ; preds = %222, %89
%228 = load %struct.addrinfo*, %struct.addrinfo** %11
%229 = icmp eq %struct.addrinfo* %228, null
br i1 %229, label %230, label %266
230: ; preds = %227
%231 = load i32, i32* %12
%232 = call i32 @close(i32 %231)
%233 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %233, i32** %6
%234 = call i32 @time(i32* null)
store i32 %234, i32* %23
%235 = call %struct.tm* @localtime(i32* %23)
store %struct.tm* %235, %struct.tm** %24
%236 = load i32*, i32** %6
%237 = load %struct.tm*, %struct.tm** %24
%238 = getelementptr inbounds %struct.tm, %struct.tm* %237, i32 0, i32 0
%239 = load i32, i32* %238
%240 = load %struct.tm*, %struct.tm** %24
%241 = getelementptr inbounds %struct.tm, %struct.tm* %240, i32 0, i32 1
%242 = load i32, i32* %241
%243 = load %struct.tm*, %struct.tm** %24
%244 = getelementptr inbounds %struct.tm, %struct.tm* %243, i32 0, i32 2
%245 = load i32, i32* %244
%246 = add nsw i32 %245, 1900
%247 = load %struct.tm*, %struct.tm** %24
%248 = getelementptr inbounds %struct.tm, %struct.tm* %247, i32 0, i32 3
%249 = load i32, i32* %248
%250 = load %struct.tm*, %struct.tm** %24
%251 = getelementptr inbounds %struct.tm, %struct.tm* %250, i32 0, i32 4
%252 = load i32, i32* %251
%253 = load %struct.tm*, %struct.tm** %24
%254 = getelementptr inbounds %struct.tm, %struct.tm* %253, i32 0, i32 5
%255 = load i32, i32* %254
%256 = call i32 (i32*, i8*, ...) @fprintf(i32* %236, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %239, i32 %242, i32 %246, i32 %249, i32 %252, i32 %255)
%257 = load i32*, i32** %6
%258 = call i32 (i32*, i8*, ...) @fprintf(i32* %257, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%259 = load i32*, i32** %6
%260 = call i32 (i32*, i8*, ...) @fprintf(i32* %259, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%261 = load i32*, i32** %6
%262 = call i32 @fclose(i32* %261)
%263 = load i32, i32* @LOG_ERR
%264 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %263, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%265 = call i32 @exit(i32 1)
unreachable
266: ; preds = %227
%267 = load %struct.addrinfo*, %struct.addrinfo** %10
%268 = call i32 @freeaddrinfo(%struct.addrinfo* %267)
%269 = load i32, i32* %12
%270 = call i32 @listen(i32 %269, i32 10)
%271 = icmp eq i32 %270, -1
br i1 %271, label %272, label %308
272: ; preds = %266
%273 = load i32, i32* %12
%274 = call i32 @close(i32 %273)
%275 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %275, i32** %6
%276 = call i32 @time(i32* null)
store i32 %276, i32* %25
%277 = call %struct.tm* @localtime(i32* %25)
store %struct.tm* %277, %struct.tm** %26
%278 = load i32*, i32** %6
%279 = load %struct.tm*, %struct.tm** %26
%280 = getelementptr inbounds %struct.tm, %struct.tm* %279, i32 0, i32 0
%281 = load i32, i32* %280
%282 = load %struct.tm*, %struct.tm** %26
%283 = getelementptr inbounds %struct.tm, %struct.tm* %282, i32 0, i32 1
%284 = load i32, i32* %283
%285 = load %struct.tm*, %struct.tm** %26
%286 = getelementptr inbounds %struct.tm, %struct.tm* %285, i32 0, i32 2
%287 = load i32, i32* %286
%288 = add nsw i32 %287, 1900
%289 = load %struct.tm*, %struct.tm** %26
%290 = getelementptr inbounds %struct.tm, %struct.tm* %289, i32 0, i32 3
%291 = load i32, i32* %290
%292 = load %struct.tm*, %struct.tm** %26
%293 = getelementptr inbounds %struct.tm, %struct.tm* %292, i32 0, i32 4
%294 = load i32, i32* %293
%295 = load %struct.tm*, %struct.tm** %26
%296 = getelementptr inbounds %struct.tm, %struct.tm* %295, i32 0, i32 5
%297 = load i32, i32* %296
%298 = call i32 (i32*, i8*, ...) @fprintf(i32* %278, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %281, i32 %284, i32 %288, i32 %291, i32 %294, i32 %297)
%299 = load i32*, i32** %6
%300 = call i32 (i32*, i8*, ...) @fprintf(i32* %299, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%301 = load i32*, i32** %6
%302 = call i32 (i32*, i8*, ...) @fprintf(i32* %301, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%303 = load i32*, i32** %6
%304 = call i32 @fclose(i32* %303)
%305 = load i32, i32* @LOG_ERR
%306 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %305, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%307 = call i32 @exit(i32 1)
unreachable
308: ; preds = %266
%309 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %309, i32** %6
%310 = call i32 @time(i32* null)
store i32 %310, i32* %27
%311 = call %struct.tm* @localtime(i32* %27)
store %struct.tm* %311, %struct.tm** %28
%312 = load i32*, i32** %6
%313 = load %struct.tm*, %struct.tm** %28
%314 = getelementptr inbounds %struct.tm, %struct.tm* %313, i32 0, i32 0
%315 = load i32, i32* %314
%316 = load %struct.tm*, %struct.tm** %28
%317 = getelementptr inbounds %struct.tm, %struct.tm* %316, i32 0, i32 1
%318 = load i32, i32* %317
%319 = load %struct.tm*, %struct.tm** %28
%320 = getelementptr inbounds %struct.tm, %struct.tm* %319, i32 0, i32 2
%321 = load i32, i32* %320
%322 = add nsw i32 %321, 1900
%323 = load %struct.tm*, %struct.tm** %28
%324 = getelementptr inbounds %struct.tm, %struct.tm* %323, i32 0, i32 3
%325 = load i32, i32* %324
%326 = load %struct.tm*, %struct.tm** %28
%327 = getelementptr inbounds %struct.tm, %struct.tm* %326, i32 0, i32 4
%328 = load i32, i32* %327
%329 = load %struct.tm*, %struct.tm** %28
%330 = getelementptr inbounds %struct.tm, %struct.tm* %329, i32 0, i32 5
%331 = load i32, i32* %330
%332 = call i32 (i32*, i8*, ...) @fprintf(i32* %312, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %315, i32 %318, i32 %322, i32 %325, i32 %328, i32 %331)
%333 = load i32*, i32** %6
%334 = call i32 (i32*, i8*, ...) @fprintf(i32* %333, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%335 = load i32*, i32** %6
%336 = call i32 (i32*, i8*, ...) @fprintf(i32* %335, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%337 = load i32*, i32** %6
%338 = call i32 @fclose(i32* %337)
%339 = load i32, i32* @LOG_INFO
%340 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %339, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
store i32 4, i32* %8
%341 = load i32, i32* @INET_ADDRSTRLEN
%342 = zext i32 %341 to i64
%343 = call i8* @llvm.stacksave()
store i8* %343, i8** %30
%344 = alloca i8, i64 %342
store i64 %342, i64* %31
br label %345
345: ; preds = %556, %352, %308
br label %346
346: ; preds = %345
%347 = load i32, i32* %12
%348 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%349 = call i32 @accept(i32 %347, %struct.sockaddr* %348, i32* %8)
%350 = icmp eq i32 %349, -1
%351 = zext i1 %350 to i32
store i32 %351, i32* %13
br i1 %350, label %352, label %385
352: ; preds = %346
%353 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %353, i32** %6
%354 = call i32 @time(i32* null)
store i32 %354, i32* %32
%355 = call %struct.tm* @localtime(i32* %32)
store %struct.tm* %355, %struct.tm** %33
%356 = load i32*, i32** %6
%357 = load %struct.tm*, %struct.tm** %33
%358 = getelementptr inbounds %struct.tm, %struct.tm* %357, i32 0, i32 0
%359 = load i32, i32* %358
%360 = load %struct.tm*, %struct.tm** %33
%361 = getelementptr inbounds %struct.tm, %struct.tm* %360, i32 0, i32 1
%362 = load i32, i32* %361
%363 = load %struct.tm*, %struct.tm** %33
%364 = getelementptr inbounds %struct.tm, %struct.tm* %363, i32 0, i32 2
%365 = load i32, i32* %364
%366 = add nsw i32 %365, 1900
%367 = load %struct.tm*, %struct.tm** %33
%368 = getelementptr inbounds %struct.tm, %struct.tm* %367, i32 0, i32 3
%369 = load i32, i32* %368
%370 = load %struct.tm*, %struct.tm** %33
%371 = getelementptr inbounds %struct.tm, %struct.tm* %370, i32 0, i32 4
%372 = load i32, i32* %371
%373 = load %struct.tm*, %struct.tm** %33
%374 = getelementptr inbounds %struct.tm, %struct.tm* %373, i32 0, i32 5
%375 = load i32, i32* %374
%376 = call i32 (i32*, i8*, ...) @fprintf(i32* %356, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %359, i32 %362, i32 %366, i32 %369, i32 %372, i32 %375)
%377 = load i32*, i32** %6
%378 = call i32 (i32*, i8*, ...) @fprintf(i32* %377, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%379 = load i32*, i32** %6
%380 = call i32 (i32*, i8*, ...) @fprintf(i32* %379, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%381 = load i32*, i32** %6
%382 = call i32 @fclose(i32* %381)
%383 = load i32, i32* @LOG_ERR
%384 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %383, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
br label %345
385: ; preds = %346
%386 = load i32, i32* @AF_INET
%387 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
%388 = load i32, i32* @INET_ADDRSTRLEN
%389 = call i32 @inet_ntop(i32 %386, i32* %387, i8* %344, i32 %388)
%390 = load i32, i32* %13
%391 = call i32 @close(i32 %390)
%392 = bitcast %struct.sockaddr_in* %7 to %struct.sockaddr*
%393 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%394 = call i32 @getnameinfo(%struct.sockaddr* %392, i32 4, i8* %393, i32 100, i32* null, i32 0, i32 0)
%395 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %395, i32** %6
%396 = call i32 @time(i32* null)
store i32 %396, i32* %34
%397 = call %struct.tm* @localtime(i32* %34)
store %struct.tm* %397, %struct.tm** %35
%398 = load i32*, i32** %6
%399 = load %struct.tm*, %struct.tm** %35
%400 = getelementptr inbounds %struct.tm, %struct.tm* %399, i32 0, i32 0
%401 = load i32, i32* %400
%402 = load %struct.tm*, %struct.tm** %35
%403 = getelementptr inbounds %struct.tm, %struct.tm* %402, i32 0, i32 1
%404 = load i32, i32* %403
%405 = load %struct.tm*, %struct.tm** %35
%406 = getelementptr inbounds %struct.tm, %struct.tm* %405, i32 0, i32 2
%407 = load i32, i32* %406
%408 = add nsw i32 %407, 1900
%409 = load %struct.tm*, %struct.tm** %35
%410 = getelementptr inbounds %struct.tm, %struct.tm* %409, i32 0, i32 3
%411 = load i32, i32* %410
%412 = load %struct.tm*, %struct.tm** %35
%413 = getelementptr inbounds %struct.tm, %struct.tm* %412, i32 0, i32 4
%414 = load i32, i32* %413
%415 = load %struct.tm*, %struct.tm** %35
%416 = getelementptr inbounds %struct.tm, %struct.tm* %415, i32 0, i32 5
%417 = load i32, i32* %416
%418 = call i32 (i32*, i8*, ...) @fprintf(i32* %398, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %401, i32 %404, i32 %408, i32 %411, i32 %414, i32 %417)
%419 = load i32*, i32** %6
%420 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%421 = call i32 (i32*, i8*, ...) @fprintf(i32* %419, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i8* %344, i8* %420)
%422 = load i32*, i32** %6
%423 = call i32 (i32*, i8*, ...) @fprintf(i32* %422, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%424 = load i32*, i32** %6
%425 = call i32 @fclose(i32* %424)
%426 = load i32, i32* @LOG_INFO
%427 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%428 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %426, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i8* %344, i8* %427)
%429 = call i64 (...) @fork()
store i64 %429, i64* %36
%430 = load i64, i64* %36
%431 = icmp eq i64 %430, 0
br i1 %431, label %432, label %518
432: ; preds = %385
%433 = load i32, i32* @O_CREAT
%434 = load i32, i32* @O_RDWR
%435 = or i32 %433, %434
%436 = load i32, i32* @O_APPEND
%437 = or i32 %435, %436
%438 = call i32 @open(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %437)
store i32 %438, i32* %37
%439 = load i32, i32* %37
%440 = icmp eq i32 %439, -1
br i1 %440, label %441, label %474
441: ; preds = %432
%442 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %442, i32** %6
%443 = call i32 @time(i32* null)
store i32 %443, i32* %38
%444 = call %struct.tm* @localtime(i32* %38)
store %struct.tm* %444, %struct.tm** %39
%445 = load i32*, i32** %6
%446 = load %struct.tm*, %struct.tm** %39
%447 = getelementptr inbounds %struct.tm, %struct.tm* %446, i32 0, i32 0
%448 = load i32, i32* %447
%449 = load %struct.tm*, %struct.tm** %39
%450 = getelementptr inbounds %struct.tm, %struct.tm* %449, i32 0, i32 1
%451 = load i32, i32* %450
%452 = load %struct.tm*, %struct.tm** %39
%453 = getelementptr inbounds %struct.tm, %struct.tm* %452, i32 0, i32 2
%454 = load i32, i32* %453
%455 = add nsw i32 %454, 1900
%456 = load %struct.tm*, %struct.tm** %39
%457 = getelementptr inbounds %struct.tm, %struct.tm* %456, i32 0, i32 3
%458 = load i32, i32* %457
%459 = load %struct.tm*, %struct.tm** %39
%460 = getelementptr inbounds %struct.tm, %struct.tm* %459, i32 0, i32 4
%461 = load i32, i32* %460
%462 = load %struct.tm*, %struct.tm** %39
%463 = getelementptr inbounds %struct.tm, %struct.tm* %462, i32 0, i32 5
%464 = load i32, i32* %463
%465 = call i32 (i32*, i8*, ...) @fprintf(i32* %445, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %448, i32 %451, i32 %455, i32 %458, i32 %461, i32 %464)
%466 = load i32*, i32** %6
%467 = call i32 (i32*, i8*, ...) @fprintf(i32* %466, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
%468 = load i32*, i32** %6
%469 = call i32 (i32*, i8*, ...) @fprintf(i32* %468, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%470 = load i32*, i32** %6
%471 = call i32 @fclose(i32* %470)
%472 = load i32, i32* @LOG_ERR
%473 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %472, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
br label %474
474: ; preds = %441, %432
%475 = load i32, i32* %37
%476 = load i32, i32* @STDOUT_FILENO
%477 = call i32 @dup2(i32 %475, i32 %476)
%478 = load i32, i32* %37
%479 = load i32, i32* @STDERR_FILENO
%480 = call i32 @dup2(i32 %478, i32 %479)
%481 = load i32, i32* %37
%482 = call i32 @close(i32 %481)
%483 = getelementptr inbounds [100 x i8], [100 x i8]* %29, i64 0, i64 0
%484 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %483, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0), i32* null)
%485 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %485, i32** %6
%486 = call i32 @time(i32* null)
store i32 %486, i32* %40
%487 = call %struct.tm* @localtime(i32* %40)
store %struct.tm* %487, %struct.tm** %41
%488 = load i32*, i32** %6
%489 = load %struct.tm*, %struct.tm** %41
%490 = getelementptr inbounds %struct.tm, %struct.tm* %489, i32 0, i32 0
%491 = load i32, i32* %490
%492 = load %struct.tm*, %struct.tm** %41
%493 = getelementptr inbounds %struct.tm, %struct.tm* %492, i32 0, i32 1
%494 = load i32, i32* %493
%495 = load %struct.tm*, %struct.tm** %41
%496 = getelementptr inbounds %struct.tm, %struct.tm* %495, i32 0, i32 2
%497 = load i32, i32* %496
%498 = add nsw i32 %497, 1900
%499 = load %struct.tm*, %struct.tm** %41
%500 = getelementptr inbounds %struct.tm, %struct.tm* %499, i32 0, i32 3
%501 = load i32, i32* %500
%502 = load %struct.tm*, %struct.tm** %41
%503 = getelementptr inbounds %struct.tm, %struct.tm* %502, i32 0, i32 4
%504 = load i32, i32* %503
%505 = load %struct.tm*, %struct.tm** %41
%506 = getelementptr inbounds %struct.tm, %struct.tm* %505, i32 0, i32 5
%507 = load i32, i32* %506
%508 = call i32 (i32*, i8*, ...) @fprintf(i32* %488, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %491, i32 %494, i32 %498, i32 %501, i32 %504, i32 %507)
%509 = load i32*, i32** %6
%510 = call i32 (i32*, i8*, ...) @fprintf(i32* %509, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
%511 = load i32*, i32** %6
%512 = call i32 (i32*, i8*, ...) @fprintf(i32* %511, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%513 = load i32*, i32** %6
%514 = call i32 @fclose(i32* %513)
%515 = load i32, i32* @LOG_ERR
%516 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %515, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
%517 = call i32 @exit(i32 1)
unreachable
518: ; preds = %385
%519 = load i64, i64* %36
%520 = icmp slt i64 %519, 0
br i1 %520, label %521, label %555
521: ; preds = %518
%522 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %522, i32** %6
%523 = call i32 @time(i32* null)
store i32 %523, i32* %42
%524 = call %struct.tm* @localtime(i32* %42)
store %struct.tm* %524, %struct.tm** %43
%525 = load i32*, i32** %6
%526 = load %struct.tm*, %struct.tm** %43
%527 = getelementptr inbounds %struct.tm, %struct.tm* %526, i32 0, i32 0
%528 = load i32, i32* %527
%529 = load %struct.tm*, %struct.tm** %43
%530 = getelementptr inbounds %struct.tm, %struct.tm* %529, i32 0, i32 1
%531 = load i32, i32* %530
%532 = load %struct.tm*, %struct.tm** %43
%533 = getelementptr inbounds %struct.tm, %struct.tm* %532, i32 0, i32 2
%534 = load i32, i32* %533
%535 = add nsw i32 %534, 1900
%536 = load %struct.tm*, %struct.tm** %43
%537 = getelementptr inbounds %struct.tm, %struct.tm* %536, i32 0, i32 3
%538 = load i32, i32* %537
%539 = load %struct.tm*, %struct.tm** %43
%540 = getelementptr inbounds %struct.tm, %struct.tm* %539, i32 0, i32 4
%541 = load i32, i32* %540
%542 = load %struct.tm*, %struct.tm** %43
%543 = getelementptr inbounds %struct.tm, %struct.tm* %542, i32 0, i32 5
%544 = load i32, i32* %543
%545 = call i32 (i32*, i8*, ...) @fprintf(i32* %525, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %528, i32 %531, i32 %535, i32 %538, i32 %541, i32 %544)
%546 = load i32*, i32** %6
%547 = call i32 (i32*, i8*, ...) @fprintf(i32* %546, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0))
%548 = load i32*, i32** %6
%549 = call i32 (i32*, i8*, ...) @fprintf(i32* %548, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%550 = load i32*, i32** %6
%551 = call i32 @fclose(i32* %550)
%552 = load i32, i32* @LOG_ERR
%553 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %552, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0))
%554 = call i32 @exit(i32 1)
unreachable
555: ; preds = %518
br label %556
556: ; preds = %555
%557 = call i32 @sleep(i32 1)
br label %345
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.addrinfo = type { i32, i32, i32, i32, i32, %struct.addrinfo*, i32 }
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@AI_PASSIVE = global i32 0
@.str = [6 x i8] c"62085\00"
@.str.1 = [29 x i8] c"/var/log/delchef/delchef.log\00"
@.str.2 = [2 x i8] c"a\00"
@.str.3 = [36 x i8] c"[%02d/%02d/%04d - %02d:%02d:%02d]: \00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [20 x i8] c"getaddrinfo() error\00"
@LOG_ERR = global i32 0
@.str.7 = [22 x i8] c"Error creating socket\00"
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.8 = [30 x i8] c"Error settings socket options\00"
@.str.9 = [21 x i8] c"Error binding socket\00"
@.str.10 = [16 x i8] c"Error listening\00"
@.str.11 = [24 x i8] c"Waiting for connections\00"
@LOG_INFO = global i32 0
@INET_ADDRSTRLEN = global i32 0
@.str.12 = [27 x i8] c"Error accepting connection\00"
@.str.13 = [33 x i8] c"Received connection from %s [%s]\00"
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@O_APPEND = global i32 0
@.str.14 = [28 x i8] c"Error opening log for child\00"
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
@.str.15 = [15 x i8] c"/usr/bin/knife\00"
@.str.16 = [7 x i8] c"client\00"
@.str.17 = [7 x i8] c"delete\00"
@.str.18 = [3 x i8] c"-y\00"
@.str.19 = [3 x i8] c"-u\00"
@.str.20 = [8 x i8] c"delchef\00"
@.str.21 = [3 x i8] c"-k\00"
@.str.22 = [22 x i8] c"/etc/chef/delchef.pem\00"
@.str.23 = [24 x i8] c"Error executing execl()\00"
@.str.24 = [28 x i8] c"Error forking a new process\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca %struct.addrinfo
%6 = alloca %struct.addrinfo*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [100 x i8]
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = bitcast %struct.sockaddr_in* %3 to i8*
%22 = bitcast i32* %4 to i8*
%23 = bitcast %struct.addrinfo* %5 to i8*
%24 = bitcast %struct.addrinfo** %6 to i8*
%25 = call i32 @memset(%struct.addrinfo* %5, i32 0, i32 40)
%26 = load i32, i32* @AF_INET
%27 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 4
store i32 %26, i32* %27
%28 = load i32, i32* @SOCK_STREAM
%29 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 3
store i32 %28, i32* %29
%30 = load i32, i32* @AI_PASSIVE
%31 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %5, i64 0, i32 6
store i32 %30, i32* %31
%32 = call i64 @getaddrinfo(i32* null, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), %struct.addrinfo* %5, %struct.addrinfo** %6)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %39
34: ; preds = %2
%35 = load %struct.addrinfo*, %struct.addrinfo** %6
%36 = bitcast i32* %9 to i8*
%37 = bitcast i32* %11 to i8*
%38 = bitcast i32* %8 to i8*
br label %64
39: ; preds = %2
%40 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%41 = bitcast i32* %7 to i8*
%42 = call i32 @time(i32* null)
store i32 %42, i32* %7
%43 = call %struct.tm* @localtime(i32* %7)
%44 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 0
%45 = load i32, i32* %44
%46 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 1
%47 = load i32, i32* %46
%48 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 2
%49 = load i32, i32* %48
%50 = add nsw i32 %49, 1900
%51 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 3
%52 = load i32, i32* %51
%53 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 4
%54 = load i32, i32* %53
%55 = getelementptr inbounds %struct.tm, %struct.tm* %43, i64 0, i32 5
%56 = load i32, i32* %55
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %45, i32 %47, i32 %50, i32 %52, i32 %54, i32 %56)
%58 = call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i64 19, i64 1, i32* %40)
%59 = call i32 @fputc(i32 10, i32* %40)
%60 = call i32 @fclose(i32* %40)
%61 = load i32, i32* @LOG_ERR
%62 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%63 = call i32 @exit(i32 1)
unreachable
64: ; preds = %34, %158
%65 = phi %struct.addrinfo* [ %35, %34 ], [ %160, %158 ]
%66 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 4
%67 = load i32, i32* %66
%68 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 3
%69 = load i32, i32* %68
%70 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 2
%71 = load i32, i32* %70
%72 = call i32 @socket(i32 %67, i32 %69, i32 %71)
%73 = icmp eq i32 %72, -1
br i1 %73, label %74, label %97
74: ; preds = %64
%75 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%76 = call i32 @time(i32* null)
store i32 %76, i32* %8
%77 = call %struct.tm* @localtime(i32* %8)
%78 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 0
%79 = load i32, i32* %78
%80 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 1
%81 = load i32, i32* %80
%82 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 2
%83 = load i32, i32* %82
%84 = add nsw i32 %83, 1900
%85 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 3
%86 = load i32, i32* %85
%87 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 4
%88 = load i32, i32* %87
%89 = getelementptr inbounds %struct.tm, %struct.tm* %77, i64 0, i32 5
%90 = load i32, i32* %89
%91 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %79, i32 %81, i32 %84, i32 %86, i32 %88, i32 %90)
%92 = call i64 @fwrite(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i64 21, i64 1, i32* %75)
%93 = call i32 @fputc(i32 10, i32* %75)
%94 = call i32 @fclose(i32* %75)
%95 = load i32, i32* @LOG_ERR
%96 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %95, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
br label %158
97: ; preds = %64
store i32 1, i32* %9
%98 = load i32, i32* @SOL_SOCKET
%99 = load i32, i32* @SO_REUSEADDR
%100 = call i32 @setsockopt(i32 %72, i32 %98, i32 %99, i32* %9, i32 4)
%101 = icmp eq i32 %100, -1
br i1 %101, label %102, label %127
102: ; preds = %97
%103 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%104 = bitcast i32* %10 to i8*
%105 = call i32 @time(i32* null)
store i32 %105, i32* %10
%106 = call %struct.tm* @localtime(i32* %10)
%107 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 0
%108 = load i32, i32* %107
%109 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 1
%110 = load i32, i32* %109
%111 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 2
%112 = load i32, i32* %111
%113 = add nsw i32 %112, 1900
%114 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 3
%115 = load i32, i32* %114
%116 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 4
%117 = load i32, i32* %116
%118 = getelementptr inbounds %struct.tm, %struct.tm* %106, i64 0, i32 5
%119 = load i32, i32* %118
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %108, i32 %110, i32 %113, i32 %115, i32 %117, i32 %119)
%121 = call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i64 29, i64 1, i32* %103)
%122 = call i32 @fputc(i32 10, i32* %103)
%123 = call i32 @fclose(i32* %103)
%124 = load i32, i32* @LOG_ERR
%125 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %124, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0))
%126 = call i32 @exit(i32 1)
unreachable
127: ; preds = %97
%128 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 1
%129 = load i32, i32* %128
%130 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 0
%131 = load i32, i32* %130
%132 = call i32 @bind(i32 %72, i32 %129, i32 %131)
%133 = icmp eq i32 %132, -1
br i1 %133, label %134, label %188
134: ; preds = %127
%135 = call i32 @close(i32 %72)
%136 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%137 = call i32 @time(i32* null)
store i32 %137, i32* %11
%138 = call %struct.tm* @localtime(i32* %11)
%139 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 0
%140 = load i32, i32* %139
%141 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 1
%142 = load i32, i32* %141
%143 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 2
%144 = load i32, i32* %143
%145 = add nsw i32 %144, 1900
%146 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 3
%147 = load i32, i32* %146
%148 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 4
%149 = load i32, i32* %148
%150 = getelementptr inbounds %struct.tm, %struct.tm* %138, i64 0, i32 5
%151 = load i32, i32* %150
%152 = call i32 (i32*, i8*, ...) @fprintf(i32* %136, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %140, i32 %142, i32 %145, i32 %147, i32 %149, i32 %151)
%153 = call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 20, i64 1, i32* %136)
%154 = call i32 @fputc(i32 10, i32* %136)
%155 = call i32 @fclose(i32* %136)
%156 = load i32, i32* @LOG_ERR
%157 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %156, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
br label %158
158: ; preds = %134, %74
%159 = getelementptr inbounds %struct.addrinfo, %struct.addrinfo* %65, i64 0, i32 5
%160 = load %struct.addrinfo*, %struct.addrinfo** %159
%161 = icmp eq %struct.addrinfo* %160, null
br i1 %161, label %162, label %64
162: ; preds = %158
%163 = call i32 @close(i32 %72)
%164 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%165 = bitcast i32* %12 to i8*
%166 = call i32 @time(i32* null)
store i32 %166, i32* %12
%167 = call %struct.tm* @localtime(i32* %12)
%168 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 0
%169 = load i32, i32* %168
%170 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 1
%171 = load i32, i32* %170
%172 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 2
%173 = load i32, i32* %172
%174 = add nsw i32 %173, 1900
%175 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 3
%176 = load i32, i32* %175
%177 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 4
%178 = load i32, i32* %177
%179 = getelementptr inbounds %struct.tm, %struct.tm* %167, i64 0, i32 5
%180 = load i32, i32* %179
%181 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %169, i32 %171, i32 %174, i32 %176, i32 %178, i32 %180)
%182 = call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 20, i64 1, i32* %164)
%183 = call i32 @fputc(i32 10, i32* %164)
%184 = call i32 @fclose(i32* %164)
%185 = load i32, i32* @LOG_ERR
%186 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %185, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0))
%187 = call i32 @exit(i32 1)
unreachable
188: ; preds = %127
%189 = load %struct.addrinfo*, %struct.addrinfo** %6
%190 = call i32 @freeaddrinfo(%struct.addrinfo* %189)
%191 = call i32 @listen(i32 %72, i32 10)
%192 = icmp eq i32 %191, -1
br i1 %192, label %193, label %219
193: ; preds = %188
%194 = call i32 @close(i32 %72)
%195 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%196 = bitcast i32* %13 to i8*
%197 = call i32 @time(i32* null)
store i32 %197, i32* %13
%198 = call %struct.tm* @localtime(i32* %13)
%199 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 0
%200 = load i32, i32* %199
%201 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 1
%202 = load i32, i32* %201
%203 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 2
%204 = load i32, i32* %203
%205 = add nsw i32 %204, 1900
%206 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 3
%207 = load i32, i32* %206
%208 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 4
%209 = load i32, i32* %208
%210 = getelementptr inbounds %struct.tm, %struct.tm* %198, i64 0, i32 5
%211 = load i32, i32* %210
%212 = call i32 (i32*, i8*, ...) @fprintf(i32* %195, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %200, i32 %202, i32 %205, i32 %207, i32 %209, i32 %211)
%213 = call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i64 15, i64 1, i32* %195)
%214 = call i32 @fputc(i32 10, i32* %195)
%215 = call i32 @fclose(i32* %195)
%216 = load i32, i32* @LOG_ERR
%217 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %216, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%218 = call i32 @exit(i32 1)
unreachable
219: ; preds = %188
%220 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%221 = bitcast i32* %14 to i8*
%222 = call i32 @time(i32* null)
store i32 %222, i32* %14
%223 = call %struct.tm* @localtime(i32* %14)
%224 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 0
%225 = load i32, i32* %224
%226 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 1
%227 = load i32, i32* %226
%228 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 2
%229 = load i32, i32* %228
%230 = add nsw i32 %229, 1900
%231 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 3
%232 = load i32, i32* %231
%233 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 4
%234 = load i32, i32* %233
%235 = getelementptr inbounds %struct.tm, %struct.tm* %223, i64 0, i32 5
%236 = load i32, i32* %235
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %220, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %225, i32 %227, i32 %230, i32 %232, i32 %234, i32 %236)
%238 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i64 23, i64 1, i32* %220)
%239 = call i32 @fputc(i32 10, i32* %220)
%240 = call i32 @fclose(i32* %220)
%241 = load i32, i32* @LOG_INFO
%242 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %241, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
store i32 4, i32* %4
%243 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%244 = load i32, i32* @INET_ADDRSTRLEN
%245 = zext i32 %244 to i64
%246 = alloca i8, i64 %245
%247 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%248 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0
%249 = bitcast i32* %17 to i8*
%250 = bitcast i32* %16 to i8*
br label %251
251: ; preds = %277, %219
%252 = call i32 @accept(i32 %72, %struct.sockaddr* %247, i32* %4)
%253 = icmp eq i32 %252, -1
br i1 %253, label %254, label %278
254: ; preds = %251
%255 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%256 = call i32 @time(i32* null)
store i32 %256, i32* %16
%257 = call %struct.tm* @localtime(i32* %16)
%258 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 0
%259 = load i32, i32* %258
%260 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 1
%261 = load i32, i32* %260
%262 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 2
%263 = load i32, i32* %262
%264 = add nsw i32 %263, 1900
%265 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 3
%266 = load i32, i32* %265
%267 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 4
%268 = load i32, i32* %267
%269 = getelementptr inbounds %struct.tm, %struct.tm* %257, i64 0, i32 5
%270 = load i32, i32* %269
%271 = call i32 (i32*, i8*, ...) @fprintf(i32* %255, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %259, i32 %261, i32 %264, i32 %266, i32 %268, i32 %270)
%272 = call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i64 26, i64 1, i32* %255)
%273 = call i32 @fputc(i32 10, i32* %255)
%274 = call i32 @fclose(i32* %255)
%275 = load i32, i32* @LOG_ERR
%276 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %275, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
br label %277
277: ; preds = %254, %398
br label %251
278: ; preds = %251
%279 = load i32, i32* @AF_INET
%280 = load i32, i32* @INET_ADDRSTRLEN
%281 = call i32 @inet_ntop(i32 %279, i32* %248, i8* %246, i32 %280)
%282 = call i32 @close(i32 0)
%283 = call i32 @getnameinfo(%struct.sockaddr* %247, i32 4, i8* %243, i32 100, i32* null, i32 0, i32 0)
%284 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%285 = call i32 @time(i32* null)
store i32 %285, i32* %17
%286 = call %struct.tm* @localtime(i32* %17)
%287 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 0
%288 = load i32, i32* %287
%289 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 1
%290 = load i32, i32* %289
%291 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 2
%292 = load i32, i32* %291
%293 = add nsw i32 %292, 1900
%294 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 3
%295 = load i32, i32* %294
%296 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 4
%297 = load i32, i32* %296
%298 = getelementptr inbounds %struct.tm, %struct.tm* %286, i64 0, i32 5
%299 = load i32, i32* %298
%300 = call i32 (i32*, i8*, ...) @fprintf(i32* %284, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %288, i32 %290, i32 %293, i32 %295, i32 %297, i32 %299)
%301 = call i32 (i32*, i8*, ...) @fprintf(i32* %284, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i8* %246, i8* %243)
%302 = call i32 @fputc(i32 10, i32* %284)
%303 = call i32 @fclose(i32* %284)
%304 = load i32, i32* @LOG_INFO
%305 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %304, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0), i8* %246, i8* %243)
%306 = call i64 (...) @fork()
%307 = icmp eq i64 %306, 0
br i1 %307, label %308, label %371
308: ; preds = %278
%309 = load i32, i32* @O_CREAT
%310 = load i32, i32* @O_RDWR
%311 = or i32 %310, %309
%312 = load i32, i32* @O_APPEND
%313 = or i32 %311, %312
%314 = call i32 @open(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %313)
%315 = icmp eq i32 %314, -1
br i1 %315, label %316, label %340
316: ; preds = %308
%317 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%318 = bitcast i32* %18 to i8*
%319 = call i32 @time(i32* null)
store i32 %319, i32* %18
%320 = call %struct.tm* @localtime(i32* %18)
%321 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 0
%322 = load i32, i32* %321
%323 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 1
%324 = load i32, i32* %323
%325 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 2
%326 = load i32, i32* %325
%327 = add nsw i32 %326, 1900
%328 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 3
%329 = load i32, i32* %328
%330 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 4
%331 = load i32, i32* %330
%332 = getelementptr inbounds %struct.tm, %struct.tm* %320, i64 0, i32 5
%333 = load i32, i32* %332
%334 = call i32 (i32*, i8*, ...) @fprintf(i32* %317, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %322, i32 %324, i32 %327, i32 %329, i32 %331, i32 %333)
%335 = call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i64 27, i64 1, i32* %317)
%336 = call i32 @fputc(i32 10, i32* %317)
%337 = call i32 @fclose(i32* %317)
%338 = load i32, i32* @LOG_ERR
%339 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %338, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
br label %340
340: ; preds = %316, %308
%341 = load i32, i32* @STDOUT_FILENO
%342 = call i32 @dup2(i32 %314, i32 %341)
%343 = load i32, i32* @STDERR_FILENO
%344 = call i32 @dup2(i32 %314, i32 %343)
%345 = call i32 @close(i32 %314)
%346 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %243, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0), i32* null)
%347 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%348 = bitcast i32* %19 to i8*
%349 = call i32 @time(i32* null)
store i32 %349, i32* %19
%350 = call %struct.tm* @localtime(i32* %19)
%351 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 0
%352 = load i32, i32* %351
%353 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 1
%354 = load i32, i32* %353
%355 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 2
%356 = load i32, i32* %355
%357 = add nsw i32 %356, 1900
%358 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 3
%359 = load i32, i32* %358
%360 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 4
%361 = load i32, i32* %360
%362 = getelementptr inbounds %struct.tm, %struct.tm* %350, i64 0, i32 5
%363 = load i32, i32* %362
%364 = call i32 (i32*, i8*, ...) @fprintf(i32* %347, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %352, i32 %354, i32 %357, i32 %359, i32 %361, i32 %363)
%365 = call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0), i64 23, i64 1, i32* %347)
%366 = call i32 @fputc(i32 10, i32* %347)
%367 = call i32 @fclose(i32* %347)
%368 = load i32, i32* @LOG_ERR
%369 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %368, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i64 0, i64 0))
%370 = call i32 @exit(i32 1)
unreachable
371: ; preds = %278
%372 = icmp slt i64 %306, 0
br i1 %372, label %373, label %398
373: ; preds = %371
%374 = call i32* @fopen(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%375 = bitcast i32* %20 to i8*
%376 = call i32 @time(i32* null)
store i32 %376, i32* %20
%377 = call %struct.tm* @localtime(i32* %20)
%378 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 0
%379 = load i32, i32* %378
%380 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 1
%381 = load i32, i32* %380
%382 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 2
%383 = load i32, i32* %382
%384 = add nsw i32 %383, 1900
%385 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 3
%386 = load i32, i32* %385
%387 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 4
%388 = load i32, i32* %387
%389 = getelementptr inbounds %struct.tm, %struct.tm* %377, i64 0, i32 5
%390 = load i32, i32* %389
%391 = call i32 (i32*, i8*, ...) @fprintf(i32* %374, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %379, i32 %381, i32 %384, i32 %386, i32 %388, i32 %390)
%392 = call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0), i64 27, i64 1, i32* %374)
%393 = call i32 @fputc(i32 10, i32* %374)
%394 = call i32 @fclose(i32* %374)
%395 = load i32, i32* @LOG_ERR
%396 = call i32 (i32, i8*, i8*, ...) @syslog(i32 %395, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.24, i64 0, i64 0))
%397 = call i32 @exit(i32 1)
unreachable
398: ; preds = %371
%399 = call i32 @sleep(i32 1)
br label %277
}