#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 */
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *C_mkTySkelsH(char *numTySkels) {
  size_t length =
      strlen("/****************************************************************"
             "***********/\n/*   TYPE SKELETIONS FOR PERVASIVE CONSTANTS       "
             "                         */ "
             "\n/"
             "*****************************************************************"
             "***********/\n\n") +
      strlen(numTySkels) +
      strlen("//pervasive type skel data type                                  "
             "             \ntypedef DF_TypePtr  PERV_TySkelData;              "
             "                           \n\n") +
      strlen("//pervasive type skel table (array)                              "
             "             \nextern  PERV_TySkelData   "
             "PERV_tySkelTab[PERV_TY_SKEL_NUM];                  \n\n") +
      strlen("//pervasive type skeletons and type skeleton table "
             "initialization             \n//Note that type skeltons have to "
             "be dynamically allocated, and so does the    \n//info recorded "
             "in each entry of the pervasive type skeleton table             "
             "\nvoid PERV_tySkelTabInit();                                     "
             "              \n\n") +
      strlen("//pervasive tyskel table copy function                           "
             "             \nvoid PERV_copyTySkelTab(PERV_TySkelData* dst);    "
             "                           \n\n");
  char *tySkelsH = UTIL_mallocStr(length);
  strcpy(tySkelsH, "/**********************************************************"
                   "*****************/\n/*   TYPE SKELETIONS FOR PERVASIVE "
                   "CONSTANTS                                */ "
                   "\n/"
                   "***********************************************************"
                   "*****************/\n\n");
  strcat(tySkelsH, numTySkels);
  strcat(tySkelsH, "//pervasive type skel data type                            "
                   "                   \ntypedef DF_TypePtr  PERV_TySkelData;  "
                   "                                       \n\n");
  strcat(tySkelsH, "//pervasive type skel table (array)                        "
                   "                   \nextern  PERV_TySkelData   "
                   "PERV_tySkelTab[PERV_TY_SKEL_NUM];                  \n\n");
  strcat(
      tySkelsH,
      "//pervasive type skeletons and type skeleton table initialization       "
      "      \n//Note that type skeltons have to be dynamically allocated, and "
      "so does the    \n//info recorded in each entry of the pervasive type "
      "skeleton table             \nvoid PERV_tySkelTabInit();                 "
      "                                  \n\n");
  strcat(tySkelsH,
         "//pervasive tyskel table copy function                               "
         "         \nvoid PERV_copyTySkelTab(PERV_TySkelData* dst);            "
         "                   \n\n");
  return tySkelsH;
}


x86 assembly (clang, -O0):
<C_mkTySkelsH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
lea    0xf75(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
lea    0xffa(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
lea    0x107f(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
lea    0x11a4(%rip),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xedf(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xf6e(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xffd(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0x112c(%rip),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_mkTySkelsH>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x406(%rax),%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,%rbx
lea    0xe9e(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
lea    0xf73(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
lea    0x1003(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
lea    0x1093(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
lea    0x11c3(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [239 x i8] c"/***************************************************************************/\0A/* TYPE SKELETIONS FOR PERVASIVE CONSTANTS */ \0A/****************************************************************************/\0A\0A\00"
@.str.1 = [159 x i8] c"//pervasive type skel data type \0Atypedef DF_TypePtr PERV_TySkelData; \0A\0A\00"
@.str.2 = [159 x i8] c"//pervasive type skel table (array) \0Aextern PERV_TySkelData PERV_tySkelTab[PERV_TY_SKEL_NUM]; \0A\0A\00"
@.str.3 = [319 x i8] c"//pervasive type skeletons and type skeleton table initialization \0A//Note that type skeltons have to be dynamically allocated, and so does the \0A//info recorded in each entry of the pervasive type skeleton table \0Avoid PERV_tySkelTabInit(); \0A\0A\00"
@.str.4 = [159 x i8] c"//pervasive tyskel table copy function \0Avoid PERV_copyTySkelTab(PERV_TySkelData* dst); \0A\0A\00"
define i8* @C_mkTySkelsH(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call i64 @strlen(i8* getelementptr inbounds ([239 x i8], [239 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = add i64 %5, %7
%9 = call i64 @strlen(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.1, i64 0, i64 0))
%10 = add i64 %8, %9
%11 = call i64 @strlen(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.2, i64 0, i64 0))
%12 = add i64 %10, %11
%13 = call i64 @strlen(i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str.3, i64 0, i64 0))
%14 = add i64 %12, %13
%15 = call i64 @strlen(i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.4, i64 0, i64 0))
%16 = add i64 %14, %15
store i64 %16, i64* %3
%17 = load i64, i64* %3
%18 = call i8* @UTIL_mallocStr(i64 %17)
store i8* %18, i8** %4
%19 = load i8*, i8** %4
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([239 x i8], [239 x i8]* @.str, i64 0, i64 0))
%21 = load i8*, i8** %4
%22 = load i8*, i8** %2
%23 = call i32 @strcat(i8* %21, i8* %22)
%24 = load i8*, i8** %4
%25 = call i32 @strcat(i8* %24, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.1, i64 0, i64 0))
%26 = load i8*, i8** %4
%27 = call i32 @strcat(i8* %26, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.2, i64 0, i64 0))
%28 = load i8*, i8** %4
%29 = call i32 @strcat(i8* %28, i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str.3, i64 0, i64 0))
%30 = load i8*, i8** %4
%31 = call i32 @strcat(i8* %30, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.4, i64 0, i64 0))
%32 = load i8*, i8** %4
ret i8* %32
}

LLVM IR (-O2):
@.str = [239 x i8] c"/***************************************************************************/\0A/* TYPE SKELETIONS FOR PERVASIVE CONSTANTS */ \0A/****************************************************************************/\0A\0A\00"
@.str.1 = [159 x i8] c"//pervasive type skel data type \0Atypedef DF_TypePtr PERV_TySkelData; \0A\0A\00"
@.str.2 = [159 x i8] c"//pervasive type skel table (array) \0Aextern PERV_TySkelData PERV_tySkelTab[PERV_TY_SKEL_NUM]; \0A\0A\00"
@.str.3 = [319 x i8] c"//pervasive type skeletons and type skeleton table initialization \0A//Note that type skeltons have to be dynamically allocated, and so does the \0A//info recorded in each entry of the pervasive type skeleton table \0Avoid PERV_tySkelTabInit(); \0A\0A\00"
@.str.4 = [159 x i8] c"//pervasive tyskel table copy function \0Avoid PERV_copyTySkelTab(PERV_TySkelData* dst); \0A\0A\00"
define i8* @C_mkTySkelsH(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1030
%4 = tail call i8* @UTIL_mallocStr(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([239 x i8], [239 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* %4, i8* %0)
%7 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([319 x i8], [319 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @strcat(i8* %4, i8* getelementptr inbounds ([159 x i8], [159 x i8]* @.str.4, i64 0, i64 0))
ret i8* %4
}