#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ get_file_data(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rename(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void file_merger(char *fname_old1, char *fname_old2) {
  FILE *fp1;
  FILE *fp2;
  FILE *fp3;
  char path_orig1[100] = "../../POCKETFILES/";
  char path_orig2[100] = "../../POCKETFILES/";
  char path_orig3[100] = "../../POCKETFILES/";
  char path_orig_new[100] = "../../POCKETFILES/";
  char fname_new_copy[15];
  char fname_new[19];
  char path_backup1[100] = "../../POCKETFILES_BACKUP/";
  char path_backup2[100] = "../../POCKETFILES_BACKUP/";
  printf("\n\nfile merge start....");
  strcpy(fname_new, fname_old2);
  strcpy(fname_new_copy, fname_new);
  strcat(fname_new, "_new");
  strcat(path_orig1, fname_old1);
  strcat(path_orig2, fname_old2);
  strcat(path_orig3, fname_new);
  printf("\n\nopening older file from  : %s", path_orig1);
  fp1 = fopen(path_orig1, "rb");
  printf("\nopening latest file from : %s", path_orig2);
  fp2 = fopen(path_orig2, "rb");
  fp3 = fopen(path_orig3, "wb");
  printf("\n\ncreated new merge file at location : %s", path_orig3);
  get_file_data(fp1, fp2, fp3);
  printf("\nfilled merge file with merged data.");
  fclose(fp1);
  fclose(fp2);
  fclose(fp3);
  strcat(path_backup1, fname_old1);
  strcat(path_backup2, fname_old2);
  strcat(path_orig_new, fname_new_copy);
  rename(path_orig1, path_backup1);
  rename(path_orig2, path_backup2);
  printf("\n\nmoving original files.\nlocation : %s\nlocation : %s\n",
         path_backup1, path_backup2);
  rename(path_orig3, path_orig_new);
  printf("\nrenaming %s to %s\n", path_orig3, path_orig_new);
  printf("\nfile merge complete.\n\n");
}


