int illegal_email_chars(char c) {
  if (!(c >= 'A' && c <= 'Z') && !(c >= 'a' && c <= 'z') &&
      !(c >= '0' && c <= '9') && c != '.' && c != '-' && c != '_')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<illegal_email_chars>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1124 <illegal_email_chars+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    118b <illegal_email_chars+0x8b>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     113e <illegal_email_chars+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    118b <illegal_email_chars+0x8b>
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1158 <illegal_email_chars+0x58>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    118b <illegal_email_chars+0x8b>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
je     118b <illegal_email_chars+0x8b>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     118b <illegal_email_chars+0x8b>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     118b <illegal_email_chars+0x8b>
movl   $0x1,-0x4(%rbp)
jmp    1192 <illegal_email_chars+0x92>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<illegal_email_chars>:
lea    -0x3a(%rdi),%eax
cmp    $0xf5,%al
ja     1134 <illegal_email_chars+0x34>
mov    %edi,%eax
and    $0xdf,%al
add    $0xa5,%al
cmp    $0xe5,%al
ja     1134 <illegal_email_chars+0x34>
mov    $0x1,%eax
add    $0xd3,%dil
cmp    $0x32,%dil
ja     1136 <illegal_email_chars+0x36>
movzbl %dil,%ecx
movabs $0x4000000000003,%rdx
bt     %rcx,%rdx
jae    1136 <illegal_email_chars+0x36>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @illegal_email_chars(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %40, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 122
br i1 %18, label %40, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 57
br i1 %26, label %40, label %27
27: ; preds = %23, %19
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 46
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp ne i32 %33, 45
br i1 %34, label %35, label %40
35: ; preds = %31
%36 = load i8, i8* %3
%37 = sext i8 %36 to i32
%38 = icmp ne i32 %37, 95
br i1 %38, label %39, label %40
39: ; preds = %35
store i32 1, i32* %2
br label %41
40: ; preds = %35, %31, %27, %23, %15, %7
store i32 0, i32* %2
br label %41
41: ; preds = %40, %39
%42 = load i32, i32* %2
ret i32 %42
}

LLVM IR (-O2):
define i32 @illegal_email_chars(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -91
%4 = icmp ult i8 %3, -26
%5 = add i8 %0, -58
%6 = icmp ult i8 %5, -10
%7 = and i1 %6, %4
br i1 %7, label %8, label %9
8: ; preds = %1
switch i8 %0, label %10 [
i8 95, label %9
i8 46, label %9
i8 45, label %9
]
9: ; preds = %8, %8, %8, %1
br label %10
10: ; preds = %8, %9
%11 = phi i32 [ 0, %9 ], [ 1, %8 ]
ret i32 %11
}