#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 confline {
  int dummy;
};
struct cnfnode {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
struct confline *_skip_spaces(struct confline *, char const **);
int /*<<< orphan*/ append_node(struct cnfnode *, struct cnfnode *);
int /*<<< orphan*/ cnfnode_setval(struct cnfnode *, char *);
struct cnfnode *create_cnfnode(char *);
scalar_t__ isalnum(char const);
int /*<<< orphan*/ isspace(char const);
struct confline *next_char(struct confline *, char const **);
struct confline *parse_syslogng_items(struct cnfnode *, struct confline *,
                                      char const **);
struct confline *parse_syslogng_options(struct cnfnode *cn_top,
                                        struct confline *cl, const char *p) {
  struct cnfnode *cn;
  char buf[256], *q;
  cl = _skip_spaces(cl, &p);
  if (*p == '{') {
    p++;
    while (1) {
      cl = _skip_spaces(cl, &p);
      q = buf;
      while (*p && (isalnum(*p) || (*p == '_') || (*p == '-')))
        *q++ = *p++;
      *q = 0;
      append_node(cn_top, cn = create_cnfnode(buf));
      cl = _skip_spaces(cl, &p);
      if (*p == '(') {
        p++;
        cl = _skip_spaces(cl, &p);
        q = buf;
        if ((*p == '\"' || *p == '\'') && (p[-1] != '\\')) {
          char qc = *p;
          *q++ = *p++;
          while (*p && ((*p != qc) || (p[-1] == '\\')) &&
                 q < buf + sizeof(buf) - 1) {
            *q++ = *p;
            cl = next_char(cl, &p);
          }
          if (*p == qc)
            *q++ = *p++;
          *q = 0;
        } else {
          while (*p && !isspace(*p) && *p != '(' && *p != ')' &&
                 q < buf + sizeof(buf) - 1) {
            *q++ = *p;
            cl = next_char(cl, &p);
          }
          *q = 0;
        }
        cnfnode_setval(cn, buf);
        cl = _skip_spaces(cl, &p);
        if (*p == ')')
          p++;
        else {
          cl = parse_syslogng_items(cn, cl, &p);
        }
        cl = _skip_spaces(cl, &p);
      }
      if (*p == ';')
        p++;
      cl = _skip_spaces(cl, &p);
      if (*p == '}') {
        p++;
        cl = _skip_spaces(cl, &p);
        break;
      } else if (!*p)
        break;
    }
  }
  return cl;
}


x86 assembly (clang, -O0):
<parse_syslogng_options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7b,%eax
jne    1640 <parse_syslogng_options+0x4c0>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
lea    -0x120(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x12a(%rbp)
je     1253 <parse_syslogng_options+0xd3>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1060 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x12b(%rbp)
jne    1247 <parse_syslogng_options+0xc7>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x12b(%rbp)
je     1247 <parse_syslogng_options+0xc7>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x12b(%rbp)
mov    -0x12b(%rbp),%al
mov    %al,-0x12a(%rbp)
mov    -0x12a(%rbp),%al
test   $0x1,%al
jne    1266 <parse_syslogng_options+0xe6>
jmp    1293 <parse_syslogng_options+0x113>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
jmp    11e3 <parse_syslogng_options+0x63>
mov    -0x128(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x138(%rbp)
lea    -0x120(%rbp),%rdi
call   10a0 <create_cnfnode@plt>
mov    -0x138(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x20(%rbp)
call   1050 <append_node@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    15c0 <parse_syslogng_options+0x440>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
lea    -0x120(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
je     1333 <parse_syslogng_options+0x1b3>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    1477 <parse_syslogng_options+0x2f7>
mov    -0x18(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5c,%eax
je     1477 <parse_syslogng_options+0x2f7>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x129(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x139(%rbp)
je     13e4 <parse_syslogng_options+0x264>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x129(%rbp),%ecx
cmp    %ecx,%eax
jne    13bf <parse_syslogng_options+0x23f>
mov    -0x18(%rbp),%rax
movsbl -0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x5c,%ecx
mov    %al,-0x139(%rbp)
jne    13e4 <parse_syslogng_options+0x264>
mov    -0x128(%rbp),%rax
lea    -0x120(%rbp),%rcx
add    $0x100,%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
setb   %al
mov    %al,-0x139(%rbp)
mov    -0x139(%rbp),%al
test   $0x1,%al
jne    13f7 <parse_syslogng_options+0x277>
jmp    142a <parse_syslogng_options+0x2aa>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <next_char@plt>
mov    %rax,-0x10(%rbp)
jmp    1378 <parse_syslogng_options+0x1f8>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x129(%rbp),%ecx
cmp    %ecx,%eax
jne    1468 <parse_syslogng_options+0x2e8>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
mov    -0x128(%rbp),%rax
movb   $0x0,(%rax)
jmp    1558 <parse_syslogng_options+0x3d8>
jmp    147c <parse_syslogng_options+0x2fc>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13a(%rbp)
je     1508 <parse_syslogng_options+0x388>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13a(%rbp)
jne    1508 <parse_syslogng_options+0x388>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x28,%ecx
mov    %al,-0x13a(%rbp)
je     1508 <parse_syslogng_options+0x388>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x29,%ecx
mov    %al,-0x13a(%rbp)
je     1508 <parse_syslogng_options+0x388>
mov    -0x128(%rbp),%rax
lea    -0x120(%rbp),%rcx
add    $0x100,%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
setb   %al
mov    %al,-0x13a(%rbp)
mov    -0x13a(%rbp),%al
test   $0x1,%al
jne    151b <parse_syslogng_options+0x39b>
jmp    154e <parse_syslogng_options+0x3ce>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x128(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x128(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <next_char@plt>
mov    %rax,-0x10(%rbp)
jmp    147c <parse_syslogng_options+0x2fc>
mov    -0x128(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1090 <cnfnode_setval@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    159a <parse_syslogng_options+0x41a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    15af <parse_syslogng_options+0x42f>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <parse_syslogng_items@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
jne    15dc <parse_syslogng_options+0x45c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7d,%eax
jne    161f <parse_syslogng_options+0x49f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,-0x10(%rbp)
jmp    163b <parse_syslogng_options+0x4bb>
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1631 <parse_syslogng_options+0x4b1>
jmp    163b <parse_syslogng_options+0x4bb>
jmp    1636 <parse_syslogng_options+0x4b6>
jmp    11c4 <parse_syslogng_options+0x44>
jmp    1640 <parse_syslogng_options+0x4c0>
mov    -0x10(%rbp),%rax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_syslogng_options>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %rsi,%rax
mov    %rdi,%r15
mov    %rdx,(%rsp)
mov    %rsp,%rsi
mov    %rax,%rdi
call   1080 <_skip_spaces@plt>
mov    (%rsp),%rcx
cmpb   $0x7b,(%rcx)
jne    1444 <parse_syslogng_options+0x2c4>
add    $0x1,%rcx
mov    %rcx,(%rsp)
lea    0x10(%rsp),%r14
mov    %rsp,%r12
mov    %r15,0x8(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %rax,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,%rbx
mov    (%rsp),%rax
mov    (%rax),%al
mov    %r14,%rbp
test   %al,%al
je     1230 <parse_syslogng_options+0xb0>
mov    %r14,%rbp
jmp    120a <parse_syslogng_options+0x8a>
lea    0x1(%rcx),%rax
mov    %rax,(%rsp)
movzbl (%rcx),%eax
mov    %al,0x0(%rbp)
add    $0x1,%rbp
movzbl 0x1(%rcx),%eax
test   %al,%al
je     1230 <parse_syslogng_options+0xb0>
movsbl %al,%edi
call   1060 <isalnum@plt>
mov    (%rsp),%rcx
test   %rax,%rax
jne    11f0 <parse_syslogng_options+0x70>
movzbl (%rcx),%eax
cmp    $0x5f,%al
je     11f0 <parse_syslogng_options+0x70>
cmp    $0x2d,%al
je     11f0 <parse_syslogng_options+0x70>
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,0x0(%rbp)
mov    %r14,%rdi
call   10a0 <create_cnfnode@plt>
mov    %rax,%r13
mov    %r15,%rdi
mov    %rax,%rsi
call   1050 <append_node@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    (%rsp),%rcx
mov    (%rcx),%dl
cmp    $0x28,%dl
jne    13f4 <parse_syslogng_options+0x274>
add    $0x1,%rcx
mov    %rcx,(%rsp)
mov    %rax,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    %rax,%rbx
mov    (%rsp),%rcx
mov    (%rcx),%bpl
test   %bpl,%bpl
je     12ff <parse_syslogng_options+0x17f>
cmp    $0x27,%bpl
je     1292 <parse_syslogng_options+0x112>
cmp    $0x22,%bpl
jne    1298 <parse_syslogng_options+0x118>
cmpb   $0x5c,-0x1(%rcx)
jne    1307 <parse_syslogng_options+0x187>
mov    %r14,%r15
nopl   0x0(%rax,%rax,1)
movsbl %bpl,%edi
call   1070 <isspace@plt>
test   %eax,%eax
jne    13a0 <parse_syslogng_options+0x220>
mov    (%rsp),%rax
movzbl (%rax),%eax
cmp    $0x28,%al
je     13a0 <parse_syslogng_options+0x220>
cmp    $0x29,%al
je     13a0 <parse_syslogng_options+0x220>
lea    0x10f(%rsp),%rcx
cmp    %rcx,%r15
jae    13a0 <parse_syslogng_options+0x220>
mov    %al,(%r15)
add    $0x1,%r15
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <next_char@plt>
mov    %rax,%rbx
mov    (%rsp),%rax
movzbl (%rax),%ebp
test   %bpl,%bpl
jne    12a0 <parse_syslogng_options+0x120>
jmp    13a0 <parse_syslogng_options+0x220>
mov    %r14,%r15
jmp    13a0 <parse_syslogng_options+0x220>
lea    0x1(%rcx),%rax
mov    %rax,(%rsp)
mov    (%rcx),%dl
mov    %dl,0x10(%rsp)
mov    0x1(%rcx),%cl
test   %cl,%cl
je     137b <parse_syslogng_options+0x1fb>
lea    0x11(%rsp),%r15
jmp    1361 <parse_syslogng_options+0x1e1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x10f(%rsp),%rdx
cmp    %rdx,%r15
jae    1382 <parse_syslogng_options+0x202>
mov    %cl,(%r15)
add    $0x1,%r15
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <next_char@plt>
mov    %rax,%rbx
mov    (%rsp),%rax
movzbl (%rax),%ecx
test   %cl,%cl
je     1421 <parse_syslogng_options+0x2a1>
cmp    %bpl,%cl
jne    1330 <parse_syslogng_options+0x1b0>
cmpb   $0x5c,-0x1(%rax)
jne    1387 <parse_syslogng_options+0x207>
lea    0x10f(%rsp),%rdx
cmp    %rdx,%r15
jb     133d <parse_syslogng_options+0x1bd>
jmp    1387 <parse_syslogng_options+0x207>
xor    %ecx,%ecx
lea    0x11(%rsp),%r15
cmp    %bpl,%cl
jne    13a0 <parse_syslogng_options+0x220>
lea    0x1(%rax),%rcx
mov    %rcx,(%rsp)
mov    (%rax),%al
mov    %al,(%r15)
add    $0x1,%r15
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%r15)
mov    %r13,%rdi
mov    %r14,%rsi
call   1090 <cnfnode_setval@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    (%rsp),%rcx
cmpb   $0x29,(%rcx)
jne    13d0 <parse_syslogng_options+0x250>
add    $0x1,%rcx
mov    %rcx,(%rsp)
jmp    13de <parse_syslogng_options+0x25e>
nopl   (%rax)
mov    %r13,%rdi
mov    %rax,%rsi
mov    %r12,%rdx
call   1040 <parse_syslogng_items@plt>
mov    0x8(%rsp),%r15
mov    %rax,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    (%rsp),%rcx
mov    (%rcx),%dl
cmp    $0x3b,%dl
jne    1401 <parse_syslogng_options+0x281>
add    $0x1,%rcx
mov    %rcx,(%rsp)
mov    %rax,%rdi
mov    %r12,%rsi
call   1080 <_skip_spaces@plt>
mov    (%rsp),%rcx
mov    (%rcx),%dl
test   %dl,%dl
je     1444 <parse_syslogng_options+0x2c4>
cmp    $0x7d,%dl
jne    11d0 <parse_syslogng_options+0x50>
jmp    1431 <parse_syslogng_options+0x2b1>
xor    %ecx,%ecx
cmp    %bpl,%cl
je     1387 <parse_syslogng_options+0x207>
jmp    13a0 <parse_syslogng_options+0x220>
add    $0x1,%rcx
mov    %rcx,(%rsp)
mov    %rsp,%rsi
mov    %rax,%rdi
call   1080 <_skip_spaces@plt>
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.cnfnode = type { i32 }
%struct.confline = type { i32 }
define %struct.confline* @parse_syslogng_options(%struct.cnfnode* %0, %struct.confline* %1, i8* %2) {
%4 = alloca %struct.cnfnode*
%5 = alloca %struct.confline*
%6 = alloca i8*
%7 = alloca %struct.cnfnode*
%8 = alloca [256 x i8]
%9 = alloca i8*
%10 = alloca i8
store %struct.cnfnode* %0, %struct.cnfnode** %4
store %struct.confline* %1, %struct.confline** %5
store i8* %2, i8** %6
%11 = load %struct.confline*, %struct.confline** %5
%12 = call %struct.confline* @_skip_spaces(%struct.confline* %11, i8** %6)
store %struct.confline* %12, %struct.confline** %5
%13 = load i8*, i8** %6
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 123
br i1 %16, label %17, label %229
17: ; preds = %3
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %6
br label %20
20: ; preds = %17, %227
%21 = load %struct.confline*, %struct.confline** %5
%22 = call %struct.confline* @_skip_spaces(%struct.confline* %21, i8** %6)
store %struct.confline* %22, %struct.confline** %5
%23 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
store i8* %23, i8** %9
br label %24
24: ; preds = %48, %20
%25 = load i8*, i8** %6
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %46
29: ; preds = %24
%30 = load i8*, i8** %6
%31 = load i8, i8* %30
%32 = call i64 @isalnum(i8 signext %31)
%33 = icmp ne i64 %32, 0
br i1 %33, label %44, label %34
34: ; preds = %29
%35 = load i8*, i8** %6
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 95
br i1 %38, label %44, label %39
39: ; preds = %34
%40 = load i8*, i8** %6
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 45
br label %44
44: ; preds = %39, %34, %29
%45 = phi i1 [ true, %34 ], [ true, %29 ], [ %43, %39 ]
br label %46
46: ; preds = %44, %24
%47 = phi i1 [ false, %24 ], [ %45, %44 ]
br i1 %47, label %48, label %54
48: ; preds = %46
%49 = load i8*, i8** %6
%50 = getelementptr inbounds i8, i8* %49, i32 1
store i8* %50, i8** %6
%51 = load i8, i8* %49
%52 = load i8*, i8** %9
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %9
store i8 %51, i8* %52
br label %24
54: ; preds = %46
%55 = load i8*, i8** %9
store i8 0, i8* %55
%56 = load %struct.cnfnode*, %struct.cnfnode** %4
%57 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%58 = call %struct.cnfnode* @create_cnfnode(i8* %57)
store %struct.cnfnode* %58, %struct.cnfnode** %7
%59 = call i32 @append_node(%struct.cnfnode* %56, %struct.cnfnode* %58)
%60 = load %struct.confline*, %struct.confline** %5
%61 = call %struct.confline* @_skip_spaces(%struct.confline* %60, i8** %6)
store %struct.confline* %61, %struct.confline** %5
%62 = load i8*, i8** %6
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp eq i32 %64, 40
br i1 %65, label %66, label %201
66: ; preds = %54
%67 = load i8*, i8** %6
%68 = getelementptr inbounds i8, i8* %67, i32 1
store i8* %68, i8** %6
%69 = load %struct.confline*, %struct.confline** %5
%70 = call %struct.confline* @_skip_spaces(%struct.confline* %69, i8** %6)
store %struct.confline* %70, %struct.confline** %5
%71 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
store i8* %71, i8** %9
%72 = load i8*, i8** %6
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 34
br i1 %75, label %81, label %76
76: ; preds = %66
%77 = load i8*, i8** %6
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 39
br i1 %80, label %81, label %143
81: ; preds = %76, %66
%82 = load i8*, i8** %6
%83 = getelementptr inbounds i8, i8* %82, i64 -1
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 92
br i1 %86, label %87, label %143
87: ; preds = %81
%88 = load i8*, i8** %6
%89 = load i8, i8* %88
store i8 %89, i8* %10
%90 = load i8*, i8** %6
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %6
%92 = load i8, i8* %90
%93 = load i8*, i8** %9
%94 = getelementptr inbounds i8, i8* %93, i32 1
store i8* %94, i8** %9
store i8 %92, i8* %93
br label %95
95: ; preds = %121, %87
%96 = load i8*, i8** %6
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %119
100: ; preds = %95
%101 = load i8*, i8** %6
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = load i8, i8* %10
%105 = sext i8 %104 to i32
%106 = icmp ne i32 %103, %105
br i1 %106, label %113, label %107
107: ; preds = %100
%108 = load i8*, i8** %6
%109 = getelementptr inbounds i8, i8* %108, i64 -1
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 92
br i1 %112, label %113, label %119
113: ; preds = %107, %100
%114 = load i8*, i8** %9
%115 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%116 = getelementptr inbounds i8, i8* %115, i64 256
%117 = getelementptr inbounds i8, i8* %116, i64 -1
%118 = icmp ult i8* %114, %117
br label %119
119: ; preds = %113, %107, %95
%120 = phi i1 [ false, %107 ], [ false, %95 ], [ %118, %113 ]
br i1 %120, label %121, label %128
121: ; preds = %119
%122 = load i8*, i8** %6
%123 = load i8, i8* %122
%124 = load i8*, i8** %9
%125 = getelementptr inbounds i8, i8* %124, i32 1
store i8* %125, i8** %9
store i8 %123, i8* %124
%126 = load %struct.confline*, %struct.confline** %5
%127 = call %struct.confline* @next_char(%struct.confline* %126, i8** %6)
store %struct.confline* %127, %struct.confline** %5
br label %95
128: ; preds = %119
%129 = load i8*, i8** %6
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = load i8, i8* %10
%133 = sext i8 %132 to i32
%134 = icmp eq i32 %131, %133
br i1 %134, label %135, label %141
135: ; preds = %128
%136 = load i8*, i8** %6
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %6
%138 = load i8, i8* %136
%139 = load i8*, i8** %9
%140 = getelementptr inbounds i8, i8* %139, i32 1
store i8* %140, i8** %9
store i8 %138, i8* %139
br label %141
141: ; preds = %135, %128
%142 = load i8*, i8** %9
store i8 0, i8* %142
br label %181
143: ; preds = %81, %76
br label %144
144: ; preds = %172, %143
%145 = load i8*, i8** %6
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %170
149: ; preds = %144
%150 = load i8*, i8** %6
%151 = load i8, i8* %150
%152 = call i32 @isspace(i8 signext %151)
%153 = icmp ne i32 %152, 0
br i1 %153, label %170, label %154
154: ; preds = %149
%155 = load i8*, i8** %6
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = icmp ne i32 %157, 40
br i1 %158, label %159, label %170
159: ; preds = %154
%160 = load i8*, i8** %6
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = icmp ne i32 %162, 41
br i1 %163, label %164, label %170
164: ; preds = %159
%165 = load i8*, i8** %9
%166 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%167 = getelementptr inbounds i8, i8* %166, i64 256
%168 = getelementptr inbounds i8, i8* %167, i64 -1
%169 = icmp ult i8* %165, %168
br label %170
170: ; preds = %164, %159, %154, %149, %144
%171 = phi i1 [ false, %159 ], [ false, %154 ], [ false, %149 ], [ false, %144 ], [ %169, %164 ]
br i1 %171, label %172, label %179
172: ; preds = %170
%173 = load i8*, i8** %6
%174 = load i8, i8* %173
%175 = load i8*, i8** %9
%176 = getelementptr inbounds i8, i8* %175, i32 1
store i8* %176, i8** %9
store i8 %174, i8* %175
%177 = load %struct.confline*, %struct.confline** %5
%178 = call %struct.confline* @next_char(%struct.confline* %177, i8** %6)
store %struct.confline* %178, %struct.confline** %5
br label %144
179: ; preds = %170
%180 = load i8*, i8** %9
store i8 0, i8* %180
br label %181
181: ; preds = %179, %141
%182 = load %struct.cnfnode*, %struct.cnfnode** %7
%183 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%184 = call i32 @cnfnode_setval(%struct.cnfnode* %182, i8* %183)
%185 = load %struct.confline*, %struct.confline** %5
%186 = call %struct.confline* @_skip_spaces(%struct.confline* %185, i8** %6)
store %struct.confline* %186, %struct.confline** %5
%187 = load i8*, i8** %6
%188 = load i8, i8* %187
%189 = sext i8 %188 to i32
%190 = icmp eq i32 %189, 41
br i1 %190, label %191, label %194
191: ; preds = %181
%192 = load i8*, i8** %6
%193 = getelementptr inbounds i8, i8* %192, i32 1
store i8* %193, i8** %6
br label %198
194: ; preds = %181
%195 = load %struct.cnfnode*, %struct.cnfnode** %7
%196 = load %struct.confline*, %struct.confline** %5
%197 = call %struct.confline* @parse_syslogng_items(%struct.cnfnode* %195, %struct.confline* %196, i8** %6)
store %struct.confline* %197, %struct.confline** %5
br label %198
198: ; preds = %194, %191
%199 = load %struct.confline*, %struct.confline** %5
%200 = call %struct.confline* @_skip_spaces(%struct.confline* %199, i8** %6)
store %struct.confline* %200, %struct.confline** %5
br label %201
201: ; preds = %198, %54
%202 = load i8*, i8** %6
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp eq i32 %204, 59
br i1 %205, label %206, label %209
206: ; preds = %201
%207 = load i8*, i8** %6
%208 = getelementptr inbounds i8, i8* %207, i32 1
store i8* %208, i8** %6
br label %209
209: ; preds = %206, %201
%210 = load %struct.confline*, %struct.confline** %5
%211 = call %struct.confline* @_skip_spaces(%struct.confline* %210, i8** %6)
store %struct.confline* %211, %struct.confline** %5
%212 = load i8*, i8** %6
%213 = load i8, i8* %212
%214 = sext i8 %213 to i32
%215 = icmp eq i32 %214, 125
br i1 %215, label %216, label %221
216: ; preds = %209
%217 = load i8*, i8** %6
%218 = getelementptr inbounds i8, i8* %217, i32 1
store i8* %218, i8** %6
%219 = load %struct.confline*, %struct.confline** %5
%220 = call %struct.confline* @_skip_spaces(%struct.confline* %219, i8** %6)
store %struct.confline* %220, %struct.confline** %5
br label %228
221: ; preds = %209
%222 = load i8*, i8** %6
%223 = load i8, i8* %222
%224 = icmp ne i8 %223, 0
br i1 %224, label %226, label %225
225: ; preds = %221
br label %228
226: ; preds = %221
br label %227
227: ; preds = %226
br label %20
228: ; preds = %225, %216
br label %229
229: ; preds = %228, %3
%230 = load %struct.confline*, %struct.confline** %5
ret %struct.confline* %230
}

LLVM IR (-O2):
%struct.cnfnode = type { i32 }
%struct.confline = type { i32 }
define %struct.confline* @parse_syslogng_options(%struct.cnfnode* %0, %struct.confline* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %2, i8** %4
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = call %struct.confline* @_skip_spaces(%struct.confline* %1, i8** %4)
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 123
br i1 %10, label %11, label %142
11: ; preds = %3
%12 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %12, i8** %4
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 1
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 255
br label %15
15: ; preds = %135, %11
%16 = phi %struct.confline* [ %7, %11 ], [ %136, %135 ]
%17 = call %struct.confline* @_skip_spaces(%struct.confline* %16, i8** %4)
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
br i1 %20, label %35, label %21
21: ; preds = %15, %29
%22 = phi i8 [ %33, %29 ], [ %19, %15 ]
%23 = phi i8* [ %32, %29 ], [ %6, %15 ]
%24 = call i64 @isalnum(i8 signext %22)
%25 = icmp eq i64 %24, 0
%26 = load i8*, i8** %4
br i1 %25, label %27, label %29
27: ; preds = %21
%28 = load i8, i8* %26
switch i8 %28, label %35 [
i8 95, label %29
i8 45, label %29
]
29: ; preds = %21, %27, %27
%30 = getelementptr inbounds i8, i8* %26, i64 1
store i8* %30, i8** %4
%31 = load i8, i8* %26
%32 = getelementptr inbounds i8, i8* %23, i64 1
store i8 %31, i8* %23
%33 = load i8, i8* %30
%34 = icmp eq i8 %33, 0
br i1 %34, label %35, label %21
35: ; preds = %29, %27, %15
%36 = phi i8* [ %6, %15 ], [ %23, %27 ], [ %32, %29 ]
store i8 0, i8* %36
%37 = call %struct.cnfnode* @create_cnfnode(i8* %6)
%38 = call i32 @append_node(%struct.cnfnode* %0, %struct.cnfnode* %37)
%39 = call %struct.confline* @_skip_spaces(%struct.confline* %17, i8** %4)
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 40
br i1 %42, label %43, label %128
43: ; preds = %35
%44 = getelementptr inbounds i8, i8* %40, i64 1
store i8* %44, i8** %4
%45 = call %struct.confline* @_skip_spaces(%struct.confline* %39, i8** %4)
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
switch i8 %47, label %52 [
i8 34, label %48
i8 39, label %48
i8 0, label %111
]
48: ; preds = %43, %43
%49 = getelementptr inbounds i8, i8* %46, i64 -1
%50 = load i8, i8* %49
%51 = icmp eq i8 %50, 92
br i1 %51, label %52, label %53
52: ; preds = %43, %48
br label %91
53: ; preds = %48
%54 = getelementptr inbounds i8, i8* %46, i64 1
store i8* %54, i8** %4
%55 = load i8, i8* %46
store i8 %55, i8* %6
%56 = load i8, i8* %54
%57 = icmp eq i8 %56, 0
br i1 %57, label %78, label %58
58: ; preds = %53, %72
%59 = phi i8 [ %76, %72 ], [ %56, %53 ]
%60 = phi i8* [ %75, %72 ], [ %54, %53 ]
%61 = phi %struct.confline* [ %74, %72 ], [ %45, %53 ]
%62 = phi i8* [ %73, %72 ], [ %13, %53 ]
%63 = icmp eq i8 %59, %47
br i1 %63, label %64, label %70
64: ; preds = %58
%65 = getelementptr inbounds i8, i8* %60, i64 -1
%66 = load i8, i8* %65
%67 = icmp eq i8 %66, 92
%68 = icmp ult i8* %62, %14
%69 = select i1 %67, i1 %68, i1 false
br i1 %69, label %72, label %84
70: ; preds = %58
%71 = icmp ult i8* %62, %14
br i1 %71, label %72, label %78
72: ; preds = %64, %70
%73 = getelementptr inbounds i8, i8* %62, i64 1
store i8 %59, i8* %62
%74 = call %struct.confline* @next_char(%struct.confline* %61, i8** %4)
%75 = load i8*, i8** %4
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 0
br i1 %77, label %78, label %58
78: ; preds = %70, %72, %53
%79 = phi i8* [ %13, %53 ], [ %73, %72 ], [ %62, %70 ]
%80 = phi %struct.confline* [ %45, %53 ], [ %74, %72 ], [ %61, %70 ]
%81 = phi i8* [ %54, %53 ], [ %75, %72 ], [ %60, %70 ]
%82 = phi i8 [ 0, %53 ], [ 0, %72 ], [ %59, %70 ]
%83 = icmp eq i8 %82, %47
br i1 %83, label %84, label %111
84: ; preds = %64, %78
%85 = phi i8* [ %81, %78 ], [ %60, %64 ]
%86 = phi %struct.confline* [ %80, %78 ], [ %61, %64 ]
%87 = phi i8* [ %79, %78 ], [ %62, %64 ]
%88 = getelementptr inbounds i8, i8* %85, i64 1
store i8* %88, i8** %4
%89 = load i8, i8* %85
%90 = getelementptr inbounds i8, i8* %87, i64 1
store i8 %89, i8* %87
br label %111
91: ; preds = %52, %105
%92 = phi i8 [ %109, %105 ], [ %47, %52 ]
%93 = phi %struct.confline* [ %107, %105 ], [ %45, %52 ]
%94 = phi i8* [ %106, %105 ], [ %6, %52 ]
%95 = call i32 @isspace(i8 signext %92)
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %111
97: ; preds = %91
%98 = load i8*, i8** %4
%99 = load i8, i8* %98
%100 = icmp eq i8 %99, 40
br i1 %100, label %111, label %101
101: ; preds = %97
%102 = icmp ne i8 %99, 41
%103 = icmp ult i8* %94, %14
%104 = select i1 %102, i1 %103, i1 false
br i1 %104, label %105, label %111
105: ; preds = %101
%106 = getelementptr inbounds i8, i8* %94, i64 1
store i8 %99, i8* %94
%107 = call %struct.confline* @next_char(%struct.confline* %93, i8** %4)
%108 = load i8*, i8** %4
%109 = load i8, i8* %108
%110 = icmp eq i8 %109, 0
br i1 %110, label %111, label %91
111: ; preds = %105, %91, %97, %101, %43, %78, %84
%112 = phi i8* [ %90, %84 ], [ %79, %78 ], [ %6, %43 ], [ %106, %105 ], [ %94, %91 ], [ %94, %97 ], [ %94, %101 ]
%113 = phi %struct.confline* [ %86, %84 ], [ %80, %78 ], [ %45, %43 ], [ %107, %105 ], [ %93, %91 ], [ %93, %97 ], [ %93, %101 ]
store i8 0, i8* %112
%114 = call i32 @cnfnode_setval(%struct.cnfnode* %37, i8* %6)
%115 = call %struct.confline* @_skip_spaces(%struct.confline* %113, i8** %4)
%116 = load i8*, i8** %4
%117 = load i8, i8* %116
%118 = icmp eq i8 %117, 41
br i1 %118, label %119, label %121
119: ; preds = %111
%120 = getelementptr inbounds i8, i8* %116, i64 1
store i8* %120, i8** %4
br label %123
121: ; preds = %111
%122 = call %struct.confline* @parse_syslogng_items(%struct.cnfnode* %37, %struct.confline* %115, i8** %4)
br label %123
123: ; preds = %121, %119
%124 = phi %struct.confline* [ %115, %119 ], [ %122, %121 ]
%125 = call %struct.confline* @_skip_spaces(%struct.confline* %124, i8** %4)
%126 = load i8*, i8** %4
%127 = load i8, i8* %126
br label %128
128: ; preds = %123, %35
%129 = phi i8 [ %127, %123 ], [ %41, %35 ]
%130 = phi i8* [ %126, %123 ], [ %40, %35 ]
%131 = phi %struct.confline* [ %125, %123 ], [ %39, %35 ]
%132 = icmp eq i8 %129, 59
br i1 %132, label %133, label %135
133: ; preds = %128
%134 = getelementptr inbounds i8, i8* %130, i64 1
store i8* %134, i8** %4
br label %135
135: ; preds = %133, %128
%136 = call %struct.confline* @_skip_spaces(%struct.confline* %131, i8** %4)
%137 = load i8*, i8** %4
%138 = load i8, i8* %137
switch i8 %138, label %15 [
i8 125, label %139
i8 0, label %142
]
139: ; preds = %135
%140 = getelementptr inbounds i8, i8* %137, i64 1
store i8* %140, i8** %4
%141 = call %struct.confline* @_skip_spaces(%struct.confline* %136, i8** %4)
br label %142
142: ; preds = %135, %139, %3
%143 = phi %struct.confline* [ %141, %139 ], [ %7, %3 ], [ %136, %135 ]
ret %struct.confline* %143
}