int test1(buf)
char *buf;
{
  register char *p = buf;
  char *bend;
  char *endfn;
  int contin;
  if (!((1 && isalpha(*p)) || (*p) == '_'))
    return 0;
  bend = skipspace(buf + strlen(buf) - 1, -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   1060 <isalpha@plt>
cmp    $0x0,%eax
jne    1195 <test1+0x45>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     1195 <test1+0x45>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
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
xor    %eax,%eax
mov    $0xffffffff,%esi
call   1070 <skipspace@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x5c(%rbp)
sub    $0x29,%eax
je     1217 <test1+0xc7>
jmp    11d8 <test1+0x88>
mov    -0x5c(%rbp),%eax
sub    $0x3b,%eax
je     120b <test1+0xbb>
jmp    11e9 <test1+0x99>
mov    -0x5c(%rbp),%eax
sub    $0x7b,%eax
je     1223 <test1+0xd3>
jmp    11fa <test1+0xaa>
mov    -0x5c(%rbp),%eax
sub    $0x7d,%eax
je     122f <test1+0xdf>
jmp    123b <test1+0xeb>
movl   $0x0,-0x2c(%rbp)
jmp    1242 <test1+0xf2>
movl   $0x1,-0x2c(%rbp)
jmp    1242 <test1+0xf2>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
movl   $0xffffffff,-0x2c(%rbp)
jmp    1247 <test1+0xf7>
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    1273 <test1+0x123>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    1283 <test1+0x133>
jmp    1294 <test1+0x144>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1247 <test1+0xf7>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1070 <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     12d9 <test1+0x189>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1070 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    130b <test1+0x1bb>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
lea    0x2d3e(%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     1386 <test1+0x236>
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x44(%rbp),%ecx
cmp    %rcx,%rax
jne    1375 <test1+0x225>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x44(%rbp),%eax
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1375 <test1+0x225>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
jmp    1324 <test1+0x1d4>
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    13ba <test1+0x26a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x6a(%rbp)
mov    -0x6a(%rbp),%al
test   $0x1,%al
jne    13ca <test1+0x27a>
jmp    13db <test1+0x28b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    138e <test1+0x23e>
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   1070 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
je     1447 <test1+0x2f7>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
jne    1453 <test1+0x303>
cmpl   $0x4,-0x54(%rbp)
jne    1447 <test1+0x2f7>
mov    -0x50(%rbp),%rdi
lea    0xc45(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1453 <test1+0x303>
movl   $0x0,-0x4(%rbp)
jmp    14ff <test1+0x3af>
cmpl   $0x0,-0x2c(%rbp)
jle    14f9 <test1+0x3a9>
movl   $0x0,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1070 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     14e3 <test1+0x393>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    14a4 <test1+0x354>
mov    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    14bb <test1+0x36b>
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   1070 <skipspace@plt>
cltq
mov    %rax,-0x18(%rbp)
jmp    147a <test1+0x32a>
cmpl   $0x0,-0x58(%rbp)
jle    14f4 <test1+0x3a4>
movl   $0xffffffff,-0x2c(%rbp)
jmp    14f9 <test1+0x3a9>
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   1060 <isalpha@plt>
test   %eax,%eax
jne    117b <test1+0x2b>
xor    %r13d,%r13d
cmp    $0x5f,%bl
jne    12b0 <test1+0x160>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r14,%rax,1),%rdi
add    $0xffffffffffffffff,%rdi
xor    %r12d,%r12d
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
cltq
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     11b8 <test1+0x68>
cmp    $0x29,%eax
je     11dd <test1+0x8d>
movl   $0x0,0x4(%rsp)
cmp    $0x3b,%eax
je     11e8 <test1+0x98>
jmp    11d0 <test1+0x80>
cmp    $0x7b,%eax
je     12ad <test1+0x15d>
mov    $0x0,%r13d
cmp    $0x7d,%eax
je     12b0 <test1+0x160>
movl   $0xffffffff,0x4(%rsp)
ff
xor    %r12d,%r12d
jmp    11e8 <test1+0x98>
movl   $0x1,0x4(%rsp)
mov    $0x1,%r12b
lea    -0x1(%r14),%rbp
mov    $0xffffffffffffffff,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
add    $0x1,%r15
test   %eax,%eax
jne    1200 <test1+0xb0>
cmp    $0x5f,%bl
je     1200 <test1+0xb0>
xor    %r13d,%r13d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%rdi
cmpb   $0x28,(%rdi)
jne    12b0 <test1+0x160>
mov    %r12d,0x8(%rsp)
add    $0x1,%rdi
xor    %r13d,%r13d
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%rcx
movsbl (%rcx),%r12d
cmp    $0x29,%r12d
je     12b0 <test1+0x160>
mov    %eax,0xc(%rsp)
mov    %rcx,0x10(%rsp)
mov    %r15d,%ebp
lea    0xd91(%rip),%r15
lea    0x2ae2(%rip),%rbx
jmp    128c <test1+0x13c>
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%r15
add    $0x8,%rbx
test   %r15,%r15
je     12c2 <test1+0x172>
mov    %r15,%rdi
call   1040 <strlen@plt>
cmp    %rbp,%rax
jne    1280 <test1+0x130>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1280 <test1+0x130>
jmp    12b0 <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    12dc <test1+0x18c>
mov    %r15,%rbp
cmp    $0x5f,%r12b
jne    12f9 <test1+0x1a9>
mov    %r15,%rbp
nop
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
jne    12e0 <test1+0x190>
cmp    $0x5f,%bl
je     12e0 <test1+0x190>
xor    %r13d,%r13d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
cltq
mov    (%rax),%al
cmp    $0x2c,%al
je     12b0 <test1+0x160>
cmp    $0x29,%al
jne    1355 <test1+0x205>
sub    0xc(%rsp),%ebp
cmp    $0x4,%ebp
mov    0x8(%rsp),%ebx
jne    12b0 <test1+0x160>
lea    0xd4e(%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    12b0 <test1+0x160>
xor    $0x1,%bl
je     1365 <test1+0x215>
jmp    12b0 <test1+0x160>
mov    0x4(%rsp),%r13d
cmpb   $0x0,0x8(%rsp)
je     12b0 <test1+0x160>
xor    %ebx,%ebx
jmp    1376 <test1+0x226>
nopl   0x0(%rax)
add    %ebp,%ebx
add    $0x1,%r14
mov    $0x1,%ebp
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%r14
movzbl (%r14),%eax
cmp    $0x28,%al
je     1370 <test1+0x220>
test   %al,%al
je     13a5 <test1+0x255>
xor    %ebp,%ebp
cmp    $0x29,%al
sete   %bpl
neg    %ebp
jmp    1370 <test1+0x220>
xor    %eax,%eax
test   %ebx,%ebx
setle  %al
lea    (%rax,%rax,1),%r13d
add    $0xffffffff,%r13d
jmp    12b0 <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 %198
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 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %31, i32 -1)
%33 = sext i32 %32 to i64
%34 = inttoptr i64 %33 to i8*
store i8* %34, i8** %5
%35 = load i8*, i8** %5
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
switch i32 %37, label %42 [
i32 59, label %38
i32 41, label %39
i32 123, label %40
i32 125, label %41
]
38: ; preds = %26
store i32 0, i32* %7
br label %43
39: ; preds = %26
store i32 1, i32* %7
br label %43
40: ; preds = %26
store i32 0, i32* %2
br label %198
41: ; preds = %26
store i32 0, i32* %2
br label %198
42: ; preds = %26
store i32 -1, i32* %7
br label %43
43: ; preds = %42, %39, %38
br label %44
44: ; preds = %57, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = call i32 @isalnum(i32 %47)
%49 = icmp ne i32 %48, 0
br i1 %49, label %55, label %50
50: ; preds = %44
%51 = load i8*, i8** %4
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 95
br label %55
55: ; preds = %50, %44
%56 = phi i1 [ true, %44 ], [ %54, %50 ]
br i1 %56, label %57, label %60
57: ; preds = %55
%58 = load i8*, i8** %4
%59 = getelementptr inbounds i8, i8* %58, i32 1
store i8* %59, i8** %4
br label %44
60: ; preds = %55
%61 = load i8*, i8** %4
store i8* %61, i8** %6
%62 = load i8*, i8** %4
%63 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %62, i32 1)
%64 = sext i32 %63 to i64
%65 = inttoptr i64 %64 to i8*
store i8* %65, i8** %4
%66 = load i8*, i8** %4
%67 = getelementptr inbounds i8, i8* %66, i32 1
store i8* %67, i8** %4
%68 = load i8, i8* %66
%69 = sext i8 %68 to i32
%70 = icmp ne i32 %69, 40
br i1 %70, label %71, label %72
71: ; preds = %60
store i32 0, i32* %2
br label %198
72: ; preds = %60
%73 = load i8*, i8** %4
%74 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %73, i32 1)
%75 = sext i32 %74 to i64
%76 = inttoptr i64 %75 to i8*
store i8* %76, i8** %4
%77 = load i8*, i8** %4
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 41
br i1 %80, label %81, label %82
81: ; preds = %72
store i32 0, i32* %2
br label %198
82: ; preds = %72
store i8** getelementptr inbounds ([25 x i8*], [25 x i8*]* @test1.words, i64 0, i64 0), i8*** %8
%83 = load i8*, i8** %6
%84 = load i8*, i8** %3
%85 = ptrtoint i8* %83 to i64
%86 = ptrtoint i8* %84 to i64
%87 = sub i64 %85, %86
%88 = trunc i64 %87 to i32
store i32 %88, i32* %10
br label %89
89: ; preds = %107, %82
%90 = load i8**, i8*** %8
%91 = load i8*, i8** %90
store i8* %91, i8** %9
%92 = icmp ne i8* %91, null
br i1 %92, label %93, label %110
93: ; preds = %89
%94 = load i8*, i8** %9
%95 = call i64 @strlen(i8* %94)
%96 = load i32, i32* %10
%97 = zext i32 %96 to i64
%98 = icmp eq i64 %95, %97
br i1 %98, label %99, label %107
99: ; preds = %93
%100 = load i8*, i8** %9
%101 = load i8*, i8** %3
%102 = load i32, i32* %10
%103 = zext i32 %102 to i64
%104 = call i32 @strncmp(i8* %100, i8* %101, i64 %103)
%105 = icmp ne i32 %104, 0
br i1 %105, label %107, label %106
106: ; preds = %99
store i32 0, i32* %2
br label %198
107: ; preds = %99, %93
%108 = load i8**, i8*** %8
%109 = getelementptr inbounds i8*, i8** %108, i32 1
store i8** %109, i8*** %8
br label %89
110: ; preds = %89
%111 = load i8*, i8** %4
store i8* %111, i8** %11
br label %112
112: ; preds = %125, %110
%113 = load i8*, i8** %4
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = call i32 @isalnum(i32 %115)
%117 = icmp ne i32 %116, 0
br i1 %117, label %123, label %118
118: ; preds = %112
%119 = load i8*, i8** %4
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 95
br label %123
123: ; preds = %118, %112
%124 = phi i1 [ true, %112 ], [ %122, %118 ]
br i1 %124, label %125, label %128
125: ; preds = %123
%126 = load i8*, i8** %4
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %4
br label %112
128: ; preds = %123
%129 = load i8*, i8** %4
%130 = load i8*, i8** %11
%131 = ptrtoint i8* %129 to i64
%132 = ptrtoint i8* %130 to i64
%133 = sub i64 %131, %132
%134 = trunc i64 %133 to i32
store i32 %134, i32* %12
%135 = load i8*, i8** %4
%136 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %135, i32 1)
%137 = sext i32 %136 to i64
%138 = inttoptr i64 %137 to i8*
store i8* %138, i8** %4
%139 = load i8*, i8** %4
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 44
br i1 %142, label %155, label %143
143: ; preds = %128
%144 = load i8*, i8** %4
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 41
br i1 %147, label %148, label %156
148: ; preds = %143
%149 = load i32, i32* %12
%150 = icmp ne i32 %149, 4
br i1 %150, label %155, label %151
151: ; preds = %148
%152 = load i8*, i8** %11
%153 = call i32 @strncmp(i8* %152, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i64 4)
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %156
155: ; preds = %151, %148, %128
store i32 0, i32* %2
br label %198
156: ; preds = %151, %143
%157 = load i32, i32* %7
%158 = icmp sgt i32 %157, 0
br i1 %158, label %159, label %196
159: ; preds = %156
store i32 0, i32* %13
%160 = load i8*, i8** %3
%161 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %160, i32 1)
%162 = sext i32 %161 to i64
%163 = inttoptr i64 %162 to i8*
store i8* %163, i8** %4
br label %164
164: ; preds = %185, %159
%165 = load i8*, i8** %4
%166 = load i8, i8* %165
%167 = icmp ne i8 %166, 0
br i1 %167, label %168, label %191
168: ; preds = %164
%169 = load i8*, i8** %4
%170 = load i8, i8* %169
%171 = sext i8 %170 to i32
%172 = icmp eq i32 %171, 40
br i1 %172, label %173, label %174
173: ; preds = %168
br label %181
174: ; preds = %168
%175 = load i8*, i8** %4
%176 = load i8, i8* %175
%177 = sext i8 %176 to i32
%178 = icmp eq i32 %177, 41
%179 = zext i1 %178 to i64
%180 = select i1 %178, i32 -1, i32 0
br label %181
181: ; preds = %174, %173
%182 = phi i32 [ 1, %173 ], [ %180, %174 ]
%183 = load i32, i32* %13
%184 = add nsw i32 %183, %182
store i32 %184, i32* %13
br label %185
185: ; preds = %181
%186 = load i8*, i8** %4
%187 = getelementptr inbounds i8, i8* %186, i64 1
%188 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %187, i32 1)
%189 = sext i32 %188 to i64
%190 = inttoptr i64 %189 to i8*
store i8* %190, i8** %4
br label %164
191: ; preds = %164
%192 = load i32, i32* %13
%193 = icmp sgt i32 %192, 0
br i1 %193, label %194, label %195
194: ; preds = %191
store i32 -1, i32* %7
br label %195
195: ; preds = %194, %191
br label %196
196: ; preds = %195, %156
%197 = load i32, i32* %7
store i32 %197, i32* %2
br label %198
198: ; preds = %196, %155, %106, %81, %71, %41, %40, %25
%199 = load i32, i32* %2
ret i32 %199
}

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 %112
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*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %11, i32 -1)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
switch i32 %16, label %18 [
i32 59, label %19
i32 41, label %17
i32 123, label %112
i32 125, label %112
]
17: ; preds = %8
br label %19
18: ; preds = %8
br label %19
19: ; preds = %8, %18, %17
%20 = phi i1 [ false, %18 ], [ true, %17 ], [ false, %8 ]
%21 = phi i32 [ -1, %18 ], [ 1, %17 ], [ 0, %8 ]
br label %22
22: ; preds = %22, %19
%23 = phi i8* [ %0, %19 ], [ %30, %22 ]
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = tail call i32 @isalnum(i32 %25)
%27 = icmp ne i32 %26, 0
%28 = icmp eq i8 %24, 95
%29 = select i1 %27, i1 true, i1 %28
%30 = getelementptr inbounds i8, i8* %23, i64 1
br i1 %29, label %22, label %31
31: ; preds = %22
%32 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %23, i32 1)
%33 = sext i32 %32 to i64
%34 = inttoptr i64 %33 to i8*
%35 = load i8, i8* %34
%36 = icmp eq i8 %35, 40
br i1 %36, label %37, label %112
37: ; preds = %31
%38 = getelementptr inbounds i8, i8* %34, i64 1
%39 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %38, i32 1)
%40 = sext i32 %39 to i64
%41 = inttoptr i64 %40 to i8*
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 41
br i1 %43, label %112, label %44
44: ; preds = %37
%45 = ptrtoint i8* %23 to i64
%46 = ptrtoint i8* %0 to i64
%47 = sub i64 %45, %46
%48 = and i64 %47, 4294967295
br label %49
49: ; preds = %44, %57
%50 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %44 ], [ %59, %57 ]
%51 = phi i8** [ getelementptr inbounds ([25 x i8*], [25 x i8*]* @test1.words, i64 0, i64 0), %44 ], [ %58, %57 ]
%52 = tail call i64 @strlen(i8* %50)
%53 = icmp eq i64 %52, %48
br i1 %53, label %54, label %57
54: ; preds = %49
%55 = tail call i32 @strncmp(i8* %50, i8* %0, i64 %48)
%56 = icmp eq i32 %55, 0
br i1 %56, label %112, label %57
57: ; preds = %54, %49
%58 = getelementptr inbounds i8*, i8** %51, i64 1
%59 = load i8*, i8** %58
%60 = icmp eq i8* %59, null
br i1 %60, label %61, label %49
61: ; preds = %57
%62 = sext i8 %42 to i32
%63 = tail call i32 @isalnum(i32 %62)
%64 = icmp ne i32 %63, 0
%65 = icmp eq i8 %42, 95
%66 = select i1 %64, i1 true, i1 %65
br i1 %66, label %67, label %76
67: ; preds = %61, %67
%68 = phi i8* [ %69, %67 ], [ %41, %61 ]
%69 = getelementptr inbounds i8, i8* %68, i64 1
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = tail call i32 @isalnum(i32 %71)
%73 = icmp ne i32 %72, 0
%74 = icmp eq i8 %70, 95
%75 = select i1 %73, i1 true, i1 %74
br i1 %75, label %67, label %76
76: ; preds = %67, %61
%77 = phi i8* [ %41, %61 ], [ %69, %67 ]
%78 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %77, i32 1)
%79 = sext i32 %78 to i64
%80 = inttoptr i64 %79 to i8*
%81 = load i8, i8* %80
switch i8 %81, label %93 [
i8 44, label %112
i8 41, label %82
]
82: ; preds = %76
%83 = ptrtoint i8* %77 to i64
%84 = trunc i64 %83 to i32
%85 = sub i32 %84, %39
%86 = icmp eq i32 %85, 4
br i1 %86, label %87, label %112
87: ; preds = %82
%88 = tail call i32 @strncmp(i8* %41, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i64 4)
%89 = icmp ne i32 %88, 0
%90 = xor i1 %20, true
%91 = or i1 %89, %90
%92 = select i1 %89, i32 0, i32 %21
br i1 %91, label %112, label %94
93: ; preds = %76
br i1 %20, label %94, label %112
94: ; preds = %87, %93
br label %95
95: ; preds = %94, %105
%96 = phi i8* [ %108, %105 ], [ %0, %94 ]
%97 = phi i32 [ %107, %105 ], [ 0, %94 ]
%98 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %96, i32 1)
%99 = sext i32 %98 to i64
%100 = inttoptr i64 %99 to i8*
%101 = load i8, i8* %100
switch i8 %101, label %102 [
i8 0, label %109
i8 40, label %105
]
102: ; preds = %95
%103 = icmp eq i8 %101, 41
%104 = sext i1 %103 to i32
br label %105
105: ; preds = %95, %102
%106 = phi i32 [ %104, %102 ], [ 1, %95 ]
%107 = add nsw i32 %106, %97
%108 = getelementptr inbounds i8, i8* %100, i64 1
br label %95
109: ; preds = %95
%110 = icmp slt i32 %97, 1
%111 = select i1 %110, i32 1, i32 -1
br label %112
112: ; preds = %54, %87, %93, %109, %76, %82, %37, %31, %8, %8, %1
%113 = phi i32 [ 0, %1 ], [ 0, %8 ], [ 0, %8 ], [ 0, %31 ], [ 0, %37 ], [ 0, %82 ], [ %92, %87 ], [ 0, %76 ], [ %111, %109 ], [ %21, %93 ], [ 0, %54 ]
ret i32 %113
}