#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*/ printf(char *, unsigned long long);
unsigned int nucleotideLexiRank(unsigned long long int nucleotide) {
  if (nucleotide == 0x0000000000000000)
    return 1;
  if (nucleotide == 0x4000000000000000)
    return 3;
  if (nucleotide == 0x8000000000000000)
    return 2;
  if (nucleotide == 0xC000000000000000)
    return 4;
  printf("error: could not match nucleotide %d\n", nucleotide);
  return 0;
}


x86 assembly (clang, -O0):
<nucleotideLexiRank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <nucleotideLexiRank+0x23>
movl   $0x1,-0x4(%rbp)
jmp    11aa <nucleotideLexiRank+0x9a>
movabs $0x4000000000000000,%rax
cmp    %rax,-0x10(%rbp)
jne    1153 <nucleotideLexiRank+0x43>
movl   $0x3,-0x4(%rbp)
jmp    11aa <nucleotideLexiRank+0x9a>
movabs $0x8000000000000000,%rax
cmp    %rax,-0x10(%rbp)
jne    1173 <nucleotideLexiRank+0x63>
movl   $0x2,-0x4(%rbp)
jmp    11aa <nucleotideLexiRank+0x9a>
movabs $0xc000000000000000,%rax
cmp    %rax,-0x10(%rbp)
jne    1193 <nucleotideLexiRank+0x83>
movl   $0x4,-0x4(%rbp)
jmp    11aa <nucleotideLexiRank+0x9a>
mov    -0x10(%rbp),%rsi
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nucleotideLexiRank>:
mov    %rdi,%rsi
test   %rdi,%rdi
jns    113c <nucleotideLexiRank+0x2c>
movabs $0x8000000000000000,%rax
cmp    %rax,%rsi
je     1167 <nucleotideLexiRank+0x57>
movabs $0xc000000000000000,%rax
cmp    %rax,%rsi
jne    1153 <nucleotideLexiRank+0x43>
mov    $0x4,%eax
ret
je     116d <nucleotideLexiRank+0x5d>
movabs $0x4000000000000000,%rax
cmp    %rax,%rsi
jne    1153 <nucleotideLexiRank+0x43>
mov    $0x3,%eax
ret
push   %rax
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0x2,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [38 x i8] c"error: could not match nucleotide %d\0A\00"
define i32 @nucleotideLexiRank(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %22
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 4611686018427387904
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 3, i32* %2
br label %22
11: ; preds = %7
%12 = load i64, i64* %3
%13 = icmp eq i64 %12, -9223372036854775808
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 2, i32* %2
br label %22
15: ; preds = %11
%16 = load i64, i64* %3
%17 = icmp eq i64 %16, -4611686018427387904
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 4, i32* %2
br label %22
19: ; preds = %15
%20 = load i64, i64* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %20)
store i32 0, i32* %2
br label %22
22: ; preds = %19, %18, %14, %10, %6
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
@.str = [38 x i8] c"error: could not match nucleotide %d\0A\00"
define i32 @nucleotideLexiRank(i64 %0) {
switch i64 %0, label %5 [
i64 0, label %7
i64 4611686018427387904, label %2
i64 -9223372036854775808, label %3
i64 -4611686018427387904, label %4
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %7
7: ; preds = %1, %5, %4, %3, %2
%8 = phi i32 [ 3, %2 ], [ 2, %3 ], [ 4, %4 ], [ 0, %5 ], [ 1, %1 ]
ret i32 %8
}