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

/* Variables and functions */
int /*<<< orphan*/ add_new_entry(char *, char *, char *, char *);
int atoi(char *);
int /*<<< orphan*/ backup_database(char *, char *);
int /*<<< orphan*/ backup_import_database(char *, char *);
int /*<<< orphan*/ close_database();
int /*<<< orphan*/ delete_entry(int);
int /*<<< orphan*/ find_entries(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ generate_password(int, int);
int getopt_long(int, char **, char *, struct option *, int *);
int /*<<< orphan*/ init_database(char *);
#define no_argument 129
int /*<<< orphan*/ open_database(char *);
char *optarg;
size_t optind;
int /*<<< orphan*/ remove_database(char *);
int /*<<< orphan*/ replace_part(int, char *, char *);
#define required_argument 128
int /*<<< orphan*/ show_all_entries();
int /*<<< orphan*/ show_database_statuses();
int /*<<< orphan*/ show_notes_only(int);
int /*<<< orphan*/ show_one_entry(int);
int /*<<< orphan*/ show_passphrase_only(int);
int /*<<< orphan*/ show_url_only(int);
int /*<<< orphan*/ show_username_only(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int /*<<< orphan*/ version_print();
int main(int argc, char *argv[]) {
  int option;
  if (argc == 1) {
    usage();
    return 0;
  }
  while (true) {
    static struct option long_options[] = {
        {"init-new", required_argument, 0, 'i'},
        {"backup", required_argument, 0, 'b'},
        {"import-backup", required_argument, 0, 'B'},
        {"open", required_argument, 0, 'o'},
        {"close", no_argument, 0, 'c'},
        {"show", required_argument, 0, 's'},
        {"gen-pass", required_argument, 0, 'g'},
        {"add", required_argument, 0, 'a'},
        {"delete", required_argument, 0, 'd'},
        {"replace", required_argument, 0, 'r'},
        {"shred-db", required_argument, 0, 'R'},
        {"find", required_argument, 0, 'f'},
        {"list-all", no_argument, 0, 'l'},
        {"show-status", no_argument, 0, 'S'},
        {"version", no_argument, 0, 'V'},
        {"help", no_argument, 0, 'h'},
        {"show-passphrase", required_argument, 0, 'p'},
        {"show-username", required_argument, 0, 'u'},
        {"show-url", required_argument, 0, 'U'},
        {"show-notes", required_argument, 0, 'n'},
        {0, 0, 0, 0}};
    int option_index = 0;
    option = getopt_long(argc, argv, "i:b:B:o:cs:g:a:d:r:f:lR:SVp:u:U:n:h",
                         long_options, &option_index);
    if (option == -1)
      break;
    switch (option) {
    case 'i':
      init_database(optarg);
      break;
    case 'b':
      if (!argv[optind]) {
        fprintf(stderr, "Missing option <destination>.\n");
        return 0;
      }
      backup_database(optarg, argv[optind]);
      break;
    case 'B':
      if (!argv[optind]) {
        fprintf(stderr, "Missing option <destination>.\n");
        return 0;
      }
      backup_import_database(optarg, argv[optind]);
      break;
    case 'o':
      open_database(optarg);
      break;
    case 'c':
      close_database();
      break;
    case 's':
      show_one_entry(atoi(optarg));
      break;
    case 'g': {
      int count = 1;
      if (argv[optind]) {
        count = atoi(argv[optind]);
        if (count < 1)
          count = 1;
      }
      generate_password(atoi(optarg), count);
      break;
    }
    case 'a': {
      if (!argv[optind]) {
        fprintf(stderr, "Missing option user.\n");
        return 0;
      }
      if (!argv[optind + 1]) {
        fprintf(stderr, "Missing option url.\n");
        return 0;
      }
      if (!argv[optind + 2]) {
        fprintf(stderr, "Missing option note\n");
        return 0;
      }
      char *title = optarg;
      char *user = argv[optind];
      char *url = argv[optind + 1];
      char *note = argv[optind + 2];
      add_new_entry(title, user, url, note);
      break;
    }
    case 'd':
      delete_entry(atoi(optarg));
      break;
    case 'r': {
      if (!argv[optind]) {
        fprintf(stderr, "Missing option, see -h for help\n");
        return 0;
      }
      if (strcmp(argv[optind], "passphrase") != 0) {
        if (!argv[optind + 1]) {
          fprintf(stderr, "Missing option, see -h for help\n");
          return 0;
        }
      }
      int id = atoi(optarg);
      char *what = argv[optind];
      char *content = argv[optind + 1];
      replace_part(id, what, content);
      break;
    }
    case 'f':
      find_entries(optarg);
      break;
    case 'p':
      show_passphrase_only(atoi(optarg));
      break;
    case 'u':
      show_username_only(atoi(optarg));
      break;
    case 'U':
      show_url_only(atoi(optarg));
      break;
    case 'n':
      show_notes_only(atoi(optarg));
      break;
    case 'l':
      show_all_entries();
      break;
    case 'R':
      remove_database(optarg);
      break;
    case 'S':
      show_database_statuses();
      break;
    case 'V':
      version_print();
      break;
    case 'h':
      usage();
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    12b3 <main+0x33>
mov    $0x0,%al
call   1130 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
jmp    12b8 <main+0x38>
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xea8(%rip),%rdx
lea    0x2e1c(%rip),%rcx
lea    -0x18(%rbp),%r8
call   1070 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    12ef <main+0x6f>
jmp    1785 <main+0x505>
mov    -0x14(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x60(%rbp)
sub    $0x33,%eax
ja     1780 <main+0x500>
mov    -0x60(%rbp),%rax
lea    0xcf1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2cd9(%rip),%rax
mov    (%rax),%rdi
call   10b0 <init_database@plt>
jmp    1780 <main+0x500>
mov    -0x10(%rbp),%rax
mov    0x2ca9(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    1366 <main+0xe6>
mov    0x2c84(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    0x2c8b(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x2c65(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rsi
call   1060 <backup_database@plt>
jmp    1780 <main+0x500>
mov    -0x10(%rbp),%rax
mov    0x2c49(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    13c6 <main+0x146>
mov    0x2c24(%rip),%rax
mov    (%rax),%edi
lea    0xde4(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    0x2c2b(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x2c05(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <backup_import_database@plt>
jmp    1780 <main+0x500>
mov    0x2c05(%rip),%rax
mov    (%rax),%rdi
call   1170 <open_database@plt>
jmp    1780 <main+0x500>
mov    $0x0,%al
call   1090 <close_database@plt>
jmp    1780 <main+0x500>
mov    0x2be5(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1080 <show_one_entry@plt>
jmp    1780 <main+0x500>
movl   $0x1,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ba7(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1477 <main+0x1f7>
mov    -0x10(%rbp),%rax
mov    0x2b8e(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1160 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    1472 <main+0x1f2>
movl   $0x1,-0x1c(%rbp)
jmp    1477 <main+0x1f7>
mov    0x2b7a(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   11a0 <generate_password@plt>
jmp    1780 <main+0x500>
mov    -0x10(%rbp),%rax
mov    0x2b40(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    14cf <main+0x24f>
mov    0x2b1b(%rip),%rax
mov    (%rax),%edi
lea    0xcfa(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    -0x10(%rbp),%rax
mov    0x2b06(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,0x8(%rax,%rcx,8)
jne    150a <main+0x28a>
mov    0x2ae0(%rip),%rax
mov    (%rax),%edi
lea    0xcd5(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    -0x10(%rbp),%rax
mov    0x2acb(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,0x10(%rax,%rcx,8)
jne    1545 <main+0x2c5>
mov    0x2aa5(%rip),%rax
mov    (%rax),%edi
lea    0xcaf(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    0x2aac(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2a82(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2a6c(%rip),%rcx
mov    (%rcx),%rcx
mov    0x8(%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2a55(%rip),%rcx
mov    (%rcx),%rcx
mov    0x10(%rax,%rcx,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   1140 <add_new_entry@plt>
jmp    1780 <main+0x500>
mov    0x2a40(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1120 <delete_entry@plt>
jmp    1780 <main+0x500>
mov    -0x10(%rbp),%rax
mov    0x2a09(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    1606 <main+0x386>
mov    0x29e4(%rip),%rax
mov    (%rax),%edi
lea    0xc03(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
mov    -0x10(%rbp),%rax
mov    0x29cf(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xb29(%rip),%rsi
call   10c0 <strcmp@plt>
cmp    $0x0,%eax
je     166d <main+0x3ed>
mov    -0x10(%rbp),%rax
mov    0x29a8(%rip),%rcx
mov    (%rcx),%rcx
cmpq   $0x0,0x8(%rax,%rcx,8)
jne    1668 <main+0x3e8>
mov    0x2982(%rip),%rax
mov    (%rax),%edi
lea    0xba1(%rip),%rsi
call   10e0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    178c <main+0x50c>
jmp    166d <main+0x3ed>
mov    0x2984(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2956(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2940(%rip),%rcx
mov    (%rcx),%rcx
mov    0x8(%rax,%rcx,8),%rax
mov    %rax,-0x58(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   1190 <replace_part@plt>
jmp    1780 <main+0x500>
mov    0x2930(%rip),%rax
mov    (%rax),%rdi
call   10d0 <find_entries@plt>
jmp    1780 <main+0x500>
mov    0x291c(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1150 <show_passphrase_only@plt>
jmp    1780 <main+0x500>
mov    0x2901(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1110 <show_username_only@plt>
jmp    1780 <main+0x500>
mov    0x28e6(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1050 <show_url_only@plt>
jmp    1780 <main+0x500>
mov    0x28cb(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   10f0 <show_notes_only@plt>
jmp    1780 <main+0x500>
mov    $0x0,%al
call   1180 <show_all_entries@plt>
jmp    1780 <main+0x500>
mov    0x28a4(%rip),%rax
mov    (%rax),%rdi
call   1100 <remove_database@plt>
jmp    1780 <main+0x500>
mov    $0x0,%al
call   1040 <show_database_statuses@plt>
jmp    1780 <main+0x500>
mov    $0x0,%al
call   10a0 <version_print@plt>
jmp    1780 <main+0x500>
mov    $0x0,%al
call   1130 <usage@plt>
jmp    12b8 <main+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    129c <main+0x1c>
xor    %eax,%eax
call   1130 <usage@plt>
jmp    1599 <main+0x319>
mov    %rsi,%rbx
mov    %edi,%r13d
lea    0xfd8(%rip),%r15
lea    0x2e40(%rip),%r14
lea    0x4(%rsp),%rbp
lea    0xd44(%rip),%r12
jmp    12d0 <main+0x50>
xor    %eax,%eax
call   1130 <usage@plt>
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x0,0x4(%rsp)
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %rbp,%r8
call   1070 <getopt_long@plt>
add    $0x1,%eax
cmp    $0x76,%eax
ja     12d0 <main+0x50>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    0x2cdc(%rip),%rax
mov    (%rax),%rax
mov    (%rbx,%rax,8),%rsi
test   %rsi,%rsi
je     1560 <main+0x2e0>
mov    0x2cdd(%rip),%rax
mov    (%rax),%rdi
call   1030 <backup_import_database@plt>
jmp    12d0 <main+0x50>
mov    0x2ccc(%rip),%rax
mov    (%rax),%rdi
call   1100 <remove_database@plt>
jmp    12d0 <main+0x50>
xor    %eax,%eax
call   1040 <show_database_statuses@plt>
jmp    12d0 <main+0x50>
mov    0x2cb2(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1050 <show_url_only@plt>
jmp    12d0 <main+0x50>
xor    %eax,%eax
call   10a0 <version_print@plt>
jmp    12d0 <main+0x50>
mov    0x2c73(%rip),%rax
mov    (%rax),%rax
mov    (%rbx,%rax,8),%rsi
test   %rsi,%rsi
je     1572 <main+0x2f2>
mov    0x8(%rbx,%rax,8),%rdx
test   %rdx,%rdx
je     157b <main+0x2fb>
mov    0x10(%rbx,%rax,8),%rcx
test   %rcx,%rcx
je     1584 <main+0x304>
mov    0x2c58(%rip),%rax
mov    (%rax),%rdi
call   1140 <add_new_entry@plt>
jmp    12d0 <main+0x50>
mov    0x2c2c(%rip),%rax
mov    (%rax),%rax
mov    (%rbx,%rax,8),%rsi
test   %rsi,%rsi
je     1560 <main+0x2e0>
mov    0x2c2d(%rip),%rax
mov    (%rax),%rdi
call   1060 <backup_database@plt>
jmp    12d0 <main+0x50>
xor    %eax,%eax
call   1090 <close_database@plt>
jmp    12d0 <main+0x50>
mov    0x2c0d(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1120 <delete_entry@plt>
jmp    12d0 <main+0x50>
mov    0x2bf2(%rip),%rax
mov    (%rax),%rdi
call   10d0 <find_entries@plt>
jmp    12d0 <main+0x50>
mov    0x2bc6(%rip),%rax
mov    (%rax),%rax
mov    (%rbx,%rax,8),%rdi
test   %rdi,%rdi
je     1431 <main+0x1b1>
call   1160 <atoi@plt>
mov    %eax,%ebp
test   %eax,%eax
jg     1436 <main+0x1b6>
mov    $0x1,%ebp
mov    0x2bbb(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   11a0 <generate_password@plt>
lea    0x4(%rsp),%rbp
jmp    12d0 <main+0x50>
mov    0x2b99(%rip),%rax
mov    (%rax),%rdi
call   10b0 <init_database@plt>
jmp    12d0 <main+0x50>
xor    %eax,%eax
call   1180 <show_all_entries@plt>
jmp    12d0 <main+0x50>
mov    0x2b79(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   10f0 <show_notes_only@plt>
jmp    12d0 <main+0x50>
mov    0x2b5e(%rip),%rax
mov    (%rax),%rdi
call   1170 <open_database@plt>
jmp    12d0 <main+0x50>
mov    0x2b4a(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1150 <show_passphrase_only@plt>
jmp    12d0 <main+0x50>
mov    0x2b17(%rip),%rax
mov    (%rax),%rbp
mov    (%rbx,%rbp,8),%r14
test   %r14,%r14
je     1569 <main+0x2e9>
mov    %r14,%rdi
lea    0xd71(%rip),%rsi
call   10c0 <strcmp@plt>
mov    0x8(%rbx,%rbp,8),%r15
test   %eax,%eax
je     14f6 <main+0x276>
test   %r15,%r15
je     1569 <main+0x2e9>
mov    0x2afb(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %r15,%rdx
call   1190 <replace_part@plt>
lea    0xd68(%rip),%r15
lea    0x2bd0(%rip),%r14
lea    0x4(%rsp),%rbp
jmp    12d0 <main+0x50>
mov    0x2ac7(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1080 <show_one_entry@plt>
jmp    12d0 <main+0x50>
mov    0x2aac(%rip),%rax
mov    (%rax),%rdi
call   1160 <atoi@plt>
mov    %eax,%edi
call   1110 <show_username_only@plt>
jmp    12d0 <main+0x50>
lea    0xd3e(%rip),%rsi
jmp    158b <main+0x30b>
lea    0xd94(%rip),%rsi
jmp    158b <main+0x30b>
lea    0xd4b(%rip),%rsi
jmp    158b <main+0x30b>
lea    0xd58(%rip),%rsi
jmp    158b <main+0x30b>
lea    0xd64(%rip),%rsi
mov    0x2a3e(%rip),%rax
mov    (%rax),%edi
call   10e0 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@main.long_options = internal global [21 x %struct.option] [%struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 105 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 98 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 66 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 111 }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8 -127, i32 0, i32 99 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 103 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8 -128, i32 0, i32 97 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8 -128, i32 0, i32 100 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8 -128, i32 0, i32 114 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i8 -128, i32 0, i32 82 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8 -128, i32 0, i32 102 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0), i8 -127, i32 0, i32 108 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i32 0, i32 0), i8 -127, i32 0, i32 83 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8 -127, i32 0, i32 86 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i32 0, i32 0), i8 -127, i32 0, i32 104 }, %struct.option { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i32 0, i32 0), i8 -128, i32 0, i32 112 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i32 0, i32 0), i8 -128, i32 0, i32 117 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i32 0, i32 0), i8 -128, i32 0, i32 85 }, %struct.option { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i32 0, i32 0), i8 -128, i32 0, i32 110 }, %struct.option zeroinitializer]
@.str = [9 x i8] c"init-new\00"
@.str.1 = [7 x i8] c"backup\00"
@.str.2 = [14 x i8] c"import-backup\00"
@.str.3 = [5 x i8] c"open\00"
@.str.4 = [6 x i8] c"close\00"
@.str.5 = [5 x i8] c"show\00"
@.str.6 = [9 x i8] c"gen-pass\00"
@.str.7 = [4 x i8] c"add\00"
@.str.8 = [7 x i8] c"delete\00"
@.str.9 = [8 x i8] c"replace\00"
@.str.10 = [9 x i8] c"shred-db\00"
@.str.11 = [5 x i8] c"find\00"
@.str.12 = [9 x i8] c"list-all\00"
@.str.13 = [12 x i8] c"show-status\00"
@.str.14 = [8 x i8] c"version\00"
@.str.15 = [5 x i8] c"help\00"
@.str.16 = [16 x i8] c"show-passphrase\00"
@.str.17 = [14 x i8] c"show-username\00"
@.str.18 = [9 x i8] c"show-url\00"
@.str.19 = [11 x i8] c"show-notes\00"
@.str.20 = [36 x i8] c"i:b:B:o:cs:g:a:d:r:f:lR:SVp:u:U:n:h\00"
@optarg = global i8* null
@optind = global i64 0
@stderr = global i32 0
@.str.21 = [31 x i8] c"Missing option <destination>.\0A\00"
@.str.22 = [22 x i8] c"Missing option user.\0A\00"
@.str.23 = [21 x i8] c"Missing option url.\0A\00"
@.str.24 = [21 x i8] c"Missing option note\0A\00"
@.str.25 = [33 x i8] c"Missing option, see -h for help\0A\00"
@.str.26 = [11 x i8] c"passphrase\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 i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (...) @usage()
store i32 0, i32* %3
br label %224
20: ; preds = %2
br label %21
21: ; preds = %20, %222
store i32 0, i32* %7
%22 = load i32, i32* %4
%23 = load i8**, i8*** %5
%24 = call i32 @getopt_long(i32 %22, i8** %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), %struct.option* getelementptr inbounds ([21 x %struct.option], [21 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %7)
store i32 %24, i32* %6
%25 = load i32, i32* %6
%26 = icmp eq i32 %25, -1
br i1 %26, label %27, label %28
27: ; preds = %21
br label %223
28: ; preds = %21
%29 = load i32, i32* %6
switch i32 %29, label %222 [
i32 105, label %30
i32 98, label %33
i32 66, label %49
i32 111, label %65
i32 99, label %68
i32 115, label %70
i32 103, label %74
i32 97, label %95
i32 100, label %145
i32 114, label %149
i32 102, label %192
i32 112, label %195
i32 117, label %199
i32 85, label %203
i32 110, label %207
i32 108, label %211
i32 82, label %213
i32 83, label %216
i32 86, label %218
i32 104, label %220
]
30: ; preds = %28
%31 = load i8*, i8** @optarg
%32 = call i32 @init_database(i8* %31)
br label %222
33: ; preds = %28
%34 = load i8**, i8*** %5
%35 = load i64, i64* @optind
%36 = getelementptr inbounds i8*, i8** %34, i64 %35
%37 = load i8*, i8** %36
%38 = icmp ne i8* %37, null
br i1 %38, label %42, label %39
39: ; preds = %33
%40 = load i32, i32* @stderr
%41 = call i32 @fprintf(i32 %40, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %3
br label %224
42: ; preds = %33
%43 = load i8*, i8** @optarg
%44 = load i8**, i8*** %5
%45 = load i64, i64* @optind
%46 = getelementptr inbounds i8*, i8** %44, i64 %45
%47 = load i8*, i8** %46
%48 = call i32 @backup_database(i8* %43, i8* %47)
br label %222
49: ; preds = %28
%50 = load i8**, i8*** %5
%51 = load i64, i64* @optind
%52 = getelementptr inbounds i8*, i8** %50, i64 %51
%53 = load i8*, i8** %52
%54 = icmp ne i8* %53, null
br i1 %54, label %58, label %55
55: ; preds = %49
%56 = load i32, i32* @stderr
%57 = call i32 @fprintf(i32 %56, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %3
br label %224
58: ; preds = %49
%59 = load i8*, i8** @optarg
%60 = load i8**, i8*** %5
%61 = load i64, i64* @optind
%62 = getelementptr inbounds i8*, i8** %60, i64 %61
%63 = load i8*, i8** %62
%64 = call i32 @backup_import_database(i8* %59, i8* %63)
br label %222
65: ; preds = %28
%66 = load i8*, i8** @optarg
%67 = call i32 @open_database(i8* %66)
br label %222
68: ; preds = %28
%69 = call i32 (...) @close_database()
br label %222
70: ; preds = %28
%71 = load i8*, i8** @optarg
%72 = call i32 @atoi(i8* %71)
%73 = call i32 @show_one_entry(i32 %72)
br label %222
74: ; preds = %28
store i32 1, i32* %8
%75 = load i8**, i8*** %5
%76 = load i64, i64* @optind
%77 = getelementptr inbounds i8*, i8** %75, i64 %76
%78 = load i8*, i8** %77
%79 = icmp ne i8* %78, null
br i1 %79, label %80, label %90
80: ; preds = %74
%81 = load i8**, i8*** %5
%82 = load i64, i64* @optind
%83 = getelementptr inbounds i8*, i8** %81, i64 %82
%84 = load i8*, i8** %83
%85 = call i32 @atoi(i8* %84)
store i32 %85, i32* %8
%86 = load i32, i32* %8
%87 = icmp slt i32 %86, 1
br i1 %87, label %88, label %89
88: ; preds = %80
store i32 1, i32* %8
br label %89
89: ; preds = %88, %80
br label %90
90: ; preds = %89, %74
%91 = load i8*, i8** @optarg
%92 = call i32 @atoi(i8* %91)
%93 = load i32, i32* %8
%94 = call i32 @generate_password(i32 %92, i32 %93)
br label %222
95: ; preds = %28
%96 = load i8**, i8*** %5
%97 = load i64, i64* @optind
%98 = getelementptr inbounds i8*, i8** %96, i64 %97
%99 = load i8*, i8** %98
%100 = icmp ne i8* %99, null
br i1 %100, label %104, label %101
101: ; preds = %95
%102 = load i32, i32* @stderr
%103 = call i32 @fprintf(i32 %102, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0))
store i32 0, i32* %3
br label %224
104: ; preds = %95
%105 = load i8**, i8*** %5
%106 = load i64, i64* @optind
%107 = add i64 %106, 1
%108 = getelementptr inbounds i8*, i8** %105, i64 %107
%109 = load i8*, i8** %108
%110 = icmp ne i8* %109, null
br i1 %110, label %114, label %111
111: ; preds = %104
%112 = load i32, i32* @stderr
%113 = call i32 @fprintf(i32 %112, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0))
store i32 0, i32* %3
br label %224
114: ; preds = %104
%115 = load i8**, i8*** %5
%116 = load i64, i64* @optind
%117 = add i64 %116, 2
%118 = getelementptr inbounds i8*, i8** %115, i64 %117
%119 = load i8*, i8** %118
%120 = icmp ne i8* %119, null
br i1 %120, label %124, label %121
121: ; preds = %114
%122 = load i32, i32* @stderr
%123 = call i32 @fprintf(i32 %122, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.24, i64 0, i64 0))
store i32 0, i32* %3
br label %224
124: ; preds = %114
%125 = load i8*, i8** @optarg
store i8* %125, i8** %9
%126 = load i8**, i8*** %5
%127 = load i64, i64* @optind
%128 = getelementptr inbounds i8*, i8** %126, i64 %127
%129 = load i8*, i8** %128
store i8* %129, i8** %10
%130 = load i8**, i8*** %5
%131 = load i64, i64* @optind
%132 = add i64 %131, 1
%133 = getelementptr inbounds i8*, i8** %130, i64 %132
%134 = load i8*, i8** %133
store i8* %134, i8** %11
%135 = load i8**, i8*** %5
%136 = load i64, i64* @optind
%137 = add i64 %136, 2
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = load i8*, i8** %138
store i8* %139, i8** %12
%140 = load i8*, i8** %9
%141 = load i8*, i8** %10
%142 = load i8*, i8** %11
%143 = load i8*, i8** %12
%144 = call i32 @add_new_entry(i8* %140, i8* %141, i8* %142, i8* %143)
br label %222
145: ; preds = %28
%146 = load i8*, i8** @optarg
%147 = call i32 @atoi(i8* %146)
%148 = call i32 @delete_entry(i32 %147)
br label %222
149: ; preds = %28
%150 = load i8**, i8*** %5
%151 = load i64, i64* @optind
%152 = getelementptr inbounds i8*, i8** %150, i64 %151
%153 = load i8*, i8** %152
%154 = icmp ne i8* %153, null
br i1 %154, label %158, label %155
155: ; preds = %149
%156 = load i32, i32* @stderr
%157 = call i32 @fprintf(i32 %156, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0))
store i32 0, i32* %3
br label %224
158: ; preds = %149
%159 = load i8**, i8*** %5
%160 = load i64, i64* @optind
%161 = getelementptr inbounds i8*, i8** %159, i64 %160
%162 = load i8*, i8** %161
%163 = call i32 @strcmp(i8* %162, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0))
%164 = icmp ne i32 %163, 0
br i1 %164, label %165, label %176
165: ; preds = %158
%166 = load i8**, i8*** %5
%167 = load i64, i64* @optind
%168 = add i64 %167, 1
%169 = getelementptr inbounds i8*, i8** %166, i64 %168
%170 = load i8*, i8** %169
%171 = icmp ne i8* %170, null
br i1 %171, label %175, label %172
172: ; preds = %165
%173 = load i32, i32* @stderr
%174 = call i32 @fprintf(i32 %173, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0))
store i32 0, i32* %3
br label %224
175: ; preds = %165
br label %176
176: ; preds = %175, %158
%177 = load i8*, i8** @optarg
%178 = call i32 @atoi(i8* %177)
store i32 %178, i32* %13
%179 = load i8**, i8*** %5
%180 = load i64, i64* @optind
%181 = getelementptr inbounds i8*, i8** %179, i64 %180
%182 = load i8*, i8** %181
store i8* %182, i8** %14
%183 = load i8**, i8*** %5
%184 = load i64, i64* @optind
%185 = add i64 %184, 1
%186 = getelementptr inbounds i8*, i8** %183, i64 %185
%187 = load i8*, i8** %186
store i8* %187, i8** %15
%188 = load i32, i32* %13
%189 = load i8*, i8** %14
%190 = load i8*, i8** %15
%191 = call i32 @replace_part(i32 %188, i8* %189, i8* %190)
br label %222
192: ; preds = %28
%193 = load i8*, i8** @optarg
%194 = call i32 @find_entries(i8* %193)
br label %222
195: ; preds = %28
%196 = load i8*, i8** @optarg
%197 = call i32 @atoi(i8* %196)
%198 = call i32 @show_passphrase_only(i32 %197)
br label %222
199: ; preds = %28
%200 = load i8*, i8** @optarg
%201 = call i32 @atoi(i8* %200)
%202 = call i32 @show_username_only(i32 %201)
br label %222
203: ; preds = %28
%204 = load i8*, i8** @optarg
%205 = call i32 @atoi(i8* %204)
%206 = call i32 @show_url_only(i32 %205)
br label %222
207: ; preds = %28
%208 = load i8*, i8** @optarg
%209 = call i32 @atoi(i8* %208)
%210 = call i32 @show_notes_only(i32 %209)
br label %222
211: ; preds = %28
%212 = call i32 (...) @show_all_entries()
br label %222
213: ; preds = %28
%214 = load i8*, i8** @optarg
%215 = call i32 @remove_database(i8* %214)
br label %222
216: ; preds = %28
%217 = call i32 (...) @show_database_statuses()
br label %222
218: ; preds = %28
%219 = call i32 (...) @version_print()
br label %222
220: ; preds = %28
%221 = call i32 (...) @usage()
br label %222
222: ; preds = %28, %220, %218, %216, %213, %211, %207, %203, %199, %195, %192, %176, %145, %124, %90, %70, %68, %65, %58, %42, %30
br label %21
223: ; preds = %27
store i32 0, i32* %3
br label %224
224: ; preds = %223, %172, %155, %121, %111, %101, %55, %39, %18
%225 = load i32, i32* %3
ret i32 %225
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@main.long_options = internal global [21 x %struct.option] [%struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8 -128, i32 0, i32 105 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8 -128, i32 0, i32 98 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 66 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 111 }, %struct.option { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8 -127, i32 0, i32 99 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 115 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 103 }, %struct.option { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8 -128, i32 0, i32 97 }, %struct.option { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8 -128, i32 0, i32 100 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8 -128, i32 0, i32 114 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i8 -128, i32 0, i32 82 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i32 0, i32 0), i8 -128, i32 0, i32 102 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i32 0, i32 0), i8 -127, i32 0, i32 108 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i32 0, i32 0), i8 -127, i32 0, i32 83 }, %struct.option { i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8 -127, i32 0, i32 86 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i32 0, i32 0), i8 -127, i32 0, i32 104 }, %struct.option { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i32 0, i32 0), i8 -128, i32 0, i32 112 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i32 0, i32 0), i8 -128, i32 0, i32 117 }, %struct.option { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i32 0, i32 0), i8 -128, i32 0, i32 85 }, %struct.option { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i32 0, i32 0), i8 -128, i32 0, i32 110 }, %struct.option zeroinitializer]
@.str = [9 x i8] c"init-new\00"
@.str.1 = [7 x i8] c"backup\00"
@.str.2 = [14 x i8] c"import-backup\00"
@.str.3 = [5 x i8] c"open\00"
@.str.4 = [6 x i8] c"close\00"
@.str.5 = [5 x i8] c"show\00"
@.str.6 = [9 x i8] c"gen-pass\00"
@.str.7 = [4 x i8] c"add\00"
@.str.8 = [7 x i8] c"delete\00"
@.str.9 = [8 x i8] c"replace\00"
@.str.10 = [9 x i8] c"shred-db\00"
@.str.11 = [5 x i8] c"find\00"
@.str.12 = [9 x i8] c"list-all\00"
@.str.13 = [12 x i8] c"show-status\00"
@.str.14 = [8 x i8] c"version\00"
@.str.15 = [5 x i8] c"help\00"
@.str.16 = [16 x i8] c"show-passphrase\00"
@.str.17 = [14 x i8] c"show-username\00"
@.str.18 = [9 x i8] c"show-url\00"
@.str.19 = [11 x i8] c"show-notes\00"
@.str.20 = [36 x i8] c"i:b:B:o:cs:g:a:d:r:f:lR:SVp:u:U:n:h\00"
@optarg = global i8* null
@optind = global i64 0
@stderr = global i32 0
@.str.21 = [31 x i8] c"Missing option <destination>.\0A\00"
@.str.22 = [22 x i8] c"Missing option user.\0A\00"
@.str.23 = [21 x i8] c"Missing option url.\0A\00"
@.str.24 = [21 x i8] c"Missing option note\0A\00"
@.str.25 = [33 x i8] c"Missing option, see -h for help\0A\00"
@.str.26 = [11 x i8] c"passphrase\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = icmp eq i32 %0, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = bitcast i32* %3 to i8*
br label %9
7: ; preds = %2
%8 = tail call i32 (...) @usage()
br label %128
9: ; preds = %5, %127
store i32 0, i32* %3
%10 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0), %struct.option* getelementptr inbounds ([21 x %struct.option], [21 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %3)
switch i32 %10, label %127 [
i32 -1, label %126
i32 105, label %11
i32 98, label %14
i32 66, label %22
i32 111, label %30
i32 99, label %33
i32 115, label %35
i32 103, label %39
i32 97, label %53
i32 100, label %71
i32 114, label %75
i32 102, label %92
i32 112, label %95
i32 117, label %99
i32 85, label %103
i32 110, label %107
i32 108, label %111
i32 82, label %113
i32 83, label %116
i32 86, label %118
i32 104, label %120
]
11: ; preds = %9
%12 = load i8*, i8** @optarg
%13 = call i32 @init_database(i8* %12)
br label %127
14: ; preds = %9
%15 = load i64, i64* @optind
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %122, label %19
19: ; preds = %14
%20 = load i8*, i8** @optarg
%21 = call i32 @backup_database(i8* %20, i8* %17)
br label %127
22: ; preds = %9
%23 = load i64, i64* @optind
%24 = getelementptr inbounds i8*, i8** %1, i64 %23
%25 = load i8*, i8** %24
%26 = icmp eq i8* %25, null
br i1 %26, label %122, label %27
27: ; preds = %22
%28 = load i8*, i8** @optarg
%29 = call i32 @backup_import_database(i8* %28, i8* %25)
br label %127
30: ; preds = %9
%31 = load i8*, i8** @optarg
%32 = call i32 @open_database(i8* %31)
br label %127
33: ; preds = %9
%34 = call i32 (...) @close_database()
br label %127
35: ; preds = %9
%36 = load i8*, i8** @optarg
%37 = call i32 @atoi(i8* %36)
%38 = call i32 @show_one_entry(i32 %37)
br label %127
39: ; preds = %9
%40 = load i64, i64* @optind
%41 = getelementptr inbounds i8*, i8** %1, i64 %40
%42 = load i8*, i8** %41
%43 = icmp eq i8* %42, null
br i1 %43, label %48, label %44
44: ; preds = %39
%45 = call i32 @atoi(i8* %42)
%46 = icmp sgt i32 %45, 1
%47 = select i1 %46, i32 %45, i32 1
br label %48
48: ; preds = %44, %39
%49 = phi i32 [ %47, %44 ], [ 1, %39 ]
%50 = load i8*, i8** @optarg
%51 = call i32 @atoi(i8* %50)
%52 = call i32 @generate_password(i32 %51, i32 %49)
br label %127
53: ; preds = %9
%54 = load i64, i64* @optind
%55 = getelementptr inbounds i8*, i8** %1, i64 %54
%56 = load i8*, i8** %55
%57 = icmp eq i8* %56, null
br i1 %57, label %122, label %58
58: ; preds = %53
%59 = add i64 %54, 1
%60 = getelementptr inbounds i8*, i8** %1, i64 %59
%61 = load i8*, i8** %60
%62 = icmp eq i8* %61, null
br i1 %62, label %122, label %63
63: ; preds = %58
%64 = add i64 %54, 2
%65 = getelementptr inbounds i8*, i8** %1, i64 %64
%66 = load i8*, i8** %65
%67 = icmp eq i8* %66, null
br i1 %67, label %122, label %68
68: ; preds = %63
%69 = load i8*, i8** @optarg
%70 = call i32 @add_new_entry(i8* %69, i8* %56, i8* %61, i8* %66)
br label %127
71: ; preds = %9
%72 = load i8*, i8** @optarg
%73 = call i32 @atoi(i8* %72)
%74 = call i32 @delete_entry(i32 %73)
br label %127
75: ; preds = %9
%76 = load i64, i64* @optind
%77 = getelementptr inbounds i8*, i8** %1, i64 %76
%78 = load i8*, i8** %77
%79 = icmp eq i8* %78, null
br i1 %79, label %122, label %80
80: ; preds = %75
%81 = call i32 @strcmp(i8* %78, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.26, i64 0, i64 0))
%82 = icmp ne i32 %81, 0
%83 = add i64 %76, 1
%84 = getelementptr inbounds i8*, i8** %1, i64 %83
%85 = load i8*, i8** %84
%86 = icmp eq i8* %85, null
%87 = select i1 %82, i1 %86, i1 false
br i1 %87, label %122, label %88
88: ; preds = %80
%89 = load i8*, i8** @optarg
%90 = call i32 @atoi(i8* %89)
%91 = call i32 @replace_part(i32 %90, i8* %78, i8* %85)
br label %127
92: ; preds = %9
%93 = load i8*, i8** @optarg
%94 = call i32 @find_entries(i8* %93)
br label %127
95: ; preds = %9
%96 = load i8*, i8** @optarg
%97 = call i32 @atoi(i8* %96)
%98 = call i32 @show_passphrase_only(i32 %97)
br label %127
99: ; preds = %9
%100 = load i8*, i8** @optarg
%101 = call i32 @atoi(i8* %100)
%102 = call i32 @show_username_only(i32 %101)
br label %127
103: ; preds = %9
%104 = load i8*, i8** @optarg
%105 = call i32 @atoi(i8* %104)
%106 = call i32 @show_url_only(i32 %105)
br label %127
107: ; preds = %9
%108 = load i8*, i8** @optarg
%109 = call i32 @atoi(i8* %108)
%110 = call i32 @show_notes_only(i32 %109)
br label %127
111: ; preds = %9
%112 = call i32 (...) @show_all_entries()
br label %127
113: ; preds = %9
%114 = load i8*, i8** @optarg
%115 = call i32 @remove_database(i8* %114)
br label %127
116: ; preds = %9
%117 = call i32 (...) @show_database_statuses()
br label %127
118: ; preds = %9
%119 = call i32 (...) @version_print()
br label %127
120: ; preds = %9
%121 = call i32 (...) @usage()
br label %127
122: ; preds = %80, %75, %63, %58, %53, %22, %14
%123 = phi i8* [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.21, i64 0, i64 0), %14 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.22, i64 0, i64 0), %53 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.23, i64 0, i64 0), %58 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.24, i64 0, i64 0), %63 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0), %75 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.25, i64 0, i64 0), %80 ]
%124 = load i32, i32* @stderr
%125 = call i32 @fprintf(i32 %124, i8* %123)
br label %126
126: ; preds = %9, %122
br label %128
127: ; preds = %11, %19, %27, %30, %33, %35, %48, %68, %71, %88, %92, %95, %99, %103, %107, %111, %113, %116, %118, %120, %9
br label %9
128: ; preds = %126, %7
ret i32 0
}