// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/CmdLine.cpp
// Function: CmdLine::parse_cmdargs(int, char**)
void CmdLine::parse_cmdargs(int argc, char **argv) {
    
  for (int i=1; i<argc; i++) {

    // Create g-trie ?
    if (!strcmp("-c",argv[i]) || !strcmp("--create",argv[i])) {
      create=true;
      strcpy(subgraphs_file, argv[++i]);
    }
    
    // Graph file
    else if (!strcmp("-g",argv[i]) || !strcmp("--graph",argv[i])) {
      strcpy(graph_file, argv[++i]);
    }

    // Output file
    else if (!strcmp("-o",argv[i]) || !strcmp("--output",argv[i])) {
      strcpy(output_file, argv[++i]);
    }

    // Output file
    else if (!strcmp("-oc",argv[i]) || !strcmp("--occurrences",argv[i])) {
      occurrences = true;
      strcpy(occ_file, argv[++i]);
    }

    // Output format
    else if (!strcmp("-t",argv[i]) || !strcmp("--type",argv[i])) {
      output = str_to_output(argv[++i]);
    }

    // Size of motifs to consider
    else if (!strcmp("-s",argv[i]) || !strcmp("--size",argv[i])) {
      motif_size = atoi(argv[++i]);
    }

    // Method for set of subgraphs
    else if (!strcmp("-m",argv[i]) || !strcmp("--method",argv[i])) {
      method = str_to_method(argv[++i]);
      if (method == SUBGRAPHS) strcpy(subgraphs_file, argv[++i]);
      else if (method == GTRIE) strcpy(gtrie_file, argv[++i]);
    }

    // Graph format
    else if (!strcmp("-f",argv[i]) || !strcmp("--format",argv[i])) {
      format = str_to_format(argv[++i]);
    }
    
    // Directed Graph
    else if (!strcmp("-d",argv[i]) || !strcmp("--directed",argv[i])) {
      dir=true;
    }

    // Undirected Graph
    else if (!strcmp("-u",argv[i]) || !strcmp("--undirected",argv[i])) {
      dir=false;
    }

    // Number of random networks
    else if (!strcmp("-r",argv[i]) || !strcmp("--random",argv[i])) {
      random_number = atoi(argv[++i]);
    }

    // Random seed
    else if (!strcmp("-rs",argv[i]) || !strcmp("--rseed",argv[i])) {
      random_seed = atoi(argv[++i]);
    }

    // Number of exchanges per edge
    else if (!strcmp("-re",argv[i]) || !strcmp("--rexchanges",argv[i])) {
      random_exchanges = atoi(argv[++i]);
    }

    // Number of tries per node
    else if (!strcmp("-rt",argv[i]) || !strcmp("--rtries",argv[i])) {
      random_tries = atoi(argv[++i]);
    }

  }

  // If no random seed given, initialize with time
  // (not an optimal choice, but present here for portability)
  if (random_seed<0) Random::seed(time(NULL));
  else               Random::seed(random_seed);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x5e40
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b18b(%rip), %rdi     # 0x20a60
callq 0x3390
cmpl $0x0, %eax
je 0x58fc
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b171(%rip), %rdi     # 0x20a63
callq 0x3390
cmpl $0x0, %eax
jne 0x5928
movb $0x1, 0x2788f(%rip)     # 0x2d192
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x26c72(%rip), %rdi     # 0x2c590
callq 0x3250
jmp 0x5e30
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b131(%rip), %rdi     # 0x20a6c
callq 0x3390
cmpl $0x0, %eax
je 0x5962
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b117(%rip), %rdi     # 0x20a6f
callq 0x3390
cmpl $0x0, %eax
jne 0x5987
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x26413(%rip), %rdi     # 0x2bd90
callq 0x3250
jmp 0x5e2e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b0dd(%rip), %rdi     # 0x20a77
callq 0x3390
cmpl $0x0, %eax
je 0x59c1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b0c3(%rip), %rdi     # 0x20a7a
callq 0x3390
cmpl $0x0, %eax
jne 0x59e6
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x26fb4(%rip), %rdi     # 0x2c990
callq 0x3250
jmp 0x5e2c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b08a(%rip), %rdi     # 0x20a83
callq 0x3390
cmpl $0x0, %eax
je 0x5a20
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b071(%rip), %rdi     # 0x20a87
callq 0x3390
cmpl $0x0, %eax
jne 0x5a4c
movb $0x1, 0x2776a(%rip)     # 0x2d191
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x2734e(%rip), %rdi     # 0x2cd90
callq 0x3250
jmp 0x5e2a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b036(%rip), %rdi     # 0x20a95
callq 0x3390
cmpl $0x0, %eax
je 0x5a86
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b01c(%rip), %rdi     # 0x20a98
callq 0x3390
cmpl $0x0, %eax
jne 0x5aaa
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5f90
movl %eax, 0x2771b(%rip)     # 0x2d1c0
jmp 0x5e28
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1afe2(%rip), %rdi     # 0x20a9f
callq 0x3390
cmpl $0x0, %eax
je 0x5ae4
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1afc8(%rip), %rdi     # 0x20aa2
callq 0x3390
cmpl $0x0, %eax
jne 0x5b08
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33e0
movl %eax, 0x27691(%rip)     # 0x2d194
jmp 0x5e26
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1af8e(%rip), %rdi     # 0x20aa9
callq 0x3390
cmpl $0x0, %eax
je 0x5b42
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1af74(%rip), %rdi     # 0x20aac
callq 0x3390
cmpl $0x0, %eax
jne 0x5bbc
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5eb0
movl %eax, 0x27657(%rip)     # 0x2d1b8
cmpl $0x3, 0x27650(%rip)     # 0x2d1b8
jne 0x5b8c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x26a0b(%rip), %rdi     # 0x2c590
callq 0x3250
jmp 0x5bb7
cmpl $0x2, 0x27625(%rip)     # 0x2d1b8
jne 0x5bb5
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x265e0(%rip), %rdi     # 0x2c190
callq 0x3250
jmp 0x5bb7
jmp 0x5e24
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1aee6(%rip), %rdi     # 0x20ab5
callq 0x3390
cmpl $0x0, %eax
je 0x5bf6
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1aecc(%rip), %rdi     # 0x20ab8
callq 0x3390
cmpl $0x0, %eax
jne 0x5c1a
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5f30
movl %eax, 0x275a7(%rip)     # 0x2d1bc
jmp 0x5e22
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae94(%rip), %rdi     # 0x20ac1
callq 0x3390
cmpl $0x0, %eax
je 0x5c54
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae7a(%rip), %rdi     # 0x20ac4
callq 0x3390
cmpl $0x0, %eax
jne 0x5c60
movb $0x1, 0x27535(%rip)     # 0x2d190
jmp 0x5e20
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae5c(%rip), %rdi     # 0x20acf
callq 0x3390
cmpl $0x0, %eax
je 0x5c9a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae42(%rip), %rdi     # 0x20ad2
callq 0x3390
cmpl $0x0, %eax
jne 0x5ca6
movb $0x0, 0x274ef(%rip)     # 0x2d190
jmp 0x5e1e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae26(%rip), %rdi     # 0x20adf
callq 0x3390
cmpl $0x0, %eax
je 0x5ce0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ae0c(%rip), %rdi     # 0x20ae2
callq 0x3390
cmpl $0x0, %eax
jne 0x5d04
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33e0
movl %eax, 0x27499(%rip)     # 0x2d198
jmp 0x5e1c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1add4(%rip), %rdi     # 0x20aeb
callq 0x3390
cmpl $0x0, %eax
je 0x5d3e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1adbb(%rip), %rdi     # 0x20aef
callq 0x3390
cmpl $0x0, %eax
jne 0x5d62
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33e0
movl %eax, 0x2743f(%rip)     # 0x2d19c
jmp 0x5e1a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ad82(%rip), %rdi     # 0x20af7
callq 0x3390
cmpl $0x0, %eax
je 0x5d9c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ad69(%rip), %rdi     # 0x20afb
callq 0x3390
cmpl $0x0, %eax
jne 0x5dbd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33e0
movl %eax, 0x273e5(%rip)     # 0x2d1a0
jmp 0x5e18
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ad38(%rip), %rdi     # 0x20b08
callq 0x3390
cmpl $0x0, %eax
je 0x5df7
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1ad1f(%rip), %rdi     # 0x20b0c
callq 0x3390
cmpl $0x0, %eax
jne 0x5e16
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x33e0
movl %eax, 0x2738e(%rip)     # 0x2d1a4
jmp 0x5e18
jmp 0x5e1a
jmp 0x5e1c
jmp 0x5e1e
jmp 0x5e20
jmp 0x5e22
jmp 0x5e24
jmp 0x5e26
jmp 0x5e28
jmp 0x5e2a
jmp 0x5e2c
jmp 0x5e2e
jmp 0x5e30
jmp 0x5e32
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x58b6
cmpl $0x0, 0x27355(%rip)     # 0x2d19c
jge 0x5e5b
xorl %eax, %eax
movl %eax, %edi
callq 0x3240
movl %eax, %edi
callq 0x18c60
jmp 0x5e66
movl 0x2733b(%rip), %edi     # 0x2d19c
callq 0x18c60
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)