// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/parse.cpp
// Function: lineParsing(int, char**)
void lineParsing (int argc, char** argv) {
  if (argc == 1) {
    showHelp();
    exit(0);
  }
  else {

    for (int i = 1; i < argc; i++) {
      if (!strcmp(argv[i], "-help")) {
        showHelp();
        exit(0);
      }
      else if (!strcmp(argv[i], "-end")) {
        lte::EndNum = atoi(argv[++i]);
	cerr << "EndNum = \t" << lte::EndNum << endl;
      }
      else if (!strcmp(argv[i], "-rand")) {
        lte::RandomBackoffIndex = atoi(argv[++i]);
	cerr << "Random Backoff Index = \t" << lte::RandomBackoffIndex << endl;
      }
      else if (!strcmp(argv[i], "-type")) {
        if (!strcmp(argv[++i], "uniform")) {
          lte::traffic_type = uniform_start;
	  cerr << "traffic type = \t" << "uniform\n";
	}
        else if (!strcmp(argv[i], "beta")) {
          lte::traffic_type = beta_start;
	  cerr << "traffic type = \t" << "beta\n";
	}
        else {
          cerr << "false traffic type " << argv[i] << endl;
          exit(1);
        }
      } 
      else if (!strcmp(argv[i], "-max")) {
	lte::MAX = atoi(argv[++i]);
	cerr << "limit of retransmition = \t" << lte::MAX << endl;
      }
      else if (!strcmp(argv[i], "-pre")) {
	double part = atoi(argv[++i]);
	if ((part >= 1) && (part <= 54)) {
	    lte::preambleNum = part;
	    cerr << "Num. of preamble for machine = \t" 
              << lte::preambleNum <<endl;
	}
      }
      else {
        cerr << "false argument " << argv[i] << endl;
        exit(1);
      }
    }

  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
je 0x3ce3
jle 0x3cd4
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %r14d
movq 0x4054f(%rip), %r12     # 0x43ff0
movslq %r14d, %r15
movq (%rbx,%r15,8), %r13
movq %r13, %rdi
leaq 0x3060e(%rip), %rsi     # 0x340c0
callq 0x3340
testl %eax, %eax
je 0x3ce3
movq %r13, %rdi
leaq 0x305fd(%rip), %rsi     # 0x340c6
callq 0x3340
testl %eax, %eax
je 0x3b6a
movq %r13, %rdi
leaq 0x305f6(%rip), %rsi     # 0x340d6
callq 0x3340
testl %eax, %eax
je 0x3b96
movq %r13, %rdi
leaq 0x305fe(%rip), %rsi     # 0x340f5
callq 0x3340
testl %eax, %eax
je 0x3bc2
movq %r13, %rdi
leaq 0x3062e(%rip), %rsi     # 0x3413c
callq 0x3340
testl %eax, %eax
je 0x3c2e
movq %r13, %rdi
leaq 0x30637(%rip), %rsi     # 0x3415c
callq 0x3340
testl %eax, %eax
jne 0x3cef
leal 0x1(%r15), %r14d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x3390
leal -0x1(%rax), %ecx
cmpl $0x35, %ecx
ja 0x3c8f
leaq 0x40705(%rip), %r15     # 0x44258
movl %eax, (%r15)
movl $0x20, %edx
movq %r12, %rdi
leaq 0x305fc(%rip), %rsi     # 0x34161
jmp 0x3c55
leal 0x1(%r15), %r14d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x3390
leaq 0x406dd(%rip), %r15     # 0x4425c
movl %eax, (%r15)
movl $0xa, %edx
movq %r12, %rdi
leaq 0x3053a(%rip), %rsi     # 0x340cb
jmp 0x3c55
leal 0x1(%r15), %r14d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x3390
leaq 0x406bd(%rip), %r15     # 0x44268
movl %eax, (%r15)
movl $0x18, %edx
movq %r12, %rdi
leaq 0x3051f(%rip), %rsi     # 0x340dc
jmp 0x3c55
leal 0x1(%r15), %r14d
movq 0x8(%rbx,%r15,8), %r13
movq %r13, %rdi
leaq 0x30526(%rip), %rsi     # 0x340fb
callq 0x3340
testl %eax, %eax
je 0x3c9d
movq %r13, %rdi
leaq 0x30531(%rip), %rsi     # 0x3411d
callq 0x3340
testl %eax, %eax
jne 0x3cff
leaq 0x40674(%rip), %rax     # 0x44274
movl $0x3, (%rax)
movl $0x10, %edx
movq %r12, %rdi
leaq 0x304ee(%rip), %rsi     # 0x34103
callq 0x32d0
movl $0x5, %edx
movq %r12, %rdi
leaq 0x304f9(%rip), %rsi     # 0x34122
jmp 0x3ccd
leal 0x1(%r15), %r14d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x3390
leaq 0x40621(%rip), %r15     # 0x44264
movl %eax, (%r15)
movl $0x1a, %edx
movq %r12, %rdi
leaq 0x304ec(%rip), %rsi     # 0x34141
callq 0x32d0
movl (%r15), %esi
movq %r12, %rdi
callq 0x3400
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
incl %r14d
cmpl %ebp, %r14d
jl 0x3aa1
jmp 0x3cd4
leaq 0x405d0(%rip), %rax     # 0x44274
movl $0x2, (%rax)
movl $0x10, %edx
movq %r12, %rdi
leaq 0x3044a(%rip), %rsi     # 0x34103
callq 0x32d0
movl $0x8, %edx
movq %r12, %rdi
leaq 0x30447(%rip), %rsi     # 0x34114
callq 0x32d0
jmp 0x3c8f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3980
xorl %edi, %edi
callq 0x3300
movq 0x402fa(%rip), %rdi     # 0x43ff0
leaq 0x30485(%rip), %rsi     # 0x34182
jmp 0x3d10
incq %r15
movq 0x402e7(%rip), %rdi     # 0x43ff0
leaq 0x30418(%rip), %rsi     # 0x34128
callq 0x3290
movq (%rbx,%r15,8), %rsi
movq %rax, %rdi
callq 0x3290
movq %rax, %rdi
callq 0x3130
movl $0x1, %edi
callq 0x3300
nop