#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 */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int atoi(char *);
char *basename(char *);
int /*<<< orphan*/ bzero(char *, scalar_t__);
int execMultiCopy(char const *, char const **, int, int);
int /*<<< orphan*/ free(char *);
char *malloc(scalar_t__);
char *realpath(char *, int /*<<< orphan*/ *);
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  if (argc <= 1) {
    usage("Error: Too few parameters");
    return EXIT_SUCCESS;
  }
  int blocksize = -1;
  int ok = 1;
  int ret = 0;
  int tot = 0;
  int i, j = 0;
  int files = 0;
  char *buf = NULL;
  char *src = NULL;
  char *rpath = NULL;
  char *dst[argc - 1];
  struct stat statInfo;
  for (i = 1; i < argc; i++) {
    buf = argv[i];
    if (strcmp(buf, "--") == 0) {
      files = 1;
      continue;
    }
    if (strcmp(buf, "-b") == 0 && !files) {
      if (i < argc - 1) {
        blocksize = atoi(argv[i + 1]);
        if (blocksize > 0 && blocksize >= 512 &&
            blocksize <= (1024 * 1024 * 16)) {
          i++;
          continue;
        } else {
          if (src != NULL) {
            free(src);
          }
          for (j = 0; j < tot - 1; j++) {
            if (dst[j] != NULL) {
              free(dst[j]);
            }
          }
          usage("Error: invalid blocksize given");
          return EXIT_FAILURE;
        }
      } else {
        if (src != NULL) {
          free(src);
        }
        for (j = 0; j < tot - 1; j++) {
          if (dst[j] != NULL) {
            free(dst[j]);
          }
        }
        usage("Error: no blocksize given");
        return EXIT_FAILURE;
      }
      break;
    }
    if (src == NULL) {
      rpath = realpath(buf, NULL);
      src = rpath;
      continue;
    }
    tot++;
    if (stat(buf, &statInfo) == 0) {
      if (S_ISDIR(statInfo.st_mode)) {
        char *tmp;
        tmp = malloc(strlen(buf) + 1 + strlen(src) + 1);
        if (tmp == NULL) {
          free(src);
          for (j = 0; j < tot - 1; j++) {
            if (dst[j] != NULL) {
              free(dst[j]);
            }
          }
          usage("Error: unable to allocate enough system memory for "
                "parameters' analysis");
          return EXIT_FAILURE;
        }
        bzero(tmp, strlen(buf) + 1 + strlen(src) + 1);
        strcat(tmp, buf);
        strcat(tmp, "/");
        strcat(tmp, basename(src));
        rpath = realpath(tmp, NULL);
        free(tmp);
        dst[tot - 1] = rpath;
        continue;
      }
    }
    dst[tot - 1] = strdup(buf);
  }
  if (tot == 0) {
    usage("Error: No destinations given/found");
    return EXIT_FAILURE;
  }
  for (i = 0; i < tot; i++) {
    if (strcmp(src, dst[i]) == 0) {
      ok = 0;
      break;
    }
    for (j = 0; j < i; j++) {
      if (strcmp(dst[j], dst[i]) == 0) {
        ok = 0;
        break;
      }
    }
    if (ok == 0) {
      break;
    }
  }
  if (ok > 0) {
    ret = execMultiCopy((const char *)src, (const char **)dst, tot, blocksize);
  } else {
    ret = -6;
  }
  free(src);
  for (i = 0; i < tot; i++) {
    if (dst[i] != NULL) {
      free(dst[i]);
    }
  }
  switch (ret) {
  case -1:
    usage("Error: unable to allocate enough system memory for buffer creation");
    return EXIT_FAILURE;
    break;
  case -4:
    usage("Error: unable to open destination files");
    return EXIT_FAILURE;
    break;
  case -3:
    usage("Error: destination files are not writable");
    return EXIT_FAILURE;
    break;
  case -2:
    usage("Error: unable to read source file");
    return EXIT_FAILURE;
    break;
  case -5:
    usage("Error: unable to write data to destination files (check them!)");
    return EXIT_FAILURE;
    break;
  case -6:
    usage("Error: make sure source file is not specified also as destination "
          "and that all destinations are unique");
    return EXIT_FAILURE;
    break;
  case 0:
  default:
    break;
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1220 <main+0x40>
lea    0xe12(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    18e6 <main+0x706>
movl   $0xffffffff,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%rcx
mov    %rcx,-0x50(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1659 <main+0x479>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xd7c(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12d5 <main+0xf5>
movl   $0x1,-0x2c(%rbp)
jmp    164b <main+0x46b>
mov    -0x38(%rbp),%rdi
lea    0xd59(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1463 <main+0x283>
cmpl   $0x0,-0x2c(%rbp)
jne    1463 <main+0x283>
mov    -0x24(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13dc <main+0x1fc>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   10e0 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1355 <main+0x175>
cmpl   $0x200,-0x14(%rbp)
jl     1355 <main+0x175>
cmpl   $0x1000000,-0x14(%rbp)
jg     1355 <main+0x175>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    164b <main+0x46b>
cmpq   $0x0,-0x40(%rbp)
je     1369 <main+0x189>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13b8 <main+0x1d8>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     13a5 <main+0x1c5>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    13aa <main+0x1ca>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1370 <main+0x190>
lea    0xc7d(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2c15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
cmpq   $0x0,-0x40(%rbp)
je     13f0 <main+0x210>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    143f <main+0x25f>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     142c <main+0x24c>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1431 <main+0x251>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13f7 <main+0x217>
lea    0xc15(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2b8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
cmpq   $0x0,-0x40(%rbp)
jne    148c <main+0x2ac>
mov    -0x38(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10a0 <realpath@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    164b <main+0x46b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x38(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1090 <stat@plt>
cmp    $0x0,%rax
jne    162e <main+0x44e>
mov    -0x60(%rbp),%edi
call   1050 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1629 <main+0x449>
mov    -0x38(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x80(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   10b0 <malloc@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1573 <main+0x393>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    154f <main+0x36f>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     153c <main+0x35c>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1541 <main+0x361>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1507 <main+0x327>
lea    0xb1f(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2a7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
mov    -0x70(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x38(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
mov    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x98(%rbp),%rsi
mov    -0x90(%rbp),%rdi
add    %rax,%rsi
add    $0x1,%rsi
call   10d0 <bzero@plt>
mov    -0x70(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10f0 <strcat@plt>
mov    -0x70(%rbp),%rdi
lea    0xaf0(%rip),%rsi
call   10f0 <strcat@plt>
mov    -0x70(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x40(%rbp),%rdi
call   1080 <basename@plt>
mov    -0x88(%rbp),%rdi
mov    %rax,%rsi
call   10f0 <strcat@plt>
mov    -0x70(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10a0 <realpath@plt>
mov    %rax,-0x48(%rbp)
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rax
mov    -0x48(%rbp),%rdx
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    164b <main+0x46b>
jmp    162e <main+0x44e>
mov    -0x38(%rbp),%rdi
call   1100 <strdup@plt>
mov    %rax,%rdx
mov    -0x78(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1293 <main+0xb3>
cmpl   $0x0,-0x20(%rbp)
jne    1687 <main+0x4a7>
lea    0xa55(%rip),%rdi
call   10c0 <usage@plt>
mov    0x296a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    173c <main+0x55c>
mov    -0x78(%rbp),%rax
mov    -0x40(%rbp),%rdi
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    16c5 <main+0x4e5>
movl   $0x0,-0x18(%rbp)
jmp    173c <main+0x55c>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    171a <main+0x53a>
mov    -0x78(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1707 <main+0x527>
movl   $0x0,-0x18(%rbp)
jmp    171a <main+0x53a>
jmp    170c <main+0x52c>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    16cc <main+0x4ec>
cmpl   $0x0,-0x18(%rbp)
jne    1729 <main+0x549>
jmp    173c <main+0x55c>
jmp    172e <main+0x54e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    168e <main+0x4ae>
cmpl   $0x0,-0x18(%rbp)
jle    1761 <main+0x581>
mov    -0x78(%rbp),%rsi
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1060 <execMultiCopy@plt>
mov    %eax,-0x1c(%rbp)
jmp    1768 <main+0x588>
movl   $0xfffffffa,-0x1c(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    17bb <main+0x5db>
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     17a8 <main+0x5c8>
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    17ad <main+0x5cd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1778 <main+0x598>
mov    -0x1c(%rbp),%eax
add    $0x6,%eax
mov    %eax,%ecx
mov    %rcx,-0xa0(%rbp)
sub    $0x6,%eax
ja     18c7 <main+0x6e7>
mov    -0xa0(%rbp),%rax
lea    0x81f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x8f1(%rip),%rdi
call   10c0 <usage@plt>
mov    0x27e3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
lea    0x910(%rip),%rdi
call   10c0 <usage@plt>
mov    0x27bf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
lea    0x914(%rip),%rdi
call   10c0 <usage@plt>
mov    0x279b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
lea    0x91a(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2777(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
lea    0x918(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2753(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
lea    0x933(%rip),%rdi
call   10c0 <usage@plt>
mov    0x272f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    18df <main+0x6ff>
jmp    18c7 <main+0x6e7>
jmp    18cc <main+0x6ec>
mov    0x2705(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,-0x70(%rbp)
cmp    $0x1,%edi
jg     1214 <main+0x34>
lea    0xdff(%rip),%rdi
call   10c0 <usage@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%eax
jmp    157c <main+0x39c>
mov    %edi,%r13d
mov    %rsp,-0x60(%rbp)
lea    -0x1(%r13),%eax
mov    %rsp,%rcx
mov    %rax,-0x78(%rbp)
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    $0x1,%r15d
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
mov    $0xffffffff,%eax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x3c(%rbp)
xor    %r12d,%r12d
jmp    1274 <main+0x94>
nopl   (%rax)
movl   $0x1,-0x3c(%rbp)
add    $0x1,%r15d
cmp    %r13d,%r15d
jge    13e8 <main+0x208>
movslq %r15d,%rbx
mov    -0x70(%rbp),%rax
mov    (%rax,%rbx,8),%r14
mov    %r14,%rdi
lea    0xd91(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1260 <main+0x80>
mov    %r14,%rdi
lea    0xd80(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    12f0 <main+0x110>
cmpl   $0x0,-0x3c(%rbp)
jne    12f0 <main+0x110>
cmp    -0x78(%rbp),%r15d
jge    1468 <main+0x288>
mov    -0x70(%rbp),%rax
mov    0x8(%rax,%rbx,8),%rdi
call   10e0 <atoi@plt>
mov    %rax,%rcx
mov    %rax,-0x68(%rbp)
add    $0xfffffe00,%eax
cmp    $0xfffe01,%eax
jae    14b1 <main+0x2d1>
add    $0x1,%r15d
movl   $0x0,-0x3c(%rbp)
jmp    1267 <main+0x87>
nopl   0x0(%rax)
cmpq   $0x0,-0x30(%rbp)
je     1328 <main+0x148>
lea    0x1(%r12),%ebx
mov    %r14,%rdi
lea    -0x50(%rbp),%rsi
call   1090 <stat@plt>
test   %rax,%rax
je     133b <main+0x15b>
mov    %r14,%rdi
call   1100 <strdup@plt>
movslq %r12d,%rcx
mov    -0x38(%rbp),%rdx
mov    %rax,(%rdx,%rcx,8)
mov    %ebx,%r12d
jmp    1267 <main+0x87>
mov    %r14,%rdi
xor    %esi,%esi
call   10a0 <realpath@plt>
mov    %rax,-0x30(%rbp)
jmp    1267 <main+0x87>
mov    -0x50(%rbp),%edi
call   1050 <S_ISDIR@plt>
test   %rax,%rax
je     130d <main+0x12d>
mov    %ebx,-0x54(%rbp)
mov    %r12,-0x48(%rbp)
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rax,%r12
mov    -0x30(%rbp),%rdi
mov    %rdi,-0x30(%rbp)
call   1040 <strlen@plt>
lea    (%r12,%rax,1),%rbx
add    $0x2,%rbx
mov    %rbx,%rdi
call   10b0 <malloc@plt>
test   %rax,%rax
je     1594 <main+0x3b4>
mov    %rax,%r12
mov    %rax,%rdi
mov    %rbx,%rsi
call   10d0 <bzero@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   10f0 <strcat@plt>
mov    %r12,%rdi
lea    0xcfe(%rip),%rsi
call   10f0 <strcat@plt>
mov    -0x30(%rbp),%rdi
call   1080 <basename@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   10f0 <strcat@plt>
mov    %r12,%rdi
xor    %esi,%esi
call   10a0 <realpath@plt>
mov    %rax,%r14
mov    %r12,%rdi
call   1030 <free@plt>
movslq -0x48(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %r14,(%rcx,%rax,8)
mov    -0x54(%rbp),%eax
mov    %eax,%r12d
jmp    1267 <main+0x87>
test   %r12d,%r12d
je     144c <main+0x26c>
mov    %r12,-0x48(%rbp)
mov    %r12d,%r15d
jle    14fd <main+0x31d>
xor    %r13d,%r13d
jmp    140d <main+0x22d>
nop
add    $0x1,%r13
cmp    %r15,%r13
je     14fd <main+0x31d>
mov    -0x38(%rbp),%r12
mov    %r12,%r14
mov    (%r12,%r13,8),%r12
mov    -0x30(%rbp),%rdi
mov    %r12,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1458 <main+0x278>
test   %r13,%r13
je     1400 <main+0x220>
xor    %ebx,%ebx
mov    (%r14,%rbx,8),%rdi
mov    %r12,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1458 <main+0x278>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1430 <main+0x250>
jmp    1400 <main+0x220>
lea    0xc50(%rip),%r15
jmp    1564 <main+0x384>
mov    -0x48(%rbp),%r14
mov    -0x30(%rbp),%rbx
xor    %r12d,%r12d
jmp    151f <main+0x33f>
mov    -0x30(%rbp),%rdi
test   %rdi,%rdi
je     1476 <main+0x296>
call   1030 <free@plt>
lea    0xbc2(%rip),%r15
cmp    $0x2,%r12d
jl     1564 <main+0x384>
add    $0xffffffff,%r12d
xor    %ebx,%ebx
jmp    149d <main+0x2bd>
nop
add    $0x1,%rbx
cmp    %rbx,%r12
je     1564 <main+0x384>
mov    -0x38(%rbp),%rax
mov    (%rax,%rbx,8),%rdi
test   %rdi,%rdi
je     1490 <main+0x2b0>
call   1030 <free@plt>
jmp    1490 <main+0x2b0>
mov    -0x30(%rbp),%rdi
test   %rdi,%rdi
je     14bf <main+0x2df>
call   1030 <free@plt>
lea    0xb5a(%rip),%r15
cmp    $0x2,%r12d
jl     1564 <main+0x384>
add    $0xffffffff,%r12d
xor    %ebx,%ebx
jmp    14e9 <main+0x309>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1564 <main+0x384>
mov    -0x38(%rbp),%rax
mov    (%rax,%rbx,8),%rdi
test   %rdi,%rdi
je     14e0 <main+0x300>
call   1030 <free@plt>
jmp    14e0 <main+0x300>
mov    -0x30(%rbp),%rbx
mov    %rbx,%rdi
mov    -0x38(%rbp),%rsi
mov    -0x48(%rbp),%r14
mov    %r14d,%edx
mov    -0x68(%rbp),%rcx
call   1060 <execMultiCopy@plt>
mov    %eax,%r12d
add    $0x6,%r12d
mov    %rbx,%rdi
call   1030 <free@plt>
test   %r14d,%r14d
jle    154d <main+0x36d>
xor    %ebx,%ebx
jmp    1539 <main+0x359>
add    $0x1,%rbx
cmp    %rbx,%r15
je     154d <main+0x36d>
mov    -0x38(%rbp),%rax
mov    (%rax,%rbx,8),%rdi
test   %rdi,%rdi
je     1530 <main+0x350>
call   1030 <free@plt>
jmp    1530 <main+0x350>
cmp    $0x5,%r12d
ja     158b <main+0x3ab>
movslq %r12d,%rax
lea    0xcc7(%rip),%rcx
movslq (%rcx,%rax,4),%r15
add    %rcx,%r15
mov    %r15,%rdi
call   10c0 <usage@plt>
mov    0x2a6d(%rip),%rax
mov    -0x60(%rbp),%rcx
mov    (%rax),%eax
mov    %rcx,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a46(%rip),%rax
jmp    1573 <main+0x393>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
lea    0xab5(%rip),%r15
mov    -0x48(%rbp),%rbx
test   %ebx,%ebx
jle    1564 <main+0x384>
mov    %ebx,%r14d
xor    %ebx,%ebx
mov    -0x38(%rbp),%r12
jmp    15c9 <main+0x3e9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r14
je     1564 <main+0x384>
mov    (%r12,%rbx,8),%rdi
test   %rdi,%rdi
je     15c0 <main+0x3e0>
call   1030 <free@plt>
jmp    15c0 <main+0x3e0>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [26 x i8] c"Error: Too few parameters\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [3 x i8] c"-b\00"
@.str.3 = [31 x i8] c"Error: invalid blocksize given\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [26 x i8] c"Error: no blocksize given\00"
@.str.5 = [72 x i8] c"Error: unable to allocate enough system memory for parameters' analysis\00"
@.str.6 = [2 x i8] c"/\00"
@.str.7 = [35 x i8] c"Error: No destinations given/found\00"
@.str.8 = [67 x i8] c"Error: unable to allocate enough system memory for buffer creation\00"
@.str.9 = [40 x i8] c"Error: unable to open destination files\00"
@.str.10 = [42 x i8] c"Error: destination files are not writable\00"
@.str.11 = [34 x i8] c"Error: unable to read source file\00"
@.str.12 = [63 x i8] c"Error: unable to write data to destination files (check them!)\00"
@.str.13 = [103 x i8] c"Error: make sure source file is not specified also as destination and that all destinations are unique\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i64
%18 = alloca %struct.stat
%19 = alloca i32
%20 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp sle i32 %21, 1
br i1 %22, label %23, label %26
23: ; preds = %2
%24 = call i32 @usage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%25 = load i32, i32* @EXIT_SUCCESS
store i32 %25, i32* %3
br label %341
26: ; preds = %2
store i32 -1, i32* %6
store i32 1, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %11
store i32 0, i32* %12
store i8* null, i8** %13
store i8* null, i8** %14
store i8* null, i8** %15
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %16
%31 = alloca i8*, i64 %29
store i64 %29, i64* %17
store i32 1, i32* %10
br label %32
32: ; preds = %231, %26
%33 = load i32, i32* %10
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %234
36: ; preds = %32
%37 = load i8**, i8*** %5
%38 = load i32, i32* %10
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
store i8* %41, i8** %13
%42 = load i8*, i8** %13
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %36
store i32 1, i32* %12
br label %231
46: ; preds = %36
%47 = load i8*, i8** %13
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %139
50: ; preds = %46
%51 = load i32, i32* %12
%52 = icmp ne i32 %51, 0
br i1 %52, label %139, label %53
53: ; preds = %50
%54 = load i32, i32* %10
%55 = load i32, i32* %4
%56 = sub nsw i32 %55, 1
%57 = icmp slt i32 %54, %56
br i1 %57, label %58, label %108
58: ; preds = %53
%59 = load i8**, i8*** %5
%60 = load i32, i32* %10
%61 = add nsw i32 %60, 1
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8*, i8** %59, i64 %62
%64 = load i8*, i8** %63
%65 = call i32 @atoi(i8* %64)
store i32 %65, i32* %6
%66 = load i32, i32* %6
%67 = icmp sgt i32 %66, 0
br i1 %67, label %68, label %77
68: ; preds = %58
%69 = load i32, i32* %6
%70 = icmp sge i32 %69, 512
br i1 %70, label %71, label %77
71: ; preds = %68
%72 = load i32, i32* %6
%73 = icmp sle i32 %72, 16777216
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = load i32, i32* %10
%76 = add nsw i32 %75, 1
store i32 %76, i32* %10
br label %231
77: ; preds = %71, %68, %58
%78 = load i8*, i8** %14
%79 = icmp ne i8* %78, null
br i1 %79, label %80, label %83
80: ; preds = %77
%81 = load i8*, i8** %14
%82 = call i32 @free(i8* %81)
br label %83
83: ; preds = %80, %77
store i32 0, i32* %11
br label %84
84: ; preds = %102, %83
%85 = load i32, i32* %11
%86 = load i32, i32* %9
%87 = sub nsw i32 %86, 1
%88 = icmp slt i32 %85, %87
br i1 %88, label %89, label %105
89: ; preds = %84
%90 = load i32, i32* %11
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %31, i64 %91
%93 = load i8*, i8** %92
%94 = icmp ne i8* %93, null
br i1 %94, label %95, label %101
95: ; preds = %89
%96 = load i32, i32* %11
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i8*, i8** %31, i64 %97
%99 = load i8*, i8** %98
%100 = call i32 @free(i8* %99)
br label %101
101: ; preds = %95, %89
br label %102
102: ; preds = %101
%103 = load i32, i32* %11
%104 = add nsw i32 %103, 1
store i32 %104, i32* %11
br label %84
105: ; preds = %84
%106 = call i32 @usage(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%107 = load i32, i32* @EXIT_FAILURE
store i32 %107, i32* %3
store i32 1, i32* %19
br label %339
108: ; preds = %53
%109 = load i8*, i8** %14
%110 = icmp ne i8* %109, null
br i1 %110, label %111, label %114
111: ; preds = %108
%112 = load i8*, i8** %14
%113 = call i32 @free(i8* %112)
br label %114
114: ; preds = %111, %108
store i32 0, i32* %11
br label %115
115: ; preds = %133, %114
%116 = load i32, i32* %11
%117 = load i32, i32* %9
%118 = sub nsw i32 %117, 1
%119 = icmp slt i32 %116, %118
br i1 %119, label %120, label %136
120: ; preds = %115
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8*, i8** %31, i64 %122
%124 = load i8*, i8** %123
%125 = icmp ne i8* %124, null
br i1 %125, label %126, label %132
126: ; preds = %120
%127 = load i32, i32* %11
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i8*, i8** %31, i64 %128
%130 = load i8*, i8** %129
%131 = call i32 @free(i8* %130)
br label %132
132: ; preds = %126, %120
br label %133
133: ; preds = %132
%134 = load i32, i32* %11
%135 = add nsw i32 %134, 1
store i32 %135, i32* %11
br label %115
136: ; preds = %115
%137 = call i32 @usage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%138 = load i32, i32* @EXIT_FAILURE
store i32 %138, i32* %3
store i32 1, i32* %19
br label %339
139: ; preds = %50, %46
%140 = load i8*, i8** %14
%141 = icmp eq i8* %140, null
br i1 %141, label %142, label %146
142: ; preds = %139
%143 = load i8*, i8** %13
%144 = call i8* @realpath(i8* %143, i32* null)
store i8* %144, i8** %15
%145 = load i8*, i8** %15
store i8* %145, i8** %14
br label %231
146: ; preds = %139
%147 = load i32, i32* %9
%148 = add nsw i32 %147, 1
store i32 %148, i32* %9
%149 = load i8*, i8** %13
%150 = call i64 @stat(i8* %149, %struct.stat* %18)
%151 = icmp eq i64 %150, 0
br i1 %151, label %152, label %224
152: ; preds = %146
%153 = getelementptr inbounds %struct.stat, %struct.stat* %18, i32 0, i32 0
%154 = load i32, i32* %153
%155 = call i64 @S_ISDIR(i32 %154)
%156 = icmp ne i64 %155, 0
br i1 %156, label %157, label %223
157: ; preds = %152
%158 = load i8*, i8** %13
%159 = call i64 @strlen(i8* %158)
%160 = add nsw i64 %159, 1
%161 = load i8*, i8** %14
%162 = call i64 @strlen(i8* %161)
%163 = add nsw i64 %160, %162
%164 = add nsw i64 %163, 1
%165 = call i8* @malloc(i64 %164)
store i8* %165, i8** %20
%166 = load i8*, i8** %20
%167 = icmp eq i8* %166, null
br i1 %167, label %168, label %195
168: ; preds = %157
%169 = load i8*, i8** %14
%170 = call i32 @free(i8* %169)
store i32 0, i32* %11
br label %171
171: ; preds = %189, %168
%172 = load i32, i32* %11
%173 = load i32, i32* %9
%174 = sub nsw i32 %173, 1
%175 = icmp slt i32 %172, %174
br i1 %175, label %176, label %192
176: ; preds = %171
%177 = load i32, i32* %11
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds i8*, i8** %31, i64 %178
%180 = load i8*, i8** %179
%181 = icmp ne i8* %180, null
br i1 %181, label %182, label %188
182: ; preds = %176
%183 = load i32, i32* %11
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8*, i8** %31, i64 %184
%186 = load i8*, i8** %185
%187 = call i32 @free(i8* %186)
br label %188
188: ; preds = %182, %176
br label %189
189: ; preds = %188
%190 = load i32, i32* %11
%191 = add nsw i32 %190, 1
store i32 %191, i32* %11
br label %171
192: ; preds = %171
%193 = call i32 @usage(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0))
%194 = load i32, i32* @EXIT_FAILURE
store i32 %194, i32* %3
store i32 1, i32* %19
br label %339
195: ; preds = %157
%196 = load i8*, i8** %20
%197 = load i8*, i8** %13
%198 = call i64 @strlen(i8* %197)
%199 = add nsw i64 %198, 1
%200 = load i8*, i8** %14
%201 = call i64 @strlen(i8* %200)
%202 = add nsw i64 %199, %201
%203 = add nsw i64 %202, 1
%204 = call i32 @bzero(i8* %196, i64 %203)
%205 = load i8*, i8** %20
%206 = load i8*, i8** %13
%207 = call i32 @strcat(i8* %205, i8* %206)
%208 = load i8*, i8** %20
%209 = call i32 @strcat(i8* %208, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%210 = load i8*, i8** %20
%211 = load i8*, i8** %14
%212 = call i8* @basename(i8* %211)
%213 = call i32 @strcat(i8* %210, i8* %212)
%214 = load i8*, i8** %20
%215 = call i8* @realpath(i8* %214, i32* null)
store i8* %215, i8** %15
%216 = load i8*, i8** %20
%217 = call i32 @free(i8* %216)
%218 = load i8*, i8** %15
%219 = load i32, i32* %9
%220 = sub nsw i32 %219, 1
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds i8*, i8** %31, i64 %221
store i8* %218, i8** %222
br label %231
223: ; preds = %152
br label %224
224: ; preds = %223, %146
%225 = load i8*, i8** %13
%226 = call i8* @strdup(i8* %225)
%227 = load i32, i32* %9
%228 = sub nsw i32 %227, 1
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i8*, i8** %31, i64 %229
store i8* %226, i8** %230
br label %231
231: ; preds = %224, %195, %142, %74, %45
%232 = load i32, i32* %10
%233 = add nsw i32 %232, 1
store i32 %233, i32* %10
br label %32
234: ; preds = %32
%235 = load i32, i32* %9
%236 = icmp eq i32 %235, 0
br i1 %236, label %237, label %240
237: ; preds = %234
%238 = call i32 @usage(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%239 = load i32, i32* @EXIT_FAILURE
store i32 %239, i32* %3
store i32 1, i32* %19
br label %339
240: ; preds = %234
store i32 0, i32* %10
br label %241
241: ; preds = %280, %240
%242 = load i32, i32* %10
%243 = load i32, i32* %9
%244 = icmp slt i32 %242, %243
br i1 %244, label %245, label %283
245: ; preds = %241
%246 = load i8*, i8** %14
%247 = load i32, i32* %10
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds i8*, i8** %31, i64 %248
%250 = load i8*, i8** %249
%251 = call i64 @strcmp(i8* %246, i8* %250)
%252 = icmp eq i64 %251, 0
br i1 %252, label %253, label %254
253: ; preds = %245
store i32 0, i32* %7
br label %283
254: ; preds = %245
store i32 0, i32* %11
br label %255
255: ; preds = %272, %254
%256 = load i32, i32* %11
%257 = load i32, i32* %10
%258 = icmp slt i32 %256, %257
br i1 %258, label %259, label %275
259: ; preds = %255
%260 = load i32, i32* %11
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds i8*, i8** %31, i64 %261
%263 = load i8*, i8** %262
%264 = load i32, i32* %10
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds i8*, i8** %31, i64 %265
%267 = load i8*, i8** %266
%268 = call i64 @strcmp(i8* %263, i8* %267)
%269 = icmp eq i64 %268, 0
br i1 %269, label %270, label %271
270: ; preds = %259
store i32 0, i32* %7
br label %275
271: ; preds = %259
br label %272
272: ; preds = %271
%273 = load i32, i32* %11
%274 = add nsw i32 %273, 1
store i32 %274, i32* %11
br label %255
275: ; preds = %270, %255
%276 = load i32, i32* %7
%277 = icmp eq i32 %276, 0
br i1 %277, label %278, label %279
278: ; preds = %275
br label %283
279: ; preds = %275
br label %280
280: ; preds = %279
%281 = load i32, i32* %10
%282 = add nsw i32 %281, 1
store i32 %282, i32* %10
br label %241
283: ; preds = %278, %253, %241
%284 = load i32, i32* %7
%285 = icmp sgt i32 %284, 0
br i1 %285, label %286, label %291
286: ; preds = %283
%287 = load i8*, i8** %14
%288 = load i32, i32* %9
%289 = load i32, i32* %6
%290 = call i32 @execMultiCopy(i8* %287, i8** %31, i32 %288, i32 %289)
store i32 %290, i32* %8
br label %292
291: ; preds = %283
store i32 -6, i32* %8
br label %292
292: ; preds = %291, %286
%293 = load i8*, i8** %14
%294 = call i32 @free(i8* %293)
store i32 0, i32* %10
br label %295
295: ; preds = %312, %292
%296 = load i32, i32* %10
%297 = load i32, i32* %9
%298 = icmp slt i32 %296, %297
br i1 %298, label %299, label %315
299: ; preds = %295
%300 = load i32, i32* %10
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds i8*, i8** %31, i64 %301
%303 = load i8*, i8** %302
%304 = icmp ne i8* %303, null
br i1 %304, label %305, label %311
305: ; preds = %299
%306 = load i32, i32* %10
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds i8*, i8** %31, i64 %307
%309 = load i8*, i8** %308
%310 = call i32 @free(i8* %309)
br label %311
311: ; preds = %305, %299
br label %312
312: ; preds = %311
%313 = load i32, i32* %10
%314 = add nsw i32 %313, 1
store i32 %314, i32* %10
br label %295
315: ; preds = %295
%316 = load i32, i32* %8
switch i32 %316, label %336 [
i32 -1, label %317
i32 -4, label %320
i32 -3, label %323
i32 -2, label %326
i32 -5, label %329
i32 -6, label %332
i32 0, label %335
]
317: ; preds = %315
%318 = call i32 @usage(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.8, i64 0, i64 0))
%319 = load i32, i32* @EXIT_FAILURE
store i32 %319, i32* %3
store i32 1, i32* %19
br label %339
320: ; preds = %315
%321 = call i32 @usage(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%322 = load i32, i32* @EXIT_FAILURE
store i32 %322, i32* %3
store i32 1, i32* %19
br label %339
323: ; preds = %315
%324 = call i32 @usage(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0))
%325 = load i32, i32* @EXIT_FAILURE
store i32 %325, i32* %3
store i32 1, i32* %19
br label %339
326: ; preds = %315
%327 = call i32 @usage(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
%328 = load i32, i32* @EXIT_FAILURE
store i32 %328, i32* %3
store i32 1, i32* %19
br label %339
329: ; preds = %315
%330 = call i32 @usage(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.12, i64 0, i64 0))
%331 = load i32, i32* @EXIT_FAILURE
store i32 %331, i32* %3
store i32 1, i32* %19
br label %339
332: ; preds = %315
%333 = call i32 @usage(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.13, i64 0, i64 0))
%334 = load i32, i32* @EXIT_FAILURE
store i32 %334, i32* %3
store i32 1, i32* %19
br label %339
335: ; preds = %315
br label %336
336: ; preds = %315, %335
br label %337
337: ; preds = %336
%338 = load i32, i32* @EXIT_SUCCESS
store i32 %338, i32* %3
store i32 1, i32* %19
br label %339
339: ; preds = %337, %332, %329, %326, %323, %320, %317, %237, %192, %136, %105
%340 = load i8*, i8** %16
br label %341
341: ; preds = %339, %23
%342 = load i32, i32* %3
ret i32 %342
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [26 x i8] c"Error: Too few parameters\00"
@EXIT_SUCCESS = global i32 0
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [3 x i8] c"-b\00"
@.str.3 = [31 x i8] c"Error: invalid blocksize given\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [26 x i8] c"Error: no blocksize given\00"
@.str.5 = [72 x i8] c"Error: unable to allocate enough system memory for parameters' analysis\00"
@.str.6 = [2 x i8] c"/\00"
@.str.7 = [35 x i8] c"Error: No destinations given/found\00"
@.str.8 = [67 x i8] c"Error: unable to allocate enough system memory for buffer creation\00"
@.str.9 = [40 x i8] c"Error: unable to open destination files\00"
@.str.10 = [42 x i8] c"Error: destination files are not writable\00"
@.str.11 = [34 x i8] c"Error: unable to read source file\00"
@.str.12 = [63 x i8] c"Error: unable to write data to destination files (check them!)\00"
@.str.13 = [103 x i8] c"Error: make sure source file is not specified also as destination and that all destinations are unique\00"
@reltable.main = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([103 x i8]* @.str.13 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([63 x i8]* @.str.12 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([40 x i8]* @.str.9 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @.str.10 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.11 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([67 x i8]* @.str.8 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.stat
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @usage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
br label %191
8: ; preds = %2
%9 = add nsw i32 %0, -1
%10 = zext i32 %9 to i64
%11 = tail call i8* @llvm.stacksave()
%12 = alloca i8*, i64 %10
%13 = bitcast %struct.stat* %3 to i8*
%14 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
br label %15
15: ; preds = %8, %127
%16 = phi i32 [ -1, %8 ], [ %132, %127 ]
%17 = phi i8* [ null, %8 ], [ %131, %127 ]
%18 = phi i32 [ 0, %8 ], [ %130, %127 ]
%19 = phi i32 [ 1, %8 ], [ %133, %127 ]
%20 = phi i32 [ 0, %8 ], [ %128, %127 ]
%21 = sext i32 %19 to i64
%22 = getelementptr inbounds i8*, i8** %1, i64 %21
%23 = load i8*, i8** %22
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %127, label %26
26: ; preds = %15
%27 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp ne i64 %27, 0
%29 = icmp ne i32 %18, 0
%30 = select i1 %28, i1 true, i1 %29
br i1 %30, label %79, label %31
31: ; preds = %26
%32 = icmp slt i32 %19, %9
br i1 %32, label %33, label %60
33: ; preds = %31
%34 = add nsw i32 %19, 1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %1, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 @atoi(i8* %37)
%39 = add i32 %38, -512
%40 = icmp ult i32 %39, 16776705
br i1 %40, label %127, label %41
41: ; preds = %33
%42 = icmp eq i8* %17, null
br i1 %42, label %45, label %43
43: ; preds = %41
%44 = call i32 @free(i8* %17)
br label %45
45: ; preds = %43, %41
%46 = icmp sgt i32 %20, 1
br i1 %46, label %47, label %185
47: ; preds = %45
%48 = add nsw i32 %20, -1
%49 = zext i32 %48 to i64
br label %50
50: ; preds = %47, %57
%51 = phi i64 [ 0, %47 ], [ %58, %57 ]
%52 = getelementptr inbounds i8*, i8** %12, i64 %51
%53 = load i8*, i8** %52
%54 = icmp eq i8* %53, null
br i1 %54, label %57, label %55
55: ; preds = %50
%56 = call i32 @free(i8* %53)
br label %57
57: ; preds = %50, %55
%58 = add nuw nsw i64 %51, 1
%59 = icmp eq i64 %58, %49
br i1 %59, label %185, label %50
60: ; preds = %31
%61 = icmp eq i8* %17, null
br i1 %61, label %64, label %62
62: ; preds = %60
%63 = call i32 @free(i8* %17)
br label %64
64: ; preds = %62, %60
%65 = icmp sgt i32 %20, 1
br i1 %65, label %66, label %185
66: ; preds = %64
%67 = add nsw i32 %20, -1
%68 = zext i32 %67 to i64
br label %69
69: ; preds = %66, %76
%70 = phi i64 [ 0, %66 ], [ %77, %76 ]
%71 = getelementptr inbounds i8*, i8** %12, i64 %70
%72 = load i8*, i8** %71
%73 = icmp eq i8* %72, null
br i1 %73, label %76, label %74
74: ; preds = %69
%75 = call i32 @free(i8* %72)
br label %76
76: ; preds = %69, %74
%77 = add nuw nsw i64 %70, 1
%78 = icmp eq i64 %77, %68
br i1 %78, label %185, label %69
79: ; preds = %26
%80 = icmp eq i8* %17, null
br i1 %80, label %81, label %83
81: ; preds = %79
%82 = call i8* @realpath(i8* %23, i32* null)
br label %127
83: ; preds = %79
%84 = add nsw i32 %20, 1
%85 = call i64 @stat(i8* %23, %struct.stat* %3)
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %123
87: ; preds = %83
%88 = load i32, i32* %14
%89 = call i64 @S_ISDIR(i32 %88)
%90 = icmp eq i64 %89, 0
br i1 %90, label %123, label %91
91: ; preds = %87
%92 = call i64 @strlen(i8* dereferenceable(1) %23)
%93 = call i64 @strlen(i8* %17)
%94 = add i64 %92, 2
%95 = add i64 %94, %93
%96 = call i8* @malloc(i64 %95)
%97 = icmp eq i8* %96, null
br i1 %97, label %98, label %113
98: ; preds = %91
%99 = call i32 @free(i8* %17)
%100 = icmp sgt i32 %20, 0
br i1 %100, label %101, label %185
101: ; preds = %98
%102 = zext i32 %20 to i64
br label %103
103: ; preds = %101, %110
%104 = phi i64 [ 0, %101 ], [ %111, %110 ]
%105 = getelementptr inbounds i8*, i8** %12, i64 %104
%106 = load i8*, i8** %105
%107 = icmp eq i8* %106, null
br i1 %107, label %110, label %108
108: ; preds = %103
%109 = call i32 @free(i8* %106)
br label %110
110: ; preds = %103, %108
%111 = add nuw nsw i64 %104, 1
%112 = icmp eq i64 %111, %102
br i1 %112, label %185, label %103
113: ; preds = %91
%114 = call i32 @bzero(i8* %96, i64 %95)
%115 = call i32 @strcat(i8* %96, i8* %23)
%116 = call i32 @strcat(i8* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%117 = call i8* @basename(i8* %17)
%118 = call i32 @strcat(i8* %96, i8* %117)
%119 = call i8* @realpath(i8* %96, i32* null)
%120 = call i32 @free(i8* %96)
%121 = sext i32 %20 to i64
%122 = getelementptr inbounds i8*, i8** %12, i64 %121
store i8* %119, i8** %122
br label %127
123: ; preds = %87, %83
%124 = call i8* @strdup(i8* %23)
%125 = sext i32 %20 to i64
%126 = getelementptr inbounds i8*, i8** %12, i64 %125
store i8* %124, i8** %126
br label %127
127: ; preds = %113, %33, %15, %123, %81
%128 = phi i32 [ %20, %81 ], [ %84, %123 ], [ %20, %15 ], [ %20, %33 ], [ %84, %113 ]
%129 = phi i32 [ %19, %81 ], [ %19, %123 ], [ %19, %15 ], [ %34, %33 ], [ %19, %113 ]
%130 = phi i32 [ %18, %81 ], [ %18, %123 ], [ 1, %15 ], [ 0, %33 ], [ %18, %113 ]
%131 = phi i8* [ %82, %81 ], [ %17, %123 ], [ %17, %15 ], [ %17, %33 ], [ %17, %113 ]
%132 = phi i32 [ %16, %81 ], [ %16, %123 ], [ %16, %15 ], [ %38, %33 ], [ %16, %113 ]
%133 = add nsw i32 %129, 1
%134 = icmp slt i32 %133, %0
br i1 %134, label %15, label %135
135: ; preds = %127
%136 = icmp eq i32 %128, 0
br i1 %136, label %185, label %137
137: ; preds = %135
%138 = icmp sgt i32 %128, 0
br i1 %138, label %139, label %161
139: ; preds = %137
%140 = zext i32 %128 to i64
br label %141
141: ; preds = %139, %158
%142 = phi i64 [ 0, %139 ], [ %159, %158 ]
%143 = getelementptr inbounds i8*, i8** %12, i64 %142
%144 = load i8*, i8** %143
%145 = call i64 @strcmp(i8* %131, i8* %144)
%146 = icmp eq i64 %145, 0
br i1 %146, label %164, label %147
147: ; preds = %141
%148 = icmp eq i64 %142, 0
br i1 %148, label %158, label %151
149: ; preds = %151
%150 = icmp eq i64 %157, %142
br i1 %150, label %158, label %151
151: ; preds = %147, %149
%152 = phi i64 [ %157, %149 ], [ 0, %147 ]
%153 = getelementptr inbounds i8*, i8** %12, i64 %152
%154 = load i8*, i8** %153
%155 = call i64 @strcmp(i8* %154, i8* %144)
%156 = icmp eq i64 %155, 0
%157 = add nuw nsw i64 %152, 1
br i1 %156, label %164, label %149
158: ; preds = %149, %147
%159 = add nuw nsw i64 %142, 1
%160 = icmp eq i64 %159, %140
br i1 %160, label %161, label %141
161: ; preds = %158, %137
%162 = call i32 @execMultiCopy(i8* %131, i8** %12, i32 %128, i32 %132)
%163 = add i32 %162, 6
br label %164
164: ; preds = %141, %151, %161
%165 = phi i32 [ %163, %161 ], [ 0, %151 ], [ 0, %141 ]
%166 = call i32 @free(i8* %131)
br i1 %138, label %167, label %179
167: ; preds = %164
%168 = zext i32 %128 to i64
br label %169
169: ; preds = %167, %176
%170 = phi i64 [ 0, %167 ], [ %177, %176 ]
%171 = getelementptr inbounds i8*, i8** %12, i64 %170
%172 = load i8*, i8** %171
%173 = icmp eq i8* %172, null
br i1 %173, label %176, label %174
174: ; preds = %169
%175 = call i32 @free(i8* %172)
br label %176
176: ; preds = %169, %174
%177 = add nuw nsw i64 %170, 1
%178 = icmp eq i64 %177, %168
br i1 %178, label %179, label %169
179: ; preds = %176, %164
%180 = icmp ult i32 %165, 6
br i1 %180, label %181, label %188
181: ; preds = %179
%182 = sext i32 %165 to i64
%183 = shl i64 %182, 2
%184 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.main to i8*), i64 %183)
br label %185
185: ; preds = %76, %57, %110, %181, %98, %135, %64, %45
%186 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), %45 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), %64 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), %135 ], [ getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0), %98 ], [ %184, %181 ], [ getelementptr inbounds ([72 x i8], [72 x i8]* @.str.5, i64 0, i64 0), %110 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), %57 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), %76 ]
%187 = call i32 @usage(i8* %186)
br label %188
188: ; preds = %179, %185
%189 = phi i32* [ @EXIT_SUCCESS, %179 ], [ @EXIT_FAILURE, %185 ]
%190 = load i32, i32* %189
br label %191
191: ; preds = %188, %5
%192 = phi i32 [ %7, %5 ], [ %190, %188 ]
ret i32 %192
}