#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 pwent_data {
  int dummy;
};
struct passwd {
  char *pw_name;
  char *pw_passwd;
  char *pw_gecos;
  char *pw_dir;
  char *pw_shell;
  void *pw_gid;
  void *pw_uid;
};

/* Variables and functions */
char *strpbrk(char *, char *);
void *strtoul(char *, char **, int);
int _nss_directories_parse_pwent(char *line, struct passwd *result,
                                 struct pwent_data *data, size_t datalen,
                                 int *errnop) {
  char *p = strpbrk(line, "\n");
  if (p != NULL)
    *p = '\0';
  {
    result->pw_name = line;
    while (*line != '\0' && !((*line) == ':'))
      ++line;
    if (*line != '\0') {
      *line = '\0';
      do
        ++line;
      while (0 && ((*line) == ':'));
    }
  };
  if (line[0] == '\0' &&
      (result->pw_name[0] == '+' || result->pw_name[0] == '-')) {
    result->pw_passwd = NULL;
    result->pw_uid = 0;
    result->pw_gid = 0;
    result->pw_gecos = NULL;
    result->pw_dir = NULL;
    result->pw_shell = NULL;
  } else {
    {
      result->pw_passwd = line;
      while (*line != '\0' && !((*line) == ':'))
        ++line;
      if (*line != '\0') {
        *line = '\0';
        do
          ++line;
        while (0 && ((*line) == ':'));
      }
    };
    if (result->pw_name[0] == '+' || result->pw_name[0] == '-') {
      {
        char *endp;
        if (*line == '\0')
          return 0;
        result->pw_uid = (strtoul(line, &endp, 10));
        if (endp == line)
          result->pw_uid = 0;
        if (((*endp) == ':'))
          do
            ++endp;
          while (0 && ((*endp) == ':'));
        else if (*endp != '\0')
          return 0;
        line = endp;
      }
      {
        char *endp;
        if (*line == '\0')
          return 0;
        result->pw_gid = (strtoul(line, &endp, 10));
        if (endp == line)
          result->pw_gid = 0;
        if (((*endp) == ':'))
          do
            ++endp;
          while (0 && ((*endp) == ':'));
        else if (*endp != '\0')
          return 0;
        line = endp;
      }
    } else {
      {
        char *endp;
        result->pw_uid = (strtoul(line, &endp, 10));
        if (endp == line)
          return 0;
        else if (((*endp) == ':'))
          do
            ++endp;
          while (0 && ((*endp) == ':'));
        else if (*endp != '\0')
          return 0;
        line = endp;
      }
      {
        char *endp;
        result->pw_gid = (strtoul(line, &endp, 10));
        if (endp == line)
          return 0;
        else if (((*endp) == ':'))
          do
            ++endp;
          while (0 && ((*endp) == ':'));
        else if (*endp != '\0')
          return 0;
        line = endp;
      }
    }
    {
      result->pw_gecos = line;
      while (*line != '\0' && !((*line) == ':'))
        ++line;
      if (*line != '\0') {
        *line = '\0';
        do
          ++line;
        while (0 && ((*line) == ':'));
      }
    };
    {
      result->pw_dir = line;
      while (*line != '\0' && !((*line) == ':'))
        ++line;
      if (*line != '\0') {
        *line = '\0';
        do
          ++line;
        while (0 && ((*line) == ':'));
      }
    };
    result->pw_shell = line;
  };
  ;
  return 1;
}


