
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode Curl_get_upload_buffer(Curl_easy *data)

{
  char *pcVar1;
  
  if ((data->state).ulbuf != (char *)0x0) {
    return CURLE_OK;
  }
  pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);
  (data->state).ulbuf = pcVar1;
  return -(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY;
}



byte FUN_0012bec5(long param_1)

{
  long lVar1;
  
  if (*(long *)(param_1 + 0x1250) != 0) {
    return 0;
  }
  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));
  *(long *)(param_1 + 0x1250) = lVar1;
  return -(lVar1 == 0) & 0x1b;
}


MOV EAX,0x0
CMP qword ptr [RDI + 0x1250],0x0
JZ 0x0012bed5
RET
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xc40]
LEA RAX,[0x18c0c0]
CALL qword ptr [RAX]
MOV qword ptr [RBX + 0x1250],RAX
CMP RAX,0x1
SBB EAX,EAX
AND EAX,0x1b
POP RBX
RET
(translation_unit "byte FUN_0012bec5(long param_1)\n\n{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}\n\n" (function_definition "byte FUN_0012bec5(long param_1)\n\n{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" type_identifier (function_declarator "FUN_0012bec5(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x1250) != 0)" ( (binary_expression "*(long *)(param_1 + 0x1250) != 0" (pointer_expression "*(long *)(param_1 + 0x1250)" * (cast_expression "(long *)(param_1 + 0x1250)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1250)" ( (binary_expression "param_1 + 0x1250" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));" (assignment_expression "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" identifier = (call_expression "(*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" (parenthesized_expression "(*(code *)PTR_malloc_0018c0c0)" ( (pointer_expression "*(code *)PTR_malloc_0018c0c0" * (cast_expression "(code *)PTR_malloc_0018c0c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined8 *)(param_1 + 0xc40))" ( (pointer_expression "*(undefined8 *)(param_1 + 0xc40)" * (cast_expression "(undefined8 *)(param_1 + 0xc40)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc40)" ( (binary_expression "param_1 + 0xc40" identifier + number_literal) )))) )))) ;) (expression_statement "*(long *)(param_1 + 0x1250) = lVar1;" (assignment_expression "*(long *)(param_1 + 0x1250) = lVar1" (pointer_expression "*(long *)(param_1 + 0x1250)" * (cast_expression "(long *)(param_1 + 0x1250)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1250)" ( (binary_expression "param_1 + 0x1250" identifier + number_literal) )))) = identifier) ;) (return_statement "return -(lVar1 == 0) & 0x1b;" return (binary_expression "-(lVar1 == 0) & 0x1b" (unary_expression "-(lVar1 == 0)" - (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) ))) & number_literal) ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode Curl_get_upload_buffer(Curl_easy *data)\n\n{\n  char *pcVar1;\n  \n  if ((data->state).ulbuf != (char *)0x0) {\n    return CURLE_OK;\n  }\n  pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);\n  (data->state).ulbuf = pcVar1;\n  return -(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY;\n}\n\n" comment (function_definition "CURLcode Curl_get_upload_buffer(Curl_easy *data)\n\n{\n  char *pcVar1;\n  \n  if ((data->state).ulbuf != (char *)0x0) {\n    return CURLE_OK;\n  }\n  pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);\n  (data->state).ulbuf = pcVar1;\n  return -(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY;\n}" type_identifier (function_declarator "Curl_get_upload_buffer(Curl_easy *data)" identifier (parameter_list "(Curl_easy *data)" ( (parameter_declaration "Curl_easy *data" type_identifier (pointer_declarator "*data" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if ((data->state).ulbuf != (char *)0x0) {\n    return CURLE_OK;\n  }\n  pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);\n  (data->state).ulbuf = pcVar1;\n  return -(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if ((data->state).ulbuf != (char *)0x0) {\n    return CURLE_OK;\n  }" if (parenthesized_expression "((data->state).ulbuf != (char *)0x0)" ( (binary_expression "(data->state).ulbuf != (char *)0x0" (field_expression "(data->state).ulbuf" (parenthesized_expression "(data->state)" ( (field_expression "data->state" identifier -> field_identifier) )) . field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return CURLE_OK;\n  }" { (return_statement "return CURLE_OK;" return identifier ;) })) (expression_statement "pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);" (assignment_expression "pcVar1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size)" identifier = (cast_expression "(char *)(*Curl_cmalloc)((data->set).upload_buffer_size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*Curl_cmalloc)((data->set).upload_buffer_size)" (parenthesized_expression "(*Curl_cmalloc)" ( (pointer_expression "*Curl_cmalloc" * identifier) )) (argument_list "((data->set).upload_buffer_size)" ( (field_expression "(data->set).upload_buffer_size" (parenthesized_expression "(data->set)" ( (field_expression "data->set" identifier -> field_identifier) )) . field_identifier) ))))) ;) (expression_statement "(data->state).ulbuf = pcVar1;" (assignment_expression "(data->state).ulbuf = pcVar1" (field_expression "(data->state).ulbuf" (parenthesized_expression "(data->state)" ( (field_expression "data->state" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (return_statement "return -(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY;" return (binary_expression "-(uint)(pcVar1 == (char *)0x0) & CURLE_OUT_OF_MEMORY" (unary_expression "-(uint)(pcVar1 == (char *)0x0)" - (call_expression "(uint)(pcVar1 == (char *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )))) & identifier) ;) })))
(translation_unit "byte FUN_0012bec5(long param_1)\n\n{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}\n\n" (function_definition "byte FUN_0012bec5(long param_1)\n\n{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" type_identifier (function_declarator "FUN_0012bec5(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0x1250) != 0)" ( (binary_expression "*(long *)(param_1 + 0x1250) != 0" (pointer_expression "*(long *)(param_1 + 0x1250)" * (cast_expression "(long *)(param_1 + 0x1250)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1250)" ( (binary_expression "param_1 + 0x1250" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));" (assignment_expression "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" identifier = (call_expression "(*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" (parenthesized_expression "(*(code *)PTR_malloc_0018c0c0)" ( (pointer_expression "*(code *)PTR_malloc_0018c0c0" * (cast_expression "(code *)PTR_malloc_0018c0c0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined8 *)(param_1 + 0xc40))" ( (pointer_expression "*(undefined8 *)(param_1 + 0xc40)" * (cast_expression "(undefined8 *)(param_1 + 0xc40)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc40)" ( (binary_expression "param_1 + 0xc40" identifier + number_literal) )))) )))) ;) (expression_statement "*(long *)(param_1 + 0x1250) = lVar1;" (assignment_expression "*(long *)(param_1 + 0x1250) = lVar1" (pointer_expression "*(long *)(param_1 + 0x1250)" * (cast_expression "(long *)(param_1 + 0x1250)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1250)" ( (binary_expression "param_1 + 0x1250" identifier + number_literal) )))) = identifier) ;) (return_statement "return -(lVar1 == 0) & 0x1b;" return (binary_expression "-(lVar1 == 0) & 0x1b" (unary_expression "-(lVar1 == 0)" - (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) ))) & number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (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 { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (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) ;) (return_statement return (binary_expression (unary_expression - (parenthesized_expression ( (binary_expression IDENT == LIT) ))) & LIT) ;) })))
(function_definition "byte FUN_0012bec5(long param_1)\n\n{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" (type_identifier "byte") (function_declarator "FUN_0012bec5(long param_1)" (identifier "FUN_0012bec5") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  long lVar1;\n  \n  if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }\n  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));\n  *(long *)(param_1 + 0x1250) = lVar1;\n  return -(lVar1 == 0) & 0x1b;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (if_statement "if (*(long *)(param_1 + 0x1250) != 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0x1250) != 0)" (( "(") (binary_expression "*(long *)(param_1 + 0x1250) != 0" (pointer_expression "*(long *)(param_1 + 0x1250)" (* "*") (cast_expression "(long *)(param_1 + 0x1250)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1250)" (( "(") (binary_expression "param_1 + 0x1250" (identifier "param_1") (+ "+") (number_literal "0x1250")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));" (assignment_expression "lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" (identifier "lVar1") (= "=") (call_expression "(*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40))" (parenthesized_expression "(*(code *)PTR_malloc_0018c0c0)" (( "(") (pointer_expression "*(code *)PTR_malloc_0018c0c0" (* "*") (cast_expression "(code *)PTR_malloc_0018c0c0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_0018c0c0"))) () ")")) (argument_list "(*(undefined8 *)(param_1 + 0xc40))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0xc40)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xc40)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc40)" (( "(") (binary_expression "param_1 + 0xc40" (identifier "param_1") (+ "+") (number_literal "0xc40")) () ")")))) () ")")))) (; ";")) (expression_statement "*(long *)(param_1 + 0x1250) = lVar1;" (assignment_expression "*(long *)(param_1 + 0x1250) = lVar1" (pointer_expression "*(long *)(param_1 + 0x1250)" (* "*") (cast_expression "(long *)(param_1 + 0x1250)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1250)" (( "(") (binary_expression "param_1 + 0x1250" (identifier "param_1") (+ "+") (number_literal "0x1250")) () ")")))) (= "=") (identifier "lVar1")) (; ";")) (return_statement "return -(lVar1 == 0) & 0x1b;" (return "return") (binary_expression "-(lVar1 == 0) & 0x1b" (unary_expression "-(lVar1 == 0)" (- "-") (parenthesized_expression "(lVar1 == 0)" (( "(") (binary_expression "lVar1 == 0" (identifier "lVar1") (== "==") (number_literal "0")) () ")"))) (& "&") (number_literal "0x1b")) (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *data)

{
  char *var_1;
  
  if ((data->state).ulbuf != (char *)0x0) {
    return CURLE_OK;
  }
  var_1 = (char *)(*Curl_cmalloc)((data->set).upload_buffer_size);
  (data->state).ulbuf = var_1;
  return -(uint)(var_1 == (char *)0x0) & var_2;
}


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

byte MASKED(long param_1)

{
  long lVar1;
  
  if (*(long *)(param_1 + 0x1250) != 0) {
    return 0;
  }
  lVar1 = (*(code *)PTR_malloc_0018c0c0)(*(undefined8 *)(param_1 + 0xc40));
  *(long *)(param_1 + 0x1250) = lVar1;
  return -(lVar1 == 0) & 0x1b;
}

