int test1(buf)
char *buf;
{
  char *p = buf;
  char *bend;
  char *endfn;
  int contin;
  if (!((1 && isalpha(*p)) || (*p) == '_'))
    return 0;
  bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1);
  switch (*bend) {
  case ';':
    contin = 0;
    break;
  case ')':
    contin = 1;
    break;
  case '{':
    return 0;
  case '}':
    return 0;
  default:
    contin = -1;
  }
  while (((1 && isalnum(*p)) || (*p) == '_'))
    p++;
  endfn = p;
  p = skipspace(p, 1);
  if (*p++ != '(')
    return 0;
  p = skipspace(p, 1);
  if (*p == ')')
    return 0;
  {
    static char *words[] = {
        "asm",      "auto",   "case",     "char",   "const",
        "double",   "extern", "float",    "for",    "if",
        "int",      "long",   "register", "return", "short",
        "signed",   "sizeof", "static",   "switch", "typedef",
        "unsigned", "void",   "volatile", "while",  0};
    char **key = words;
    char *kp;
    unsigned len = endfn - buf;
    while ((kp = *key) != 0) {
      if (strlen(kp) == len && !strncmp(kp, buf, len))
        return 0;
      key++;
    }
  }
  {
    char *id = p;
    int len;
    while (((1 && isalnum(*p)) || (*p) == '_'))
      p++;
    len = p - id;
    p = skipspace(p, 1);
    if (*p == ',' || (*p == ')' && (len != 4 || strncmp(id, "void", 4))))
      return 0;
  }
  if (contin > 0) {
    int level = 0;
    for (p = skipspace(buf, 1); *p; p = skipspace(p + 1, 1))
      level += (*p == '(' ? 1 : *p == ')' ? -1 : 0);
    if (level > 0)
      contin = -1;
  }
  return contin;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isalpha@plt>
