// File: /workspace/github_c_makefile_star2_O2/hikalium[P]compilium/analyzer.c
// Function: AnalyzeNode
static void AnalyzeNode(struct Node *node, struct SymbolEntry **ctx) {
  assert(node);
  if (node->type == kASTList && !node->op) {
    for (int i = 0; i < GetSizeOfList(node); i++) {
      AnalyzeNode(GetNodeAt(node, i), ctx);
    }
    return;
  }
  if (node->type == kASTExprFuncCall) {
    node->stack_size_needed = (GetLastLocalVarOffset(*ctx) + 0xF) & ~0xF;
    AllocReg(node);
    AnalyzeNode(node->func_expr, ctx);
    FreeReg(node->func_expr->reg);
    node->expr_type =
        GetReturnTypeOfFunction(GetTypeWithoutAttr(node->func_expr->expr_type));
    for (int i = 0; i < GetSizeOfList(node->arg_expr_list); i++) {
      struct Node *n = GetNodeAt(node->arg_expr_list, i);
      AnalyzeNode(n, ctx);
      FreeReg(n->reg);
    }
    return;
  } else if (node->type == kASTFuncDef) {
    AddFuncDef(ctx, CreateTokenStr(node->func_name_token), node);
    struct SymbolEntry *saved_ctx = *ctx;
    struct Node *arg_type_list = GetArgTypeList(node->func_type);
    assert(arg_type_list);
    node->arg_var_list = AllocList();
    for (int i = 0; i < GetSizeOfList(arg_type_list); i++) {
      struct Node *arg_type_with_attr = GetNodeAt(arg_type_list, i);
      struct Node *arg_ident_token =
          GetIdentifierTokenFromTypeAttr(arg_type_with_attr);
      if (!arg_ident_token) {
        PushToList(node->arg_var_list, NULL);
        continue;
      }
      struct Node *arg_type = GetTypeWithoutAttr(arg_type_with_attr);
      assert(arg_type);
      struct Node *local_var =
          AddLocalVar(ctx, CreateTokenStr(arg_ident_token), arg_type);
      PushToList(node->arg_var_list, local_var);
    }
    assert(!in_function);
    in_function = node;
    AnalyzeNode(node->func_body, ctx);
    in_function = NULL;
    *ctx = saved_ctx;
    return;
  }
  assert(node->op);
  if (node->type == kASTExpr) {
    if (IsTokenWithType(node->op, kTokenIntegerConstant) ||
        IsTokenWithType(node->op, kTokenCharLiteral)) {
      AllocReg(node);
      node->expr_type = CreateTypeBase(CreateToken("int"));
      return;
    } else if (IsTokenWithType(node->op, kTokenStringLiteral)) {
      AllocReg(node);
      node->expr_type = CreateTypePointer(CreateTypeBase(CreateToken("char")));
      return;
    } else if (IsEqualTokenWithCStr(node->op, "(")) {
      AnalyzeNode(node->right, ctx);
      node->reg = node->right->reg;
      node->expr_type = node->right->expr_type;
      return;
    } else if (IsEqualTokenWithCStr(node->op, "[")) {
      AnalyzeNode(node->left, ctx);
      AnalyzeNode(node->right, ctx);
      node->reg = node->left->reg;
      FreeReg(node->right->reg);
      assert(node->left->expr_type);
      struct Node *left_type = GetTypeWithoutAttr(node->left->expr_type);
      if (left_type->type == kTypeArray) {
        node->expr_type = CreateTypeLValue(left_type->type_array_type_of);
      } else if (left_type->type == kTypePointer) {
        node->expr_type = CreateTypeLValue(left_type->right);
      } else {
        assert(false);
      }
      return;
    } else if (IsEqualTokenWithCStr(node->op, ".") ||
               IsEqualTokenWithCStr(node->op, "->")) {
      AnalyzeNode(node->left, ctx);
      node->reg = node->left->reg;
      PrintASTNode(node->left->expr_type);
      assert(node->right && node->right->type == kNodeToken);
      struct Node *struct_type = NULL;
      if (IsEqualTokenWithCStr(node->op, ".")) {
        if (GetTypeWithoutAttr(node->left->expr_type)->type != kTypeStruct) {
          ErrorWithToken(node->op, "left operand is not a struct");
        }
        struct_type = node->left->expr_type;
      }
      if (IsEqualTokenWithCStr(node->op, "->")) {
        struct Node *left_type = GetTypeWithoutAttr(node->left->expr_type);
        PrintASTNode(left_type);
        assert(left_type->type == kTypePointer);
        struct Node *left_deref_type = left_type->right;
        assert(left_deref_type->type == kTypeStruct);
        struct_type = left_deref_type;
      }
      assert(struct_type);
      struct Node *member = FindStructMember(struct_type, node->right);
      if (!member) {
        ErrorWithToken(node->right, "Member name not found in struct");
      }
      PrintASTNode(member);
      node->byte_offset = member->struct_member_ent_ofs;
      node->expr_type =
          CreateTypeLValue(GetTypeWithoutAttr(member->struct_member_ent_type));
      return;
    } else if (IsTokenWithType(node->op, kTokenIdent)) {
      struct Node *ident_info = FindLocalVar(*ctx, node->op);
      if (ident_info) {
        node->byte_offset = ident_info->byte_offset;
        AllocReg(node);
        enum NodeType expr_type =
            GetTypeWithoutAttr(ident_info->expr_type)->type;
        if (expr_type == kTypeStruct || expr_type == kTypeArray) {
          node->expr_type = ident_info->expr_type;
          return;
        }
        node->expr_type = CreateTypeLValue(ident_info->expr_type);
        return;
      }
      struct Node *global_var_type = FindGlobalVar(*ctx, node->op);
      if (global_var_type) {
        AllocReg(node);
        node->expr_type = CreateTypeLValue(global_var_type);
        return;
      }
      struct Node *external_var_type = FindExternVar(*ctx, node->op);
      if (external_var_type) {
        AllocReg(node);
        node->expr_type = CreateTypeLValue(external_var_type);
        return;
      }
      struct Node *func_def = FindFuncDef(*ctx, node->op);
      if (func_def) {
        AllocReg(node);
        node->expr_type = func_def->func_type;
        return;
      }
      struct Node *func_decl_type = FindFuncDeclType(*ctx, node->op);
      if (func_decl_type) {
        AllocReg(node);
        node->expr_type = GetTypeWithoutAttr(func_decl_type);
        return;
      }
      ErrorWithToken(node->op, "Unknown identifier");
    } else if (node->cond) {
      AnalyzeNode(node->cond, ctx);
      AnalyzeNode(node->left, ctx);
      AnalyzeNode(node->right, ctx);
      FreeReg(node->left->reg);
      FreeReg(node->right->reg);
      assert(
          IsSameTypeExceptAttr(node->left->expr_type, node->right->expr_type));
      node->reg = node->cond->reg;
      node->expr_type = GetRValueType(node->right->expr_type);
      return;
    } else if (!node->left && node->right) {
      AnalyzeNode(node->right, ctx);
      if (IsEqualTokenWithCStr(node->op, "--") ||
          IsEqualTokenWithCStr(node->op, "++")) {
        assert(IsLValueType(node->right->expr_type));
        node->reg = node->right->reg;
        node->expr_type = GetRValueType(node->right->expr_type);
        return;
      }
      if (IsTokenWithType(node->op, kTokenKwSizeof)) {
        FreeReg(node->right->reg);
        AllocReg(node);
        node->expr_type = CreateTypeBase(CreateToken("int"));
        return;
      }
      node->reg = node->right->reg;
      if (IsEqualTokenWithCStr(node->op, "&")) {
        node->expr_type =
            CreateTypePointer(GetRValueType(node->right->expr_type));
        return;
      }
      if (IsEqualTokenWithCStr(node->op, "*")) {
        struct Node *rtype = GetRValueType(node->right->expr_type);
        assert(rtype && rtype->type == kTypePointer);
        node->expr_type = CreateTypeLValue(rtype->right);
        return;
      }
      node->expr_type = GetRValueType(node->right->expr_type);
      return;
    } else if (node->left && !node->right) {
      // Postfix op
      if (IsEqualTokenWithCStr(node->op, "++") ||
          IsEqualTokenWithCStr(node->op, "--")) {
        AnalyzeNode(node->left, ctx);
        assert(IsLValueType(node->left->expr_type));
        node->reg = node->left->reg;
        node->expr_type = GetRValueType(node->left->expr_type);
        return;
      }
    } else if (node->left && node->right) {
      AnalyzeNode(node->left, ctx);
      AnalyzeNode(node->right, ctx);
      if (IsEqualTokenWithCStr(node->op, "=") ||
          IsEqualTokenWithCStr(node->op, ",")) {
        FreeReg(node->left->reg);
        node->reg = node->right->reg;
        node->expr_type = GetRValueType(node->right->expr_type);
        return;
      }
      FreeReg(node->right->reg);
      node->reg = node->left->reg;
      node->expr_type = GetRValueType(node->left->expr_type);
      return;
    }
    assert(false);
  }
  if (node->type == kASTExprStmt) {
    if (!node->left) return;
    AnalyzeNode(node->left, ctx);
    if (node->left->reg) FreeReg(node->left->reg);
    return;
  } else if (node->type == kASTList) {
    struct SymbolEntry *saved_ctx = *ctx;
    for (int i = 0; i < GetSizeOfList(node); i++) {
      AnalyzeNode(GetNodeAt(node, i), ctx);
    }
    *ctx = saved_ctx;
    return;
  } else if (node->type == kASTDecl) {
    struct Node *raw_type = CreateTypeInContext(*ctx, node->op, node->right);
    PrintASTNode(raw_type);
    assert(raw_type);
    struct Node *type_ident = NULL;
    if (raw_type && raw_type->type == kTypeAttrIdent) {
      type_ident = raw_type->left;
    }
    struct Node *type = GetTypeWithoutAttr(raw_type);
    assert(type);

    if (!in_function) {
      // Top-level definitions
      if (IsASTDeclOfTypedef(node)) {
        return;
      }
      if (type_ident && type->type == kTypeFunction) {
        AddFuncDeclType(ctx, CreateTokenStr(type_ident), raw_type);
        return;
      }
      if (!type_ident && type->type == kTypeStruct) {
        struct Node *spec = type->type_struct_spec;
        ResolveTypesOfMembersOfStruct(*ctx, spec);
        assert(type->tag);
        AddStructType(ctx, CreateTokenStr(type->tag), type);
        return;
      }
      assert(type_ident);
      if (IsASTDeclOfExtern(node)) {
        AddExternVar(ctx, CreateTokenStr(type_ident), type);
      } else {
        AddGlobalVar(ctx, CreateTokenStr(type_ident), type);
      }
      assert(node->right->type == kASTDecltor);
      if (node->right->decltor_init_expr) {
        assert(false);
      }
      return;
    }
    // Local definitions
    assert(type_ident);
    AddLocalVar(ctx, CreateTokenStr(type_ident), type);
    assert(node->right->type == kASTDecltor);
    if (node->right->decltor_init_expr) {
      struct Node *left_expr = AllocNode(kASTExpr);
      left_expr->op = type_ident;
      node->right->decltor_init_expr->left = left_expr;
      AnalyzeNode(node->right->decltor_init_expr, ctx);
      FreeReg(node->right->decltor_init_expr->reg);
    }
    return;
  } else if (node->type == kASTJumpStmt) {
    if (IsTokenWithType(node->op, kTokenKwBreak) ||
        IsTokenWithType(node->op, kTokenKwContinue)) {
      return;
    }
    if (IsTokenWithType(node->op, kTokenKwReturn)) {
      if (!node->right) return;
      AnalyzeNode(node->right, ctx);
      FreeReg(node->right->reg);
      return;
    }
  } else if (node->type == kASTSelectionStmt) {
    if (IsTokenWithType(node->op, kTokenKwIf)) {
      AnalyzeNode(node->cond, ctx);
      FreeReg(node->cond->reg);
      AnalyzeNode(node->if_true_stmt, ctx);
      if (node->if_else_stmt) {
        AnalyzeNode(node->if_else_stmt, ctx);
      }
      return;
    }
  } else if (node->type == kASTForStmt) {
    if (node->init) {
      AnalyzeNode(node->init, ctx);
      if (node->init->reg) FreeReg(node->init->reg);
    }
    if (node->cond) {
      AnalyzeNode(node->cond, ctx);
      FreeReg(node->cond->reg);
    }
    if (node->updt) {
      AnalyzeNode(node->updt, ctx);
      FreeReg(node->updt->reg);
    }
    AnalyzeNode(node->body, ctx);
    return;
  } else if (node->type == kASTWhileStmt) {
    AnalyzeNode(node->cond, ctx);
    FreeReg(node->cond->reg);
    AnalyzeNode(node->body, ctx);
    return;
  }
  ErrorWithToken(node->op, "AnalyzeNode: Not implemented");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8cf9(%rip), %r15      # 0xb004
pushq $0xc
popq %rbp
testq %rbx, %rbx
je 0x2cd7
movl (%rbx), %ecx
cmpl $0x5, %ecx
je 0x2410
cmpl $0x10, %ecx
je 0x24de
cmpl $0x6, %ecx
je 0x24a5
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x2ce9
addl $-0x4, %ecx
cmpl $0xb, %ecx
ja 0x2d23
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq %rax, %rdi
movl %ebp, %esi
callq 0x86b7
testb %al, %al
je 0x2d23
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x30(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0x48(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x50(%rbx), %rbx
testq %rbx, %rbx
jne 0x230e
jmp 0x2962
leaq 0x30(%rbx), %r12
movq 0x30(%rbx), %rdi
jmp 0x23f3
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x23c9
movq %r14, %rsi
callq 0x22f3
movq 0x28(%rbx), %rax
movl 0x4(%rax), %edi
testl %edi, %edi
je 0x23c9
callq 0x310b
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x23e6
movq %r14, %rsi
callq 0x22f3
movq 0x30(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x2407
leaq 0x38(%rbx), %r12
movq %r14, %rsi
callq 0x22f3
movq (%r12), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0x40(%rbx), %rbx
jmp 0x230e
movq (%r14), %rdi
callq 0x82a8
addl $0xf, %eax
andl $-0x10, %eax
movl %eax, 0xc8(%rbx)
movq %rbx, %rdi
callq 0x3021
movq 0xb0(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0xb0(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0xb0(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9554
movq %rax, %rdi
callq 0x343a
movq %rax, 0x8(%rbx)
xorl %ebp, %ebp
movq 0xb8(%rbx), %rdi
callq 0x3fb7
cmpl %eax, %ebp
jge 0x2962
movq 0xb8(%rbx), %rdi
movl %ebp, %esi
callq 0x3fdf
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x22f3
movl 0x4(%r15), %edi
callq 0x310b
incl %ebp
jmp 0x2468
cmpq $0x0, 0x10(%rbx)
je 0x25d5
movq (%r14), %r15
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3fb7
cmpl %eax, %ebp
jge 0x25cd
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3fdf
movq %rax, %rdi
movq %r14, %rsi
callq 0x22f3
incl %ebp
jmp 0x24b5
movq 0xe0(%rbx), %rdi
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x8549
movq (%r14), %rax
movq %rax, (%rsp)
movq 0xd8(%rbx), %rdi
callq 0x3460
testq %rax, %rax
je 0x2e20
movq %rax, %r15
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x3ea7
movq %rax, 0xc0(%rbx)
movq %r15, %rdi
callq 0x3fb7
cmpl %eax, %r12d
jge 0x2595
movq %r15, %rdi
movl %r12d, %esi
callq 0x3fdf
movq %rax, %rbp
movq %rax, %rdi
callq 0x956f
testq %rax, %rax
je 0x2582
movq %rax, %r13
movq %rbp, %rdi
callq 0x9554
testq %rax, %rax
je 0x2d3b
movq %rax, %rbp
movq %r13, %rdi
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x82e9
movq %rax, %rsi
jmp 0x2584
xorl %esi, %esi
movq 0xc0(%rbx), %rdi
callq 0x3f25
incl %r12d
jmp 0x2528
cmpq $0x0, 0xed23(%rip)      # 0x112c0
jne 0x2e35
movq %rbx, 0xed16(%rip)      # 0x112c0
movq 0xd0(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
andq $0x0, 0xecff(%rip)      # 0x112c0
movq (%rsp), %rax
movq %rax, (%r14)
jmp 0x2962
movq %r15, (%r14)
jmp 0x2962
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x3fb7
cmpl %eax, %ebp
jge 0x2962
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3fdf
movq %rax, %rdi
movq %r14, %rsi
callq 0x22f3
incl %ebp
jmp 0x25d7
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2962
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rax
movl 0x4(%rax), %edi
testl %edi, %edi
jne 0x2786
jmp 0x2962
movq (%r14), %rdi
movq 0x20(%rbx), %rdx
movq %rax, %rsi
callq 0x9ad6
movq %rax, %r13
movq %rax, %rdi
callq 0x3598
testq %r13, %r13
je 0x2e4a
cmpl $0x18, (%r13)
jne 0x2703
movq 0x18(%r13), %r12
jmp 0x2706
pushq $0x3
popq %rsi
movq %rax, %rdi
callq 0x86b7
testb %al, %al
jne 0x2683
movq 0x10(%rbx), %rdi
pushq $0x17
popq %rsi
callq 0x86b7
testb %al, %al
je 0x27e2
movq %rbx, %rdi
callq 0x3021
leaq 0x89d6(%rip), %rdi      # 0xb068
callq 0x8e44
movq %rax, %rdi
callq 0x33c2
movq %rax, 0x8(%rbx)
jmp 0x2962
pushq $0x5
popq %rsi
movq %rax, %rdi
callq 0x86b7
testb %al, %al
jne 0x2962
leaq 0x10(%rbx), %r15
movq (%r15), %rdi
pushq $0x8
popq %rsi
callq 0x86b7
testb %al, %al
jne 0x2962
movq (%r15), %rdi
pushq $0xf
popq %rsi
callq 0x86b7
testb %al, %al
je 0x2d2a
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2962
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rax
jmp 0x2783
xorl %r12d, %r12d
movq %r13, %rdi
callq 0x9554
testq %rax, %rax
je 0x2e62
movq %rax, %r15
cmpq $0x0, 0xeb9e(%rip)      # 0x112c0
je 0x2799
testq %r12, %r12
je 0x2e7a
movq %r12, %rdi
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x82e9
movq 0x20(%rbx), %rax
cmpl $0xc, (%rax)
jne 0x2e92
cmpq $0x0, 0x58(%rax)
je 0x2962
pushq $0x4
popq %rdi
callq 0x319d
movq %r12, 0x10(%rax)
movq 0x20(%rbx), %rcx
movq 0x58(%rcx), %rdi
movq %rax, 0x18(%rdi)
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rax
movq 0x58(%rax), %rax
movl 0x4(%rax), %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x310b
movq %rbx, %rdi
callq 0x3153
testb %al, %al
jne 0x2962
movl (%r15), %eax
testq %r12, %r12
je 0x2852
cmpl $0x17, %eax
jne 0x289b
movq %r12, %rdi
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x85b7
movq 0x10(%rbx), %rdi
pushq $0x18
popq %rsi
callq 0x86b7
testb %al, %al
je 0x281b
movq %rbx, %rdi
callq 0x3021
leaq 0x886b(%rip), %rdi      # 0xb06c
callq 0x8e44
movq %rax, %rdi
callq 0x33c2
movq %rax, %rdi
callq 0x33e6
jmp 0x269f
movq 0x10(%rbx), %rdi
leaq 0x8d9e(%rip), %rsi      # 0xb5c4
callq 0x87de
testl %eax, %eax
je 0x28c9
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x4(%rbx)
movq 0x8(%rax), %rax
jmp 0x269f
cmpl $0x19, %eax
jne 0x2eaa
movq 0xf0(%r15), %rsi
movq (%r14), %rdi
callq 0x8163
movq 0xe8(%r15), %rdi
testq %rdi, %rdi
je 0x2ec2
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8625
movq %rbx, %rdi
callq 0x3178
movl %eax, %ebp
movq %r12, %rdi
callq 0x87a7
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
testb %bpl, %bpl
je 0x2945
callq 0x8418
jmp 0x294a
movq 0x10(%rbx), %rdi
leaq 0x8cc5(%rip), %rsi      # 0xb599
callq 0x87de
testl %eax, %eax
je 0x2971
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movl 0x4(%rax), %eax
movl %eax, 0x4(%rbx)
movl 0x4(%rcx), %edi
callq 0x310b
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x2f1f
callq 0x9554
movl (%rax), %ecx
cmpl $0x16, %ecx
je 0x2e12
cmpl $0x1a, %ecx
jne 0x2f44
movq 0xf8(%rax), %rdi
jmp 0x2e16
callq 0x8398
movq 0x20(%rbx), %rax
cmpl $0xc, (%rax)
jne 0x2eda
cmpq $0x0, 0x58(%rax)
jne 0x2ef2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rdi
leaq 0x8d27(%rip), %rsi      # 0xb6a3
callq 0x87de
testl %eax, %eax
jne 0x299d
movq 0x10(%rbx), %rdi
leaq 0x86fd(%rip), %rsi      # 0xb08d
callq 0x87de
testl %eax, %eax
je 0x2aa8
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x4(%rbx)
movq 0x8(%rax), %rdi
callq 0x3598
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x2f0a
cmpl $0x1, (%rax)
jne 0x2f0a
movq 0x10(%rbx), %rdi
leaq 0x8cc6(%rip), %rsi      # 0xb6a3
callq 0x87de
testl %eax, %eax
je 0x2a06
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9554
cmpl $0x19, (%rax)
jne 0x2f59
movq 0x18(%rbx), %rax
movq 0x8(%rax), %r14
jmp 0x2a09
xorl %r14d, %r14d
movq 0x10(%rbx), %rdi
leaq 0x8679(%rip), %rsi      # 0xb08d
callq 0x87de
testl %eax, %eax
je 0x2a61
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9554
movq %rax, %r14
movq %rax, %rdi
callq 0x3598
cmpl $0x16, (%r14)
jne 0x2f69
movq 0x20(%r14), %r14
cmpl $0x19, (%r14)
je 0x2a6a
leaq 0x86ac(%rip), %rdi      # 0xb0fc
leaq 0x85e2(%rip), %rsi      # 0xb039
movl $0x86, %edx
callq 0x3cc4
testq %r14, %r14
je 0x2f81
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x80ca
testq %rax, %rax
je 0x2f34
movq %rax, %r14
movq %rax, %rdi
callq 0x3598
movl 0x80(%r14), %eax
movl %eax, 0xa8(%rbx)
movq 0x70(%r14), %rdi
callq 0x9554
movq %rax, %rdi
jmp 0x2e16
movq 0x10(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x86b7
testb %al, %al
je 0x2b08
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x850e
testq %rax, %rax
je 0x2b7a
movq %rax, %r15
movl 0xa8(%rax), %eax
movl %eax, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x3021
movq 0x8(%r15), %rdi
callq 0x9554
movl (%rax), %eax
addl $-0x19, %eax
movq 0x8(%r15), %rdi
cmpl $0x1, %eax
ja 0x2e16
movq %rdi, 0x8(%rbx)
jmp 0x2962
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2bb3
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x8(%rax), %rdi
movq 0x8(%rcx), %rsi
callq 0x942c
testl %eax, %eax
je 0x2f99
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rcx
movl 0x4(%rcx), %ecx
jmp 0x2cc6
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x84d3
testq %rax, %rax
jne 0x2ba0
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x8498
testq %rax, %rax
je 0x2cfb
movq %rax, %r15
movq %rbx, %rdi
callq 0x3021
movq %r15, %rdi
jmp 0x2e16
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rdi
testq %rax, %rax
je 0x2c1a
testq %rdi, %rdi
je 0x2c72
movq %rax, %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x10(%rbx), %rdi
leaq 0x91a2(%rip), %rsi      # 0xbd8d
callq 0x87de
testl %eax, %eax
jne 0x2c0c
movq 0x10(%rbx), %rdi
leaq 0x861b(%rip), %rsi      # 0xb21a
callq 0x87de
testl %eax, %eax
je 0x2d51
movq 0x18(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
jmp 0x2c6c
testq %rdi, %rdi
je 0x2fb1
movq %r14, %rsi
callq 0x22f3
movq 0x10(%rbx), %rdi
leaq 0x856e(%rip), %rsi      # 0xb1a4
callq 0x87de
testl %eax, %eax
jne 0x2c57
movq 0x10(%rbx), %rdi
leaq 0x855d(%rip), %rsi      # 0xb1a7
callq 0x87de
testl %eax, %eax
je 0x2d8f
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9596
testl %eax, %eax
je 0x2fc9
movq 0x20(%rbx), %rax
jmp 0x2cc3
movq 0x10(%rbx), %rdi
leaq 0x852a(%rip), %rsi      # 0xb1a7
callq 0x87de
testl %eax, %eax
jne 0x2c9e
movq 0x10(%rbx), %rdi
leaq 0x8513(%rip), %rsi      # 0xb1a4
callq 0x87de
testl %eax, %eax
je 0x2fb1
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x22f3
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9596
testl %eax, %eax
je 0x2fe1
movq 0x18(%rbx), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x4(%rbx)
movq 0x8(%rax), %rdi
callq 0x9581
jmp 0x269f
leaq 0x8356(%rip), %rdi      # 0xb034
leaq 0x8354(%rip), %rsi      # 0xb039
pushq $0x26
jmp 0x2d4b
leaq 0x8e8e(%rip), %rdi      # 0xbb7e
leaq 0x8342(%rip), %rsi      # 0xb039
pushq $0x55
jmp 0x2d4b
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x857c
testq %rax, %rax
je 0x2d62
movq %rax, %r15
movq %rbx, %rdi
callq 0x3021
movq 0xd8(%r15), %rax
jmp 0x269f
addq $0x10, %rbx
movq %rbx, %r15
movq (%r15), %rdi
leaq 0x8506(%rip), %rsi      # 0xb23a
xorl %eax, %eax
callq 0x3de9
leaq 0x8310(%rip), %rdi      # 0xb052
leaq 0x82f0(%rip), %rsi      # 0xb039
pushq $0x49
popq %rdx
callq 0x3cc4
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edi
callq 0x310b
jmp 0x2cbf
movq (%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x85ea
testq %rax, %rax
je 0x2ff9
movq %rax, %r14
movq %rbx, %rdi
callq 0x3021
movq %r14, %rdi
callq 0x9554
jmp 0x269f
movq 0x10(%rbx), %rdi
pushq $0x10
popq %rsi
callq 0x86b7
movq 0x20(%rbx), %rcx
movl 0x4(%rcx), %edi
testb %al, %al
je 0x2db0
callq 0x310b
jmp 0x2683
movl %edi, 0x4(%rbx)
movq 0x10(%rbx), %rdi
leaq 0x8f3e(%rip), %rsi      # 0xbcfc
callq 0x87de
testl %eax, %eax
je 0x2dd9
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9581
jmp 0x280e
movq 0x10(%rbx), %rdi
leaq 0x83eb(%rip), %rsi      # 0xb1cf
callq 0x87de
movl %eax, %ebp
movq 0x20(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x9581
testl %ebp, %ebp
je 0x269f
testq %rax, %rax
je 0x3009
cmpl $0x16, (%rax)
jne 0x3009
movq 0x20(%rax), %rdi
callq 0x33d4
jmp 0x269f
leaq 0x821d(%rip), %rdi      # 0xb044
leaq 0x820b(%rip), %rsi      # 0xb039
pushq $0x3e
jmp 0x2d4b
leaq 0x821f(%rip), %rdi      # 0xb05b
leaq 0x81f6(%rip), %rsi      # 0xb039
pushq $0x4e
jmp 0x2d4b
leaq 0x83cb(%rip), %rdi      # 0xb21c
leaq 0x81e1(%rip), %rsi      # 0xb039
movl $0x10c, %edx            # imm = 0x10C
callq 0x3cc4
leaq 0x81ed(%rip), %rdi      # 0xb056
leaq 0x81c9(%rip), %rsi      # 0xb039
movl $0x112, %edx            # imm = 0x112
callq 0x3cc4
leaq 0x83ae(%rip), %rdi      # 0xb22f
leaq 0x81b1(%rip), %rsi      # 0xb039
movl $0x131, %edx            # imm = 0x131
callq 0x3cc4
leaq 0x8f1f(%rip), %rdi      # 0xbdb8
leaq 0x8199(%rip), %rsi      # 0xb039
movl $0x133, %edx            # imm = 0x133
callq 0x3cc4
leaq 0x837e(%rip), %rdi      # 0xb22f
leaq 0x8181(%rip), %rsi      # 0xb039
movl $0x124, %edx            # imm = 0x124
callq 0x3cc4
leaq 0x835c(%rip), %rdi      # 0xb225
leaq 0x8169(%rip), %rsi      # 0xb039
movl $0x120, %edx            # imm = 0x120
callq 0x3cc4
leaq 0x8ed7(%rip), %rdi      # 0xbdb8
leaq 0x8151(%rip), %rsi      # 0xb039
movl $0x12a, %edx            # imm = 0x12A
callq 0x3cc4
leaq 0x818e(%rip), %rdi      # 0xb087
leaq 0x8139(%rip), %rsi      # 0xb039
movl $0x12c, %edx            # imm = 0x12C
callq 0x3cc4
leaq 0x817f(%rip), %rdi      # 0xb090
leaq 0x8121(%rip), %rsi      # 0xb039
pushq $0x79
jmp 0x2d4b
leaq 0x814b(%rip), %rdi      # 0xb071
leaq 0x810c(%rip), %rsi      # 0xb039
pushq $0x6a
jmp 0x2d4b
movq 0x20(%rbx), %rdi
leaq 0x81ee(%rip), %rsi      # 0xb12d
jmp 0x2d34
leaq 0x813c(%rip), %rdi      # 0xb087
leaq 0x80e7(%rip), %rsi      # 0xb039
pushq $0x71
jmp 0x2d4b
movq 0x10(%rbx), %rdi
leaq 0x815b(%rip), %rsi      # 0xb0bf
jmp 0x2d34
leaq 0x816c(%rip), %rdi      # 0xb0dc
leaq 0x80c2(%rip), %rsi      # 0xb039
movl $0x84, %edx
callq 0x3cc4
leaq 0x8199(%rip), %rdi      # 0xb121
leaq 0x80aa(%rip), %rsi      # 0xb039
movl $0x89, %edx
callq 0x3cc4
leaq 0x81c0(%rip), %rdi      # 0xb160
leaq 0x8092(%rip), %rsi      # 0xb039
movl $0xc1, %edx
callq 0x3cc4
leaq 0x80cf(%rip), %rdi      # 0xb087
leaq 0x807a(%rip), %rsi      # 0xb039
movl $0xfb, %edx
callq 0x3cc4
leaq 0x81da(%rip), %rdi      # 0xb1aa
leaq 0x8062(%rip), %rsi      # 0xb039
movl $0xc9, %edx
callq 0x3cc4
leaq 0x820e(%rip), %rdi      # 0xb1f6
leaq 0x804a(%rip), %rsi      # 0xb039
movl $0xe7, %edx
callq 0x3cc4
movq 0x10(%rbx), %rdi
leaq 0x8149(%rip), %rsi      # 0xb14d
jmp 0x2d34
leaq 0x81c1(%rip), %rdi      # 0xb1d1
leaq 0x8022(%rip), %rsi      # 0xb039
movl $0xdc, %edx
callq 0x3cc4