#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(unsigned char);
int line_is_blank(const char *s) {
  int ret = 1;
  if (s != NULL) {
    while (*s) {
      if (!isspace((unsigned char)*s) && *s != '\r' && *s != 26) {
        ret = 0;
        break;
      }
      s++;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<line_is_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1197 <line_is_blank+0x87>
jmp    1133 <line_is_blank+0x23>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1192 <line_is_blank+0x82>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1181 <line_is_blank+0x71>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1181 <line_is_blank+0x71>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x1a,%eax
je     1181 <line_is_blank+0x71>
movl   $0x0,-0xc(%rbp)
jmp    1192 <line_is_blank+0x82>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1133 <line_is_blank+0x23>
jmp    1197 <line_is_blank+0x87>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_is_blank>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %rdi,%rdi
je     1155 <line_is_blank+0x45>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1155 <line_is_blank+0x45>
add    $0x1,%rbx
jmp    113b <line_is_blank+0x2b>
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1155 <line_is_blank+0x45>
movzbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1130 <line_is_blank+0x20>
movzbl -0x1(%rbx),%eax
cmp    $0x1a,%al
je     1130 <line_is_blank+0x20>
cmp    $0xd,%al
je     1130 <line_is_blank+0x20>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @line_is_blank(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %17, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %17, label %6
6: ; preds = %3, %13
%7 = phi i8 [ %15, %13 ], [ %4, %3 ]
%8 = phi i8* [ %14, %13 ], [ %0, %3 ]
%9 = tail call i32 @isspace(i8 zeroext %7)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = load i8, i8* %8
switch i8 %12, label %17 [
i8 13, label %13
i8 26, label %13
]
13: ; preds = %11, %11, %6
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %6
17: ; preds = %13, %11, %3, %1
%18 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 1, %13 ], [ 0, %11 ]
ret i32 %18
}