#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 */

/* Variables and functions */
int /*<<< orphan*/ tor_raw_abort_();
int /*<<< orphan*/ tor_raw_assertion_failed_msg_(char *, int, char *,
                                                 int /*<<< orphan*/ *);
const char *eat_whitespace_eos(const char *s, const char *eos) {
  (void)({
    if (!(s)) {
      tor_raw_assertion_failed_msg_(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/zcoinofficial/zcoin/refs/heads/master/src/"
          "tor/src/lib/string/util_string.c",
          297, "s", NULL);
      tor_raw_abort_();
    }
  });
  (void)({
    if (!(eos && s <= eos)) {
      tor_raw_assertion_failed_msg_(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/zcoinofficial/zcoin/refs/heads/master/src/"
          "tor/src/lib/string/util_string.c",
          298, "eos && s <= eos", NULL);
      tor_raw_abort_();
    }
  });
  while (s < eos) {
    switch (*s) {
    case '\0':
    default:
      return s;
    case ' ':
    case '\t':
    case '\n':
    case '\r':
      ++s;
      break;
    case '#':
      ++s;
      while (s < eos && *s && *s != '\n')
        ++s;
    }
  }
  return s;
}


x86 assembly (clang, -O0):
<eat_whitespace_eos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115e <eat_whitespace_eos+0x3e>
lea    0xebe(%rip),%rdi
mov    $0x129,%esi
lea    0xf65(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <tor_raw_assertion_failed_msg_@plt>
mov    $0x0,%al
call   1030 <tor_raw_abort_@plt>
cmpq   $0x0,-0x18(%rbp)
je     1177 <eat_whitespace_eos+0x57>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    119a <eat_whitespace_eos+0x7a>
lea    0xe82(%rip),%rdi
mov    $0x12a,%esi
lea    0xf1b(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <tor_raw_assertion_failed_msg_@plt>
mov    $0x0,%al
call   1030 <tor_raw_abort_@plt>
jmp    119f <eat_whitespace_eos+0x7f>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    129d <eat_whitespace_eos+0x17d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     120b <eat_whitespace_eos+0xeb>
jmp    11c4 <eat_whitespace_eos+0xa4>
mov    -0x1c(%rbp),%eax
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     121d <eat_whitespace_eos+0xfd>
jmp    11d8 <eat_whitespace_eos+0xb8>
mov    -0x1c(%rbp),%eax
sub    $0xd,%eax
je     121d <eat_whitespace_eos+0xfd>
jmp    11e9 <eat_whitespace_eos+0xc9>
mov    -0x1c(%rbp),%eax
sub    $0x20,%eax
je     121d <eat_whitespace_eos+0xfd>
jmp    11fa <eat_whitespace_eos+0xda>
mov    -0x1c(%rbp),%eax
sub    $0x23,%eax
je     122e <eat_whitespace_eos+0x10e>
jmp    1210 <eat_whitespace_eos+0xf0>
jmp    1210 <eat_whitespace_eos+0xf0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    12a5 <eat_whitespace_eos+0x185>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1298 <eat_whitespace_eos+0x178>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x1d(%rbp)
jae    1272 <eat_whitespace_eos+0x152>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1d(%rbp)
je     1272 <eat_whitespace_eos+0x152>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    1282 <eat_whitespace_eos+0x162>
jmp    1293 <eat_whitespace_eos+0x173>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    123a <eat_whitespace_eos+0x11a>
jmp    1298 <eat_whitespace_eos+0x178>
jmp    119f <eat_whitespace_eos+0x7f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat_whitespace_eos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
je     1136 <eat_whitespace_eos+0x16>
test   %r14,%r14
jne    115c <eat_whitespace_eos+0x3c>
jmp    1161 <eat_whitespace_eos+0x41>
lea    0xec3(%rip),%rdi
lea    0xf6f(%rip),%rdx
mov    $0x129,%esi
xor    %ecx,%ecx
call   1040 <tor_raw_assertion_failed_msg_@plt>
xor    %eax,%eax
call   1030 <tor_raw_abort_@plt>
test   %r14,%r14
je     1161 <eat_whitespace_eos+0x41>
cmp    %r14,%rbx
jbe    1182 <eat_whitespace_eos+0x62>
lea    0xe98(%rip),%rdi
lea    0xf36(%rip),%rdx
mov    $0x12a,%esi
xor    %ecx,%ecx
call   1040 <tor_raw_assertion_failed_msg_@plt>
xor    %eax,%eax
call   1030 <tor_raw_abort_@plt>
cmp    %r14,%rbx
jae    11ea <eat_whitespace_eos+0xca>
movabs $0x100002600,%rax
jmp    11a9 <eat_whitespace_eos+0x89>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %r14,%rbx
jae    11ea <eat_whitespace_eos+0xca>
movsbl (%rbx),%ecx
cmp    $0x23,%ecx
ja     11ea <eat_whitespace_eos+0xca>
bt     %rcx,%rax
jb     11a0 <eat_whitespace_eos+0x80>
cmp    $0x23,%rcx
jne    11ea <eat_whitespace_eos+0xca>
add    $0x1,%rbx
mov    %rbx,%rcx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rcx,%rbx
cmp    %r14,%rcx
jae    11a4 <eat_whitespace_eos+0x84>
movzbl (%rbx),%edx
cmp    $0xa,%dl
je     11a4 <eat_whitespace_eos+0x84>
lea    0x1(%rbx),%rcx
test   %dl,%dl
jne    11d0 <eat_whitespace_eos+0xb0>
jmp    11a4 <eat_whitespace_eos+0x84>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zcoinofficial/zcoin/refs/heads/master/src/tor/src/lib/string/util_string.c\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [16 x i8] c"eos && s <= eos\00"
define i8* @eat_whitespace_eos(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = call i32 @tor_raw_assertion_failed_msg_(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0), i32 297, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%10 = call i32 (...) @tor_raw_abort_()
br label %11
11: ; preds = %8, %2
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = icmp ule i8* %15, %16
br i1 %17, label %21, label %18
18: ; preds = %14, %11
%19 = call i32 @tor_raw_assertion_failed_msg_(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0), i32 298, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32* null)
%20 = call i32 (...) @tor_raw_abort_()
br label %21
21: ; preds = %18, %14
br label %22
22: ; preds = %59, %21
%23 = load i8*, i8** %4
%24 = load i8*, i8** %5
%25 = icmp ult i8* %23, %24
br i1 %25, label %26, label %60
26: ; preds = %22
%27 = load i8*, i8** %4
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
switch i32 %29, label %31 [
i32 0, label %30
i32 32, label %33
i32 9, label %33
i32 10, label %33
i32 13, label %33
i32 35, label %36
]
30: ; preds = %26
br label %31
31: ; preds = %26, %30
%32 = load i8*, i8** %4
store i8* %32, i8** %3
br label %62
33: ; preds = %26, %26, %26, %26
%34 = load i8*, i8** %4
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %4
br label %59
36: ; preds = %26
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %4
br label %39
39: ; preds = %55, %36
%40 = load i8*, i8** %4
%41 = load i8*, i8** %5
%42 = icmp ult i8* %40, %41
br i1 %42, label %43, label %53
43: ; preds = %39
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %53
48: ; preds = %43
%49 = load i8*, i8** %4
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp ne i32 %51, 10
br label %53
53: ; preds = %48, %43, %39
%54 = phi i1 [ false, %43 ], [ false, %39 ], [ %52, %48 ]
br i1 %54, label %55, label %58
55: ; preds = %53
%56 = load i8*, i8** %4
%57 = getelementptr inbounds i8, i8* %56, i32 1
store i8* %57, i8** %4
br label %39
58: ; preds = %53
br label %59
59: ; preds = %58, %33
br label %22
60: ; preds = %22
%61 = load i8*, i8** %4
store i8* %61, i8** %3
br label %62
62: ; preds = %60, %31
%63 = load i8*, i8** %3
ret i8* %63
}

LLVM IR (-O2):
@.str = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zcoinofficial/zcoin/refs/heads/master/src/tor/src/lib/string/util_string.c\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [16 x i8] c"eos && s <= eos\00"
define i8* @eat_whitespace_eos(i8* %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @tor_raw_assertion_failed_msg_(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0), i32 297, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%6 = tail call i32 (...) @tor_raw_abort_()
br label %7
7: ; preds = %4, %2
%8 = icmp eq i8* %1, null
%9 = icmp ugt i8* %0, %1
%10 = or i1 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = tail call i32 @tor_raw_assertion_failed_msg_(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0), i32 298, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32* null)
%13 = tail call i32 (...) @tor_raw_abort_()
br label %14
14: ; preds = %7, %11
%15 = icmp ult i8* %0, %1
br i1 %15, label %16, label %31
16: ; preds = %14, %28
%17 = phi i8* [ %29, %28 ], [ %0, %14 ]
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
switch i32 %19, label %31 [
i32 35, label %22
i32 32, label %20
i32 9, label %20
i32 10, label %20
i32 13, label %20
]
20: ; preds = %16, %16, %16, %16
%21 = getelementptr inbounds i8, i8* %17, i64 1
br label %28
22: ; preds = %16, %26
%23 = phi i8* [ %24, %26 ], [ %17, %16 ]
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = icmp ult i8* %24, %1
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = load i8, i8* %24
switch i8 %27, label %22 [
i8 0, label %28
i8 10, label %28
]
28: ; preds = %26, %26, %22, %20
%29 = phi i8* [ %21, %20 ], [ %24, %22 ], [ %24, %26 ], [ %24, %26 ]
%30 = icmp ult i8* %29, %1
br i1 %30, label %16, label %31
31: ; preds = %16, %28, %14
%32 = phi i8* [ %0, %14 ], [ %29, %28 ], [ %17, %16 ]
ret i8* %32
}