// File: /workspace/github_cpp_makefile_star2_O3/rofl0r[P]ascc/cs_parser.cpp
// Function: do_variable_ax(int, long*, ccCompiledScript*, int, int, bool)
int do_variable_ax(int slilen,long*syml,ccCompiledScript*scrip,int writing, int mustBeWritable, bool negateLiteral = false) {
  // read the various types of values into AX
  int ee;

  if (!writing)
    set_ax_scope(scrip, syml[0]);

  // separate out the variable path, into a variablePath
  // for the bit between each dot
  VariableSymlist variablePath[MAX_VARIABLE_PATH];

  int variablePathSize = extractPathIntoParts(variablePath, slilen, syml);
  if (variablePathSize == -1)
    return -1;

  int currentByteOffset = 0;
  // remember the type of the first variable in the list (since
  // that determines whether this is global/local)
  int firstVariableType, firstVariableSym = -1;
  bool isArrayOffset = false;
  bool isPointer = false;
  bool isDynamicArray = false;

  for (ee = 0; ee < variablePathSize; ee++) {
    VariableSymlist *thisClause = &variablePath[ee];

    int variableSym = thisClause->syml[0];
    int variableSymType = sym.get_type(variableSym);
    if (firstVariableSym < 0) {
      firstVariableSym = variableSym;
      firstVariableType = variableSymType;
    }

    // each clause in the chain can be marked as Accessed
    sym.entries[variableSym].flags |= SFLG_ACCESSED;

    bool getAddressOnlyIntoAX = false;
    bool doMemoryAccessNow = false;
    bool isLastClause = (ee == variablePathSize - 1);
    bool cannotAssign = false;
    bool isProperty = false;
    bool accessActualPointer = false;

    // the memory access only wants to write if this is the
    // end of the path, not an intermediate pathing property
    bool writingThisTime = isLastClause && writing;

    // offset to add to CX after array index is calculated for struct member in dynarray
    int array_struct_offset_add = 0;

    if (sym.entries[variableSym].flags & SFLG_PROPERTY) { }
    else if (sym.entries[variableSym].flags & SFLG_IMPORTED) { }
    else if (isDynamicArray && variableSymType == SYM_STRUCTMEMBER) {
      array_struct_offset_add = sym.entries[variableSym].soffs;
    }
    else if ((variableSymType == SYM_GLOBALVAR) || (variableSymType == SYM_LOCALVAR) ||
        (variableSymType == SYM_STRUCTMEMBER) || (variableSymType == SYM_STRING)) {
      // since the member has a fixed offset into the structure, don't
      // write out any code to calculate the offset - instead, modify
      // the hard offset value which will be written to MAR
      currentByteOffset += sym.entries[variableSym].soffs;
    }

    if (variableSymType == SYM_FUNCTION) {
      // member function. all that's wanted is the owning object's
      // address
      getAddressOnlyIntoAX = true;
      doMemoryAccessNow = true;

      if (!isLastClause) {
        cc_error("Function().Member not supported");
        return -1;
      }
    }
    else if (sym.entries[variableSym].flags & SFLG_PROPERTY) {
      // since a property is effectively a function call, load
      // the object's address
      getAddressOnlyIntoAX = true;
      doMemoryAccessNow = true;
      isProperty = true;

      if ((sym.entries[variableSym].flags & SFLG_ARRAY) &&
          ((thisClause->len <= 1) ||
           (sym.get_type(thisClause->syml[1]) != SYM_OPENBRACKET))) {
        // normally, the whole array can be used as a pointer.
        // this is not the case with an property array, so catch
        // it here and give an error
        cc_error("Expected array index after '%s'", sym.get_friendly_name(variableSym).c_str());
        return -1;
      }

      if (parseArrayIndexOffsets(scrip, thisClause, writing != 0, &isArrayOffset))
        return -1;

      if (mustBeWritable) {
        // cannot use ++ or -- with property, because the memory
        // access shortcut won't work
        // Therefore, tell the caller to do it properly
        // and call us again to write the value
        readonly_cannot_cause_error = 1;
      }
      else if (writing) {

        if ((writingThisTime) && (sym.entries[variableSym].flags & SFLG_READONLY)) {
          cc_error("property '%s' is read-only", sym.get_friendly_name(variableSym).c_str());
          return -1;
        }

        // Property Set -- move the new value into BX, so
        // that the object address can be retrieved into AX
        scrip->write_cmd2(SCMD_REGTOREG, SREG_AX, SREG_BX);
      }

    }
    else if (sym.entries[variableSym].flags & SFLG_POINTER) {
      bool isArrayOfPointers = false;

      if (sym.entries[variableSym].flags & SFLG_ARRAY) {
        // array of pointers

        if ((thisClause->len <= 1) ||
           (sym.get_type(thisClause->syml[1]) != SYM_OPENBRACKET)) {
          // normally, the whole array can be used as a pointer.
          // this is not the case with an pointer array, so catch
          // it here and give an error
          if (sym.entries[variableSym].flags & SFLG_DYNAMICARRAY)
          {
            isDynamicArray = true;
          }
          else
          {
            cc_error("Expected array index after '%s'", sym.get_friendly_name(variableSym).c_str());
            return -1;
          }
        }
        else
        {
          // put array index into DX
          if (parseArrayIndexOffsets(scrip, thisClause, writing != 0, &isArrayOffset))
            return -1;

          isArrayOfPointers = true;
        }
      }

      // if they are just saying "ptr" (or doing a "ptr.Func" call)
      // then move the address being pointed to into AX
      // (member function call passes in "ptr.")
      if (isLastClause)
        getAddressOnlyIntoAX = true;

      // Push the pointer address onto the stack, where it can be
      // retrieved by do_variable_memory_access later on
      if (sym.entries[variableSym].flags & SFLG_THISPTR) {
        if (isPointer) {
          // already a pointer on the stack
          cc_error("Nested this pointers??");
          return -1;
        }

        // for the "this" pointer, just use the Object Pointer
        scrip->push_reg(SREG_OP);
      }
      else {
        // currentByteOffset has been set at the start of this loop
        // so it is safe to use

        if (isPointer) {
          // already a pointer on the stack
          scrip->pop_reg(SREG_MAR);
          scrip->write_cmd(SCMD_CHECKNULL);
          if (currentByteOffset > 0)
            scrip->write_cmd2(SCMD_ADD, SREG_MAR, currentByteOffset);
        }
        else if (firstVariableType == SYM_LOCALVAR) {
          load_stack_variable(scrip, scrip->cur_sp - currentByteOffset);
        }
        else if (firstVariableType == SYM_GLOBALVAR) {

          if (sym.entries[firstVariableSym].flags & SFLG_IMPORTED) {
            scrip->write_cmd2(SCMD_LITTOREG, SREG_MAR, sym.entries[firstVariableSym].soffs);
            scrip->fixup_previous(FIXUP_IMPORT);
            if (currentByteOffset)
              scrip->write_cmd2(SCMD_ADD, SREG_MAR, currentByteOffset);
          }
          else {
            scrip->write_cmd2(SCMD_LITTOREG, SREG_MAR, currentByteOffset);
            scrip->fixup_previous(FIXUP_GLOBALDATA);
          }
        }
        else {
          cc_error("Invalid type for pointer");
          return -1;
        }

        // if an array, the array indexer was put into DX
        if (isArrayOfPointers)
        {
          scrip->write_cmd2(SCMD_MUL, SREG_DX, 4);

          if (sym.entries[variableSym].flags & SFLG_DYNAMICARRAY)
          {
            // pointer to an array -- dereference the pointer
            scrip->write_cmd1(SCMD_MEMREADPTR, SREG_MAR);
            scrip->write_cmd(SCMD_CHECKNULL);
            scrip->write_cmd1(SCMD_DYNAMICBOUNDS, SREG_DX);
          }

          scrip->write_cmd2(SCMD_ADDREG, SREG_MAR, SREG_DX);
        }

        // push the pointer's address
        scrip->push_reg(SREG_MAR);
        getAddressOnlyIntoAX = true;
        accessActualPointer = true;
        doMemoryAccessNow = true;
      }
      currentByteOffset = 0;

      // Pointer
      isPointer = true;
    }
    else {

      if (sym.entries[variableSym].flags & SFLG_DYNAMICARRAY)
      {
        isDynamicArray = true;
      }

      if (parseArrayIndexOffsets(scrip, thisClause, writing != 0, &isArrayOffset))
        return -1;

    }

    // if one of the struct members in the path is read-only, don't allow it
    if (((writing) || (mustBeWritable)) && (readonly_cannot_cause_error == 0)) {
      // allow writing to read-only pointers if it's actually
      // a property being accessed
      if ((sym.entries[variableSym].flags & SFLG_POINTER) && (!isLastClause)) { }
      else if (sym.entries[variableSym].flags & SFLG_READONLY) {
        cc_error("variable '%s' is read-only", sym.get_friendly_name(variableSym).c_str());
        return -1;
      }
      else if (sym.entries[variableSym].flags & SFLG_WRITEPROTECTED) {
        // write-protected variables can only be written by
        // the this ptr
        if ((ee > 0) && (sym.entries[variablePath[ee - 1].syml[0]].flags & SFLG_THISPTR)) { }
        else {
          cc_error("variable '%s' is write-protected", sym.get_friendly_name(variableSym).c_str());
          return -1;
        }

      }
    }


    if (sym.entries[variableSym].flags & SFLG_ARRAY) {
      // array without index specified -- get address
      if ((thisClause->len == 1) ||
          (sym.get_type(thisClause->syml[1]) != SYM_OPENBRACKET)) {

        if ((sym.entries[variableSym].flags & SFLG_DYNAMICARRAY) == 0
           && sym.entries[variableSym].arrsize != 0)
        {
          getAddressOnlyIntoAX = true;
          cannotAssign = true;
        }
      }

    }

    if (sym.entries[variableSym].flags & SFLG_POINTER) { }
    else if (sym.entries[sym.entries[variableSym].vartype].flags & SFLG_STRUCTTYPE) {
      // struct variable without member access
      if (isLastClause)
      {
        if ((sym.entries[variableSym].flags & SFLG_DYNAMICARRAY) == 0)
        {
          getAddressOnlyIntoAX = true;
          cannotAssign = true;
        }
      }
    }

    if ((writing) && (cannotAssign)) {
      // an entire array or struct cannot be assigned to
      cc_error("cannot assign to '%s'", sym.get_friendly_name(variableSym).c_str());
      return -1;
    }

    if ((doMemoryAccessNow) || (isLastClause)) {

      int cachedAxValType = scrip->ax_val_type;

      // if a pointer in use, then its address was pushed on the
      // stack, so restore it here
      if (isPointer)
        scrip->pop_reg(SREG_MAR);

      // in a writing operation, but not doing it just yet -- push
      // AX to save the value to write
      if ((writing) && (!writingThisTime))
        scrip->push_reg(SREG_AX);

      if (do_variable_memory_access(scrip, variableSym, variableSymType,
                                    isProperty, writingThisTime, mustBeWritable,
                                    getAddressOnlyIntoAX, isArrayOffset,
                                    currentByteOffset, isPointer,
                                    accessActualPointer,
                                    firstVariableSym, firstVariableType,
                                    isDynamicArray, negateLiteral, array_struct_offset_add))
        return -1;

      // reset stuff
      currentByteOffset = 0;
      array_struct_offset_add = 0;
      isArrayOffset = false;
      isPointer = false;
      isDynamicArray = false;
      //firstVariableSym = -1;
      firstVariableType = SYM_GLOBALVAR;

      if (!isLastClause) {
        if ((isProperty) || (getAddressOnlyIntoAX)) {
          // pathing, eg. lstItems.OwningGUI.ID
          // we just read a pointer address, so re-push it for use
          // next time round
          if (writing) {
            scrip->ax_val_type = cachedAxValType;
            // the value to write was pushed onto the stack,
            // pop it back into BX
            scrip->pop_reg(SREG_BX);
            // meanwhile push the pointer
            // that was just read into AX onto the stack in its place
            scrip->push_reg(SREG_AX);
            // and then copy the value back into AX
            scrip->write_cmd2(SCMD_REGTOREG, SREG_BX, SREG_AX);
          }
          else
            scrip->push_reg(SREG_AX);

          isPointer = true;
        }
        else {
          cc_error("Invalid pathing: unexpected '%s'", sym.get_friendly_name(variablePath[ee + 1].syml[0]).c_str());
          return -1;
        }

      }

      // proceed round loop to next clause
    }


  }

  // free the VariablePaths
  for (ee = 0; ee < variablePathSize; ee++)
    variablePath[ee].destroy();

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movl %r9d, 0x90(%rsp)
movl %r8d, 0x6c(%rsp)
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
movl %ecx, 0x18(%rsp)
testl %ecx, %ecx
jne 0xa041
movl (%rbx), %esi
movq %r14, %rdi
callq 0x7ebb
leaq 0xb0(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x7fd1
cmpl $-0x1, %eax
je 0xa99b
movb $0x0, 0xe(%rsp)
testl %eax, %eax
jle 0xa857
movl 0x18(%rsp), %ecx
testl %ecx, %ecx
sete 0x1f(%rsp)
leal -0x1(%rax), %edx
movl 0x6c(%rsp), %esi
orl %ecx, %esi
movl %esi, 0x94(%rsp)
movq %rax, 0xa0(%rsp)
movl %eax, %eax
shlq $0x4, %rdx
movq %rdx, 0x60(%rsp)
movq %rax, 0x98(%rsp)
shlq $0x4, %rax
movq %rax, 0xa8(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x78(%rsp)
xorl %r15d, %r15d
leaq 0x1b621(%rip), %rbp     # 0x256e0
xorl %eax, %eax
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq %r14, 0x20(%rsp)
movq %rax, 0x28(%rsp)
cmpl $0x0, 0x18(%rsp)
setne %r12b
leaq 0xb0(%rsp,%r15), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq (%rax), %r14
movq %rbp, %rdi
movl %r14d, %esi
callq 0x1106e
movq 0x78(%rsp), %rcx
testl %ecx, %ecx
cmovsl %r14d, %ecx
movq %rcx, 0x78(%rsp)
cmovsl %eax, %ebx
movq %r14, 0x58(%rsp)
movslq %r14d, %rdx
movq 0x28(%rbp), %rcx
imulq $0xb0, %rdx, %r13
movq 0x28(%rcx,%r13), %rsi
movq %rsi, %rdx
orq $0x8, %rdx
movq %rdx, 0x28(%rcx,%r13)
cmpq %r15, 0x60(%rsp)
sete %r14b
andb %r14b, %r12b
movb %r12b, 0xf(%rsp)
btl $0x9, %esi
movq %rbx, 0x80(%rsp)
jb 0xa18c
testb $0x4, %sil
jne 0xa229
leaq (%rcx,%r13), %rdx
cmpl $0xa, %eax
jne 0xa20d
testb $0x1, 0x14(%rsp)
je 0xa20d
movl 0x34(%rdx), %r12d
jmp 0xa24f
cmpl $0x4, %eax
je 0xa231
testb $0x2, %sil
je 0xa1c5
movq 0x30(%rsp), %rax
cmpl $0x2, (%rax)
jl 0xa871
movq 0x88(%rsp), %rax
movl 0x8(%rax), %esi
movq %rbp, %rdi
callq 0x1106e
cmpl $0x7, %eax
jne 0xa871
xorl %edx, %edx
cmpl $0x0, 0x18(%rsp)
setne %dl
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0xe(%rsp), %rcx
callq 0x9547
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xa9a0
cmpl $0x0, 0x6c(%rsp)
je 0xa301
movl $0x1, 0x1b4af(%rip)     # 0x256b4
movb $0x1, %r14b
jmp 0xa342
cmpl $0x12, %eax
ja 0xa229
movl $0x40406, %edi          # imm = 0x40406
btl %eax, %edi
jae 0xa229
movq 0x28(%rsp), %rdi
addl 0x34(%rdx), %edi
movq %rdi, 0x28(%rsp)
xorl %r12d, %r12d
cmpl $0x4, %eax
jne 0xa24f
cmpq %r15, 0x60(%rsp)
jne 0xa85e
movb $0x1, %r14b
movq $0x0, 0x70(%rsp)
movb $0x1, %bl
jmp 0xa3ee
btl $0x8, %esi
movq %r12, 0x70(%rsp)
jb 0xa29f
xorl %edx, %edx
cmpl $0x0, 0x18(%rsp)
setne %dl
btl $0x12, %esi
movl 0x14(%rsp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovbl %eax, %ecx
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0xe(%rsp), %rcx
callq 0x9547
testl %eax, %eax
jne 0xa99b
xorl %r14d, %r14d
jmp 0xa3ec
testb $0x2, %sil
je 0xa36b
movq 0x30(%rsp), %rax
cmpl $0x2, (%rax)
jl 0xa359
movq 0x88(%rsp), %rax
movl 0x8(%rax), %esi
movq %rbp, %rdi
callq 0x1106e
cmpl $0x7, %eax
jne 0xa355
xorl %edx, %edx
cmpl $0x0, 0x18(%rsp)
setne %dl
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0xe(%rsp), %rcx
callq 0x9547
testl %eax, %eax
jne 0xa99b
movq 0x28(%rbp), %rcx
movb $0x1, %bl
jmp 0xa36d
movb $0x1, %r14b
cmpl $0x0, 0x18(%rsp)
je 0xa342
cmpb $0x0, 0xf(%rsp)
je 0xa329
leaq 0x1b3c7(%rip), %rax     # 0x256e0
movq 0x28(%rax), %rax
testb $0x40, 0x28(%rax,%r13)
jne 0xa9b4
movq 0x20(%rsp), %rdi
movl $0x3, %esi
movl $0x3, %edx
movl $0x4, %ecx
callq 0x1348e
movq $0x0, 0x70(%rsp)
movb $0x1, %bl
movb $0x1, %r12b
jmp 0xa3f1
movq 0x28(%rbp), %rcx
testb $0x4, 0x2a(%rcx,%r13)
je 0xa956
movb $0x1, %al
movl %eax, 0x14(%rsp)
xorl %ebx, %ebx
testb $0x8, 0x29(%rcx,%r13)
jne 0xa3c3
testb $0x1, 0x10(%rsp)
je 0xa6b0
movq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
callq 0x13524
movq %r14, %rdi
movl $0x34, %esi
callq 0x1340c
movq 0x28(%rsp), %rcx
testl %ecx, %ecx
jle 0xa74c
movq %r14, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1348e
jmp 0xa74c
testb $0x1, 0x10(%rsp)
jne 0xa94a
movq 0x20(%rsp), %rdi
movl $0x6, %esi
callq 0x134f6
movq $0x0, 0x28(%rsp)
movb $0x1, %al
movl %eax, 0x10(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %ebp, %ebp
leaq 0x1b2e6(%rip), %rax     # 0x256e0
movq 0x28(%rax), %rcx
movq 0x28(%rcx,%r13), %rax
cmpl $0x0, 0x94(%rsp)
je 0xa453
cmpl $0x0, 0x1b2a0(%rip)     # 0x256b4
jne 0xa453
btl $0x8, %eax
jae 0xa423
cmpq %r15, 0x60(%rsp)
jne 0xa453
testb $0x40, %al
jne 0xa8a0
testw %ax, %ax
jns 0xa453
testq %r15, %r15
je 0xa8cf
movq 0xa8(%rsp,%r15), %rdx
imulq $0xb0, (%rdx), %rdx
testb $0x8, 0x29(%rcx,%rdx)
je 0xa8cf
testb $0x2, %al
je 0xa4c2
movq 0x30(%rsp), %rax
cmpl $0x1, (%rax)
je 0xa4a9
movl %r14d, 0x30(%rsp)
movq %r12, %r14
movq %rbp, %r12
movq 0x88(%rsp), %rax
movl 0x8(%rax), %esi
leaq 0x1b262(%rip), %rbp     # 0x256e0
movq %rbp, %rdi
callq 0x1106e
movq 0x28(%rbp), %rcx
cmpl $0x7, %eax
jne 0xa49e
xorl %eax, %eax
movq %r12, %rbp
movq %r14, %r12
movl 0x30(%rsp), %r14d
jmp 0xa4c4
movq %r12, %rbp
movq %r14, %r12
movl 0x30(%rsp), %r14d
testb $0x4, 0x2a(%rcx,%r13)
jne 0xa4c2
leaq (%rcx,%r13), %rax
cmpq $0x0, 0x48(%rax)
setne %al
orb %al, %r14b
jmp 0xa4c4
xorl %eax, %eax
movq 0x28(%rcx,%r13), %rdx
btl $0x8, %edx
jb 0xa4f8
addq %rcx, %r13
movswq 0x30(%r13), %rsi
imulq $0xb0, %rsi, %rsi
testb $0x4, 0x29(%rcx,%rsi)
je 0xa4f8
cmpq %r15, 0x60(%rsp)
jne 0xa4f8
btl $0x12, %edx
setae %cl
orb %cl, %r14b
orb %cl, %al
cmpl $0x0, 0x18(%rsp)
je 0xa507
testb $0x1, %al
jne 0xa7e7
cmpq %r15, 0x60(%rsp)
sete %al
orb %al, %bl
cmpb $0x1, %bl
jne 0xa60a
movq 0x20(%rsp), %rax
movl 0x8d4c(%rax), %ebx
testb $0x1, 0x10(%rsp)
je 0xa53b
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x13524
cmpq %r15, 0x60(%rsp)
sete %al
orb 0x1f(%rsp), %al
jne 0xa558
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x134f6
movzbl 0xf(%rsp), %r8d
movzbl 0xe(%rsp), %eax
movzbl 0x90(%rsp), %r11d
movzbl 0x14(%rsp), %r13d
andl $0x1, %r13d
movzbl %bpl, %ebp
movzbl 0x10(%rsp), %r10d
andl $0x1, %r10d
movzbl %r14b, %edx
andl $0x1, %edx
movzbl %r12b, %ecx
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x6c(%rsp), %r9d
pushq 0x70(%rsp)
pushq %r11
pushq %r13
pushq 0x98(%rsp)
pushq 0x98(%rsp)
pushq %rbp
pushq %r10
pushq 0x60(%rsp)
pushq %rax
pushq %rdx
callq 0x9950
addq $0x50, %rsp
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0xa9a0
movl $0x0, 0x10(%rsp)
movb $0x0, 0xe(%rsp)
movl $0x1, %eax
movq %rax, 0x80(%rsp)
cmpq %r15, 0x60(%rsp)
jne 0xa618
movl $0x0, 0x14(%rsp)
xorl %eax, %eax
leaq 0x1b0db(%rip), %rbp     # 0x256e0
jmp 0xa691
leaq 0x1b0cf(%rip), %rbp     # 0x256e0
movq 0x28(%rsp), %rax
jmp 0xa691
orb %r14b, %r12b
testb $0x1, %r12b
je 0xa8fe
cmpl $0x0, 0x18(%rsp)
leaq 0x1b0af(%rip), %rbp     # 0x256e0
je 0xa672
movq 0x20(%rsp), %r14
movl %ebx, 0x8d4c(%r14)
movq %r14, %rdi
movl $0x4, %esi
callq 0x13524
movq %r14, %rdi
movl $0x3, %esi
callq 0x134f6
movq %r14, %rdi
movl $0x3, %esi
movl $0x4, %edx
movl $0x3, %ecx
callq 0x1348e
jmp 0xa681
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x134f6
movl $0x0, 0x14(%rsp)
movb $0x1, %al
movl %eax, 0x10(%rsp)
xorl %eax, %eax
addq $0x10, %r15
cmpq %r15, 0xa8(%rsp)
movq 0x80(%rsp), %rbx
jne 0xa0d6
jmp 0xa816
movq 0x80(%rsp), %rax
cmpl $0x1, %eax
movq 0x20(%rsp), %r14
je 0xa6e0
cmpl $0x2, %eax
jne 0xa9e3
movl 0x8d40(%r14), %esi
subl 0x28(%rsp), %esi
movq %r14, %rdi
callq 0x5216
jmp 0xa74c
movslq 0x78(%rsp), %rax
imulq $0xb0, %rax, %rax
testb $0x4, 0x28(%rcx,%rax)
jne 0xa719
movq %r14, %rdi
movl $0x6, %esi
movl $0x2, %edx
movq 0x28(%rsp), %rcx
callq 0x1348e
movq %r14, %rdi
movl $0x1, %esi
callq 0x137c6
jmp 0xa74c
addq %rax, %rcx
movl 0x34(%rcx), %ecx
movq %r14, %rdi
movl $0x6, %esi
movl $0x2, %edx
callq 0x1348e
movq %r14, %rdi
movl $0x4, %esi
callq 0x137c6
movq 0x28(%rsp), %rcx
testl %ecx, %ecx
je 0xa74c
jmp 0xa3ac
testb %bl, %bl
je 0xa7bb
movq %r14, %rdi
movl $0x20, %esi
movl $0x7, %edx
movl $0x4, %ecx
callq 0x1348e
movq 0x28(%rbp), %rax
testb $0x4, 0x2a(%rax,%r13)
je 0xa7a4
movq %r14, %rdi
movl $0x30, %esi
movl $0x2, %edx
callq 0x1346e
movq %r14, %rdi
movl $0x34, %esi
callq 0x1340c
movq %r14, %rdi
movl $0x47, %esi
movl $0x7, %edx
callq 0x1346e
movq %r14, %rdi
movl $0xb, %esi
movl $0x2, %edx
movl $0x7, %ecx
callq 0x1348e
movq %r14, %rdi
movl $0x2, %esi
callq 0x134f6
movb $0x1, %al
movl %eax, 0x10(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x1, %r14b
movb $0x1, %bl
xorl %r12d, %r12d
movb $0x1, %bpl
jmp 0xa3f3
leaq 0x1aef2(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10c83(%rip), %rdi     # 0x1b48d
xorl %eax, %eax
callq 0x102f4
jmp 0xa980
cmpl $0x0, 0xa0(%rsp)
jle 0xa857
movq 0x98(%rsp), %r14
shlq $0x4, %r14
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0xb8(%rsp,%rbx), %rdi
callq 0x33c0
movq $0x0, 0xb8(%rsp,%rbx)
addq $0x10, %rbx
cmpq %rbx, %r14
jne 0xa830
jmp 0xa9a0
xorl %ebp, %ebp
jmp 0xa9a0
leaq 0x10b61(%rip), %rdi     # 0x1b3c6
xorl %eax, %eax
callq 0x102f4
jmp 0xa99b
leaq 0x1ae68(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10b52(%rip), %rdi     # 0x1b3e6
xorl %eax, %eax
callq 0x102f4
jmp 0xa980
leaq 0x1ae39(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10b8e(%rip), %rdi     # 0x1b451
xorl %eax, %eax
callq 0x102f4
jmp 0xa980
leaq 0x1ae0a(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10b7a(%rip), %rdi     # 0x1b46c
xorl %eax, %eax
callq 0x102f4
jmp 0xa980
movq 0xc8(%rsp,%r15), %rax
movl (%rax), %edx
leaq 0x1add1(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x11e2c
movq (%rbx), %rsi
leaq 0x10b7d(%rip), %rdi     # 0x1b4a3
xorl %eax, %eax
callq 0x102f4
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa9a0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3320
jmp 0xa9a0
leaq 0x10ad0(%rip), %rdi     # 0x1b421
jmp 0xa865
leaq 0x1ad83(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10a6d(%rip), %rdi     # 0x1b3e6
xorl %eax, %eax
callq 0x102f4
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa99b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3320
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1ad25(%rip), %rsi     # 0x256e0
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq 0x58(%rsp), %rdx
callq 0x11e2c
movq (%r14), %rsi
leaq 0x10a2f(%rip), %rdi     # 0x1b406
xorl %eax, %eax
callq 0x102f4
jmp 0xa92d
leaq 0x10a4e(%rip), %rdi     # 0x1b438
jmp 0xa865
jmp 0xa9fb
jmp 0xa9fb
jmp 0xa9fb
jmp 0xa9fb
jmp 0xa9fb
jmp 0xa9fb
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa19
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3320
movq %rbx, %rdi
callq 0x3560