
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

gl_list_t gl_array_nx_create(gl_list_implementation_t implementation,
                            gl_listelement_equals_fn equals_fn,
                            gl_listelement_hashcode_fn hashcode_fn,
                            gl_listelement_dispose_fn dispose_fn,_Bool allow_duplicates,size_t count
                            ,void **contents)

{
  gl_list_t __ptr;
  void **__dest;
  
  __ptr = (gl_list_t)malloc(0x20);
  if (__ptr == (gl_list_t)0x0) {
    return (gl_list_t)0x0;
  }
  (__ptr->base).vtable = implementation;
  (__ptr->base).equals_fn = equals_fn;
  (__ptr->base).hashcode_fn = hashcode_fn;
  (__ptr->base).dispose_fn = dispose_fn;
  (__ptr->base).allow_duplicates = allow_duplicates;
  if (count != 0) {
    if (count < 0x40000000) {
      __dest = (void **)malloc(count * 4);
      __ptr->elements = __dest;
      if (__dest != (void **)0x0) {
        memcpy(__dest,contents,count * 4);
        __ptr->count = count;
        __ptr->allocated = count;
        return __ptr;
      }
    }
    free(__ptr);
    return (gl_list_t)0x0;
  }
  __ptr->elements = (void **)0x0;
  __ptr->count = 0;
  __ptr->allocated = 0;
  return __ptr;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 *
FUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
            undefined1 param_5,uint param_6,void *param_7)

