#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 *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void zPdbToNameMapKey(int iPart, char *sPart, char *sKey) {
  switch (iPart) {
  case -1:
    strcpy(sKey, sPart);
    break;
  case 0:
    sprintf(sKey, "0%s", sPart);
    break;
  case 1:
    sprintf(sKey, "1%s", sPart);
    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",
           196);
    printf("%cFATAL:    Message: ", '!');
    printf("Illegal termination type");
    printf("%c\n", '!');
    printf("%cABORTING.\n", '!');
    exit(1);
  }; break;
  }
}


x86 assembly (clang, -O0):
<zPdbToNameMapKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0xffffffff,%eax
je     1188 <zPdbToNameMapKey+0x48>
jmp    1167 <zPdbToNameMapKey+0x27>
mov    -0x1c(%rbp),%eax
test   %eax,%eax
je     119a <zPdbToNameMapKey+0x5a>
jmp    1177 <zPdbToNameMapKey+0x37>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
je     11b3 <zPdbToNameMapKey+0x73>
jmp    11cc <zPdbToNameMapKey+0x8c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    124f <zPdbToNameMapKey+0x10f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe57(%rip),%rsi
call   1050 <sprintf@plt>
jmp    124f <zPdbToNameMapKey+0x10f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe42(%rip),%rsi
call   1050 <sprintf@plt>
jmp    124f <zPdbToNameMapKey+0x10f>
lea    0xe35(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe59(%rip),%rdi
mov    $0x21,%esi
lea    0xe70(%rip),%rdx
mov    $0xc4,%ecx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x21,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zPdbToNameMapKey>:
mov    %rsi,%rax
cmp    $0x1,%edi
je     115c <zPdbToNameMapKey+0x1c>
test   %edi,%edi
je     1165 <zPdbToNameMapKey+0x25>
cmp    $0xffffffff,%edi
jne    1177 <zPdbToNameMapKey+0x37>
mov    %rdx,%rdi
mov    %rax,%rsi
jmp    1030 <strcpy@plt>
lea    0xea1(%rip),%rsi
jmp    116c <zPdbToNameMapKey+0x2c>
lea    0xe94(%rip),%rsi
mov    %rdx,%rdi
mov    %rax,%rdx
jmp    1050 <sprintf@plt>
push   %rax
lea    0xe89(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
lea    0xec9(%rip),%rdx
mov    $0x21,%esi
mov    $0xc4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf4d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf58(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0x21,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"0%s\00"
@.str.1 = [4 x i8] c"1%s\00"
@.str.2 = [55 x i8] c"%cFATAL ERROR----------------------------------------\0A\00"
@.str.3 = [35 x i8] c"%cFATAL: In file [%s], line %d\0A\00"
@.str.4 = [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.5 = [22 x i8] c"%cFATAL: Message: \00"
@.str.6 = [25 x i8] c"Illegal termination type\00"
@.str.7 = [4 x i8] c"%c\0A\00"
@.str.8 = [13 x i8] c"%cABORTING.\0A\00"
define void @zPdbToNameMapKey(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
switch i32 %7, label %20 [
i32 -1, label %8
i32 0, label %12
i32 1, label %16
]
8: ; preds = %3
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = call i32 @strcpy(i8* %9, i8* %10)
br label %28
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = load i8*, i8** %5
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %28
16: ; preds = %3
%17 = load i8*, i8** %6
%18 = load i8*, i8** %5
%19 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %18)
br label %28
20: ; preds = %3
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 33)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.4, i64 0, i64 0), i32 196)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 33)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 33)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 33)
%27 = call i32 @exit(i32 1)
unreachable
28: ; preds = %16, %12, %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"0%s\00"
@.str.1 = [4 x i8] c"1%s\00"
@.str.2 = [55 x i8] c"%cFATAL ERROR----------------------------------------\0A\00"
@.str.3 = [35 x i8] c"%cFATAL: In file [%s], line %d\0A\00"
@.str.4 = [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.5 = [22 x i8] c"%cFATAL: Message: \00"
@.str.6 = [25 x i8] c"Illegal termination type\00"
@.str.7 = [4 x i8] c"%c\0A\00"
@.str.8 = [13 x i8] c"%cABORTING.\0A\00"
define void @zPdbToNameMapKey(i32 %0, i8* %1, i8* %2) {
switch i32 %0, label %10 [
i32 -1, label %4
i32 0, label %6
i32 1, label %8
]
4: ; preds = %3
%5 = tail call i32 @strcpy(i8* %2, i8* %1)
br label %18
6: ; preds = %3
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %18
8: ; preds = %3
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %18
10: ; preds = %3
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 33)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str.4, i64 0, i64 0), i32 196)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 33)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 33)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 33)
%17 = tail call i32 @exit(i32 1)
unreachable
18: ; preds = %8, %6, %4
ret void
}