#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*/ abort();
char toupper(char);
int main() {
  if (toupper('a') != 'A') {
    abort();
  }
  if (toupper('z') != 'Z') {
    abort();
  }
  if (toupper('!') != '!') {
    abort();
  }
  if (toupper('A') != 'A') {
    abort();
  }
  if (toupper('Z') != 'Z') {
    abort();
  }
  if (toupper('@') != '@') {
    abort();
  }
  if (toupper('[') != '[') {
    abort();
  }
  if (toupper('1') != '1') {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x41,%eax
je     1141 <main+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x7a,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x5a,%eax
je     115e <main+0x3e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x21,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x21,%eax
je     117b <main+0x5b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x41,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x41,%eax
je     1198 <main+0x78>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5a,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x5a,%eax
je     11b5 <main+0x95>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x40,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x40,%eax
je     11d2 <main+0xb2>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x5b,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x5b,%eax
je     11ef <main+0xcf>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x31,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
cmp    $0x31,%eax
je     120c <main+0xec>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1040 <toupper@plt>
cmp    $0x41,%al
jne    1195 <main+0x75>
mov    $0x7a,%edi
call   1040 <toupper@plt>
cmp    $0x5a,%al
jne    1195 <main+0x75>
mov    $0x21,%edi
call   1040 <toupper@plt>
cmp    $0x21,%al
jne    1195 <main+0x75>
mov    $0x41,%edi
call   1040 <toupper@plt>
cmp    $0x41,%al
jne    1195 <main+0x75>
mov    $0x5a,%edi
call   1040 <toupper@plt>
cmp    $0x5a,%al
jne    1195 <main+0x75>
mov    $0x40,%edi
call   1040 <toupper@plt>
cmp    $0x40,%al
jne    1195 <main+0x75>
mov    $0x5b,%edi
call   1040 <toupper@plt>
cmp    $0x5b,%al
jne    1195 <main+0x75>
mov    $0x31,%edi
call   1040 <toupper@plt>
cmp    $0x31,%al
jne    1195 <main+0x75>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = call signext i8 @toupper(i8 signext 97)
%2 = sext i8 %1 to i32
%3 = icmp ne i32 %2, 65
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call signext i8 @toupper(i8 signext 122)
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 90
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %6
%13 = call signext i8 @toupper(i8 signext 33)
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 33
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %12
%19 = call signext i8 @toupper(i8 signext 65)
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 65
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %18
%25 = call signext i8 @toupper(i8 signext 90)
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 90
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 (...) @abort()
unreachable
30: ; preds = %24
%31 = call signext i8 @toupper(i8 signext 64)
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 64
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 (...) @abort()
unreachable
36: ; preds = %30
%37 = call signext i8 @toupper(i8 signext 91)
%38 = sext i8 %37 to i32
%39 = icmp ne i32 %38, 91
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 (...) @abort()
unreachable
42: ; preds = %36
%43 = call signext i8 @toupper(i8 signext 49)
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 49
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 (...) @abort()
unreachable
48: ; preds = %42
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 @toupper(i8 signext 97)
%2 = icmp eq i8 %1, 65
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call signext i8 @toupper(i8 signext 122)
%7 = icmp eq i8 %6, 90
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call signext i8 @toupper(i8 signext 33)
%12 = icmp eq i8 %11, 33
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call signext i8 @toupper(i8 signext 65)
%17 = icmp eq i8 %16, 65
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call signext i8 @toupper(i8 signext 90)
%22 = icmp eq i8 %21, 90
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %20
%26 = tail call signext i8 @toupper(i8 signext 64)
%27 = icmp eq i8 %26, 64
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 (...) @abort()
unreachable
30: ; preds = %25
%31 = tail call signext i8 @toupper(i8 signext 91)
%32 = icmp eq i8 %31, 91
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 (...) @abort()
unreachable
35: ; preds = %30
%36 = tail call signext i8 @toupper(i8 signext 49)
%37 = icmp eq i8 %36, 49
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 (...) @abort()
unreachable
40: ; preds = %35
ret i32 0
}