#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;
};
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ *member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ R_OK;
int S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ abort();
int /*<<< orphan*/ access(char *, int /*<<< orphan*/);
char *calloc(int, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ free(char *);
int getopt_long(int, char **, char *, struct option *, int /*<<< orphan*/ *);
char **malloc(int);
scalar_t__ mycp_do_copy(char **, int, char *, int, char **, int, int, int, int,
                        int, int);
int /*<<< orphan*/ mycp_free_sources(char **, int);
int /*<<< orphan*/ no_argument;
char *optarg;
int optind;
int /*<<< orphan*/ perror(char *);
char **realloc(char **, int);
int /*<<< orphan*/ required_argument;
scalar_t__ stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
char *strdup(char *);
char *strerror(int /*<<< orphan*/);
scalar_t__ strlen(char *);
int main(int argc, char *argv[]) {
  int dereference_flag = 1;
  int interactive_flag = 0;
  int no_clobber_flag = 0;
  int no_target_directory_flag = 0;
  int target_directory_flag = 0;
  int update_flag = 0;
  int verbose_flag = 0;
  int c, arg_ind, src_ind;
  int nbr_args;
  char *pgr_name;
  int err_msg_len = 2048;
  char *err_msg;
  char **tmp;
  char **sources;
  int sources_len = 0;
  char *dest = NULL;
  int dest_is_dir;
  int dest_must_be_a_dir;
  int source_error;
  int src_exist;
  struct stat dest_stat;
  struct stat src_stat;
  struct option options[] = {{"dereference", no_argument, NULL, 'L'},
                             {"interactive", no_argument, NULL, 'i'},
                             {"no-clobber", no_argument, NULL, 'n'},
                             {"no-dereference", no_argument, NULL, 'P'},
                             {"no-target-directory", no_argument, NULL, 'T'},
                             {"target-directory", required_argument, NULL, 't'},
                             {"update", no_argument, NULL, 'u'},
                             {"verbose", no_argument, NULL, 'v'},
                             {0, 0, 0, 0}};
  pgr_name = argv[0];
  while ((c = getopt_long(argc, argv, "iLnPt:Tuv", options, NULL)) != -1) {
    switch (c) {
    case 'i':
      interactive_flag = 1;
      no_clobber_flag = 0;
      break;
    case 'L':
      dereference_flag = 1;
      break;
    case 'n':
      no_clobber_flag = 1;
      interactive_flag = 0;
      break;
    case 'P':
      dereference_flag = 0;
      break;
    case 't':
      target_directory_flag = 1;
      if (optarg == NULL) {
        perror(pgr_name);
        return EXIT_FAILURE;
      }
      dest = strdup(optarg);
      if (dest == NULL) {
        perror(pgr_name);
        return EXIT_FAILURE;
      }
      break;
    case 'T':
      no_target_directory_flag = 1;
      break;
    case 'u':
      update_flag = 1;
      break;
    case 'v':
      verbose_flag = 1;
      break;
    default:
      abort();
    }
  }
  nbr_args = argc - optind;
  dest_must_be_a_dir = target_directory_flag || (nbr_args > 2);
  if (nbr_args == 0) {
    fprintf(stderr, "%s: missing file operand\n", pgr_name);
    return EXIT_FAILURE;
  }
  if (nbr_args == 1 && !target_directory_flag) {
    fprintf(stderr, "%s: missing destination file after '%s'\n", pgr_name,
            argv[1]);
    return EXIT_FAILURE;
  }
  if (no_target_directory_flag && dest_must_be_a_dir) {
    fprintf(stderr, "%s: extra operand '%s'\n", pgr_name, dest);
    free(dest);
    return EXIT_FAILURE;
  }
  if (!target_directory_flag) {
    dest = strdup(argv[argc - 1]);
    if (dest == NULL) {
      perror(pgr_name);
      return EXIT_FAILURE;
    }
  }
  dest_is_dir = 0;
  if (!stat(dest, &dest_stat)) {
    dest_is_dir = S_ISDIR(dest_stat.st_mode);
  }
  if (!dest_is_dir && dest_must_be_a_dir) {
    fprintf(stderr, "%s: target '%s' is not a directory\n", pgr_name, dest);
    free(dest);
    return EXIT_FAILURE;
  }
  if (no_target_directory_flag && dest_is_dir) {
    fprintf(stderr, "%s: cannot overwrite directory '%s' with non-directory\n",
            pgr_name, dest);
    free(dest);
    return EXIT_FAILURE;
  }
  if (target_directory_flag) {
    sources_len = nbr_args;
  } else {
    sources_len = nbr_args - 1;
  }
  sources = malloc(sources_len * sizeof(char *));
  if (sources == NULL) {
    perror(pgr_name);
    free(dest);
    return EXIT_FAILURE;
  }
  src_ind = 0;
  source_error = 0;
  src_exist = 0;
  for (arg_ind = optind; arg_ind < optind + sources_len; arg_ind++) {
    src_exist = !access(argv[arg_ind], R_OK);
    if (!src_exist) {
      fprintf(stderr, "%s: cannot stat '%s': %s\n", pgr_name, argv[arg_ind],
              strerror(errno));
      source_error = 1;
    } else {
      if (stat(argv[arg_ind], &src_stat)) {
        perror(pgr_name);
        free(dest);
        mycp_free_sources(sources, src_ind);
        return EXIT_FAILURE;
      }
      if (S_ISDIR(src_stat.st_mode)) {
        fprintf(stderr, "%s: omitting directory '%s'\n", pgr_name,
                argv[arg_ind]);
      } else {
        sources[src_ind] = strdup(argv[arg_ind]);
        if (sources[src_ind] == NULL) {
          perror(pgr_name);
          free(dest);
          mycp_free_sources(sources, src_ind);
          return EXIT_FAILURE;
        }
        src_ind++;
      }
    }
  }
  if (source_error) {
    free(dest);
    mycp_free_sources(sources, src_ind);
    return EXIT_FAILURE;
  }
  tmp = realloc(sources, src_ind * sizeof(char *));
  if (tmp == NULL) {
    perror(pgr_name);
    free(dest);
    mycp_free_sources(sources, sources_len);
    return EXIT_FAILURE;
  }
  sources_len = src_ind;
  sources = tmp;
  err_msg = calloc(err_msg_len, sizeof(char));
  if (err_msg == NULL) {
    perror(pgr_name);
    free(dest);
    mycp_free_sources(sources, sources_len);
    return EXIT_FAILURE;
  }
  if (mycp_do_copy(sources, sources_len, dest, dest_is_dir, &err_msg,
                   err_msg_len, verbose_flag, update_flag, dereference_flag,
                   no_clobber_flag, interactive_flag)) {
    if (strlen(err_msg) > 0) {
      fprintf(stderr, "%s: %s: %s\n", pgr_name, err_msg, strerror(errno));
    } else {
      fprintf(stderr, "%s: failed to copy: %s\n", pgr_name, strerror(errno));
    }
    free(dest);
    free(err_msg);
    mycp_free_sources(sources, sources_len);
    return EXIT_FAILURE;
  }
  free(err_msg);
  mycp_free_sources(sources, sources_len);
  free(dest);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x240,%rsp
movl   $0x0,-0x14(%rbp)
mov    %edi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x800,-0x5c(%rbp)
movl   $0x0,-0x7c(%rbp)
movq   $0x0,-0x88(%rbp)
lea    -0x1d0(%rbp),%rdi
lea    0xe42(%rip),%rax
mov    %rax,-0x1d0(%rbp)
mov    0x2d26(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x1c8(%rbp)
movq   $0x0,-0x1c0(%rbp)
movl   $0x4c,-0x1b8(%rbp)
add    $0x20,%rdi
lea    0xdf2(%rip),%rax
mov    %rax,-0x1b0(%rbp)
mov    0x2cf0(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x1a8(%rbp)
movq   $0x0,-0x1a0(%rbp)
movl   $0x69,-0x198(%rbp)
add    $0x20,%rdi
lea    0xdc8(%rip),%rax
mov    %rax,-0x190(%rbp)
mov    0x2cba(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x188(%rbp)
movq   $0x0,-0x180(%rbp)
movl   $0x6e,-0x178(%rbp)
add    $0x20,%rdi
lea    0xd9d(%rip),%rax
mov    %rax,-0x170(%rbp)
mov    0x2c84(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x168(%rbp)
movq   $0x0,-0x160(%rbp)
movl   $0x50,-0x158(%rbp)
add    $0x20,%rdi
lea    0xd76(%rip),%rax
mov    %rax,-0x150(%rbp)
mov    0x2c4e(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x148(%rbp)
movq   $0x0,-0x140(%rbp)
movl   $0x54,-0x138(%rbp)
add    $0x20,%rdi
lea    0xd43(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0x2c38(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x128(%rbp)
movq   $0x0,-0x120(%rbp)
movl   $0x74,-0x118(%rbp)
add    $0x20,%rdi
lea    0xd1e(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0x2be2(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x108(%rbp)
movq   $0x0,-0x100(%rbp)
movl   $0x75,-0xf8(%rbp)
add    $0x20,%rdi
lea    0xcef(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0x2bac(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xe8(%rbp)
movq   $0x0,-0xe0(%rbp)
movl   $0x76,-0xd8(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   10a0 <memset@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%rsi
lea    -0x1d0(%rbp),%rcx
lea    0xc9c(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1060 <getopt_long@plt>
mov    %eax,-0x40(%rbp)
cmp    $0xffffffff,%eax
je     1581 <main+0x371>
mov    -0x40(%rbp),%eax
add    $0xffffffb4,%eax
mov    %eax,%ecx
mov    %rcx,-0x1d8(%rbp)
sub    $0x2a,%eax
ja     1575 <main+0x365>
mov    -0x1d8(%rbp),%rax
lea    0xb6b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
jmp    157c <main+0x36c>
movl   $0x1,-0x24(%rbp)
jmp    157c <main+0x36c>
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
jmp    157c <main+0x36c>
movl   $0x0,-0x24(%rbp)
jmp    157c <main+0x36c>
movl   $0x1,-0x34(%rbp)
mov    0x2b0e(%rip),%rax
cmpq   $0x0,(%rax)
jne    150e <main+0x2fe>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    0x2aac(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    0x2ae3(%rip),%rax
mov    (%rax),%rdi
call   1120 <strdup@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jne    154c <main+0x33c>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    0x2a6e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
jmp    157c <main+0x36c>
movl   $0x1,-0x30(%rbp)
jmp    157c <main+0x36c>
movl   $0x1,-0x38(%rbp)
jmp    157c <main+0x36c>
movl   $0x1,-0x3c(%rbp)
jmp    157c <main+0x36c>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    1444 <main+0x234>
mov    -0x18(%rbp),%eax
mov    0x2a55(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4c(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0x1d9(%rbp)
jne    15af <main+0x39f>
cmpl   $0x2,-0x4c(%rbp)
setg   %al
mov    %al,-0x1d9(%rbp)
mov    -0x1d9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x0,-0x4c(%rbp)
jne    15f6 <main+0x3e6>
mov    0x29f7(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
lea    0xb21(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x29c4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
cmpl   $0x1,-0x4c(%rbp)
jne    163e <main+0x42e>
cmpl   $0x0,-0x34(%rbp)
jne    163e <main+0x42e>
mov    0x29b7(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xaf3(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    0x297c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
cmpl   $0x0,-0x30(%rbp)
je     1694 <main+0x484>
cmpl   $0x0,-0x90(%rbp)
je     1694 <main+0x484>
mov    0x296c(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
mov    -0x88(%rbp),%rcx
lea    0xad2(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    0x2926(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
cmpl   $0x0,-0x34(%rbp)
jne    16e8 <main+0x4d8>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1120 <strdup@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x88(%rbp)
jne    16e3 <main+0x4d3>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    0x28d7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
jmp    16e8 <main+0x4d8>
movl   $0x0,-0x8c(%rbp)
mov    -0x88(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   10d0 <stat@plt>
cmp    $0x0,%rax
jne    1720 <main+0x510>
mov    -0xa0(%rbp),%edi
call   1070 <S_ISDIR@plt>
mov    %eax,-0x8c(%rbp)
cmpl   $0x0,-0x8c(%rbp)
jne    1779 <main+0x569>
cmpl   $0x0,-0x90(%rbp)
je     1779 <main+0x569>
mov    0x2887(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
mov    -0x88(%rbp),%rcx
lea    0xa05(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    0x2841(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
cmpl   $0x0,-0x30(%rbp)
je     17cf <main+0x5bf>
cmpl   $0x0,-0x8c(%rbp)
je     17cf <main+0x5bf>
mov    0x2831(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
mov    -0x88(%rbp),%rcx
lea    0x9d3(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    0x27eb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
cmpl   $0x0,-0x34(%rbp)
je     17e4 <main+0x5d4>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    17ed <main+0x5dd>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x7c(%rbp)
movslq -0x7c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1831 <main+0x621>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    0x2789(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
mov    0x278d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    0x277e(%rip),%rcx
mov    (%rcx),%ecx
add    -0x7c(%rbp),%ecx
cmp    %ecx,%eax
jge    1a32 <main+0x822>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2726(%rip),%rax
mov    (%rax),%esi
call   1100 <access@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x98(%rbp)
cmpl   $0x0,-0x98(%rbp)
jne    1918 <main+0x708>
mov    0x2718(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x1f0(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x1e8(%rbp)
mov    0x26e3(%rip),%rax
mov    (%rax),%edi
call   1130 <strerror@plt>
mov    -0x1f4(%rbp),%edi
mov    -0x1f0(%rbp),%rdx
mov    -0x1e8(%rbp),%rcx
mov    %rax,%r8
lea    0x8b4(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x1,-0x94(%rbp)
jmp    1a1f <main+0x80f>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0xa8(%rbp),%rsi
call   10d0 <stat@plt>
cmp    $0x0,%rax
je     196c <main+0x75c>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x264e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0xa8(%rbp),%edi
call   1070 <S_ISDIR@plt>
cmp    $0x0,%eax
je     19ac <main+0x79c>
mov    0x2641(%rip),%rax
mov    (%rax),%edi
mov    -0x58(%rbp),%rdx
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0x830(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1a1a <main+0x80a>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1120 <strdup@plt>
mov    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
movslq -0x48(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    1a11 <main+0x801>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x25a9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1a1f <main+0x80f>
jmp    1a24 <main+0x814>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1858 <main+0x648>
cmpl   $0x0,-0x94(%rbp)
je     1a68 <main+0x858>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x48(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x2552(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0x78(%rbp),%rdi
movslq -0x48(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
call   10f0 <realloc@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    1abc <main+0x8ac>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x24fe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0x48(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x5c(%rbp),%edi
mov    $0x1,%esi
call   10b0 <calloc@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    1b18 <main+0x908>
mov    -0x58(%rbp),%rdi
call   1110 <perror@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x24a2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0x78(%rbp),%rdi
mov    -0x7c(%rbp),%esi
mov    -0x88(%rbp),%rdx
mov    -0x8c(%rbp),%ecx
mov    -0x5c(%rbp),%r9d
mov    -0x3c(%rbp),%r14d
mov    -0x38(%rbp),%ebx
mov    -0x24(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    -0x28(%rbp),%eax
lea    -0x68(%rbp),%r8
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1080 <mycp_do_copy@plt>
cmp    $0x0,%rax
je     1c53 <main+0xa43>
mov    -0x68(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jle    1bdb <main+0x9cb>
mov    0x2443(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20c(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x208(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x200(%rbp)
mov    0x2416(%rip),%rax
mov    (%rax),%edi
call   1130 <strerror@plt>
mov    -0x20c(%rbp),%edi
mov    -0x208(%rbp),%rdx
mov    -0x200(%rbp),%rcx
mov    %rax,%r8
lea    0x61e(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
jmp    1c21 <main+0xa11>
mov    0x23e6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x21c(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x218(%rbp)
mov    0x23c4(%rip),%rax
mov    (%rax),%edi
call   1130 <strerror@plt>
mov    -0x21c(%rbp),%edi
mov    -0x218(%rbp),%rdx
mov    %rax,%rcx
lea    0x5df(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    0x2367(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1c80 <main+0xa70>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1090 <mycp_free_sources@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    0x2325(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x240,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
mov    %edi,%ebp
lea    0xeac(%rip),%rax
mov    %rax,0x70(%rsp)
mov    0x2d92(%rip),%rax
mov    (%rax),%al
mov    %al,0x78(%rsp)
movq   $0x0,0x80(%rsp)
movl   $0x4c,0x88(%rsp)
lea    0xe62(%rip),%rcx
mov    %rcx,0x90(%rsp)
mov    %al,0x98(%rsp)
movq   $0x0,0xa0(%rsp)
movl   $0x69,0xa8(%rsp)
lea    0xe41(%rip),%rcx
mov    %rcx,0xb0(%rsp)
mov    %al,0xb8(%rsp)
movq   $0x0,0xc0(%rsp)
movl   $0x6e,0xc8(%rsp)
lea    0xe1f(%rip),%rcx
mov    %rcx,0xd0(%rsp)
mov    %al,0xd8(%rsp)
movq   $0x0,0xe0(%rsp)
movl   $0x50,0xe8(%rsp)
lea    0xe01(%rip),%rcx
mov    %rcx,0xf0(%rsp)
mov    %al,0xf8(%rsp)
movq   $0x0,0x100(%rsp)
movl   $0x54,0x108(%rsp)
lea    0xdd7(%rip),%rcx
mov    %rcx,0x110(%rsp)
mov    0x2ccb(%rip),%rcx
mov    (%rcx),%cl
mov    %cl,0x118(%rsp)
movq   $0x0,0x120(%rsp)
movl   $0x74,0x128(%rsp)
lea    0xdb2(%rip),%rcx
mov    %rcx,0x130(%rsp)
mov    %al,0x138(%rsp)
movq   $0x0,0x140(%rsp)
movl   $0x75,0x148(%rsp)
lea    0xd8c(%rip),%rcx
mov    %rcx,0x150(%rsp)
mov    %al,0x158(%rsp)
movq   $0x0,0x160(%rsp)
movl   $0x76,0x168(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x180(%rsp)
mov    %rsi,0x30(%rsp)
mov    (%rsi),%rax
mov    %rax,0x8(%rsp)
mov    $0x1,%eax
mov    %rax,0x38(%rsp)
xor    %eax,%eax
mov    %rax,0x68(%rsp)
lea    0xd36(%rip),%r13
lea    0x70(%rsp),%rbx
lea    0xc35(%rip),%r12
xor    %eax,%eax
mov    %rax,0x60(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x18(%rsp)
xor    %esi,%esi
xor    %ecx,%ecx
xor    %eax,%eax
mov    %rax,0x10(%rsp)
jmp    13fd <main+0x1fd>
movl   $0x1,0x18(%rsp)
mov    %r15d,%esi
mov    %r14d,%ecx
mov    %ecx,%r14d
mov    %esi,%r15d
mov    %ebp,%edi
mov    0x30(%rsp),%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
call   1060 <getopt_long@plt>
lea    -0x4c(%rax),%ecx
cmp    $0x2a,%ecx
ja     14b2 <main+0x2b2>
movslq (%r12,%rcx,4),%rdx
add    %r12,%rdx
xor    %esi,%esi
mov    $0x1,%ecx
jmp    *%rdx
mov    %r15d,%esi
mov    %r14d,%ecx
mov    $0x1,%eax
mov    %rax,0x38(%rsp)
jmp    13fd <main+0x1fd>
xor    %eax,%eax
mov    %rax,0x38(%rsp)
jmp    13f7 <main+0x1f7>
mov    $0x1,%esi
xor    %ecx,%ecx
jmp    13fd <main+0x1fd>
mov    0x2b99(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     15d4 <main+0x3d4>
call   1110 <strdup@plt>
movl   $0x1,0x28(%rsp)
mov    %r15d,%esi
mov    %r14d,%ecx
mov    %rax,%rdx
mov    %rax,0x10(%rsp)
test   %rax,%rax
jne    13fd <main+0x1fd>
jmp    15d4 <main+0x3d4>
mov    $0x1,%eax
mov    %rax,0x68(%rsp)
jmp    13f7 <main+0x1f7>
mov    $0x1,%eax
mov    %rax,0x60(%rsp)
jmp    13f7 <main+0x1f7>
cmp    $0xffffffff,%eax
jne    193c <main+0x73c>
mov    0x2b1e(%rip),%rax
mov    0x28(%rsp),%edx
test   %edx,%edx
setne  %bl
mov    (%rax),%ecx
mov    %ebp,%eax
sub    %ecx,%eax
cmp    $0x3,%eax
setge  %al
mov    %ebp,%r13d
sub    %ecx,%r13d
je     1513 <main+0x313>
cmp    $0x1,%r13d
jne    1534 <main+0x334>
test   %edx,%edx
jne    1534 <main+0x334>
mov    0x2ad8(%rip),%rax
mov    (%rax),%edi
mov    0x30(%rsp),%rax
mov    0x8(%rax),%rcx
lea    0xc17(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    1612 <main+0x412>
mov    0x2aae(%rip),%rax
mov    (%rax),%edi
lea    0xbdc(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    1612 <main+0x412>
or     %al,%bl
cmpl   $0x0,0x18(%rsp)
setne  %al
and    %bl,%al
cmp    $0x1,%al
mov    0x30(%rsp),%r12
jne    1575 <main+0x375>
mov    0x2a78(%rip),%rax
mov    (%rax),%edi
lea    0xbe9(%rip),%rsi
mov    0x8(%rsp),%rdx
mov    0x10(%rsp),%rbx
mov    %rbx,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %rbx,%rdi
jmp    160d <main+0x40d>
test   %edx,%edx
jne    1593 <main+0x393>
movslq %ebp,%rax
mov    -0x8(%r12,%rax,8),%rdi
call   1110 <strdup@plt>
mov    %rax,%rcx
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     15d4 <main+0x3d4>
lea    0x48(%rsp),%rsi
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   10c0 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
jne    15b7 <main+0x3b7>
mov    0x48(%rsp),%edi
call   1070 <S_ISDIR@plt>
mov    %eax,%ecx
test   %ecx,%ecx
sete   %al
and    %bl,%al
cmp    $0x1,%al
jne    15e0 <main+0x3e0>
mov    0x29ff(%rip),%rax
mov    (%rax),%edi
lea    0xb88(%rip),%rsi
jmp    15fb <main+0x3fb>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
jmp    1612 <main+0x412>
cmpl   $0x0,0x18(%rsp)
je     162d <main+0x42d>
test   %ecx,%ecx
je     162d <main+0x42d>
mov    0x29d6(%rip),%rax
mov    (%rax),%edi
lea    0xb83(%rip),%rsi
mov    0x8(%rsp),%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x2997(%rip),%rax
mov    (%rax),%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ecx,0x58(%rsp)
cmpl   $0x1,0x28(%rsp)
sbb    $0x0,%r13d
lea    0x0(,%r13,8),%edi
call   10d0 <malloc@plt>
test   %rax,%rax
je     18ce <main+0x6ce>
test   %r13d,%r13d
mov    %rax,0x20(%rsp)
jle    1792 <main+0x592>
mov    0x297b(%rip),%rax
movslq (%rax),%rbp
movslq %r13d,%rax
mov    %rax,0x28(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
mov    %rax,0x18(%rsp)
jmp    16e1 <main+0x4e1>
nopl   0x0(%rax,%rax,1)
mov    0x2941(%rip),%rax
mov    (%rax),%ebx
mov    0x30(%rsp),%rax
mov    (%rax,%rbp,8),%r12
mov    0x2927(%rip),%rax
mov    (%rax),%edi
call   1120 <strerror@plt>
mov    %ebx,%edi
lea    0xb0d(%rip),%rsi
mov    0x8(%rsp),%rdx
mov    %r12,%rcx
mov    0x30(%rsp),%r12
mov    %rax,%r8
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%ebx
add    $0x1,%rbp
mov    0x2910(%rip),%rax
movslq (%rax),%rax
add    0x28(%rsp),%rax
cmp    %rax,%rbp
jge    1775 <main+0x575>
mov    (%r12,%rbp,8),%rdi
mov    0x28bc(%rip),%rax
mov    (%rax),%esi
call   10f0 <access@plt>
test   %eax,%eax
jne    1680 <main+0x480>
mov    (%r12,%rbp,8),%rdi
lea    0x40(%rsp),%rsi
call   10c0 <stat@plt>
test   %rax,%rax
jne    1912 <main+0x712>
mov    0x40(%rsp),%edi
call   1070 <S_ISDIR@plt>
test   %eax,%eax
je     173d <main+0x53d>
mov    0x28a6(%rip),%rax
mov    (%rax),%edi
mov    (%r12,%rbp,8),%rcx
lea    0xaa1(%rip),%rsi
mov    0x8(%rsp),%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    16c5 <main+0x4c5>
mov    %ebx,0x5c(%rsp)
mov    (%r12,%rbp,8),%rdi
call   1110 <strdup@plt>
mov    0x18(%rsp),%rbx
movslq %ebx,%rcx
mov    0x20(%rsp),%rdx
mov    %rax,(%rdx,%rcx,8)
test   %rax,%rax
je     1921 <main+0x721>
add    $0x1,%ebx
mov    %rbx,0x18(%rsp)
mov    0x5c(%rsp),%ebx
jmp    16c5 <main+0x4c5>
test   %ebx,%ebx
je     1796 <main+0x596>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
mov    0x18(%rsp),%rsi
jmp    18c4 <main+0x6c4>
xor    %ebx,%ebx
jmp    17a5 <main+0x5a5>
mov    0x10(%rsp),%rbp
mov    0x18(%rsp),%rbx
mov    0x20(%rsp),%rax
lea    0x0(,%rbx,8),%esi
mov    %rax,%rdi
call   10e0 <realloc@plt>
test   %rax,%rax
je     18dd <main+0x6dd>
mov    %rax,%r12
mov    $0x800,%edi
mov    $0x1,%esi
call   10a0 <calloc@plt>
mov    %rax,0x50(%rsp)
test   %rax,%rax
je     18f9 <main+0x6f9>
sub    $0x8,%rsp
lea    0x58(%rsp),%r8
mov    %r12,%rdi
mov    %ebx,%esi
mov    %rbp,%rdx
mov    0x60(%rsp),%ecx
mov    $0x800,%r9d
push   %r14
push   %r15
push   0x50(%rsp)
push   0x88(%rsp)
push   0x88(%rsp)
call   1080 <mycp_do_copy@plt>
add    $0x30,%rsp
mov    %rbx,%r14
mov    0x50(%rsp),%rbx
test   %rax,%rax
je     186a <main+0x66a>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rax,%rbp
mov    0x2792(%rip),%rax
mov    (%rax),%r13d
mov    0x2780(%rip),%rax
mov    (%rax),%edi
call   1120 <strerror@plt>
test   %rbp,%rbp
jle    1891 <main+0x691>
lea    0x99a(%rip),%rsi
mov    %r13d,%edi
mov    0x8(%rsp),%rdx
mov    %rbx,%rcx
mov    %rax,%r8
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    18aa <main+0x6aa>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
mov    %r14d,%esi
call   1090 <mycp_free_sources@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x2714(%rip),%rax
jmp    1619 <main+0x419>
lea    0x961(%rip),%rsi
mov    %r13d,%edi
mov    0x8(%rsp),%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    %r12,%rdi
mov    %r14d,%esi
call   1090 <mycp_free_sources@plt>
jmp    1612 <main+0x412>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
jmp    160a <main+0x40a>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
mov    %r13d,%esi
jmp    18c4 <main+0x6c4>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
mov    %ebx,%esi
jmp    18c4 <main+0x6c4>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
jmp    1779 <main+0x579>
mov    0x8(%rsp),%rdi
call   1100 <perror@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
jmp    190e <main+0x70e>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [12 x i8] c"dereference\00"
@no_argument = global i32 0
@.str.1 = [12 x i8] c"interactive\00"
@.str.2 = [11 x i8] c"no-clobber\00"
@.str.3 = [15 x i8] c"no-dereference\00"
@.str.4 = [20 x i8] c"no-target-directory\00"
@.str.5 = [17 x i8] c"target-directory\00"
@required_argument = global i32 0
@.str.6 = [7 x i8] c"update\00"
@.str.7 = [8 x i8] c"verbose\00"
@.str.8 = [10 x i8] c"iLnPt:Tuv\00"
@optarg = global i8* null
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@stderr = global i32 0
@.str.9 = [26 x i8] c"%s: missing file operand\0A\00"
@.str.10 = [41 x i8] c"%s: missing destination file after '%s'\0A\00"
@.str.11 = [24 x i8] c"%s: extra operand '%s'\0A\00"
@.str.12 = [36 x i8] c"%s: target '%s' is not a directory\0A\00"
@.str.13 = [56 x i8] c"%s: cannot overwrite directory '%s' with non-directory\0A\00"
@R_OK = global i32 0
@.str.14 = [26 x i8] c"%s: cannot stat '%s': %s\0A\00"
@errno = global i32 0
@.str.15 = [29 x i8] c"%s: omitting directory '%s'\0A\00"
@.str.16 = [12 x i8] c"%s: %s: %s\0A\00"
@.str.17 = [24 x i8] c"%s: failed to copy: %s\0A\00"
@EXIT_SUCCESS = global i32 0
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 i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i8**
%21 = alloca i8**
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca %struct.stat
%29 = alloca %struct.stat
%30 = alloca [9 x %struct.option]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 2048, i32* %18
store i32 0, i32* %22
store i8* null, i8** %23
%31 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %30, i64 0, i64 0
%32 = getelementptr inbounds %struct.option, %struct.option* %31, i32 0, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %32
%33 = getelementptr inbounds %struct.option, %struct.option* %31, i32 0, i32 1
%34 = load i32, i32* @no_argument
%35 = trunc i32 %34 to i8
store i8 %35, i8* %33
%36 = getelementptr inbounds %struct.option, %struct.option* %31, i32 0, i32 2
store i32* null, i32** %36
%37 = getelementptr inbounds %struct.option, %struct.option* %31, i32 0, i32 3
store i32 76, i32* %37
%38 = getelementptr inbounds %struct.option, %struct.option* %31, i64 1
%39 = getelementptr inbounds %struct.option, %struct.option* %38, i32 0, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %39
%40 = getelementptr inbounds %struct.option, %struct.option* %38, i32 0, i32 1
%41 = load i32, i32* @no_argument
%42 = trunc i32 %41 to i8
store i8 %42, i8* %40
%43 = getelementptr inbounds %struct.option, %struct.option* %38, i32 0, i32 2
store i32* null, i32** %43
%44 = getelementptr inbounds %struct.option, %struct.option* %38, i32 0, i32 3
store i32 105, i32* %44
%45 = getelementptr inbounds %struct.option, %struct.option* %38, i64 1
%46 = getelementptr inbounds %struct.option, %struct.option* %45, i32 0, i32 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %46
%47 = getelementptr inbounds %struct.option, %struct.option* %45, i32 0, i32 1
%48 = load i32, i32* @no_argument
%49 = trunc i32 %48 to i8
store i8 %49, i8* %47
%50 = getelementptr inbounds %struct.option, %struct.option* %45, i32 0, i32 2
store i32* null, i32** %50
%51 = getelementptr inbounds %struct.option, %struct.option* %45, i32 0, i32 3
store i32 110, i32* %51
%52 = getelementptr inbounds %struct.option, %struct.option* %45, i64 1
%53 = getelementptr inbounds %struct.option, %struct.option* %52, i32 0, i32 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8** %53
%54 = getelementptr inbounds %struct.option, %struct.option* %52, i32 0, i32 1
%55 = load i32, i32* @no_argument
%56 = trunc i32 %55 to i8
store i8 %56, i8* %54
%57 = getelementptr inbounds %struct.option, %struct.option* %52, i32 0, i32 2
store i32* null, i32** %57
%58 = getelementptr inbounds %struct.option, %struct.option* %52, i32 0, i32 3
store i32 80, i32* %58
%59 = getelementptr inbounds %struct.option, %struct.option* %52, i64 1
%60 = getelementptr inbounds %struct.option, %struct.option* %59, i32 0, i32 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8** %60
%61 = getelementptr inbounds %struct.option, %struct.option* %59, i32 0, i32 1
%62 = load i32, i32* @no_argument
%63 = trunc i32 %62 to i8
store i8 %63, i8* %61
%64 = getelementptr inbounds %struct.option, %struct.option* %59, i32 0, i32 2
store i32* null, i32** %64
%65 = getelementptr inbounds %struct.option, %struct.option* %59, i32 0, i32 3
store i32 84, i32* %65
%66 = getelementptr inbounds %struct.option, %struct.option* %59, i64 1
%67 = getelementptr inbounds %struct.option, %struct.option* %66, i32 0, i32 0
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %67
%68 = getelementptr inbounds %struct.option, %struct.option* %66, i32 0, i32 1
%69 = load i32, i32* @required_argument
%70 = trunc i32 %69 to i8
store i8 %70, i8* %68
%71 = getelementptr inbounds %struct.option, %struct.option* %66, i32 0, i32 2
store i32* null, i32** %71
%72 = getelementptr inbounds %struct.option, %struct.option* %66, i32 0, i32 3
store i32 116, i32* %72
%73 = getelementptr inbounds %struct.option, %struct.option* %66, i64 1
%74 = getelementptr inbounds %struct.option, %struct.option* %73, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %74
%75 = getelementptr inbounds %struct.option, %struct.option* %73, i32 0, i32 1
%76 = load i32, i32* @no_argument
%77 = trunc i32 %76 to i8
store i8 %77, i8* %75
%78 = getelementptr inbounds %struct.option, %struct.option* %73, i32 0, i32 2
store i32* null, i32** %78
%79 = getelementptr inbounds %struct.option, %struct.option* %73, i32 0, i32 3
store i32 117, i32* %79
%80 = getelementptr inbounds %struct.option, %struct.option* %73, i64 1
%81 = getelementptr inbounds %struct.option, %struct.option* %80, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %81
%82 = getelementptr inbounds %struct.option, %struct.option* %80, i32 0, i32 1
%83 = load i32, i32* @no_argument
%84 = trunc i32 %83 to i8
store i8 %84, i8* %82
%85 = getelementptr inbounds %struct.option, %struct.option* %80, i32 0, i32 2
store i32* null, i32** %85
%86 = getelementptr inbounds %struct.option, %struct.option* %80, i32 0, i32 3
store i32 118, i32* %86
%87 = getelementptr inbounds %struct.option, %struct.option* %80, i64 1
%88 = bitcast %struct.option* %87 to i8*
%89 = load i8**, i8*** %5
%90 = getelementptr inbounds i8*, i8** %89, i64 0
%91 = load i8*, i8** %90
store i8* %91, i8** %17
br label %92
92: ; preds = %126, %2
%93 = load i32, i32* %4
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %30, i64 0, i64 0
%96 = call i32 @getopt_long(i32 %93, i8** %94, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), %struct.option* %95, i32* null)
store i32 %96, i32* %13
%97 = icmp ne i32 %96, -1
br i1 %97, label %98, label %127
98: ; preds = %92
%99 = load i32, i32* %13
switch i32 %99, label %124 [
i32 105, label %100
i32 76, label %101
i32 110, label %102
i32 80, label %103
i32 116, label %104
i32 84, label %121
i32 117, label %122
i32 118, label %123
]
100: ; preds = %98
store i32 1, i32* %7
store i32 0, i32* %8
br label %126
101: ; preds = %98
store i32 1, i32* %6
br label %126
102: ; preds = %98
store i32 1, i32* %8
store i32 0, i32* %7
br label %126
103: ; preds = %98
store i32 0, i32* %6
br label %126
104: ; preds = %98
store i32 1, i32* %10
%105 = load i8*, i8** @optarg
%106 = icmp eq i8* %105, null
br i1 %106, label %107, label %111
107: ; preds = %104
%108 = load i8*, i8** %17
%109 = call i32 @perror(i8* %108)
%110 = load i32, i32* @EXIT_FAILURE
store i32 %110, i32* %3
br label %439
111: ; preds = %104
%112 = load i8*, i8** @optarg
%113 = call i8* @strdup(i8* %112)
store i8* %113, i8** %23
%114 = load i8*, i8** %23
%115 = icmp eq i8* %114, null
br i1 %115, label %116, label %120
116: ; preds = %111
%117 = load i8*, i8** %17
%118 = call i32 @perror(i8* %117)
%119 = load i32, i32* @EXIT_FAILURE
store i32 %119, i32* %3
br label %439
120: ; preds = %111
br label %126
121: ; preds = %98
store i32 1, i32* %9
br label %126
122: ; preds = %98
store i32 1, i32* %11
br label %126
123: ; preds = %98
store i32 1, i32* %12
br label %126
124: ; preds = %98
%125 = call i32 (...) @abort()
unreachable
126: ; preds = %123, %122, %121, %120, %103, %102, %101, %100
br label %92
127: ; preds = %92
%128 = load i32, i32* %4
%129 = load i32, i32* @optind
%130 = sub nsw i32 %128, %129
store i32 %130, i32* %16
%131 = load i32, i32* %10
%132 = icmp ne i32 %131, 0
br i1 %132, label %136, label %133
133: ; preds = %127
%134 = load i32, i32* %16
%135 = icmp sgt i32 %134, 2
br label %136
136: ; preds = %133, %127
%137 = phi i1 [ true, %127 ], [ %135, %133 ]
%138 = zext i1 %137 to i32
store i32 %138, i32* %25
%139 = load i32, i32* %16
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %146
141: ; preds = %136
%142 = load i32, i32* @stderr
%143 = load i8*, i8** %17
%144 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %143)
%145 = load i32, i32* @EXIT_FAILURE
store i32 %145, i32* %3
br label %439
146: ; preds = %136
%147 = load i32, i32* %16
%148 = icmp eq i32 %147, 1
br i1 %148, label %149, label %160
149: ; preds = %146
%150 = load i32, i32* %10
%151 = icmp ne i32 %150, 0
br i1 %151, label %160, label %152
152: ; preds = %149
%153 = load i32, i32* @stderr
%154 = load i8*, i8** %17
%155 = load i8**, i8*** %5
%156 = getelementptr inbounds i8*, i8** %155, i64 1
%157 = load i8*, i8** %156
%158 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %153, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i8* %154, i8* %157)
%159 = load i32, i32* @EXIT_FAILURE
store i32 %159, i32* %3
br label %439
160: ; preds = %149, %146
%161 = load i32, i32* %9
%162 = icmp ne i32 %161, 0
br i1 %162, label %163, label %174
163: ; preds = %160
%164 = load i32, i32* %25
%165 = icmp ne i32 %164, 0
br i1 %165, label %166, label %174
166: ; preds = %163
%167 = load i32, i32* @stderr
%168 = load i8*, i8** %17
%169 = load i8*, i8** %23
%170 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %167, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i8* %168, i8* %169)
%171 = load i8*, i8** %23
%172 = call i32 @free(i8* %171)
%173 = load i32, i32* @EXIT_FAILURE
store i32 %173, i32* %3
br label %439
174: ; preds = %163, %160
%175 = load i32, i32* %10
%176 = icmp ne i32 %175, 0
br i1 %176, label %192, label %177
177: ; preds = %174
%178 = load i8**, i8*** %5
%179 = load i32, i32* %4
%180 = sub nsw i32 %179, 1
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i8*, i8** %178, i64 %181
%183 = load i8*, i8** %182
%184 = call i8* @strdup(i8* %183)
store i8* %184, i8** %23
%185 = load i8*, i8** %23
%186 = icmp eq i8* %185, null
br i1 %186, label %187, label %191
187: ; preds = %177
%188 = load i8*, i8** %17
%189 = call i32 @perror(i8* %188)
%190 = load i32, i32* @EXIT_FAILURE
store i32 %190, i32* %3
br label %439
191: ; preds = %177
br label %192
192: ; preds = %191, %174
store i32 0, i32* %24
%193 = load i8*, i8** %23
%194 = call i64 @stat(i8* %193, %struct.stat* %28)
%195 = icmp ne i64 %194, 0
br i1 %195, label %200, label %196
196: ; preds = %192
%197 = getelementptr inbounds %struct.stat, %struct.stat* %28, i32 0, i32 0
%198 = load i32, i32* %197
%199 = call i32 @S_ISDIR(i32 %198)
store i32 %199, i32* %24
br label %200
200: ; preds = %196, %192
%201 = load i32, i32* %24
%202 = icmp ne i32 %201, 0
br i1 %202, label %214, label %203
203: ; preds = %200
%204 = load i32, i32* %25
%205 = icmp ne i32 %204, 0
br i1 %205, label %206, label %214
206: ; preds = %203
%207 = load i32, i32* @stderr
%208 = load i8*, i8** %17
%209 = load i8*, i8** %23
%210 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %207, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i8* %208, i8* %209)
%211 = load i8*, i8** %23
%212 = call i32 @free(i8* %211)
%213 = load i32, i32* @EXIT_FAILURE
store i32 %213, i32* %3
br label %439
214: ; preds = %203, %200
%215 = load i32, i32* %9
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %228
217: ; preds = %214
%218 = load i32, i32* %24
%219 = icmp ne i32 %218, 0
br i1 %219, label %220, label %228
220: ; preds = %217
%221 = load i32, i32* @stderr
%222 = load i8*, i8** %17
%223 = load i8*, i8** %23
%224 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %221, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.13, i64 0, i64 0), i8* %222, i8* %223)
%225 = load i8*, i8** %23
%226 = call i32 @free(i8* %225)
%227 = load i32, i32* @EXIT_FAILURE
store i32 %227, i32* %3
br label %439
228: ; preds = %217, %214
%229 = load i32, i32* %10
%230 = icmp ne i32 %229, 0
br i1 %230, label %231, label %233
231: ; preds = %228
%232 = load i32, i32* %16
store i32 %232, i32* %22
br label %236
233: ; preds = %228
%234 = load i32, i32* %16
%235 = sub nsw i32 %234, 1
store i32 %235, i32* %22
br label %236
236: ; preds = %233, %231
%237 = load i32, i32* %22
%238 = sext i32 %237 to i64
%239 = mul i64 %238, 8
%240 = trunc i64 %239 to i32
%241 = call i8** @malloc(i32 %240)
store i8** %241, i8*** %21
%242 = load i8**, i8*** %21
%243 = icmp eq i8** %242, null
br i1 %243, label %244, label %250
244: ; preds = %236
%245 = load i8*, i8** %17
%246 = call i32 @perror(i8* %245)
%247 = load i8*, i8** %23
%248 = call i32 @free(i8* %247)
%249 = load i32, i32* @EXIT_FAILURE
store i32 %249, i32* %3
br label %439
250: ; preds = %236
store i32 0, i32* %15
store i32 0, i32* %26
store i32 0, i32* %27
%251 = load i32, i32* @optind
store i32 %251, i32* %14
br label %252
252: ; preds = %344, %250
%253 = load i32, i32* %14
%254 = load i32, i32* @optind
%255 = load i32, i32* %22
%256 = add nsw i32 %254, %255
%257 = icmp slt i32 %253, %256
br i1 %257, label %258, label %347
258: ; preds = %252
%259 = load i8**, i8*** %5
%260 = load i32, i32* %14
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds i8*, i8** %259, i64 %261
%263 = load i8*, i8** %262
%264 = load i32, i32* @R_OK
%265 = call i32 @access(i8* %263, i32 %264)
%266 = icmp ne i32 %265, 0
%267 = xor i1 %266, true
%268 = zext i1 %267 to i32
store i32 %268, i32* %27
%269 = load i32, i32* %27
%270 = icmp ne i32 %269, 0
br i1 %270, label %282, label %271
271: ; preds = %258
%272 = load i32, i32* @stderr
%273 = load i8*, i8** %17
%274 = load i8**, i8*** %5
%275 = load i32, i32* %14
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds i8*, i8** %274, i64 %276
%278 = load i8*, i8** %277
%279 = load i32, i32* @errno
%280 = call i8* @strerror(i32 %279)
%281 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %272, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8* %273, i8* %278, i8* %280)
store i32 1, i32* %26
br label %343
282: ; preds = %258
%283 = load i8**, i8*** %5
%284 = load i32, i32* %14
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds i8*, i8** %283, i64 %285
%287 = load i8*, i8** %286
%288 = call i64 @stat(i8* %287, %struct.stat* %29)
%289 = icmp ne i64 %288, 0
br i1 %289, label %290, label %299
290: ; preds = %282
%291 = load i8*, i8** %17
%292 = call i32 @perror(i8* %291)
%293 = load i8*, i8** %23
%294 = call i32 @free(i8* %293)
%295 = load i8**, i8*** %21
%296 = load i32, i32* %15
%297 = call i32 @mycp_free_sources(i8** %295, i32 %296)
%298 = load i32, i32* @EXIT_FAILURE
store i32 %298, i32* %3
br label %439
299: ; preds = %282
%300 = getelementptr inbounds %struct.stat, %struct.stat* %29, i32 0, i32 0
%301 = load i32, i32* %300
%302 = call i32 @S_ISDIR(i32 %301)
%303 = icmp ne i32 %302, 0
br i1 %303, label %304, label %313
304: ; preds = %299
%305 = load i32, i32* @stderr
%306 = load i8*, i8** %17
%307 = load i8**, i8*** %5
%308 = load i32, i32* %14
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds i8*, i8** %307, i64 %309
%311 = load i8*, i8** %310
%312 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %305, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i8* %306, i8* %311)
br label %342
313: ; preds = %299
%314 = load i8**, i8*** %5
%315 = load i32, i32* %14
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds i8*, i8** %314, i64 %316
%318 = load i8*, i8** %317
%319 = call i8* @strdup(i8* %318)
%320 = load i8**, i8*** %21
%321 = load i32, i32* %15
%322 = sext i32 %321 to i64
%323 = getelementptr inbounds i8*, i8** %320, i64 %322
store i8* %319, i8** %323
%324 = load i8**, i8*** %21
%325 = load i32, i32* %15
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i8*, i8** %324, i64 %326
%328 = load i8*, i8** %327
%329 = icmp eq i8* %328, null
br i1 %329, label %330, label %339
330: ; preds = %313
%331 = load i8*, i8** %17
%332 = call i32 @perror(i8* %331)
%333 = load i8*, i8** %23
%334 = call i32 @free(i8* %333)
%335 = load i8**, i8*** %21
%336 = load i32, i32* %15
%337 = call i32 @mycp_free_sources(i8** %335, i32 %336)
%338 = load i32, i32* @EXIT_FAILURE
store i32 %338, i32* %3
br label %439
339: ; preds = %313
%340 = load i32, i32* %15
%341 = add nsw i32 %340, 1
store i32 %341, i32* %15
br label %342
342: ; preds = %339, %304
br label %343
343: ; preds = %342, %271
br label %344
344: ; preds = %343
%345 = load i32, i32* %14
%346 = add nsw i32 %345, 1
store i32 %346, i32* %14
br label %252
347: ; preds = %252
%348 = load i32, i32* %26
%349 = icmp ne i32 %348, 0
br i1 %349, label %350, label %357
350: ; preds = %347
%351 = load i8*, i8** %23
%352 = call i32 @free(i8* %351)
%353 = load i8**, i8*** %21
%354 = load i32, i32* %15
%355 = call i32 @mycp_free_sources(i8** %353, i32 %354)
%356 = load i32, i32* @EXIT_FAILURE
store i32 %356, i32* %3
br label %439
357: ; preds = %347
%358 = load i8**, i8*** %21
%359 = load i32, i32* %15
%360 = sext i32 %359 to i64
%361 = mul i64 %360, 8
%362 = trunc i64 %361 to i32
%363 = call i8** @realloc(i8** %358, i32 %362)
store i8** %363, i8*** %20
%364 = load i8**, i8*** %20
%365 = icmp eq i8** %364, null
br i1 %365, label %366, label %375
366: ; preds = %357
%367 = load i8*, i8** %17
%368 = call i32 @perror(i8* %367)
%369 = load i8*, i8** %23
%370 = call i32 @free(i8* %369)
%371 = load i8**, i8*** %21
%372 = load i32, i32* %22
%373 = call i32 @mycp_free_sources(i8** %371, i32 %372)
%374 = load i32, i32* @EXIT_FAILURE
store i32 %374, i32* %3
br label %439
375: ; preds = %357
%376 = load i32, i32* %15
store i32 %376, i32* %22
%377 = load i8**, i8*** %20
store i8** %377, i8*** %21
%378 = load i32, i32* %18
%379 = call i8* @calloc(i32 %378, i32 1)
store i8* %379, i8** %19
%380 = load i8*, i8** %19
%381 = icmp eq i8* %380, null
br i1 %381, label %382, label %391
382: ; preds = %375
%383 = load i8*, i8** %17
%384 = call i32 @perror(i8* %383)
%385 = load i8*, i8** %23
%386 = call i32 @free(i8* %385)
%387 = load i8**, i8*** %21
%388 = load i32, i32* %22
%389 = call i32 @mycp_free_sources(i8** %387, i32 %388)
%390 = load i32, i32* @EXIT_FAILURE
store i32 %390, i32* %3
br label %439
391: ; preds = %375
%392 = load i8**, i8*** %21
%393 = load i32, i32* %22
%394 = load i8*, i8** %23
%395 = load i32, i32* %24
%396 = load i32, i32* %18
%397 = load i32, i32* %12
%398 = load i32, i32* %11
%399 = load i32, i32* %6
%400 = load i32, i32* %8
%401 = load i32, i32* %7
%402 = call i64 @mycp_do_copy(i8** %392, i32 %393, i8* %394, i32 %395, i8** %19, i32 %396, i32 %397, i32 %398, i32 %399, i32 %400, i32 %401)
%403 = icmp ne i64 %402, 0
br i1 %403, label %404, label %430
404: ; preds = %391
%405 = load i8*, i8** %19
%406 = call i64 @strlen(i8* %405)
%407 = icmp sgt i64 %406, 0
br i1 %407, label %408, label %415
408: ; preds = %404
%409 = load i32, i32* @stderr
%410 = load i8*, i8** %17
%411 = load i8*, i8** %19
%412 = load i32, i32* @errno
%413 = call i8* @strerror(i32 %412)
%414 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %409, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i8* %410, i8* %411, i8* %413)
br label %421
415: ; preds = %404
%416 = load i32, i32* @stderr
%417 = load i8*, i8** %17
%418 = load i32, i32* @errno
%419 = call i8* @strerror(i32 %418)
%420 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %416, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i8* %417, i8* %419)
br label %421
421: ; preds = %415, %408
%422 = load i8*, i8** %23
%423 = call i32 @free(i8* %422)
%424 = load i8*, i8** %19
%425 = call i32 @free(i8* %424)
%426 = load i8**, i8*** %21
%427 = load i32, i32* %22
%428 = call i32 @mycp_free_sources(i8** %426, i32 %427)
%429 = load i32, i32* @EXIT_FAILURE
store i32 %429, i32* %3
br label %439
430: ; preds = %391
%431 = load i8*, i8** %19
%432 = call i32 @free(i8* %431)
%433 = load i8**, i8*** %21
%434 = load i32, i32* %22
%435 = call i32 @mycp_free_sources(i8** %433, i32 %434)
%436 = load i8*, i8** %23
%437 = call i32 @free(i8* %436)
%438 = load i32, i32* @EXIT_SUCCESS
store i32 %438, i32* %3
br label %439
439: ; preds = %430, %421, %382, %366, %350, %330, %290, %244, %220, %206, %187, %166, %152, %141, %116, %107
%440 = load i32, i32* %3
ret i32 %440
}

LLVM IR (-O2):
%struct.stat = type { i32 }
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [12 x i8] c"dereference\00"
@no_argument = global i32 0
@.str.1 = [12 x i8] c"interactive\00"
@.str.2 = [11 x i8] c"no-clobber\00"
@.str.3 = [15 x i8] c"no-dereference\00"
@.str.4 = [20 x i8] c"no-target-directory\00"
@.str.5 = [17 x i8] c"target-directory\00"
@required_argument = global i32 0
@.str.6 = [7 x i8] c"update\00"
@.str.7 = [8 x i8] c"verbose\00"
@.str.8 = [10 x i8] c"iLnPt:Tuv\00"
@optarg = global i8* null
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@stderr = global i32 0
@.str.9 = [26 x i8] c"%s: missing file operand\0A\00"
@.str.10 = [41 x i8] c"%s: missing destination file after '%s'\0A\00"
@.str.11 = [24 x i8] c"%s: extra operand '%s'\0A\00"
@.str.12 = [36 x i8] c"%s: target '%s' is not a directory\0A\00"
@.str.13 = [56 x i8] c"%s: cannot overwrite directory '%s' with non-directory\0A\00"
@R_OK = global i32 0
@.str.14 = [26 x i8] c"%s: cannot stat '%s': %s\0A\00"
@errno = global i32 0
@.str.15 = [29 x i8] c"%s: omitting directory '%s'\0A\00"
@.str.16 = [12 x i8] c"%s: %s: %s\0A\00"
@.str.17 = [24 x i8] c"%s: failed to copy: %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca %struct.stat
%6 = alloca [9 x %struct.option]
%7 = bitcast i8** %3 to i8*
%8 = bitcast %struct.stat* %4 to i8*
%9 = bitcast %struct.stat* %5 to i8*
%10 = bitcast [9 x %struct.option]* %6 to i8*
%11 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 0
%12 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 0, i32 1
%14 = load i32, i32* @no_argument
%15 = trunc i32 %14 to i8
store i8 %15, i8* %13
%16 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 0, i32 2
store i32* null, i32** %16
%17 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 0, i32 3
store i32 76, i32* %17
%18 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %18
%19 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 1, i32 1
store i8 %15, i8* %19
%20 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 1, i32 2
store i32* null, i32** %20
%21 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 1, i32 3
store i32 105, i32* %21
%22 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %22
%23 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 2, i32 1
store i8 %15, i8* %23
%24 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 2, i32 2
store i32* null, i32** %24
%25 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 2, i32 3
store i32 110, i32* %25
%26 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 3, i32 1
store i8 %15, i8* %27
%28 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 3, i32 2
store i32* null, i32** %28
%29 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 3, i32 3
store i32 80, i32* %29
%30 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8** %30
%31 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 4, i32 1
store i8 %15, i8* %31
%32 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 4, i32 2
store i32* null, i32** %32
%33 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 4, i32 3
store i32 84, i32* %33
%34 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %34
%35 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 5, i32 1
%36 = load i32, i32* @required_argument
%37 = trunc i32 %36 to i8
store i8 %37, i8* %35
%38 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 5, i32 2
store i32* null, i32** %38
%39 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 5, i32 3
store i32 116, i32* %39
%40 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 6, i32 1
store i8 %15, i8* %41
%42 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 6, i32 2
store i32* null, i32** %42
%43 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 6, i32 3
store i32 117, i32* %43
%44 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 7, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %44
%45 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 7, i32 1
store i8 %15, i8* %45
%46 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 7, i32 2
store i32* null, i32** %46
%47 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 7, i32 3
store i32 118, i32* %47
%48 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %6, i64 0, i64 8
%49 = bitcast %struct.option* %48 to i8*
%50 = load i8*, i8** %1
br label %51
51: ; preds = %61, %2
%52 = phi i32 [ 0, %2 ], [ %62, %61 ]
%53 = phi i32 [ 0, %2 ], [ %63, %61 ]
%54 = phi i32 [ 0, %2 ], [ %64, %61 ]
%55 = phi i32 [ 0, %2 ], [ %65, %61 ]
%56 = phi i32 [ 0, %2 ], [ %66, %61 ]
%57 = phi i32 [ 0, %2 ], [ %67, %61 ]
%58 = phi i32 [ 1, %2 ], [ %68, %61 ]
%59 = phi i8* [ null, %2 ], [ %69, %61 ]
%60 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), %struct.option* %11, i32* null)
switch i32 %60, label %86 [
i32 -1, label %88
i32 105, label %61
i32 76, label %70
i32 110, label %71
i32 80, label %72
i32 116, label %73
i32 84, label %83
i32 117, label %84
i32 118, label %85
]
61: ; preds = %51, %78, %85, %84, %83, %72, %71, %70
%62 = phi i32 [ %52, %85 ], [ 1, %84 ], [ %52, %83 ], [ %52, %78 ], [ %52, %72 ], [ %52, %71 ], [ %52, %70 ], [ %52, %51 ]
%63 = phi i32 [ 1, %85 ], [ %53, %84 ], [ %53, %83 ], [ %53, %78 ], [ %53, %72 ], [ %53, %71 ], [ %53, %70 ], [ %53, %51 ]
%64 = phi i32 [ %54, %85 ], [ %54, %84 ], [ %54, %83 ], [ 1, %78 ], [ %54, %72 ], [ %54, %71 ], [ %54, %70 ], [ %54, %51 ]
%65 = phi i32 [ %55, %85 ], [ %55, %84 ], [ 1, %83 ], [ %55, %78 ], [ %55, %72 ], [ %55, %71 ], [ %55, %70 ], [ %55, %51 ]
%66 = phi i32 [ %56, %85 ], [ %56, %84 ], [ %56, %83 ], [ %56, %78 ], [ %56, %72 ], [ 1, %71 ], [ %56, %70 ], [ 0, %51 ]
%67 = phi i32 [ %57, %85 ], [ %57, %84 ], [ %57, %83 ], [ %57, %78 ], [ %57, %72 ], [ 0, %71 ], [ %57, %70 ], [ 1, %51 ]
%68 = phi i32 [ %58, %85 ], [ %58, %84 ], [ %58, %83 ], [ %58, %78 ], [ 0, %72 ], [ %58, %71 ], [ 1, %70 ], [ %58, %51 ]
%69 = phi i8* [ %59, %85 ], [ %59, %84 ], [ %59, %83 ], [ %79, %78 ], [ %59, %72 ], [ %59, %71 ], [ %59, %70 ], [ %59, %51 ]
br label %51
70: ; preds = %51
br label %61
71: ; preds = %51
br label %61
72: ; preds = %51
br label %61
73: ; preds = %51
%74 = load i8*, i8** @optarg
%75 = icmp eq i8* %74, null
br i1 %75, label %76, label %78
76: ; preds = %73
%77 = call i32 @perror(i8* %50)
br label %257
78: ; preds = %73
%79 = call i8* @strdup(i8* %74)
%80 = icmp eq i8* %79, null
br i1 %80, label %81, label %61
81: ; preds = %78
%82 = call i32 @perror(i8* %50)
br label %257
83: ; preds = %51
br label %61
84: ; preds = %51
br label %61
85: ; preds = %51
br label %61
86: ; preds = %51
%87 = call i32 (...) @abort()
unreachable
88: ; preds = %51
%89 = load i32, i32* @optind
%90 = sub nsw i32 %0, %89
%91 = icmp ne i32 %54, 0
%92 = icmp sgt i32 %90, 2
%93 = select i1 %91, i1 true, i1 %92
%94 = icmp eq i32 %90, 0
br i1 %94, label %95, label %98
95: ; preds = %88
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* %50)
br label %257
98: ; preds = %88
%99 = icmp ne i32 %90, 1
%100 = select i1 %99, i1 true, i1 %91
br i1 %100, label %106, label %101
101: ; preds = %98
%102 = load i32, i32* @stderr
%103 = getelementptr inbounds i8*, i8** %1, i64 1
%104 = load i8*, i8** %103
%105 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.10, i64 0, i64 0), i8* %50, i8* %104)
br label %257
106: ; preds = %98
%107 = icmp ne i32 %55, 0
%108 = select i1 %107, i1 %93, i1 false
br i1 %108, label %109, label %113
109: ; preds = %106
%110 = load i32, i32* @stderr
%111 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i8* %50, i8* %59)
%112 = call i32 @free(i8* %59)
br label %257
113: ; preds = %106
br i1 %91, label %123, label %114
114: ; preds = %113
%115 = add nsw i32 %0, -1
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8*, i8** %1, i64 %116
%118 = load i8*, i8** %117
%119 = call i8* @strdup(i8* %118)
%120 = icmp eq i8* %119, null
br i1 %120, label %121, label %123
121: ; preds = %114
%122 = call i32 @perror(i8* %50)
br label %257
123: ; preds = %114, %113
%124 = phi i8* [ %59, %113 ], [ %119, %114 ]
%125 = call i64 @stat(i8* %124, %struct.stat* %4)
%126 = icmp eq i64 %125, 0
br i1 %126, label %127, label %131
127: ; preds = %123
%128 = getelementptr inbounds %struct.stat, %struct.stat* %4, i64 0, i32 0
%129 = load i32, i32* %128
%130 = call i32 @S_ISDIR(i32 %129)
br label %131
131: ; preds = %127, %123
%132 = phi i32 [ 0, %123 ], [ %130, %127 ]
%133 = icmp eq i32 %132, 0
%134 = select i1 %133, i1 %93, i1 false
br i1 %134, label %135, label %139
135: ; preds = %131
%136 = load i32, i32* @stderr
%137 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %136, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.12, i64 0, i64 0), i8* %50, i8* %124)
%138 = call i32 @free(i8* %124)
br label %257
139: ; preds = %131
%140 = icmp ne i32 %132, 0
%141 = select i1 %107, i1 %140, i1 false
br i1 %141, label %142, label %146
142: ; preds = %139
%143 = load i32, i32* @stderr
%144 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %143, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.13, i64 0, i64 0), i8* %50, i8* %124)
%145 = call i32 @free(i8* %124)
br label %257
146: ; preds = %139
%147 = xor i1 %91, true
%148 = sext i1 %147 to i32
%149 = add nsw i32 %90, %148
%150 = shl i32 %149, 3
%151 = call i8** @malloc(i32 %150)
%152 = icmp eq i8** %151, null
br i1 %152, label %153, label %156
153: ; preds = %146
%154 = call i32 @perror(i8* %50)
%155 = call i32 @free(i8* %124)
br label %257
156: ; preds = %146
%157 = icmp sgt i32 %149, 0
br i1 %157, label %158, label %218
158: ; preds = %156
%159 = load i32, i32* @optind
%160 = getelementptr inbounds %struct.stat, %struct.stat* %5, i64 0, i32 0
%161 = sext i32 %159 to i64
br label %162
162: ; preds = %158, %205
%163 = phi i64 [ %161, %158 ], [ %208, %205 ]
%164 = phi i32 [ 0, %158 ], [ %207, %205 ]
%165 = phi i32 [ 0, %158 ], [ %206, %205 ]
%166 = getelementptr inbounds i8*, i8** %1, i64 %163
%167 = load i8*, i8** %166
%168 = load i32, i32* @R_OK
%169 = call i32 @access(i8* %167, i32 %168)
%170 = icmp eq i32 %169, 0
br i1 %170, label %177, label %171
171: ; preds = %162
%172 = load i32, i32* @stderr
%173 = load i8*, i8** %166
%174 = load i32, i32* @errno
%175 = call i8* @strerror(i32 %174)
%176 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %172, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8* %50, i8* %173, i8* %175)
br label %205
177: ; preds = %162
%178 = load i8*, i8** %166
%179 = call i64 @stat(i8* %178, %struct.stat* %5)
%180 = icmp eq i64 %179, 0
br i1 %180, label %185, label %181
181: ; preds = %177
%182 = call i32 @perror(i8* %50)
%183 = call i32 @free(i8* %124)
%184 = call i32 @mycp_free_sources(i8** %151, i32 %165)
br label %257
185: ; preds = %177
%186 = load i32, i32* %160
%187 = call i32 @S_ISDIR(i32 %186)
%188 = icmp eq i32 %187, 0
br i1 %188, label %193, label %189
189: ; preds = %185
%190 = load i32, i32* @stderr
%191 = load i8*, i8** %166
%192 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %190, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.15, i64 0, i64 0), i8* %50, i8* %191)
br label %205
193: ; preds = %185
%194 = load i8*, i8** %166
%195 = call i8* @strdup(i8* %194)
%196 = sext i32 %165 to i64
%197 = getelementptr inbounds i8*, i8** %151, i64 %196
store i8* %195, i8** %197
%198 = icmp eq i8* %195, null
br i1 %198, label %199, label %203
199: ; preds = %193
%200 = call i32 @perror(i8* %50)
%201 = call i32 @free(i8* %124)
%202 = call i32 @mycp_free_sources(i8** %151, i32 %165)
br label %257
203: ; preds = %193
%204 = add nsw i32 %165, 1
br label %205
205: ; preds = %171, %203, %189
%206 = phi i32 [ %165, %189 ], [ %204, %203 ], [ %165, %171 ]
%207 = phi i32 [ %164, %189 ], [ %164, %203 ], [ 1, %171 ]
%208 = add nsw i64 %163, 1
%209 = load i32, i32* @optind
%210 = add nsw i32 %209, %149
%211 = sext i32 %210 to i64
%212 = icmp slt i64 %208, %211
br i1 %212, label %162, label %213
213: ; preds = %205
%214 = icmp eq i32 %207, 0
br i1 %214, label %218, label %215
215: ; preds = %213
%216 = call i32 @free(i8* %124)
%217 = call i32 @mycp_free_sources(i8** %151, i32 %206)
br label %257
218: ; preds = %156, %213
%219 = phi i32 [ %206, %213 ], [ 0, %156 ]
%220 = shl i32 %219, 3
%221 = call i8** @realloc(i8** %151, i32 %220)
%222 = icmp eq i8** %221, null
br i1 %222, label %223, label %227
223: ; preds = %218
%224 = call i32 @perror(i8* %50)
%225 = call i32 @free(i8* %124)
%226 = call i32 @mycp_free_sources(i8** %151, i32 %149)
br label %257
227: ; preds = %218
%228 = call dereferenceable_or_null(2048) i8* @calloc(i32 2048, i32 1)
store i8* %228, i8** %3
%229 = icmp eq i8* %228, null
br i1 %229, label %230, label %234
230: ; preds = %227
%231 = call i32 @perror(i8* %50)
%232 = call i32 @free(i8* %124)
%233 = call i32 @mycp_free_sources(i8** %221, i32 %219)
br label %257
234: ; preds = %227
%235 = call i64 @mycp_do_copy(i8** %221, i32 %219, i8* %124, i32 %132, i8** %3, i32 2048, i32 %53, i32 %52, i32 %58, i32 %56, i32 %57)
%236 = icmp eq i64 %235, 0
%237 = load i8*, i8** %3
br i1 %236, label %253, label %238
238: ; preds = %234
%239 = call i64 @strlen(i8* dereferenceable(1) %237)
%240 = icmp sgt i64 %239, 0
%241 = load i32, i32* @stderr
%242 = load i32, i32* @errno
%243 = call i8* @strerror(i32 %242)
br i1 %240, label %244, label %246
244: ; preds = %238
%245 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %241, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0), i8* %50, i8* %237, i8* %243)
br label %248
246: ; preds = %238
%247 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %241, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i8* %50, i8* %243)
br label %248
248: ; preds = %246, %244
%249 = call i32 @free(i8* %124)
%250 = load i8*, i8** %3
%251 = call i32 @free(i8* %250)
%252 = call i32 @mycp_free_sources(i8** %221, i32 %219)
br label %257
253: ; preds = %234
%254 = call i32 @free(i8* %237)
%255 = call i32 @mycp_free_sources(i8** %221, i32 %219)
%256 = call i32 @free(i8* %124)
br label %257
257: ; preds = %253, %248, %230, %223, %215, %199, %181, %153, %142, %135, %121, %109, %101, %95, %81, %76
%258 = phi i32* [ @EXIT_FAILURE, %76 ], [ @EXIT_FAILURE, %81 ], [ @EXIT_FAILURE, %95 ], [ @EXIT_FAILURE, %109 ], [ @EXIT_FAILURE, %135 ], [ @EXIT_FAILURE, %142 ], [ @EXIT_FAILURE, %153 ], [ @EXIT_FAILURE, %181 ], [ @EXIT_FAILURE, %199 ], [ @EXIT_FAILURE, %215 ], [ @EXIT_FAILURE, %223 ], [ @EXIT_FAILURE, %230 ], [ @EXIT_FAILURE, %248 ], [ @EXIT_SUCCESS, %253 ], [ @EXIT_FAILURE, %121 ], [ @EXIT_FAILURE, %101 ]
%259 = load i32, i32* %258
ret i32 %259
}