const char *eat_whitespace(const char *s) {
  (void)({
    if (__builtin_expect(!!(!(s)), 0)) {
      tor_assertion_failed_(("/scratch/repos/new/home/jordi_armengol_estape/"
                             "c-scraper/outputs/2022-01-22/02-19-57/repos/5mil/"
                             "lulz/refs/heads/master/src/tor/tor_util.c"),
                            702, __func__, "s");
      abort();
    }
  });
  while (1) {
    switch (*s) {
    case '\0':
    default:
      return s;
    case ' ':
    case '\t':
    case '\n':
    case '\r':
      ++s;
      break;
    case '#':
      ++s;
      while (*s && *s != '\n')
        ++s;
    }
  }
}


x86 assembly (clang, -O0):
<eat_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
je     1171 <eat_whitespace+0x51>
lea    0xeae(%rip),%rdi
mov    $0x2be,%esi
lea    0xf2b(%rip),%rdx
lea    0xf33(%rip),%rcx
mov    $0x0,%al
call   1030 <tor_assertion_failed_@plt>
call   1040 <abort@plt>
jmp    1176 <eat_whitespace+0x56>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     11d4 <eat_whitespace+0xb4>
jmp    118d <eat_whitespace+0x6d>
mov    -0xc(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     11e3 <eat_whitespace+0xc3>
jmp    11a1 <eat_whitespace+0x81>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     11e3 <eat_whitespace+0xc3>
jmp    11b2 <eat_whitespace+0x92>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     11e3 <eat_whitespace+0xc3>
jmp    11c3 <eat_whitespace+0xa3>
mov    -0xc(%rbp),%eax
sub    $0x23,%eax
je     11f4 <eat_whitespace+0xd4>
jmp    11d9 <eat_whitespace+0xb9>
jmp    11d9 <eat_whitespace+0xb9>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    124b <eat_whitespace+0x12b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1225 <eat_whitespace+0x105>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1235 <eat_whitespace+0x115>
jmp    1246 <eat_whitespace+0x126>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1200 <eat_whitespace+0xe0>
jmp    124b <eat_whitespace+0x12b>
jmp    1176 <eat_whitespace+0x56>

x86 assembly (clang, -O2):
<eat_whitespace>:
push   %rax
test   %rdi,%rdi
je     1178 <eat_whitespace+0x58>
movabs $0x100002600,%rax
jmp    1144 <eat_whitespace+0x24>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movsbl (%rdi),%ecx
cmp    $0x23,%ecx
ja     1173 <eat_whitespace+0x53>
bt     %rcx,%rax
jb     1140 <eat_whitespace+0x20>
cmp    $0x23,%rcx
jne    1173 <eat_whitespace+0x53>
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
je     1144 <eat_whitespace+0x24>
cmp    $0xa,%cl
jne    1160 <eat_whitespace+0x40>
jmp    1144 <eat_whitespace+0x24>
mov    %rdi,%rax
pop    %rcx
ret
lea    0xe81(%rip),%rdi
lea    0xf03(%rip),%rdx
lea    0xf0b(%rip),%rcx
mov    $0x2be,%esi
xor    %eax,%eax
call   1030 <tor_assertion_failed_@plt>
call   1040 <abort@plt>

LLVM IR (-O0):
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/5mil/lulz/refs/heads/master/src/tor/tor_util.c\00"
@__func__.eat_whitespace = [15 x i8] c"eat_whitespace\00"
@.str.1 = [2 x i8] c"s\00"
define i8* @eat_whitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = xor i1 %4, true
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tor_assertion_failed_ to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 702, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.eat_whitespace, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
unreachable
13: ; preds = %1
br label %14
14: ; preds = %13, %43
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
switch i32 %17, label %19 [
i32 0, label %18
i32 32, label %21
i32 9, label %21
i32 10, label %21
i32 13, label %21
i32 35, label %24
]
18: ; preds = %14
br label %19
19: ; preds = %14, %18
%20 = load i8*, i8** %2
ret i8* %20
21: ; preds = %14, %14, %14, %14
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %2
br label %43
24: ; preds = %14
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %2
br label %27
27: ; preds = %39, %24
%28 = load i8*, i8** %2
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %37
32: ; preds = %27
%33 = load i8*, i8** %2
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 10
br label %37
37: ; preds = %32, %27
%38 = phi i1 [ false, %27 ], [ %36, %32 ]
br i1 %38, label %39, label %42
39: ; preds = %37
%40 = load i8*, i8** %2
%41 = getelementptr inbounds i8, i8* %40, i32 1
store i8* %41, i8** %2
br label %27
42: ; preds = %37
br label %43
43: ; preds = %42, %21
br label %14
}

LLVM IR (-O2):
@.str = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/5mil/lulz/refs/heads/master/src/tor/tor_util.c\00"
@__func__.eat_whitespace = [15 x i8] c"eat_whitespace\00"
@.str.1 = [2 x i8] c"s\00"
define i8* @eat_whitespace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @tor_assertion_failed_ to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str, i64 0, i64 0), i32 702, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.eat_whitespace, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
tail call void @abort()
unreachable
5: ; preds = %1, %12
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
switch i32 %8, label %9 [
i32 35, label %14
i32 32, label %10
i32 9, label %10
i32 10, label %10
i32 13, label %10
]
9: ; preds = %5
ret i8* %6
10: ; preds = %5, %5, %5, %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
br label %12
12: ; preds = %14, %14, %10
%13 = phi i8* [ %11, %10 ], [ %16, %14 ], [ %16, %14 ]
br label %5
14: ; preds = %5, %14
%15 = phi i8* [ %16, %14 ], [ %6, %5 ]
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
switch i8 %17, label %14 [
i8 0, label %12
i8 10, label %12
]
}