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;
    int 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 == ')' && (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    14ef <test1+0x39f>
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    14ef <test1+0x39f>
movl   $0x0,-0x4(%rbp)
jmp    14ef <test1+0x39f>
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    14ef <test1+0x39f>
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    14ef <test1+0x39f>
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>
movslq -0x44(%rbp),%rcx
cmp    %rcx,%rax
jne    1375 <test1+0x225>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x44(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1375 <test1+0x225>
movl   $0x0,-0x4(%rbp)
jmp    14ef <test1+0x39f>
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    $0x29,%eax
jne    1443 <test1+0x2f3>
cmpl   $0x4,-0x54(%rbp)
jne    1437 <test1+0x2e7>
mov    -0x50(%rbp),%rdi
lea    0xc55(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     1443 <test1+0x2f3>
movl   $0x0,-0x4(%rbp)
jmp    14ef <test1+0x39f>
cmpl   $0x0,-0x2c(%rbp)
jle    14e9 <test1+0x399>
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     14d3 <test1+0x383>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
jne    1494 <test1+0x344>
mov    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    14ab <test1+0x35b>
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    146a <test1+0x31a>
cmpl   $0x0,-0x58(%rbp)
jle    14e4 <test1+0x394>
movl   $0xffffffff,-0x2c(%rbp)
jmp    14e9 <test1+0x399>
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,%r15
mov    (%rdi),%bl
movsbl %bl,%edi
call   1060 <isalpha@plt>
test   %eax,%eax
jne    117b <test1+0x2b>
xor    %r12d,%r12d
cmp    $0x5f,%bl
jne    12c0 <test1+0x170>
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0xffffffffffffffff,%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
cltq
movsbl (%rax),%eax
cmp    $0x7a,%eax
jg     11bd <test1+0x6d>
cmp    $0x29,%eax
je     11e7 <test1+0x97>
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
cmp    $0x3b,%eax
je     11f5 <test1+0xa5>
jmp    11d5 <test1+0x85>
cmp    $0x7b,%eax
je     12bd <test1+0x16d>
mov    $0x0,%r12d
cmp    $0x7d,%eax
je     12c0 <test1+0x170>
movl   $0xffffffff,0xc(%rsp)
ff
movl   $0x0,0x8(%rsp)
jmp    11f5 <test1+0xa5>
movl   $0x1,0xc(%rsp)
mov    $0x1,%al
mov    %eax,0x8(%rsp)
lea    -0x1(%r15),%rbp
movabs $0xffffffff00000000,%r13
movabs $0x100000000,%r14
nopl   (%rax)
add    %r14,%r13
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
jne    1210 <test1+0xc0>
cmp    $0x5f,%bl
je     1210 <test1+0xc0>
xor    %r12d,%r12d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%rdi
cmpb   $0x28,(%rdi)
jne    12c0 <test1+0x170>
add    $0x1,%rdi
xor    %r12d,%r12d
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%rbp
movsbl 0x0(%rbp),%ecx
cmp    $0x29,%ecx
je     12c0 <test1+0x170>
mov    %ecx,0x14(%rsp)
mov    %eax,0x10(%rsp)
sar    $0x20,%r13
lea    0xd88(%rip),%rbx
lea    0x2ad9(%rip),%r14
jmp    129c <test1+0x14c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rbx
add    $0x8,%r14
test   %rbx,%rbx
je     12d2 <test1+0x182>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    %r13,%rax
jne    1290 <test1+0x140>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    1290 <test1+0x140>
jmp    12c0 <test1+0x170>
xor    %r12d,%r12d
mov    %r12d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x14(%rsp),%ebx
mov    %ebx,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
mov    %rbp,%r14
jne    12ec <test1+0x19c>
mov    %r14,%rbp
cmp    $0x5f,%bl
jne    1309 <test1+0x1b9>
mov    %r14,%rbp
nop
movzbl 0x1(%rbp),%ebx
add    $0x1,%rbp
movsbl %bl,%edi
call   1050 <isalnum@plt>
test   %eax,%eax
jne    12f0 <test1+0x1a0>
cmp    $0x5f,%bl
je     12f0 <test1+0x1a0>
xor    %r12d,%r12d
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
cltq
cmpb   $0x29,(%rax)
jne    135f <test1+0x20f>
sub    0x10(%rsp),%ebp
cmp    $0x4,%ebp
jne    12c0 <test1+0x170>
lea    0xd47(%rip),%rsi
mov    $0x4,%edx
mov    %r14,%rdi
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
mov    0xc(%rsp),%r12d
cmovne %ecx,%r12d
jne    12c0 <test1+0x170>
mov    0x8(%rsp),%eax
xor    $0x1,%al
je     136f <test1+0x21f>
jmp    12c0 <test1+0x170>
mov    0xc(%rsp),%r12d
cmpb   $0x0,0x8(%rsp)
je     12c0 <test1+0x170>
xor    %ebx,%ebx
jmp    1386 <test1+0x236>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %ebp,%ebx
add    $0x1,%r15
mov    $0x1,%ebp
mov    %r15,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <skipspace@plt>
movslq %eax,%r15
movzbl (%r15),%eax
cmp    $0x28,%al
je     1380 <test1+0x230>
test   %al,%al
je     13b5 <test1+0x265>
xor    %ebp,%ebp
cmp    $0x29,%al
sete   %bpl
neg    %ebp
jmp    1380 <test1+0x230>
xor    %eax,%eax
test   %ebx,%ebx
setle  %al
lea    (%rax,%rax,1),%r12d
add    $0xffffffff,%r12d
jmp    12c0 <test1+0x170>

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 %193
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 %193
41: ; preds = %26
store i32 0, i32* %2
br label %193
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 %193
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 %193
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 = sext 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 = sext 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 %193
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, 41
br i1 %142, label %143, label %151
143: ; preds = %128
%144 = load i32, i32* %12
%145 = icmp ne i32 %144, 4
br i1 %145, label %150, label %146
146: ; preds = %143
%147 = load i8*, i8** %11
%148 = call i32 @strncmp(i8* %147, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i64 4)
%149 = icmp ne i32 %148, 0
br i1 %149, label %150, label %151
150: ; preds = %146, %143
store i32 0, i32* %2
br label %193
151: ; preds = %146, %128
%152 = load i32, i32* %7
%153 = icmp sgt i32 %152, 0
br i1 %153, label %154, label %191
154: ; preds = %151
store i32 0, i32* %13
%155 = load i8*, i8** %3
%156 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %155, i32 1)
%157 = sext i32 %156 to i64
%158 = inttoptr i64 %157 to i8*
store i8* %158, i8** %4
br label %159
159: ; preds = %180, %154
%160 = load i8*, i8** %4
%161 = load i8, i8* %160
%162 = icmp ne i8 %161, 0
br i1 %162, label %163, label %186
163: ; preds = %159
%164 = load i8*, i8** %4
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = icmp eq i32 %166, 40
br i1 %167, label %168, label %169
168: ; preds = %163
br label %176
169: ; preds = %163
%170 = load i8*, i8** %4
%171 = load i8, i8* %170
%172 = sext i8 %171 to i32
%173 = icmp eq i32 %172, 41
%174 = zext i1 %173 to i64
%175 = select i1 %173, i32 -1, i32 0
br label %176
176: ; preds = %169, %168
%177 = phi i32 [ 1, %168 ], [ %175, %169 ]
%178 = load i32, i32* %13
%179 = add nsw i32 %178, %177
store i32 %179, i32* %13
br label %180
180: ; preds = %176
%181 = load i8*, i8** %4
%182 = getelementptr inbounds i8, i8* %181, i64 1
%183 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %182, i32 1)
%184 = sext i32 %183 to i64
%185 = inttoptr i64 %184 to i8*
store i8* %185, i8** %4
br label %159
186: ; preds = %159
%187 = load i32, i32* %13
%188 = icmp sgt i32 %187, 0
br i1 %188, label %189, label %190
189: ; preds = %186
store i32 -1, i32* %7
br label %190
190: ; preds = %189, %186
br label %191
191: ; preds = %190, %151
%192 = load i32, i32* %7
store i32 %192, i32* %2
br label %193
193: ; preds = %191, %150, %106, %81, %71, %41, %40, %25
%194 = load i32, i32* %2
ret i32 %194
}

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 %114
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 %114
i32 125, label %114
]
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 %114
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 %114, label %44
44: ; preds = %37
%45 = ptrtoint i8* %23 to i64
%46 = ptrtoint i8* %0 to i64
%47 = sub i64 %45, %46
%48 = shl i64 %47, 32
%49 = ashr exact i64 %48, 32
br label %50
50: ; preds = %44, %58
%51 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %44 ], [ %60, %58 ]
%52 = phi i8** [ getelementptr inbounds ([25 x i8*], [25 x i8*]* @test1.words, i64 0, i64 0), %44 ], [ %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 %114, 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 %42 to i32
%64 = tail call i32 @isalnum(i32 %63)
%65 = icmp ne i32 %64, 0
%66 = icmp eq i8 %42, 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 ], [ %41, %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* [ %41, %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
%83 = icmp eq i8 %82, 41
br i1 %83, label %84, label %95
84: ; preds = %77
%85 = ptrtoint i8* %78 to i64
%86 = trunc i64 %85 to i32
%87 = sub i32 %86, %39
%88 = icmp eq i32 %87, 4
br i1 %88, label %89, label %114
89: ; preds = %84
%90 = 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)
%91 = icmp ne i32 %90, 0
%92 = xor i1 %20, true
%93 = or i1 %91, %92
%94 = select i1 %91, i32 0, i32 %21
br i1 %93, label %114, label %96
95: ; preds = %77
br i1 %20, label %96, label %114
96: ; preds = %89, %95
br label %97
97: ; preds = %96, %107
%98 = phi i8* [ %110, %107 ], [ %0, %96 ]
%99 = phi i32 [ %109, %107 ], [ 0, %96 ]
%100 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @skipspace to i32 (i8*, i32, ...)*)(i8* %98, i32 1)
%101 = sext i32 %100 to i64
%102 = inttoptr i64 %101 to i8*
%103 = load i8, i8* %102
switch i8 %103, label %104 [
i8 0, label %111
i8 40, label %107
]
104: ; preds = %97
%105 = icmp eq i8 %103, 41
%106 = sext i1 %105 to i32
br label %107
107: ; preds = %97, %104
%108 = phi i32 [ %106, %104 ], [ 1, %97 ]
%109 = add nsw i32 %108, %99
%110 = getelementptr inbounds i8, i8* %102, i64 1
br label %97
111: ; preds = %97
%112 = icmp slt i32 %99, 1
%113 = select i1 %112, i32 1, i32 -1
br label %114
114: ; preds = %55, %89, %95, %111, %84, %37, %31, %8, %8, %1
%115 = phi i32 [ 0, %1 ], [ 0, %8 ], [ 0, %8 ], [ 0, %31 ], [ 0, %37 ], [ 0, %84 ], [ %94, %89 ], [ %113, %111 ], [ %21, %95 ], [ 0, %55 ]
ret i32 %115
}