
/* std::locale::id::_M_id() const */

long __thiscall std::locale::id::_M_id(id *this)

{
  int iVar1;
  long lVar2;
  
  iVar1 = _S_refcount;
  lVar2 = *(long *)this;
  if (lVar2 == 0) {
    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {
      LOCK();
      UNLOCK();
    }
    _S_refcount = _S_refcount + 1;
    lVar2 = (long)(iVar1 + 1);
    *(long *)this = lVar2;
  }
  return lVar2 + -1;
}



long FUN_0033b190(long *param_1)

{
  int iVar1;
  long lVar2;
  
  iVar1 = DAT_004c5540;
  lVar2 = *param_1;
  if (lVar2 == 0) {
    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {
      LOCK();
      UNLOCK();
    }
    DAT_004c5540 = DAT_004c5540 + 1;
    lVar2 = (long)(iVar1 + 1);
    *param_1 = lVar2;
  }
  return lVar2 + -1;
}


MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JNZ 0x0033b1ba
CMP qword ptr [0x004b9ee8],0x0
LEA RDX,[0x4c5540]
JZ 0x0033b1c0
MOV EAX,0x1
XADD.LOCK dword ptr [RDX],EAX
ADD EAX,0x1
CDQE
MOV qword ptr [RDI],RAX
SUB RAX,0x1
RET
MOV EAX,dword ptr [RDX]
ADD EAX,0x1
MOV dword ptr [RDX],EAX
JMP 0x0033b1b5
(translation_unit "long FUN_0033b190(long *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}\n\n" (function_definition "long FUN_0033b190(long *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0033b190(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar1 = DAT_004c5540;" (assignment_expression "iVar1 = DAT_004c5540" identifier = identifier) ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      LOCK();\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_004c5540 = DAT_004c5540 + 1;" (assignment_expression "DAT_004c5540 = DAT_004c5540 + 1" identifier = (binary_expression "DAT_004c5540 + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)(iVar1 + 1);" (assignment_expression "lVar2 = (long)(iVar1 + 1)" identifier = (cast_expression "(long)(iVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "*param_1 = lVar2;" (assignment_expression "*param_1 = lVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (return_statement "return lVar2 + -1;" return (binary_expression "lVar2 + -1" identifier + number_literal) ;) })))
(translation_unit "/* std::locale::id::_M_id() const */\n\nlong __thiscall std::locale::id::_M_id(id *this)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = _S_refcount;\n  lVar2 = *(long *)this;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    _S_refcount = _S_refcount + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *(long *)this = lVar2;\n  }\n  return lVar2 + -1;\n}\n\n" comment (function_definition "long __thiscall std::locale::id::_M_id(id *this)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = _S_refcount;\n  lVar2 = *(long *)this;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    _S_refcount = _S_refcount + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *(long *)this = lVar2;\n  }\n  return lVar2 + -1;\n}" (sized_type_specifier "long" long) (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::locale::id::" identifier : : identifier : : identifier : :) (function_declarator "_M_id(id *this)" identifier (parameter_list "(id *this)" ( (parameter_declaration "id *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = _S_refcount;\n  lVar2 = *(long *)this;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    _S_refcount = _S_refcount + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *(long *)this = lVar2;\n  }\n  return lVar2 + -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar1 = _S_refcount;" (assignment_expression "iVar1 = _S_refcount" identifier = identifier) ;) (expression_statement "lVar2 = *(long *)this;" (assignment_expression "lVar2 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    _S_refcount = _S_refcount + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *(long *)this = lVar2;\n  }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    _S_refcount = _S_refcount + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *(long *)this = lVar2;\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      LOCK();\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "_S_refcount = _S_refcount + 1;" (assignment_expression "_S_refcount = _S_refcount + 1" identifier = (binary_expression "_S_refcount + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)(iVar1 + 1);" (assignment_expression "lVar2 = (long)(iVar1 + 1)" identifier = (cast_expression "(long)(iVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "*(long *)this = lVar2;" (assignment_expression "*(long *)this = lVar2" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) })) (return_statement "return lVar2 + -1;" return (binary_expression "lVar2 + -1" identifier + number_literal) ;) })))
(translation_unit "long FUN_0033b190(long *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}\n\n" (function_definition "long FUN_0033b190(long *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0033b190(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar1 = DAT_004c5540;" (assignment_expression "iVar1 = DAT_004c5540" identifier = identifier) ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" if (parenthesized_expression "(lVar2 == 0)" ( (binary_expression "lVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" { (if_statement "if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_004b9ee8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      LOCK();\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "DAT_004c5540 = DAT_004c5540 + 1;" (assignment_expression "DAT_004c5540 = DAT_004c5540 + 1" identifier = (binary_expression "DAT_004c5540 + 1" identifier + number_literal)) ;) (expression_statement "lVar2 = (long)(iVar1 + 1);" (assignment_expression "lVar2 = (long)(iVar1 + 1)" identifier = (cast_expression "(long)(iVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "*param_1 = lVar2;" (assignment_expression "*param_1 = lVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (return_statement "return lVar2 + -1;" return (binary_expression "lVar2 + -1" identifier + number_literal) ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (return_statement return (binary_expression IDENT + LIT) ;) })))
(function_definition "long FUN_0033b190(long *param_1)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_0033b190(long *param_1)" (identifier "FUN_0033b190") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = DAT_004c5540;\n  lVar2 = *param_1;\n  if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }\n  return lVar2 + -1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (expression_statement "iVar1 = DAT_004c5540;" (assignment_expression "iVar1 = DAT_004c5540" (identifier "iVar1") (= "=") (identifier "DAT_004c5540")) (; ";")) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" (identifier "lVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (lVar2 == 0) {\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" (if "if") (parenthesized_expression "(lVar2 == 0)" (( "(") (binary_expression "lVar2 == 0" (identifier "lVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }\n    DAT_004c5540 = DAT_004c5540 + 1;\n    lVar2 = (long)(iVar1 + 1);\n    *param_1 = lVar2;\n  }" ({ "{") (if_statement "if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {\n      LOCK();\n      UNLOCK();\n    }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_004b9ee8 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_004b9ee8 != (undefined *)0x0" (identifier "PTR___pthread_key_create_004b9ee8") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      LOCK();\n      UNLOCK();\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "DAT_004c5540 = DAT_004c5540 + 1;" (assignment_expression "DAT_004c5540 = DAT_004c5540 + 1" (identifier "DAT_004c5540") (= "=") (binary_expression "DAT_004c5540 + 1" (identifier "DAT_004c5540") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "lVar2 = (long)(iVar1 + 1);" (assignment_expression "lVar2 = (long)(iVar1 + 1)" (identifier "lVar2") (= "=") (cast_expression "(long)(iVar1 + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar1 + 1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*param_1 = lVar2;" (assignment_expression "*param_1 = lVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "lVar2")) (; ";")) (} "}"))) (return_statement "return lVar2 + -1;" (return "return") (binary_expression "lVar2 + -1" (identifier "lVar2") (+ "+") (number_literal "-1")) (; ";")) (} "}")))

/* std::locale::id::_M_id() const */

long __thiscall std::locale::type_1::function_1(type_1 *this)

{
  int var_6;
  long var_1;
  
  var_6 = var_5;
  var_1 = *(long *)this;
  if (var_1 == 0) {
    if (var_2 != (type_2 *)0x0) {
      var_3();
      var_4();
    }
    var_5 = var_5 + 1;
    var_1 = (long)(var_6 + 1);
    *(long *)this = var_1;
  }
  return var_1 + -1;
}


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

long MASKED(long *param_1)

{
  int iVar1;
  long lVar2;
  
  iVar1 = DAT_004c5540;
  lVar2 = *param_1;
  if (lVar2 == 0) {
    if (PTR___pthread_key_create_004b9ee8 != (undefined *)0x0) {
      LOCK();
      UNLOCK();
    }
    DAT_004c5540 = DAT_004c5540 + 1;
    lVar2 = (long)(iVar1 + 1);
    *param_1 = lVar2;
  }
  return lVar2 + -1;
}

