#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 */
char *GC_strdup(char *);
scalar_t__ strchr(char *, char);
char *identifier(const char *str) {
  int i;
  char *ptr;
  switch (*str) {
  case '+':
    return "add";
  case '*':
    return "mul";
  case '-':
    return "sub";
  case '/':
    return "divide";
  case '=':
    return "eql";
  case '<':
    if (str[1] == '=')
      return "leql";
    return "less";
  case '>':
    if (str[1] == '=')
      return "geql";
    return "greater";
  case '!':
    if (str[1] == '=')
      return "neql";
    break;
  case '.':
    switch (str[1]) {
    case '+':
      return "fadd";
    case '*':
      return "fmul";
    case '-':
      return "fsub";
    case '/':
      return "fdiv";
    case '<':
      return "fless";
    case '>':
      return "fgreater";
    default:
      return "stop";
    }
    break;
  }
  ptr = (char *)str;
  if (strchr(ptr, '-') || strchr(ptr, '.')) {
    ptr = GC_strdup(ptr);
    for (i = 0; ptr[i]; i++)
      if (ptr[i] == '-' || ptr[i] == '.')
        ptr[i] = '_';
  }
  return ptr;
}


x86 assembly (clang, -O0):
<identifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x1d,%eax
ja     12cf <identifier+0x1af>
mov    -0x28(%rbp),%rax
lea    0xeb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xf78(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xf6d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xf3c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xf39(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3d,%eax
jne    11ca <identifier+0xaa>
lea    0xf12(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xf26(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3d,%eax
jne    11fb <identifier+0xdb>
lea    0xee6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xefb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3d,%eax
jne    122c <identifier+0x10c>
lea    0xeba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
jmp    12cf <identifier+0x1af>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x14,%eax
ja     12bf <identifier+0x19f>
mov    -0x30(%rbp),%rax
lea    0xe22(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe7c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe71(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe66(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe5b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe50(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe46(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
lea    0xe3f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1383 <identifier+0x263>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x2d,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
jne    1307 <identifier+0x1e7>
mov    -0x20(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     137b <identifier+0x25b>
mov    -0x20(%rbp),%rdi
call   1030 <GC_strdup@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1376 <identifier+0x256>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
je     1357 <identifier+0x237>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    1363 <identifier+0x243>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x5f,(%rax,%rcx,1)
jmp    1368 <identifier+0x248>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    131b <identifier+0x1fb>
jmp    137b <identifier+0x25b>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<identifier>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%ecx
add    $0xffffffdf,%ecx
cmp    $0x1d,%ecx
ja     1155 <identifier+0x35>
lea    0xfad(%rip),%rax
lea    0xec3(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
cmpb   $0x3d,0x1(%rbx)
jne    1155 <identifier+0x35>
lea    0xf8a(%rip),%rax
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1040 <strchr@plt>
test   %rax,%rax
jne    117d <identifier+0x5d>
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1225 <identifier+0x105>
mov    %rbx,%rdi
call   1030 <GC_strdup@plt>
mov    %rax,%rcx
jmp    1197 <identifier+0x77>
nopw   0x0(%rax,%rax,1)
movb   $0x5f,(%rcx)
add    $0x1,%rcx
movzbl (%rcx),%edx
lea    -0x2d(%rdx),%esi
cmp    $0x2,%sil
jb     1190 <identifier+0x70>
test   %dl,%dl
jne    1193 <identifier+0x73>
pop    %rbx
ret
lea    0xf38(%rip),%rax
pop    %rbx
ret
lea    0xf34(%rip),%rax
pop    %rbx
ret
movsbl 0x1(%rbx),%ecx
add    $0xffffffd6,%ecx
cmp    $0x14,%ecx
ja     122a <identifier+0x10a>
lea    0xf14(%rip),%rax
lea    0xea3(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xf02(%rip),%rax
pop    %rbx
ret
lea    0xede(%rip),%rax
pop    %rbx
ret
cmpb   $0x3d,0x1(%rbx)
lea    0xed8(%rip),%rcx
lea    0xef5(%rip),%rax
jmp    121f <identifier+0xff>
lea    0xece(%rip),%rax
pop    %rbx
ret
cmpb   $0x3d,0x1(%rbx)
lea    0xec0(%rip),%rcx
lea    0xede(%rip),%rax
cmove  %rcx,%rax
pop    %rbx
ret
mov    %rbx,%rax
pop    %rbx
ret
lea    0xed4(%rip),%rax
pop    %rbx
ret
lea    0xeb2(%rip),%rax
pop    %rbx
ret
lea    0xeae(%rip),%rax
pop    %rbx
ret
lea    0xeaa(%rip),%rax
pop    %rbx
ret
lea    0xea7(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"add\00"
@.str.1 = [4 x i8] c"mul\00"
@.str.2 = [4 x i8] c"sub\00"
@.str.3 = [7 x i8] c"divide\00"
@.str.4 = [4 x i8] c"eql\00"
@.str.5 = [5 x i8] c"leql\00"
@.str.6 = [5 x i8] c"less\00"
@.str.7 = [5 x i8] c"geql\00"
@.str.8 = [8 x i8] c"greater\00"
@.str.9 = [5 x i8] c"neql\00"
@.str.10 = [5 x i8] c"fadd\00"
@.str.11 = [5 x i8] c"fmul\00"
@.str.12 = [5 x i8] c"fsub\00"
@.str.13 = [5 x i8] c"fdiv\00"
@.str.14 = [6 x i8] c"fless\00"
@.str.15 = [9 x i8] c"fgreater\00"
@.str.16 = [5 x i8] c"stop\00"
define i8* @identifier(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
switch i32 %8, label %50 [
i32 43, label %9
i32 42, label %10
i32 45, label %11
i32 47, label %12
i32 61, label %13
i32 60, label %14
i32 62, label %22
i32 33, label %30
i32 46, label %38
]
9: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %97
10: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %97
11: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %97
12: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %97
13: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %97
14: ; preds = %1
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 61
br i1 %19, label %20, label %21
20: ; preds = %14
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %97
21: ; preds = %14
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %97
22: ; preds = %1
%23 = load i8*, i8** %3
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 61
br i1 %27, label %28, label %29
28: ; preds = %22
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %97
29: ; preds = %22
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %97
30: ; preds = %1
%31 = load i8*, i8** %3
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 61
br i1 %35, label %36, label %37
36: ; preds = %30
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %97
37: ; preds = %30
br label %50
38: ; preds = %1
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
switch i32 %42, label %49 [
i32 43, label %43
i32 42, label %44
i32 45, label %45
i32 47, label %46
i32 60, label %47
i32 62, label %48
]
43: ; preds = %38
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %97
44: ; preds = %38
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %97
45: ; preds = %38
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %97
46: ; preds = %38
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %97
47: ; preds = %38
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %97
48: ; preds = %38
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %97
49: ; preds = %38
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %97
50: ; preds = %1, %37
%51 = load i8*, i8** %3
store i8* %51, i8** %5
%52 = load i8*, i8** %5
%53 = call i64 @strchr(i8* %52, i8 signext 45)
%54 = icmp ne i64 %53, 0
br i1 %54, label %59, label %55
55: ; preds = %50
%56 = load i8*, i8** %5
%57 = call i64 @strchr(i8* %56, i8 signext 46)
%58 = icmp ne i64 %57, 0
br i1 %58, label %59, label %95
59: ; preds = %55, %50
%60 = load i8*, i8** %5
%61 = call i8* @GC_strdup(i8* %60)
store i8* %61, i8** %5
store i32 0, i32* %4
br label %62
62: ; preds = %91, %59
%63 = load i8*, i8** %5
%64 = load i32, i32* %4
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %63, i64 %65
%67 = load i8, i8* %66
%68 = icmp ne i8 %67, 0
br i1 %68, label %69, label %94
69: ; preds = %62
%70 = load i8*, i8** %5
%71 = load i32, i32* %4
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %70, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 45
br i1 %76, label %85, label %77
77: ; preds = %69
%78 = load i8*, i8** %5
%79 = load i32, i32* %4
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 46
br i1 %84, label %85, label %90
85: ; preds = %77, %69
%86 = load i8*, i8** %5
%87 = load i32, i32* %4
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
store i8 95, i8* %89
br label %90
90: ; preds = %85, %77
br label %91
91: ; preds = %90
%92 = load i32, i32* %4
%93 = add nsw i32 %92, 1
store i32 %93, i32* %4
br label %62
94: ; preds = %62
br label %95
95: ; preds = %94, %55
%96 = load i8*, i8** %5
store i8* %96, i8** %2
br label %97
97: ; preds = %95, %49, %48, %47, %46, %45, %44, %43, %36, %29, %28, %21, %20, %13, %12, %11, %10, %9
%98 = load i8*, i8** %2
ret i8* %98
}

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
@.str.1 = [4 x i8] c"mul\00"
@.str.2 = [4 x i8] c"sub\00"
@.str.3 = [7 x i8] c"divide\00"
@.str.4 = [4 x i8] c"eql\00"
@.str.5 = [5 x i8] c"leql\00"
@.str.6 = [5 x i8] c"less\00"
@.str.7 = [5 x i8] c"geql\00"
@.str.8 = [8 x i8] c"greater\00"
@.str.9 = [5 x i8] c"neql\00"
@.str.10 = [5 x i8] c"fadd\00"
@.str.11 = [5 x i8] c"fmul\00"
@.str.12 = [5 x i8] c"fsub\00"
@.str.13 = [5 x i8] c"fdiv\00"
@.str.14 = [6 x i8] c"fless\00"
@.str.15 = [9 x i8] c"fgreater\00"
@.str.16 = [5 x i8] c"stop\00"
define i8* @identifier(i8* %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
switch i32 %3, label %32 [
i32 43, label %47
i32 42, label %4
i32 45, label %5
i32 47, label %6
i32 61, label %7
i32 60, label %8
i32 62, label %13
i32 33, label %18
i32 46, label %22
]
4: ; preds = %1
br label %47
5: ; preds = %1
br label %47
6: ; preds = %1
br label %47
7: ; preds = %1
br label %47
8: ; preds = %1
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 61
%12 = select i1 %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
br label %47
13: ; preds = %1
%14 = getelementptr inbounds i8, i8* %0, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 61
%17 = select i1 %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0)
br label %47
18: ; preds = %1
%19 = getelementptr inbounds i8, i8* %0, i64 1
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 61
br i1 %21, label %47, label %32
22: ; preds = %1
%23 = getelementptr inbounds i8, i8* %0, i64 1
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
switch i32 %25, label %31 [
i32 43, label %47
i32 42, label %26
i32 45, label %27
i32 47, label %28
i32 60, label %29
i32 62, label %30
]
26: ; preds = %22
br label %47
27: ; preds = %22
br label %47
28: ; preds = %22
br label %47
29: ; preds = %22
br label %47
30: ; preds = %22
br label %47
31: ; preds = %22
br label %47
32: ; preds = %18, %1
%33 = tail call i64 @strchr(i8* %0, i8 signext 45)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = tail call i64 @strchr(i8* %0, i8 signext 46)
%37 = icmp eq i64 %36, 0
br i1 %37, label %47, label %38
38: ; preds = %35, %32
%39 = tail call i8* @GC_strdup(i8* %0)
br label %40
40: ; preds = %45, %38
%41 = phi i64 [ %46, %45 ], [ 0, %38 ]
%42 = getelementptr inbounds i8, i8* %39, i64 %41
%43 = load i8, i8* %42
switch i8 %43, label %45 [
i8 0, label %47
i8 45, label %44
i8 46, label %44
]
44: ; preds = %40, %40
store i8 95, i8* %42
br label %45
45: ; preds = %40, %44
%46 = add nuw i64 %41, 1
br label %40
47: ; preds = %40, %35, %22, %18, %13, %8, %1, %31, %30, %29, %28, %27, %26, %7, %6, %5, %4
%48 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), %31 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), %30 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), %29 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), %28 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), %26 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ], [ %12, %8 ], [ %17, %13 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), %18 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), %22 ], [ %0, %35 ], [ %39, %40 ]
ret i8* %48
}