#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*/ line;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ str_trim_space_quote(char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int strlen(char *);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *, int, char const *,
                          ...);
int smbftpd_config_parser(const char *file,
                          int (*opt_handler)(char *option, char *opt_arg)) {
  FILE *pf = NULL;
  char line[2048];
  char *option, *opt_arg;
  int error = -1, len = 0;
  if (NULL == file || !opt_handler) {
    return -1;
  }
  pf = fopen(file, "r");
  if (!pf) {
    syslog(LOG_ERR, "%s (%d) Failed to open [%s] (%s)",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/jchuang1977/smbftpd-2.2/refs/heads/"
           "master/misc.c",
           250, file, strerror(errno));
    return -1;
  }
  while (NULL != (fgets(line, sizeof(line), pf))) {
    len = strlen(line);
    if (line[len - 1] == '\n') {
      line[len - 1] = '\0';
    }
    option = line;
    while ((*option == ' ') || (*option == '\t')) {
      option++;
    }
    if (*option == '\0' || *option == '#') {
      continue;
    }
    opt_arg = option;
    while ((*opt_arg != ' ') && (*opt_arg != '\t') && (*opt_arg != '\0')) {
      opt_arg++;
    }
    if (opt_arg == option) {
      continue;
    }
    *opt_arg = '\0';
    opt_arg++;
    str_trim_space_quote(opt_arg);
    if (*opt_arg == '\0') {
      syslog(LOG_ERR, "%s (%d) bad syntax of config option %s",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/jchuang1977/smbftpd-2.2/refs/heads/"
             "master/misc.c",
             284, option);
      goto Error;
    }
    if (0 != opt_handler(option, opt_arg)) {
      goto Error;
    }
  }
  error = 0;
Error:
  if (pf) {
    fclose(pf);
  }
  return error;
}