cmp    $0x0,%eax
jne    11a5 <test1+0x45>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     11a5 <test1+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
mov    -0x10(%rbp),%rdi
mov    %rdi,-0x68(%rbp)
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x68(%rbp),%rax
lea    -0x1(%rax,%rcx,1),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %al,-0x5d(%rbp)
call   1060 <ppdirbackward@plt>
mov    %eax,%edi
mov    -0x5d(%rbp),%al
mov    $0xffffffff,%esi
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x29,%eax
je     1238 <test1+0xd8>
jmp    11f9 <test1+0x99>
mov    -0x5c(%rbp),%eax
sub    $0x3b,%eax
je     122c <test1+0xcc>
jmp    120a <test1+0xaa>
mov    -0x5c(%rbp),%eax
sub    $0x7b,%eax
je     1244 <test1+0xe4>
jmp    121b <test1+0xbb>
mov    -0x5c(%rbp),%eax
sub    $0x7d,%eax
je     1250 <test1+0xf0>
jmp    125c <test1+0xfc>
movl   $0x0,-0x2c(%rbp)
jmp    1263 <test1+0x103>
movl   $0x1,-0x2c(%rbp)
jmp    1263 <test1+0x103>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1268 <test1+0x108>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isalnum@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x69(%rbp)
jne    1294 <test1+0x134>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    12a4 <test1+0x144>
jmp    12b5 <test1+0x155>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1268 <test1+0x108>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    $0x28,%eax
je     12fa <test1+0x19a>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    132c <test1+0x1cc>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
lea    0x2d2d(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
cmp    $0x0,%rax
je     13a7 <test1+0x247>
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x44(%rbp),%ecx
cmp    %rcx,%rax
jne    1396 <test1+0x236>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x44(%rbp),%eax
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1396 <test1+0x236>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
jmp    1345 <test1+0x1e5>
mov    -0x18(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1050 <isalnum@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x6a(%rbp)
jne    13db <test1+0x27b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x6a(%rbp)
mov    -0x6a(%rbp),%al
test   $0x1,%al
jne    13eb <test1+0x28b>
jmp    13fc <test1+0x29c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    13af <test1+0x24f>
mov    -0x18(%rbp),%rax
mov    -0x50(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x54(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
je     1468 <test1+0x308>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    1474 <test1+0x314>
cmpl   $0x4,-0x54(%rbp)
jne    1468 <test1+0x308>
mov    -0x50(%rbp),%rdi
lea    0xc24(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1474 <test1+0x314>
movl   $0x0,-0x4(%rbp)
jmp    1520 <test1+0x3c0>
cmpl   $0x0,-0x2c(%rbp)
jle    151a <test1+0x3ba>
movl   $0x0,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1504 <test1+0x3a4>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    14c5 <test1+0x365>
mov    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    14dc <test1+0x37c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x29,%edx
cmove  %ecx,%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1080 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
jmp    149b <test1+0x33b>
cmpl   $0x0,-0x58(%rbp)
jle    1515 <test1+0x3b5>
movl   $0xffffffff,-0x2c(%rbp)
jmp    151a <test1+0x3ba>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%r14
mov    (%rdi),%bl
movsbl %bl,%edi
call   1070 <isalpha@plt>
test   %eax,%eax
jne    118b <test1+0x2b>
xor    %r13d,%r13d
cmp    $0x5f,%bl
jne    12c0 <test1+0x160>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r14,%rax,1),%rdi
add    $0xffffffffffffffff,%rdi
xor    %r12d,%r12d
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <ppdirbackward@plt>
mov    %eax,%edi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1080 <skipspace@plt>
cltq
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     11d4 <test1+0x74>
cmp    $0x29,%eax
je     11f9 <test1+0x99>
movl   $0x0,0x4(%rsp)
cmp    $0x3b,%eax
je     1204 <test1+0xa4>
jmp    11ec <test1+0x8c>
cmp    $0x7b,%eax
je     12bd <test1+0x15d>
mov    $0x0,%r13d
cmp    $0x7d,%eax
je     12c0 <test1+0x160>
movl   $0xffffffff,0x4(%rsp)
ff
xor    %r12d,%r12d
jmp    1204 <test1+0xa4>
movl   $0x1,0x4(%rsp)
mov    $0x1,%r12b
lea    -0x1(%r14),%rbp
mov    $0xffffffffffffffff,%r15
nop
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
add    $0x1,%r15
test   %eax,%eax
jne    1210 <test1+0xb0>
cmp    $0x5f,%bl
je     1210 <test1+0xb0>
xor    %r13d,%r13d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <skipspace@plt>
movslq %eax,%rdi
cmpb   $0x28,(%rdi)
jne    12c0 <test1+0x160>
mov    %r12d,0x8(%rsp)
add    $0x1,%rdi
xor    %r13d,%r13d
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <skipspace@plt>
movslq %eax,%rcx
movsbl (%rcx),%r12d
cmp    $0x29,%r12d
je     12c0 <test1+0x160>
mov    %eax,0xc(%rsp)
mov    %rcx,0x10(%rsp)
mov    %r15d,%ebp
lea    0xd81(%rip),%r15
lea    0x2ad2(%rip),%rbx
jmp    129c <test1+0x13c>
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%r15
add    $0x8,%rbx
test   %r15,%r15
je     12d2 <test1+0x172>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    %rbp,%rax
jne    1290 <test1+0x130>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1290 <test1+0x130>
jmp    12c0 <test1+0x160>
xor    %r13d,%r13d
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r12d,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
mov    0x10(%rsp),%r15
jne    12ec <test1+0x18c>
mov    %r15,%rbp
cmp    $0x5f,%r12b
jne    1309 <test1+0x1a9>
mov    %r15,%rbp
nop
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
jne    12f0 <test1+0x190>
cmp    $0x5f,%bl
je     12f0 <test1+0x190>
xor    %r13d,%r13d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <skipspace@plt>
cltq
mov    (%rax),%al
cmp    $0x2c,%al
je     12c0 <test1+0x160>
cmp    $0x29,%al
jne    1365 <test1+0x205>
sub    0xc(%rsp),%ebp
cmp    $0x4,%ebp
mov    0x8(%rsp),%ebx
jne    12c0 <test1+0x160>
lea    0xd3e(%rip),%rsi
mov    $0x4,%edx
mov    %r15,%rdi
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
mov    0x4(%rsp),%r13d
cmovne %ecx,%r13d
jne    12c0 <test1+0x160>
xor    $0x1,%bl
je     1375 <test1+0x215>
jmp    12c0 <test1+0x160>
mov    0x4(%rsp),%r13d
cmpb   $0x0,0x8(%rsp)
je     12c0 <test1+0x160>
xor    %ebx,%ebx
jmp    1386 <test1+0x226>
nopl   0x0(%rax)
add    %ebp,%ebx
add    $0x1,%r14
mov    $0x1,%ebp
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <skipspace@plt>
movslq %eax,%r14
movzbl (%r14),%eax
cmp    $0x28,%al
je     1380 <test1+0x220>
test   %al,%al
je     13b5 <test1+0x255>
xor    %ebp,%ebp
cmp    $0x29,%al
sete   %bpl
neg    %ebp
jmp    1380 <test1+0x220>
xor    %eax,%eax
test   %ebx,%ebx
setle  %al
lea    (%rax,%rax,1),%r13d
add    $0xffffffff,%r13d
jmp    12c0 <test1+0x160>

LLVM IR (-O0):
@test1.words = internal global [25 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.23, i32 0, i32 0), i8* null]
@.str = [4 x i8] c"asm\00"
@.str.1 = [5 x i8] c"auto\00"
@.str.2 = [5 x i8] c"case\00"
@.str.3 = [5 x i8] c"char\00"
@.str.4 = [6 x i8] c"const\00"
@.str.5 = [7 x i8] c"double\00"
@.str.6 = [7 x i8] c"extern\00"
@.str.7 = [6 x i8] c"float\00"
@.str.8 = [4 x i8] c"for\00"
@.str.9 = [3 x i8] c"if\00"
@.str.10 = [4 x i8] c"int\00"
@.str.11 = [5 x i8] c"long\00"
@.str.12 = [9 x i8] c"register\00"
@.str.13 = [7 x i8] c"return\00"
@.str.14 = [6 x i8] c"short\00"
@.str.15 = [7 x i8] c"signed\00"
@.str.16 = [7 x i8] c"sizeof\00"
@.str.17 = [7 x i8] c"static\00"
@.str.18 = [7 x i8] c"switch\00"
@.str.19 = [8 x i8] c"typedef\00"
@.str.20 = [9 x i8] c"unsigned\00"
@.str.21 = [5 x i8] c"void\00"
@.str.22 = [9 x i8] c"volatile\00"
@.str.23 = [6 x i8] c"while\00"
define i32 @test1(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %3
%14 = load i8*, i8** %3
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 @isalpha(i32 %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %26, label %20
20: ; preds = %1
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 95
br i1 %24, label %26, label %25
25: ; preds = %20
store i32 0, i32* %2
br label %200
26: ; preds = %20, %1
%27 = load i8*, i8** %3
%28 = load i8*, i8** %3
%29 = call i64 @strlen(i8* %28)
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = getelementptr inbounds i8, i8* %30, i64 -1
%32 = load i8*, i8** %3
%33 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ppdirbackward to i32 (i8*, i8*, ...)*)(i8* %31, i8* %32)
%34 = call i32 (i32, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i32, i32, ...)*)(i32 %33, i32 -1)
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i8*
store i8* %36, i8** %5
%37 = load i8*, i8** %5
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
switch i32 %39, label %44 [
i32 59, label %40
i32 41, label %41
i32 123, label %42
i32 125, label %43
]
40: ; preds = %26
store i32 0, i32* %7
br label %45
41: ; preds = %26
store i32 1, i32* %7
br label %45
42: ; preds = %26
store i32 0, i32* %2
br label %200
43: ; preds = %26
store i32 0, i32* %2
br label %200
44: ; preds = %26
store i32 -1, i32* %7
br label %45
45: ; preds = %44, %41, %40
br label %46
46: ; preds = %59, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i32 @isalnum(i32 %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %57, label %52
52: ; preds = %46
%53 = load i8*, i8** %4
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 95
br label %57
57: ; preds = %52, %46
%58 = phi i1 [ true, %46 ], [ %56, %52 ]
br i1 %58, label %59, label %62
59: ; preds = %57
%60 = load i8*, i8** %4
%61 = getelementptr inbounds i8, i8* %60, i32 1
store i8* %61, i8** %4
br label %46
62: ; preds = %57
%63 = load i8*, i8** %4
store i8* %63, i8** %6
%64 = load i8*, i8** %4
%65 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %64, i32 1)
%66 = sext i32 %65 to i64
%67 = inttoptr i64 %66 to i8*
store i8* %67, i8** %4
%68 = load i8*, i8** %4
%69 = getelementptr inbounds i8, i8* %68, i32 1
store i8* %69, i8** %4
%70 = load i8, i8* %68
%71 = sext i8 %70 to i32
%72 = icmp ne i32 %71, 40
br i1 %72, label %73, label %74
73: ; preds = %62
store i32 0, i32* %2
br label %200
74: ; preds = %62
%75 = load i8*, i8** %4
%76 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %75, i32 1)
%77 = sext i32 %76 to i64
%78 = inttoptr i64 %77 to i8*
store i8* %78, i8** %4
%79 = load i8*, i8** %4
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 41
br i1 %82, label %83, label %84
83: ; preds = %74
store i32 0, i32* %2
br label %200
84: ; preds = %74
store i8** getelementptr inbounds ([25 x i8*], [25 x i8*]* @test1.words, i64 0, i64 0), i8*** %8
%85 = load i8*, i8** %6
%86 = load i8*, i8** %3
%87 = ptrtoint i8* %85 to i64
%88 = ptrtoint i8* %86 to i64
%89 = sub i64 %87, %88
%90 = trunc i64 %89 to i32
store i32 %90, i32* %10
br label %91
91: ; preds = %109, %84
%92 = load i8**, i8*** %8
%93 = load i8*, i8** %92
store i8* %93, i8** %9
%94 = icmp ne i8* %93, null
br i1 %94, label %95, label %112
95: ; preds = %91
%96 = load i8*, i8** %9
%97 = call i64 @strlen(i8* %96)
%98 = load i32, i32* %10
%99 = zext i32 %98 to i64
%100 = icmp eq i64 %97, %99
br i1 %100, label %101, label %109
101: ; preds = %95
%102 = load i8*, i8** %9
%103 = load i8*, i8** %3
%104 = load i32, i32* %10
%105 = zext i32 %104 to i64
%106 = call i32 @strncmp(i8* %102, i8* %103, i64 %105)
%107 = icmp ne i32 %106, 0
br i1 %107, label %109, label %108
108: ; preds = %101
store i32 0, i32* %2
br label %200
109: ; preds = %101, %95
%110 = load i8**, i8*** %8
%111 = getelementptr inbounds i8*, i8** %110, i32 1
store i8** %111, i8*** %8
br label %91
112: ; preds = %91
%113 = load i8*, i8** %4
store i8* %113, i8** %11
br label %114
114: ; preds = %127, %112
%115 = load i8*, i8** %4
%116 = load i8, i8* %115
%117 = sext i8 %116 to i32
%118 = call i32 @isalnum(i32 %117)
%119 = icmp ne i32 %118, 0
br i1 %119, label %125, label %120
120: ; preds = %114
%121 = load i8*, i8** %4
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 95
br label %125
125: ; preds = %120, %114
%126 = phi i1 [ true, %114 ], [ %124, %120 ]
br i1 %126, label %127, label %130
127: ; preds = %125
%128 = load i8*, i8** %4
%129 = getelementptr inbounds i8, i8* %128, i32 1
store i8* %129, i8** %4
br label %114
130: ; preds = %125
%131 = load i8*, i8** %4
%132 = load i8*, i8** %11
%133 = ptrtoint i8* %131 to i64
%134 = ptrtoint i8* %132 to i64
%135 = sub i64 %133, %134
%136 = trunc i64 %135 to i32
store i32 %136, i32* %12
%137 = load i8*, i8** %4
%138 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %137, i32 1)
%139 = sext i32 %138 to i64
%140 = inttoptr i64 %139 to i8*
store i8* %140, i8** %4
%141 = load i8*, i8** %4
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = icmp eq i32 %143, 44
br i1 %144, label %157, label %145
145: ; preds = %130
%146 = load i8*, i8** %4
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp eq i32 %148, 41
br i1 %149, label %150, label %158
150: ; preds = %145
%151 = load i32, i32* %12
%152 = icmp ne i32 %151, 4
br i1 %152, label %157, label %153
153: ; preds = %150
%154 = load i8*, i8** %11
%155 = call i32 @strncmp(i8* %154, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i64 4)
%156 = icmp ne i32 %155, 0
br i1 %156, label %157, label %158
157: ; preds = %153, %150, %130
store i32 0, i32* %2
br label %200
158: ; preds = %153, %145
%159 = load i32, i32* %7
%160 = icmp sgt i32 %159, 0
br i1 %160, label %161, label %198
161: ; preds = %158
store i32 0, i32* %13
%162 = load i8*, i8** %3
%163 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %162, i32 1)
%164 = sext i32 %163 to i64
%165 = inttoptr i64 %164 to i8*
store i8* %165, i8** %4
br label %166
166: ; preds = %187, %161
%167 = load i8*, i8** %4
%168 = load i8, i8* %167
%169 = icmp ne i8 %168, 0
br i1 %169, label %170, label %193
170: ; preds = %166
%171 = load i8*, i8** %4
%172 = load i8, i8* %171
%173 = sext i8 %172 to i32
%174 = icmp eq i32 %173, 40
br i1 %174, label %175, label %176
175: ; preds = %170
br label %183
176: ; preds = %170
%177 = load i8*, i8** %4
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp eq i32 %179, 41
%181 = zext i1 %180 to i64
%182 = select i1 %180, i32 -1, i32 0
br label %183
183: ; preds = %176, %175
%184 = phi i32 [ 1, %175 ], [ %182, %176 ]
%185 = load i32, i32* %13
%186 = add nsw i32 %185, %184
store i32 %186, i32* %13
br label %187
187: ; preds = %183
%188 = load i8*, i8** %4
%189 = getelementptr inbounds i8, i8* %188, i64 1
%190 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %189, i32 1)
%191 = sext i32 %190 to i64
%192 = inttoptr i64 %191 to i8*
store i8* %192, i8** %4
br label %166
193: ; preds = %166
%194 = load i32, i32* %13
%195 = icmp sgt i32 %194, 0
br i1 %195, label %196, label %197
196: ; preds = %193
store i32 -1, i32* %7
br label %197
197: ; preds = %196, %193
br label %198
198: ; preds = %197, %158
%199 = load i32, i32* %7
store i32 %199, i32* %2
br label %200
200: ; preds = %198, %157, %108, %83, %73, %43, %42, %25
%201 = load i32, i32* %2
ret i32 %201
}

