#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
size_t fwrite(char *, int, size_t, int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ munmap(char *, size_t);
int rs_mmap(char *, char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int copy_file(char *from_dir, char *filename, char *to_dir) {
  int status = 0;
  char *buf1 = NULL;
  char *X1 = NULL;
  size_t nX1 = 0;
  char *buf2 = NULL;
  FILE *fp2 = NULL;
  size_t nw = 0;
  if ((from_dir == NULL) || (*from_dir == '\0')) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 613,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if ((to_dir == NULL) || (*to_dir == '\0')) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 614,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (strcmp(from_dir, to_dir) == 0) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 615,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  int len1 = strlen(from_dir) + strlen(filename) + 8;
  buf1 = malloc(len1 * sizeof(char));
  {
    if (buf1 == NULL) {
      fprintf(stderr, "Unable to allocate memory\n");
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 618,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                  "heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
        };
        status = -1;
        goto BYE;
      };
    }
  };
  strcpy(buf1, from_dir);
  len1 = strlen(buf1);
  if (buf1[len1 - 1] != '/') {
    strcat(buf1, "/");
  }
  strcat(buf1, filename);
  status = rs_mmap(buf1, &X1, &nX1, 0);
  {
    if ((status) < 0) {
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 622,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                  "heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
        };
        status = (status);
        goto BYE;
      }
    }
  };
  if (X1 == NULL) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 623,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  if (nX1 == 0) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 624,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  int len2 = strlen(to_dir) + strlen(filename) + 8;
  buf2 = malloc(len2 * sizeof(char));
  {
    if (buf2 == NULL) {
      fprintf(stderr, "Unable to allocate memory\n");
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 627,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                  "heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
        };
        status = -1;
        goto BYE;
      };
    }
  };
  strcpy(buf2, to_dir);
  len2 = strlen(buf2);
  if (buf2[len2 - 1] != '/') {
    strcat(buf2, "/");
  }
  strcat(buf2, filename);
  if (strcmp(buf1, buf2) == 0) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 632,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  fp2 = fopen(buf2, "wb");
  {
    if (fp2 == NULL) {
      fprintf(stderr, "Unable to open file %s for %s \n", buf2, "wb");
      {
        {
          fprintf(stderr, "Line %3d of File %s \n", 634,
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/"
                  "heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
        };
        status = -1;
        goto BYE;
      };
    }
  };
  nw = fwrite(X1, sizeof(char), nX1, fp2);
  if (nw != nX1) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 637,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
BYE : {
  if ((X1 == NULL) && (nX1 != 0)) {
    {
      fprintf(stderr, "Line %3d of File %s \n", 640,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/"
              "DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
    };
    return (-1);
  }
  if ((X1 != NULL) && (nX1 == 0)) {
    {
      fprintf(stderr, "Line %3d of File %s \n", 640,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/"
              "DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
    };
    return (-1);
  }
  if (X1 != NULL) {
    munmap(X1, nX1);
    X1 = NULL;
    nX1 = 0;
  }
};
  {
    if ((fp2) != NULL) {
      fclose((fp2));
      (fp2) = NULL;
    }
  };
  {
    if ((buf1) != NULL) {
      free((buf1));
      (buf1) = NULL;
    }
  };
  {
    if ((buf2) != NULL) {
      free((buf2));
      (buf2) = NULL;
    }
  };
  return status;
}


x86 assembly (clang, -O0):
<copy_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1226 <copy_file+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1255 <copy_file+0x95>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
lea    0xdca(%rip),%rsi
mov    $0x265,%edx
lea    0xdd4(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
cmpq   $0x0,-0x20(%rbp)
je     1270 <copy_file+0xb0>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    129f <copy_file+0xdf>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
lea    0xd80(%rip),%rsi
mov    $0x266,%edx
lea    0xd8a(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12e5 <copy_file+0x125>
mov    0x2d23(%rip),%rax
mov    (%rax),%edi
lea    0xd3a(%rip),%rsi
mov    $0x267,%edx
lea    0xd44(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
add    %ecx,%eax
add    $0x8,%eax
mov    %eax,-0x5c(%rbp)
movslq -0x5c(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    136b <copy_file+0x1ab>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
lea    0xd88(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2c9d(%rip),%rax
mov    (%rax),%edi
lea    0xcb4(%rip),%rsi
mov    $0x26a,%edx
lea    0xcbe(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     13ae <copy_file+0x1ee>
mov    -0x30(%rbp),%rdi
lea    0xd2f(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10d0 <strcat@plt>
mov    -0x30(%rbp),%rdi
lea    -0x38(%rbp),%rsi
lea    -0x40(%rbp),%rdx
xor    %ecx,%ecx
call   10a0 <rs_mmap@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1409 <copy_file+0x249>
mov    0x2bfe(%rip),%rax
mov    (%rax),%edi
lea    0xc15(%rip),%rsi
mov    $0x26e,%edx
lea    0xc1f(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
cmpq   $0x0,-0x38(%rbp)
jne    1443 <copy_file+0x283>
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
lea    0xbdc(%rip),%rsi
mov    $0x26f,%edx
lea    0xbe6(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
cmpq   $0x0,-0x40(%rbp)
jne    147d <copy_file+0x2bd>
mov    0x2b8b(%rip),%rax
mov    (%rax),%edi
lea    0xba2(%rip),%rsi
mov    $0x270,%edx
lea    0xbac(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x20(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x68(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
add    %ecx,%eax
add    $0x8,%eax
mov    %eax,-0x60(%rbp)
movslq -0x60(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1503 <copy_file+0x343>
mov    0x2b1c(%rip),%rax
mov    (%rax),%edi
lea    0xbf0(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x2b05(%rip),%rax
mov    (%rax),%edi
lea    0xb1c(%rip),%rsi
mov    $0x273,%edx
lea    0xb26(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x48(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x60(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     1546 <copy_file+0x386>
mov    -0x48(%rbp),%rdi
lea    0xb97(%rip),%rsi
call   10d0 <strcat@plt>
mov    -0x48(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10d0 <strcat@plt>
mov    -0x30(%rbp),%rdi
mov    -0x48(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1599 <copy_file+0x3d9>
mov    0x2a6f(%rip),%rax
mov    (%rax),%edi
lea    0xa86(%rip),%rsi
mov    $0x278,%edx
lea    0xa90(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x48(%rbp),%rdi
lea    0xb36(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    1609 <copy_file+0x449>
mov    0x2a21(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%rdx
lea    0xb11(%rip),%rsi
lea    0xb07(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    0x29ff(%rip),%rax
mov    (%rax),%edi
lea    0xa16(%rip),%rsi
mov    $0x27a,%edx
lea    0xa20(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    $0x1,%esi
call   10e0 <fwrite@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x40(%rbp),%rax
je     1660 <copy_file+0x4a0>
mov    0x29a8(%rip),%rax
mov    (%rax),%edi
lea    0x9bf(%rip),%rsi
mov    $0x27d,%edx
lea    0x9c9(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x24(%rbp)
jmp    1665 <copy_file+0x4a5>
jmp    1665 <copy_file+0x4a5>
cmpq   $0x0,-0x38(%rbp)
jne    16aa <copy_file+0x4ea>
cmpq   $0x0,-0x40(%rbp)
je     16aa <copy_file+0x4ea>
mov    0x295e(%rip),%rax
mov    (%rax),%edi
lea    0x975(%rip),%rsi
mov    $0x280,%edx
lea    0x97f(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1771 <copy_file+0x5b1>
cmpq   $0x0,-0x38(%rbp)
je     16ef <copy_file+0x52f>
cmpq   $0x0,-0x40(%rbp)
jne    16ef <copy_file+0x52f>
mov    0x2919(%rip),%rax
mov    (%rax),%edi
lea    0x930(%rip),%rsi
mov    $0x280,%edx
lea    0x93a(%rip),%rcx
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1771 <copy_file+0x5b1>
cmpq   $0x0,-0x38(%rbp)
je     1717 <copy_file+0x557>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
call   10b0 <munmap@plt>
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x0,-0x50(%rbp)
je     1733 <copy_file+0x573>
mov    -0x50(%rbp),%rdi
call   1050 <fclose@plt>
movq   $0x0,-0x50(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     174f <copy_file+0x58f>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x30(%rbp)
cmpq   $0x0,-0x48(%rbp)
je     176b <copy_file+0x5ab>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x48(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_file>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
test   %rdi,%rdi
je     1381 <copy_file+0x1c1>
mov    %rdi,%rbp
cmpb   $0x0,(%rdi)
je     1381 <copy_file+0x1c1>
mov    %rdx,%rbx
test   %rdx,%rdx
je     13a2 <copy_file+0x1e2>
cmpb   $0x0,(%rbx)
je     13a2 <copy_file+0x1e2>
mov    %rsi,%r12
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     146a <copy_file+0x2aa>
mov    %rbp,%rdi
call   1060 <strlen@plt>
mov    %eax,%r14d
mov    %r12,%rdi
call   1060 <strlen@plt>
lea    (%r14,%rax,1),%edi
add    $0x8,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     148e <copy_file+0x2ce>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%r14,1)
je     1275 <copy_file+0xb5>
lea    0xe6b(%rip),%rsi
mov    %r14,%rdi
call   10d0 <strcat@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   10d0 <strcat@plt>
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %ecx,%ecx
call   10a0 <rs_mmap@plt>
mov    %eax,%ebp
test   %eax,%eax
js     14c2 <copy_file+0x302>
cmpq   $0x0,0x8(%rsp)
je     14ed <copy_file+0x32d>
cmpq   $0x0,(%rsp)
je     150e <copy_file+0x34e>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    %eax,%r15d
mov    %r12,%rdi
call   1060 <strlen@plt>
lea    (%r15,%rax,1),%edi
add    $0x8,%edi
call   1090 <malloc@plt>
test   %rax,%rax
je     152f <copy_file+0x36f>
mov    %rax,%r15
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rax,%r15,1)
je     130a <copy_file+0x14a>
lea    0xdd6(%rip),%rsi
mov    %r15,%rdi
call   10d0 <strcat@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   10d0 <strcat@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     156f <copy_file+0x3af>
lea    0xdaa(%rip),%rsi
mov    %r15,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     158f <copy_file+0x3cf>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
mov    (%rsp),%rdx
mov    $0x1,%esi
mov    %rax,%rcx
call   10e0 <fwrite@plt>
cmp    (%rsp),%rax
je     13d2 <copy_file+0x212>
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
lea    0xc90(%rip),%rsi
lea    0xc9f(%rip),%rcx
mov    $0x27d,%edx
jmp    15c9 <copy_file+0x409>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
lea    0xc6f(%rip),%rsi
lea    0xc7e(%rip),%rcx
xor    %r14d,%r14d
mov    $0x265,%edx
jmp    13c1 <copy_file+0x201>
mov    0x2c37(%rip),%rax
mov    (%rax),%edi
lea    0xc4e(%rip),%rsi
lea    0xc5d(%rip),%rcx
xor    %r14d,%r14d
mov    $0x266,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
xor    %r15d,%r15d
xor    %ebx,%ebx
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
test   %rdi,%rdi
jne    13e5 <copy_file+0x225>
test   %rsi,%rsi
jne    13ef <copy_file+0x22f>
test   %rdi,%rdi
je     1426 <copy_file+0x266>
test   %rsi,%rsi
jne    1426 <copy_file+0x266>
mov    0x2bea(%rip),%rax
mov    (%rax),%edi
lea    0xc01(%rip),%rsi
lea    0xc10(%rip),%rcx
mov    $0x280,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
test   %rdi,%rdi
je     1441 <copy_file+0x281>
call   10b0 <munmap@plt>
movq   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
test   %rbx,%rbx
je     144e <copy_file+0x28e>
mov    %rbx,%rdi
call   1050 <fclose@plt>
test   %r14,%r14
je     145b <copy_file+0x29b>
mov    %r14,%rdi
call   1030 <free@plt>
test   %r15,%r15
je     1417 <copy_file+0x257>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    1417 <copy_file+0x257>
mov    0x2b6f(%rip),%rax
mov    (%rax),%edi
lea    0xb86(%rip),%rsi
lea    0xb95(%rip),%rcx
xor    %r14d,%r14d
mov    $0x267,%edx
jmp    13c1 <copy_file+0x201>
mov    0x2b4b(%rip),%rbx
mov    (%rbx),%edi
lea    0xc1f(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%rbx),%edi
lea    0xb4f(%rip),%rsi
lea    0xb5e(%rip),%rcx
mov    $0x26a,%edx
jmp    13c1 <copy_file+0x201>
mov    0x2b17(%rip),%rax
mov    (%rax),%edi
lea    0xb2e(%rip),%rsi
lea    0xb3d(%rip),%rcx
xor    %r15d,%r15d
mov    $0x26e,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    13d0 <copy_file+0x210>
mov    0x2aec(%rip),%rax
mov    (%rax),%edi
lea    0xb03(%rip),%rsi
lea    0xb12(%rip),%rcx
xor    %r15d,%r15d
mov    $0x26f,%edx
jmp    155e <copy_file+0x39e>
mov    0x2acb(%rip),%rax
mov    (%rax),%edi
lea    0xae2(%rip),%rsi
lea    0xaf1(%rip),%rcx
xor    %r15d,%r15d
mov    $0x270,%edx
jmp    155e <copy_file+0x39e>
mov    0x2aaa(%rip),%rbx
mov    (%rbx),%edi
lea    0xb7e(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    (%rbx),%edi
lea    0xaae(%rip),%rsi
lea    0xabd(%rip),%rcx
mov    $0x273,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
jmp    13d0 <copy_file+0x210>
mov    0x2a6a(%rip),%rax
mov    (%rax),%edi
lea    0xa81(%rip),%rsi
lea    0xa90(%rip),%rcx
xor    %ebx,%ebx
mov    $0x278,%edx
jmp    15c9 <copy_file+0x409>
mov    0x2a4a(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xb3d(%rip),%rsi
lea    0xb33(%rip),%rcx
xor    %ebx,%ebx
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xa43(%rip),%rsi
lea    0xa52(%rip),%rcx
mov    $0x27a,%edx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebp
jmp    13d2 <copy_file+0x212>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
@.str.2 = [27 x i8] c"Unable to allocate memory\0A\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [32 x i8] c"Unable to open file %s for %s \0A\00"
define i32 @copy_file(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 0, i32* %8
store i8* null, i8** %9
store i8* null, i8** %10
store i64 0, i64* %11
store i8* null, i8** %12
store i32* null, i32** %13
store i64 0, i64* %14
%17 = load i8*, i8** %5
%18 = icmp eq i8* %17, null
br i1 %18, label %24, label %19
19: ; preds = %3
%20 = load i8*, i8** %5
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %19, %3
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 613, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
27: ; preds = %19
%28 = load i8*, i8** %7
%29 = icmp eq i8* %28, null
br i1 %29, label %35, label %30
30: ; preds = %27
%31 = load i8*, i8** %7
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %38
35: ; preds = %30, %27
%36 = load i32, i32* @stderr
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 614, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
38: ; preds = %30
%39 = load i8*, i8** %5
%40 = load i8*, i8** %7
%41 = call i64 @strcmp(i8* %39, i8* %40)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %38
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
46: ; preds = %38
%47 = load i8*, i8** %5
%48 = call i32 @strlen(i8* %47)
%49 = load i8*, i8** %6
%50 = call i32 @strlen(i8* %49)
%51 = add nsw i32 %48, %50
%52 = add nsw i32 %51, 8
store i32 %52, i32* %15
%53 = load i32, i32* %15
%54 = sext i32 %53 to i64
%55 = mul i64 %54, 1
%56 = trunc i64 %55 to i32
%57 = call i8* @malloc(i32 %56)
store i8* %57, i8** %9
%58 = load i8*, i8** %9
%59 = icmp eq i8* %58, null
br i1 %59, label %60, label %65
60: ; preds = %46
%61 = load i32, i32* @stderr
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 618, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
65: ; preds = %46
%66 = load i8*, i8** %9
%67 = load i8*, i8** %5
%68 = call i32 @strcpy(i8* %66, i8* %67)
%69 = load i8*, i8** %9
%70 = call i32 @strlen(i8* %69)
store i32 %70, i32* %15
%71 = load i8*, i8** %9
%72 = load i32, i32* %15
%73 = sub nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %71, i64 %74
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = icmp ne i32 %77, 47
br i1 %78, label %79, label %82
79: ; preds = %65
%80 = load i8*, i8** %9
%81 = call i32 @strcat(i8* %80, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %82
82: ; preds = %79, %65
%83 = load i8*, i8** %9
%84 = load i8*, i8** %6
%85 = call i32 @strcat(i8* %83, i8* %84)
%86 = load i8*, i8** %9
%87 = call i32 @rs_mmap(i8* %86, i8** %10, i64* %11, i32 0)
store i32 %87, i32* %8
%88 = load i32, i32* %8
%89 = icmp slt i32 %88, 0
br i1 %89, label %90, label %94
90: ; preds = %82
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 622, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
%93 = load i32, i32* %8
store i32 %93, i32* %8
br label %176
94: ; preds = %82
%95 = load i8*, i8** %10
%96 = icmp eq i8* %95, null
br i1 %96, label %97, label %100
97: ; preds = %94
%98 = load i32, i32* @stderr
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 623, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
100: ; preds = %94
%101 = load i64, i64* %11
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %106
103: ; preds = %100
%104 = load i32, i32* @stderr
%105 = call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 624, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
106: ; preds = %100
%107 = load i8*, i8** %7
%108 = call i32 @strlen(i8* %107)
%109 = load i8*, i8** %6
%110 = call i32 @strlen(i8* %109)
%111 = add nsw i32 %108, %110
%112 = add nsw i32 %111, 8
store i32 %112, i32* %16
%113 = load i32, i32* %16
%114 = sext i32 %113 to i64
%115 = mul i64 %114, 1
%116 = trunc i64 %115 to i32
%117 = call i8* @malloc(i32 %116)
store i8* %117, i8** %12
%118 = load i8*, i8** %12
%119 = icmp eq i8* %118, null
br i1 %119, label %120, label %125
120: ; preds = %106
%121 = load i32, i32* @stderr
%122 = call i32 (i32, i8*, ...) @fprintf(i32 %121, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%123 = load i32, i32* @stderr
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 627, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
125: ; preds = %106
%126 = load i8*, i8** %12
%127 = load i8*, i8** %7
%128 = call i32 @strcpy(i8* %126, i8* %127)
%129 = load i8*, i8** %12
%130 = call i32 @strlen(i8* %129)
store i32 %130, i32* %16
%131 = load i8*, i8** %12
%132 = load i32, i32* %16
%133 = sub nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8, i8* %131, i64 %134
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = icmp ne i32 %137, 47
br i1 %138, label %139, label %142
139: ; preds = %125
%140 = load i8*, i8** %12
%141 = call i32 @strcat(i8* %140, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %142
142: ; preds = %139, %125
%143 = load i8*, i8** %12
%144 = load i8*, i8** %6
%145 = call i32 @strcat(i8* %143, i8* %144)
%146 = load i8*, i8** %9
%147 = load i8*, i8** %12
%148 = call i64 @strcmp(i8* %146, i8* %147)
%149 = icmp eq i64 %148, 0
br i1 %149, label %150, label %153
150: ; preds = %142
%151 = load i32, i32* @stderr
%152 = call i32 (i32, i8*, ...) @fprintf(i32 %151, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 632, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
153: ; preds = %142
%154 = load i8*, i8** %12
%155 = call i32* @fopen(i8* %154, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %155, i32** %13
%156 = load i32*, i32** %13
%157 = icmp eq i32* %156, null
br i1 %157, label %158, label %164
158: ; preds = %153
%159 = load i32, i32* @stderr
%160 = load i8*, i8** %12
%161 = call i32 (i32, i8*, ...) @fprintf(i32 %159, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* %160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%162 = load i32, i32* @stderr
%163 = call i32 (i32, i8*, ...) @fprintf(i32 %162, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 634, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
164: ; preds = %153
%165 = load i8*, i8** %10
%166 = load i64, i64* %11
%167 = load i32*, i32** %13
%168 = call i64 @fwrite(i8* %165, i32 1, i64 %166, i32* %167)
store i64 %168, i64* %14
%169 = load i64, i64* %14
%170 = load i64, i64* %11
%171 = icmp ne i64 %169, %170
br i1 %171, label %172, label %175
172: ; preds = %164
%173 = load i32, i32* @stderr
%174 = call i32 (i32, i8*, ...) @fprintf(i32 %173, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 637, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %8
br label %176
175: ; preds = %164
br label %176
176: ; preds = %175, %172, %158, %150, %120, %103, %97, %90, %60, %43, %35, %24
%177 = load i8*, i8** %10
%178 = icmp eq i8* %177, null
br i1 %178, label %179, label %185
179: ; preds = %176
%180 = load i64, i64* %11
%181 = icmp ne i64 %180, 0
br i1 %181, label %182, label %185
182: ; preds = %179
%183 = load i32, i32* @stderr
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %183, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %221
185: ; preds = %179, %176
%186 = load i8*, i8** %10
%187 = icmp ne i8* %186, null
br i1 %187, label %188, label %194
188: ; preds = %185
%189 = load i64, i64* %11
%190 = icmp eq i64 %189, 0
br i1 %190, label %191, label %194
191: ; preds = %188
%192 = load i32, i32* @stderr
%193 = call i32 (i32, i8*, ...) @fprintf(i32 %192, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %221
194: ; preds = %188, %185
%195 = load i8*, i8** %10
%196 = icmp ne i8* %195, null
br i1 %196, label %197, label %201
197: ; preds = %194
%198 = load i8*, i8** %10
%199 = load i64, i64* %11
%200 = call i32 @munmap(i8* %198, i64 %199)
store i8* null, i8** %10
store i64 0, i64* %11
br label %201
201: ; preds = %197, %194
%202 = load i32*, i32** %13
%203 = icmp ne i32* %202, null
br i1 %203, label %204, label %207
204: ; preds = %201
%205 = load i32*, i32** %13
%206 = call i32 @fclose(i32* %205)
store i32* null, i32** %13
br label %207
207: ; preds = %204, %201
%208 = load i8*, i8** %9
%209 = icmp ne i8* %208, null
br i1 %209, label %210, label %213
210: ; preds = %207
%211 = load i8*, i8** %9
%212 = call i32 @free(i8* %211)
store i8* null, i8** %9
br label %213
213: ; preds = %210, %207
%214 = load i8*, i8** %12
%215 = icmp ne i8* %214, null
br i1 %215, label %216, label %219
216: ; preds = %213
%217 = load i8*, i8** %12
%218 = call i32 @free(i8* %217)
store i8* null, i8** %12
br label %219
219: ; preds = %216, %213
%220 = load i32, i32* %8
store i32 %220, i32* %4
br label %221
221: ; preds = %219, %191, %182
%222 = load i32, i32* %4
ret i32 %222
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
@.str.2 = [27 x i8] c"Unable to allocate memory\0A\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [3 x i8] c"wb\00"
@.str.5 = [32 x i8] c"Unable to open file %s for %s \0A\00"
define i32 @copy_file(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%7 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%8 = icmp eq i8* %0, null
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load i8, i8* %0
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9, %3
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 613, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
15: ; preds = %9
%16 = icmp eq i8* %2, null
br i1 %16, label %20, label %17
17: ; preds = %15
%18 = load i8, i8* %2
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %17, %15
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 614, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
23: ; preds = %17
%24 = tail call i64 @strcmp(i8* %0, i8* %2)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 615, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
29: ; preds = %23
%30 = tail call i32 @strlen(i8* %0)
%31 = tail call i32 @strlen(i8* %1)
%32 = add i32 %30, 8
%33 = add i32 %32, %31
%34 = tail call i8* @malloc(i32 %33)
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %41
36: ; preds = %29
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 618, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
41: ; preds = %29
%42 = tail call i32 @strcpy(i8* %34, i8* %0)
%43 = tail call i32 @strlen(i8* %34)
%44 = add nsw i32 %43, -1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %34, i64 %45
%47 = load i8, i8* %46
%48 = icmp eq i8 %47, 47
br i1 %48, label %51, label %49
49: ; preds = %41
%50 = tail call i32 @strcat(i8* %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %49, %41
%52 = tail call i32 @strcat(i8* %34, i8* %1)
%53 = call i32 @rs_mmap(i8* %34, i8** %4, i64* %5, i32 0)
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %51
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 622, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
58: ; preds = %51
%59 = load i8*, i8** %4
%60 = icmp eq i8* %59, null
br i1 %60, label %61, label %64
61: ; preds = %58
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 623, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
64: ; preds = %58
%65 = load i64, i64* %5
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = load i32, i32* @stderr
%69 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 624, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
70: ; preds = %64
%71 = call i32 @strlen(i8* %2)
%72 = call i32 @strlen(i8* %1)
%73 = add i32 %71, 8
%74 = add i32 %73, %72
%75 = call i8* @malloc(i32 %74)
%76 = icmp eq i8* %75, null
br i1 %76, label %77, label %82
77: ; preds = %70
%78 = load i32, i32* @stderr
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 627, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
82: ; preds = %70
%83 = call i32 @strcpy(i8* %75, i8* %2)
%84 = call i32 @strlen(i8* %75)
%85 = add nsw i32 %84, -1
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %75, i64 %86
%88 = load i8, i8* %87
%89 = icmp eq i8 %88, 47
br i1 %89, label %92, label %90
90: ; preds = %82
%91 = call i32 @strcat(i8* %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %92
92: ; preds = %90, %82
%93 = call i32 @strcat(i8* %75, i8* %1)
%94 = call i64 @strcmp(i8* %34, i8* %75)
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %99
96: ; preds = %92
%97 = load i32, i32* @stderr
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 632, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
99: ; preds = %92
%100 = call i32* @fopen(i8* %75, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%101 = icmp eq i32* %100, null
br i1 %101, label %102, label %107
102: ; preds = %99
%103 = load i32, i32* @stderr
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8* %75, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%105 = load i32, i32* @stderr
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 634, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
107: ; preds = %99
%108 = load i8*, i8** %4
%109 = load i64, i64* %5
%110 = call i64 @fwrite(i8* %108, i32 1, i64 %109, i32* %100)
%111 = load i64, i64* %5
%112 = icmp eq i64 %110, %111
br i1 %112, label %116, label %113
113: ; preds = %107
%114 = load i32, i32* @stderr
%115 = call i32 (i32, i8*, ...) @fprintf(i32 %114, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 637, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %116
116: ; preds = %107, %113, %102, %96, %77, %67, %61, %55, %36, %26, %20, %12
%117 = phi i32 [ -1, %12 ], [ -1, %20 ], [ -1, %26 ], [ -1, %36 ], [ %53, %55 ], [ -1, %61 ], [ -1, %67 ], [ -1, %77 ], [ -1, %96 ], [ -1, %102 ], [ -1, %113 ], [ %53, %107 ]
%118 = phi i8* [ null, %12 ], [ null, %20 ], [ null, %26 ], [ null, %36 ], [ %34, %55 ], [ %34, %61 ], [ %34, %67 ], [ %34, %77 ], [ %34, %96 ], [ %34, %102 ], [ %34, %113 ], [ %34, %107 ]
%119 = phi i8* [ null, %12 ], [ null, %20 ], [ null, %26 ], [ null, %36 ], [ null, %55 ], [ null, %61 ], [ null, %67 ], [ null, %77 ], [ %75, %96 ], [ %75, %102 ], [ %75, %113 ], [ %75, %107 ]
%120 = phi i32* [ null, %12 ], [ null, %20 ], [ null, %26 ], [ null, %36 ], [ null, %55 ], [ null, %61 ], [ null, %67 ], [ null, %77 ], [ null, %96 ], [ null, %102 ], [ %100, %113 ], [ %100, %107 ]
%121 = load i8*, i8** %4
%122 = icmp eq i8* %121, null
%123 = load i64, i64* %5
%124 = icmp ne i64 %123, 0
%125 = select i1 %122, i1 %124, i1 false
br i1 %125, label %126, label %129
126: ; preds = %116
%127 = load i32, i32* @stderr
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %127, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %151
129: ; preds = %116
%130 = icmp ne i8* %121, null
%131 = icmp eq i64 %123, 0
%132 = select i1 %130, i1 %131, i1 false
br i1 %132, label %133, label %136
133: ; preds = %129
%134 = load i32, i32* @stderr
%135 = call i32 (i32, i8*, ...) @fprintf(i32 %134, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %151
136: ; preds = %129
br i1 %130, label %137, label %139
137: ; preds = %136
%138 = call i32 @munmap(i8* %121, i64 %123)
store i8* null, i8** %4
store i64 0, i64* %5
br label %139
139: ; preds = %137, %136
%140 = icmp eq i32* %120, null
br i1 %140, label %143, label %141
141: ; preds = %139
%142 = call i32 @fclose(i32* %120)
br label %143
143: ; preds = %141, %139
%144 = icmp eq i8* %118, null
br i1 %144, label %147, label %145
145: ; preds = %143
%146 = call i32 @free(i8* %118)
br label %147
147: ; preds = %145, %143
%148 = icmp eq i8* %119, null
br i1 %148, label %151, label %149
149: ; preds = %147
%150 = call i32 @free(i8* %119)
br label %151
151: ; preds = %147, %149, %133, %126
%152 = phi i32 [ -1, %126 ], [ -1, %133 ], [ %117, %149 ], [ %117, %147 ]
ret i32 %152
}