x86 assembly (clang, -O0):
<smbftpd_config_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0xffffffff,-0x834(%rbp)
ff ff ff
movl   $0x0,-0x838(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     11b6 <smbftpd_config_parser+0x46>
cmpq   $0x0,-0x18(%rbp)
jne    11c2 <smbftpd_config_parser+0x52>
movl   $0xffffffff,-0x4(%rbp)
jmp    1494 <smbftpd_config_parser+0x324>
mov    -0x10(%rbp),%rdi
lea    0xe33(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    123f <smbftpd_config_parser+0xcf>
mov    0x2de8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x844(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x840(%rbp)
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
mov    -0x844(%rbp),%edi
mov    -0x840(%rbp),%r8
mov    %eax,%r9d
lea    0xde2(%rip),%rsi
lea    0xdfc(%rip),%rdx
mov    $0xfa,%ecx
mov    $0x0,%al
call   1060 <syslog@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1494 <smbftpd_config_parser+0x324>
jmp    1244 <smbftpd_config_parser+0xd4>
lea    -0x820(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x800,%esi
call   1050 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     146d <smbftpd_config_parser+0x2fd>
lea    -0x820(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x838(%rbp)
mov    -0x838(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x820(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    12a8 <smbftpd_config_parser+0x138>
mov    -0x838(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x820(%rbp,%rax,1)
lea    -0x820(%rbp),%rax
mov    %rax,-0x828(%rbp)
mov    -0x828(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x845(%rbp)
je     12e7 <smbftpd_config_parser+0x177>
mov    -0x828(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x845(%rbp)
mov    -0x845(%rbp),%al
test   $0x1,%al
jne    12fa <smbftpd_config_parser+0x18a>
jmp    1311 <smbftpd_config_parser+0x1a1>
mov    -0x828(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x828(%rbp)
jmp    12b6 <smbftpd_config_parser+0x146>
mov    -0x828(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1337 <smbftpd_config_parser+0x1c7>
mov    -0x828(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    133c <smbftpd_config_parser+0x1cc>
jmp    1244 <smbftpd_config_parser+0xd4>
mov    -0x828(%rbp),%rax
mov    %rax,-0x830(%rbp)
mov    -0x830(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x846(%rbp)
je     1396 <smbftpd_config_parser+0x226>
mov    -0x830(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x846(%rbp)
je     1396 <smbftpd_config_parser+0x226>
mov    -0x830(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x846(%rbp)
mov    -0x846(%rbp),%al
test   $0x1,%al
jne    13a9 <smbftpd_config_parser+0x239>
jmp    13c0 <smbftpd_config_parser+0x250>
mov    -0x830(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x830(%rbp)
jmp    134a <smbftpd_config_parser+0x1da>
mov    -0x830(%rbp),%rax
cmp    -0x828(%rbp),%rax
jne    13d9 <smbftpd_config_parser+0x269>
jmp    1244 <smbftpd_config_parser+0xd4>
mov    -0x830(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x830(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x830(%rbp)
mov    -0x830(%rbp),%rdi
call   1070 <str_trim_space_quote@plt>
mov    -0x830(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1443 <smbftpd_config_parser+0x2d3>
mov    0x2bb5(%rip),%rax
mov    (%rax),%edi
mov    -0x828(%rbp),%r8
lea    0xc83(%rip),%rsi
lea    0xbf1(%rip),%rdx
mov    $0x11c,%ecx
mov    $0x0,%al
call   1060 <syslog@plt>
jmp    1477 <smbftpd_config_parser+0x307>
mov    -0x18(%rbp),%rax
mov    -0x828(%rbp),%rdi
mov    -0x830(%rbp),%rsi
call   *%rax
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1468 <smbftpd_config_parser+0x2f8>
jmp    1477 <smbftpd_config_parser+0x307>
jmp    1244 <smbftpd_config_parser+0xd4>
movl   $0x0,-0x834(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     148b <smbftpd_config_parser+0x31b>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x834(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smbftpd_config_parser>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    $0xffffffff,%r15d
test   %rdi,%rdi
je     131e <smbftpd_config_parser+0x1ae>
mov    %rsi,%r12
test   %rsi,%rsi
je     131e <smbftpd_config_parser+0x1ae>
mov    %rdi,%rbx
lea    0xeea(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12d6 <smbftpd_config_parser+0x166>
mov    %rax,%r14
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x800,%esi
mov    %rax,%rdx
call   1050 <fgets@plt>
xor    %r15d,%r15d
test   %rax,%rax
je     1316 <smbftpd_config_parser+0x1a6>
mov    %r12,0x8(%rsp)
movabs $0x100000201,%r13
lea    0xe12(%rip),%r15
mov    %r14,(%rsp)
jmp    1219 <smbftpd_config_parser+0xa9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x800,%esi
mov    %r14,%rdx
call   1050 <fgets@plt>
test   %rax,%rax
je     1313 <smbftpd_config_parser+0x1a3>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    122f <smbftpd_config_parser+0xbf>
movb   $0x0,0xf(%rsp,%rax,1)
mov    %rbx,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x0(%rbp),%eax
cmp    $0x23,%rax
ja     1260 <smbftpd_config_parser+0xf0>
movslq (%r15,%rax,4),%rcx
add    %r15,%rcx
jmp    *%rcx
add    $0x1,%rbp
jmp    1240 <smbftpd_config_parser+0xd0>
nopl   0x0(%rax)
mov    $0x1,%r12d
jmp    127a <smbftpd_config_parser+0x10a>
nopl   0x0(%rax,%rax,1)
movzbl 0x0(%rbp,%r12,1),%eax
add    $0x1,%r12
cmp    $0x20,%al
ja     1270 <smbftpd_config_parser+0x100>
movzbl %al,%eax
bt     %rax,%r13
jae    1270 <smbftpd_config_parser+0x100>
cmp    $0x1,%r12
je     1200 <smbftpd_config_parser+0x90>
mov    %rbx,%r14
lea    (%r12,%rbp,1),%rbx
movb   $0x0,-0x1(%rbp,%r12,1)
mov    %rbx,%rdi
call   1070 <str_trim_space_quote@plt>
cmpb   $0x0,0x0(%rbp,%r12,1)
je     1333 <smbftpd_config_parser+0x1c3>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   *0x8(%rsp)
test   %eax,%eax
mov    (%rsp),%rax
mov    %r14,%rbx
mov    %rax,%r14
je     1200 <smbftpd_config_parser+0x90>
mov    $0xffffffff,%r15d
jmp    1316 <smbftpd_config_parser+0x1a6>
mov    0x2cf3(%rip),%rax
mov    (%rax),%r14d
mov    0x2cf9(%rip),%rax
mov    (%rax),%edi
call   1090 <strerror@plt>
lea    0xd9d(%rip),%rsi
lea    0xdb7(%rip),%rdx
mov    %r14d,%edi
mov    $0xfa,%ecx
mov    %rbx,%r8
mov    %eax,%r9d
xor    %eax,%eax
call   1060 <syslog@plt>
jmp    131e <smbftpd_config_parser+0x1ae>
xor    %r15d,%r15d
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    %r15d,%eax
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c96(%rip),%rax
mov    (%rax),%edi
lea    0xdfb(%rip),%rsi
lea    0xd69(%rip),%rdx
mov    $0x11c,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1060 <syslog@plt>
mov    $0xffffffff,%r15d
mov    (%rsp),%r14
jmp    1316 <smbftpd_config_parser+0x1a6>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@LOG_ERR = global i32 0
@.str.1 = [33 x i8] c"%s (%d) Failed to open [%s] (%s)\00"
@.str.2 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jchuang1977/smbftpd-2.2/refs/heads/master/misc.c\00"
@errno = global i32 0
@.str.3 = [39 x i8] c"%s (%d) bad syntax of config option %s\00"
define i32 @smbftpd_config_parser(i8* %0, i32 (i8*, i8*)* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32 (i8*, i8*)*
%6 = alloca i32*
%7 = alloca [2048 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %4
store i32 (i8*, i8*)* %1, i32 (i8*, i8*)** %5
store i32* null, i32** %6
store i32 -1, i32* %10
store i32 0, i32* %11
%12 = load i8*, i8** %4
%13 = icmp eq i8* null, %12
br i1 %13, label %17, label %14
14: ; preds = %2
%15 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %5
%16 = icmp ne i32 (i8*, i8*)* %15, null
br i1 %16, label %18, label %17
17: ; preds = %14, %2
store i32 -1, i32* %3
br label %136
18: ; preds = %14
%19 = load i8*, i8** %4
%20 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %20, i32** %6
%21 = load i32*, i32** %6
%22 = icmp ne i32* %21, null
br i1 %22, label %29, label %23
23: ; preds = %18
%24 = load i32, i32* @LOG_ERR
%25 = load i8*, i8** %4
%26 = load i32, i32* @errno
%27 = call i32 @strerror(i32 %26)
%28 = call i32 (i32, i8*, i8*, i32, i8*, ...) @syslog(i32 %24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.2, i64 0, i64 0), i32 250, i8* %25, i32 %27)
store i32 -1, i32* %3
br label %136
29: ; preds = %18
br label %30
30: ; preds = %126, %104, %77, %29
%31 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%32 = load i32*, i32** %6
%33 = call i32* @fgets(i8* %31, i32 2048, i32* %32)
%34 = icmp ne i32* null, %33
br i1 %34, label %35, label %127
35: ; preds = %30
%36 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
%37 = call i32 @strlen(i8* %36)
store i32 %37, i32* %11
%38 = load i32, i32* %11
%39 = sub nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 10
br i1 %44, label %45, label %50
45: ; preds = %35
%46 = load i32, i32* %11
%47 = sub nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 %48
store i8 0, i8* %49
br label %50
50: ; preds = %45, %35
%51 = getelementptr inbounds [2048 x i8], [2048 x i8]* %7, i64 0, i64 0
store i8* %51, i8** %8
br label %52
52: ; preds = %64, %50
%53 = load i8*, i8** %8
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 32
br i1 %56, label %62, label %57
57: ; preds = %52
%58 = load i8*, i8** %8
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 9
br label %62
62: ; preds = %57, %52
%63 = phi i1 [ true, %52 ], [ %61, %57 ]
br i1 %63, label %64, label %67
64: ; preds = %62
%65 = load i8*, i8** %8
%66 = getelementptr inbounds i8, i8* %65, i32 1
store i8* %66, i8** %8
br label %52
67: ; preds = %62
%68 = load i8*, i8** %8
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 0
br i1 %71, label %77, label %72
72: ; preds = %67
%73 = load i8*, i8** %8
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 35
br i1 %76, label %77, label %78
77: ; preds = %72, %67
br label %30
78: ; preds = %72
%79 = load i8*, i8** %8
store i8* %79, i8** %9
br label %80
80: ; preds = %97, %78
%81 = load i8*, i8** %9
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp ne i32 %83, 32
br i1 %84, label %85, label %95
85: ; preds = %80
%86 = load i8*, i8** %9
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = icmp ne i32 %88, 9
br i1 %89, label %90, label %95
90: ; preds = %85
%91 = load i8*, i8** %9
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp ne i32 %93, 0
br label %95
95: ; preds = %90, %85, %80
%96 = phi i1 [ false, %85 ], [ false, %80 ], [ %94, %90 ]
br i1 %96, label %97, label %100
97: ; preds = %95
%98 = load i8*, i8** %9
%99 = getelementptr inbounds i8, i8* %98, i32 1
store i8* %99, i8** %9
br label %80
100: ; preds = %95
%101 = load i8*, i8** %9
%102 = load i8*, i8** %8
%103 = icmp eq i8* %101, %102
br i1 %103, label %104, label %105
104: ; preds = %100
br label %30
105: ; preds = %100
%106 = load i8*, i8** %9
store i8 0, i8* %106
%107 = load i8*, i8** %9
%108 = getelementptr inbounds i8, i8* %107, i32 1
store i8* %108, i8** %9
%109 = load i8*, i8** %9
%110 = call i32 @str_trim_space_quote(i8* %109)
%111 = load i8*, i8** %9
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %119
115: ; preds = %105
%116 = load i32, i32* @LOG_ERR
%117 = load i8*, i8** %8
%118 = call i32 (i32, i8*, i8*, i32, i8*, ...) @syslog(i32 %116, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.2, i64 0, i64 0), i32 284, i8* %117)
br label %128
119: ; preds = %105
%120 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %5
%121 = load i8*, i8** %8
%122 = load i8*, i8** %9
%123 = call i32 %120(i8* %121, i8* %122)
%124 = icmp ne i32 0, %123
br i1 %124, label %125, label %126
125: ; preds = %119
br label %128
126: ; preds = %119
br label %30
127: ; preds = %30
store i32 0, i32* %10
br label %128
128: ; preds = %127, %125, %115
%129 = load i32*, i32** %6
%130 = icmp ne i32* %129, null
br i1 %130, label %131, label %134
131: ; preds = %128
%132 = load i32*, i32** %6
%133 = call i32 @fclose(i32* %132)
br label %134
134: ; preds = %131, %128
%135 = load i32, i32* %10
store i32 %135, i32* %3
br label %136
136: ; preds = %134, %23, %17
%137 = load i32, i32* %3
ret i32 %137
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@LOG_ERR = global i32 0
@.str.1 = [33 x i8] c"%s (%d) Failed to open [%s] (%s)\00"
@.str.2 = [139 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jchuang1977/smbftpd-2.2/refs/heads/master/misc.c\00"
@errno = global i32 0
@.str.3 = [39 x i8] c"%s (%d) bad syntax of config option %s\00"
define i32 @smbftpd_config_parser(i8* %0, i32 (i8*, i8*)* %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = icmp ne i8* %0, null
%6 = icmp ne i32 (i8*, i8*)* %1, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %58
8: ; preds = %2
%9 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i32* %9, null
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = call i32* @fgets(i8* %4, i32 2048, i32* %9)
%13 = icmp eq i32* %12, null
br i1 %13, label %55, label %19
14: ; preds = %8
%15 = load i32, i32* @LOG_ERR
%16 = load i32, i32* @errno
%17 = tail call i32 @strerror(i32 %16)
%18 = tail call i32 (i32, i8*, i8*, i32, i8*, ...) @syslog(i32 %15, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.2, i64 0, i64 0), i32 250, i8* %0, i32 %17)
br label %58
19: ; preds = %11, %33
%20 = call i32 @strlen(i8* %4)
%21 = add nsw i32 %20, -1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 10
br i1 %25, label %26, label %27
26: ; preds = %19
store i8 0, i8* %23
br label %27
27: ; preds = %26, %19
br label %28
28: ; preds = %27, %31
%29 = phi i8* [ %32, %31 ], [ %4, %27 ]
%30 = load i8, i8* %29
switch i8 %30, label %36 [
i8 32, label %31
i8 9, label %31
i8 0, label %33
i8 35, label %33
]
31: ; preds = %28, %28
%32 = getelementptr inbounds i8, i8* %29, i64 1
br label %28
33: ; preds = %28, %28, %42, %52
%34 = call i32* @fgets(i8* %4, i32 2048, i32* %9)
%35 = icmp eq i32* %34, null
br i1 %35, label %55, label %19
36: ; preds = %28, %39
%37 = phi i8 [ %41, %39 ], [ %30, %28 ]
%38 = phi i8* [ %40, %39 ], [ %29, %28 ]
switch i8 %37, label %39 [
i8 32, label %42
i8 9, label %42
i8 0, label %42
]
39: ; preds = %36
%40 = getelementptr inbounds i8, i8* %38, i64 1
%41 = load i8, i8* %40
br label %36
42: ; preds = %36, %36, %36
%43 = icmp eq i8* %38, %29
br i1 %43, label %33, label %44
44: ; preds = %42
store i8 0, i8* %38
%45 = getelementptr inbounds i8, i8* %38, i64 1
%46 = call i32 @str_trim_space_quote(i8* %45)
%47 = load i8, i8* %45
%48 = icmp eq i8 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %44
%50 = load i32, i32* @LOG_ERR
%51 = call i32 (i32, i8*, i8*, i32, i8*, ...) @syslog(i32 %50, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.2, i64 0, i64 0), i32 284, i8* %29)
br label %55
52: ; preds = %44
%53 = call i32 %1(i8* %29, i8* %45)
%54 = icmp eq i32 %53, 0
br i1 %54, label %33, label %55
55: ; preds = %33, %52, %11, %49
%56 = phi i32 [ -1, %49 ], [ 0, %11 ], [ 0, %33 ], [ -1, %52 ]
%57 = call i32 @fclose(i32* %9)
br label %58
58: ; preds = %2, %55, %14
%59 = phi i32 [ %56, %55 ], [ -1, %14 ], [ -1, %2 ]
ret i32 %59
}