#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_zero;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ restricted;
typedef scalar_t__ pid_t;
typedef int /*<<< orphan*/ dirs;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ INADDR_ANY;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ LOG_LOCAL1;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ LOG_WARNING;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ close(int);
int dircount(char *);
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int inet_ntoa(TYPE_1__);
int listen(int, int);
char *malloc(int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, char, int);
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ setsid();
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
char *strcat(char *, char *);
scalar_t__ strcmp(char *, ...);
char *strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ umask(int /*<<< orphan*/);
int main() {
  int i, current_count, sock_fd, client_fd, sin_size, ip_matches;
  int yes = 1;
  char spool[] = "/var/spool/postfix/";
  char *dirs[] = {"active", "deferred", "corrupt", "hold"};
  char *restricted[] = {"0.0.0.0"};
  char *current_dir, *current_string;
  struct sockaddr_in my_addr;
  struct sockaddr_in client_addr;
  pid_t pid;
  current_dir = malloc(255);
  current_string = malloc(255);
  openlog("queue_counts", LOG_PID, LOG_LOCAL1);
  if (1 && (strcmp("0.0.0.0", restricted[0]) == 0)) {
    syslog(LOG_ERR, "you must configure a server IP address, exiting...\n");
    exit(-1);
  }
  if ((pid = fork()) < 0) {
    syslog(LOG_ERR, "unable to fork new child process, exiting...\n");
    exit(-1);
  } else if (pid != 0) {
    syslog(LOG_INFO, "starting normal execution\n");
    exit(0);
  }
  setsid();
  chdir("/");
  umask(0);
  if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
    syslog(LOG_ERR, "unable to open socket %d, exiting...", 7678);
    exit(-1);
  }
  my_addr.sin_family = AF_INET;
  my_addr.sin_port = htons(7678);
  my_addr.sin_addr.s_addr = htonl(INADDR_ANY);
  memset(&(my_addr.sin_zero), '\0', 8);
  if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1) {
    syslog(LOG_ERR, "unable to set socket options, exiting...");
    exit(-1);
  }
  if (bind(sock_fd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)) ==
      -1) {
    syslog(LOG_ERR, "unable to bind to socket %d, exiting...", 7678);
    exit(-1);
  }
  if (listen(sock_fd, 5) == -1) {
    syslog(LOG_ERR, "unable to set backlog queue on socket %d, exiting...",
           7678);
    exit(-1);
  }
  while (1) {
    sin_size = sizeof(struct sockaddr);
    if ((client_fd = accept(sock_fd, (struct sockaddr *)&client_addr,
                            &sin_size)) == -1) {
      syslog(LOG_WARNING,
             "unable to accept connection from %s on socket %d, resuming "
             "operation",
             inet_ntoa(client_addr.sin_addr), 7678);
      continue;
    } else {
      ip_matches = 1;
      if (1) {
        ip_matches = 0;
        for (i = 0; i < (sizeof(restricted) / sizeof(restricted[0])); i++) {
          if (strcmp(restricted[i], inet_ntoa(client_addr.sin_addr)) == 0) {
            ip_matches = 1;
          }
        }
        if (!ip_matches) {
          syslog(LOG_ERR, "rejected connection from %s, resuming operation",
                 inet_ntoa(client_addr.sin_addr));
          close(client_fd);
        } else {
          syslog(LOG_INFO, "accepted connection from %s",
                 inet_ntoa(client_addr.sin_addr));
        }
      }
      if (ip_matches) {
        for (i = 0; i < (sizeof(dirs) / sizeof(dirs[0])); i++) {
          current_dir = strcpy(current_dir, spool);
          current_dir = strcat(current_dir, dirs[i]);
          current_count = dircount(current_dir);
          sprintf(current_string, "%s:%d\n", dirs[i], current_count);
          send(client_fd, current_string, strlen(current_string), 0);
        }
        close(client_fd);
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
mov    0xd50(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xd4d(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xd4b(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0x2ad1(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2ace(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2acb(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2ac8(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2ac5(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    $0xff,%edi
call   1100 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    $0xff,%edi
call   1100 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    0x2c96(%rip),%rax
mov    (%rax),%esi
mov    0x2c7d(%rip),%rax
mov    (%rax),%edx
lea    0xd05(%rip),%rdi
call   1160 <openlog@plt>
mov    -0x68(%rbp),%rsi
lea    0xced(%rip),%rdi
xor    %eax,%eax
call   10e0 <strcmp@plt>
cmp    $0x0,%rax
jne    1376 <main+0xe6>
mov    0x2c2c(%rip),%rax
mov    (%rax),%edi
lea    0xce1(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
mov    $0x0,%al
call   11a0 <fork@plt>
mov    %rax,-0xa0(%rbp)
cmp    $0x0,%rax
jge    13af <main+0x11f>
mov    0x2bf3(%rip),%rax
mov    (%rax),%edi
lea    0xcdc(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
cmpq   $0x0,-0xa0(%rbp)
je     13db <main+0x14b>
mov    0x2bd4(%rip),%rax
mov    (%rax),%edi
lea    0xcdb(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
xor    %edi,%edi
call   1190 <exit@plt>
jmp    13e0 <main+0x150>
mov    $0x0,%al
call   10d0 <setsid@plt>
lea    0xcd5(%rip),%rdi
call   1070 <chdir@plt>
xor    %edi,%edi
call   10f0 <umask@plt>
mov    0x2bd7(%rip),%rax
mov    (%rax),%edi
mov    0x2ba6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   11b0 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0xffffffff,%eax
jne    1445 <main+0x1b5>
mov    0x2b62(%rip),%rax
mov    (%rax),%edi
lea    0xc96(%rip),%rsi
mov    $0x1dfe,%edx
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
mov    0x2b8c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x7c(%rbp)
mov    $0x1dfe,%edi
call   1080 <htons@plt>
mov    %eax,-0x80(%rbp)
mov    0x2b6b(%rip),%rax
mov    (%rax),%edi
call   10a0 <htonl@plt>
mov    %eax,-0x88(%rbp)
lea    -0x88(%rbp),%rdi
add    $0x4,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   10b0 <memset@plt>
mov    -0x10(%rbp),%edi
mov    0x2b4d(%rip),%rax
mov    (%rax),%esi
mov    0x2b04(%rip),%rax
mov    (%rax),%edx
lea    -0x20(%rbp),%rcx
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    14d7 <main+0x247>
mov    0x2acb(%rip),%rax
mov    (%rax),%edi
lea    0xc24(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
mov    -0x10(%rbp),%edi
lea    -0x88(%rbp),%rsi
mov    $0x4,%edx
call   1130 <bind@plt>
cmp    $0xffffffff,%eax
jne    151a <main+0x28a>
mov    0x2a8d(%rip),%rax
mov    (%rax),%edi
lea    0xc0f(%rip),%rsi
mov    $0x1dfe,%edx
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
mov    -0x10(%rbp),%edi
mov    $0x5,%esi
call   1120 <listen@plt>
cmp    $0xffffffff,%eax
jne    1556 <main+0x2c6>
mov    0x2a51(%rip),%rax
mov    (%rax),%edi
lea    0xbfb(%rip),%rsi
mov    $0x1dfe,%edx
mov    $0x0,%al
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1190 <exit@plt>
jmp    155b <main+0x2cb>
movl   $0x4,-0x18(%rbp)
mov    -0x10(%rbp),%edi
lea    -0x98(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1140 <accept@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    15bb <main+0x32b>
mov    0x2a40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x98(%rbp),%edi
call   1050 <inet_ntoa@plt>
mov    -0xa4(%rbp),%edi
mov    %eax,%edx
lea    0xbc6(%rip),%rsi
mov    $0x1dfe,%ecx
mov    $0x0,%al
call   1110 <syslog@plt>
jmp    155b <main+0x2cb>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x1,%rax
jae    162d <main+0x39d>
movslq -0x8(%rbp),%rax
mov    -0x68(%rbp,%rax,8),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x98(%rbp),%edi
call   1050 <inet_ntoa@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10e0 <strcmp@plt>
cmp    $0x0,%rax
jne    161a <main+0x38a>
movl   $0x1,-0x1c(%rbp)
jmp    161f <main+0x38f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15d0 <main+0x340>
cmpl   $0x0,-0x1c(%rbp)
jne    1674 <main+0x3e4>
mov    0x294a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x98(%rbp),%edi
call   1050 <inet_ntoa@plt>
mov    -0xb4(%rbp),%edi
mov    %eax,%edx
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
mov    -0x14(%rbp),%edi
call   10c0 <close@plt>
jmp    16a4 <main+0x414>
mov    0x291d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xb8(%rbp)
mov    -0x98(%rbp),%edi
call   1050 <inet_ntoa@plt>
mov    -0xb8(%rbp),%edi
mov    %eax,%edx
lea    0xb48(%rip),%rsi
mov    $0x0,%al
call   1110 <syslog@plt>
cmpl   $0x0,-0x1c(%rbp)
je     175b <main+0x4cb>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x4,%rax
jae    1753 <main+0x4c3>
mov    -0x70(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
movslq -0x8(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rsi
call   1150 <strcat@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rdi
call   1170 <dircount@plt>
mov    %eax,-0xc(%rbp)
mov    -0x78(%rbp),%rdi
movslq -0x8(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rdx
mov    -0xc(%rbp),%ecx
lea    0xaf4(%rip),%rsi
call   1180 <sprintf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x78(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xc4(%rbp),%edi
mov    -0xc0(%rbp),%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16b5 <main+0x425>
mov    -0x14(%rbp),%edi
call   10c0 <close@plt>
jmp    1760 <main+0x4d0>
jmp    155b <main+0x2cb>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movl   $0x1,0x8(%rsp)
movaps 0xd63(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movl   $0x2f7869,0x40(%rsp)
mov    $0xff,%edi
call   1100 <malloc@plt>
mov    %rax,%rbx
mov    $0xff,%edi
call   1100 <malloc@plt>
mov    %rax,%r14
mov    0x2cf5(%rip),%rax
mov    (%rax),%esi
mov    0x2cdc(%rip),%rax
mov    (%rax),%edx
lea    0xd5c(%rip),%rdi
call   1150 <openlog@plt>
lea    0xd48(%rip),%rdi
mov    %rdi,%rsi
xor    %eax,%eax
call   10e0 <strcmp@plt>
test   %rax,%rax
je     162c <main+0x3ac>
xor    %eax,%eax
call   1190 <fork@plt>
test   %rax,%rax
js     163e <main+0x3be>
jne    1650 <main+0x3d0>
xor    %eax,%eax
call   10d0 <setsid@plt>
lea    0xda3(%rip),%rdi
call   1070 <chdir@plt>
xor    %edi,%edi
call   10f0 <umask@plt>
mov    0x2cad(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2c7b(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   11a0 <socket@plt>
cmp    $0xffffffff,%eax
je     166e <main+0x3ee>
mov    %eax,%r15d
mov    0x0(%rbp),%eax
mov    %eax,0x2c(%rsp)
mov    $0x1dfe,%edi
call   1080 <htons@plt>
mov    %eax,0x28(%rsp)
mov    0x2c6a(%rip),%rax
mov    (%rax),%edi
call   10a0 <htonl@plt>
mov    %eax,0x20(%rsp)
lea    0x24(%rsp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   10b0 <memset@plt>
mov    0x2c57(%rip),%rax
mov    (%rax),%esi
mov    0x2c0e(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rcx
mov    %r15d,%edi
mov    $0x4,%r8d
call   1040 <setsockopt@plt>
cmp    $0xffffffff,%eax
je     1680 <main+0x400>
lea    0x20(%rsp),%rsi
mov    %r15d,%edi
mov    $0x4,%edx
call   1130 <bind@plt>
cmp    $0xffffffff,%eax
je     16a1 <main+0x421>
mov    %r15d,%edi
mov    $0x5,%esi
call   1120 <listen@plt>
cmp    $0xffffffff,%eax
je     16b3 <main+0x433>
lea    0xc(%rsp),%r12
mov    %r15d,0x4(%rsp)
jmp    1429 <main+0x1a9>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x2bc9(%rip),%rax
mov    (%rax),%ebp
mov    0x10(%rsp),%edi
call   1050 <inet_ntoa@plt>
mov    %ebp,%edi
lea    0xd55(%rip),%rsi
mov    %eax,%edx
mov    $0x1dfe,%ecx
xor    %eax,%eax
call   1110 <syslog@plt>
movl   $0x4,0xc(%rsp)
mov    %r15d,%edi
lea    0x10(%rsp),%rsi
mov    %r12,%rdx
call   1140 <accept@plt>
cmp    $0xffffffff,%eax
je     1400 <main+0x180>
mov    %eax,%r13d
mov    0x10(%rsp),%edi
call   1050 <inet_ntoa@plt>
lea    0xbd8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10e0 <strcmp@plt>
test   %rax,%rax
je     1490 <main+0x210>
mov    0x2b22(%rip),%rax
mov    (%rax),%ebp
mov    0x10(%rsp),%edi
call   1050 <inet_ntoa@plt>
mov    %ebp,%edi
lea    0xd33(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1110 <syslog@plt>
jmp    161f <main+0x39f>
mov    0x2b09(%rip),%rax
mov    (%rax),%ebp
mov    0x10(%rsp),%edi
call   1050 <inet_ntoa@plt>
mov    %ebp,%edi
lea    0xd3a(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1110 <syslog@plt>
mov    %rbx,%rdi
lea    0x30(%rsp),%rbp
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
movl   $0x69746361,(%rbx,%rax,1)
movl   $0x657669,0x3(%rbx,%rax,1)
mov    %rbx,%rdi
call   1160 <dircount@plt>
mov    %r14,%rdi
mov    %r12,%r15
lea    0xd11(%rip),%r12
mov    %r12,%rsi
lea    0xb1a(%rip),%rdx
mov    %eax,%ecx
call   1170 <sprintf@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
movabs $0x6465727265666564,%rcx
72 65 64
mov    %rcx,(%rbx,%rax,1)
movb   $0x0,0x8(%rbx,%rax,1)
mov    %rbx,%rdi
call   1160 <dircount@plt>
mov    %r14,%rdi
mov    %r12,%rsi
lea    0xac8(%rip),%rdx
mov    %eax,%ecx
call   1170 <sprintf@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
movabs $0x74707572726f63,%rcx
mov    %rcx,(%rbx,%rax,1)
mov    %rbx,%rdi
call   1160 <dircount@plt>
mov    %r14,%rdi
mov    %r12,%rsi
lea    0xa7d(%rip),%rdx
mov    %eax,%ecx
call   1170 <sprintf@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
movl   $0x646c6f68,(%rbx,%rax,1)
movb   $0x0,0x4(%rbx,%rax,1)
mov    %rbx,%rdi
call   1160 <dircount@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%r12
mov    0x4(%rsp),%r15d
lea    0xa2b(%rip),%rdx
mov    %eax,%ecx
call   1170 <sprintf@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r13d,%edi
mov    %r14,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
call   1090 <send@plt>
mov    %r13d,%edi
call   10c0 <close@plt>
jmp    1429 <main+0x1a9>
mov    0x295d(%rip),%rax
mov    (%rax),%edi
lea    0xa0a(%rip),%rsi
jmp    1690 <main+0x410>
mov    0x294b(%rip),%rax
mov    (%rax),%edi
lea    0xa2c(%rip),%rsi
jmp    1690 <main+0x410>
mov    0x2949(%rip),%rax
mov    (%rax),%edi
lea    0xa48(%rip),%rsi
xor    %eax,%eax
call   1110 <syslog@plt>
xor    %edi,%edi
call   1180 <exit@plt>
mov    0x291b(%rip),%rax
mov    (%rax),%edi
lea    0xa47(%rip),%rsi
jmp    16c3 <main+0x443>
mov    0x2909(%rip),%rax
mov    (%rax),%edi
lea    0xa5a(%rip),%rsi
xor    %eax,%eax
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1180 <exit@plt>
mov    0x28e8(%rip),%rax
mov    (%rax),%edi
lea    0xa62(%rip),%rsi
jmp    16c3 <main+0x443>
mov    0x28d6(%rip),%rax
mov    (%rax),%edi
lea    0xa78(%rip),%rsi
mov    $0x1dfe,%edx
xor    %eax,%eax
call   1110 <syslog@plt>
mov    $0xffffffff,%edi
call   1180 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@__const.main.spool = [20 x i8] c"/var/spool/postfix/\00"
@.str = [7 x i8] c"active\00"
@.str.1 = [9 x i8] c"deferred\00"
@.str.2 = [8 x i8] c"corrupt\00"
@.str.3 = [5 x i8] c"hold\00"
@__const.main.dirs = [4 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [8 x i8] c"0.0.0.0\00"
@__const.main.restricted = [1 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0)]
@.str.5 = [13 x i8] c"queue_counts\00"
@LOG_PID = global i32 0
@LOG_LOCAL1 = global i32 0
@LOG_ERR = global i32 0
@.str.6 = [52 x i8] c"you must configure a server IP address, exiting...\0A\00"
@.str.7 = [46 x i8] c"unable to fork new child process, exiting...\0A\00"
@LOG_INFO = global i32 0
@.str.8 = [27 x i8] c"starting normal execution\0A\00"
@.str.9 = [2 x i8] c"/\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.10 = [37 x i8] c"unable to open socket %d, exiting...\00"
@INADDR_ANY = global i32 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.11 = [41 x i8] c"unable to set socket options, exiting...\00"
@.str.12 = [40 x i8] c"unable to bind to socket %d, exiting...\00"
@.str.13 = [53 x i8] c"unable to set backlog queue on socket %d, exiting...\00"
@LOG_WARNING = global i32 0
@.str.14 = [69 x i8] c"unable to accept connection from %s on socket %d, resuming operation\00"
@.str.15 = [48 x i8] c"rejected connection from %s, resuming operation\00"
@.str.16 = [28 x i8] c"accepted connection from %s\00"
@.str.17 = [7 x i8] c"%s:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [20 x i8]
%10 = alloca [4 x i8*]
%11 = alloca [1 x i8*]
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca %struct.sockaddr_in
%15 = alloca %struct.sockaddr_in
%16 = alloca i64
store i32 0, i32* %1
store i32 1, i32* %8
%17 = bitcast [20 x i8]* %9 to i8*
%18 = bitcast [4 x i8*]* %10 to i8*
%19 = bitcast [1 x i8*]* %11 to i8*
%20 = call i8* @malloc(i32 255)
store i8* %20, i8** %12
%21 = call i8* @malloc(i32 255)
store i8* %21, i8** %13
%22 = load i32, i32* @LOG_PID
%23 = load i32, i32* @LOG_LOCAL1
%24 = call i32 @openlog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %22, i32 %23)
%25 = getelementptr inbounds [1 x i8*], [1 x i8*]* %11, i64 0, i64 0
%26 = load i8*, i8** %25
%27 = call i64 (i8*, ...) @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %26)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %0
%30 = load i32, i32* @LOG_ERR
%31 = call i32 (i32, i8*, ...) @syslog(i32 %30, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%32 = call i32 @exit(i32 -1)
unreachable
33: ; preds = %0
%34 = call i64 (...) @fork()
store i64 %34, i64* %16
%35 = icmp slt i64 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %33
%37 = load i32, i32* @LOG_ERR
%38 = call i32 (i32, i8*, ...) @syslog(i32 %37, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%39 = call i32 @exit(i32 -1)
unreachable
40: ; preds = %33
%41 = load i64, i64* %16
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %40
%44 = load i32, i32* @LOG_INFO
%45 = call i32 (i32, i8*, ...) @syslog(i32 %44, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%46 = call i32 @exit(i32 0)
unreachable
47: ; preds = %40
br label %48
48: ; preds = %47
%49 = call i32 (...) @setsid()
%50 = call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%51 = call i32 @umask(i32 0)
%52 = load i32, i32* @AF_INET
%53 = load i32, i32* @SOCK_STREAM
%54 = call i32 @socket(i32 %52, i32 %53, i32 0)
store i32 %54, i32* %4
%55 = icmp eq i32 %54, -1
br i1 %55, label %56, label %60
56: ; preds = %48
%57 = load i32, i32* @LOG_ERR
%58 = call i32 (i32, i8*, ...) @syslog(i32 %57, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i32 7678)
%59 = call i32 @exit(i32 -1)
unreachable
60: ; preds = %48
%61 = load i32, i32* @AF_INET
%62 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 3
store i32 %61, i32* %62
%63 = call i32 @htons(i32 7678)
%64 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 2
store i32 %63, i32* %64
%65 = load i32, i32* @INADDR_ANY
%66 = call i32 @htonl(i32 %65)
%67 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 0
%68 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %67, i32 0, i32 0
store i32 %66, i32* %68
%69 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %14, i32 0, i32 1
%70 = call i32 @memset(i32* %69, i8 signext 0, i32 8)
%71 = load i32, i32* %4
%72 = load i32, i32* @SOL_SOCKET
%73 = load i32, i32* @SO_REUSEADDR
%74 = call i32 @setsockopt(i32 %71, i32 %72, i32 %73, i32* %8, i32 4)
%75 = icmp eq i32 %74, -1
br i1 %75, label %76, label %80
76: ; preds = %60
%77 = load i32, i32* @LOG_ERR
%78 = call i32 (i32, i8*, ...) @syslog(i32 %77, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%79 = call i32 @exit(i32 -1)
unreachable
80: ; preds = %60
%81 = load i32, i32* %4
%82 = bitcast %struct.sockaddr_in* %14 to %struct.sockaddr*
%83 = call i32 @bind(i32 %81, %struct.sockaddr* %82, i32 4)
%84 = icmp eq i32 %83, -1
br i1 %84, label %85, label %89
85: ; preds = %80
%86 = load i32, i32* @LOG_ERR
%87 = call i32 (i32, i8*, ...) @syslog(i32 %86, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 7678)
%88 = call i32 @exit(i32 -1)
unreachable
89: ; preds = %80
%90 = load i32, i32* %4
%91 = call i32 @listen(i32 %90, i32 5)
%92 = icmp eq i32 %91, -1
br i1 %92, label %93, label %97
93: ; preds = %89
%94 = load i32, i32* @LOG_ERR
%95 = call i32 (i32, i8*, ...) @syslog(i32 %94, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0), i32 7678)
%96 = call i32 @exit(i32 -1)
unreachable
97: ; preds = %89
br label %98
98: ; preds = %97, %103, %189
store i32 4, i32* %6
%99 = load i32, i32* %4
%100 = bitcast %struct.sockaddr_in* %15 to %struct.sockaddr*
%101 = call i32 @accept(i32 %99, %struct.sockaddr* %100, i32* %6)
store i32 %101, i32* %5
%102 = icmp eq i32 %101, -1
br i1 %102, label %103, label %110
103: ; preds = %98
%104 = load i32, i32* @LOG_WARNING
%105 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %15, i32 0, i32 0
%106 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %105, i32 0, i32 0
%107 = load i32, i32* %106
%108 = call i32 @inet_ntoa(i32 %107)
%109 = call i32 (i32, i8*, ...) @syslog(i32 %104, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.14, i64 0, i64 0), i32 %108, i32 7678)
br label %98
110: ; preds = %98
store i32 1, i32* %7
store i32 0, i32* %7
store i32 0, i32* %2
br label %111
111: ; preds = %128, %110
%112 = load i32, i32* %2
%113 = sext i32 %112 to i64
%114 = icmp ult i64 %113, 1
br i1 %114, label %115, label %131
115: ; preds = %111
%116 = load i32, i32* %2
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [1 x i8*], [1 x i8*]* %11, i64 0, i64 %117
%119 = load i8*, i8** %118
%120 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %15, i32 0, i32 0
%121 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %120, i32 0, i32 0
%122 = load i32, i32* %121
%123 = call i32 @inet_ntoa(i32 %122)
%124 = call i64 (i8*, ...) @strcmp(i8* %119, i32 %123)
%125 = icmp eq i64 %124, 0
br i1 %125, label %126, label %127
126: ; preds = %115
store i32 1, i32* %7
br label %127
127: ; preds = %126, %115
br label %128
128: ; preds = %127
%129 = load i32, i32* %2
%130 = add nsw i32 %129, 1
store i32 %130, i32* %2
br label %111
131: ; preds = %111
%132 = load i32, i32* %7
%133 = icmp ne i32 %132, 0
br i1 %133, label %143, label %134
134: ; preds = %131
%135 = load i32, i32* @LOG_ERR
%136 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %15, i32 0, i32 0
%137 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %136, i32 0, i32 0
%138 = load i32, i32* %137
%139 = call i32 @inet_ntoa(i32 %138)
%140 = call i32 (i32, i8*, ...) @syslog(i32 %135, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.15, i64 0, i64 0), i32 %139)
%141 = load i32, i32* %5
%142 = call i32 @close(i32 %141)
br label %150
143: ; preds = %131
%144 = load i32, i32* @LOG_INFO
%145 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %15, i32 0, i32 0
%146 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %145, i32 0, i32 0
%147 = load i32, i32* %146
%148 = call i32 @inet_ntoa(i32 %147)
%149 = call i32 (i32, i8*, ...) @syslog(i32 %144, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i32 %148)
br label %150
150: ; preds = %143, %134
%151 = load i32, i32* %7
%152 = icmp ne i32 %151, 0
br i1 %152, label %153, label %188
153: ; preds = %150
store i32 0, i32* %2
br label %154
154: ; preds = %182, %153
%155 = load i32, i32* %2
%156 = sext i32 %155 to i64
%157 = icmp ult i64 %156, 4
br i1 %157, label %158, label %185
158: ; preds = %154
%159 = load i8*, i8** %12
%160 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%161 = call i8* @strcpy(i8* %159, i8* %160)
store i8* %161, i8** %12
%162 = load i8*, i8** %12
%163 = load i32, i32* %2
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [4 x i8*], [4 x i8*]* %10, i64 0, i64 %164
%166 = load i8*, i8** %165
%167 = call i8* @strcat(i8* %162, i8* %166)
store i8* %167, i8** %12
%168 = load i8*, i8** %12
%169 = call i32 @dircount(i8* %168)
store i32 %169, i32* %3
%170 = load i8*, i8** %13
%171 = load i32, i32* %2
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [4 x i8*], [4 x i8*]* %10, i64 0, i64 %172
%174 = load i8*, i8** %173
%175 = load i32, i32* %3
%176 = call i32 @sprintf(i8* %170, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* %174, i32 %175)
%177 = load i32, i32* %5
%178 = load i8*, i8** %13
%179 = load i8*, i8** %13
%180 = call i32 @strlen(i8* %179)
%181 = call i32 @send(i32 %177, i8* %178, i32 %180, i32 0)
br label %182
182: ; preds = %158
%183 = load i32, i32* %2
%184 = add nsw i32 %183, 1
store i32 %184, i32* %2
br label %154
185: ; preds = %154
%186 = load i32, i32* %5
%187 = call i32 @close(i32 %186)
br label %188
188: ; preds = %185, %150
br label %189
189: ; preds = %188
br label %98
}

LLVM IR (-O2):
%struct.sockaddr_in = type { %struct.TYPE_2__, i32, i32, i32 }
%struct.TYPE_2__ = type { i32 }
%struct.sockaddr = type { i32 }
@__const.main.spool = [20 x i8] c"/var/spool/postfix/\00"
@.str = [7 x i8] c"active\00"
@.str.1 = [9 x i8] c"deferred\00"
@.str.2 = [8 x i8] c"corrupt\00"
@.str.3 = [5 x i8] c"hold\00"
@.str.4 = [8 x i8] c"0.0.0.0\00"
@.str.5 = [13 x i8] c"queue_counts\00"
@LOG_PID = global i32 0
@LOG_LOCAL1 = global i32 0
@LOG_ERR = global i32 0
@.str.6 = [52 x i8] c"you must configure a server IP address, exiting...\0A\00"
@.str.7 = [46 x i8] c"unable to fork new child process, exiting...\0A\00"
@LOG_INFO = global i32 0
@.str.8 = [27 x i8] c"starting normal execution\0A\00"
@.str.9 = [2 x i8] c"/\00"
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@.str.10 = [37 x i8] c"unable to open socket %d, exiting...\00"
@INADDR_ANY = global i32 0
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
@.str.11 = [41 x i8] c"unable to set socket options, exiting...\00"
@.str.12 = [40 x i8] c"unable to bind to socket %d, exiting...\00"
@.str.13 = [53 x i8] c"unable to set backlog queue on socket %d, exiting...\00"
@LOG_WARNING = global i32 0
@.str.14 = [69 x i8] c"unable to accept connection from %s on socket %d, resuming operation\00"
@.str.15 = [48 x i8] c"rejected connection from %s, resuming operation\00"
@.str.16 = [28 x i8] c"accepted connection from %s\00"
@.str.17 = [7 x i8] c"%s:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [20 x i8]
%4 = alloca %struct.sockaddr_in
%5 = alloca %struct.sockaddr_in
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = bitcast %struct.sockaddr_in* %4 to i8*
%10 = bitcast %struct.sockaddr_in* %5 to i8*
%11 = call dereferenceable_or_null(255) i8* @malloc(i32 255)
%12 = tail call dereferenceable_or_null(255) i8* @malloc(i32 255)
%13 = load i32, i32* @LOG_PID
%14 = load i32, i32* @LOG_LOCAL1
%15 = tail call i32 @openlog(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %13, i32 %14)
%16 = tail call i64 (i8*, ...) @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %0
%19 = load i32, i32* @LOG_ERR
%20 = tail call i32 (i32, i8*, ...) @syslog(i32 %19, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
%21 = tail call i32 @exit(i32 -1)
unreachable
22: ; preds = %0
%23 = tail call i64 (...) @fork()
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = load i32, i32* @LOG_ERR
%27 = tail call i32 (i32, i8*, ...) @syslog(i32 %26, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%28 = tail call i32 @exit(i32 -1)
unreachable
29: ; preds = %22
%30 = icmp eq i64 %23, 0
br i1 %30, label %35, label %31
31: ; preds = %29
%32 = load i32, i32* @LOG_INFO
%33 = tail call i32 (i32, i8*, ...) @syslog(i32 %32, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%34 = tail call i32 @exit(i32 0)
unreachable
35: ; preds = %29
%36 = tail call i32 (...) @setsid()
%37 = tail call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%38 = tail call i32 @umask(i32 0)
%39 = load i32, i32* @AF_INET
%40 = load i32, i32* @SOCK_STREAM
%41 = tail call i32 @socket(i32 %39, i32 %40, i32 0)
%42 = icmp eq i32 %41, -1
br i1 %42, label %43, label %47
43: ; preds = %35
%44 = load i32, i32* @LOG_ERR
%45 = tail call i32 (i32, i8*, ...) @syslog(i32 %44, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i32 7678)
%46 = tail call i32 @exit(i32 -1)
unreachable
47: ; preds = %35
%48 = load i32, i32* @AF_INET
%49 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 3
store i32 %48, i32* %49
%50 = tail call i32 @htons(i32 7678)
%51 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 2
store i32 %50, i32* %51
%52 = load i32, i32* @INADDR_ANY
%53 = tail call i32 @htonl(i32 %52)
%54 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 0, i32 0
store i32 %53, i32* %54
%55 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i64 0, i32 1
%56 = call i32 @memset(i32* %55, i8 signext 0, i32 8)
%57 = load i32, i32* @SOL_SOCKET
%58 = load i32, i32* @SO_REUSEADDR
%59 = call i32 @setsockopt(i32 %41, i32 %57, i32 %58, i32* %2, i32 4)
%60 = icmp eq i32 %59, -1
br i1 %60, label %61, label %65
61: ; preds = %47
%62 = load i32, i32* @LOG_ERR
%63 = call i32 (i32, i8*, ...) @syslog(i32 %62, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%64 = call i32 @exit(i32 -1)
unreachable
65: ; preds = %47
%66 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%67 = call i32 @bind(i32 %41, %struct.sockaddr* %66, i32 4)
%68 = icmp eq i32 %67, -1
br i1 %68, label %69, label %73
69: ; preds = %65
%70 = load i32, i32* @LOG_ERR
%71 = call i32 (i32, i8*, ...) @syslog(i32 %70, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.12, i64 0, i64 0), i32 7678)
%72 = call i32 @exit(i32 -1)
unreachable
73: ; preds = %65
%74 = call i32 @listen(i32 %41, i32 5)
%75 = icmp eq i32 %74, -1
br i1 %75, label %79, label %76
76: ; preds = %73
%77 = bitcast %struct.sockaddr_in* %5 to %struct.sockaddr*
%78 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i64 0, i32 0, i32 0
br label %83
79: ; preds = %73
%80 = load i32, i32* @LOG_ERR
%81 = call i32 (i32, i8*, ...) @syslog(i32 %80, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.13, i64 0, i64 0), i32 7678)
%82 = call i32 @exit(i32 -1)
unreachable
83: ; preds = %137, %76
store i32 4, i32* %1
%84 = call i32 @accept(i32 %41, %struct.sockaddr* %77, i32* %1)
%85 = icmp eq i32 %84, -1
br i1 %85, label %86, label %91
86: ; preds = %83
%87 = load i32, i32* @LOG_WARNING
%88 = load i32, i32* %78
%89 = call i32 @inet_ntoa(i32 %88)
%90 = call i32 (i32, i8*, ...) @syslog(i32 %87, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.14, i64 0, i64 0), i32 %89, i32 7678)
br label %137
91: ; preds = %83
%92 = load i32, i32* %78
%93 = call i32 @inet_ntoa(i32 %92)
%94 = call i64 (i8*, ...) @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %93)
%95 = icmp eq i64 %94, 0
br i1 %95, label %102, label %96
96: ; preds = %91
%97 = load i32, i32* @LOG_ERR
%98 = load i32, i32* %78
%99 = call i32 @inet_ntoa(i32 %98)
%100 = call i32 (i32, i8*, ...) @syslog(i32 %97, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.15, i64 0, i64 0), i32 %99)
%101 = call i32 @close(i32 %84)
br label %137
102: ; preds = %91
%103 = load i32, i32* @LOG_INFO
%104 = load i32, i32* %78
%105 = call i32 @inet_ntoa(i32 %104)
%106 = call i32 (i32, i8*, ...) @syslog(i32 %103, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i32 %105)
%107 = call i8* @strcpy(i8* dereferenceable(1) %11, i8* %8)
%108 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %11)
%109 = getelementptr i8, i8* %11, i64 %108
%110 = call i32 @dircount(i8* %11)
%111 = call i32 @sprintf(i8* dereferenceable(1) %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %110)
%112 = call i32 @strlen(i8* %12)
%113 = call i32 @send(i32 %84, i8* %12, i32 %112, i32 0)
%114 = call i8* @strcpy(i8* dereferenceable(1) %11, i8* %8)
%115 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %11)
%116 = getelementptr i8, i8* %11, i64 %115
%117 = call i32 @dircount(i8* %11)
%118 = call i32 @sprintf(i8* dereferenceable(1) %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %117)
%119 = call i32 @strlen(i8* %12)
%120 = call i32 @send(i32 %84, i8* %12, i32 %119, i32 0)
%121 = call i8* @strcpy(i8* dereferenceable(1) %11, i8* %8)
%122 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %11)
%123 = getelementptr i8, i8* %11, i64 %122
%124 = bitcast i8* %123 to i64*
store i64 32774747032022883, i64* %124
%125 = call i32 @dircount(i8* %11)
%126 = call i32 @sprintf(i8* dereferenceable(1) %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %125)
%127 = call i32 @strlen(i8* %12)
%128 = call i32 @send(i32 %84, i8* %12, i32 %127, i32 0)
%129 = call i8* @strcpy(i8* dereferenceable(1) %11, i8* %8)
%130 = call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* %11)
%131 = getelementptr i8, i8* %11, i64 %130
%132 = call i32 @dircount(i8* %11)
%133 = call i32 @sprintf(i8* dereferenceable(1) %12, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %132)
%134 = call i32 @strlen(i8* %12)
%135 = call i32 @send(i32 %84, i8* %12, i32 %134, i32 0)
%136 = call i32 @close(i32 %84)
br label %137
137: ; preds = %102, %96, %86
br label %83
}