#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);
char tolower(char);
int main() {
  assert(tolower('!') == '!');
  assert(tolower('A') == 'a');
  assert(tolower('M') == 'm');
  assert(tolower('Z') == 'z');
  assert(tolower('a') == 'a');
  assert(tolower('m') == 'm');
  assert(tolower('z') == 'z');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x21,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x21,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x41,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x4d,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x6d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x5a,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x7a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x61,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x61,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x6d,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x6d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x7a,%edi
call   1040 <tolower@plt>
movsbl %al,%eax
cmp    $0x7a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x21,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x21,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x41,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x61,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x4d,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x6d,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x5a,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x7a,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x61,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x61,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x6d,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x6d,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x7a,%edi
call   1040 <tolower@plt>
xor    %edi,%edi
cmp    $0x7a,%al
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call signext i8 @tolower(i8 signext 33)
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 33
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call signext i8 @tolower(i8 signext 65)
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 97
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = call signext i8 @tolower(i8 signext 77)
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 109
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call signext i8 @tolower(i8 signext 90)
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 122
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = call signext i8 @tolower(i8 signext 97)
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 97
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call signext i8 @tolower(i8 signext 109)
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 109
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = call signext i8 @tolower(i8 signext 122)
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 122
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
ret i32 0
}

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