#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*/ isspace(char);
int is_blank_line(char *line) {
  char *ptr = line;
  while (*ptr != 0 && *ptr != '\n') {
    if (*ptr == '#')
      return 1;
    if (!isspace(*ptr))
      return 0;
    ptr++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_blank_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     1149 <is_blank_line+0x39>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1159 <is_blank_line+0x49>
jmp    11a7 <is_blank_line+0x97>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1175 <is_blank_line+0x65>
movl   $0x1,-0x4(%rbp)
jmp    11ae <is_blank_line+0x9e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1196 <is_blank_line+0x86>
movl   $0x0,-0x4(%rbp)
jmp    11ae <is_blank_line+0x9e>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <is_blank_line+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blank_line>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x800000401,%r14
jmp    1140 <is_blank_line+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %eax,%eax
je     1156 <is_blank_line+0x46>
movzbl (%rbx),%eax
cmp    $0x23,%rax
ja     1130 <is_blank_line+0x20>
bt     %rax,%r14
jae    1130 <is_blank_line+0x20>
mov    $0x1,%eax
jmp    1158 <is_blank_line+0x48>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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