
NodeInfo * GetNodeInfo(CubeInfo *cube_info,size_t level)

{
  NodeInfo *pNVar1;
  Nodes *pNVar2;
  long lVar3;
  NodeInfo *pNVar4;
  byte bVar5;
  
  bVar5 = 0;
  if (cube_info->free_nodes == 0) {
    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);
    if (pNVar2 == (Nodes *)0x0) {
      return (NodeInfo *)0x0;
    }
    pNVar2->next = cube_info->node_queue;
    cube_info->node_queue = pNVar2;
    cube_info->node_info = (NodeInfo *)pNVar2;
    cube_info->free_nodes = 0x600;
  }
  cube_info->free_nodes = cube_info->free_nodes - 1;
  pNVar1 = cube_info->node_info;
  cube_info->node_info = pNVar1 + 1;
  pNVar4 = pNVar1;
  for (lVar3 = 0x13; lVar3 != 0; lVar3 = lVar3 + -1) {
    pNVar4->child[0] = (_NodeInfo *)0x0;
    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);
  }
  pNVar1->level = level;
  return pNVar1;
}



undefined8 * FUN_00212c16(long param_1,undefined8 param_2)

{
  undefined8 *puVar1;
  long lVar2;
  undefined8 *puVar3;
  byte bVar4;
  
  bVar4 = 0;
  if (*(long *)(param_1 + 0x20) == 0) {
    lVar2 = AcquireMagickMemory(0x3c008);
    if (lVar2 == 0) {
      return (undefined8 *)0x0;
    }
    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);
    *(long *)(param_1 + 0x30) = lVar2;
    *(long *)(param_1 + 0x28) = lVar2;
    *(undefined8 *)(param_1 + 0x20) = 0x600;
  }
  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;
  puVar1 = *(undefined8 **)(param_1 + 0x28);
  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;
  puVar3 = puVar1;
  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {
    *puVar3 = 0;
    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;
  }
  puVar1[0x13] = param_2;
  return puVar1;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV RBP,RSI
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x00212c53
MOV EDI,0x3c008
CALL 0x00149df0
TEST RAX,RAX
JZ 0x00212c88
MOV RDX,qword ptr [RBX + 0x30]
MOV qword ptr [RAX + 0x3c000],RDX
MOV qword ptr [RBX + 0x30],RAX
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],0x600
SUB qword ptr [RBX + 0x20],0x1
MOV RDX,qword ptr [RBX + 0x28]
LEA RAX,[RDX + 0xa0]
MOV qword ptr [RBX + 0x28],RAX
MOV ECX,0x13
MOV EAX,0x0
MOV RDI,RDX
STOSQ.REP RDI
MOV qword ptr [RDX + 0x98],RBP
MOV RAX,RDX
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV EDX,0x0
JMP 0x00212c7e
(translation_unit "undefined8 * FUN_00212c16(long param_1,undefined8 param_2)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}\n\n" (function_definition "undefined8 * FUN_00212c16(long param_1,undefined8 param_2)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00212c16(long param_1,undefined8 param_2)" * (function_declarator "FUN_00212c16(long param_1,undefined8 param_2)" identifier (parameter_list "(long param_1,undefined8 param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "byte bVar4;" type_identifier identifier ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (if_statement "if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x20) == 0)" ( (binary_expression "*(long *)(param_1 + 0x20) == 0" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" { (expression_statement "lVar2 = AcquireMagickMemory(0x3c008);" (assignment_expression "lVar2 = AcquireMagickMemory(0x3c008)" identifier = (call_expression "AcquireMagickMemory(0x3c008)" identifier (argument_list "(0x3c008)" ( number_literal )))) ;) (if_statement "if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      return (undefined8 *)0x0;\n    }" { (return_statement "return (undefined8 *)0x0;" return (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);" (assignment_expression "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30)" (pointer_expression "*(undefined8 *)(lVar2 + 0x3c000)" * (cast_expression "(undefined8 *)(lVar2 + 0x3c000)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x3c000)" ( (binary_expression "lVar2 + 0x3c000" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0x600;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0x600" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;" (assignment_expression "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = (binary_expression "*(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "puVar1 + 0x14" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (for_statement "for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "lVar2 = 0x13" identifier = number_literal) ; (binary_expression "lVar2 != 0" identifier != number_literal) ; (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (ulong)bVar4 * -2 + 1" (binary_expression "puVar3 + (ulong)bVar4 * -2" identifier + (binary_expression "(ulong)bVar4 * -2" (cast_expression "(ulong)bVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "puVar1[0x13] = param_2;" (assignment_expression "puVar1[0x13] = param_2" (subscript_expression "puVar1[0x13]" identifier [ number_literal ]) = identifier) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "NodeInfo * GetNodeInfo(CubeInfo *cube_info,size_t level)\n\n{\n  NodeInfo *pNVar1;\n  Nodes *pNVar2;\n  long lVar3;\n  NodeInfo *pNVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (cube_info->free_nodes == 0) {\n    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);\n    if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }\n    pNVar2->next = cube_info->node_queue;\n    cube_info->node_queue = pNVar2;\n    cube_info->node_info = (NodeInfo *)pNVar2;\n    cube_info->free_nodes = 0x600;\n  }\n  cube_info->free_nodes = cube_info->free_nodes - 1;\n  pNVar1 = cube_info->node_info;\n  cube_info->node_info = pNVar1 + 1;\n  pNVar4 = pNVar1;\n  for (lVar3 = 0x13; lVar3 != 0; lVar3 = lVar3 + -1) {\n    pNVar4->child[0] = (_NodeInfo *)0x0;\n    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);\n  }\n  pNVar1->level = level;\n  return pNVar1;\n}\n\n" (function_definition "NodeInfo * GetNodeInfo(CubeInfo *cube_info,size_t level)\n\n{\n  NodeInfo *pNVar1;\n  Nodes *pNVar2;\n  long lVar3;\n  NodeInfo *pNVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (cube_info->free_nodes == 0) {\n    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);\n    if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }\n    pNVar2->next = cube_info->node_queue;\n    cube_info->node_queue = pNVar2;\n    cube_info->node_info = (NodeInfo *)pNVar2;\n    cube_info->free_nodes = 0x600;\n  }\n  cube_info->free_nodes = cube_info->free_nodes - 1;\n  pNVar1 = cube_info->node_info;\n  cube_info->node_info = pNVar1 + 1;\n  pNVar4 = pNVar1;\n  for (lVar3 = 0x13; lVar3 != 0; lVar3 = lVar3 + -1) {\n    pNVar4->child[0] = (_NodeInfo *)0x0;\n    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);\n  }\n  pNVar1->level = level;\n  return pNVar1;\n}" type_identifier (pointer_declarator "* GetNodeInfo(CubeInfo *cube_info,size_t level)" * (function_declarator "GetNodeInfo(CubeInfo *cube_info,size_t level)" identifier (parameter_list "(CubeInfo *cube_info,size_t level)" ( (parameter_declaration "CubeInfo *cube_info" type_identifier (pointer_declarator "*cube_info" * identifier)) , (parameter_declaration "size_t level" primitive_type identifier) )))) (compound_statement "{\n  NodeInfo *pNVar1;\n  Nodes *pNVar2;\n  long lVar3;\n  NodeInfo *pNVar4;\n  byte bVar5;\n  \n  bVar5 = 0;\n  if (cube_info->free_nodes == 0) {\n    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);\n    if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }\n    pNVar2->next = cube_info->node_queue;\n    cube_info->node_queue = pNVar2;\n    cube_info->node_info = (NodeInfo *)pNVar2;\n    cube_info->free_nodes = 0x600;\n  }\n  cube_info->free_nodes = cube_info->free_nodes - 1;\n  pNVar1 = cube_info->node_info;\n  cube_info->node_info = pNVar1 + 1;\n  pNVar4 = pNVar1;\n  for (lVar3 = 0x13; lVar3 != 0; lVar3 = lVar3 + -1) {\n    pNVar4->child[0] = (_NodeInfo *)0x0;\n    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);\n  }\n  pNVar1->level = level;\n  return pNVar1;\n}" { (declaration "NodeInfo *pNVar1;" type_identifier (pointer_declarator "*pNVar1" * identifier) ;) (declaration "Nodes *pNVar2;" type_identifier (pointer_declarator "*pNVar2" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "NodeInfo *pNVar4;" type_identifier (pointer_declarator "*pNVar4" * identifier) ;) (declaration "byte bVar5;" type_identifier identifier ;) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" identifier = number_literal) ;) (if_statement "if (cube_info->free_nodes == 0) {\n    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);\n    if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }\n    pNVar2->next = cube_info->node_queue;\n    cube_info->node_queue = pNVar2;\n    cube_info->node_info = (NodeInfo *)pNVar2;\n    cube_info->free_nodes = 0x600;\n  }" if (parenthesized_expression "(cube_info->free_nodes == 0)" ( (binary_expression "cube_info->free_nodes == 0" (field_expression "cube_info->free_nodes" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);\n    if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }\n    pNVar2->next = cube_info->node_queue;\n    cube_info->node_queue = pNVar2;\n    cube_info->node_info = (NodeInfo *)pNVar2;\n    cube_info->free_nodes = 0x600;\n  }" { (expression_statement "pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008);" (assignment_expression "pNVar2 = (Nodes *)AcquireMagickMemory(0x3c008)" identifier = (cast_expression "(Nodes *)AcquireMagickMemory(0x3c008)" ( (type_descriptor "Nodes *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireMagickMemory(0x3c008)" identifier (argument_list "(0x3c008)" ( number_literal ))))) ;) (if_statement "if (pNVar2 == (Nodes *)0x0) {\n      return (NodeInfo *)0x0;\n    }" if (parenthesized_expression "(pNVar2 == (Nodes *)0x0)" ( (binary_expression "pNVar2 == (Nodes *)0x0" identifier == (cast_expression "(Nodes *)0x0" ( (type_descriptor "Nodes *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return (NodeInfo *)0x0;\n    }" { (return_statement "return (NodeInfo *)0x0;" return (cast_expression "(NodeInfo *)0x0" ( (type_descriptor "NodeInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pNVar2->next = cube_info->node_queue;" (assignment_expression "pNVar2->next = cube_info->node_queue" (field_expression "pNVar2->next" identifier -> field_identifier) = (field_expression "cube_info->node_queue" identifier -> field_identifier)) ;) (expression_statement "cube_info->node_queue = pNVar2;" (assignment_expression "cube_info->node_queue = pNVar2" (field_expression "cube_info->node_queue" identifier -> field_identifier) = identifier) ;) (expression_statement "cube_info->node_info = (NodeInfo *)pNVar2;" (assignment_expression "cube_info->node_info = (NodeInfo *)pNVar2" (field_expression "cube_info->node_info" identifier -> field_identifier) = (cast_expression "(NodeInfo *)pNVar2" ( (type_descriptor "NodeInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "cube_info->free_nodes = 0x600;" (assignment_expression "cube_info->free_nodes = 0x600" (field_expression "cube_info->free_nodes" identifier -> field_identifier) = number_literal) ;) })) (expression_statement "cube_info->free_nodes = cube_info->free_nodes - 1;" (assignment_expression "cube_info->free_nodes = cube_info->free_nodes - 1" (field_expression "cube_info->free_nodes" identifier -> field_identifier) = (binary_expression "cube_info->free_nodes - 1" (field_expression "cube_info->free_nodes" identifier -> field_identifier) - number_literal)) ;) (expression_statement "pNVar1 = cube_info->node_info;" (assignment_expression "pNVar1 = cube_info->node_info" identifier = (field_expression "cube_info->node_info" identifier -> field_identifier)) ;) (expression_statement "cube_info->node_info = pNVar1 + 1;" (assignment_expression "cube_info->node_info = pNVar1 + 1" (field_expression "cube_info->node_info" identifier -> field_identifier) = (binary_expression "pNVar1 + 1" identifier + number_literal)) ;) (expression_statement "pNVar4 = pNVar1;" (assignment_expression "pNVar4 = pNVar1" identifier = identifier) ;) (for_statement "for (lVar3 = 0x13; lVar3 != 0; lVar3 = lVar3 + -1) {\n    pNVar4->child[0] = (_NodeInfo *)0x0;\n    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);\n  }" for ( (assignment_expression "lVar3 = 0x13" identifier = number_literal) ; (binary_expression "lVar3 != 0" identifier != number_literal) ; (assignment_expression "lVar3 = lVar3 + -1" identifier = (binary_expression "lVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n    pNVar4->child[0] = (_NodeInfo *)0x0;\n    pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);\n  }" { (expression_statement "pNVar4->child[0] = (_NodeInfo *)0x0;" (assignment_expression "pNVar4->child[0] = (_NodeInfo *)0x0" (subscript_expression "pNVar4->child[0]" (field_expression "pNVar4->child" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(_NodeInfo *)0x0" ( (type_descriptor "_NodeInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8);" (assignment_expression "pNVar4 = (NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8)" identifier = (cast_expression "(NodeInfo *)((long)pNVar4 + (ulong)bVar5 * -0x10 + 8)" ( (type_descriptor "NodeInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)pNVar4 + (ulong)bVar5 * -0x10 + 8)" ( (binary_expression "(long)pNVar4 + (ulong)bVar5 * -0x10 + 8" (binary_expression "(long)pNVar4 + (ulong)bVar5 * -0x10" (cast_expression "(long)pNVar4" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (binary_expression "(ulong)bVar5 * -0x10" (cast_expression "(ulong)bVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) })) (expression_statement "pNVar1->level = level;" (assignment_expression "pNVar1->level = level" (field_expression "pNVar1->level" identifier -> field_identifier) = identifier) ;) (return_statement "return pNVar1;" return identifier ;) })))
(translation_unit "undefined8 * FUN_00212c16(long param_1,undefined8 param_2)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}\n\n" (function_definition "undefined8 * FUN_00212c16(long param_1,undefined8 param_2)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00212c16(long param_1,undefined8 param_2)" * (function_declarator "FUN_00212c16(long param_1,undefined8 param_2)" identifier (parameter_list "(long param_1,undefined8 param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "byte bVar4;" type_identifier identifier ;) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" identifier = number_literal) ;) (if_statement "if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x20) == 0)" ( (binary_expression "*(long *)(param_1 + 0x20) == 0" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" { (expression_statement "lVar2 = AcquireMagickMemory(0x3c008);" (assignment_expression "lVar2 = AcquireMagickMemory(0x3c008)" identifier = (call_expression "AcquireMagickMemory(0x3c008)" identifier (argument_list "(0x3c008)" ( number_literal )))) ;) (if_statement "if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      return (undefined8 *)0x0;\n    }" { (return_statement "return (undefined8 *)0x0;" return (cast_expression "(undefined8 *)0x0" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);" (assignment_expression "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30)" (pointer_expression "*(undefined8 *)(lVar2 + 0x3c000)" * (cast_expression "(undefined8 *)(lVar2 + 0x3c000)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + 0x3c000)" ( (binary_expression "lVar2 + 0x3c000" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0x600;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0x600" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;" (assignment_expression "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = (binary_expression "*(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = (binary_expression "puVar1 + 0x14" identifier + number_literal)) ;) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (for_statement "for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" for ( (assignment_expression "lVar2 = 0x13" identifier = number_literal) ; (binary_expression "lVar2 != 0" identifier != number_literal) ; (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" { (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1" identifier = (binary_expression "puVar3 + (ulong)bVar4 * -2 + 1" (binary_expression "puVar3 + (ulong)bVar4 * -2" identifier + (binary_expression "(ulong)bVar4 * -2" (cast_expression "(ulong)bVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "puVar1[0x13] = param_2;" (assignment_expression "puVar1[0x13] = param_2" (subscript_expression "puVar1[0x13]" identifier [ number_literal ]) = identifier) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined8 * FUN_00212c16(long param_1,undefined8 param_2)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" (type_identifier "undefined8") (pointer_declarator "* FUN_00212c16(long param_1,undefined8 param_2)" (* "*") (function_declarator "FUN_00212c16(long param_1,undefined8 param_2)" (identifier "FUN_00212c16") (parameter_list "(long param_1,undefined8 param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) () ")")))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  undefined8 *puVar3;\n  byte bVar4;\n  \n  bVar4 = 0;\n  if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }\n  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;\n  puVar1 = *(undefined8 **)(param_1 + 0x28);\n  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;\n  puVar3 = puVar1;\n  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }\n  puVar1[0x13] = param_2;\n  return puVar1;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "undefined8 *puVar3;" (type_identifier "undefined8") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (expression_statement "bVar4 = 0;" (assignment_expression "bVar4 = 0" (identifier "bVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(long *)(param_1 + 0x20) == 0) {\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0x20) == 0)" (( "(") (binary_expression "*(long *)(param_1 + 0x20) == 0" (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    lVar2 = AcquireMagickMemory(0x3c008);\n    if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }\n    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);\n    *(long *)(param_1 + 0x30) = lVar2;\n    *(long *)(param_1 + 0x28) = lVar2;\n    *(undefined8 *)(param_1 + 0x20) = 0x600;\n  }" ({ "{") (expression_statement "lVar2 = AcquireMagickMemory(0x3c008);" (assignment_expression "lVar2 = AcquireMagickMemory(0x3c008)" (identifier "lVar2") (= "=") (call_expression "AcquireMagickMemory(0x3c008)" (identifier "AcquireMagickMemory") (argument_list "(0x3c008)" (( "(") (number_literal "0x3c008") () ")")))) (; ";")) (if_statement "if (lVar2 == 0) {\n      return (undefined8 *)0x0;\n    }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return (undefined8 *)0x0;\n    }" ({ "{") (return_statement "return (undefined8 *)0x0;" (return "return") (cast_expression "(undefined8 *)0x0" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);" (assignment_expression "*(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30)" (pointer_expression "*(undefined8 *)(lVar2 + 0x3c000)" (* "*") (cast_expression "(undefined8 *)(lVar2 + 0x3c000)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + 0x3c000)" (( "(") (binary_expression "lVar2 + 0x3c000" (identifier "lVar2") (+ "+") (number_literal "0x3c000")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" (* "*") (cast_expression "(long *)(param_1 + 0x30)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "lVar2")) (; ";")) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "lVar2")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0x600;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0x600" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0x600")) (; ";")) (} "}"))) (expression_statement "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;" (assignment_expression "*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (binary_expression "*(long *)(param_1 + 0x20) + -1" (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar1 = *(undefined8 **)(param_1 + 0x28);" (assignment_expression "puVar1 = *(undefined8 **)(param_1 + 0x28)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined8 **)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (binary_expression "puVar1 + 0x14" (identifier "puVar1") (+ "+") (number_literal "0x14"))) (; ";")) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" (identifier "puVar3") (= "=") (identifier "puVar1")) (; ";")) (for_statement "for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" (for "for") (( "(") (assignment_expression "lVar2 = 0x13" (identifier "lVar2") (= "=") (number_literal "0x13")) (; ";") (binary_expression "lVar2 != 0" (identifier "lVar2") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "lVar2 = lVar2 + -1" (identifier "lVar2") (= "=") (binary_expression "lVar2 + -1" (identifier "lVar2") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar3 = 0;\n    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;" (assignment_expression "puVar3 = puVar3 + (ulong)bVar4 * -2 + 1" (identifier "puVar3") (= "=") (binary_expression "puVar3 + (ulong)bVar4 * -2 + 1" (binary_expression "puVar3 + (ulong)bVar4 * -2" (identifier "puVar3") (+ "+") (binary_expression "(ulong)bVar4 * -2" (cast_expression "(ulong)bVar4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar4")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "puVar1[0x13] = param_2;" (assignment_expression "puVar1[0x13] = param_2" (subscript_expression "puVar1[0x13]" (identifier "puVar1") ([ "[") (number_literal "0x13") (] "]")) (= "=") (identifier "param_2")) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

type_1 * function_1(type_2 *cube_info,size_t level)

{
  type_1 *var_3;
  type_3 *var_2;
  long var_4;
  type_1 *pNVar4;
  type_4 bVar5;
  
  bVar5 = 0;
  if (cube_info->free_nodes == 0) {
    var_2 = (type_3 *)var_1(0x3c008);
    if (var_2 == (type_3 *)0x0) {
      return (type_1 *)0x0;
    }
    var_2->next = cube_info->node_queue;
    cube_info->node_queue = var_2;
    cube_info->node_info = (type_1 *)var_2;
    cube_info->free_nodes = 0x600;
  }
  cube_info->free_nodes = cube_info->free_nodes - 1;
  var_3 = cube_info->node_info;
  cube_info->node_info = var_3 + 1;
  pNVar4 = var_3;
  for (var_4 = 0x13; var_4 != 0; var_4 = var_4 + -1) {
    pNVar4->child[0] = (type_5 *)0x0;
    pNVar4 = (type_1 *)((long)pNVar4 + (type_6)bVar5 * -0x10 + 8);
  }
  var_3->level = level;
  return var_3;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (for_statement initializer: (assignment_expression left: (identifier) right: (number_literal)) condition: (binary_expression left: (identifier) right: (number_literal)) update: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement (identifier)))))

undefined8 * MASKED(long param_1,undefined8 param_2)

{
  undefined8 *puVar1;
  long lVar2;
  undefined8 *puVar3;
  byte bVar4;
  
  bVar4 = 0;
  if (*(long *)(param_1 + 0x20) == 0) {
    lVar2 = AcquireMagickMemory(0x3c008);
    if (lVar2 == 0) {
      return (undefined8 *)0x0;
    }
    *(undefined8 *)(lVar2 + 0x3c000) = *(undefined8 *)(param_1 + 0x30);
    *(long *)(param_1 + 0x30) = lVar2;
    *(long *)(param_1 + 0x28) = lVar2;
    *(undefined8 *)(param_1 + 0x20) = 0x600;
  }
  *(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + -1;
  puVar1 = *(undefined8 **)(param_1 + 0x28);
  *(undefined8 **)(param_1 + 0x28) = puVar1 + 0x14;
  puVar3 = puVar1;
  for (lVar2 = 0x13; lVar2 != 0; lVar2 = lVar2 + -1) {
    *puVar3 = 0;
    puVar3 = puVar3 + (ulong)bVar4 * -2 + 1;
  }
  puVar1[0x13] = param_2;
  return puVar1;
}

