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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ _PATH_DEV;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ login_protect(char const *, char *, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
scalar_t__ sscanf(char *, char *, int *);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
scalar_t__ strncmp(char *, int /*<<< orphan*/, int);
char *strtok(char *, char *);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *, char *);
void login_fbtab(char *tty, uid_t uid, gid_t gid) {
  FILE *fp;
  char buf[BUFSIZ];
  char *devname;
  char *cp;
  int prot;
  const char *table;
  if ((fp = fopen(table = "/etc/fbtab", "r")) == NULL &&
      (fp = fopen(table = "/etc/logindevperm", "r")) == NULL)
    return;
  while (fgets(buf, sizeof(buf), fp)) {
    if ((cp = strchr(buf, '#')))
      *cp = 0;
    if ((cp = devname = strtok(buf, " \t\n")) == 0)
      continue;
    if (strncmp(devname, _PATH_DEV, sizeof _PATH_DEV - 1) != 0 ||
        (cp = strtok(NULL, " \t\n")) == 0 || *cp != '0' ||
        sscanf(cp, "%o", &prot) == 0 || prot == 0 || (prot & 0777) != prot ||
        (cp = strtok(NULL, " \t\n")) == 0) {
      syslog(LOG_ERR, "%s: bad entry: %s", table, cp ? cp : "(null)");
      continue;
    }
    if (strcmp(devname + 5, tty) == 0) {
      for (cp = strtok(cp, ":"); cp; cp = strtok(NULL, ":")) {
        login_protect(table, cp, prot, uid, gid);
      }
    }
  }
  fclose(fp);
}


