#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 */

/* Variables and functions */
int /*<<< orphan*/ exitFatal(char *, int);
int getLookAhead();
scalar_t__ isCharType(int, int);
int /*<<< orphan*/ match(int);
void readBlanks() {
  int c = 0;
  size_t cnt = 0;
  while (c != (256)) {
    c = getLookAhead();
    if (isCharType(c, 0x08u)) {
      ++cnt;
      match(c);
    } else
      c = (256);
  }
  if (cnt == 0)
    exitFatal("Expected blank, got character",
              sizeof("Expected blank, got character") - 1);
}


x86 assembly (clang, -O0):
<readBlanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x100,-0x4(%rbp)
je     11aa <readBlanks+0x6a>
mov    $0x0,%al
call   1040 <getLookAhead@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <isCharType@plt>
cmp    $0x0,%rax
je     119e <readBlanks+0x5e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <match@plt>
jmp    11a5 <readBlanks+0x65>
movl   $0x100,-0x4(%rbp)
jmp    1157 <readBlanks+0x17>
cmpq   $0x0,-0x10(%rbp)
jne    11c6 <readBlanks+0x86>
lea    0xe44(%rip),%rdi
mov    $0x1d,%esi
call   1050 <exitFatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readBlanks>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getLookAhead@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x8,%esi
call   1030 <isCharType@plt>
test   %rax,%rax
je     117d <readBlanks+0x3d>
add    $0x1,%r14
mov    %ebx,%edi
call   1060 <match@plt>
cmp    $0x100,%ebx
jne    1150 <readBlanks+0x10>
test   %r14,%r14
je     118a <readBlanks+0x4a>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe6f(%rip),%rdi
mov    $0x1d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <exitFatal@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Expected blank, got character\00"
define void @readBlanks() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %17, %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 256
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = call i32 (...) @getLookAhead()
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = call i64 @isCharType(i32 %8, i32 8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = load i64, i64* %2
%13 = add i64 %12, 1
store i64 %13, i64* %2
%14 = load i32, i32* %1
%15 = call i32 @match(i32 %14)
br label %17
16: ; preds = %6
store i32 256, i32* %1
br label %17
17: ; preds = %16, %11
br label %3
18: ; preds = %3
%19 = load i64, i64* %2
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @exitFatal(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 29)
br label %23
23: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Expected blank, got character\00"
define void @readBlanks() {
br label %1
1: ; preds = %0, %6
%2 = phi i64 [ 0, %0 ], [ %7, %6 ]
%3 = tail call i32 (...) @getLookAhead()
%4 = tail call i64 @isCharType(i32 %3, i32 8)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = add i64 %2, 1
%8 = tail call i32 @match(i32 %3)
%9 = icmp eq i32 %3, 256
br i1 %9, label %10, label %1
10: ; preds = %1, %6
%11 = phi i64 [ %7, %6 ], [ %2, %1 ]
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = tail call i32 @exitFatal(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 29)
br label %15
15: ; preds = %13, %10
ret void
}