{
  undefined4 *__ptr;
  void *__dest;
  
  __ptr = (undefined4 *)malloc(0x20);
  if (__ptr == (undefined4 *)0x0) {
    return (undefined4 *)0x0;
  }
  *__ptr = param_1;
  __ptr[1] = param_2;
  __ptr[2] = param_3;
  __ptr[3] = param_4;
  *(undefined1 *)(__ptr + 4) = param_5;
  if (param_6 != 0) {
    if (param_6 < 0x40000000) {
      __dest = malloc(param_6 * 4);
      __ptr[5] = __dest;
      if (__dest != (void *)0x0) {
        memcpy(__dest,param_7,param_6 * 4);
        __ptr[6] = param_6;
        __ptr[7] = param_6;
        return __ptr;
      }
    }
    free(__ptr);
    return (undefined4 *)0x0;
  }
  __ptr[5] = 0;
  __ptr[6] = 0;
  __ptr[7] = 0;
  return __ptr;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013d10
ADD EBX,0x48cb7
SUB ESP,0x18
MOV EBP,dword ptr [ESP + 0x3c]
MOV EDI,dword ptr [ESP + 0x40]
PUSH 0x20
CALL 0x000132f0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0004d3c7
MOV EAX,dword ptr [ESP + 0x20]
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [ESI + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x2c]
MOV dword ptr [ESI + 0xc],EAX
MOV EAX,EBP
MOV byte ptr [ESI + 0x10],AL
TEST EDI,EDI
JZ 0x0004d3d8
CMP EDI,0x3fffffff
JA 0x0004d3f0
SUB ESP,0xc
LEA EBP,[EDI*0x4 + 0x0]
PUSH EBP
CALL 0x000132f0
ADD ESP,0x10
MOV dword ptr [ESI + 0x14],EAX
TEST EAX,EAX
JZ 0x0004d3f0
SUB ESP,0x4
PUSH EBP
PUSH dword ptr [ESP + 0x40]
PUSH EAX
CALL 0x00013100
MOV dword ptr [ESI + 0x18],EDI
ADD ESP,0x10
MOV dword ptr [ESI + 0x1c],EDI
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI + 0x14],0x0
MOV EAX,ESI
MOV dword ptr [ESI + 0x18],EDI
MOV dword ptr [ESI + 0x1c],EDI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
XOR ESI,ESI
CALL 0x00013630
ADD ESP,0x10
MOV EAX,ESI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 *\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)\n\n{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}\n\n" comment (function_definition "undefined4 *\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)\n\n{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" type_identifier (pointer_declarator "*\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" * (function_declarator "FUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined1 param_5" type_identifier identifier) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "void *param_7" primitive_type (pointer_declarator "*param_7" * identifier)) )))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__ptr = (undefined4 *)malloc(0x20);" (assignment_expression "__ptr = (undefined4 *)malloc(0x20)" identifier = (cast_expression "(undefined4 *)malloc(0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }" if (parenthesized_expression "(__ptr == (undefined4 *)0x0)" ( (binary_expression "__ptr == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return (undefined4 *)0x0;\n  }" { (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*__ptr = param_1;" (assignment_expression "*__ptr = param_1" (pointer_expression "*__ptr" * identifier) = identifier) ;) (expression_statement "__ptr[1] = param_2;" (assignment_expression "__ptr[1] = param_2" (subscript_expression "__ptr[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[2] = param_3;" (assignment_expression "__ptr[2] = param_3" (subscript_expression "__ptr[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[3] = param_4;" (assignment_expression "__ptr[3] = param_4" (subscript_expression "__ptr[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined1 *)(__ptr + 4) = param_5;" (assignment_expression "*(undefined1 *)(__ptr + 4) = param_5" (pointer_expression "*(undefined1 *)(__ptr + 4)" * (cast_expression "(undefined1 *)(__ptr + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__ptr + 4)" ( (binary_expression "__ptr + 4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" { (if_statement "if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" if (parenthesized_expression "(param_6 < 0x40000000)" ( (binary_expression "param_6 < 0x40000000" identifier < number_literal) )) (compound_statement "{\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" { (expression_statement "__dest = malloc(param_6 * 4);" (assignment_expression "__dest = malloc(param_6 * 4)" identifier = (call_expression "malloc(param_6 * 4)" identifier (argument_list "(param_6 * 4)" ( (binary_expression "param_6 * 4" identifier * number_literal) )))) ;) (expression_statement "__ptr[5] = __dest;" (assignment_expression "__ptr[5] = __dest" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" { (expression_statement "memcpy(__dest,param_7,param_6 * 4);" (call_expression "memcpy(__dest,param_7,param_6 * 4)" identifier (argument_list "(__dest,param_7,param_6 * 4)" ( identifier , identifier , (binary_expression "param_6 * 4" identifier * number_literal) ))) ;) (expression_statement "__ptr[6] = param_6;" (assignment_expression "__ptr[6] = param_6" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[7] = param_6;" (assignment_expression "__ptr[7] = param_6" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = identifier) ;) (return_statement "return __ptr;" return identifier ;) })) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "__ptr[5] = 0;" (assignment_expression "__ptr[5] = 0" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "__ptr[6] = 0;" (assignment_expression "__ptr[6] = 0" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "__ptr[7] = 0;" (assignment_expression "__ptr[7] = 0" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return __ptr;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\ngl_list_t gl_array_nx_create(gl_list_implementation_t implementation,\n                            gl_listelement_equals_fn equals_fn,\n                            gl_listelement_hashcode_fn hashcode_fn,\n                            gl_listelement_dispose_fn dispose_fn,_Bool allow_duplicates,size_t count\n                            ,void **contents)\n\n{\n  gl_list_t __ptr;\n  void **__dest;\n  \n  __ptr = (gl_list_t)malloc(0x20);\n  if (__ptr == (gl_list_t)0x0) {\n    return (gl_list_t)0x0;\n  }\n  (__ptr->base).vtable = implementation;\n  (__ptr->base).equals_fn = equals_fn;\n  (__ptr->base).hashcode_fn = hashcode_fn;\n  (__ptr->base).dispose_fn = dispose_fn;\n  (__ptr->base).allow_duplicates = allow_duplicates;\n  if (count != 0) {\n    if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (gl_list_t)0x0;\n  }\n  __ptr->elements = (void **)0x0;\n  __ptr->count = 0;\n  __ptr->allocated = 0;\n  return __ptr;\n}\n\n" comment comment (function_definition "gl_list_t gl_array_nx_create(gl_list_implementation_t implementation,\n                            gl_listelement_equals_fn equals_fn,\n                            gl_listelement_hashcode_fn hashcode_fn,\n                            gl_listelement_dispose_fn dispose_fn,_Bool allow_duplicates,size_t count\n                            ,void **contents)\n\n{\n  gl_list_t __ptr;\n  void **__dest;\n  \n  __ptr = (gl_list_t)malloc(0x20);\n  if (__ptr == (gl_list_t)0x0) {\n    return (gl_list_t)0x0;\n  }\n  (__ptr->base).vtable = implementation;\n  (__ptr->base).equals_fn = equals_fn;\n  (__ptr->base).hashcode_fn = hashcode_fn;\n  (__ptr->base).dispose_fn = dispose_fn;\n  (__ptr->base).allow_duplicates = allow_duplicates;\n  if (count != 0) {\n    if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (gl_list_t)0x0;\n  }\n  __ptr->elements = (void **)0x0;\n  __ptr->count = 0;\n  __ptr->allocated = 0;\n  return __ptr;\n}" type_identifier (function_declarator "gl_array_nx_create(gl_list_implementation_t implementation,\n                            gl_listelement_equals_fn equals_fn,\n                            gl_listelement_hashcode_fn hashcode_fn,\n                            gl_listelement_dispose_fn dispose_fn,_Bool allow_duplicates,size_t count\n                            ,void **contents)" identifier (parameter_list "(gl_list_implementation_t implementation,\n                            gl_listelement_equals_fn equals_fn,\n                            gl_listelement_hashcode_fn hashcode_fn,\n                            gl_listelement_dispose_fn dispose_fn,_Bool allow_duplicates,size_t count\n                            ,void **contents)" ( (parameter_declaration "gl_list_implementation_t implementation" type_identifier identifier) , (parameter_declaration "gl_listelement_equals_fn equals_fn" type_identifier identifier) , (parameter_declaration "gl_listelement_hashcode_fn hashcode_fn" type_identifier identifier) , (parameter_declaration "gl_listelement_dispose_fn dispose_fn" type_identifier identifier) , (parameter_declaration "_Bool allow_duplicates" type_identifier identifier) , (parameter_declaration "size_t count" primitive_type identifier) , (parameter_declaration "void **contents" primitive_type (pointer_declarator "**contents" * (pointer_declarator "*contents" * identifier))) ))) (compound_statement "{\n  gl_list_t __ptr;\n  void **__dest;\n  \n  __ptr = (gl_list_t)malloc(0x20);\n  if (__ptr == (gl_list_t)0x0) {\n    return (gl_list_t)0x0;\n  }\n  (__ptr->base).vtable = implementation;\n  (__ptr->base).equals_fn = equals_fn;\n  (__ptr->base).hashcode_fn = hashcode_fn;\n  (__ptr->base).dispose_fn = dispose_fn;\n  (__ptr->base).allow_duplicates = allow_duplicates;\n  if (count != 0) {\n    if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (gl_list_t)0x0;\n  }\n  __ptr->elements = (void **)0x0;\n  __ptr->count = 0;\n  __ptr->allocated = 0;\n  return __ptr;\n}" { (declaration "gl_list_t __ptr;" type_identifier identifier ;) (declaration "void **__dest;" primitive_type (pointer_declarator "**__dest" * (pointer_declarator "*__dest" * identifier)) ;) (expression_statement "__ptr = (gl_list_t)malloc(0x20);" (assignment_expression "__ptr = (gl_list_t)malloc(0x20)" identifier = (cast_expression "(gl_list_t)malloc(0x20)" ( (type_descriptor "gl_list_t" type_identifier) ) (call_expression "malloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (__ptr == (gl_list_t)0x0) {\n    return (gl_list_t)0x0;\n  }" if (parenthesized_expression "(__ptr == (gl_list_t)0x0)" ( (binary_expression "__ptr == (gl_list_t)0x0" identifier == (cast_expression "(gl_list_t)0x0" ( (type_descriptor "gl_list_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    return (gl_list_t)0x0;\n  }" { (return_statement "return (gl_list_t)0x0;" return (cast_expression "(gl_list_t)0x0" ( (type_descriptor "gl_list_t" type_identifier) ) number_literal) ;) })) (expression_statement "(__ptr->base).vtable = implementation;" (assignment_expression "(__ptr->base).vtable = implementation" (field_expression "(__ptr->base).vtable" (parenthesized_expression "(__ptr->base)" ( (field_expression "__ptr->base" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(__ptr->base).equals_fn = equals_fn;" (assignment_expression "(__ptr->base).equals_fn = equals_fn" (field_expression "(__ptr->base).equals_fn" (parenthesized_expression "(__ptr->base)" ( (field_expression "__ptr->base" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(__ptr->base).hashcode_fn = hashcode_fn;" (assignment_expression "(__ptr->base).hashcode_fn = hashcode_fn" (field_expression "(__ptr->base).hashcode_fn" (parenthesized_expression "(__ptr->base)" ( (field_expression "__ptr->base" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(__ptr->base).dispose_fn = dispose_fn;" (assignment_expression "(__ptr->base).dispose_fn = dispose_fn" (field_expression "(__ptr->base).dispose_fn" (parenthesized_expression "(__ptr->base)" ( (field_expression "__ptr->base" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(__ptr->base).allow_duplicates = allow_duplicates;" (assignment_expression "(__ptr->base).allow_duplicates = allow_duplicates" (field_expression "(__ptr->base).allow_duplicates" (parenthesized_expression "(__ptr->base)" ( (field_expression "__ptr->base" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if (count != 0) {\n    if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (gl_list_t)0x0;\n  }" if (parenthesized_expression "(count != 0)" ( (binary_expression "count != 0" identifier != number_literal) )) (compound_statement "{\n    if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (gl_list_t)0x0;\n  }" { (if_statement "if (count < 0x40000000) {\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }" if (parenthesized_expression "(count < 0x40000000)" ( (binary_expression "count < 0x40000000" identifier < number_literal) )) (compound_statement "{\n      __dest = (void **)malloc(count * 4);\n      __ptr->elements = __dest;\n      if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }\n    }" { (expression_statement "__dest = (void **)malloc(count * 4);" (assignment_expression "__dest = (void **)malloc(count * 4)" identifier = (cast_expression "(void **)malloc(count * 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "malloc(count * 4)" identifier (argument_list "(count * 4)" ( (binary_expression "count * 4" identifier * number_literal) ))))) ;) (expression_statement "__ptr->elements = __dest;" (assignment_expression "__ptr->elements = __dest" (field_expression "__ptr->elements" identifier -> field_identifier) = identifier) ;) (if_statement "if (__dest != (void **)0x0) {\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }" if (parenthesized_expression "(__dest != (void **)0x0)" ( (binary_expression "__dest != (void **)0x0" identifier != (cast_expression "(void **)0x0" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n        memcpy(__dest,contents,count * 4);\n        __ptr->count = count;\n        __ptr->allocated = count;\n        return __ptr;\n      }" { (expression_statement "memcpy(__dest,contents,count * 4);" (call_expression "memcpy(__dest,contents,count * 4)" identifier (argument_list "(__dest,contents,count * 4)" ( identifier , identifier , (binary_expression "count * 4" identifier * number_literal) ))) ;) (expression_statement "__ptr->count = count;" (assignment_expression "__ptr->count = count" (field_expression "__ptr->count" identifier -> field_identifier) = identifier) ;) (expression_statement "__ptr->allocated = count;" (assignment_expression "__ptr->allocated = count" (field_expression "__ptr->allocated" identifier -> field_identifier) = identifier) ;) (return_statement "return __ptr;" return identifier ;) })) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (gl_list_t)0x0;" return (cast_expression "(gl_list_t)0x0" ( (type_descriptor "gl_list_t" type_identifier) ) number_literal) ;) })) (expression_statement "__ptr->elements = (void **)0x0;" (assignment_expression "__ptr->elements = (void **)0x0" (field_expression "__ptr->elements" identifier -> field_identifier) = (cast_expression "(void **)0x0" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;) (expression_statement "__ptr->count = 0;" (assignment_expression "__ptr->count = 0" (field_expression "__ptr->count" identifier -> field_identifier) = number_literal) ;) (expression_statement "__ptr->allocated = 0;" (assignment_expression "__ptr->allocated = 0" (field_expression "__ptr->allocated" identifier -> field_identifier) = number_literal) ;) (return_statement "return __ptr;" return identifier ;) })))
(translation_unit "undefined4 *\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)\n\n{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}\n\n" (function_definition "undefined4 *\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)\n\n{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" type_identifier (pointer_declarator "*\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" * (function_declarator "FUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined1 param_5" type_identifier identifier) , (parameter_declaration "uint param_6" type_identifier identifier) , (parameter_declaration "void *param_7" primitive_type (pointer_declarator "*param_7" * identifier)) )))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "__ptr = (undefined4 *)malloc(0x20);" (assignment_expression "__ptr = (undefined4 *)malloc(0x20)" identifier = (cast_expression "(undefined4 *)malloc(0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }" if (parenthesized_expression "(__ptr == (undefined4 *)0x0)" ( (binary_expression "__ptr == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return (undefined4 *)0x0;\n  }" { (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*__ptr = param_1;" (assignment_expression "*__ptr = param_1" (pointer_expression "*__ptr" * identifier) = identifier) ;) (expression_statement "__ptr[1] = param_2;" (assignment_expression "__ptr[1] = param_2" (subscript_expression "__ptr[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[2] = param_3;" (assignment_expression "__ptr[2] = param_3" (subscript_expression "__ptr[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[3] = param_4;" (assignment_expression "__ptr[3] = param_4" (subscript_expression "__ptr[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined1 *)(__ptr + 4) = param_5;" (assignment_expression "*(undefined1 *)(__ptr + 4) = param_5" (pointer_expression "*(undefined1 *)(__ptr + 4)" * (cast_expression "(undefined1 *)(__ptr + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__ptr + 4)" ( (binary_expression "__ptr + 4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" { (if_statement "if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" if (parenthesized_expression "(param_6 < 0x40000000)" ( (binary_expression "param_6 < 0x40000000" identifier < number_literal) )) (compound_statement "{\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" { (expression_statement "__dest = malloc(param_6 * 4);" (assignment_expression "__dest = malloc(param_6 * 4)" identifier = (call_expression "malloc(param_6 * 4)" identifier (argument_list "(param_6 * 4)" ( (binary_expression "param_6 * 4" identifier * number_literal) )))) ;) (expression_statement "__ptr[5] = __dest;" (assignment_expression "__ptr[5] = __dest" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" if (parenthesized_expression "(__dest != (void *)0x0)" ( (binary_expression "__dest != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" { (expression_statement "memcpy(__dest,param_7,param_6 * 4);" (call_expression "memcpy(__dest,param_7,param_6 * 4)" identifier (argument_list "(__dest,param_7,param_6 * 4)" ( identifier , identifier , (binary_expression "param_6 * 4" identifier * number_literal) ))) ;) (expression_statement "__ptr[6] = param_6;" (assignment_expression "__ptr[6] = param_6" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__ptr[7] = param_6;" (assignment_expression "__ptr[7] = param_6" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = identifier) ;) (return_statement "return __ptr;" return identifier ;) })) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (undefined4 *)0x0;" return (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "__ptr[5] = 0;" (assignment_expression "__ptr[5] = 0" (subscript_expression "__ptr[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "__ptr[6] = 0;" (assignment_expression "__ptr[6] = 0" (subscript_expression "__ptr[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "__ptr[7] = 0;" (assignment_expression "__ptr[7] = 0" (subscript_expression "__ptr[7]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return __ptr;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT * LIT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return IDENT ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 *\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)\n\n{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" (type_identifier "undefined4") (pointer_declarator "*\nFUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" (* "*") (function_declarator "FUN_0004d340(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" (identifier "FUN_0004d340") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined1 param_5,uint param_6,void *param_7)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined1 param_5" (type_identifier "undefined1") (identifier "param_5")) (, ",") (parameter_declaration "uint param_6" (type_identifier "uint") (identifier "param_6")) (, ",") (parameter_declaration "void *param_7" (primitive_type "void") (pointer_declarator "*param_7" (* "*") (identifier "param_7"))) () ")")))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__dest;\n  \n  __ptr = (undefined4 *)malloc(0x20);\n  if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }\n  *__ptr = param_1;\n  __ptr[1] = param_2;\n  __ptr[2] = param_3;\n  __ptr[3] = param_4;\n  *(undefined1 *)(__ptr + 4) = param_5;\n  if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }\n  __ptr[5] = 0;\n  __ptr[6] = 0;\n  __ptr[7] = 0;\n  return __ptr;\n}" ({ "{") (declaration "undefined4 *__ptr;" (type_identifier "undefined4") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "__ptr = (undefined4 *)malloc(0x20);" (assignment_expression "__ptr = (undefined4 *)malloc(0x20)" (identifier "__ptr") (= "=") (cast_expression "(undefined4 *)malloc(0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "malloc(0x20)" (identifier "malloc") (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")"))))) (; ";")) (if_statement "if (__ptr == (undefined4 *)0x0) {\n    return (undefined4 *)0x0;\n  }" (if "if") (parenthesized_expression "(__ptr == (undefined4 *)0x0)" (( "(") (binary_expression "__ptr == (undefined4 *)0x0" (identifier "__ptr") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return (undefined4 *)0x0;\n  }" ({ "{") (return_statement "return (undefined4 *)0x0;" (return "return") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "*__ptr = param_1;" (assignment_expression "*__ptr = param_1" (pointer_expression "*__ptr" (* "*") (identifier "__ptr")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "__ptr[1] = param_2;" (assignment_expression "__ptr[1] = param_2" (subscript_expression "__ptr[1]" (identifier "__ptr") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "__ptr[2] = param_3;" (assignment_expression "__ptr[2] = param_3" (subscript_expression "__ptr[2]" (identifier "__ptr") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "__ptr[3] = param_4;" (assignment_expression "__ptr[3] = param_4" (subscript_expression "__ptr[3]" (identifier "__ptr") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "*(undefined1 *)(__ptr + 4) = param_5;" (assignment_expression "*(undefined1 *)(__ptr + 4) = param_5" (pointer_expression "*(undefined1 *)(__ptr + 4)" (* "*") (cast_expression "(undefined1 *)(__ptr + 4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__ptr + 4)" (( "(") (binary_expression "__ptr + 4" (identifier "__ptr") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_5")) (; ";")) (if_statement "if (param_6 != 0) {\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" (if "if") (parenthesized_expression "(param_6 != 0)" (( "(") (binary_expression "param_6 != 0" (identifier "param_6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }\n    free(__ptr);\n    return (undefined4 *)0x0;\n  }" ({ "{") (if_statement "if (param_6 < 0x40000000) {\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" (if "if") (parenthesized_expression "(param_6 < 0x40000000)" (( "(") (binary_expression "param_6 < 0x40000000" (identifier "param_6") (< "<") (number_literal "0x40000000")) () ")")) (compound_statement "{\n      __dest = malloc(param_6 * 4);\n      __ptr[5] = __dest;\n      if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }\n    }" ({ "{") (expression_statement "__dest = malloc(param_6 * 4);" (assignment_expression "__dest = malloc(param_6 * 4)" (identifier "__dest") (= "=") (call_expression "malloc(param_6 * 4)" (identifier "malloc") (argument_list "(param_6 * 4)" (( "(") (binary_expression "param_6 * 4" (identifier "param_6") (* "*") (number_literal "4")) () ")")))) (; ";")) (expression_statement "__ptr[5] = __dest;" (assignment_expression "__ptr[5] = __dest" (subscript_expression "__ptr[5]" (identifier "__ptr") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "__dest")) (; ";")) (if_statement "if (__dest != (void *)0x0) {\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" (if "if") (parenthesized_expression "(__dest != (void *)0x0)" (( "(") (binary_expression "__dest != (void *)0x0" (identifier "__dest") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        memcpy(__dest,param_7,param_6 * 4);\n        __ptr[6] = param_6;\n        __ptr[7] = param_6;\n        return __ptr;\n      }" ({ "{") (expression_statement "memcpy(__dest,param_7,param_6 * 4);" (call_expression "memcpy(__dest,param_7,param_6 * 4)" (identifier "memcpy") (argument_list "(__dest,param_7,param_6 * 4)" (( "(") (identifier "__dest") (, ",") (identifier "param_7") (, ",") (binary_expression "param_6 * 4" (identifier "param_6") (* "*") (number_literal "4")) () ")"))) (; ";")) (expression_statement "__ptr[6] = param_6;" (assignment_expression "__ptr[6] = param_6" (subscript_expression "__ptr[6]" (identifier "__ptr") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "param_6")) (; ";")) (expression_statement "__ptr[7] = param_6;" (assignment_expression "__ptr[7] = param_6" (subscript_expression "__ptr[7]" (identifier "__ptr") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "param_6")) (; ";")) (return_statement "return __ptr;" (return "return") (identifier "__ptr") (; ";")) (} "}"))) (} "}"))) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return (undefined4 *)0x0;" (return "return") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "__ptr[5] = 0;" (assignment_expression "__ptr[5] = 0" (subscript_expression "__ptr[5]" (identifier "__ptr") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "__ptr[6] = 0;" (assignment_expression "__ptr[6] = 0" (subscript_expression "__ptr[6]" (identifier "__ptr") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "__ptr[7] = 0;" (assignment_expression "__ptr[7] = 0" (subscript_expression "__ptr[7]" (identifier "__ptr") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return __ptr;" (return "return") (identifier "__ptr") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 implementation,
                            type_3 equals_fn,
                            type_4 hashcode_fn,
                            type_5 dispose_fn,type_6 allow_duplicates,size_t var_3
                            ,void **contents)

{
  type_1 var_2;
  void **var_4;
  
  var_2 = (type_1)var_1(0x20);
  if (var_2 == (type_1)0x0) {
    return (type_1)0x0;
  }
  (var_2->base).vtable = implementation;
  (var_2->base).equals_fn = equals_fn;
  (var_2->base).hashcode_fn = hashcode_fn;
  (var_2->base).dispose_fn = dispose_fn;
  (var_2->base).allow_duplicates = allow_duplicates;
  if (var_3 != 0) {
    if (var_3 < 0x40000000) {
      var_4 = (void **)var_1(var_3 * 4);
      var_2->elements = var_4;
      if (var_4 != (void **)0x0) {
        var_5(var_4,contents,var_3 * 4);
        var_2->var_3 = var_3;
        var_2->allocated = var_3;
        return var_2;
      }
    }
    var_6(var_2);
    return (type_1)0x0;
  }
  var_2->elements = (void **)0x0;
  var_2->var_3 = 0;
  var_2->allocated = 0;
  return var_2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (return_statement (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 *
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
            undefined1 param_5,uint param_6,void *param_7)

{
  undefined4 *__ptr;
  void *__dest;
  
  __ptr = (undefined4 *)malloc(0x20);
  if (__ptr == (undefined4 *)0x0) {
    return (undefined4 *)0x0;
  }
  *__ptr = param_1;
  __ptr[1] = param_2;
  __ptr[2] = param_3;
  __ptr[3] = param_4;
  *(undefined1 *)(__ptr + 4) = param_5;
  if (param_6 != 0) {
    if (param_6 < 0x40000000) {
      __dest = malloc(param_6 * 4);
      __ptr[5] = __dest;
      if (__dest != (void *)0x0) {
        memcpy(__dest,param_7,param_6 * 4);
        __ptr[6] = param_6;
        __ptr[7] = param_6;
        return __ptr;
      }
    }
    free(__ptr);
    return (undefined4 *)0x0;
  }
  __ptr[5] = 0;
  __ptr[6] = 0;
  __ptr[7] = 0;
  return __ptr;
}

