extern int _scan_spacechars(const unsigned char *p) {
  const unsigned char *start = p;
  {
    unsigned char yych;
    static const unsigned char yybm[] = {
        0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   0,   0, 0, 0,
    };
    yych = *p;
    if (yych <= '\n') {
      if (yych <= 0x08)
        goto yy1174;
      if (yych <= '\t')
        goto yy1171;
      goto yy1172;
    } else {
      if (yych == ' ')
        goto yy1171;
      goto yy1174;
    }
  yy1170 : { return (p - start); }
  yy1171:
    yych = *++p;
    goto yy1173;
  yy1172:
    ++p;
    yych = *p;
  yy1173:
    if (yybm[0 + yych] & 128) {
      goto yy1172;
    }
    goto yy1170;
  yy1174:
    ++p;
    { return 0; }
  }
}


x86 assembly (clang, -O0):
<_scan_spacechars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
cmp    $0xa,%eax
jg     114f <_scan_spacechars+0x4f>
movzbl -0x19(%rbp),%eax
cmp    $0x8,%eax
jg     1138 <_scan_spacechars+0x38>
jmp    11d5 <_scan_spacechars+0xd5>
movzbl -0x19(%rbp),%eax
cmp    $0x9,%eax
jg     114a <_scan_spacechars+0x4a>
jmp    1179 <_scan_spacechars+0x79>
jmp    1193 <_scan_spacechars+0x93>
movzbl -0x19(%rbp),%eax
cmp    $0x20,%eax
jne    1161 <_scan_spacechars+0x61>
jmp    1179 <_scan_spacechars+0x79>
jmp    11d5 <_scan_spacechars+0xd5>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    11e8 <_scan_spacechars+0xe8>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x1(%rax),%al
mov    %al,-0x19(%rbp)
jmp    11a8 <_scan_spacechars+0xa8>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rcx
lea    0xe47(%rip),%rax
movzbl (%rax,%rcx,1),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     11d0 <_scan_spacechars+0xd0>
jmp    1193 <_scan_spacechars+0x93>
jmp    1166 <_scan_spacechars+0x66>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_scan_spacechars>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    $0xa,%cl
ja     1110 <_scan_spacechars+0x10>
cmp    $0x9,%cl
jae    1115 <_scan_spacechars+0x15>
jmp    112f <_scan_spacechars+0x2f>
cmp    $0x20,%cl
jne    112f <_scan_spacechars+0x2f>
xor    %eax,%eax
lea    0xee2(%rip),%rcx
xchg   %ax,%ax
movzbl 0x1(%rdi,%rax,1),%edx
add    $0x1,%rax
cmpb   $0x0,(%rdx,%rcx,1)
js     1120 <_scan_spacechars+0x20>
ret

LLVM IR (-O0):
@_scan_spacechars.yybm = internal constant <{ [33 x i8], [223 x i8] }> <{ [33 x i8] c"\00\00\00\00\00\00\00\00\00\80\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80", [223 x i8] zeroinitializer }>
define i32 @_scan_spacechars(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
%6 = load i8*, i8** %3
store i8* %6, i8** %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
store i8 %8, i8* %5
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = icmp sle i32 %10, 10
br i1 %11, label %12, label %23
12: ; preds = %1
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = icmp sle i32 %14, 8
br i1 %15, label %16, label %17
16: ; preds = %12
br label %57
17: ; preds = %12
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = icmp sle i32 %19, 9
br i1 %20, label %21, label %22
21: ; preds = %17
br label %36
22: ; preds = %17
br label %40
23: ; preds = %1
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = icmp eq i32 %25, 32
br i1 %26, label %27, label %28
27: ; preds = %23
br label %36
28: ; preds = %23
br label %57
29: ; preds = %56
%30 = load i8*, i8** %3
%31 = load i8*, i8** %4
%32 = ptrtoint i8* %30 to i64
%33 = ptrtoint i8* %31 to i64
%34 = sub i64 %32, %33
%35 = trunc i64 %34 to i32
store i32 %35, i32* %2
br label %60
36: ; preds = %27, %21
%37 = load i8*, i8** %3
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %3
%39 = load i8, i8* %38
store i8 %39, i8* %5
br label %45
40: ; preds = %55, %22
%41 = load i8*, i8** %3
%42 = getelementptr inbounds i8, i8* %41, i32 1
store i8* %42, i8** %3
%43 = load i8*, i8** %3
%44 = load i8, i8* %43
store i8 %44, i8* %5
br label %45
45: ; preds = %40, %36
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = add nsw i32 0, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [256 x i8], [256 x i8]* bitcast (<{ [33 x i8], [223 x i8] }>* @_scan_spacechars.yybm to [256 x i8]*), i64 0, i64 %49
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = and i32 %52, 128
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %45
br label %40
56: ; preds = %45
br label %29
57: ; preds = %28, %16
%58 = load i8*, i8** %3
%59 = getelementptr inbounds i8, i8* %58, i32 1
store i8* %59, i8** %3
store i32 0, i32* %2
br label %60
60: ; preds = %57, %29
%61 = load i32, i32* %2
ret i32 %61
}

LLVM IR (-O2):
@_scan_spacechars.yybm = internal unnamed_addr constant <{ [33 x i8], [223 x i8] }> <{ [33 x i8] c"\00\00\00\00\00\00\00\00\00\80\80\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80", [223 x i8] zeroinitializer }>
define i32 @_scan_spacechars(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp ult i8 %2, 11
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = icmp ult i8 %2, 9
br i1 %5, label %22, label %8
6: ; preds = %1
%7 = icmp eq i8 %2, 32
br i1 %7, label %8, label %22
8: ; preds = %6, %4
br label %9
9: ; preds = %8, %9
%10 = phi i8* [ %11, %9 ], [ %0, %8 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = getelementptr inbounds [256 x i8], [256 x i8]* bitcast (<{ [33 x i8], [223 x i8] }>* @_scan_spacechars.yybm to [256 x i8]*), i64 0, i64 %13
%15 = load i8, i8* %14
%16 = icmp sgt i8 %15, -1
br i1 %16, label %17, label %9
17: ; preds = %9
%18 = ptrtoint i8* %11 to i64
%19 = ptrtoint i8* %0 to i64
%20 = sub i64 %18, %19
%21 = trunc i64 %20 to i32
br label %22
22: ; preds = %4, %6, %17
%23 = phi i32 [ %21, %17 ], [ 0, %6 ], [ 0, %4 ]
ret i32 %23
}