#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
char *zcPPdbTerminationCode(int iCode) {
  switch (iCode) {
  case -1:
    return ("Nonterminal");
    break;
  case 0:
    return ("Terminal/beginning");
    break;
  case 1:
    return ("Terminal/last");
    break;
  default: {
    printf("%cFATAL ERROR----------------------------------------\n", '!');
    printf("%cFATAL:    In file [%s], line %d\n", '!',
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/choderalab/ambermini/refs/heads/master/"
           "leap/src/leap/pdbFile.c",
           167);
    printf("%cFATAL:    Message: ", '!');
    printf("Illegal termination type");
    printf("%c\n", '!');
    printf("%cABORTING.\n", '!');
    exit(1);
  }; break;
  }
  return (0);
}


x86 assembly (clang, -O0):
<zcPPdbTerminationCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xffffffff,%eax
je     1160 <zcPPdbTerminationCode+0x40>
jmp    113f <zcPPdbTerminationCode+0x1f>
mov    -0x10(%rbp),%eax
test   %eax,%eax
je     1170 <zcPPdbTerminationCode+0x50>
jmp    114f <zcPPdbTerminationCode+0x2f>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1180 <zcPPdbTerminationCode+0x60>
jmp    1190 <zcPPdbTerminationCode+0x70>
lea    0xe99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1213 <zcPPdbTerminationCode+0xf3>
lea    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1213 <zcPPdbTerminationCode+0xf3>
lea    0xe98(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1213 <zcPPdbTerminationCode+0xf3>
lea    0xe96(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x21,%esi
lea    0xed1(%rip),%rdx
mov    $0xa7,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf57(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf65(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf56(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zcPPdbTerminationCode>:
push   %rax
add    $0x1,%edi
cmp    $0x3,%edi
jae    113c <zcPPdbTerminationCode+0x1c>
movslq %edi,%rax
lea    0x102d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
pop    %rcx
ret
lea    0xeea(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
lea    0xf2a(%rip),%rdx
mov    $0x21,%esi
mov    $0xa7,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfab(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfae(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Nonterminal\00"
@.str.1 = [19 x i8] c"Terminal/beginning\00"
@.str.2 = [14 x i8] c"Terminal/last\00"
@.str.3 = [55 x i8] c"%cFATAL ERROR----------------------------------------\0A\00"
@.str.4 = [35 x i8] c"%cFATAL: In file [%s], line %d\0A\00"
@.str.5 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/choderalab/ambermini/refs/heads/master/leap/src/leap/pdbFile.c\00"
@.str.6 = [22 x i8] c"%cFATAL: Message: \00"
@.str.7 = [25 x i8] c"Illegal termination type\00"
@.str.8 = [4 x i8] c"%c\0A\00"
@.str.9 = [13 x i8] c"%cABORTING.\0A\00"
define i8* @zcPPdbTerminationCode(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 -1, label %5
i32 0, label %6
i32 1, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
6: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 33)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.5, i64 0, i64 0), i32 167)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 33)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 33)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 33)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %7, %6, %5
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@.str = [12 x i8] c"Nonterminal\00"
@.str.1 = [19 x i8] c"Terminal/beginning\00"
@.str.2 = [14 x i8] c"Terminal/last\00"
@.str.3 = [55 x i8] c"%cFATAL ERROR----------------------------------------\0A\00"
@.str.4 = [35 x i8] c"%cFATAL: In file [%s], line %d\0A\00"
@.str.5 = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/choderalab/ambermini/refs/heads/master/leap/src/leap/pdbFile.c\00"
@.str.6 = [22 x i8] c"%cFATAL: Message: \00"
@.str.7 = [25 x i8] c"Illegal termination type\00"
@.str.8 = [4 x i8] c"%c\0A\00"
@.str.9 = [13 x i8] c"%cABORTING.\0A\00"
@reltable.zcPPdbTerminationCode = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.zcPPdbTerminationCode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.zcPPdbTerminationCode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.zcPPdbTerminationCode to i64)) to i32)]
define i8* @zcPPdbTerminationCode(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 3
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 33)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.5, i64 0, i64 0), i32 167)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 33)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 33)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i32 33)
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = sext i32 %2 to i64
%14 = shl i64 %13, 2
%15 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.zcPPdbTerminationCode to i8*), i64 %14)
ret i8* %15
}