// File: riyadparvez[P]louvain-method/main_community.cpp
// Function: parse_args(int, char**)
void
parse_args(int argc, char **argv) {
  if (argc<2)
    usage(argv[0], "Bad arguments number\n");

  for (int i = 1; i < argc; i++) {
    if(argv[i][0] == '-') {
      switch(argv[i][1]) {
      case 'w':
	type = WEIGHTED;
        filename_w = argv[i+1];
	i++;
	break;
      case 'o':
        write_community = true;
        filename_comm = argv[i+1];
    i++;
    break;
      case 'p':
        filename_part = argv[i+1];
	i++;
	break;
      case 'q':
	precision = atof(argv[i+1]);
	i++;
	break;
      case 'l':
	display_level = atoi(argv[i+1]);
	i++;
	break;
      case 'k':
	k1 = atoi(argv[i+1]);
	i++;
	break;
      case 'v':
	verbose=true;
	break;
      default:
	usage(argv[0], "Unknown option\n");
      }
    } else {
      if (filename==NULL)
        filename = argv[i];
      else
        usage(argv[0], "More than one filename\n");
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x4(%rbp)
jge 0x132e8
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x234a(%rip), %rsi      # 0x1562d
callq 0x130f0
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x134a5
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x13461
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
addl $-0x6b, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xc, %eax
ja 0x1344c
movq -0x20(%rbp), %rax
leaq 0x1f94(%rip), %rcx      # 0x152d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0xce65(%rip)      # 0x201b8
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xce7d(%rip)      # 0x201e8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movb $0x1, 0xce85(%rip)      # 0x20205
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xce58(%rip)      # 0x201f0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xce3a(%rip)      # 0x201f8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2210
movsd %xmm0, 0xcdd6(%rip)     # 0x201c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x22b0
movl %eax, 0xcdb7(%rip)      # 0x201c8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x22b0
movl %eax, 0xcd94(%rip)      # 0x201cc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1345f
movb $0x1, 0xcdba(%rip)      # 0x20204
jmp 0x1345f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x21e9(%rip), %rsi      # 0x15643
callq 0x130f0
jmp 0x13495
cmpq $0x0, 0xcd77(%rip)      # 0x201e0
jne 0x13480
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xcd62(%rip)      # 0x201e0
jmp 0x13493
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x21c5(%rip), %rsi      # 0x15653
callq 0x130f0
jmp 0x13495
jmp 0x13497
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x132ef
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)