#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*/ IsSeqtype(int);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int GapChar(int seqtype) {
  assert(IsSeqtype(seqtype));
  switch (seqtype) {
  case 0:
    return 4;
  case 1:
    return 20;
  case 2:
  case 3:
    return 64;
  }
  puts("Valid sequence type but no gap char entry in \"GapChar\".");
  abort();
}


x86 assembly (clang, -O0):
<GapChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <IsSeqtype@plt>
mov    %eax,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     1192 <GapChar+0x52>
jmp    116d <GapChar+0x2d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     119e <GapChar+0x5e>
jmp    117e <GapChar+0x3e>
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     11aa <GapChar+0x6a>
jmp    11b6 <GapChar+0x76>
movl   $0x4,-0x4(%rbp)
jmp    11c9 <GapChar+0x89>
movl   $0x14,-0x4(%rbp)
jmp    11c9 <GapChar+0x89>
movl   $0x40,-0x4(%rbp)
jmp    11c9 <GapChar+0x89>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GapChar>:
push   %rbx
mov    %edi,%ebx
call   1050 <IsSeqtype@plt>
mov    %eax,%edi
call   1060 <assert@plt>
cmp    $0x4,%ebx
jae    1163 <GapChar+0x23>
movslq %ebx,%rax
lea    0xeda(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rbx
ret
lea    0xe96(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Valid sequence type but no gap char entry in \22GapChar\22.\00"
define i32 @GapChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @IsSeqtype(i32 %4)
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %3
switch i32 %7, label %11 [
i32 0, label %8
i32 1, label %9
i32 2, label %10
i32 3, label %10
]
8: ; preds = %1
store i32 4, i32* %2
br label %14
9: ; preds = %1
store i32 20, i32* %2
br label %14
10: ; preds = %1, %1
store i32 64, i32* %2
br label %14
11: ; preds = %1
%12 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %10, %9, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [56 x i8] c"Valid sequence type but no gap char entry in \22GapChar\22.\00"
@switch.table.GapChar = [4 x i32] [i32 4, i32 20, i32 64, i32 64]
define i32 @GapChar(i32 %0) {
%2 = tail call i32 @IsSeqtype(i32 %0)
%3 = tail call i32 @assert(i32 %2)
%4 = icmp ult i32 %0, 4
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
%9 = sext i32 %0 to i64
%10 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.GapChar, i64 0, i64 %9
%11 = load i32, i32* %10
ret i32 %11
}