#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 IsSeqtype(int const);
scalar_t__ IsValidGencode(int const);
int NumberSenseCodonsInGenCode(int const);
int /*<<< orphan*/ assert(int);
int NumberPossibleBases(const int seqtype, const int gencode) {
  assert(IsSeqtype(seqtype));
  assert(seqtype != 3 || IsValidGencode(gencode));
  switch (seqtype) {
  case 0:
    return 4;
  case 1:
    return 20;
  case 2:
    return 64;
  case 3:
    return NumberSenseCodonsInGenCode(gencode);
  }
  return -1;
}


x86 assembly (clang, -O0):
<NumberPossibleBases>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <IsSeqtype@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1,%al
cmpl   $0x3,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    117e <NumberPossibleBases+0x3e>
mov    -0xc(%rbp),%edi
call   1060 <IsValidGencode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
movzbl %al,%edi
and    $0x1,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     11e5 <NumberPossibleBases+0xa5>
mov    -0x18(%rbp),%rax
lea    0xe58(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x4,-0x4(%rbp)
jmp    11ec <NumberPossibleBases+0xac>
movl   $0x14,-0x4(%rbp)
jmp    11ec <NumberPossibleBases+0xac>
movl   $0x40,-0x4(%rbp)
jmp    11ec <NumberPossibleBases+0xac>
mov    -0xc(%rbp),%edi
call   1030 <NumberSenseCodonsInGenCode@plt>
mov    %eax,-0x4(%rbp)
jmp    11ec <NumberPossibleBases+0xac>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumberPossibleBases>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <IsSeqtype@plt>
mov    %eax,%edi
call   1050 <assert@plt>
cmp    $0x3,%ebp
jne    117a <NumberPossibleBases+0x3a>
mov    %ebx,%edi
call   1060 <IsValidGencode@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <NumberSenseCodonsInGenCode@plt>
mov    $0x1,%edi
call   1050 <assert@plt>
mov    $0xffffffff,%eax
cmp    $0x2,%ebp
ja     119b <NumberPossibleBases+0x5b>
movslq %ebp,%rax
lea    0xe68(%rip),%rcx
mov    (%rcx,%rax,4),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @NumberPossibleBases(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = call i32 @IsSeqtype(i32 %6)
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 3
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call i64 @IsValidGencode(i32 %12)
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %11, %2
%16 = phi i1 [ true, %2 ], [ %14, %11 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %4
switch i32 %19, label %26 [
i32 0, label %20
i32 1, label %21
i32 2, label %22
i32 3, label %23
]
20: ; preds = %15
store i32 4, i32* %3
br label %27
21: ; preds = %15
store i32 20, i32* %3
br label %27
22: ; preds = %15
store i32 64, i32* %3
br label %27
23: ; preds = %15
%24 = load i32, i32* %5
%25 = call i32 @NumberSenseCodonsInGenCode(i32 %24)
store i32 %25, i32* %3
br label %27
26: ; preds = %15
store i32 -1, i32* %3
br label %27
27: ; preds = %26, %23, %22, %21, %20
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@switch.table.NumberPossibleBases = [3 x i32] [i32 4, i32 20, i32 64]
define i32 @NumberPossibleBases(i32 %0, i32 %1) {
%3 = tail call i32 @IsSeqtype(i32 %0)
%4 = tail call i32 @assert(i32 %3)
%5 = icmp eq i32 %0, 3
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = tail call i64 @IsValidGencode(i32 %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @NumberSenseCodonsInGenCode(i32 %1)
br label %19
12: ; preds = %2
%13 = tail call i32 @assert(i32 1)
%14 = icmp ult i32 %0, 3
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = sext i32 %0 to i64
%17 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.NumberPossibleBases, i64 0, i64 %16
%18 = load i32, i32* %17
br label %19
19: ; preds = %12, %15, %6
%20 = phi i32 [ %11, %6 ], [ %18, %15 ], [ -1, %12 ]
ret i32 %20
}