#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 */
char *skip_pigsty_comment(char *);
char *skip_pigsty_blank(char *buffer) {
  char *b = buffer;
  while (((*b) == ' ' || (*b) == '\t' || (*b) == '\n' || (*b) == '\r')) {
    b++;
    if (((*b) == '#'))
      b = skip_pigsty_comment(b);
  }
  return b;
}


x86 assembly (clang, -O0):
<skip_pigsty_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1173 <skip_pigsty_blank+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x11(%rbp)
je     1173 <skip_pigsty_blank+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x11(%rbp)
je     1173 <skip_pigsty_blank+0x63>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1183 <skip_pigsty_blank+0x73>
jmp    11b1 <skip_pigsty_blank+0xa1>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    11ac <skip_pigsty_blank+0x9c>
mov    -0x10(%rbp),%rdi
call   1030 <skip_pigsty_comment@plt>
mov    %rax,-0x10(%rbp)
jmp    1124 <skip_pigsty_blank+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_pigsty_blank>:
push   %rbx
mov    %rdi,%rax
movabs $0x100002600,%rbx
xchg   %ax,%ax
movzbl (%rax),%ecx
cmp    $0x20,%rcx
ja     1143 <skip_pigsty_blank+0x33>
bt     %rcx,%rbx
jae    1143 <skip_pigsty_blank+0x33>
lea    0x1(%rax),%rdi
cmpb   $0x23,0x1(%rax)
mov    %rdi,%rax
jne    1120 <skip_pigsty_blank+0x10>
call   1030 <skip_pigsty_comment@plt>
jmp    1120 <skip_pigsty_blank+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_pigsty_blank(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %37, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 32
br i1 %9, label %25, label %10
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br i1 %14, label %25, label %15
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 10
br i1 %19, label %25, label %20
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 13
br label %25
25: ; preds = %20, %15, %10, %5
%26 = phi i1 [ true, %15 ], [ true, %10 ], [ true, %5 ], [ %24, %20 ]
br i1 %26, label %27, label %38
27: ; preds = %25
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
%30 = load i8*, i8** %3
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 35
br i1 %33, label %34, label %37
34: ; preds = %27
%35 = load i8*, i8** %3
%36 = call i8* @skip_pigsty_comment(i8* %35)
store i8* %36, i8** %3
br label %37
37: ; preds = %34, %27
br label %5
38: ; preds = %25
%39 = load i8*, i8** %3
ret i8* %39
}

LLVM IR (-O2):
define i8* @skip_pigsty_blank(i8* %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
switch i8 %4, label %13 [
i8 32, label %5
i8 9, label %5
i8 10, label %5
i8 13, label %5
]
5: ; preds = %2, %2, %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 35
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i8* @skip_pigsty_comment(i8* %6)
br label %11
11: ; preds = %9, %5
%12 = phi i8* [ %10, %9 ], [ %6, %5 ]
br label %2
13: ; preds = %2
ret i8* %3
}