#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*/ assert(int);
int isblank(char);
int isdigit(int);
char tolower(char);
char toupper(char);
int main(void) {
  int i;
  assert(isblank(' '));
  assert(isblank('\t'));
  assert('1' == tolower('1'));
  assert('1' == toupper('1'));
  assert('A' == toupper('a'));
  assert('b' == tolower('B'));
  for (i = '0'; i <= '9'; i++) {
    assert(isdigit(i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x20,%edi
call   1050 <isblank@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x9,%edi
call   1050 <isblank@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    $0x31,%edi
call   1070 <tolower@plt>
movsbl %al,%ecx
mov    $0x31,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x31,%edi
call   1040 <toupper@plt>
movsbl %al,%ecx
mov    $0x31,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x61,%edi
call   1040 <toupper@plt>
movsbl %al,%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    $0x42,%edi
call   1070 <tolower@plt>
movsbl %al,%ecx
mov    $0x62,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movl   $0x30,-0x8(%rbp)
cmpl   $0x39,-0x8(%rbp)
jg     1233 <main+0xe3>
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    120c <main+0xbc>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x20,%edi
call   1040 <isblank@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x9,%edi
call   1040 <isblank@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x31,%edi
call   1060 <tolower@plt>
xor    %edi,%edi
cmp    $0x31,%al
sete   %dil
call   1050 <assert@plt>
mov    $0x31,%edi
call   1030 <toupper@plt>
xor    %edi,%edi
cmp    $0x31,%al
sete   %dil
call   1050 <assert@plt>
mov    $0x61,%edi
call   1030 <toupper@plt>
xor    %edi,%edi
cmp    $0x41,%al
sete   %dil
call   1050 <assert@plt>
mov    $0x42,%edi
call   1060 <tolower@plt>
xor    %edi,%edi
cmp    $0x62,%al
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @isblank(i8 signext 32)
%4 = call i32 @assert(i32 %3)
%5 = call i32 @isblank(i8 signext 9)
%6 = call i32 @assert(i32 %5)
%7 = call signext i8 @tolower(i8 signext 49)
%8 = sext i8 %7 to i32
%9 = icmp eq i32 49, %8
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = call signext i8 @toupper(i8 signext 49)
%13 = sext i8 %12 to i32
%14 = icmp eq i32 49, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call signext i8 @toupper(i8 signext 97)
%18 = sext i8 %17 to i32
%19 = icmp eq i32 65, %18
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call signext i8 @tolower(i8 signext 66)
%23 = sext i8 %22 to i32
%24 = icmp eq i32 98, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
store i32 48, i32* %2
br label %27
27: ; preds = %34, %0
%28 = load i32, i32* %2
%29 = icmp sle i32 %28, 57
br i1 %29, label %30, label %37
30: ; preds = %27
%31 = load i32, i32* %2
%32 = call i32 @isdigit(i32 %31)
%33 = call i32 @assert(i32 %32)
br label %34
34: ; preds = %30
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %27
37: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @isblank(i8 signext 32)
%2 = tail call i32 @assert(i32 %1)
%3 = tail call i32 @isblank(i8 signext 9)
%4 = tail call i32 @assert(i32 %3)
%5 = tail call signext i8 @tolower(i8 signext 49)
%6 = icmp eq i8 %5, 49
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call signext i8 @toupper(i8 signext 49)
%10 = icmp eq i8 %9, 49
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call signext i8 @toupper(i8 signext 97)
%14 = icmp eq i8 %13, 65
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call signext i8 @tolower(i8 signext 66)
%18 = icmp eq i8 %17, 98
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @assert(i32 1)
%22 = tail call i32 @assert(i32 1)
%23 = tail call i32 @assert(i32 1)
%24 = tail call i32 @assert(i32 1)
%25 = tail call i32 @assert(i32 1)
%26 = tail call i32 @assert(i32 1)
%27 = tail call i32 @assert(i32 1)
%28 = tail call i32 @assert(i32 1)
%29 = tail call i32 @assert(i32 1)
%30 = tail call i32 @assert(i32 1)
ret i32 0
}