#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 */
scalar_t__ isblank(char);
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  char list[] = {' ', '\n', '\t', '\0'};
  int i = 0;
  for (i = 0; i < 4; i++) {
    if (isblank(list[i])) {
      printf("\033[0;32m[%c](%d) is blank\033[0m\n", list[i], list[i]);
    } else {
      printf("\033[0;31m[%c](%d) is not blank\033[0m\n", list[i], list[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    11c0 <main+0xa0>
movslq -0xc(%rbp),%rax
movsbl -0x8(%rbp,%rax,1),%edi
call   1040 <isblank@plt>
cmp    $0x0,%rax
je     118d <main+0x6d>
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp,%rax,1),%cl
movslq -0xc(%rbp),%rax
lea    0xe89(%rip),%rdi
movsbl %cl,%esi
movsbl -0x8(%rbp,%rax,1),%edx
call   1030 <printf@plt>
jmp    11ad <main+0x8d>
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp,%rax,1),%cl
movslq -0xc(%rbp),%rax
lea    0xe82(%rip),%rdi
movsbl %cl,%esi
movsbl -0x8(%rbp,%rax,1),%edx
call   1030 <printf@plt>
jmp    11b2 <main+0x92>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x20,%edi
call   1040 <isblank@plt>
test   %rax,%rax
lea    0xee6(%rip),%r14
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
cmove  %r14,%rdi
mov    $0x20,%esi
mov    $0x20,%edx
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <isblank@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r14,%rdi
mov    $0xa,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    $0x9,%edi
call   1040 <isblank@plt>
test   %rax,%rax
mov    %rbx,%rdi
cmove  %r14,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <isblank@plt>
test   %rax,%rax
cmove  %r14,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.list = [4 x i8] c" \0A\09\00"
@.str = [30 x i8] c"\1B[0;32m[%c](%d) is blank\1B[0m\0A\00"
@.str.1 = [34 x i8] c"\1B[0;31m[%c](%d) is not blank\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [4 x i8]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %3
br label %5
5: ; preds = %36, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %39
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = call i64 @isblank(i8 signext %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %8
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 signext %19, i8 signext %23)
br label %35
25: ; preds = %8
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8 signext %29, i8 signext %33)
br label %35
35: ; preds = %25, %15
br label %36
36: ; preds = %35
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %5
39: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"\1B[0;32m[%c](%d) is blank\1B[0m\0A\00"
@.str.1 = [34 x i8] c"\1B[0;31m[%c](%d) is not blank\1B[0m\0A\00"
define i32 @main() {
%1 = tail call i64 @isblank(i8 signext 32)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i8 signext 32, i8 signext 32)
%5 = tail call i64 @isblank(i8 signext 10)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8 signext 10, i8 signext 10)
%9 = tail call i64 @isblank(i8 signext 9)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
%12 = tail call i32 @printf(i8* %11, i8 signext 9, i8 signext 9)
%13 = tail call i64 @isblank(i8 signext 0)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
%16 = tail call i32 @printf(i8* %15, i8 signext 0, i8 signext 0)
ret i32 0
}