x86 assembly (clang, -O0):
<login_fbtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2e1c(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x60(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
lea    0xe14(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe09(%rip),%rdi
lea    0xe0d(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1249 <login_fbtab+0xa9>
lea    0xdf5(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xdea(%rip),%rdi
lea    0xde1(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1249 <login_fbtab+0xa9>
movl   $0x1,-0x4c(%rbp)
jmp    1437 <login_fbtab+0x297>
jmp    124e <login_fbtab+0xae>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rax
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     1427 <login_fbtab+0x287>
mov    -0x58(%rbp),%rdi
mov    $0x23,%esi
call   1060 <strchr@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     128e <login_fbtab+0xee>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x58(%rbp),%rdi
lea    0xd86(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    12b5 <login_fbtab+0x115>
jmp    124e <login_fbtab+0xae>
mov    -0x30(%rbp),%rdi
mov    0x2d28(%rip),%rax
mov    (%rax),%esi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    135b <login_fbtab+0x1bb>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd3e(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
je     135b <login_fbtab+0x1bb>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    135b <login_fbtab+0x1bb>
mov    -0x38(%rbp),%rdi
lea    0xd14(%rip),%rsi
lea    -0x3c(%rbp),%rdx
call   10a0 <sscanf@plt>
cmp    $0x0,%rax
je     135b <login_fbtab+0x1bb>
cmpl   $0x0,-0x3c(%rbp)
je     135b <login_fbtab+0x1bb>
mov    -0x3c(%rbp),%eax
and    $0x1ff,%eax
cmp    -0x3c(%rbp),%eax
jne    135b <login_fbtab+0x1bb>
xor    %eax,%eax
mov    %eax,%edi
lea    0xcd7(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x38(%rbp)
cmp    $0x0,%rax
jne    13b3 <login_fbtab+0x213>
mov    0x2c66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1387 <login_fbtab+0x1e7>
mov    -0x38(%rbp),%rax
mov    %rax,-0x78(%rbp)
jmp    1397 <login_fbtab+0x1f7>
lea    0xcaa(%rip),%rax
mov    %rax,-0x78(%rbp)
jmp    1397 <login_fbtab+0x1f7>
mov    -0x68(%rbp),%rdx
mov    -0x6c(%rbp),%edi
mov    -0x78(%rbp),%rcx
lea    0xc7d(%rip),%rsi
call   1090 <syslog@plt>
jmp    124e <login_fbtab+0xae>
mov    -0x30(%rbp),%rdi
add    $0x5,%rdi
mov    -0x8(%rbp),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1422 <login_fbtab+0x282>
mov    -0x38(%rbp),%rdi
lea    0xc66(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     141d <login_fbtab+0x27d>
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x3c(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
call   1030 <login_protect@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xc30(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x38(%rbp)
jmp    13e2 <login_fbtab+0x242>
jmp    1422 <login_fbtab+0x282>
jmp    124e <login_fbtab+0xae>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<login_fbtab>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,-0x40(%rbp)
mov    %esi,-0x3c(%rbp)
mov    %rdi,-0x48(%rbp)
mov    0x2e16(%rip),%rax
mov    (%rax),%r13d
mov    %rsp,%rbx
lea    0xf(%r13),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0xe23(%rip),%rdi
lea    0xe27(%rip),%rsi
mov    %rdi,-0x38(%rbp)
call   10b0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1247 <login_fbtab+0xa7>
lea    0xe11(%rip),%rdi
lea    0xe08(%rip),%rsi
mov    %rdi,-0x38(%rbp)
call   10b0 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1247 <login_fbtab+0xa7>
jmp    1387 <login_fbtab+0x1e7>
mov    %r15,%rcx
nopl   0x0(%rax)
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
test   %rcx,%rcx
lea    0xe05(%rip),%rax
cmove  %rax,%rcx
lea    0xde8(%rip),%rsi
mov    -0x38(%rbp),%rdx
call   1090 <syslog@plt>
mov    %rbx,%rdi
mov    %r13d,%esi
mov    %r14,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     137f <login_fbtab+0x1df>
mov    %rbx,%rdi
mov    $0x23,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     1273 <login_fbtab+0xd3>
movb   $0x0,(%rax)
mov    %rbx,%rdi
lea    0xda2(%rip),%rsi
call   10c0 <strtok@plt>
test   %rax,%rax
je     1247 <login_fbtab+0xa7>
mov    %rax,%r12
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
mov    %r12,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
mov    %r12,%rcx
test   %rax,%rax
jne    1220 <login_fbtab+0x80>
xor    %edi,%edi
lea    0xd6a(%rip),%rsi
call   10c0 <strtok@plt>
mov    $0x0,%ecx
test   %rax,%rax
je     1220 <login_fbtab+0x80>
mov    %rax,%r15
cmpb   $0x30,(%rax)
jne    1219 <login_fbtab+0x79>
mov    %r15,%rdi
lea    0xd45(%rip),%rsi
lea    -0x2c(%rbp),%rdx
call   10a0 <sscanf@plt>
test   %rax,%rax
je     1219 <login_fbtab+0x79>
mov    -0x2c(%rbp),%eax
mov    %r15,%rcx
test   %eax,%eax
je     1220 <login_fbtab+0x80>
cmp    $0x1ff,%eax
ja     1220 <login_fbtab+0x80>
xor    %edi,%edi
lea    0xd0d(%rip),%rsi
call   10c0 <strtok@plt>
mov    $0x0,%ecx
test   %rax,%rax
je     1220 <login_fbtab+0x80>
mov    %rax,%r15
add    $0x5,%r12
mov    %r12,%rdi
mov    -0x48(%rbp),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1247 <login_fbtab+0xa7>
mov    %r15,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xce8(%rip),%rsi
call   10c0 <strtok@plt>
test   %rax,%rax
je     1247 <login_fbtab+0xa7>
mov    -0x2c(%rbp),%edx
mov    -0x38(%rbp),%rdi
mov    %rax,%rsi
mov    -0x3c(%rbp),%ecx
mov    -0x40(%rbp),%r8d
call   1030 <login_protect@plt>
xor    %edi,%edi
jmp    1350 <login_fbtab+0x1b0>
mov    %r14,%rdi
call   1050 <fclose@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [11 x i8] c"/etc/fbtab\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"/etc/logindevperm\00"
@.str.3 = [4 x i8] c" \09\0A\00"
@_PATH_DEV = global i32 0
@.str.4 = [3 x i8] c"%o\00"
@LOG_ERR = global i32 0
@.str.5 = [18 x i8] c"%s: bad entry: %s\00"
@.str.6 = [7 x i8] c"(null)\00"
@.str.7 = [2 x i8] c":\00"
define void @login_fbtab(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%15 = load i32, i32* @BUFSIZ
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
store i8* %17, i8** %8
%18 = alloca i8, i64 %16
store i64 %16, i64* %9
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %13
%19 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %19, i32** %7
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %25
21: ; preds = %3
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8** %13
%22 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %7
%23 = icmp eq i32* %22, null
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 1, i32* %14
br label %105
25: ; preds = %21, %3
br label %26
26: ; preds = %101, %76, %39, %25
%27 = trunc i64 %16 to i32
%28 = load i32*, i32** %7
%29 = call i64 @fgets(i8* %18, i32 %27, i32* %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %102
31: ; preds = %26
%32 = call i8* @strchr(i8* %18, i8 signext 35)
store i8* %32, i8** %11
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = load i8*, i8** %11
store i8 0, i8* %35
br label %36
36: ; preds = %34, %31
%37 = call i8* @strtok(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %37, i8** %10
store i8* %37, i8** %11
%38 = icmp eq i8* %37, null
br i1 %38, label %39, label %40
39: ; preds = %36
br label %26
40: ; preds = %36
%41 = load i8*, i8** %10
%42 = load i32, i32* @_PATH_DEV
%43 = call i64 @strncmp(i8* %41, i32 %42, i32 3)
%44 = icmp ne i64 %43, 0
br i1 %44, label %68, label %45
45: ; preds = %40
%46 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %46, i8** %11
%47 = icmp eq i8* %46, null
br i1 %47, label %68, label %48
48: ; preds = %45
%49 = load i8*, i8** %11
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp ne i32 %51, 48
br i1 %52, label %68, label %53
53: ; preds = %48
%54 = load i8*, i8** %11
%55 = call i64 @sscanf(i8* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %12)
%56 = icmp eq i64 %55, 0
br i1 %56, label %68, label %57
57: ; preds = %53
%58 = load i32, i32* %12
%59 = icmp eq i32 %58, 0
br i1 %59, label %68, label %60
60: ; preds = %57
%61 = load i32, i32* %12
%62 = and i32 %61, 511
%63 = load i32, i32* %12
%64 = icmp ne i32 %62, %63
br i1 %64, label %68, label %65
65: ; preds = %60
%66 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %66, i8** %11
%67 = icmp eq i8* %66, null
br i1 %67, label %68, label %79
68: ; preds = %65, %60, %57, %53, %48, %45, %40
%69 = load i32, i32* @LOG_ERR
%70 = load i8*, i8** %13
%71 = load i8*, i8** %11
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = load i8*, i8** %11
br label %76
75: ; preds = %68
br label %76
76: ; preds = %75, %73
%77 = phi i8* [ %74, %73 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), %75 ]
%78 = call i32 @syslog(i32 %69, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %70, i8* %77)
br label %26
79: ; preds = %65
%80 = load i8*, i8** %10
%81 = getelementptr inbounds i8, i8* %80, i64 5
%82 = load i8*, i8** %4
%83 = call i64 @strcmp(i8* %81, i8* %82)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %101
85: ; preds = %79
%86 = load i8*, i8** %11
%87 = call i8* @strtok(i8* %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i8* %87, i8** %11
br label %88
88: ; preds = %98, %85
%89 = load i8*, i8** %11
%90 = icmp ne i8* %89, null
br i1 %90, label %91, label %100
91: ; preds = %88
%92 = load i8*, i8** %13
%93 = load i8*, i8** %11
%94 = load i32, i32* %12
%95 = load i32, i32* %5
%96 = load i32, i32* %6
%97 = call i32 @login_protect(i8* %92, i8* %93, i32 %94, i32 %95, i32 %96)
br label %98
98: ; preds = %91
%99 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
store i8* %99, i8** %11
br label %88
100: ; preds = %88
br label %101
101: ; preds = %100, %79
br label %26
102: ; preds = %26
%103 = load i32*, i32** %7
%104 = call i32 @fclose(i32* %103)
store i32 0, i32* %14
br label %105
105: ; preds = %102, %24
%106 = load i8*, i8** %8
%107 = load i32, i32* %14
switch i32 %107, label %109 [
i32 0, label %108
i32 1, label %108
]
108: ; preds = %105, %105
ret void
109: ; preds = %105
unreachable
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [11 x i8] c"/etc/fbtab\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [18 x i8] c"/etc/logindevperm\00"
@.str.3 = [4 x i8] c" \09\0A\00"
@_PATH_DEV = global i32 0
@.str.4 = [3 x i8] c"%o\00"
@LOG_ERR = global i32 0
@.str.5 = [18 x i8] c"%s: bad entry: %s\00"
@.str.6 = [7 x i8] c"(null)\00"
@.str.7 = [2 x i8] c":\00"
define void @login_fbtab(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = load i32, i32* @BUFSIZ
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = bitcast i32* %4 to i8*
%9 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = tail call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %71, label %14
14: ; preds = %11, %3
%15 = phi i32* [ %12, %11 ], [ %9, %3 ]
%16 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %11 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %3 ]
%17 = call i64 @fgets(i8* %7, i32 %5, i32* %15)
%18 = icmp eq i64 %17, 0
br i1 %18, label %69, label %19
19: ; preds = %14, %53
%20 = call i8* @strchr(i8* %7, i8 signext 35)
%21 = icmp eq i8* %20, null
br i1 %21, label %23, label %22
22: ; preds = %19
store i8 0, i8* %20
br label %23
23: ; preds = %22, %19
%24 = call i8* @strtok(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i8* %24, null
br i1 %25, label %53, label %26
26: ; preds = %23
%27 = load i32, i32* @_PATH_DEV
%28 = call i64 @strncmp(i8* %24, i32 %27, i32 3)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %47
30: ; preds = %26
%31 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i8* %31, null
br i1 %32, label %47, label %33
33: ; preds = %30
%34 = load i8, i8* %31
%35 = icmp eq i8 %34, 48
br i1 %35, label %36, label %47
36: ; preds = %33
%37 = call i64 @sscanf(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %4)
%38 = icmp ne i64 %37, 0
%39 = load i32, i32* %4
%40 = icmp ne i32 %39, 0
%41 = select i1 %38, i1 %40, i1 false
%42 = icmp ult i32 %39, 512
%43 = select i1 %41, i1 %42, i1 false
br i1 %43, label %44, label %47
44: ; preds = %36
%45 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%46 = icmp eq i8* %45, null
br i1 %46, label %47, label %56
47: ; preds = %44, %36, %33, %30, %26
%48 = phi i8* [ %24, %26 ], [ null, %30 ], [ %31, %33 ], [ %31, %36 ], [ null, %44 ]
%49 = load i32, i32* @LOG_ERR
%50 = icmp eq i8* %48, null
%51 = select i1 %50, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* %48
%52 = call i32 @syslog(i32 %49, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %16, i8* %51)
br label %53
53: ; preds = %63, %56, %60, %47, %23
%54 = call i64 @fgets(i8* %7, i32 %5, i32* %15)
%55 = icmp eq i64 %54, 0
br i1 %55, label %69, label %19
56: ; preds = %44
%57 = getelementptr inbounds i8, i8* %24, i64 5
%58 = call i64 @strcmp(i8* %57, i8* %0)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %53
60: ; preds = %56
%61 = call i8* @strtok(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%62 = icmp eq i8* %61, null
br i1 %62, label %53, label %63
63: ; preds = %60, %63
%64 = phi i8* [ %67, %63 ], [ %61, %60 ]
%65 = load i32, i32* %4
%66 = call i32 @login_protect(i8* %16, i8* %64, i32 %65, i32 %1, i32 %2)
%67 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%68 = icmp eq i8* %67, null
br i1 %68, label %53, label %63
69: ; preds = %53, %14
%70 = call i32 @fclose(i32* %15)
br label %71
71: ; preds = %11, %69
ret void
}