#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int skipblank(FILE *f) {
  int c;
  while (!feof(f)) {
    c = fgetc(f);
    if (c == EOF) {
      return 0;
    }
    if ((c != ' ') && (c != '\n') && (c != '\r') && (c != '\t')) {
      break;
    }
  }
  return c;
}


x86 assembly (clang, -O0):
<skipblank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114a <skipblank+0x2a>
jmp    11a6 <skipblank+0x86>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e88(%rip),%rcx
cmp    (%rcx),%eax
jne    1174 <skipblank+0x54>
movl   $0x0,-0x4(%rbp)
jmp    11ac <skipblank+0x8c>
cmpl   $0x20,-0x14(%rbp)
je     11a1 <skipblank+0x81>
cmpl   $0xa,-0x14(%rbp)
je     11a1 <skipblank+0x81>
cmpl   $0xd,-0x14(%rbp)
je     11a1 <skipblank+0x81>
cmpl   $0x9,-0x14(%rbp)
je     11a1 <skipblank+0x81>
jmp    11a6 <skipblank+0x86>
jmp    112c <skipblank+0xc>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipblank>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <feof@plt>
test   %eax,%eax
jne    117c <skipblank+0x5c>
mov    0x2eae(%rip),%r14
movabs $0x100002600,%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
je     117a <skipblank+0x5a>
mov    %eax,%ebp
cmp    $0x20,%eax
ja     117c <skipblank+0x5c>
mov    %ebp,%eax
bt     %rax,%r15
jae    117c <skipblank+0x5c>
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %eax,%eax
je     1150 <skipblank+0x30>
jmp    117c <skipblank+0x5c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @skipblank(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
br label %5
5: ; preds = %30, %1
%6 = load i32*, i32** %3
%7 = call i32 @feof(i32* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %31
10: ; preds = %5
%11 = load i32*, i32** %3
%12 = call i32 @fgetc(i32* %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %10
store i32 0, i32* %2
br label %33
17: ; preds = %10
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 32
br i1 %19, label %20, label %30
20: ; preds = %17
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 10
br i1 %22, label %23, label %30
23: ; preds = %20
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 13
br i1 %25, label %26, label %30
26: ; preds = %23
%27 = load i32, i32* %4
%28 = icmp ne i32 %27, 9
br i1 %28, label %29, label %30
29: ; preds = %26
br label %31
30: ; preds = %26, %23, %20, %17
br label %5
31: ; preds = %29, %5
%32 = load i32, i32* %4
store i32 %32, i32* %2
br label %33
33: ; preds = %31, %16
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @skipblank(i32* nocapture %0) {
%2 = tail call i32 @feof(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %1, %9
%5 = tail call i32 @fgetc(i32* %0)
%6 = load i32, i32* @EOF
%7 = icmp eq i32 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
switch i32 %5, label %12 [
i32 32, label %9
i32 13, label %9
i32 10, label %9
i32 9, label %9
]
9: ; preds = %8, %8, %8, %8
%10 = tail call i32 @feof(i32* %0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %4, %8, %9, %1
%13 = phi i32 [ undef, %1 ], [ %5, %9 ], [ %5, %8 ], [ 0, %4 ]
ret i32 %13
}