#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*/ isblank(char);
int isBlankLine(const char str[]) {
  int i = 0;
  char c;
  while ((c = str[i]) != '\0') {
    ++i;
    if (!isblank(c) && c != '\n') {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<isBlankLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1176 <isBlankLine+0x66>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movsbl -0x15(%rbp),%edi
call   1030 <isblank@plt>
cmp    $0x0,%eax
jne    1171 <isBlankLine+0x61>
movsbl -0x15(%rbp),%eax
cmp    $0xa,%eax
je     1171 <isBlankLine+0x61>
movl   $0x0,-0x4(%rbp)
jmp    117d <isBlankLine+0x6d>
jmp    1123 <isBlankLine+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBlankLine>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
movzbl (%r14),%ebx
test   %bl,%bl
je     1141 <isBlankLine+0x31>
movsbl %bl,%edi
call   1030 <isblank@plt>
add    $0x1,%r14
test   %eax,%eax
jne    1120 <isBlankLine+0x10>
cmp    $0xa,%bl
je     1120 <isBlankLine+0x10>
xor    %eax,%eax
jmp    1146 <isBlankLine+0x36>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @isBlankLine(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = add nuw i64 %3, 1
%9 = tail call i32 @isblank(i8 signext %5)
%10 = icmp eq i32 %9, 0
%11 = icmp ne i8 %5, 10
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %13, label %2
13: ; preds = %2, %7
%14 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %14
}