#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct passwd {
  char *pw_name;
  int /*<<< orphan*/ pw_gid;
  int /*<<< orphan*/ pw_uid;
};
struct group {
  char *gr_name;
};
typedef int pid_t;
typedef int /*<<< orphan*/ args;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ Basename(char *);
int /*<<< orphan*/ Help();
int /*<<< orphan*/ LOG_AUTH;
int LOG_CONS;
int LOG_NOWAIT;
int LOG_PID;
int /*<<< orphan*/ LOG_WARNING;
scalar_t__ PATH_MAX;
int /*<<< orphan*/ R_OK;
int /*<<< orphan*/ X_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
char *calloc(scalar_t__, int);
int execute(char **, char *, char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, scalar_t__, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
char *getenv(char *);
struct group *getgrgid(int /*<<< orphan*/);
int getppid();
struct passwd *getpwnam(char *);
struct passwd *getpwuid(int);
int getuid();
int /*<<< orphan*/ makedir(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char **, int /*<<< orphan*/, int);
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int setgid(int);
int setuid(int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, scalar_t__, char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ umask(int);
char *xstrcpy(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char *temp, *shell, *homedir, *args[16], *parent;
  int i;
  struct passwd *pwent, *pwuser;
  struct group *gr;
  pid_t ppid;
  FILE *fp;
  if (argc != 5)
    Help();
  for (i = 1; i < 5; i++) {
    if (strlen(argv[i]) > 80) {
      fprintf(stderr, "ftnuseradd: Argument %d is too long\n", i);
      exit(1);
    }
  }
  ppid = getuid();
  pwent = getpwuid(ppid);
  if (!pwent) {
    fprintf(stderr, "ftnuseradd: Cannot determine your user name.\n");
    exit(1);
  }
  if (strcmp(pwent->pw_name, (char *)"ftnd") &&
      strcmp(pwent->pw_name, (char *)"bbs")) {
    fprintf(stderr, "ftnuseradd: only users `ftnd' and `bbs' may do this.\n");
    exit(1);
  }
  gr = getgrgid(pwent->pw_gid);
  if (!gr) {
    fprintf(stderr, "ftnuseradd: Cannot determine group name.\n");
    exit(1);
  }
  if (strcmp(gr->gr_name, (char *)"bbs")) {
    fprintf(stderr, "ftnuseradd: You are not a member of group `bbs'.\n");
    exit(1);
  }
  temp = calloc(PATH_MAX, sizeof(char));
  ppid = getppid();
  snprintf(temp, PATH_MAX, "/proc/%d/cmdline", ppid);
  if ((fp = fopen(temp, "r")) == NULL) {
    fprintf(stderr, "ftnuseradd: can't read %s\n", temp);
    exit(1);
  }
  fgets(temp, PATH_MAX - 1, fp);
  fclose(fp);
  parent = xstrcpy(Basename(temp));
  if (strcmp((char *)"-ftnnewusr", parent)) {
    fprintf(stderr, "ftnuseradd: illegal parent \"%s\"\n", parent);
    free(temp);
    free(parent);
    exit(1);
  }
  memset(args, 0, sizeof(args));
  shell = calloc(PATH_MAX, sizeof(char));
  homedir = calloc(PATH_MAX, sizeof(char));
  if (setuid(0) == -1 || setgid(1) == -1) {
    perror("");
    fprintf(stderr, "ftnuseradd: Unable to setuid(root) or setgid(root)\n");
    fprintf(stderr, "Make sure that this program is set to -rwsr-sr-x\n");
    fprintf(stderr, "Owner must be root and group root\n");
    exit(1);
  }
  umask(0000);
  openlog("ftnuseradd", LOG_PID | LOG_CONS | LOG_NOWAIT, LOG_AUTH);
  syslog(LOG_WARNING, "ftnuseradd %s %s %s %s", argv[1], argv[2], argv[3],
         argv[4]);
  if ((access("/usr/bin/useradd", R_OK)) == 0)
    args[0] = (char *)"/usr/bin/useradd";
  else if ((access("/bin/useradd", R_OK)) == 0)
    args[0] = (char *)"/bin/useradd";
  else if ((access("/usr/sbin/useradd", R_OK)) == 0)
    args[0] = (char *)"/usr/sbin/useradd";
  else if ((access("/sbin/useradd", R_OK)) == 0)
    args[0] = (char *)"/sbin/useradd";
  else {
    syslog(LOG_WARNING, "Can't find useradd");
    exit(1);
  }
  snprintf(shell, PATH_MAX, "%s/bin/ftnbbs", getenv("FTND_ROOT"));
  snprintf(homedir, PATH_MAX, "%s/%s", argv[4], argv[2]);
  args[1] = (char *)"-c";
  args[2] = argv[3];
  args[3] = (char *)"-d";
  args[4] = homedir;
  args[5] = (char *)"-g";
  args[6] = argv[1];
  args[7] = (char *)"-s";
  args[8] = shell;
  args[9] = argv[2];
  args[10] = NULL;
  if (execute(args, (char *)"/dev/tty", (char *)"/dev/tty",
              (char *)"/dev/tty") != 0) {
    syslog(LOG_WARNING, "Failed to create unix account");
    exit(1);
  }
  syslog(LOG_WARNING, "Created Unix account");
  if ((pwent = getpwnam((char *)"ftnd")) == NULL) {
    syslog(LOG_WARNING, "Can't get password entry for \"ftnd\"");
    exit(2);
  }
  if ((access(argv[4], R_OK)) != 0) {
    syslog(LOG_WARNING, "No bbs base homedirectory, creating..");
    makedir(argv[4], 0770, pwent->pw_uid, pwent->pw_gid);
  }
  if ((access(homedir, R_OK)) == 0) {
    if ((access("/bin/rm", X_OK)) == 0)
      args[0] = (char *)"/bin/rm";
    else if ((access("/usr/bin/rm", X_OK)) == 0)
      args[0] = (char *)"/usr/bin/rm";
    else {
      syslog(LOG_WARNING, "Can't find rm");
      exit(2);
    }
    args[1] = (char *)"-Rf";
    args[2] = homedir;
    args[3] = NULL;
    i = execute(args, (char *)"/dev/tty", (char *)"/dev/tty",
                (char *)"/dev/tty");
    if (i != 0) {
      syslog(LOG_WARNING, "Unable remove old home directory");
      exit(2);
    }
  }
  if ((pwuser = getpwnam(argv[2])) == NULL) {
    syslog(LOG_WARNING, "Can't get passwd entry for %s", argv[2]);
    exit(2);
  }
  makedir(homedir, 0770, pwuser->pw_uid, pwent->pw_gid);
  snprintf(temp, PATH_MAX, "%s/%s/Maildir", argv[4], argv[2]);
  makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
  snprintf(temp, PATH_MAX, "%s/%s/Maildir/cur", argv[4], argv[2]);
  makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
  snprintf(temp, PATH_MAX, "%s/%s/Maildir/new", argv[4], argv[2]);
  makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
  snprintf(temp, PATH_MAX, "%s/%s/Maildir/tmp", argv[4], argv[2]);
  makedir(temp, 0700, pwuser->pw_uid, pwent->pw_gid);
  free(shell);
  free(temp);
  free(homedir);
  syslog(LOG_WARNING, "Added system account for user\"%s\"", argv[2]);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     12fa <main+0x2a>
mov    $0x0,%al
call   1060 <Help@plt>
movl   $0x1,-0xbc(%rbp)
cmpl   $0x5,-0xbc(%rbp)
jge    136e <main+0x9e>
mov    -0x10(%rbp),%rax
movslq -0xbc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1080 <strlen@plt>
cmp    $0x50,%eax
jle    1355 <main+0x85>
mov    0x2c83(%rip),%rax
mov    (%rax),%edi
mov    -0xbc(%rbp),%edx
lea    0xcbc(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
jmp    135a <main+0x8a>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
jmp    1304 <main+0x34>
mov    $0x0,%al
call   1090 <getuid@plt>
mov    %eax,-0xdc(%rbp)
mov    -0xdc(%rbp),%edi
call   1070 <getpwuid@plt>
mov    %rax,-0xc8(%rbp)
cmpq   $0x0,-0xc8(%rbp)
jne    13bc <main+0xec>
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
lea    0xc7a(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    -0xc8(%rbp),%rax
mov    (%rax),%rdi
lea    0xc86(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
je     141d <main+0x14d>
mov    -0xc8(%rbp),%rax
mov    (%rax),%rdi
lea    0xe40(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
je     141d <main+0x14d>
mov    0x2bb5(%rip),%rax
mov    (%rax),%edi
lea    0xc4c(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%edi
call   10a0 <getgrgid@plt>
mov    %rax,-0xd8(%rbp)
cmpq   $0x0,-0xd8(%rbp)
jne    1462 <main+0x192>
mov    0x2b70(%rip),%rax
mov    (%rax),%edi
lea    0xc3d(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    -0xd8(%rbp),%rax
mov    (%rax),%rdi
lea    0xdba(%rip),%rsi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
je     14a3 <main+0x1d3>
mov    0x2b2f(%rip),%rax
mov    (%rax),%edi
lea    0xc26(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    0x2b46(%rip),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   11c0 <getppid@plt>
mov    %eax,-0xdc(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2b1d(%rip),%rax
mov    (%rax),%rsi
mov    -0xdc(%rbp),%ecx
lea    0xc07(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe47(%rip),%rsi
call   1190 <fopen@plt>
mov    %rax,-0xe8(%rbp)
cmp    $0x0,%rax
jne    1530 <main+0x260>
mov    0x2aa6(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xbdc(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    0x2ab5(%rip),%rax
mov    (%rax),%rsi
sub    $0x1,%rsi
mov    -0xe8(%rbp),%rdx
call   10e0 <fgets@plt>
mov    -0xe8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1140 <Basename@plt>
mov    %eax,%edi
call   11f0 <xstrcpy@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rsi
lea    0xb97(%rip),%rdi
call   1100 <strcmp@plt>
cmp    $0x0,%rax
je     15cb <main+0x2fb>
mov    0x2a23(%rip),%rax
mov    (%rax),%edi
mov    -0xb8(%rbp),%rdx
lea    0xb7c(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    -0xb8(%rbp),%rdi
call   1040 <free@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   10c0 <memset@plt>
mov    0x2a0b(%rip),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    0x29f3(%rip),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,-0x28(%rbp)
xor    %edi,%edi
call   11e0 <setuid@plt>
cmp    $0xffffffff,%eax
je     1631 <main+0x361>
mov    $0x1,%edi
call   1170 <setgid@plt>
cmp    $0xffffffff,%eax
jne    168c <main+0x3bc>
lea    0xb09(%rip),%rdi
call   11a0 <perror@plt>
mov    0x2974(%rip),%rax
mov    (%rax),%edi
lea    0xaf5(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    0x295d(%rip),%rax
mov    (%rax),%edi
lea    0xb12(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    0x2946(%rip),%rax
mov    (%rax),%edi
lea    0xb2d(%rip),%rsi
mov    $0x0,%al
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
xor    %edi,%edi
call   1130 <umask@plt>
mov    0x2926(%rip),%rax
mov    (%rax),%esi
mov    0x290d(%rip),%rax
or     (%rax),%esi
mov    0x28fc(%rip),%rax
or     (%rax),%esi
mov    0x292b(%rip),%rax
mov    (%rax),%edx
lea    0xb0d(%rip),%rdi
call   11b0 <openlog@plt>
mov    0x290e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%r8
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r9
lea    0xae3(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    0x289f(%rip),%rax
mov    (%rax),%esi
lea    0xae3(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    172c <main+0x45c>
lea    0xacd(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    17f2 <main+0x522>
mov    0x286d(%rip),%rax
mov    (%rax),%esi
lea    0xab5(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    175e <main+0x48e>
lea    0xa9f(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    17ed <main+0x51d>
mov    0x283b(%rip),%rax
mov    (%rax),%esi
lea    0xa90(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    1790 <main+0x4c0>
lea    0xa7a(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    17e8 <main+0x518>
mov    0x2809(%rip),%rax
mov    (%rax),%esi
lea    0xa62(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    17c2 <main+0x4f2>
lea    0xa4c(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    17e3 <main+0x513>
mov    0x280f(%rip),%rax
mov    (%rax),%edi
lea    0xa3e(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
jmp    17e8 <main+0x518>
jmp    17ed <main+0x51d>
jmp    17f2 <main+0x522>
mov    -0x20(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    0x27ec(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0xf0(%rbp)
lea    0xa1c(%rip),%rdi
call   1030 <getenv@plt>
mov    -0xf8(%rbp),%rdi
mov    -0xf0(%rbp),%rsi
mov    %rax,%rcx
lea    0x9f1(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x28(%rbp),%rdi
mov    0x27ac(%rip),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
lea    0x9dd(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
lea    0x9d5(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0xa0(%rbp)
lea    0x9bb(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    0x9a5(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x80(%rbp)
lea    0x98e(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x60(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0x963(%rip),%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   10d0 <execute@plt>
cmp    $0x0,%eax
je     191f <main+0x64f>
mov    0x26d3(%rip),%rax
mov    (%rax),%edi
lea    0x948(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    0x26b2(%rip),%rax
mov    (%rax),%edi
lea    0x945(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
lea    0x716(%rip),%rdi
call   1110 <getpwnam@plt>
mov    %rax,-0xc8(%rbp)
cmp    $0x0,%rax
jne    1974 <main+0x6a4>
mov    0x267e(%rip),%rax
mov    (%rax),%edi
lea    0x926(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
mov    0x261d(%rip),%rax
mov    (%rax),%esi
call   1180 <access@plt>
cmp    $0x0,%rax
je     19d1 <main+0x701>
mov    0x263d(%rip),%rax
mov    (%rax),%edi
lea    0x909(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
mov    -0xc8(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1f8,%esi
call   1150 <makedir@plt>
mov    -0x28(%rbp),%rdi
mov    0x25c4(%rip),%rax
mov    (%rax),%esi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    1aed <main+0x81d>
mov    0x25dc(%rip),%rax
mov    (%rax),%esi
lea    0x8da(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    1a1f <main+0x74f>
lea    0x8c4(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    1a77 <main+0x7a7>
mov    0x25aa(%rip),%rax
mov    (%rax),%esi
lea    0x8a4(%rip),%rdi
call   1180 <access@plt>
cmp    $0x0,%rax
jne    1a51 <main+0x781>
lea    0x88e(%rip),%rax
mov    %rax,-0xb0(%rbp)
jmp    1a72 <main+0x7a2>
mov    0x2580(%rip),%rax
mov    (%rax),%edi
lea    0x87e(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
jmp    1a77 <main+0x7a7>
lea    0x86f(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movq   $0x0,-0x98(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0x7a4(%rip),%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   10d0 <execute@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x0,-0xbc(%rbp)
je     1ae8 <main+0x818>
mov    0x250a(%rip),%rax
mov    (%rax),%edi
lea    0x81a(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
jmp    1aed <main+0x81d>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1110 <getpwnam@plt>
mov    %rax,-0xd0(%rbp)
cmp    $0x0,%rax
jne    1b34 <main+0x864>
mov    0x24c6(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0x7ef(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1f8,%esi
call   1150 <makedir@plt>
mov    -0x18(%rbp),%rdi
mov    0x248f(%rip),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
lea    0x7b5(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    -0x18(%rbp),%rdi
mov    0x2441(%rip),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
lea    0x775(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    -0x18(%rbp),%rdi
mov    0x23f3(%rip),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
lea    0x739(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    -0x18(%rbp),%rdi
mov    0x23a5(%rip),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%r8
lea    0x6fd(%rip),%rdx
mov    $0x0,%al
call   10b0 <snprintf@plt>
mov    -0x18(%rbp),%rdi
mov    -0xd0(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0xc8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
mov    0x2328(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0x6b3(%rip),%rsi
mov    $0x0,%al
call   1160 <syslog@plt>
xor    %edi,%edi
call   11d0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rsi,%rbx
cmp    $0x5,%edi
je     12f0 <main+0x20>
xor    %eax,%eax
call   1060 <Help@plt>
mov    0x8(%rbx),%rdi
call   1080 <strlen@plt>
mov    $0x1,%edx
cmp    $0x51,%eax
jge    133c <main+0x6c>
mov    0x10(%rbx),%rdi
call   1080 <strlen@plt>
mov    $0x2,%edx
cmp    $0x50,%eax
jg     133c <main+0x6c>
mov    0x18(%rbx),%rdi
call   1080 <strlen@plt>
mov    $0x3,%edx
cmp    $0x50,%eax
jg     133c <main+0x6c>
mov    0x20(%rbx),%rdi
call   1080 <strlen@plt>
mov    $0x4,%edx
cmp    $0x50,%eax
jle    135d <main+0x8d>
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
lea    0xcb4(%rip),%rsi
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
xor    %eax,%eax
call   1090 <getuid@plt>
mov    %eax,%edi
call   1070 <getpwuid@plt>
test   %rax,%rax
jne    1385 <main+0xb5>
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
lea    0xca5(%rip),%rsi
jmp    147f <main+0x1af>
mov    %rax,%rbp
mov    (%rax),%rdi
lea    0xcc1(%rip),%rsi
call   1100 <strcmp@plt>
test   %rax,%rax
je     13b5 <main+0xe5>
mov    0x0(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1100 <strcmp@plt>
test   %rax,%rax
jne    145d <main+0x18d>
mov    0x8(%rbp),%edi
call   10a0 <getgrgid@plt>
test   %rax,%rax
jne    13d7 <main+0x107>
mov    0x2bef(%rip),%rax
mov    (%rax),%edi
lea    0xcbc(%rip),%rsi
jmp    147f <main+0x1af>
mov    (%rax),%rdi
lea    0xe4c(%rip),%rsi
call   1100 <strcmp@plt>
test   %rax,%rax
jne    146f <main+0x19f>
mov    0x2bfa(%rip),%r13
mov    0x0(%r13),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,%r14
xor    %eax,%eax
call   11c0 <getppid@plt>
mov    0x0(%r13),%rsi
lea    0xcd1(%rip),%rdx
mov    %r14,%rdi
mov    %eax,%ecx
xor    %eax,%eax
call   10b0 <snprintf@plt>
lea    0xf10(%rip),%rsi
mov    %r14,%rdi
call   1190 <fopen@plt>
test   %rax,%rax
jne    1490 <main+0x1c0>
mov    0x2b78(%rip),%rax
mov    (%rax),%edi
lea    0xcb2(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    0x2b54(%rip),%rax
mov    (%rax),%edi
lea    0xbeb(%rip),%rsi
jmp    147f <main+0x1af>
mov    0x2b42(%rip),%rax
mov    (%rax),%edi
lea    0xc39(%rip),%rsi
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    %rax,%rbp
mov    0x0(%r13),%rsi
add    $0xffffffffffffffff,%rsi
mov    %r14,%rdi
mov    %rax,%rdx
call   10e0 <fgets@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    %r14,%rdi
call   1140 <Basename@plt>
mov    %eax,%edi
call   11f0 <xstrcpy@plt>
mov    %rax,%rbp
lea    0xc4f(%rip),%rdi
mov    %rax,%rsi
call   1100 <strcmp@plt>
test   %rax,%rax
jne    1567 <main+0x297>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   10c0 <memset@plt>
mov    0x0(%r13),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,%rbp
mov    0x0(%r13),%rdi
mov    $0x1,%esi
call   10f0 <calloc@plt>
mov    %rax,%r15
xor    %edi,%edi
call   11e0 <setuid@plt>
cmp    $0xffffffff,%eax
je     1526 <main+0x256>
mov    $0x1,%edi
call   1170 <setgid@plt>
cmp    $0xffffffff,%eax
jne    159b <main+0x2cb>
lea    0xc14(%rip),%rdi
call   11a0 <perror@plt>
mov    0x2a7f(%rip),%rbx
mov    (%rbx),%edi
lea    0xc00(%rip),%rsi
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    (%rbx),%edi
lea    0xc24(%rip),%rsi
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    (%rbx),%edi
lea    0xc46(%rip),%rsi
jmp    147f <main+0x1af>
mov    0x2a4a(%rip),%rax
mov    (%rax),%edi
lea    0xbaa(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1120 <fprintf@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    %rbp,(%rsp)
xor    %edi,%edi
call   1130 <umask@plt>
mov    0x2a13(%rip),%rax
mov    0x29fc(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x29e9(%rip),%rax
or     (%rax),%esi
mov    0x2a18(%rip),%rax
mov    (%rax),%edx
lea    0xbfa(%rip),%rdi
call   11b0 <openlog@plt>
mov    0x29fb(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
mov    0x10(%rbx),%rcx
mov    0x18(%rbx),%r8
mov    0x20(%rbx),%r9
lea    0xbe0(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
mov    0x299c(%rip),%r12
mov    (%r12),%esi
lea    0xbde(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
je     1672 <main+0x3a2>
mov    (%r12),%esi
lea    0xbca(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
je     1672 <main+0x3a2>
mov    0x2965(%rip),%rax
mov    (%rax),%esi
lea    0xbba(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
je     1672 <main+0x3a2>
mov    0x2948(%rip),%rax
mov    (%rax),%esi
lea    0xba1(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
jne    19bc <main+0x6ec>
mov    %rbp,0x10(%rsp)
mov    (%rsp),%r12
mov    0x0(%r13),%rbp
lea    0xbab(%rip),%rdi
call   1030 <getenv@plt>
lea    0xb91(%rip),%rdx
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rax,%rcx
xor    %eax,%eax
call   10b0 <snprintf@plt>
mov    0x0(%r13),%rsi
mov    0x10(%rbx),%r8
mov    0x20(%rbx),%rcx
lea    0xb86(%rip),%rdx
mov    %r15,%rdi
xor    %eax,%eax
call   10b0 <snprintf@plt>
lea    0xb7b(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0x18(%rbx),%rax
mov    %rax,0x20(%rsp)
lea    0xb69(%rip),%rax
mov    %rax,0x28(%rsp)
mov    %r15,0x30(%rsp)
lea    0xb5b(%rip),%rax
mov    %rax,0x38(%rsp)
mov    0x8(%rbx),%rax
mov    %rax,0x40(%rsp)
lea    0xb49(%rip),%rax
mov    %rax,0x48(%rsp)
mov    %r12,0x50(%rsp)
mov    0x10(%rbx),%rax
mov    %rax,0x58(%rsp)
movq   $0x0,0x60(%rsp)
lea    0xb29(%rip),%rcx
lea    0x10(%rsp),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
call   10d0 <execute@plt>
mov    0x289d(%rip),%rbp
mov    0x0(%rbp),%edi
test   %eax,%eax
jne    1781 <main+0x4b1>
lea    0xb2b(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
lea    0x8fc(%rip),%rdi
call   1110 <getpwnam@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    1799 <main+0x4c9>
mov    0x0(%rbp),%edi
lea    0xb19(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
lea    0xace(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
mov    $0x1,%edi
call   11d0 <exit@plt>
mov    0x20(%rbx),%rdi
mov    0x27fc(%rip),%rax
mov    (%rax),%esi
call   1180 <access@plt>
test   %rax,%rax
je     17da <main+0x50a>
mov    0x0(%rbp),%edi
lea    0xaf3(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
mov    0x20(%rbx),%rdi
mov    0x8(%rsp),%rax
mov    0x8(%rax),%ecx
mov    0xc(%rax),%edx
mov    $0x1f8,%esi
call   1150 <makedir@plt>
mov    0x27bf(%rip),%rax
mov    (%rax),%esi
mov    %r15,%rdi
call   1180 <access@plt>
test   %rax,%rax
jne    1869 <main+0x599>
mov    0x27d9(%rip),%r12
mov    (%r12),%esi
lea    0xad5(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
je     182b <main+0x55b>
mov    (%r12),%esi
lea    0xab9(%rip),%rbp
mov    %rbp,%rdi
call   1180 <access@plt>
test   %rax,%rax
jne    19e6 <main+0x716>
mov    %rbp,0x10(%rsp)
lea    0xab6(%rip),%rax
mov    %rax,0x18(%rsp)
mov    %r15,0x20(%rsp)
movq   $0x0,0x28(%rsp)
lea    0x9fc(%rip),%rcx
lea    0x10(%rsp),%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
call   10d0 <execute@plt>
test   %eax,%eax
jne    19d1 <main+0x701>
mov    0x10(%rbx),%rdi
call   1110 <getpwnam@plt>
test   %rax,%rax
jne    189c <main+0x5cc>
mov    0x275a(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rbx),%rdx
lea    0xa87(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
mov    $0x2,%edi
call   11d0 <exit@plt>
mov    %rax,%rbp
mov    0xc(%rax),%edx
mov    0x8(%rsp),%r12
mov    0x8(%r12),%ecx
mov    %r15,%rdi
mov    $0x1f8,%esi
call   1150 <makedir@plt>
mov    0x0(%r13),%rsi
mov    0x10(%rbx),%r8
mov    0x20(%rbx),%rcx
lea    0xa64(%rip),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <snprintf@plt>
mov    0xc(%rbp),%edx
mov    0x8(%r12),%ecx
mov    %r14,%rdi
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    0x0(%r13),%rsi
mov    0x10(%rbx),%r8
mov    0x20(%rbx),%rcx
lea    0xa40(%rip),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <snprintf@plt>
mov    0xc(%rbp),%edx
mov    0x8(%r12),%ecx
mov    %r14,%rdi
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    0x0(%r13),%rsi
mov    0x10(%rbx),%r8
mov    0x20(%rbx),%rcx
lea    0xa20(%rip),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <snprintf@plt>
mov    0xc(%rbp),%edx
mov    0x8(%r12),%ecx
mov    %r14,%rdi
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    0x0(%r13),%rsi
mov    0x10(%rbx),%r8
mov    0x20(%rbx),%rcx
lea    0xa00(%rip),%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   10b0 <snprintf@plt>
mov    0xc(%rbp),%edx
mov    0x8(%r12),%ecx
mov    %r14,%rdi
mov    $0x1c0,%esi
call   1150 <makedir@plt>
mov    (%rsp),%rdi
call   1040 <free@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    %r15,%rdi
call   1040 <free@plt>
mov    0x2637(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rbx),%rdx
lea    0x9c6(%rip),%rsi
xor    %eax,%eax
call   1160 <syslog@plt>
xor    %edi,%edi
call   11d0 <exit@plt>
mov    0x2615(%rip),%rax
mov    (%rax),%edi
lea    0x844(%rip),%rsi
jmp    1788 <main+0x4b8>
mov    0x2600(%rip),%rax
mov    (%rax),%edi
lea    0x910(%rip),%rsi
jmp    1770 <main+0x4a0>
mov    0x25eb(%rip),%rax
mov    (%rax),%edi
lea    0x8e9(%rip),%rsi
jmp    1770 <main+0x4a0>

LLVM IR (-O0):
%struct.passwd = type { i8*, i32, i32 }
%struct.group = type { i8* }
@stderr = global i32 0
@.str = [37 x i8] c"ftnuseradd: Argument %d is too long\0A\00"
@.str.1 = [46 x i8] c"ftnuseradd: Cannot determine your user name.\0A\00"
@.str.2 = [5 x i8] c"ftnd\00"
@.str.3 = [4 x i8] c"bbs\00"
@.str.4 = [54 x i8] c"ftnuseradd: only users `ftnd' and `bbs' may do this.\0A\00"
@.str.5 = [42 x i8] c"ftnuseradd: Cannot determine group name.\0A\00"
@.str.6 = [50 x i8] c"ftnuseradd: You are not a member of group `bbs'.\0A\00"
@PATH_MAX = global i64 0
@.str.7 = [17 x i8] c"/proc/%d/cmdline\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [27 x i8] c"ftnuseradd: can't read %s\0A\00"
@.str.10 = [11 x i8] c"-ftnnewusr\00"
@.str.11 = [33 x i8] c"ftnuseradd: illegal parent \22%s\22\0A\00"
@.str.12 = [1 x i8] zeroinitializer
@.str.13 = [52 x i8] c"ftnuseradd: Unable to setuid(root) or setgid(root)\0A\00"
@.str.14 = [50 x i8] c"Make sure that this program is set to -rwsr-sr-x\0A\00"
@.str.15 = [35 x i8] c"Owner must be root and group root\0A\00"
@.str.16 = [11 x i8] c"ftnuseradd\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_NOWAIT = global i32 0
@LOG_AUTH = global i32 0
@LOG_WARNING = global i32 0
@.str.17 = [23 x i8] c"ftnuseradd %s %s %s %s\00"
@.str.18 = [17 x i8] c"/usr/bin/useradd\00"
@R_OK = global i32 0
@.str.19 = [13 x i8] c"/bin/useradd\00"
@.str.20 = [18 x i8] c"/usr/sbin/useradd\00"
@.str.21 = [14 x i8] c"/sbin/useradd\00"
@.str.22 = [19 x i8] c"Can't find useradd\00"
@.str.23 = [14 x i8] c"%s/bin/ftnbbs\00"
@.str.24 = [10 x i8] c"FTND_ROOT\00"
@.str.25 = [6 x i8] c"%s/%s\00"
@.str.26 = [3 x i8] c"-c\00"
@.str.27 = [3 x i8] c"-d\00"
@.str.28 = [3 x i8] c"-g\00"
@.str.29 = [3 x i8] c"-s\00"
@.str.30 = [9 x i8] c"/dev/tty\00"
@.str.31 = [30 x i8] c"Failed to create unix account\00"
@.str.32 = [21 x i8] c"Created Unix account\00"
@.str.33 = [36 x i8] c"Can't get password entry for \22ftnd\22\00"
@.str.34 = [38 x i8] c"No bbs base homedirectory, creating..\00"
@.str.35 = [8 x i8] c"/bin/rm\00"
@X_OK = global i32 0
@.str.36 = [12 x i8] c"/usr/bin/rm\00"
@.str.37 = [14 x i8] c"Can't find rm\00"
@.str.38 = [4 x i8] c"-Rf\00"
@.str.39 = [33 x i8] c"Unable remove old home directory\00"
@.str.40 = [30 x i8] c"Can't get passwd entry for %s\00"
@.str.41 = [14 x i8] c"%s/%s/Maildir\00"
@.str.42 = [18 x i8] c"%s/%s/Maildir/cur\00"
@.str.43 = [18 x i8] c"%s/%s/Maildir/new\00"
@.str.44 = [18 x i8] c"%s/%s/Maildir/tmp\00"
@.str.45 = [34 x i8] c"Added system account for user\22%s\22\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [16 x i8*]
%10 = alloca i8*
%11 = alloca i32
%12 = alloca %struct.passwd*
%13 = alloca %struct.passwd*
%14 = alloca %struct.group*
%15 = alloca i32
%16 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 5
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 (...) @Help()
br label %21
21: ; preds = %19, %2
store i32 1, i32* %11
br label %22
22: ; preds = %39, %21
%23 = load i32, i32* %11
%24 = icmp slt i32 %23, 5
br i1 %24, label %25, label %42
25: ; preds = %22
%26 = load i8**, i8*** %5
%27 = load i32, i32* %11
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i32 @strlen(i8* %30)
%32 = icmp sgt i32 %31, 80
br i1 %32, label %33, label %38
33: ; preds = %25
%34 = load i32, i32* @stderr
%35 = load i32, i32* %11
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %25
br label %39
39: ; preds = %38
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 1
store i32 %41, i32* %11
br label %22
42: ; preds = %22
%43 = call i32 (...) @getuid()
store i32 %43, i32* %15
%44 = load i32, i32* %15
%45 = call %struct.passwd* @getpwuid(i32 %44)
store %struct.passwd* %45, %struct.passwd** %12
%46 = load %struct.passwd*, %struct.passwd** %12
%47 = icmp ne %struct.passwd* %46, null
br i1 %47, label %52, label %48
48: ; preds = %42
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%51 = call i32 @exit(i32 1)
unreachable
52: ; preds = %42
%53 = load %struct.passwd*, %struct.passwd** %12
%54 = getelementptr inbounds %struct.passwd, %struct.passwd* %53, i32 0, i32 0
%55 = load i8*, i8** %54
%56 = call i64 @strcmp(i8* %55, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %68
58: ; preds = %52
%59 = load %struct.passwd*, %struct.passwd** %12
%60 = getelementptr inbounds %struct.passwd, %struct.passwd* %59, i32 0, i32 0
%61 = load i8*, i8** %60
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %68
64: ; preds = %58
%65 = load i32, i32* @stderr
%66 = call i32 (i32, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%67 = call i32 @exit(i32 1)
unreachable
68: ; preds = %58, %52
%69 = load %struct.passwd*, %struct.passwd** %12
%70 = getelementptr inbounds %struct.passwd, %struct.passwd* %69, i32 0, i32 1
%71 = load i32, i32* %70
%72 = call %struct.group* @getgrgid(i32 %71)
store %struct.group* %72, %struct.group** %14
%73 = load %struct.group*, %struct.group** %14
%74 = icmp ne %struct.group* %73, null
br i1 %74, label %79, label %75
75: ; preds = %68
%76 = load i32, i32* @stderr
%77 = call i32 (i32, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%78 = call i32 @exit(i32 1)
unreachable
79: ; preds = %68
%80 = load %struct.group*, %struct.group** %14
%81 = getelementptr inbounds %struct.group, %struct.group* %80, i32 0, i32 0
%82 = load i8*, i8** %81
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %89
85: ; preds = %79
%86 = load i32, i32* @stderr
%87 = call i32 (i32, i8*, ...) @fprintf(i32 %86, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%88 = call i32 @exit(i32 1)
unreachable
89: ; preds = %79
%90 = load i64, i64* @PATH_MAX
%91 = call i8* @calloc(i64 %90, i32 1)
store i8* %91, i8** %6
%92 = call i32 (...) @getppid()
store i32 %92, i32* %15
%93 = load i8*, i8** %6
%94 = load i64, i64* @PATH_MAX
%95 = load i32, i32* %15
%96 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %93, i64 %94, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %95)
%97 = load i8*, i8** %6
%98 = call i32* @fopen(i8* %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %98, i32** %16
%99 = icmp eq i32* %98, null
br i1 %99, label %100, label %105
100: ; preds = %89
%101 = load i32, i32* @stderr
%102 = load i8*, i8** %6
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8* %102)
%104 = call i32 @exit(i32 1)
unreachable
105: ; preds = %89
%106 = load i8*, i8** %6
%107 = load i64, i64* @PATH_MAX
%108 = sub nsw i64 %107, 1
%109 = load i32*, i32** %16
%110 = call i32 @fgets(i8* %106, i64 %108, i32* %109)
%111 = load i32*, i32** %16
%112 = call i32 @fclose(i32* %111)
%113 = load i8*, i8** %6
%114 = call i32 @Basename(i8* %113)
%115 = call i8* @xstrcpy(i32 %114)
store i8* %115, i8** %10
%116 = load i8*, i8** %10
%117 = call i64 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* %116)
%118 = icmp ne i64 %117, 0
br i1 %118, label %119, label %128
119: ; preds = %105
%120 = load i32, i32* @stderr
%121 = load i8*, i8** %10
%122 = call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i8* %121)
%123 = load i8*, i8** %6
%124 = call i32 @free(i8* %123)
%125 = load i8*, i8** %10
%126 = call i32 @free(i8* %125)
%127 = call i32 @exit(i32 1)
unreachable
128: ; preds = %105
%129 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
%130 = call i32 @memset(i8** %129, i32 0, i32 128)
%131 = load i64, i64* @PATH_MAX
%132 = call i8* @calloc(i64 %131, i32 1)
store i8* %132, i8** %7
%133 = load i64, i64* @PATH_MAX
%134 = call i8* @calloc(i64 %133, i32 1)
store i8* %134, i8** %8
%135 = call i32 @setuid(i32 0)
%136 = icmp eq i32 %135, -1
br i1 %136, label %140, label %137
137: ; preds = %128
%138 = call i32 @setgid(i32 1)
%139 = icmp eq i32 %138, -1
br i1 %139, label %140, label %149
140: ; preds = %137, %128
%141 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0))
%142 = load i32, i32* @stderr
%143 = call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
%144 = load i32, i32* @stderr
%145 = call i32 (i32, i8*, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0))
%146 = load i32, i32* @stderr
%147 = call i32 (i32, i8*, ...) @fprintf(i32 %146, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%148 = call i32 @exit(i32 1)
unreachable
149: ; preds = %137
%150 = call i32 @umask(i32 0)
%151 = load i32, i32* @LOG_PID
%152 = load i32, i32* @LOG_CONS
%153 = or i32 %151, %152
%154 = load i32, i32* @LOG_NOWAIT
%155 = or i32 %153, %154
%156 = load i32, i32* @LOG_AUTH
%157 = call i32 @openlog(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32 %155, i32 %156)
%158 = load i32, i32* @LOG_WARNING
%159 = load i8**, i8*** %5
%160 = getelementptr inbounds i8*, i8** %159, i64 1
%161 = load i8*, i8** %160
%162 = load i8**, i8*** %5
%163 = getelementptr inbounds i8*, i8** %162, i64 2
%164 = load i8*, i8** %163
%165 = load i8**, i8*** %5
%166 = getelementptr inbounds i8*, i8** %165, i64 3
%167 = load i8*, i8** %166
%168 = load i8**, i8*** %5
%169 = getelementptr inbounds i8*, i8** %168, i64 4
%170 = load i8*, i8** %169
%171 = call i32 (i32, i8*, ...) @syslog(i32 %158, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %161, i8* %164, i8* %167, i8* %170)
%172 = load i32, i32* @R_OK
%173 = call i64 @access(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i32 %172)
%174 = icmp eq i64 %173, 0
br i1 %174, label %175, label %177
175: ; preds = %149
%176 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i8** %176
br label %202
177: ; preds = %149
%178 = load i32, i32* @R_OK
%179 = call i64 @access(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %178)
%180 = icmp eq i64 %179, 0
br i1 %180, label %181, label %183
181: ; preds = %177
%182 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8** %182
br label %201
183: ; preds = %177
%184 = load i32, i32* @R_OK
%185 = call i64 @access(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.20, i64 0, i64 0), i32 %184)
%186 = icmp eq i64 %185, 0
br i1 %186, label %187, label %189
187: ; preds = %183
%188 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.20, i64 0, i64 0), i8** %188
br label %200
189: ; preds = %183
%190 = load i32, i32* @R_OK
%191 = call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i32 %190)
%192 = icmp eq i64 %191, 0
br i1 %192, label %193, label %195
193: ; preds = %189
%194 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i8** %194
br label %199
195: ; preds = %189
%196 = load i32, i32* @LOG_WARNING
%197 = call i32 (i32, i8*, ...) @syslog(i32 %196, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
%198 = call i32 @exit(i32 1)
unreachable
199: ; preds = %193
br label %200
200: ; preds = %199, %187
br label %201
201: ; preds = %200, %181
br label %202
202: ; preds = %201, %175
%203 = load i8*, i8** %7
%204 = load i64, i64* @PATH_MAX
%205 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0))
%206 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %203, i64 %204, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0), i8* %205)
%207 = load i8*, i8** %8
%208 = load i64, i64* @PATH_MAX
%209 = load i8**, i8*** %5
%210 = getelementptr inbounds i8*, i8** %209, i64 4
%211 = load i8*, i8** %210
%212 = load i8**, i8*** %5
%213 = getelementptr inbounds i8*, i8** %212, i64 2
%214 = load i8*, i8** %213
%215 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %207, i64 %208, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0), i8* %211, i8* %214)
%216 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0), i8** %216
%217 = load i8**, i8*** %5
%218 = getelementptr inbounds i8*, i8** %217, i64 3
%219 = load i8*, i8** %218
%220 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 2
store i8* %219, i8** %220
%221 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8** %221
%222 = load i8*, i8** %8
%223 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 4
store i8* %222, i8** %223
%224 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8** %224
%225 = load i8**, i8*** %5
%226 = getelementptr inbounds i8*, i8** %225, i64 1
%227 = load i8*, i8** %226
%228 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 6
store i8* %227, i8** %228
%229 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %229
%230 = load i8*, i8** %7
%231 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 8
store i8* %230, i8** %231
%232 = load i8**, i8*** %5
%233 = getelementptr inbounds i8*, i8** %232, i64 2
%234 = load i8*, i8** %233
%235 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 9
store i8* %234, i8** %235
%236 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 10
store i8* null, i8** %236
%237 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
%238 = call i32 @execute(i8** %237, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
%239 = icmp ne i32 %238, 0
br i1 %239, label %240, label %244
240: ; preds = %202
%241 = load i32, i32* @LOG_WARNING
%242 = call i32 (i32, i8*, ...) @syslog(i32 %241, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0))
%243 = call i32 @exit(i32 1)
unreachable
244: ; preds = %202
%245 = load i32, i32* @LOG_WARNING
%246 = call i32 (i32, i8*, ...) @syslog(i32 %245, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.32, i64 0, i64 0))
%247 = call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store %struct.passwd* %247, %struct.passwd** %12
%248 = icmp eq %struct.passwd* %247, null
br i1 %248, label %249, label %253
249: ; preds = %244
%250 = load i32, i32* @LOG_WARNING
%251 = call i32 (i32, i8*, ...) @syslog(i32 %250, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
%252 = call i32 @exit(i32 2)
unreachable
253: ; preds = %244
%254 = load i8**, i8*** %5
%255 = getelementptr inbounds i8*, i8** %254, i64 4
%256 = load i8*, i8** %255
%257 = load i32, i32* @R_OK
%258 = call i64 @access(i8* %256, i32 %257)
%259 = icmp ne i64 %258, 0
br i1 %259, label %260, label %273
260: ; preds = %253
%261 = load i32, i32* @LOG_WARNING
%262 = call i32 (i32, i8*, ...) @syslog(i32 %261, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.34, i64 0, i64 0))
%263 = load i8**, i8*** %5
%264 = getelementptr inbounds i8*, i8** %263, i64 4
%265 = load i8*, i8** %264
%266 = load %struct.passwd*, %struct.passwd** %12
%267 = getelementptr inbounds %struct.passwd, %struct.passwd* %266, i32 0, i32 2
%268 = load i32, i32* %267
%269 = load %struct.passwd*, %struct.passwd** %12
%270 = getelementptr inbounds %struct.passwd, %struct.passwd* %269, i32 0, i32 1
%271 = load i32, i32* %270
%272 = call i32 @makedir(i8* %265, i32 504, i32 %268, i32 %271)
br label %273
273: ; preds = %260, %253
%274 = load i8*, i8** %8
%275 = load i32, i32* @R_OK
%276 = call i64 @access(i8* %274, i32 %275)
%277 = icmp eq i64 %276, 0
br i1 %277, label %278, label %309
278: ; preds = %273
%279 = load i32, i32* @X_OK
%280 = call i64 @access(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i32 %279)
%281 = icmp eq i64 %280, 0
br i1 %281, label %282, label %284
282: ; preds = %278
%283 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i8** %283
br label %295
284: ; preds = %278
%285 = load i32, i32* @X_OK
%286 = call i64 @access(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0), i32 %285)
%287 = icmp eq i64 %286, 0
br i1 %287, label %288, label %290
288: ; preds = %284
%289 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0), i8** %289
br label %294
290: ; preds = %284
%291 = load i32, i32* @LOG_WARNING
%292 = call i32 (i32, i8*, ...) @syslog(i32 %291, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.37, i64 0, i64 0))
%293 = call i32 @exit(i32 2)
unreachable
294: ; preds = %288
br label %295
295: ; preds = %294, %282
%296 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.38, i64 0, i64 0), i8** %296
%297 = load i8*, i8** %8
%298 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 2
store i8* %297, i8** %298
%299 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 3
store i8* null, i8** %299
%300 = getelementptr inbounds [16 x i8*], [16 x i8*]* %9, i64 0, i64 0
%301 = call i32 @execute(i8** %300, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
store i32 %301, i32* %11
%302 = load i32, i32* %11
%303 = icmp ne i32 %302, 0
br i1 %303, label %304, label %308
304: ; preds = %295
%305 = load i32, i32* @LOG_WARNING
%306 = call i32 (i32, i8*, ...) @syslog(i32 %305, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.39, i64 0, i64 0))
%307 = call i32 @exit(i32 2)
unreachable
308: ; preds = %295
br label %309
309: ; preds = %308, %273
%310 = load i8**, i8*** %5
%311 = getelementptr inbounds i8*, i8** %310, i64 2
%312 = load i8*, i8** %311
%313 = call %struct.passwd* @getpwnam(i8* %312)
store %struct.passwd* %313, %struct.passwd** %13
%314 = icmp eq %struct.passwd* %313, null
br i1 %314, label %315, label %322
315: ; preds = %309
%316 = load i32, i32* @LOG_WARNING
%317 = load i8**, i8*** %5
%318 = getelementptr inbounds i8*, i8** %317, i64 2
%319 = load i8*, i8** %318
%320 = call i32 (i32, i8*, ...) @syslog(i32 %316, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.40, i64 0, i64 0), i8* %319)
%321 = call i32 @exit(i32 2)
unreachable
322: ; preds = %309
%323 = load i8*, i8** %8
%324 = load %struct.passwd*, %struct.passwd** %13
%325 = getelementptr inbounds %struct.passwd, %struct.passwd* %324, i32 0, i32 2
%326 = load i32, i32* %325
%327 = load %struct.passwd*, %struct.passwd** %12
%328 = getelementptr inbounds %struct.passwd, %struct.passwd* %327, i32 0, i32 1
%329 = load i32, i32* %328
%330 = call i32 @makedir(i8* %323, i32 504, i32 %326, i32 %329)
%331 = load i8*, i8** %6
%332 = load i64, i64* @PATH_MAX
%333 = load i8**, i8*** %5
%334 = getelementptr inbounds i8*, i8** %333, i64 4
%335 = load i8*, i8** %334
%336 = load i8**, i8*** %5
%337 = getelementptr inbounds i8*, i8** %336, i64 2
%338 = load i8*, i8** %337
%339 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %331, i64 %332, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.41, i64 0, i64 0), i8* %335, i8* %338)
%340 = load i8*, i8** %6
%341 = load %struct.passwd*, %struct.passwd** %13
%342 = getelementptr inbounds %struct.passwd, %struct.passwd* %341, i32 0, i32 2
%343 = load i32, i32* %342
%344 = load %struct.passwd*, %struct.passwd** %12
%345 = getelementptr inbounds %struct.passwd, %struct.passwd* %344, i32 0, i32 1
%346 = load i32, i32* %345
%347 = call i32 @makedir(i8* %340, i32 448, i32 %343, i32 %346)
%348 = load i8*, i8** %6
%349 = load i64, i64* @PATH_MAX
%350 = load i8**, i8*** %5
%351 = getelementptr inbounds i8*, i8** %350, i64 4
%352 = load i8*, i8** %351
%353 = load i8**, i8*** %5
%354 = getelementptr inbounds i8*, i8** %353, i64 2
%355 = load i8*, i8** %354
%356 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %348, i64 %349, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.42, i64 0, i64 0), i8* %352, i8* %355)
%357 = load i8*, i8** %6
%358 = load %struct.passwd*, %struct.passwd** %13
%359 = getelementptr inbounds %struct.passwd, %struct.passwd* %358, i32 0, i32 2
%360 = load i32, i32* %359
%361 = load %struct.passwd*, %struct.passwd** %12
%362 = getelementptr inbounds %struct.passwd, %struct.passwd* %361, i32 0, i32 1
%363 = load i32, i32* %362
%364 = call i32 @makedir(i8* %357, i32 448, i32 %360, i32 %363)
%365 = load i8*, i8** %6
%366 = load i64, i64* @PATH_MAX
%367 = load i8**, i8*** %5
%368 = getelementptr inbounds i8*, i8** %367, i64 4
%369 = load i8*, i8** %368
%370 = load i8**, i8*** %5
%371 = getelementptr inbounds i8*, i8** %370, i64 2
%372 = load i8*, i8** %371
%373 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %365, i64 %366, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.43, i64 0, i64 0), i8* %369, i8* %372)
%374 = load i8*, i8** %6
%375 = load %struct.passwd*, %struct.passwd** %13
%376 = getelementptr inbounds %struct.passwd, %struct.passwd* %375, i32 0, i32 2
%377 = load i32, i32* %376
%378 = load %struct.passwd*, %struct.passwd** %12
%379 = getelementptr inbounds %struct.passwd, %struct.passwd* %378, i32 0, i32 1
%380 = load i32, i32* %379
%381 = call i32 @makedir(i8* %374, i32 448, i32 %377, i32 %380)
%382 = load i8*, i8** %6
%383 = load i64, i64* @PATH_MAX
%384 = load i8**, i8*** %5
%385 = getelementptr inbounds i8*, i8** %384, i64 4
%386 = load i8*, i8** %385
%387 = load i8**, i8*** %5
%388 = getelementptr inbounds i8*, i8** %387, i64 2
%389 = load i8*, i8** %388
%390 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %382, i64 %383, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.44, i64 0, i64 0), i8* %386, i8* %389)
%391 = load i8*, i8** %6
%392 = load %struct.passwd*, %struct.passwd** %13
%393 = getelementptr inbounds %struct.passwd, %struct.passwd* %392, i32 0, i32 2
%394 = load i32, i32* %393
%395 = load %struct.passwd*, %struct.passwd** %12
%396 = getelementptr inbounds %struct.passwd, %struct.passwd* %395, i32 0, i32 1
%397 = load i32, i32* %396
%398 = call i32 @makedir(i8* %391, i32 448, i32 %394, i32 %397)
%399 = load i8*, i8** %7
%400 = call i32 @free(i8* %399)
%401 = load i8*, i8** %6
%402 = call i32 @free(i8* %401)
%403 = load i8*, i8** %8
%404 = call i32 @free(i8* %403)
%405 = load i32, i32* @LOG_WARNING
%406 = load i8**, i8*** %5
%407 = getelementptr inbounds i8*, i8** %406, i64 2
%408 = load i8*, i8** %407
%409 = call i32 (i32, i8*, ...) @syslog(i32 %405, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.45, i64 0, i64 0), i8* %408)
%410 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i32, i32 }
%struct.group = type { i8* }
@stderr = global i32 0
@.str = [37 x i8] c"ftnuseradd: Argument %d is too long\0A\00"
@.str.1 = [46 x i8] c"ftnuseradd: Cannot determine your user name.\0A\00"
@.str.2 = [5 x i8] c"ftnd\00"
@.str.3 = [4 x i8] c"bbs\00"
@.str.4 = [54 x i8] c"ftnuseradd: only users `ftnd' and `bbs' may do this.\0A\00"
@.str.5 = [42 x i8] c"ftnuseradd: Cannot determine group name.\0A\00"
@.str.6 = [50 x i8] c"ftnuseradd: You are not a member of group `bbs'.\0A\00"
@PATH_MAX = global i64 0
@.str.7 = [17 x i8] c"/proc/%d/cmdline\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [27 x i8] c"ftnuseradd: can't read %s\0A\00"
@.str.10 = [11 x i8] c"-ftnnewusr\00"
@.str.11 = [33 x i8] c"ftnuseradd: illegal parent \22%s\22\0A\00"
@.str.12 = [1 x i8] zeroinitializer
@.str.13 = [52 x i8] c"ftnuseradd: Unable to setuid(root) or setgid(root)\0A\00"
@.str.14 = [50 x i8] c"Make sure that this program is set to -rwsr-sr-x\0A\00"
@.str.15 = [35 x i8] c"Owner must be root and group root\0A\00"
@.str.16 = [11 x i8] c"ftnuseradd\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_NOWAIT = global i32 0
@LOG_AUTH = global i32 0
@LOG_WARNING = global i32 0
@.str.17 = [23 x i8] c"ftnuseradd %s %s %s %s\00"
@.str.18 = [17 x i8] c"/usr/bin/useradd\00"
@R_OK = global i32 0
@.str.19 = [13 x i8] c"/bin/useradd\00"
@.str.20 = [18 x i8] c"/usr/sbin/useradd\00"
@.str.21 = [14 x i8] c"/sbin/useradd\00"
@.str.22 = [19 x i8] c"Can't find useradd\00"
@.str.23 = [14 x i8] c"%s/bin/ftnbbs\00"
@.str.24 = [10 x i8] c"FTND_ROOT\00"
@.str.25 = [6 x i8] c"%s/%s\00"
@.str.26 = [3 x i8] c"-c\00"
@.str.27 = [3 x i8] c"-d\00"
@.str.28 = [3 x i8] c"-g\00"
@.str.29 = [3 x i8] c"-s\00"
@.str.30 = [9 x i8] c"/dev/tty\00"
@.str.31 = [30 x i8] c"Failed to create unix account\00"
@.str.32 = [21 x i8] c"Created Unix account\00"
@.str.33 = [36 x i8] c"Can't get password entry for \22ftnd\22\00"
@.str.34 = [38 x i8] c"No bbs base homedirectory, creating..\00"
@.str.35 = [8 x i8] c"/bin/rm\00"
@X_OK = global i32 0
@.str.36 = [12 x i8] c"/usr/bin/rm\00"
@.str.37 = [14 x i8] c"Can't find rm\00"
@.str.38 = [4 x i8] c"-Rf\00"
@.str.39 = [33 x i8] c"Unable remove old home directory\00"
@.str.40 = [30 x i8] c"Can't get passwd entry for %s\00"
@.str.41 = [14 x i8] c"%s/%s/Maildir\00"
@.str.42 = [18 x i8] c"%s/%s/Maildir/cur\00"
@.str.43 = [18 x i8] c"%s/%s/Maildir/new\00"
@.str.44 = [18 x i8] c"%s/%s/Maildir/tmp\00"
@.str.45 = [34 x i8] c"Added system account for user\22%s\22\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8*]
%4 = bitcast [16 x i8*]* %3 to i8*
%5 = icmp eq i32 %0, 5
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @Help()
br label %8
8: ; preds = %6, %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @strlen(i8* %10)
%12 = icmp sgt i32 %11, 80
br i1 %12, label %13, label %18
13: ; preds = %28, %23, %18, %8
%14 = phi i32 [ 1, %8 ], [ 2, %18 ], [ 3, %23 ], [ 4, %28 ]
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %14)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %8
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = tail call i32 @strlen(i8* %20)
%22 = icmp sgt i32 %21, 80
br i1 %22, label %13, label %23
23: ; preds = %18
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = tail call i32 @strlen(i8* %25)
%27 = icmp sgt i32 %26, 80
br i1 %27, label %13, label %28
28: ; preds = %23
%29 = getelementptr inbounds i8*, i8** %1, i64 4
%30 = load i8*, i8** %29
%31 = tail call i32 @strlen(i8* %30)
%32 = icmp sgt i32 %31, 80
br i1 %32, label %13, label %33
33: ; preds = %28
%34 = tail call i32 (...) @getuid()
%35 = tail call %struct.passwd* @getpwuid(i32 %34)
%36 = icmp eq %struct.passwd* %35, null
br i1 %36, label %37, label %41
37: ; preds = %33
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%40 = tail call i32 @exit(i32 1)
unreachable
41: ; preds = %33
%42 = getelementptr inbounds %struct.passwd, %struct.passwd* %35, i64 0, i32 0
%43 = load i8*, i8** %42
%44 = tail call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %54, label %46
46: ; preds = %41
%47 = load i8*, i8** %42
%48 = tail call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %54, label %50
50: ; preds = %46
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
%53 = tail call i32 @exit(i32 1)
unreachable
54: ; preds = %46, %41
%55 = getelementptr inbounds %struct.passwd, %struct.passwd* %35, i64 0, i32 1
%56 = load i32, i32* %55
%57 = tail call %struct.group* @getgrgid(i32 %56)
%58 = icmp eq %struct.group* %57, null
br i1 %58, label %59, label %63
59: ; preds = %54
%60 = load i32, i32* @stderr
%61 = tail call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%62 = tail call i32 @exit(i32 1)
unreachable
63: ; preds = %54
%64 = getelementptr inbounds %struct.group, %struct.group* %57, i64 0, i32 0
%65 = load i8*, i8** %64
%66 = tail call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %72, label %68
68: ; preds = %63
%69 = load i32, i32* @stderr
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %69, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%71 = tail call i32 @exit(i32 1)
unreachable
72: ; preds = %63
%73 = load i64, i64* @PATH_MAX
%74 = tail call i8* @calloc(i64 %73, i32 1)
%75 = tail call i32 (...) @getppid()
%76 = load i64, i64* @PATH_MAX
%77 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %74, i64 %76, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 %75)
%78 = tail call i32* @fopen(i8* %74, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %84
80: ; preds = %72
%81 = load i32, i32* @stderr
%82 = tail call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8* %74)
%83 = tail call i32 @exit(i32 1)
unreachable
84: ; preds = %72
%85 = load i64, i64* @PATH_MAX
%86 = add nsw i64 %85, -1
%87 = tail call i32 @fgets(i8* %74, i64 %86, i32* %78)
%88 = tail call i32 @fclose(i32* %78)
%89 = tail call i32 @Basename(i8* %74)
%90 = tail call i8* @xstrcpy(i32 %89)
%91 = tail call i64 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8* %90)
%92 = icmp eq i64 %91, 0
br i1 %92, label %99, label %93
93: ; preds = %84
%94 = load i32, i32* @stderr
%95 = tail call i32 (i32, i8*, ...) @fprintf(i32 %94, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i8* %90)
%96 = tail call i32 @free(i8* %74)
%97 = tail call i32 @free(i8* %90)
%98 = tail call i32 @exit(i32 1)
unreachable
99: ; preds = %84
%100 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 0
%101 = call i32 @memset(i8** %100, i32 0, i32 128)
%102 = load i64, i64* @PATH_MAX
%103 = call i8* @calloc(i64 %102, i32 1)
%104 = load i64, i64* @PATH_MAX
%105 = call i8* @calloc(i64 %104, i32 1)
%106 = call i32 @setuid(i32 0)
%107 = icmp eq i32 %106, -1
br i1 %107, label %111, label %108
108: ; preds = %99
%109 = call i32 @setgid(i32 1)
%110 = icmp eq i32 %109, -1
br i1 %110, label %111, label %120
111: ; preds = %108, %99
%112 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0))
%113 = load i32, i32* @stderr
%114 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
%115 = load i32, i32* @stderr
%116 = call i32 (i32, i8*, ...) @fprintf(i32 %115, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.14, i64 0, i64 0))
%117 = load i32, i32* @stderr
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
%119 = call i32 @exit(i32 1)
unreachable
120: ; preds = %108
%121 = call i32 @umask(i32 0)
%122 = load i32, i32* @LOG_PID
%123 = load i32, i32* @LOG_CONS
%124 = or i32 %123, %122
%125 = load i32, i32* @LOG_NOWAIT
%126 = or i32 %124, %125
%127 = load i32, i32* @LOG_AUTH
%128 = call i32 @openlog(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32 %126, i32 %127)
%129 = load i32, i32* @LOG_WARNING
%130 = load i8*, i8** %9
%131 = load i8*, i8** %19
%132 = load i8*, i8** %24
%133 = load i8*, i8** %29
%134 = call i32 (i32, i8*, ...) @syslog(i32 %129, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i8* %130, i8* %131, i8* %132, i8* %133)
%135 = load i32, i32* @R_OK
%136 = call i64 @access(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i32 %135)
%137 = icmp eq i64 %136, 0
br i1 %137, label %138, label %139
138: ; preds = %120
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i64 0, i64 0), i8** %100
br label %158
139: ; preds = %120
%140 = load i32, i32* @R_OK
%141 = call i64 @access(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %140)
%142 = icmp eq i64 %141, 0
br i1 %142, label %143, label %144
143: ; preds = %139
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i8** %100
br label %158
144: ; preds = %139
%145 = load i32, i32* @R_OK
%146 = call i64 @access(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.20, i64 0, i64 0), i32 %145)
%147 = icmp eq i64 %146, 0
br i1 %147, label %148, label %149
148: ; preds = %144
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.20, i64 0, i64 0), i8** %100
br label %158
149: ; preds = %144
%150 = load i32, i32* @R_OK
%151 = call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i32 %150)
%152 = icmp eq i64 %151, 0
br i1 %152, label %153, label %154
153: ; preds = %149
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0), i8** %100
br label %158
154: ; preds = %149
%155 = load i32, i32* @LOG_WARNING
%156 = call i32 (i32, i8*, ...) @syslog(i32 %155, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.22, i64 0, i64 0))
%157 = call i32 @exit(i32 1)
unreachable
158: ; preds = %143, %153, %148, %138
%159 = load i64, i64* @PATH_MAX
%160 = call i8* @getenv(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0))
%161 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %103, i64 %159, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.23, i64 0, i64 0), i8* %160)
%162 = load i64, i64* @PATH_MAX
%163 = load i8*, i8** %29
%164 = load i8*, i8** %19
%165 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %105, i64 %162, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0), i8* %163, i8* %164)
%166 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i64 0, i64 0), i8** %166
%167 = load i8*, i8** %24
%168 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 2
store i8* %167, i8** %168
%169 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i8** %169
%170 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 4
store i8* %105, i8** %170
%171 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i64 0, i64 0), i8** %171
%172 = load i8*, i8** %9
%173 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 6
store i8* %172, i8** %173
%174 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i8** %174
%175 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 8
store i8* %103, i8** %175
%176 = load i8*, i8** %19
%177 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 9
store i8* %176, i8** %177
%178 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 10
store i8* null, i8** %178
%179 = call i32 @execute(i8** %100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
%180 = icmp eq i32 %179, 0
%181 = load i32, i32* @LOG_WARNING
br i1 %180, label %185, label %182
182: ; preds = %158
%183 = call i32 (i32, i8*, ...) @syslog(i32 %181, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.31, i64 0, i64 0))
%184 = call i32 @exit(i32 1)
unreachable
185: ; preds = %158
%186 = call i32 (i32, i8*, ...) @syslog(i32 %181, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.32, i64 0, i64 0))
%187 = call %struct.passwd* @getpwnam(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%188 = icmp eq %struct.passwd* %187, null
br i1 %188, label %189, label %193
189: ; preds = %185
%190 = load i32, i32* @LOG_WARNING
%191 = call i32 (i32, i8*, ...) @syslog(i32 %190, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
%192 = call i32 @exit(i32 2)
unreachable
193: ; preds = %185
%194 = load i8*, i8** %29
%195 = load i32, i32* @R_OK
%196 = call i64 @access(i8* %194, i32 %195)
%197 = icmp eq i64 %196, 0
br i1 %197, label %207, label %198
198: ; preds = %193
%199 = load i32, i32* @LOG_WARNING
%200 = call i32 (i32, i8*, ...) @syslog(i32 %199, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.34, i64 0, i64 0))
%201 = load i8*, i8** %29
%202 = getelementptr inbounds %struct.passwd, %struct.passwd* %187, i64 0, i32 2
%203 = load i32, i32* %202
%204 = getelementptr inbounds %struct.passwd, %struct.passwd* %187, i64 0, i32 1
%205 = load i32, i32* %204
%206 = call i32 @makedir(i8* %201, i32 504, i32 %203, i32 %205)
br label %207
207: ; preds = %198, %193
%208 = load i32, i32* @R_OK
%209 = call i64 @access(i8* %105, i32 %208)
%210 = icmp eq i64 %209, 0
br i1 %210, label %211, label %231
211: ; preds = %207
%212 = load i32, i32* @X_OK
%213 = call i64 @access(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i32 %212)
%214 = icmp eq i64 %213, 0
br i1 %214, label %223, label %215
215: ; preds = %211
%216 = load i32, i32* @X_OK
%217 = call i64 @access(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0), i32 %216)
%218 = icmp eq i64 %217, 0
br i1 %218, label %223, label %219
219: ; preds = %215
%220 = load i32, i32* @LOG_WARNING
%221 = call i32 (i32, i8*, ...) @syslog(i32 %220, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.37, i64 0, i64 0))
%222 = call i32 @exit(i32 2)
unreachable
223: ; preds = %215, %211
%224 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), %211 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.36, i64 0, i64 0), %215 ]
store i8* %224, i8** %100
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.38, i64 0, i64 0), i8** %166
store i8* %105, i8** %168
store i8* null, i8** %169
%225 = call i32 @execute(i8** %100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
%226 = icmp eq i32 %225, 0
br i1 %226, label %231, label %227
227: ; preds = %223
%228 = load i32, i32* @LOG_WARNING
%229 = call i32 (i32, i8*, ...) @syslog(i32 %228, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.39, i64 0, i64 0))
%230 = call i32 @exit(i32 2)
unreachable
231: ; preds = %223, %207
%232 = load i8*, i8** %19
%233 = call %struct.passwd* @getpwnam(i8* %232)
%234 = icmp eq %struct.passwd* %233, null
br i1 %234, label %235, label %240
235: ; preds = %231
%236 = load i32, i32* @LOG_WARNING
%237 = load i8*, i8** %19
%238 = call i32 (i32, i8*, ...) @syslog(i32 %236, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.40, i64 0, i64 0), i8* %237)
%239 = call i32 @exit(i32 2)
unreachable
240: ; preds = %231
%241 = getelementptr inbounds %struct.passwd, %struct.passwd* %233, i64 0, i32 2
%242 = load i32, i32* %241
%243 = getelementptr inbounds %struct.passwd, %struct.passwd* %187, i64 0, i32 1
%244 = load i32, i32* %243
%245 = call i32 @makedir(i8* %105, i32 504, i32 %242, i32 %244)
%246 = load i64, i64* @PATH_MAX
%247 = load i8*, i8** %29
%248 = load i8*, i8** %19
%249 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %74, i64 %246, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.41, i64 0, i64 0), i8* %247, i8* %248)
%250 = load i32, i32* %241
%251 = load i32, i32* %243
%252 = call i32 @makedir(i8* %74, i32 448, i32 %250, i32 %251)
%253 = load i64, i64* @PATH_MAX
%254 = load i8*, i8** %29
%255 = load i8*, i8** %19
%256 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %74, i64 %253, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.42, i64 0, i64 0), i8* %254, i8* %255)
%257 = load i32, i32* %241
%258 = load i32, i32* %243
%259 = call i32 @makedir(i8* %74, i32 448, i32 %257, i32 %258)
%260 = load i64, i64* @PATH_MAX
%261 = load i8*, i8** %29
%262 = load i8*, i8** %19
%263 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %74, i64 %260, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.43, i64 0, i64 0), i8* %261, i8* %262)
%264 = load i32, i32* %241
%265 = load i32, i32* %243
%266 = call i32 @makedir(i8* %74, i32 448, i32 %264, i32 %265)
%267 = load i64, i64* @PATH_MAX
%268 = load i8*, i8** %29
%269 = load i8*, i8** %19
%270 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %74, i64 %267, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.44, i64 0, i64 0), i8* %268, i8* %269)
%271 = load i32, i32* %241
%272 = load i32, i32* %243
%273 = call i32 @makedir(i8* %74, i32 448, i32 %271, i32 %272)
%274 = call i32 @free(i8* %103)
%275 = call i32 @free(i8* %74)
%276 = call i32 @free(i8* %105)
%277 = load i32, i32* @LOG_WARNING
%278 = load i8*, i8** %19
%279 = call i32 (i32, i8*, ...) @syslog(i32 %277, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.45, i64 0, i64 0), i8* %278)
%280 = call i32 @exit(i32 0)
unreachable
}