#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 /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void ignore_blanks(FILE *file) {
  char c;
  do {
    fread(&c, sizeof(char), 1, file);
  } while (c <= 32 && !feof(file));
  if (!feof(file))
    fseek(file, -1, SEEK_CUR);
}


x86 assembly (clang, -O0):
<ignore_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
movsbl -0x9(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0xa(%rbp)
jg     1176 <ignore_blanks+0x46>
mov    -0x8(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    113c <ignore_blanks+0xc>
mov    -0x8(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%eax
jne    11aa <ignore_blanks+0x7a>
mov    -0x8(%rbp),%rdi
mov    0x2e4a(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%esi
call   1050 <fseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_blanks>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x7(%rsp),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
cmpb   $0x20,0x7(%rsp)
jg     1168 <ignore_blanks+0x38>
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %eax,%eax
je     1140 <ignore_blanks+0x10>
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %eax,%eax
je     117c <ignore_blanks+0x4c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e65(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xffffffff,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @ignore_blanks(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
br label %4
4: ; preds = %16, %1
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %3, i32 1, i32 1, i32* %5)
br label %7
7: ; preds = %4
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 32
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i32*, i32** %2
%13 = call i32 @feof(i32* %12)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
br label %16
16: ; preds = %11, %7
%17 = phi i1 [ false, %7 ], [ %15, %11 ]
br i1 %17, label %4, label %18
18: ; preds = %16
%19 = load i32*, i32** %2
%20 = call i32 @feof(i32* %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i32*, i32** %2
%24 = load i32, i32* @SEEK_CUR
%25 = call i32 @fseek(i32* %23, i32 -1, i32 %24)
br label %26
26: ; preds = %22, %18
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define void @ignore_blanks(i32* nocapture %0) {
%2 = alloca i8
br label %3
3: ; preds = %7, %1
%4 = call i32 @fread(i8* %2, i32 1, i32 1, i32* %0)
%5 = load i8, i8* %2
%6 = icmp slt i8 %5, 33
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @feof(i32* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %3, label %10
10: ; preds = %3, %7
%11 = tail call i32 @feof(i32* %0)
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* @SEEK_CUR
%15 = tail call i32 @fseek(i32* %0, i32 -1, i32 %14)
br label %16
16: ; preds = %13, %10
ret void
}