void convert_nonman_hwypm(char *binaryFilesDirectory, char *tppFilesDirectory,
                          char *tppFileName) {
  void combineBinaryTablesInTpplusFile(char **binaryFileNames,
                                       char *tppFileName, int ntables);
  int i;
  int nTables = 4;
  char **binaryFileNames;
  char fileName[1024];
  strcpy(fileName, tppFilesDirectory);
  strcat(fileName, tppFileName);
  binaryFileNames = (char **)calloc(nTables, sizeof(char *));
  for (i = 0; i < nTables; i++)
    binaryFileNames[i] = (char *)calloc(1024, sizeof(char));
  strcpy(binaryFileNames[0], binaryFilesDirectory);
  strcat(binaryFileNames[0], "\\nonman_sov_pm.binary");
  strcpy(binaryFileNames[1], binaryFilesDirectory);
  strcat(binaryFileNames[1], "\\nonman_hov_pm.binary");
  strcpy(binaryFileNames[2], binaryFilesDirectory);
  strcat(binaryFileNames[2], "\\nonman_sov_pm_veh.binary");
  strcpy(binaryFileNames[3], binaryFilesDirectory);
  strcat(binaryFileNames[3], "\\nonman_hov_pm_veh.binary");
  combineBinaryTablesInTpplusFile(binaryFileNames, fileName, nTables);
  for (i = 0; i < nTables; i++)
    free(binaryFileNames[i]);
  free(binaryFileNames);
}


