#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 */
typedef char uint8_t;
typedef char uint32_t;

/* Variables and functions */
uint32_t scan_ignore_white_space(const char **s) {
  uint8_t count = 0;
  uint8_t c;
  c = **s;
  while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ||
         (c == '\v') || (c == '\f')) {
    count++;
    (*s)++;
    c = **s;
  }
  return count;
}


x86 assembly (clang, -O0):
<scan_ignore_white_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xb(%rbp)
je     117f <scan_ignore_white_space+0x7f>
movsbl -0xa(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0xb(%rbp)
je     117f <scan_ignore_white_space+0x7f>
movsbl -0xa(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0xb(%rbp)
je     117f <scan_ignore_white_space+0x7f>
movsbl -0xa(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0xb(%rbp)
je     117f <scan_ignore_white_space+0x7f>
movsbl -0xa(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0xb(%rbp)
je     117f <scan_ignore_white_space+0x7f>
movsbl -0xa(%rbp),%eax
cmp    $0xc,%eax
sete   %al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
test   $0x1,%al
jne    118f <scan_ignore_white_space+0x8f>
jmp    11b6 <scan_ignore_white_space+0xb6>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0xa(%rbp)
jmp    1118 <scan_ignore_white_space+0x18>
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_ignore_white_space>:
mov    (%rdi),%rcx
add    $0x1,%rcx
xor    %eax,%eax
jmp    1119 <scan_ignore_white_space+0x19>
nopl   0x0(%rax,%rax,1)
add    $0x1,%al
mov    %rcx,(%rdi)
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
lea    -0x9(%rdx),%esi
cmp    $0x5,%sil
jb     1110 <scan_ignore_white_space+0x10>
cmp    $0x20,%dl
je     1110 <scan_ignore_white_space+0x10>
ret

LLVM IR (-O0):
define signext i8 @scan_ignore_white_space(i8** %0) {
%2 = alloca i8**
%3 = alloca i8
%4 = alloca i8
store i8** %0, i8*** %2
store i8 0, i8* %3
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
store i8 %7, i8* %4
br label %8
8: ; preds = %34, %1
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %32, label %12
12: ; preds = %8
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 9
br i1 %15, label %32, label %16
16: ; preds = %12
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 10
br i1 %19, label %32, label %20
20: ; preds = %16
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 13
br i1 %23, label %32, label %24
24: ; preds = %20
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 11
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load i8, i8* %4
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 12
br label %32
32: ; preds = %28, %24, %20, %16, %12, %8
%33 = phi i1 [ true, %24 ], [ true, %20 ], [ true, %16 ], [ true, %12 ], [ true, %8 ], [ %31, %28 ]
br i1 %33, label %34, label %43
34: ; preds = %32
%35 = load i8, i8* %3
%36 = add i8 %35, 1
store i8 %36, i8* %3
%37 = load i8**, i8*** %2
%38 = load i8*, i8** %37
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %37
%40 = load i8**, i8*** %2
%41 = load i8*, i8** %40
%42 = load i8, i8* %41
store i8 %42, i8* %4
br label %8
43: ; preds = %32
%44 = load i8, i8* %3
ret i8 %44
}

LLVM IR (-O2):
define signext i8 @scan_ignore_white_space(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %7, %1
%4 = phi i8 [ 0, %1 ], [ %8, %7 ]
%5 = phi i8* [ %2, %1 ], [ %9, %7 ]
%6 = load i8, i8* %5
switch i8 %6, label %10 [
i8 32, label %7
i8 13, label %7
i8 12, label %7
i8 11, label %7
i8 10, label %7
i8 9, label %7
]
7: ; preds = %3, %3, %3, %3, %3, %3
%8 = add i8 %4, 1
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %9, i8** %0
br label %3
10: ; preds = %3
ret i8 %4
}