LLVM IR (-O2):
@test1.words = internal unnamed_addr constant [25 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.23, i32 0, i32 0), i8* null]
@.str = [4 x i8] c"asm\00"
@.str.1 = [5 x i8] c"auto\00"
@.str.2 = [5 x i8] c"case\00"
@.str.3 = [5 x i8] c"char\00"
@.str.4 = [6 x i8] c"const\00"
@.str.5 = [7 x i8] c"double\00"
@.str.6 = [7 x i8] c"extern\00"
@.str.7 = [6 x i8] c"float\00"
@.str.8 = [4 x i8] c"for\00"
@.str.9 = [3 x i8] c"if\00"
@.str.10 = [4 x i8] c"int\00"
@.str.11 = [5 x i8] c"long\00"
@.str.12 = [9 x i8] c"register\00"
@.str.13 = [7 x i8] c"return\00"
@.str.14 = [6 x i8] c"short\00"
@.str.15 = [7 x i8] c"signed\00"
@.str.16 = [7 x i8] c"sizeof\00"
@.str.17 = [7 x i8] c"static\00"
@.str.18 = [7 x i8] c"switch\00"
@.str.19 = [8 x i8] c"typedef\00"
@.str.20 = [9 x i8] c"unsigned\00"
@.str.21 = [5 x i8] c"void\00"
@.str.22 = [9 x i8] c"volatile\00"
@.str.23 = [6 x i8] c"while\00"
define i32 @test1(i8* %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = tail call i32 @isalpha(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = icmp eq i8 %2, 95
%7 = select i1 %5, i1 true, i1 %6
br i1 %7, label %8, label %113
8: ; preds = %1
%9 = tail call i64 @strlen(i8* %0)
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 -1
%12 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @ppdirbackward to i32 (i8*, i8*, ...)*)(i8* %11, i8* %0)
%13 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i32, i32, ...)*)(i32 %12, i32 -1)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
switch i32 %17, label %19 [
i32 59, label %20
i32 41, label %18
i32 123, label %113
i32 125, label %113
]
18: ; preds = %8
br label %20
19: ; preds = %8
br label %20
20: ; preds = %8, %19, %18
%21 = phi i1 [ false, %19 ], [ true, %18 ], [ false, %8 ]
%22 = phi i32 [ -1, %19 ], [ 1, %18 ], [ 0, %8 ]
br label %23
23: ; preds = %23, %20
%24 = phi i8* [ %0, %20 ], [ %31, %23 ]
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = tail call i32 @isalnum(i32 %26)
%28 = icmp ne i32 %27, 0
%29 = icmp eq i8 %25, 95
%30 = select i1 %28, i1 true, i1 %29
%31 = getelementptr inbounds i8, i8* %24, i64 1
br i1 %30, label %23, label %32
32: ; preds = %23
%33 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %24, i32 1)
%34 = sext i32 %33 to i64
%35 = inttoptr i64 %34 to i8*
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 40
br i1 %37, label %38, label %113
38: ; preds = %32
%39 = getelementptr inbounds i8, i8* %35, i64 1
%40 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %39, i32 1)
%41 = sext i32 %40 to i64
%42 = inttoptr i64 %41 to i8*
%43 = load i8, i8* %42
%44 = icmp eq i8 %43, 41
br i1 %44, label %113, label %45
45: ; preds = %38
%46 = ptrtoint i8* %24 to i64
%47 = ptrtoint i8* %0 to i64
%48 = sub i64 %46, %47
%49 = and i64 %48, 4294967295
br label %50
50: ; preds = %45, %58
%51 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %45 ], [ %60, %58 ]
%52 = phi i8** [ getelementptr inbounds ([25 x i8*], [25 x i8*]* @test1.words, i64 0, i64 0), %45 ], [ %59, %58 ]
%53 = tail call i64 @strlen(i8* %51)
%54 = icmp eq i64 %53, %49
br i1 %54, label %55, label %58
55: ; preds = %50
%56 = tail call i32 @strncmp(i8* %51, i8* %0, i64 %49)
%57 = icmp eq i32 %56, 0
br i1 %57, label %113, label %58
58: ; preds = %55, %50
%59 = getelementptr inbounds i8*, i8** %52, i64 1
%60 = load i8*, i8** %59
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %50
62: ; preds = %58
%63 = sext i8 %43 to i32
%64 = tail call i32 @isalnum(i32 %63)
%65 = icmp ne i32 %64, 0
%66 = icmp eq i8 %43, 95
%67 = select i1 %65, i1 true, i1 %66
br i1 %67, label %68, label %77
68: ; preds = %62, %68
%69 = phi i8* [ %70, %68 ], [ %42, %62 ]
%70 = getelementptr inbounds i8, i8* %69, i64 1
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = tail call i32 @isalnum(i32 %72)
%74 = icmp ne i32 %73, 0
%75 = icmp eq i8 %71, 95
%76 = select i1 %74, i1 true, i1 %75
br i1 %76, label %68, label %77
77: ; preds = %68, %62
%78 = phi i8* [ %42, %62 ], [ %70, %68 ]
%79 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %78, i32 1)
%80 = sext i32 %79 to i64
%81 = inttoptr i64 %80 to i8*
%82 = load i8, i8* %81
switch i8 %82, label %94 [
i8 44, label %113
i8 41, label %83
]
83: ; preds = %77
%84 = ptrtoint i8* %78 to i64
%85 = trunc i64 %84 to i32
%86 = sub i32 %85, %40
%87 = icmp eq i32 %86, 4
br i1 %87, label %88, label %113
88: ; preds = %83
%89 = tail call i32 @strncmp(i8* %42, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i64 4)
%90 = icmp ne i32 %89, 0
%91 = xor i1 %21, true
%92 = or i1 %90, %91
%93 = select i1 %90, i32 0, i32 %22
br i1 %92, label %113, label %95
94: ; preds = %77
br i1 %21, label %95, label %113
95: ; preds = %88, %94
br label %96
96: ; preds = %95, %106
%97 = phi i8* [ %109, %106 ], [ %0, %95 ]
%98 = phi i32 [ %108, %106 ], [ 0, %95 ]
%99 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %97, i32 1)
%100 = sext i32 %99 to i64
%101 = inttoptr i64 %100 to i8*
%102 = load i8, i8* %101
switch i8 %102, label %103 [
i8 0, label %110
i8 40, label %106
]
103: ; preds = %96
%104 = icmp eq i8 %102, 41
%105 = sext i1 %104 to i32
br label %106
106: ; preds = %96, %103
%107 = phi i32 [ %105, %103 ], [ 1, %96 ]
%108 = add nsw i32 %107, %98
%109 = getelementptr inbounds i8, i8* %101, i64 1
br label %96
110: ; preds = %96
%111 = icmp slt i32 %98, 1
%112 = select i1 %111, i32 1, i32 -1
br label %113
113: ; preds = %55, %88, %94, %110, %77, %83, %38, %32, %8, %8, %1
%114 = phi i32 [ 0, %1 ], [ 0, %8 ], [ 0, %8 ], [ 0, %32 ], [ 0, %38 ], [ 0, %83 ], [ %93, %88 ], [ 0, %77 ], [ %112, %110 ], [ %22, %94 ], [ 0, %55 ]
ret i32 %114
}