#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__ isalnum(char);
scalar_t__ isdigit(char);
char tolower(char);
char toupper(char);
int main() {
  char *buf = "hello";
  return !((toupper(buf[0]) == 'H' && toupper('z') == 'Z' &&
            tolower(buf[4]) == 'o' && tolower('X') == 'x' && isdigit(buf[3])) ==
               0 &&
           isalnum('4'));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x48,%ecx
mov    %al,-0x11(%rbp)
jne    11e2 <main+0xa2>
mov    $0x7a,%edi
call   1040 <toupper@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x5a,%ecx
mov    %al,-0x11(%rbp)
jne    11e2 <main+0xa2>
mov    -0x10(%rbp),%rax
movsbl 0x4(%rax),%edi
call   1060 <tolower@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x6f,%ecx
mov    %al,-0x11(%rbp)
jne    11e2 <main+0xa2>
mov    $0x58,%edi
call   1060 <tolower@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x78,%ecx
mov    %al,-0x11(%rbp)
jne    11e2 <main+0xa2>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x12(%rbp)
jne    120c <main+0xcc>
mov    $0x34,%edi
call   1050 <isalnum@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x68,%edi
call   1040 <toupper@plt>
cmp    $0x48,%al
jne    1190 <main+0x50>
mov    $0x7a,%edi
call   1040 <toupper@plt>
cmp    $0x5a,%al
jne    1190 <main+0x50>
mov    $0x6f,%edi
call   1060 <tolower@plt>
cmp    $0x6f,%al
jne    1190 <main+0x50>
mov    $0x58,%edi
call   1060 <tolower@plt>
cmp    $0x78,%al
jne    1190 <main+0x50>
mov    $0x6c,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    11a5 <main+0x65>
mov    $0x34,%edi
call   1050 <isalnum@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = call signext i8 @toupper(i8 signext %5)
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 72
br i1 %8, label %9, label %30
9: ; preds = %0
%10 = call signext i8 @toupper(i8 signext 122)
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 90
br i1 %12, label %13, label %30
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 4
%16 = load i8, i8* %15
%17 = call signext i8 @tolower(i8 signext %16)
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 111
br i1 %19, label %20, label %30
20: ; preds = %13
%21 = call signext i8 @tolower(i8 signext 88)
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 120
br i1 %23, label %24, label %30
24: ; preds = %20
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 3
%27 = load i8, i8* %26
%28 = call i64 @isdigit(i8 signext %27)
%29 = icmp ne i64 %28, 0
br label %30
30: ; preds = %24, %20, %13, %9, %0
%31 = phi i1 [ false, %20 ], [ false, %13 ], [ false, %9 ], [ false, %0 ], [ %29, %24 ]
%32 = zext i1 %31 to i32
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = call i64 @isalnum(i8 signext 52)
%36 = icmp ne i64 %35, 0
br label %37
37: ; preds = %34, %30
%38 = phi i1 [ false, %30 ], [ %36, %34 ]
%39 = xor i1 %38, true
%40 = zext i1 %39 to i32
ret i32 %40
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 @toupper(i8 signext 104)
%2 = icmp eq i8 %1, 72
br i1 %2, label %3, label %15
3: ; preds = %0
%4 = tail call signext i8 @toupper(i8 signext 122)
%5 = icmp eq i8 %4, 90
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = tail call signext i8 @tolower(i8 signext 111)
%8 = icmp eq i8 %7, 111
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = tail call signext i8 @tolower(i8 signext 88)
%11 = icmp eq i8 %10, 120
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = tail call i64 @isdigit(i8 signext 108)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %0, %3, %6, %9, %12
%16 = tail call i64 @isalnum(i8 signext 52)
%17 = icmp eq i64 %16, 0
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %15, %12
%20 = phi i32 [ 1, %12 ], [ %18, %15 ]
ret i32 %20
}