#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 getc(int /*<<< orphan*/ *);
scalar_t__ is_white(int);
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void eat_whitespace(FILE *in) {
  int c;
  if (10 >= 2) {
    printf("*** [%s] %s\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/eZanmoto/L15P/refs/heads/master/read.c",
           ">Eating whitespace");
  };
  do {
    c = getc(in);
  } while (c != EOF && is_white(c));
  if (10 >= 2) {
    printf("*** [%s] %s\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/eZanmoto/L15P/refs/heads/master/read.c",
           "<Eating whitespace");
  };
  ungetc(c, in);
}


x86 assembly (clang, -O0):
<eat_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
lea    0xeb3(%rip),%rsi
lea    0xf2d(%rip),%rdx
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %eax,%eax
mov    0x2e6a(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     119b <eat_whitespace+0x5b>
mov    -0xc(%rbp),%edi
call   1040 <is_white@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1166 <eat_whitespace+0x26>
lea    0xe53(%rip),%rdi
lea    0xe59(%rip),%rsi
lea    0xee6(%rip),%rdx
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1050 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_whitespace>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xeb2(%rip),%rdi
lea    0xeb8(%rip),%rsi
lea    0xf32(%rip),%rdx
call   1030 <printf@plt>
mov    0x2e80(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1060 <getc@plt>
mov    %eax,%ebp
cmp    (%r14),%eax
je     118b <eat_whitespace+0x4b>
mov    %ebp,%edi
call   1040 <is_white@plt>
test   %rax,%rax
jne    1170 <eat_whitespace+0x30>
lea    0xe6e(%rip),%rdi
lea    0xe74(%rip),%rsi
lea    0xf01(%rip),%rdx
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <ungetc@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"*** [%s] %s\0A\00"
@.str.1 = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/eZanmoto/L15P/refs/heads/master/read.c\00"
@.str.2 = [19 x i8] c">Eating whitespace\00"
@EOF = global i32 0
@.str.3 = [19 x i8] c"<Eating whitespace\00"
define void @eat_whitespace(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %16, %1
%6 = load i32*, i32** %2
%7 = call i32 @getc(i32* %6)
store i32 %7, i32* %3
br label %8
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %3
%14 = call i64 @is_white(i32 %13)
%15 = icmp ne i64 %14, 0
br label %16
16: ; preds = %12, %8
%17 = phi i1 [ false, %8 ], [ %15, %12 ]
br i1 %17, label %5, label %18
18: ; preds = %16
%19 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%20 = load i32, i32* %3
%21 = load i32*, i32** %2
%22 = call i32 @ungetc(i32 %20, i32* %21)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"*** [%s] %s\0A\00"
@.str.1 = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/eZanmoto/L15P/refs/heads/master/read.c\00"
@.str.2 = [19 x i8] c">Eating whitespace\00"
@EOF = global i32 0
@.str.3 = [19 x i8] c"<Eating whitespace\00"
define void @eat_whitespace(i32* nocapture %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %3
3: ; preds = %7, %1
%4 = tail call i32 @getc(i32* %0)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i64 @is_white(i32 %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @ungetc(i32 %4, i32* %0)
ret void
}