#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;
scalar_t__ feof(int /*<<< orphan*/ *);
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
void _defaults_rc_skip_spaces(FILE *stream) {
  int tok;
  while (1) {
    tok = fgetc(stream);
    if (feof(stream)) {
      return;
    }
    if (tok != ' ' && tok != '\t') {
      fseek(stream, -1L, SEEK_CUR);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<_defaults_rc_skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%rax
je     1160 <_defaults_rc_skip_spaces+0x30>
jmp    1197 <_defaults_rc_skip_spaces+0x67>
cmpl   $0x20,-0xc(%rbp)
je     1192 <_defaults_rc_skip_spaces+0x62>
cmpl   $0x9,-0xc(%rbp)
je     1192 <_defaults_rc_skip_spaces+0x62>
mov    -0x8(%rbp),%rdi
mov    0x2e69(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffffffffffff,%rsi
call   1050 <fseek@plt>
jmp    1197 <_defaults_rc_skip_spaces+0x67>
jmp    113c <_defaults_rc_skip_spaces+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_defaults_rc_skip_spaces>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
jmp    1143 <_defaults_rc_skip_spaces+0x13>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %rax,%rax
jne    117f <_defaults_rc_skip_spaces+0x4f>
cmp    $0x20,%ebp
je     1140 <_defaults_rc_skip_spaces+0x10>
cmp    $0x9,%ebp
je     1140 <_defaults_rc_skip_spaces+0x10>
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xffffffffffffffff,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <fseek@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @_defaults_rc_skip_spaces(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %1, %21
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = call i64 @feof(i32* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %4
br label %22
11: ; preds = %4
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 32
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 9
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32*, i32** %2
%19 = load i32, i32* @SEEK_CUR
%20 = call i32 @fseek(i32* %18, i64 -1, i32 %19)
br label %22
21: ; preds = %14, %11
br label %4
22: ; preds = %17, %10
ret void
}

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