x86 assembly (clang, -O0):
<file_merger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xe5f(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    -0x100(%rbp),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    -0x170(%rbp),%rdi
lea    0xf0f(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    -0x1e0(%rbp),%rdi
lea    0xf67(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    -0x280(%rbp),%rdi
lea    0xfbf(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    -0x2f0(%rbp),%rdi
lea    0x1017(%rip),%rsi
mov    $0x64,%edx
call   1060 <memcpy@plt>
lea    0x106a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x1ef(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x210(%rbp),%rdi
lea    0x1049(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x100(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x170(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x90(%rbp),%rsi
lea    0x1008(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x90(%rbp),%rdi
lea    0x1013(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    -0x100(%rbp),%rsi
lea    0xfff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x100(%rbp),%rdi
lea    0xfe7(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    -0x170(%rbp),%rdi
lea    0xff2(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
lea    -0x170(%rbp),%rsi
lea    0xfde(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   10a0 <get_file_data@plt>
lea    0xfe9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
lea    -0x280(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x2f0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x1e0(%rbp),%rdi
lea    -0x1ef(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x90(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1080 <rename@plt>
lea    -0x100(%rbp),%rdi
lea    -0x2f0(%rbp),%rsi
call   1080 <rename@plt>
lea    -0x280(%rbp),%rsi
lea    -0x2f0(%rbp),%rdx
lea    0xf7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x170(%rbp),%rdi
lea    -0x1e0(%rbp),%rsi
call   1080 <rename@plt>
lea    -0x170(%rbp),%rsi
lea    -0x1e0(%rbp),%rdx
lea    0xf85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x2f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_merger>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2d8,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rdi,0x8(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xe8e(%rip),%xmm1
movaps %xmm1,0xd0(%rsp)
movaps 0xe6f(%rip),%xmm2
movaps %xmm2,0xc0(%rsp)
movaps 0xe50(%rip),%xmm3
movaps %xmm3,0xb0(%rsp)
movaps 0xe31(%rip),%xmm4
movaps %xmm4,0xa0(%rsp)
movaps 0xe12(%rip),%xmm5
movaps %xmm5,0x90(%rsp)
movl   $0x0,0xf0(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm1,0x60(%rsp)
movaps %xmm2,0x50(%rsp)
movaps %xmm3,0x40(%rsp)
movaps %xmm4,0x30(%rsp)
movaps %xmm5,0x20(%rsp)
movl   $0x0,0x80(%rsp)
movaps %xmm0,0x2a0(%rsp)
movaps %xmm1,0x290(%rsp)
movaps %xmm2,0x280(%rsp)
movaps %xmm3,0x270(%rsp)
movaps %xmm4,0x260(%rsp)
movaps %xmm5,0x250(%rsp)
movl   $0x0,0x2b0(%rsp)
movaps %xmm0,0x230(%rsp)
movaps %xmm1,0x220(%rsp)
movaps %xmm2,0x210(%rsp)
movaps %xmm3,0x200(%rsp)
movaps %xmm4,0x1f0(%rsp)
movaps %xmm5,0x1e0(%rsp)
movl   $0x0,0x240(%rsp)
movaps 0xe19(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xdfa(%rip),%xmm1
movaps %xmm1,0x1b0(%rsp)
movaps 0xddb(%rip),%xmm2
movaps %xmm2,0x1a0(%rsp)
movaps 0xdbc(%rip),%xmm3
movaps %xmm3,0x190(%rsp)
movaps 0xd9d(%rip),%xmm4
movaps %xmm4,0x180(%rsp)
movaps 0xd7e(%rip),%xmm5
movaps %xmm5,0x170(%rsp)
movl   $0x0,0x1d0(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm1,0x140(%rsp)
movaps %xmm2,0x130(%rsp)
movaps %xmm3,0x120(%rsp)
movaps %xmm4,0x110(%rsp)
movaps %xmm5,0x100(%rsp)
movl   $0x0,0x160(%rsp)
lea    0xd8d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x2c0(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0x11(%rsp),%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
lea    0xd76(%rip),%rsi
mov    %rbp,%rdi
call   1090 <strcat@plt>
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <strcat@plt>
lea    0x20(%rsp),%r13
mov    %r13,%rdi
mov    %r15,%rsi
call   1090 <strcat@plt>
lea    0x250(%rsp),%r14
mov    %r14,%rdi
mov    %rbp,%rsi
call   1090 <strcat@plt>
lea    0xd36(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd45(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <fopen@plt>
mov    %rax,%r12
lea    0xd33(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1070 <fopen@plt>
mov    %rax,%rbp
lea    0xd33(%rip),%rsi
mov    %r14,%rdi
call   1070 <fopen@plt>
mov    %rax,%r13
lea    0xd24(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
call   10a0 <get_file_data@plt>
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    %r13,%rdi
call   1050 <fclose@plt>
lea    0x170(%rsp),%rbx
mov    %rbx,%rdi
mov    0x8(%rsp),%rsi
call   1090 <strcat@plt>
lea    0x100(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
call   1090 <strcat@plt>
lea    0x1e0(%rsp),%r15
mov    %r15,%rdi
lea    0x11(%rsp),%rsi
call   1090 <strcat@plt>
lea    0x90(%rsp),%rdi
mov    %rbx,%rsi
call   1080 <rename@plt>
lea    0x20(%rsp),%rdi
mov    %rbp,%rsi
call   1080 <rename@plt>
lea    0xcd4(%rip),%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1080 <rename@plt>
lea    0xceb(%rip),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xceb(%rip),%rdi
call   1040 <puts@plt>
add    $0x2d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.file_merger.path_orig1 = [100 x i8] c"../../POCKETFILES/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_orig2 = [100 x i8] c"../../POCKETFILES/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_orig3 = [100 x i8] c"../../POCKETFILES/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_orig_new = [100 x i8] c"../../POCKETFILES/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_backup1 = [100 x i8] c"../../POCKETFILES_BACKUP/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_backup2 = [100 x i8] c"../../POCKETFILES_BACKUP/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [23 x i8] c"\0A\0Afile merge start....\00"
@.str.1 = [5 x i8] c"_new\00"
@.str.2 = [32 x i8] c"\0A\0Aopening older file from : %s\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [31 x i8] c"\0Aopening latest file from : %s\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [42 x i8] c"\0A\0Acreated new merge file at location : %s\00"
@.str.7 = [37 x i8] c"\0Afilled merge file with merged data.\00"
@.str.8 = [54 x i8] c"\0A\0Amoving original files.\0Alocation : %s\0Alocation : %s\0A\00"
@.str.9 = [20 x i8] c"\0Arenaming %s to %s\0A\00"
@.str.10 = [24 x i8] c"\0Afile merge complete.\0A\0A\00"
define void @file_merger(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca [100 x i8]
%12 = alloca [15 x i8]
%13 = alloca [19 x i8]
%14 = alloca [100 x i8]
%15 = alloca [100 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%16 = bitcast [100 x i8]* %8 to i8*
%17 = bitcast [100 x i8]* %9 to i8*
%18 = bitcast [100 x i8]* %10 to i8*
%19 = bitcast [100 x i8]* %11 to i8*
%20 = bitcast [100 x i8]* %14 to i8*
%21 = bitcast [100 x i8]* %15 to i8*
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%23 = getelementptr inbounds [19 x i8], [19 x i8]* %13, i64 0, i64 0
%24 = load i8*, i8** %4
%25 = call i32 @strcpy(i8* %23, i8* %24)
%26 = getelementptr inbounds [15 x i8], [15 x i8]* %12, i64 0, i64 0
%27 = getelementptr inbounds [19 x i8], [19 x i8]* %13, i64 0, i64 0
%28 = call i32 @strcpy(i8* %26, i8* %27)
%29 = getelementptr inbounds [19 x i8], [19 x i8]* %13, i64 0, i64 0
%30 = call i32 @strcat(i8* %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%32 = load i8*, i8** %3
%33 = call i32 @strcat(i8* %31, i8* %32)
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%35 = load i8*, i8** %4
%36 = call i32 @strcat(i8* %34, i8* %35)
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%38 = getelementptr inbounds [19 x i8], [19 x i8]* %13, i64 0, i64 0
%39 = call i32 @strcat(i8* %37, i8* %38)
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %40)
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%43 = call i32* @fopen(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %43, i32** %5
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %44)
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
store i32* %47, i32** %6
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%49 = call i32* @fopen(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i32* %49, i32** %7
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %50)
%52 = load i32*, i32** %5
%53 = load i32*, i32** %6
%54 = load i32*, i32** %7
%55 = call i32 @get_file_data(i32* %52, i32* %53, i32* %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0))
%57 = load i32*, i32** %5
%58 = call i32 @fclose(i32* %57)
%59 = load i32*, i32** %6
%60 = call i32 @fclose(i32* %59)
%61 = load i32*, i32** %7
%62 = call i32 @fclose(i32* %61)
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%64 = load i8*, i8** %3
%65 = call i32 @strcat(i8* %63, i8* %64)
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%67 = load i8*, i8** %4
%68 = call i32 @strcat(i8* %66, i8* %67)
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%70 = getelementptr inbounds [15 x i8], [15 x i8]* %12, i64 0, i64 0
%71 = call i32 @strcat(i8* %69, i8* %70)
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%73 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%74 = call i32 @rename(i8* %72, i8* %73)
%75 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%77 = call i32 @rename(i8* %75, i8* %76)
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%79 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* %78, i8* %79)
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%82 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%83 = call i32 @rename(i8* %81, i8* %82)
%84 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%85 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %84, i8* %85)
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.file_merger.path_orig_new = [100 x i8] c"../../POCKETFILES/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.file_merger.path_backup2 = [100 x i8] c"../../POCKETFILES_BACKUP/\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [23 x i8] c"\0A\0Afile merge start....\00"
@.str.1 = [5 x i8] c"_new\00"
@.str.2 = [32 x i8] c"\0A\0Aopening older file from : %s\00"
@.str.3 = [3 x i8] c"rb\00"
@.str.4 = [31 x i8] c"\0Aopening latest file from : %s\00"
@.str.5 = [3 x i8] c"wb\00"
@.str.6 = [42 x i8] c"\0A\0Acreated new merge file at location : %s\00"
@.str.7 = [37 x i8] c"\0Afilled merge file with merged data.\00"
@.str.8 = [54 x i8] c"\0A\0Amoving original files.\0Alocation : %s\0Alocation : %s\0A\00"
@.str.9 = [20 x i8] c"\0Arenaming %s to %s\0A\00"
@str = [23 x i8] c"\0Afile merge complete.\0A\00"
define void @file_merger(i8* %0, i8* %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [15 x i8]
%8 = alloca [19 x i8]
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [19 x i8], [19 x i8]* %8, i64 0, i64 0
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @strcpy(i8* %16, i8* %1)
%21 = call i32 @strcpy(i8* %15, i8* %16)
%22 = call i32 @strcat(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 @strcat(i8* %11, i8* %0)
%24 = call i32 @strcat(i8* %12, i8* %1)
%25 = call i32 @strcat(i8* %13, i8* %16)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%27 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %12)
%29 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32* @fopen(i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* %13)
%32 = call i32 @get_file_data(i32* %27, i32* %29, i32* %30)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0))
%34 = call i32 @fclose(i32* %27)
%35 = call i32 @fclose(i32* %29)
%36 = call i32 @fclose(i32* %30)
%37 = call i32 @strcat(i8* %17, i8* %0)
%38 = call i32 @strcat(i8* %18, i8* %1)
%39 = call i32 @strcat(i8* %14, i8* %15)
%40 = call i32 @rename(i8* %11, i8* %17)
%41 = call i32 @rename(i8* %12, i8* %18)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i8* %17, i8* %18)
%43 = call i32 @rename(i8* %13, i8* %14)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i8* %13, i8* %14)
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}