// File: lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseExpression(cashew::Parser<asmjs_ast::Node*, Builder>::ExpressionElement, char*&, char const*)
NodeRef parseExpression(ExpressionElement initial, char*&src, const char* seps) {
    //dump("parseExpression", src);
    ExpressionParts& parts = expressionPartsStack.back();
    src = skipSpace(src);
    if (*src == 0 || hasChar(seps, *src)) {
      if (parts.size() > 0) {
        parts.push_back(initial); // cherry on top of the cake
      }
      return initial.getNode();
    }
    bool top = parts.size() == 0;
    if (initial.isNode) {
      Frag next(src);
      if (next.type == OPERATOR) {
        parts.push_back(initial);
        src += next.size;
        parts.push_back(next.str);
      } else {
        if (*src == '(') {
          initial = parseCall(initial.getNode(), src);
        } else if (*src == '[') {
          initial = parseIndexing(initial.getNode(), src);
        } else {
          dump("bad parseExpression state", src);
          assert(0);
        }
        return parseExpression(initial, src, seps);
      }
    } else {
      parts.push_back(initial);
    }
    NodeRef last = parseElement(src, seps);
    if (!top) return last;
    {
      ExpressionParts& parts = expressionPartsStack.back(); // |parts| may have been invalidated by that call
      // we are the toplevel. sort it all out
      // collapse right to left, highest priority first
      //dumpParts(parts, 0);
      for (auto& ops : operatorClasses) {
        if (ops.rtl) {
          // right to left
          for (int i = parts.size()-1; i >= 0; i--) {
            if (parts[i].isNode) continue;
            IString op = parts[i].getOp();
            if (!ops.ops.has(op)) continue;
            if (ops.type == OperatorClass::Binary && i > 0 && i < (int)parts.size()-1) {
              parts[i] = makeBinary(parts[i-1].getNode(), op, parts[i+1].getNode());
              parts.erase(parts.begin() + i + 1);
              parts.erase(parts.begin() + i - 1);
            } else if (ops.type == OperatorClass::Prefix && i < (int)parts.size()-1) {
              if (i > 0 && parts[i-1].isNode) continue; // cannot apply prefix operator if it would join two nodes
              parts[i] = builder.makePrefix(op, parts[i+1].getNode());
              parts.erase(parts.begin() + i + 1);
            } else if (ops.type == OperatorClass::Tertiary) {
              // we must be at  X ? Y : Z
              //                      ^
              //dumpParts(parts, i);
              if (op != COLON) continue;
              assert(i < (int)parts.size()-1 && i >= 3);
              if (parts[i-2].getOp() != QUESTION) continue; // e.g. x ? y ? 1 : 0 : 2
              parts[i-3] = builder.makeConditional(parts[i-3].getNode(), parts[i-1].getNode(), parts[i+1].getNode());
              parts.erase(parts.begin() + i - 2, parts.begin() + i + 2);
              i = parts.size(); // basically a reset, due to things like x ? y ? 1 : 0 : 2
            } // TODO: postfix
          }
        } else {
          // left to right
          for (int i = 0; i < (int)parts.size(); i++) {
            if (parts[i].isNode) continue;
            IString op = parts[i].getOp();
            if (!ops.ops.has(op)) continue;
            if (ops.type == OperatorClass::Binary && i > 0 && i < (int)parts.size()-1) {
              parts[i] = makeBinary(parts[i-1].getNode(), op, parts[i+1].getNode());
              parts.erase(parts.begin() + i + 1);
              parts.erase(parts.begin() + i - 1);
              i--;
            } else if (ops.type == OperatorClass::Prefix && i < (int)parts.size()-1) {
              if (i > 0 && parts[i-1].isNode) continue; // cannot apply prefix operator if it would join two nodes
              parts[i] = builder.makePrefix(op, parts[i+1].getNode());
              parts.erase(parts.begin() + i + 1);
              i = std::max(i-2, 0); // allow a previous prefix operator to cascade
            } // TODO: tertiary, postfix
          }
        }
      }
      assert(parts.size() == 1);
      NodeRef ret = parts[0].getNode();
      parts.clear();
      return ret;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp            # imm = 0x350
movb %sil, %al
movb %al, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0xd640
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x5d30
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa0d3
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %esi
callq 0x5e70
testb $0x1, %al
jne 0xa0d3
jmp 0xa101
movq -0x38(%rbp), %rdi
callq 0xd680
cmpq $0x0, %rax
jbe 0xa0ef
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xdac0
leaq -0x18(%rbp), %rdi
callq 0xdb30
movq %rax, -0x8(%rbp)
jmp 0xaef1
movq -0x38(%rbp), %rdi
callq 0xd680
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x18(%rbp)
je 0xa29f
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x5f00
cmpl $0x1, -0x44(%rbp)
jne 0xa18b
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xdac0
movl -0x48(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0xb4d0
movq -0x2b8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xdb80
jmp 0xa29d
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xa1d7
leaq -0x18(%rbp), %rdi
callq 0xdb30
movq -0x2b0(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0xd330
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0xaff0
movq -0x78(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xa25a
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xa226
leaq -0x18(%rbp), %rdi
callq 0xdb30
movq -0x2b0(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0xd4f0
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
callq 0xaff0
movq -0x88(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xa258
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0xbac8(%rip), %rdi      # 0x15cfc
callq 0x7880
leaq 0xb97b(%rip), %rdi      # 0x15bbb
leaq 0xb0c0(%rip), %rsi      # 0x15307
movl $0x2ce, %edx            # imm = 0x2CE
leaq 0xbac3(%rip), %rcx      # 0x15d16
callq 0x2130
jmp 0xa25a
movq -0x2b0(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movb -0x98(%rbp), %al
movq -0x90(%rbp), %rdx
movzbl %al, %esi
callq 0xa060
movq %rax, -0x8(%rbp)
jmp 0xaef1
jmp 0xa2ac
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xdac0
movq -0x2b0(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x9850
movq %rax, -0xa0(%rbp)
testb $0x1, -0x39(%rbp)
jne 0xa2dd
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xaef1
movq -0x2b0(%rbp), %rdi
callq 0xd640
movq %rax, -0xa8(%rbp)
leaq 0x181a9(%rip), %rax     # 0x224a0
movq %rax, -0xb0(%rbp)
leaq 0x1819b(%rip), %rdi     # 0x224a0
callq 0xdbb0
movq %rax, -0xb8(%rbp)
leaq 0x18188(%rip), %rdi     # 0x224a0
callq 0xdbe0
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xdc10
testb $0x1, %al
jne 0xa340
jmp 0xae88
leaq -0xb8(%rbp), %rdi
callq 0xdc50
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0xaa1d
movq -0xa8(%rbp), %rdi
callq 0xd680
subq $0x1, %rax
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
jl 0xaa18
movq -0xa8(%rbp), %rdi
movslq -0xcc(%rbp), %rsi
callq 0xdc70
testb $0x1, (%rax)
je 0xa3a4
jmp 0xaa04
movq -0xa8(%rbp), %rdi
movslq -0xcc(%rbp), %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdc90
movq %rax, -0xd8(%rbp)
movq -0xc8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x7760
testb $0x1, %al
jne 0xa3e2
jmp 0xaa04
movq -0xc8(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0xa5da
cmpl $0x0, -0xcc(%rbp)
jle 0xa5da
movl -0xcc(%rbp), %eax
movl %eax, -0x2bc(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movq %rax, %rcx
movl -0x2bc(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xa5da
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq %rax, -0x2d8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq -0x2b0(%rbp), %rdi
movq -0x2d8(%rbp), %rsi
movq %rax, %rcx
movq -0xf0(%rbp), %rdx
callq 0xdcf0
movq %rax, %rsi
leaq -0xe8(%rbp), %rdi
callq 0xaff0
movq -0xa8(%rbp), %rdi
movslq -0xcc(%rbp), %rsi
callq 0xdc70
movq -0xe8(%rbp), %rcx
movq %rcx, (%rax)
movq -0xe0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x110(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0xde10
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
callq 0xde10
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xde50
movq -0x2d0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0xdd70
movq %rax, -0x118(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x138(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0xde10
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
movl $0x1, %esi
callq 0xde90
movq %rax, -0x128(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xde50
movq -0x2c8(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0xdd70
movq %rax, -0x140(%rbp)
jmp 0xaa02
movq -0xc8(%rbp), %rax
cmpl $0x1, 0x3c(%rax)
jne 0xa754
movl -0xcc(%rbp), %eax
movl %eax, -0x2dc(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movq %rax, %rcx
movl -0x2dc(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xa754
cmpl $0x0, -0xcc(%rbp)
jle 0xa642
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
testb $0x1, (%rax)
je 0xa642
jmp 0xaa04
movq -0x2b0(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x2f0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq -0x2f0(%rbp), %rdi
movq %rax, %rdx
movq -0x158(%rbp), %rsi
callq 0xcdb0
movq %rax, %rsi
leaq -0x150(%rbp), %rdi
callq 0xaff0
movq -0xa8(%rbp), %rdi
movslq -0xcc(%rbp), %rsi
callq 0xdc70
movq -0x150(%rbp), %rcx
movq %rcx, (%rax)
movq -0x148(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x178(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0xde10
movq %rax, -0x170(%rbp)
leaq -0x170(%rbp), %rdi
movl $0x1, %esi
callq 0xde10
movq %rax, -0x168(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0xde50
movq -0x2e8(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0xdd70
movq %rax, -0x180(%rbp)
jmp 0xaa00
movq -0xc8(%rbp), %rax
cmpl $0x3, 0x3c(%rax)
jne 0xa9fe
leaq -0xd8(%rbp), %rdi
leaq 0x17ca5(%rip), %rsi     # 0x22418
callq 0xded0
testb $0x1, %al
jne 0xa77e
jmp 0xa783
jmp 0xaa04
movl -0xcc(%rbp), %eax
movl %eax, -0x2f8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movl -0x2f8(%rbp), %ecx
movl %eax, %edx
subl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2f1(%rbp)
jge 0xa7c2
cmpl $0x3, -0xcc(%rbp)
setge %al
movb %al, -0x2f1(%rbp)
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0xa7ce
jmp 0xa7d0
jmp 0xa7ef
leaq 0xb5de(%rip), %rdi      # 0x15db5
leaq 0xab29(%rip), %rsi      # 0x15307
movl $0x2f0, %edx            # imm = 0x2F0
leaq 0xb52c(%rip), %rcx      # 0x15d16
callq 0x2130
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x2, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdc90
movq %rax, -0x188(%rbp)
leaq -0x188(%rbp), %rdi
leaq 0x17bec(%rip), %rsi     # 0x22410
callq 0xded0
testb $0x1, %al
jne 0xa82f
jmp 0xa834
jmp 0xaa04
movq -0x2b0(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x318(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq %rax, -0x310(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq %rax, -0x308(%rbp)
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq -0x318(%rbp), %rdi
movq -0x310(%rbp), %rsi
movq -0x308(%rbp), %rdx
movq %rax, %rcx
callq 0xdf00
movq %rax, %rsi
leaq -0x198(%rbp), %rdi
callq 0xaff0
movq -0xa8(%rbp), %rdi
movl -0xcc(%rbp), %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0xdc70
movq -0x198(%rbp), %rcx
movq %rcx, (%rax)
movq -0x190(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x300(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x1b8(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0xde10
movq %rax, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rdi
movl $0x2, %esi
callq 0xde90
movq %rax, -0x1a8(%rbp)
leaq -0x1a0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0xde50
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x1d8(%rbp)
movslq -0xcc(%rbp), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0xde10
movq %rax, -0x1d0(%rbp)
leaq -0x1d0(%rbp), %rdi
movl $0x2, %esi
callq 0xde10
movq %rax, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xde50
movq -0x300(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
callq 0xdf50
movq %rax, -0x1e0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movl %eax, -0xcc(%rbp)
jmp 0xaa00
jmp 0xaa02
jmp 0xaa04
movl -0xcc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0xa37a
jmp 0xae75
movl $0x0, -0x1e4(%rbp)
movl -0x1e4(%rbp), %eax
movl %eax, -0x31c(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movq %rax, %rcx
movl -0x31c(%rbp), %eax
cmpl %ecx, %eax
jge 0xae73
movq -0xa8(%rbp), %rdi
movslq -0x1e4(%rbp), %rsi
callq 0xdc70
testb $0x1, (%rax)
je 0xaa6d
jmp 0xae5f
movq -0xa8(%rbp), %rdi
movslq -0x1e4(%rbp), %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdc90
movq %rax, -0x1f0(%rbp)
movq -0xc8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x7760
testb $0x1, %al
jne 0xaaab
jmp 0xae5f
movq -0xc8(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0xacb2
cmpl $0x0, -0x1e4(%rbp)
jle 0xacb2
movl -0x1e4(%rbp), %eax
movl %eax, -0x320(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movq %rax, %rcx
movl -0x320(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xacb2
movq -0xa8(%rbp), %rdi
movl -0x1e4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq %rax, -0x338(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq -0x2b0(%rbp), %rdi
movq -0x338(%rbp), %rsi
movq %rax, %rcx
movq -0x208(%rbp), %rdx
callq 0xdcf0
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0xaff0
movq -0xa8(%rbp), %rdi
movslq -0x1e4(%rbp), %rsi
callq 0xdc70
movq -0x200(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1f8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x228(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x228(%rbp), %rdi
callq 0xde10
movq %rax, -0x220(%rbp)
leaq -0x220(%rbp), %rdi
movl $0x1, %esi
callq 0xde10
movq %rax, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0xde50
movq -0x330(%rbp), %rdi
movq -0x210(%rbp), %rsi
callq 0xdd70
movq %rax, -0x230(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x250(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x250(%rbp), %rdi
callq 0xde10
movq %rax, -0x248(%rbp)
leaq -0x248(%rbp), %rdi
movl $0x1, %esi
callq 0xde90
movq %rax, -0x240(%rbp)
leaq -0x238(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0xde50
movq -0x328(%rbp), %rdi
movq -0x238(%rbp), %rsi
callq 0xdd70
movq %rax, -0x258(%rbp)
movl -0x1e4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0xae5d
movq -0xc8(%rbp), %rax
cmpl $0x1, 0x3c(%rax)
jne 0xae5b
movl -0x1e4(%rbp), %eax
movl %eax, -0x33c(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xd680
movq %rax, %rcx
movl -0x33c(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xae5b
cmpl $0x0, -0x1e4(%rbp)
jle 0xad1a
movq -0xa8(%rbp), %rdi
movl -0x1e4(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
testb $0x1, (%rax)
je 0xad1a
jmp 0xae5f
movq -0x2b0(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x350(%rbp)
movq -0x1f0(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0xa8(%rbp), %rdi
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq -0x350(%rbp), %rdi
movq %rax, %rdx
movq -0x270(%rbp), %rsi
callq 0xcdb0
movq %rax, %rsi
leaq -0x268(%rbp), %rdi
callq 0xaff0
movq -0xa8(%rbp), %rdi
movslq -0x1e4(%rbp), %rsi
callq 0xdc70
movq -0x268(%rbp), %rcx
movq %rcx, (%rax)
movq -0x260(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xdde0
movq %rax, -0x290(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x290(%rbp), %rdi
callq 0xde10
movq %rax, -0x288(%rbp)
leaq -0x288(%rbp), %rdi
movl $0x1, %esi
callq 0xde10
movq %rax, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xde50
movq -0x348(%rbp), %rdi
movq -0x278(%rbp), %rsi
callq 0xdd70
movq %rax, -0x298(%rbp)
movl -0x1e4(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x29c(%rbp)
movl $0x0, -0x2a0(%rbp)
leaq -0x29c(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0xdfe0
movl (%rax), %eax
movl %eax, -0x1e4(%rbp)
jmp 0xae5d
jmp 0xae5f
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0xaa27
jmp 0xae75
jmp 0xae77
leaq -0xb8(%rbp), %rdi
callq 0xe020
jmp 0xa324
movq -0xa8(%rbp), %rdi
callq 0xd680
cmpq $0x1, %rax
jne 0xae9c
jmp 0xaebb
leaq 0xaf34(%rip), %rdi      # 0x15dd7
leaq 0xa45d(%rip), %rsi      # 0x15307
movl $0x30b, %edx            # imm = 0x30B
leaq 0xae60(%rip), %rcx      # 0x15d16
callq 0x2130
movq -0xa8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xdc70
movq %rax, %rdi
callq 0xdb30
movq %rax, -0x2a8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0xe040
movq -0x2a8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x350, %rsp            # imm = 0x350
popq %rbp
retq
nop