// File: /workspace/github_cpp_makefile_star2_O3/jsteemann[P]jshund/src/./Validator.h
// Function: jshund::Validator::validate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<jshund::Token, std::allocator<jshund::Token>> const&)
int validate (std::string const& filename, std::vector<Token> const& tokens) {
        int errors = 0;
        int brackets = 0;

        _filename = filename;

        State startState(STATE_NOTHING, 1, brackets);

        std::vector<State> states;
        states.push_back(startState);

        for (size_t i = 0, n = tokens.size(); i < n; ++i) {
          State& currentState = states[states.size() - 1];
          Token const& currentToken = tokens[i];
            
          if (currentState.type == STATE_VARDECL && 
              ! currentState.expectDeclaration && 
              currentToken.type == TOKEN_COMMA &&
              currentState.brackets == brackets) {
            // std::cout << "FOUND COMMA\n";
            currentState.expectDeclaration = true;
          }

          else if (currentToken.type == TOKEN_NAME) {
            if (i > 0 && tokens[i - 1].type == TOKEN_DOT) {
              // compound name, e.g. foo.bar
              //                         ^^^
              continue;
            }

            const std::string name = currentToken.value;

            if (currentState.type == STATE_FUNCARG) {
              // std::cout << "FOUND FUNCTION ARGUMENT '" << name << "'" << std::endl;

              currentState.declaredVariables.insert(std::pair<std::string, Variable>(name, Variable(currentToken.line, true)));
            }
            else if (currentState.type == STATE_VARDECL && currentState.expectDeclaration) {
              // std::cout << "FOUND DECLARATION OF VAR '" << name << "'" << std::endl;

              if (states.size() <= 1) {
                std::cerr << _filename << ':' << currentToken.line << ": encountered an invalid state during parsing" << std::endl;
                return 1;
              }

              bool wasPhantom = states[states.size() - 2].phantoms.erase(name);
              // if (wasPhantom) {
              //   std::cout << "IGNORING PHANTOM '" << name << "'\n";
              // }
              states[states.size() - 2].declaredVariables.insert(std::pair<std::string, Variable>(name, Variable(currentToken.line, wasPhantom)));

              Token next = tokens[i + 1];
              if (next.type == TOKEN_ASSIGN || next.type == TOKEN_IN) {
                currentState.expectDeclaration = false;
              }
              else if (next.type == TOKEN_COMMA) {
                // skip one token
                ++i;
                currentState.expectDeclaration = true;
              }
            }
            else {
              size_t j = states.size() - 1;

              // std::cout << "FOUND USAGE OF VAR '" << name << "'" << std::endl;
              while (1) {
                State& s = states[j];

                std::map<std::string, Variable>::iterator it = s.declaredVariables.find(name);

                if (it != s.declaredVariables.end()) {
                  (*it).second.used = true;
                  break;
                }

                if (j-- == 0) {
                  currentState.phantoms.insert(std::pair<std::string, Variable>(name, Variable(currentToken.line, false)));
                  break;
                }
              }
            }
          }

          else if (currentToken.type == TOKEN_FUNCTION) {
            Token next = tokens[i + 1];
            if (next.type == TOKEN_NAME) {
              // skip one token
              ++i;
            }
            
            State funcState(STATE_FUNCARG, currentToken.line, brackets);
            states.push_back(funcState);
          }
          
          else if (currentToken.type == TOKEN_VAR) {
            State varState(STATE_VARDECL, currentToken.line, brackets);
            varState.expectDeclaration = true;
            states.push_back(varState);
          }

          else if (currentToken.type == TOKEN_SEMICOLON) {
            if (currentState.type == STATE_VARDECL) {
              states.pop_back();
            }
          }
          
          else if (currentToken.type == TOKEN_PARENS_OPEN || 
                   currentToken.type == TOKEN_CURLY_OPEN || 
                   currentToken.type == TOKEN_ANGULAR_OPEN) {
            brackets++;
          }

          else if (currentToken.type == TOKEN_PARENS_CLOSE || 
                   currentToken.type == TOKEN_CURLY_CLOSE || 
                   currentToken.type == TOKEN_ANGULAR_CLOSE) {
            --brackets;
            
            if (currentState.type == STATE_FUNCARG && currentState.brackets == brackets) {
              // end of function argument list
              State funcState(STATE_FUNCBODY, currentToken.line, brackets);

              std::map<std::string, Variable>::const_iterator it = currentState.declaredVariables.begin();
              while (it != currentState.declaredVariables.end()) {
                // std::cout << "PUSHING FUNCTION ARG '" << (*it).first << "'" << std::endl;
                funcState.declaredVariables.insert(std::pair<std::string, Variable>((*it).first, (*it).second));
                ++it;
              }

              states.pop_back();
              states.push_back(funcState);
            }
            else if (currentState.type == STATE_FUNCBODY && currentState.brackets == brackets) {
              // end of function body
              std::map<std::string, Variable>::const_iterator it = currentState.declaredVariables.begin();

              while (it != currentState.declaredVariables.end()) {
                if (! (*it).second.used) {
                  reportError((*it).second.line, (*it).first, false);
                  ++errors;
                }
                ++it;
              }

              // insert phantoms
              if (states.size() > 1) {
                State& prevState = states[states.size() - 2];

                it = currentState.phantoms.begin();

                while (it != currentState.phantoms.end()) {
                  // std::cout << "PUSHING PHANTOM '" << (*it).first << "'" << std::endl;
                  prevState.phantoms.insert(std::pair<std::string, Variable>((*it).first, (*it).second));
                  ++it;
                }
              }
              states.pop_back();
            }
          }

          else if (currentToken.type == TOKEN_EOF && _globals) {
            // end of file
            std::map<std::string, Variable>::const_iterator it = currentState.declaredVariables.begin();

            while (it != currentState.declaredVariables.end()) {
              if (! (*it).second.used) {
                reportError((*it).second.line, (*it).first, true);
                ++errors;
              }
              ++it;
            }
            states.pop_back();
          }
        }

        return errors;
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, %rbx
movq %rdi, 0xe8(%rsp)
addq $0x60, %rdi
callq 0x2120
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq 0x118(%rsp), %rcx
movq %rax, -0x18(%rcx)
xorl %edx, %edx
movl %edx, -0x10(%rcx)
movl %edx, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rdx, 0x20(%rcx)
leaq 0x148(%rsp), %rax
movl %edx, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rdx, 0x20(%rax)
movb $0x0, 0x28(%rax)
leaq 0xa0(%rsp), %rdi
movq $0x0, 0x20(%rsp)
movq %rdx, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x100(%rsp), %rsi
callq 0x606e
movq 0x8(%rbx), %rax
movq (%rbx), %rcx
subq %rcx, %rax
je 0x5957
movq %rbx, %r9
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdi
leaq 0xc8(%rsp), %r12
leaq 0xb8(%rsp), %r13
movq $0x0, 0x20(%rsp)
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r9, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movl %r15d, 0xc(%rsp)
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rbp
movq (%r9), %r14
leaq (%rbx,%rbx,2), %r15
shlq $0x4, %r15
movl -0x78(%rbp), %ecx
movl (%r14,%r15), %edx
cmpl $0x1, %ecx
jne 0x4f83
cmpb $0x0, -0x8(%rbp)
jne 0x4f83
cmpl $0x33, %edx
jne 0x4f83
movl 0xc(%rsp), %esi
cmpl %esi, -0x70(%rbp)
jne 0x4f83
movb $0x1, -0x8(%rbp)
movl 0xc(%rsp), %r15d
jmp 0x55d8
addq %r14, %r15
cmpl $0x36, %edx
jle 0x4fa9
cmpl $0x3b, %edx
jg 0x4fd2
cmpl $0x37, %edx
je 0x509a
cmpl $0x38, %edx
je 0x4fc5
cmpl $0x39, %edx
je 0x509a
jmp 0x4f79
cmpl $0x33, %edx
jle 0x51dc
cmpl $0x34, %edx
je 0x4fc5
cmpl $0x35, %edx
je 0x509a
cmpl $0x36, %edx
jne 0x4f79
movl 0xc(%rsp), %r15d
incl %r15d
jmp 0x55d8
cmpl $0x3c, %edx
je 0x54bc
cmpl $0x72, %edx
je 0x5431
cmpl $0x4b, %edx
jne 0x4f79
testq %rbx, %rbx
je 0x4ff5
cmpl $0x32, -0x30(%r15)
je 0x4f79
movq %r12, 0xb8(%rsp)
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x35cc
movl -0x78(%rbp), %eax
cmpl $0x1, %eax
je 0x55e9
cmpl $0x2, %eax
jne 0x56a9
movl 0x28(%r15), %r14d
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x35cc
btsq $0x20, %r14
movq %r14, 0x48(%rsp)
addq $-0x68, %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x678a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movl 0xc(%rsp), %r15d
je 0x508d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movb $0x1, %bpl
movq 0x10(%rsp), %r9
jmp 0x591c
movl 0xc(%rsp), %r8d
decl %r8d
movl %ecx, %esi
xorl $0x2, %esi
movl -0x70(%rbp), %edx
xorl %r8d, %edx
orl %edx, %esi
movl %r8d, 0xc(%rsp)
jne 0x528b
movl 0x28(%r15), %eax
movl $0x3, 0x28(%rsp)
movl %eax, 0x2c(%rsp)
movl %r8d, 0x30(%rsp)
xorl %ecx, %ecx
movl %ecx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movl %ecx, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movb $0x0, 0x98(%rsp)
movq -0x50(%rbp), %r14
movq %rbp, %r15
addq $-0x60, %r15
cmpq %r15, %r14
je 0x5195
movq %r12, 0xb8(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x35cc
movq 0x40(%r14), %rax
movq %rax, 0xd8(%rsp)
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x678a
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x517d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
cmpq %r15, %rax
jne 0x512c
movq 0xa8(%rsp), %rbp
leaq -0x78(%rbp), %rax
movq %rax, 0xa8(%rsp)
leaq -0x38(%rbp), %rdi
callq 0x660c
addq $-0x68, %rbp
movq %rbp, %rdi
callq 0x660c
leaq 0xa0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x606e
leaq 0x68(%rsp), %rdi
callq 0x660c
leaq 0x38(%rsp), %rdi
jmp 0x55c4
cmpl $0x19, %edx
je 0x52fc
cmpl $0x1d, %edx
jne 0x4f79
movq %r9, %r14
movl 0x28(%r15), %eax
movl $0x1, 0x28(%rsp)
movl %eax, 0x2c(%rsp)
movl 0xc(%rsp), %r15d
movl %r15d, 0x30(%rsp)
xorl %ecx, %ecx
movl %ecx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movl %ecx, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movb $0x1, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x606e
leaq 0x68(%rsp), %rdi
callq 0x660c
leaq 0x38(%rsp), %rdi
callq 0x660c
movq 0x18(%rsp), %rdi
movq %r14, %r9
jmp 0x55d8
xorl $0x3, %ecx
orl %edx, %ecx
jne 0x4f79
movq -0x50(%rbp), %r14
leaq -0x60(%rbp), %r15
cmpq %r15, %r14
je 0x54f6
cmpb $0x0, 0x44(%r14)
jne 0x52d1
leaq 0x20(%r14), %rdx
movl 0x40(%r14), %esi
movq 0xe8(%rsp), %rdi
xorl %ecx, %ecx
callq 0x6098
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
cmpq %r15, %rax
jne 0x52a7
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %r15
movq %r15, %rcx
subq %rax, %rcx
jmp 0x54ff
leaq 0x1(%rbx), %r13
leaq (,%r13,2), %rbp
addq %r13, %rbp
shlq $0x4, %rbp
movl (%r14,%rbp), %eax
movl %eax, 0xb8(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x8(%r14,%rbp), %rsi
movq 0x10(%r14,%rbp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x35cc
addq %rbp, %r14
movq 0x28(%r14), %rax
movq %rax, 0xe0(%rsp)
cmpl $0x4b, 0xb8(%rsp)
cmoveq %r13, %rbx
movl 0x28(%r15), %eax
movl $0x2, 0x28(%rsp)
movl %eax, 0x2c(%rsp)
movl 0xc(%rsp), %r15d
movl %r15d, 0x30(%rsp)
movl $0x0, %ecx
movl %ecx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movl %ecx, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movb $0x0, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x606e
leaq 0x68(%rsp), %rdi
callq 0x660c
leaq 0x38(%rsp), %rdi
callq 0x660c
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r9
leaq 0xb8(%rsp), %r13
je 0x5427
movq 0xd0(%rsp), %rsi
incq %rsi
movq %r9, %r14
callq 0x2200
movq %r14, %r9
movq 0x18(%rsp), %rdi
jmp 0x55d8
movq 0xe8(%rsp), %rax
cmpb $0x1, 0x80(%rax)
jne 0x4f79
movq -0x50(%rbp), %r14
movq %rbp, %r15
addq $-0x60, %r15
cmpq %r15, %r14
je 0x549b
cmpb $0x0, 0x44(%r14)
jne 0x5483
leaq 0x20(%r14), %rdx
movl 0x40(%r14), %esi
movq 0xe8(%rsp), %rdi
movl $0x1, %ecx
callq 0x6098
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
cmpq %r15, %rax
jne 0x5456
movq 0xa8(%rsp), %rbp
leaq -0x78(%rbp), %rax
movq %rax, 0xa8(%rsp)
leaq -0x38(%rbp), %rdi
callq 0x660c
addq $-0x68, %rbp
movq %rbp, %rdi
jmp 0x55c4
cmpl $0x1, %ecx
jne 0x4f79
leaq -0x78(%rbp), %rax
movq %rax, 0xa8(%rsp)
leaq -0x38(%rbp), %rdi
movq %r9, %r14
callq 0x660c
addq $-0x68, %rbp
movq %rbp, %rdi
callq 0x660c
movq %r14, %r9
movq 0x18(%rsp), %rdi
jmp 0x4f79
movq %rbp, %rcx
subq %rax, %rcx
movq %rbp, %r15
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x1111111111111111, %rsi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rsi, %rdx
cmpq $0x2, %rdx
jb 0x55a8
movq -0x20(%rbp), %r14
addq $-0x30, %rbp
cmpq %rbp, %r14
je 0x55a8
leaq (%rax,%rcx), %r15
addq $-0xb0, %r15
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x35cc
movq 0x40(%r14), %rax
movq %rax, 0x48(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x678a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5588
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
cmpq %rbp, %rax
jne 0x5536
movq 0xa8(%rsp), %r15
leaq 0xb8(%rsp), %r13
leaq -0x78(%r15), %rax
movq %rax, 0xa8(%rsp)
leaq -0x38(%r15), %rdi
callq 0x660c
addq $-0x68, %r15
movq %r15, %rdi
callq 0x660c
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %r15d
movq 0x10(%rsp), %r9
incq %rbx
cmpq %rdi, %rbx
jb 0x4f35
jmp 0x5957
cmpb $0x1, -0x8(%rbp)
jne 0x56a9
movq 0xa0(%rsp), %r14
movq 0xa8(%rsp), %r13
subq %r14, %r13
movq %r13, %rax
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rcx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rcx, %rax
cmpq $0x1, %rax
ja 0x57a4
movq 0xe8(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
movq 0x69b4(%rip), %rdi      # 0xbff0
callq 0x2250
movb $0x3a, 0x28(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
callq 0x2250
movq 0x28(%r15), %rsi
movq %rax, %rdi
callq 0x2150
movq %rax, %r14
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x2cf7(%rip), %rsi      # 0x836d
callq 0x2250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
xorl %ebp, %ebp
jmp 0x578d
movq 0xa8(%rsp), %r14
subq 0xa0(%rsp), %r14
movq %r14, %r13
sarq $0x3, %r13
movabsq $-0x1111111111111111, %rax # imm = 0xEEEEEEEEEEEEEEEF
imulq %rax, %r13
addq $-0x68, %r14
movq 0xa0(%rsp), %r12
leaq (%r12,%r14), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x6b38
leaq (%r12,%r14), %rcx
addq $0x8, %rcx
cmpq %rax, %rcx
jne 0x577e
addq $-0x78, %r14
decq %r13
jne 0x56d2
movl 0x28(%r15), %r14d
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x35cc
movq %r14, 0x48(%rsp)
addq $-0x38, %rbp
movq %rbp, %rdi
movq %r15, %rsi
leaq 0xc8(%rsp), %r12
callq 0x678a
movq 0x10(%rsp), %r9
leaq 0xb8(%rsp), %r13
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movl 0xc(%rsp), %r15d
je 0x5919
movq 0x38(%rsp), %rsi
jmp 0x590b
movb $0x1, 0x44(%rax)
movb $0x1, %bpl
leaq 0xc8(%rsp), %r12
movq 0x10(%rsp), %r9
leaq 0xb8(%rsp), %r13
movl 0xc(%rsp), %r15d
jmp 0x591c
leaq (%r14,%r13), %rdi
addq $-0xb0, %rdi
movq %rdi, 0xf8(%rsp)
leaq 0xb8(%rsp), %rsi
callq 0x6956
addq %r13, %r14
movq -0x88(%r14), %rcx
movq %rcx, 0xf0(%rsp)
movq 0xf8(%rsp), %rdi
movq %rax, %rsi
callq 0x6a0a
movq -0x88(%r14), %r13
movq 0xa8(%rsp), %r14
movl 0x28(%r15), %r15d
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x35cc
xorl %eax, %eax
cmpq %r13, 0xf0(%rsp)
setne %al
shlq $0x20, %rax
orq %r15, %rax
movq %rax, 0x48(%rsp)
addq $-0xe0, %r14
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
callq 0x678a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movq 0x10(%rsp), %r15
je 0x586e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x1(%rbx), %r14
movq (%r15), %r15
leaq (%r14,%r14,2), %r13
shlq $0x4, %r13
movl (%r15,%r13), %eax
movl %eax, 0x28(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r15,%r13), %rsi
movq 0x10(%r15,%r13), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x35cc
addq %r13, %r15
movq 0x28(%r15), %rax
movq %rax, 0x50(%rsp)
xorl %eax, %eax
movl 0x28(%rsp), %ecx
cmpl $0x1b, %ecx
je 0x58e2
cmpl $0x33, %ecx
movq 0x10(%rsp), %r9
leaq 0xb8(%rsp), %r13
movl 0xc(%rsp), %r15d
je 0x58db
cmpl $0x64, %ecx
je 0x58f4
jmp 0x58f7
movb $0x1, %al
movq %r14, %rbx
jmp 0x58f4
movq 0x10(%rsp), %r9
leaq 0xb8(%rsp), %r13
movl 0xc(%rsp), %r15d
movb %al, -0x8(%rbp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5919
movq 0x40(%rsp), %rsi
incq %rsi
movq %r9, %r14
callq 0x2200
movq %r14, %r9
movb $0x1, %bpl
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x593f
movq 0xc8(%rsp), %rsi
incq %rsi
movq %r9, %r14
callq 0x2200
movq %r14, %r9
testb %bpl, %bpl
movq 0x18(%rsp), %rdi
jne 0x55d8
movl $0x1, %eax
movq %rax, 0x20(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x61d0
leaq 0x140(%rsp), %rdi
callq 0x660c
leaq 0x110(%rsp), %rdi
callq 0x660c
movq 0x20(%rsp), %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a12
jmp 0x59a1
jmp 0x5a12
jmp 0x5a12
jmp 0x59a1
jmp 0x5a12
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5a15
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x5a15
jmp 0x5a12
jmp 0x5a12
jmp 0x5a57
jmp 0x5a57
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x660c
leaq 0x38(%rsp), %rdi
callq 0x660c
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x5a95
movq 0xd0(%rsp), %rsi
jmp 0x5a4b
jmp 0x5a57
jmp 0x5a7e
jmp 0x5a7e
jmp 0x5a57
movq %rax, %r14
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x5a95
movq 0xc8(%rsp), %rsi
jmp 0x5a4b
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x5a95
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x5a95
jmp 0x5a57
movq %rax, %r14
jmp 0x5a95
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5a81
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x5a81
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x660c
leaq 0x38(%rsp), %rdi
callq 0x660c
leaq 0xa0(%rsp), %rdi
callq 0x61d0
leaq 0x140(%rsp), %rdi
callq 0x660c
leaq 0x110(%rsp), %rdi
callq 0x660c
movq %r14, %rdi
callq 0x2380