x86 assembly (clang, -O0):
<_nss_directories_parse_pwent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1162 <_nss_directories_parse_pwent+0x42>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x59(%rbp)
je     1194 <_nss_directories_parse_pwent+0x74>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
xor    $0xff,%al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    11a4 <_nss_directories_parse_pwent+0x84>
jmp    11b5 <_nss_directories_parse_pwent+0x95>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    116d <_nss_directories_parse_pwent+0x4d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11dd <_nss_directories_parse_pwent+0xbd>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11dd <_nss_directories_parse_pwent+0xbd>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1260 <_nss_directories_parse_pwent+0x140>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1213 <_nss_directories_parse_pwent+0xf3>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1260 <_nss_directories_parse_pwent+0x140>
mov    -0x18(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,0x30(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,0x28(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,0x10(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,0x18(%rax)
mov    -0x18(%rbp),%rax
movq   $0x0,0x20(%rax)
jmp    1665 <_nss_directories_parse_pwent+0x545>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5a(%rbp)
je     1293 <_nss_directories_parse_pwent+0x173>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
xor    $0xff,%al
mov    %al,-0x5a(%rbp)
mov    -0x5a(%rbp),%al
test   $0x1,%al
jne    12a3 <_nss_directories_parse_pwent+0x183>
jmp    12b4 <_nss_directories_parse_pwent+0x194>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    126c <_nss_directories_parse_pwent+0x14c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     12dc <_nss_directories_parse_pwent+0x1bc>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    12dc <_nss_directories_parse_pwent+0x1bc>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1302 <_nss_directories_parse_pwent+0x1e2>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    144b <_nss_directories_parse_pwent+0x32b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    131e <_nss_directories_parse_pwent+0x1fe>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x40(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1355 <_nss_directories_parse_pwent+0x235>
mov    -0x18(%rbp),%rax
movq   $0x0,0x30(%rax)
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    137b <_nss_directories_parse_pwent+0x25b>
jmp    136a <_nss_directories_parse_pwent+0x24a>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    139c <_nss_directories_parse_pwent+0x27c>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1397 <_nss_directories_parse_pwent+0x277>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
jmp    139c <_nss_directories_parse_pwent+0x27c>
mov    -0x40(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    13c0 <_nss_directories_parse_pwent+0x2a0>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
mov    -0x10(%rbp),%rdi
lea    -0x48(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x48(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    13f7 <_nss_directories_parse_pwent+0x2d7>
mov    -0x18(%rbp),%rax
movq   $0x0,0x28(%rax)
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    141d <_nss_directories_parse_pwent+0x2fd>
jmp    140c <_nss_directories_parse_pwent+0x2ec>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    143e <_nss_directories_parse_pwent+0x31e>
mov    -0x48(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1439 <_nss_directories_parse_pwent+0x319>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
jmp    143e <_nss_directories_parse_pwent+0x31e>
mov    -0x48(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1561 <_nss_directories_parse_pwent+0x441>
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x50(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1482 <_nss_directories_parse_pwent+0x362>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    14a8 <_nss_directories_parse_pwent+0x388>
jmp    1497 <_nss_directories_parse_pwent+0x377>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    14c9 <_nss_directories_parse_pwent+0x3a9>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14c4 <_nss_directories_parse_pwent+0x3a4>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
jmp    14c9 <_nss_directories_parse_pwent+0x3a9>
jmp    14ce <_nss_directories_parse_pwent+0x3ae>
mov    -0x50(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x58(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x58(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    150d <_nss_directories_parse_pwent+0x3ed>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1533 <_nss_directories_parse_pwent+0x413>
jmp    1522 <_nss_directories_parse_pwent+0x402>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1554 <_nss_directories_parse_pwent+0x434>
mov    -0x58(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     154f <_nss_directories_parse_pwent+0x42f>
movl   $0x0,-0x4(%rbp)
jmp    166c <_nss_directories_parse_pwent+0x54c>
jmp    1554 <_nss_directories_parse_pwent+0x434>
jmp    1559 <_nss_directories_parse_pwent+0x439>
mov    -0x58(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5b(%rbp)
je     1594 <_nss_directories_parse_pwent+0x474>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
xor    $0xff,%al
mov    %al,-0x5b(%rbp)
mov    -0x5b(%rbp),%al
test   $0x1,%al
jne    15a4 <_nss_directories_parse_pwent+0x484>
jmp    15b5 <_nss_directories_parse_pwent+0x495>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    156d <_nss_directories_parse_pwent+0x44d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     15dd <_nss_directories_parse_pwent+0x4bd>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    15dd <_nss_directories_parse_pwent+0x4bd>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5c(%rbp)
je     1610 <_nss_directories_parse_pwent+0x4f0>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
xor    $0xff,%al
mov    %al,-0x5c(%rbp)
mov    -0x5c(%rbp),%al
test   $0x1,%al
jne    1620 <_nss_directories_parse_pwent+0x500>
jmp    1631 <_nss_directories_parse_pwent+0x511>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    15e9 <_nss_directories_parse_pwent+0x4c9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1659 <_nss_directories_parse_pwent+0x539>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1659 <_nss_directories_parse_pwent+0x539>
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x20(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_directories_parse_pwent>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1141 <_nss_directories_parse_pwent+0x21>
movb   $0x0,(%rax)
mov    %rbx,(%r14)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     116e <_nss_directories_parse_pwent+0x4e>
cmp    $0x3a,%al
je     1161 <_nss_directories_parse_pwent+0x41>
add    $0x1,%rbx
jmp    1150 <_nss_directories_parse_pwent+0x30>
movb   $0x0,(%rbx)
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1197 <_nss_directories_parse_pwent+0x77>
mov    (%r14),%rax
mov    (%rax),%al
cmp    $0x2d,%al
je     117b <_nss_directories_parse_pwent+0x5b>
cmp    $0x2b,%al
jne    1197 <_nss_directories_parse_pwent+0x77>
xorps  %xmm0,%xmm0
movups %xmm0,0x28(%r14)
movups %xmm0,0x18(%r14)
movups %xmm0,0x8(%r14)
mov    $0x1,%eax
jmp    12b3 <_nss_directories_parse_pwent+0x193>
mov    %rbx,0x8(%r14)
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
test   %al,%al
je     11b8 <_nss_directories_parse_pwent+0x98>
cmp    $0x3a,%al
je     11b1 <_nss_directories_parse_pwent+0x91>
add    $0x1,%rbx
jmp    11a0 <_nss_directories_parse_pwent+0x80>
movb   $0x0,(%rbx)
add    $0x1,%rbx
mov    (%r14),%rax
mov    (%rax),%al
cmp    $0x2d,%al
je     11c5 <_nss_directories_parse_pwent+0xa5>
cmp    $0x2b,%al
jne    1200 <_nss_directories_parse_pwent+0xe0>
cmpb   $0x0,(%rbx)
je     12b1 <_nss_directories_parse_pwent+0x191>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    0x8(%rsp),%r15
xor    %ecx,%ecx
cmp    %rbx,%r15
cmovne %rax,%rcx
mov    %rcx,0x30(%r14)
mov    (%r15),%al
cmp    $0x3a,%al
je     1259 <_nss_directories_parse_pwent+0x139>
test   %al,%al
jmp    12b1 <_nss_directories_parse_pwent+0x191>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,0x30(%r14)
mov    0x8(%rsp),%r15
cmp    %rbx,%r15
je     12b1 <_nss_directories_parse_pwent+0x191>
mov    (%r15),%al
test   %al,%al
je     1237 <_nss_directories_parse_pwent+0x117>
cmp    $0x3a,%al
jne    12b1 <_nss_directories_parse_pwent+0x191>
add    $0x1,%r15
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    %rax,0x28(%r14)
mov    0x8(%rsp),%rcx
cmp    %r15,%rcx
jne    1288 <_nss_directories_parse_pwent+0x168>
jmp    12b1 <_nss_directories_parse_pwent+0x191>
cmpb   $0x0,0x1(%r15)
je     12b1 <_nss_directories_parse_pwent+0x191>
add    $0x1,%r15
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    $0xa,%edx
call   1040 <strtoul@plt>
mov    0x8(%rsp),%rcx
xor    %edx,%edx
cmp    %r15,%rcx
cmovne %rax,%rdx
mov    %rdx,0x28(%r14)
mov    (%rcx),%al
test   %al,%al
je     1296 <_nss_directories_parse_pwent+0x176>
cmp    $0x3a,%al
jne    12b1 <_nss_directories_parse_pwent+0x191>
add    $0x1,%rcx
mov    %rcx,0x10(%r14)
nopw   0x0(%rax,%rax,1)
movzbl (%rcx),%eax
test   %al,%al
je     12c4 <_nss_directories_parse_pwent+0x1a4>
cmp    $0x3a,%al
je     12bd <_nss_directories_parse_pwent+0x19d>
add    $0x1,%rcx
jmp    12a0 <_nss_directories_parse_pwent+0x180>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
movb   $0x0,(%rcx)
add    $0x1,%rcx
mov    %rcx,0x18(%r14)
nopl   0x0(%rax,%rax,1)
movzbl (%rcx),%eax
test   %al,%al
je     12e8 <_nss_directories_parse_pwent+0x1c8>
cmp    $0x3a,%al
je     12e1 <_nss_directories_parse_pwent+0x1c1>
add    $0x1,%rcx
jmp    12d0 <_nss_directories_parse_pwent+0x1b0>
movb   $0x0,(%rcx)
add    $0x1,%rcx
mov    %rcx,0x20(%r14)
jmp    118d <_nss_directories_parse_pwent+0x6d>

LLVM IR (-O0):
%struct.passwd = type { i8*, i8*, i8*, i8*, i8*, i8*, i8* }
%struct.pwent_data = type { i32 }
@.str = [2 x i8] c"\0A\00"
define i32 @_nss_directories_parse_pwent(i8* %0, %struct.passwd* %1, %struct.pwent_data* %2, i64 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca %struct.passwd*
%9 = alloca %struct.pwent_data*
%10 = alloca i64
%11 = alloca i32*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
store i8* %0, i8** %7
store %struct.passwd* %1, %struct.passwd** %8
store %struct.pwent_data* %2, %struct.pwent_data** %9
store i64 %3, i64* %10
store i32* %4, i32** %11
%17 = load i8*, i8** %7
%18 = call i8* @strpbrk(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %18, i8** %12
%19 = load i8*, i8** %12
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %23
21: ; preds = %5
%22 = load i8*, i8** %12
store i8 0, i8* %22
br label %23
23: ; preds = %21, %5
%24 = load i8*, i8** %7
%25 = load %struct.passwd*, %struct.passwd** %8
%26 = getelementptr inbounds %struct.passwd, %struct.passwd* %25, i32 0, i32 0
store i8* %24, i8** %26
br label %27
27: ; preds = %40, %23
%28 = load i8*, i8** %7
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %38
32: ; preds = %27
%33 = load i8*, i8** %7
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 58
%37 = xor i1 %36, true
br label %38
38: ; preds = %32, %27
%39 = phi i1 [ false, %27 ], [ %37, %32 ]
br i1 %39, label %40, label %43
40: ; preds = %38
%41 = load i8*, i8** %7
%42 = getelementptr inbounds i8, i8* %41, i32 1
store i8* %42, i8** %7
br label %27
43: ; preds = %38
%44 = load i8*, i8** %7
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %54
48: ; preds = %43
%49 = load i8*, i8** %7
store i8 0, i8* %49
br label %50
50: ; preds = %48
%51 = load i8*, i8** %7
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %7
br label %53
53: ; preds = %50
br label %54
54: ; preds = %53, %43
%55 = load i8*, i8** %7
%56 = getelementptr inbounds i8, i8* %55, i64 0
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %89
60: ; preds = %54
%61 = load %struct.passwd*, %struct.passwd** %8
%62 = getelementptr inbounds %struct.passwd, %struct.passwd* %61, i32 0, i32 0
%63 = load i8*, i8** %62
%64 = getelementptr inbounds i8, i8* %63, i64 0
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 43
br i1 %67, label %76, label %68
68: ; preds = %60
%69 = load %struct.passwd*, %struct.passwd** %8
%70 = getelementptr inbounds %struct.passwd, %struct.passwd* %69, i32 0, i32 0
%71 = load i8*, i8** %70
%72 = getelementptr inbounds i8, i8* %71, i64 0
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 45
br i1 %75, label %76, label %89
76: ; preds = %68, %60
%77 = load %struct.passwd*, %struct.passwd** %8
%78 = getelementptr inbounds %struct.passwd, %struct.passwd* %77, i32 0, i32 1
store i8* null, i8** %78
%79 = load %struct.passwd*, %struct.passwd** %8
%80 = getelementptr inbounds %struct.passwd, %struct.passwd* %79, i32 0, i32 6
store i8* null, i8** %80
%81 = load %struct.passwd*, %struct.passwd** %8
%82 = getelementptr inbounds %struct.passwd, %struct.passwd* %81, i32 0, i32 5
store i8* null, i8** %82
%83 = load %struct.passwd*, %struct.passwd** %8
%84 = getelementptr inbounds %struct.passwd, %struct.passwd* %83, i32 0, i32 2
store i8* null, i8** %84
%85 = load %struct.passwd*, %struct.passwd** %8
%86 = getelementptr inbounds %struct.passwd, %struct.passwd* %85, i32 0, i32 3
store i8* null, i8** %86
%87 = load %struct.passwd*, %struct.passwd** %8
%88 = getelementptr inbounds %struct.passwd, %struct.passwd* %87, i32 0, i32 4
store i8* null, i8** %88
br label %330
89: ; preds = %68, %54
%90 = load i8*, i8** %7
%91 = load %struct.passwd*, %struct.passwd** %8
%92 = getelementptr inbounds %struct.passwd, %struct.passwd* %91, i32 0, i32 1
store i8* %90, i8** %92
br label %93
93: ; preds = %106, %89
%94 = load i8*, i8** %7
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %104
98: ; preds = %93
%99 = load i8*, i8** %7
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 58
%103 = xor i1 %102, true
br label %104
104: ; preds = %98, %93
%105 = phi i1 [ false, %93 ], [ %103, %98 ]
br i1 %105, label %106, label %109
106: ; preds = %104
%107 = load i8*, i8** %7
%108 = getelementptr inbounds i8, i8* %107, i32 1
store i8* %108, i8** %7
br label %93
109: ; preds = %104
%110 = load i8*, i8** %7
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %120
114: ; preds = %109
%115 = load i8*, i8** %7
store i8 0, i8* %115
br label %116
116: ; preds = %114
%117 = load i8*, i8** %7
%118 = getelementptr inbounds i8, i8* %117, i32 1
store i8* %118, i8** %7
br label %119
119: ; preds = %116
br label %120
120: ; preds = %119, %109
%121 = load %struct.passwd*, %struct.passwd** %8
%122 = getelementptr inbounds %struct.passwd, %struct.passwd* %121, i32 0, i32 0
%123 = load i8*, i8** %122
%124 = getelementptr inbounds i8, i8* %123, i64 0
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 43
br i1 %127, label %136, label %128
128: ; preds = %120
%129 = load %struct.passwd*, %struct.passwd** %8
%130 = getelementptr inbounds %struct.passwd, %struct.passwd* %129, i32 0, i32 0
%131 = load i8*, i8** %130
%132 = getelementptr inbounds i8, i8* %131, i64 0
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = icmp eq i32 %134, 45
br i1 %135, label %136, label %207
136: ; preds = %128, %120
%137 = load i8*, i8** %7
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %142
141: ; preds = %136
store i32 0, i32* %6
br label %331
142: ; preds = %136
%143 = load i8*, i8** %7
%144 = call i8* @strtoul(i8* %143, i8** %13, i32 10)
%145 = load %struct.passwd*, %struct.passwd** %8
%146 = getelementptr inbounds %struct.passwd, %struct.passwd* %145, i32 0, i32 6
store i8* %144, i8** %146
%147 = load i8*, i8** %13
%148 = load i8*, i8** %7
%149 = icmp eq i8* %147, %148
br i1 %149, label %150, label %153
150: ; preds = %142
%151 = load %struct.passwd*, %struct.passwd** %8
%152 = getelementptr inbounds %struct.passwd, %struct.passwd* %151, i32 0, i32 6
store i8* null, i8** %152
br label %153
153: ; preds = %150, %142
%154 = load i8*, i8** %13
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = icmp eq i32 %156, 58
br i1 %157, label %158, label %163
158: ; preds = %153
br label %159
159: ; preds = %158
%160 = load i8*, i8** %13
%161 = getelementptr inbounds i8, i8* %160, i32 1
store i8* %161, i8** %13
br label %162
162: ; preds = %159
br label %170
163: ; preds = %153
%164 = load i8*, i8** %13
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = icmp ne i32 %166, 0
br i1 %167, label %168, label %169
168: ; preds = %163
store i32 0, i32* %6
br label %331
169: ; preds = %163
br label %170
170: ; preds = %169, %162
%171 = load i8*, i8** %13
store i8* %171, i8** %7
%172 = load i8*, i8** %7
%173 = load i8, i8* %172
%174 = sext i8 %173 to i32
%175 = icmp eq i32 %174, 0
br i1 %175, label %176, label %177
176: ; preds = %170
store i32 0, i32* %6
br label %331
177: ; preds = %170
%178 = load i8*, i8** %7
%179 = call i8* @strtoul(i8* %178, i8** %14, i32 10)
%180 = load %struct.passwd*, %struct.passwd** %8
%181 = getelementptr inbounds %struct.passwd, %struct.passwd* %180, i32 0, i32 5
store i8* %179, i8** %181
%182 = load i8*, i8** %14
%183 = load i8*, i8** %7
%184 = icmp eq i8* %182, %183
br i1 %184, label %185, label %188
185: ; preds = %177
%186 = load %struct.passwd*, %struct.passwd** %8
%187 = getelementptr inbounds %struct.passwd, %struct.passwd* %186, i32 0, i32 5
store i8* null, i8** %187
br label %188
188: ; preds = %185, %177
%189 = load i8*, i8** %14
%190 = load i8, i8* %189
%191 = sext i8 %190 to i32
%192 = icmp eq i32 %191, 58
br i1 %192, label %193, label %198
193: ; preds = %188
br label %194
194: ; preds = %193
%195 = load i8*, i8** %14
%196 = getelementptr inbounds i8, i8* %195, i32 1
store i8* %196, i8** %14
br label %197
197: ; preds = %194
br label %205
198: ; preds = %188
%199 = load i8*, i8** %14
%200 = load i8, i8* %199
%201 = sext i8 %200 to i32
%202 = icmp ne i32 %201, 0
br i1 %202, label %203, label %204
203: ; preds = %198
store i32 0, i32* %6
br label %331
204: ; preds = %198
br label %205
205: ; preds = %204, %197
%206 = load i8*, i8** %14
store i8* %206, i8** %7
br label %264
207: ; preds = %128
%208 = load i8*, i8** %7
%209 = call i8* @strtoul(i8* %208, i8** %15, i32 10)
%210 = load %struct.passwd*, %struct.passwd** %8
%211 = getelementptr inbounds %struct.passwd, %struct.passwd* %210, i32 0, i32 6
store i8* %209, i8** %211
%212 = load i8*, i8** %15
%213 = load i8*, i8** %7
%214 = icmp eq i8* %212, %213
br i1 %214, label %215, label %216
215: ; preds = %207
store i32 0, i32* %6
br label %331
216: ; preds = %207
%217 = load i8*, i8** %15
%218 = load i8, i8* %217
%219 = sext i8 %218 to i32
%220 = icmp eq i32 %219, 58
br i1 %220, label %221, label %226
221: ; preds = %216
br label %222
222: ; preds = %221
%223 = load i8*, i8** %15
%224 = getelementptr inbounds i8, i8* %223, i32 1
store i8* %224, i8** %15
br label %225
225: ; preds = %222
br label %233
226: ; preds = %216
%227 = load i8*, i8** %15
%228 = load i8, i8* %227
%229 = sext i8 %228 to i32
%230 = icmp ne i32 %229, 0
br i1 %230, label %231, label %232
231: ; preds = %226
store i32 0, i32* %6
br label %331
232: ; preds = %226
br label %233
233: ; preds = %232, %225
br label %234
234: ; preds = %233
%235 = load i8*, i8** %15
store i8* %235, i8** %7
%236 = load i8*, i8** %7
%237 = call i8* @strtoul(i8* %236, i8** %16, i32 10)
%238 = load %struct.passwd*, %struct.passwd** %8
%239 = getelementptr inbounds %struct.passwd, %struct.passwd* %238, i32 0, i32 5
store i8* %237, i8** %239
%240 = load i8*, i8** %16
%241 = load i8*, i8** %7
%242 = icmp eq i8* %240, %241
br i1 %242, label %243, label %244
243: ; preds = %234
store i32 0, i32* %6
br label %331
244: ; preds = %234
%245 = load i8*, i8** %16
%246 = load i8, i8* %245
%247 = sext i8 %246 to i32
%248 = icmp eq i32 %247, 58
br i1 %248, label %249, label %254
249: ; preds = %244
br label %250
250: ; preds = %249
%251 = load i8*, i8** %16
%252 = getelementptr inbounds i8, i8* %251, i32 1
store i8* %252, i8** %16
br label %253
253: ; preds = %250
br label %261
254: ; preds = %244
%255 = load i8*, i8** %16
%256 = load i8, i8* %255
%257 = sext i8 %256 to i32
%258 = icmp ne i32 %257, 0
br i1 %258, label %259, label %260
259: ; preds = %254
store i32 0, i32* %6
br label %331
260: ; preds = %254
br label %261
261: ; preds = %260, %253
br label %262
262: ; preds = %261
%263 = load i8*, i8** %16
store i8* %263, i8** %7
br label %264
264: ; preds = %262, %205
%265 = load i8*, i8** %7
%266 = load %struct.passwd*, %struct.passwd** %8
%267 = getelementptr inbounds %struct.passwd, %struct.passwd* %266, i32 0, i32 2
store i8* %265, i8** %267
br label %268
268: ; preds = %281, %264
%269 = load i8*, i8** %7
%270 = load i8, i8* %269
%271 = sext i8 %270 to i32
%272 = icmp ne i32 %271, 0
br i1 %272, label %273, label %279
273: ; preds = %268
%274 = load i8*, i8** %7
%275 = load i8, i8* %274
%276 = sext i8 %275 to i32
%277 = icmp eq i32 %276, 58
%278 = xor i1 %277, true
br label %279
279: ; preds = %273, %268
%280 = phi i1 [ false, %268 ], [ %278, %273 ]
br i1 %280, label %281, label %284
281: ; preds = %279
%282 = load i8*, i8** %7
%283 = getelementptr inbounds i8, i8* %282, i32 1
store i8* %283, i8** %7
br label %268
284: ; preds = %279
%285 = load i8*, i8** %7
%286 = load i8, i8* %285
%287 = sext i8 %286 to i32
%288 = icmp ne i32 %287, 0
br i1 %288, label %289, label %295
289: ; preds = %284
%290 = load i8*, i8** %7
store i8 0, i8* %290
br label %291
291: ; preds = %289
%292 = load i8*, i8** %7
%293 = getelementptr inbounds i8, i8* %292, i32 1
store i8* %293, i8** %7
br label %294
294: ; preds = %291
br label %295
295: ; preds = %294, %284
%296 = load i8*, i8** %7
%297 = load %struct.passwd*, %struct.passwd** %8
%298 = getelementptr inbounds %struct.passwd, %struct.passwd* %297, i32 0, i32 3
store i8* %296, i8** %298
br label %299
299: ; preds = %312, %295
%300 = load i8*, i8** %7
%301 = load i8, i8* %300
%302 = sext i8 %301 to i32
%303 = icmp ne i32 %302, 0
br i1 %303, label %304, label %310
304: ; preds = %299
%305 = load i8*, i8** %7
%306 = load i8, i8* %305
%307 = sext i8 %306 to i32
%308 = icmp eq i32 %307, 58
%309 = xor i1 %308, true
br label %310
310: ; preds = %304, %299
%311 = phi i1 [ false, %299 ], [ %309, %304 ]
br i1 %311, label %312, label %315
312: ; preds = %310
%313 = load i8*, i8** %7
%314 = getelementptr inbounds i8, i8* %313, i32 1
store i8* %314, i8** %7
br label %299
315: ; preds = %310
%316 = load i8*, i8** %7
%317 = load i8, i8* %316
%318 = sext i8 %317 to i32
%319 = icmp ne i32 %318, 0
br i1 %319, label %320, label %326
320: ; preds = %315
%321 = load i8*, i8** %7
store i8 0, i8* %321
br label %322
322: ; preds = %320
%323 = load i8*, i8** %7
%324 = getelementptr inbounds i8, i8* %323, i32 1
store i8* %324, i8** %7
br label %325
325: ; preds = %322
br label %326
326: ; preds = %325, %315
%327 = load i8*, i8** %7
%328 = load %struct.passwd*, %struct.passwd** %8
%329 = getelementptr inbounds %struct.passwd, %struct.passwd* %328, i32 0, i32 4
store i8* %327, i8** %329
br label %330
330: ; preds = %326, %76
store i32 1, i32* %6
br label %331
331: ; preds = %330, %259, %243, %231, %215, %203, %176, %168, %141
%332 = load i32, i32* %6
ret i32 %332
}

LLVM IR (-O2):
%struct.passwd = type { i8*, i8*, i8*, i8*, i8*, i8*, i8* }
%struct.pwent_data = type { i32 }
define i32 @_nss_directories_parse_pwent(i8* %0, %struct.passwd* nocapture %1, %struct.pwent_data* nocapture readnone %2, i64 %3, i32* nocapture readnone %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 10)
%11 = icmp eq i8* %10, null
br i1 %11, label %13, label %12
12: ; preds = %5
store i8 0, i8* %10
br label %13
13: ; preds = %12, %5
%14 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 0
store i8* %0, i8** %14
br label %15
15: ; preds = %18, %13
%16 = phi i8* [ %0, %13 ], [ %19, %18 ]
%17 = load i8, i8* %16
switch i8 %17, label %18 [
i8 0, label %24
i8 58, label %20
]
18: ; preds = %15
%19 = getelementptr inbounds i8, i8* %16, i64 1
br label %15
20: ; preds = %15
store i8 0, i8* %16
%21 = getelementptr inbounds i8, i8* %16, i64 1
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %15, %20
%25 = phi i8* [ %21, %20 ], [ %16, %15 ]
%26 = load i8*, i8** %14
%27 = load i8, i8* %26
switch i8 %27, label %31 [
i8 43, label %28
i8 45, label %28
]
28: ; preds = %24, %24
%29 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 1
%30 = bitcast i8** %29 to i8*
br label %125
31: ; preds = %24, %20
%32 = phi i8* [ %25, %24 ], [ %21, %20 ]
%33 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 1
store i8* %32, i8** %33
br label %34
34: ; preds = %37, %31
%35 = phi i8* [ %32, %31 ], [ %38, %37 ]
%36 = load i8, i8* %35
switch i8 %36, label %37 [
i8 0, label %41
i8 58, label %39
]
37: ; preds = %34
%38 = getelementptr inbounds i8, i8* %35, i64 1
br label %34
39: ; preds = %34
store i8 0, i8* %35
%40 = getelementptr inbounds i8, i8* %35, i64 1
br label %41
41: ; preds = %34, %39
%42 = phi i8* [ %40, %39 ], [ %35, %34 ]
%43 = load i8*, i8** %14
%44 = load i8, i8* %43
switch i8 %44, label %77 [
i8 43, label %45
i8 45, label %45
]
45: ; preds = %41, %41
%46 = bitcast i8** %6 to i8*
%47 = load i8, i8* %42
%48 = icmp eq i8 %47, 0
br i1 %48, label %58, label %49
49: ; preds = %45
%50 = call i8* @strtoul(i8* %42, i8** %6, i32 10)
%51 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 6
%52 = load i8*, i8** %6
%53 = icmp eq i8* %52, %42
%54 = select i1 %53, i8* null, i8* %50
store i8* %54, i8** %51
%55 = load i8, i8* %52
switch i8 %55, label %58 [
i8 58, label %59
i8 0, label %56
]
56: ; preds = %49
%57 = bitcast i8** %7 to i8*
br label %73
58: ; preds = %45, %49
br label %125
59: ; preds = %49
%60 = getelementptr inbounds i8, i8* %52, i64 1
%61 = load i8, i8* %60
%62 = icmp eq i8 %61, 0
%63 = bitcast i8** %7 to i8*
br i1 %62, label %73, label %64
64: ; preds = %59
%65 = call i8* @strtoul(i8* %60, i8** %7, i32 10)
%66 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 5
%67 = load i8*, i8** %7
%68 = icmp eq i8* %67, %60
%69 = select i1 %68, i8* null, i8* %65
store i8* %69, i8** %66
%70 = load i8, i8* %67
switch i8 %70, label %73 [
i8 58, label %71
i8 0, label %75
]
71: ; preds = %64
%72 = getelementptr inbounds i8, i8* %67, i64 1
br label %75
73: ; preds = %56, %59, %64
%74 = bitcast i8** %7 to i8*
br label %125
75: ; preds = %71, %64
%76 = phi i8* [ %72, %71 ], [ %67, %64 ]
br label %102
77: ; preds = %41
%78 = bitcast i8** %8 to i8*
%79 = call i8* @strtoul(i8* %42, i8** %8, i32 10)
%80 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 6
store i8* %79, i8** %80
%81 = load i8*, i8** %8
%82 = icmp eq i8* %81, %42
br i1 %82, label %87, label %83
83: ; preds = %77
%84 = load i8, i8* %81
switch i8 %84, label %87 [
i8 58, label %85
i8 0, label %88
]
85: ; preds = %83
%86 = getelementptr inbounds i8, i8* %81, i64 1
br label %88
87: ; preds = %77, %83
br label %125
88: ; preds = %83, %85
%89 = phi i8* [ %81, %83 ], [ %86, %85 ]
%90 = bitcast i8** %9 to i8*
%91 = call i8* @strtoul(i8* %89, i8** %9, i32 10)
%92 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 5
store i8* %91, i8** %92
%93 = load i8*, i8** %9
%94 = icmp eq i8* %93, %89
br i1 %94, label %99, label %95
95: ; preds = %88
%96 = load i8, i8* %93
switch i8 %96, label %99 [
i8 58, label %97
i8 0, label %100
]
97: ; preds = %95
%98 = getelementptr inbounds i8, i8* %93, i64 1
br label %100
99: ; preds = %88, %95
br label %125
100: ; preds = %97, %95
%101 = phi i8* [ %98, %97 ], [ %93, %95 ]
br label %102
102: ; preds = %100, %75
%103 = phi i8* [ %76, %75 ], [ %101, %100 ]
%104 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 2
store i8* %103, i8** %104
br label %105
105: ; preds = %108, %102
%106 = phi i8* [ %103, %102 ], [ %109, %108 ]
%107 = load i8, i8* %106
switch i8 %107, label %108 [
i8 0, label %112
i8 58, label %110
]
108: ; preds = %105
%109 = getelementptr inbounds i8, i8* %106, i64 1
br label %105
110: ; preds = %105
store i8 0, i8* %106
%111 = getelementptr inbounds i8, i8* %106, i64 1
br label %112
112: ; preds = %105, %110
%113 = phi i8* [ %111, %110 ], [ %106, %105 ]
%114 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 3
store i8* %113, i8** %114
br label %115
115: ; preds = %118, %112
%116 = phi i8* [ %113, %112 ], [ %119, %118 ]
%117 = load i8, i8* %116
switch i8 %117, label %118 [
i8 0, label %122
i8 58, label %120
]
118: ; preds = %115
%119 = getelementptr inbounds i8, i8* %116, i64 1
br label %115
120: ; preds = %115
store i8 0, i8* %116
%121 = getelementptr inbounds i8, i8* %116, i64 1
br label %122
122: ; preds = %115, %120
%123 = phi i8* [ %121, %120 ], [ %116, %115 ]
%124 = getelementptr inbounds %struct.passwd, %struct.passwd* %1, i64 0, i32 4
store i8* %123, i8** %124
br label %125
125: ; preds = %99, %87, %73, %58, %28, %122
%126 = phi i32 [ 1, %122 ], [ 1, %28 ], [ 0, %58 ], [ 0, %73 ], [ 0, %87 ], [ 0, %99 ]
ret i32 %126
}