x86 assembly (clang, -O0):
<convert_nonman_hwypm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x4,-0x20(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x430(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1070 <strcat@plt>
movslq -0x20(%rbp),%rdi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11df <convert_nonman_hwypm+0x8f>
mov    $0x400,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rdx
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a7 <convert_nonman_hwypm+0x57>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
lea    0xe03(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf4(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xde5(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xdda(%rip),%rsi
call   1070 <strcat@plt>
mov    -0x28(%rbp),%rdi
lea    -0x430(%rbp),%rsi
mov    -0x20(%rbp),%edx
call   1060 <combineBinaryTablesInTpplusFile@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12b6 <convert_nonman_hwypm+0x166>
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    128b <convert_nonman_hwypm+0x13b>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_nonman_hwypm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rdx,%rbx
mov    %rdi,%r15
mov    %rsp,%rbp
mov    %rbp,%rdi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
mov    $0x4,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r13
mov    $0x400,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%r14
mov    %rax,0x0(%r13)
mov    $0x400,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%rbp
mov    %rax,0x8(%r13)
mov    $0x400,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%rbx
mov    %rax,0x10(%r13)
mov    $0x400,%edi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,%r12
mov    %rax,0x18(%r13)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
movabs $0x7972616e69622e,%rcx
mov    %rcx,0xe(%r14,%rax,1)
movups 0xde0(%rip),%xmm0
movups %xmm0,(%r14,%rax,1)
mov    %rbp,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1050 <strlen@plt>
movabs $0x7972616e69622e,%rcx
mov    %rcx,0xe(%rbp,%rax,1)
movups 0xdc8(%rip),%xmm0
movups %xmm0,0x0(%rbp,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
movups 0xdbf(%rip),%xmm0
movups %xmm0,(%rbx,%rax,1)
movups 0xdbe(%rip),%xmm0
movups %xmm0,0xa(%rbx,%rax,1)
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
call   1050 <strlen@plt>
movups 0xdaf(%rip),%xmm0
movups %xmm0,(%r12,%rax,1)
movups 0xdad(%rip),%xmm0
movups %xmm0,0xa(%r12,%rax,1)
mov    %r13,%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1070 <combineBinaryTablesInTpplusFile@plt>
mov    0x0(%r13),%rdi
call   1030 <free@plt>
mov    0x8(%r13),%rdi
call   1030 <free@plt>
mov    0x10(%r13),%rdi
call   1030 <free@plt>
mov    0x18(%r13),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\\nonman_sov_pm.binary\00"
@.str.1 = [22 x i8] c"\\nonman_hov_pm.binary\00"
@.str.2 = [26 x i8] c"\\nonman_sov_pm_veh.binary\00"
@.str.3 = [26 x i8] c"\\nonman_hov_pm_veh.binary\00"
define void @convert_nonman_hwypm(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8**
%10 = alloca [1024 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i32 4, i32* %8
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%12 = load i8*, i8** %5
%13 = call i8* @strcpy(i8* %11, i8* %12)
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%15 = load i8*, i8** %6
%16 = call i8* @strcat(i8* %14, i8* %15)
%17 = load i32, i32* %8
%18 = sext i32 %17 to i64
%19 = call i8* @calloc(i64 %18, i64 8)
%20 = bitcast i8* %19 to i8**
store i8** %20, i8*** %9
store i32 0, i32* %7
br label %21
21: ; preds = %31, %3
%22 = load i32, i32* %7
%23 = load i32, i32* %8
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %34
25: ; preds = %21
%26 = call i8* @calloc(i64 1024, i64 1)
%27 = load i8**, i8*** %9
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
store i8* %26, i8** %30
br label %31
31: ; preds = %25
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
br label %21
34: ; preds = %21
%35 = load i8**, i8*** %9
%36 = getelementptr inbounds i8*, i8** %35, i64 0
%37 = load i8*, i8** %36
%38 = load i8*, i8** %4
%39 = call i8* @strcpy(i8* %37, i8* %38)
%40 = load i8**, i8*** %9
%41 = getelementptr inbounds i8*, i8** %40, i64 0
%42 = load i8*, i8** %41
%43 = call i8* @strcat(i8* %42, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%44 = load i8**, i8*** %9
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = load i8*, i8** %4
%48 = call i8* @strcpy(i8* %46, i8* %47)
%49 = load i8**, i8*** %9
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i8* @strcat(i8* %51, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%53 = load i8**, i8*** %9
%54 = getelementptr inbounds i8*, i8** %53, i64 2
%55 = load i8*, i8** %54
%56 = load i8*, i8** %4
%57 = call i8* @strcpy(i8* %55, i8* %56)
%58 = load i8**, i8*** %9
%59 = getelementptr inbounds i8*, i8** %58, i64 2
%60 = load i8*, i8** %59
%61 = call i8* @strcat(i8* %60, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%62 = load i8**, i8*** %9
%63 = getelementptr inbounds i8*, i8** %62, i64 3
%64 = load i8*, i8** %63
%65 = load i8*, i8** %4
%66 = call i8* @strcpy(i8* %64, i8* %65)
%67 = load i8**, i8*** %9
%68 = getelementptr inbounds i8*, i8** %67, i64 3
%69 = load i8*, i8** %68
%70 = call i8* @strcat(i8* %69, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%71 = load i8**, i8*** %9
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%73 = load i32, i32* %8
store i32 0, i32* %7
br label %74
74: ; preds = %84, %34
%75 = load i32, i32* %7
%76 = load i32, i32* %8
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %87
78: ; preds = %74
%79 = load i8**, i8*** %9
%80 = load i32, i32* %7
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8*, i8** %79, i64 %81
%83 = load i8*, i8** %82
br label %84
84: ; preds = %78
%85 = load i32, i32* %7
%86 = add nsw i32 %85, 1
store i32 %86, i32* %7
br label %74
87: ; preds = %74
%88 = load i8**, i8*** %9
%89 = bitcast i8** %88 to i8*
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\\nonman_sov_pm.binary\00"
@.str.1 = [22 x i8] c"\\nonman_hov_pm.binary\00"
@.str.2 = [26 x i8] c"\\nonman_sov_pm_veh.binary\00"
@.str.3 = [26 x i8] c"\\nonman_hov_pm_veh.binary\00"
define void @convert_nonman_hwypm(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i8* @strcpy(i8* %5, i8* dereferenceable(1) %1)
%7 = call i8* @strcat(i8* %5, i8* dereferenceable(1) %2)
%8 = call dereferenceable_or_null(32) i8* @calloc(i64 4, i64 8)
%9 = bitcast i8* %8 to i8**
%10 = call dereferenceable_or_null(1024) i8* @calloc(i64 1024, i64 1)
store i8* %10, i8** %9
%11 = call dereferenceable_or_null(1024) i8* @calloc(i64 1024, i64 1)
%12 = getelementptr inbounds i8*, i8** %9, i64 1
store i8* %11, i8** %12
%13 = call dereferenceable_or_null(1024) i8* @calloc(i64 1024, i64 1)
%14 = getelementptr inbounds i8*, i8** %9, i64 2
store i8* %13, i8** %14
%15 = call dereferenceable_or_null(1024) i8* @calloc(i64 1024, i64 1)
%16 = getelementptr inbounds i8*, i8** %9, i64 3
store i8* %15, i8** %16
%17 = call i8* @strcpy(i8* dereferenceable(1) %10, i8* dereferenceable(1) %0)
%18 = call i64 @strlen(i8* dereferenceable(1) %10)
%19 = getelementptr i8, i8* %10, i64 %18
%20 = call i8* @strcpy(i8* dereferenceable(1) %11, i8* dereferenceable(1) %0)
%21 = call i64 @strlen(i8* dereferenceable(1) %11)
%22 = getelementptr i8, i8* %11, i64 %21
%23 = call i8* @strcpy(i8* dereferenceable(1) %13, i8* dereferenceable(1) %0)
%24 = call i64 @strlen(i8* dereferenceable(1) %13)
%25 = getelementptr i8, i8* %13, i64 %24
%26 = call i8* @strcpy(i8* dereferenceable(1) %15, i8* dereferenceable(1) %0)
%27 = call i64 @strlen(i8* dereferenceable(1) %15)
%28 = getelementptr i8, i8* %15, i64 %27
%29 = load i8*, i8** %9
%30 = load i8*, i8** %12
%31 = load i8*, i8** %14
%32 = load i8*, i8** %16
ret void
}