#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__ isdigit(char);
scalar_t__ islower(char);
char tolower(char);
int group(char c) {
  c = tolower(c);
  if (islower(c)) {
    if (c == 'e')
      return 6;
    else
      return 1;
  }
  if (isdigit(c))
    return 2;
  switch (c) {
  case '_':
    return 3;
  case ':':
    return 4;
  case '.':
    return 5;
  case '+':
    return 7;
  case '-':
    return 8;
  case ' ':
  case '\t':
  case '\n':
    return 0;
  case '*':
    return 9;
  case '/':
    return 10;
  case '%':
    return 11;
  case '>':
  case '<':
    return 12;
  case '=':
    return 13;
  case ',':
  case ';':
  case '(':
  case ')':
    return 14;
  case '\"':
    return 15;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <tolower@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     1182 <group+0x52>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
jne    1176 <group+0x46>
movl   $0x6,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x1,-0x4(%rbp)
jmp    1273 <group+0x143>
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     11a1 <group+0x71>
movl   $0x2,-0x4(%rbp)
jmp    1273 <group+0x143>
movsbl -0x5(%rbp),%eax
add    $0xfffffff7,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x56,%eax
ja     1267 <group+0x137>
mov    -0x10(%rbp),%rax
lea    0xe3e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x4,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x5,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x7,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x8,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x0,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0x9,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xa,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xb,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xc,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xd,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xe,-0x4(%rbp)
jmp    1273 <group+0x143>
movl   $0xf,-0x4(%rbp)
jmp    1273 <group+0x143>
jmp    126c <group+0x13c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<group>:
push   %r14
push   %rbx
push   %rax
call   1050 <tolower@plt>
mov    %eax,%ebx
movsbl %al,%r14d
mov    %r14d,%edi
call   1040 <islower@plt>
test   %rax,%rax
je     115c <group+0x2c>
xor    %eax,%eax
cmp    $0x65,%bl
sete   %al
lea    (%rax,%rax,4),%eax
add    $0x1,%eax
jmp    1171 <group+0x41>
mov    %r14d,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x2,%eax
test   %rcx,%rcx
je     1179 <group+0x49>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
add    $0xfffffff7,%r14d
cmp    $0x56,%r14d
ja     119f <group+0x6f>
mov    $0x3,%eax
lea    0xe71(%rip),%rcx
movslq (%rcx,%r14,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0xe,%eax
jmp    1171 <group+0x41>
xor    %eax,%eax
jmp    1171 <group+0x41>
mov    $0xc,%eax
jmp    1171 <group+0x41>
mov    $0xf,%eax
jmp    1171 <group+0x41>
mov    $0xb,%eax
jmp    1171 <group+0x41>
mov    $0x9,%eax
jmp    1171 <group+0x41>
mov    $0x7,%eax
jmp    1171 <group+0x41>
mov    $0x8,%eax
jmp    1171 <group+0x41>
mov    $0x5,%eax
jmp    1171 <group+0x41>
mov    $0xa,%eax
jmp    1171 <group+0x41>
mov    $0x4,%eax
jmp    1171 <group+0x41>
mov    $0xd,%eax
jmp    1171 <group+0x41>

LLVM IR (-O0):
define i32 @group(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @tolower(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = call i64 @islower(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 101
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 6, i32* %2
br label %38
14: ; preds = %9
store i32 1, i32* %2
br label %38
15: ; preds = %1
%16 = load i8, i8* %3
%17 = call i64 @isdigit(i8 signext %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15
store i32 2, i32* %2
br label %38
20: ; preds = %15
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
switch i32 %22, label %36 [
i32 95, label %23
i32 58, label %24
i32 46, label %25
i32 43, label %26
i32 45, label %27
i32 32, label %28
i32 9, label %28
i32 10, label %28
i32 42, label %29
i32 47, label %30
i32 37, label %31
i32 62, label %32
i32 60, label %32
i32 61, label %33
i32 44, label %34
i32 59, label %34
i32 40, label %34
i32 41, label %34
i32 34, label %35
]
23: ; preds = %20
store i32 3, i32* %2
br label %38
24: ; preds = %20
store i32 4, i32* %2
br label %38
25: ; preds = %20
store i32 5, i32* %2
br label %38
26: ; preds = %20
store i32 7, i32* %2
br label %38
27: ; preds = %20
store i32 8, i32* %2
br label %38
28: ; preds = %20, %20, %20
store i32 0, i32* %2
br label %38
29: ; preds = %20
store i32 9, i32* %2
br label %38
30: ; preds = %20
store i32 10, i32* %2
br label %38
31: ; preds = %20
store i32 11, i32* %2
br label %38
32: ; preds = %20, %20
store i32 12, i32* %2
br label %38
33: ; preds = %20
store i32 13, i32* %2
br label %38
34: ; preds = %20, %20, %20, %20
store i32 14, i32* %2
br label %38
35: ; preds = %20
store i32 15, i32* %2
br label %38
36: ; preds = %20
br label %37
37: ; preds = %36
store i32 0, i32* %2
br label %38
38: ; preds = %37, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %19, %14, %13
%39 = load i32, i32* %2
ret i32 %39
}

LLVM IR (-O2):
define i32 @group(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 signext %0)
%3 = tail call i64 @islower(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = icmp eq i8 %2, 101
%7 = select i1 %6, i32 6, i32 1
br label %26
8: ; preds = %1
%9 = tail call i64 @isdigit(i8 signext %2)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %8
%12 = sext i8 %2 to i32
switch i32 %12, label %25 [
i32 95, label %26
i32 58, label %13
i32 46, label %14
i32 43, label %15
i32 45, label %16
i32 32, label %17
i32 9, label %17
i32 10, label %17
i32 42, label %18
i32 47, label %19
i32 37, label %20
i32 62, label %21
i32 60, label %21
i32 61, label %22
i32 44, label %23
i32 59, label %23
i32 40, label %23
i32 41, label %23
i32 34, label %24
]
13: ; preds = %11
br label %26
14: ; preds = %11
br label %26
15: ; preds = %11
br label %26
16: ; preds = %11
br label %26
17: ; preds = %11, %11, %11
br label %26
18: ; preds = %11
br label %26
19: ; preds = %11
br label %26
20: ; preds = %11
br label %26
21: ; preds = %11, %11
br label %26
22: ; preds = %11
br label %26
23: ; preds = %11, %11, %11, %11
br label %26
24: ; preds = %11
br label %26
25: ; preds = %11
br label %26
26: ; preds = %11, %8, %5, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%27 = phi i32 [ 0, %25 ], [ 15, %24 ], [ 14, %23 ], [ 13, %22 ], [ 12, %21 ], [ 11, %20 ], [ 10, %19 ], [ 9, %18 ], [ 0, %17 ], [ 8, %16 ], [ 7, %15 ], [ 5, %14 ], [ 4, %13 ], [ %7, %5 ], [ 2, %8 ], [ 3, %11 ]
ret i32 %27
}