
/* WARNING: Unknown calling convention */

void set_scsi_pt_task_management(sg_pt_base *vp,int tmf_code)

{
  (vp->impl).tmf_request[0] = (uint8_t)tmf_code;
  (vp->impl).io_hdr.subprotocol = 1;
  *(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;
  *(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0;
  (vp->impl).io_hdr.request_len = 1;
  return;
}



void set_scsi_pt_task_management(int param_1,undefined1 param_2)

{
  *(undefined1 *)(param_1 + 0xd8) = param_2;
  *(undefined4 *)(param_1 + 8) = 1;
  *(int *)(param_1 + 0x10) = param_1 + 0xd8;
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0xc) = 1;
  return;
}


MOV EAX,dword ptr [ESP + 0x4]
MOV EDX,dword ptr [ESP + 0x8]
MOV byte ptr [EAX + 0xd8],DL
LEA EDX,[EAX + 0xd8]
MOV dword ptr [EAX + 0x8],0x1
MOV dword ptr [EAX + 0x10],EDX
MOV dword ptr [EAX + 0x14],0x0
MOV dword ptr [EAX + 0xc],0x1
RET
(translation_unit "void set_scsi_pt_task_management(int param_1,undefined1 param_2)\n\n{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}\n\n" (function_definition "void set_scsi_pt_task_management(int param_1,undefined1 param_2)\n\n{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" primitive_type (function_declarator "set_scsi_pt_task_management(int param_1,undefined1 param_2)" identifier (parameter_list "(int param_1,undefined1 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 param_2" type_identifier identifier) ))) (compound_statement "{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" { (expression_statement "*(undefined1 *)(param_1 + 0xd8) = param_2;" (assignment_expression "*(undefined1 *)(param_1 + 0xd8) = param_2" (pointer_expression "*(undefined1 *)(param_1 + 0xd8)" * (cast_expression "(undefined1 *)(param_1 + 0xd8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x10) = param_1 + 0xd8;" (assignment_expression "*(int *)(param_1 + 0x10) = param_1 + 0xd8" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "param_1 + 0xd8" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid set_scsi_pt_task_management(sg_pt_base *vp,int tmf_code)\n\n{\n  (vp->impl).tmf_request[0] = (uint8_t)tmf_code;\n  (vp->impl).io_hdr.subprotocol = 1;\n  *(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;\n  *(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0;\n  (vp->impl).io_hdr.request_len = 1;\n  return;\n}\n\n" comment (function_definition "void set_scsi_pt_task_management(sg_pt_base *vp,int tmf_code)\n\n{\n  (vp->impl).tmf_request[0] = (uint8_t)tmf_code;\n  (vp->impl).io_hdr.subprotocol = 1;\n  *(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;\n  *(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0;\n  (vp->impl).io_hdr.request_len = 1;\n  return;\n}" primitive_type (function_declarator "set_scsi_pt_task_management(sg_pt_base *vp,int tmf_code)" identifier (parameter_list "(sg_pt_base *vp,int tmf_code)" ( (parameter_declaration "sg_pt_base *vp" type_identifier (pointer_declarator "*vp" * identifier)) , (parameter_declaration "int tmf_code" primitive_type identifier) ))) (compound_statement "{\n  (vp->impl).tmf_request[0] = (uint8_t)tmf_code;\n  (vp->impl).io_hdr.subprotocol = 1;\n  *(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;\n  *(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0;\n  (vp->impl).io_hdr.request_len = 1;\n  return;\n}" { (expression_statement "(vp->impl).tmf_request[0] = (uint8_t)tmf_code;" (assignment_expression "(vp->impl).tmf_request[0] = (uint8_t)tmf_code" (subscript_expression "(vp->impl).tmf_request[0]" (field_expression "(vp->impl).tmf_request" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier) [ number_literal ]) = (cast_expression "(uint8_t)tmf_code" ( (type_descriptor "uint8_t" primitive_type) ) identifier)) ;) (expression_statement "(vp->impl).io_hdr.subprotocol = 1;" (assignment_expression "(vp->impl).io_hdr.subprotocol = 1" (field_expression "(vp->impl).io_hdr.subprotocol" (field_expression "(vp->impl).io_hdr" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "*(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;" (assignment_expression "*(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request" (pointer_expression "*(uint8_t **)&(vp->impl).io_hdr.request" * (cast_expression "(uint8_t **)&(vp->impl).io_hdr.request" ( (type_descriptor "uint8_t **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "&(vp->impl).io_hdr.request" & (field_expression "(vp->impl).io_hdr.request" (field_expression "(vp->impl).io_hdr" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier) . field_identifier)))) = (field_expression "(vp->impl).tmf_request" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "*(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0;" (assignment_expression "*(undefined4 *)((int)&(vp->impl).io_hdr.request + 4) = 0" (pointer_expression "*(undefined4 *)((int)&(vp->impl).io_hdr.request + 4)" * (cast_expression "(undefined4 *)((int)&(vp->impl).io_hdr.request + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&(vp->impl).io_hdr.request + 4)" ( (binary_expression "(int)&(vp->impl).io_hdr.request + 4" (cast_expression "(int)&(vp->impl).io_hdr.request" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&(vp->impl).io_hdr.request" & (field_expression "(vp->impl).io_hdr.request" (field_expression "(vp->impl).io_hdr" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier) . field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "(vp->impl).io_hdr.request_len = 1;" (assignment_expression "(vp->impl).io_hdr.request_len = 1" (field_expression "(vp->impl).io_hdr.request_len" (field_expression "(vp->impl).io_hdr" (parenthesized_expression "(vp->impl)" ( (field_expression "vp->impl" identifier -> field_identifier) )) . field_identifier) . field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void set_scsi_pt_task_management(int param_1,undefined1 param_2)\n\n{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}\n\n" (function_definition "void set_scsi_pt_task_management(int param_1,undefined1 param_2)\n\n{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" primitive_type (function_declarator "set_scsi_pt_task_management(int param_1,undefined1 param_2)" identifier (parameter_list "(int param_1,undefined1 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 param_2" type_identifier identifier) ))) (compound_statement "{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" { (expression_statement "*(undefined1 *)(param_1 + 0xd8) = param_2;" (assignment_expression "*(undefined1 *)(param_1 + 0xd8) = param_2" (pointer_expression "*(undefined1 *)(param_1 + 0xd8)" * (cast_expression "(undefined1 *)(param_1 + 0xd8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd8)" ( (binary_expression "param_1 + 0xd8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x10) = param_1 + 0xd8;" (assignment_expression "*(int *)(param_1 + 0x10) = param_1 + 0xd8" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "param_1 + 0xd8" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void set_scsi_pt_task_management(int param_1,undefined1 param_2)\n\n{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" (primitive_type "void") (function_declarator "set_scsi_pt_task_management(int param_1,undefined1 param_2)" (identifier "set_scsi_pt_task_management") (parameter_list "(int param_1,undefined1 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 param_2" (type_identifier "undefined1") (identifier "param_2")) () ")"))) (compound_statement "{\n  *(undefined1 *)(param_1 + 0xd8) = param_2;\n  *(undefined4 *)(param_1 + 8) = 1;\n  *(int *)(param_1 + 0x10) = param_1 + 0xd8;\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0xc) = 1;\n  return;\n}" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0xd8) = param_2;" (assignment_expression "*(undefined1 *)(param_1 + 0xd8) = param_2" (pointer_expression "*(undefined1 *)(param_1 + 0xd8)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xd8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd8)" (( "(") (binary_expression "param_1 + 0xd8" (identifier "param_1") (+ "+") (number_literal "0xd8")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(int *)(param_1 + 0x10) = param_1 + 0xd8;" (assignment_expression "*(int *)(param_1 + 0x10) = param_1 + 0xd8" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "param_1 + 0xd8" (identifier "param_1") (+ "+") (number_literal "0xd8"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(type_1 *vp,int tmf_code)

{
  (vp->impl).tmf_request[0] = (uint8_t)tmf_code;
  (vp->impl).io_hdr.subprotocol = 1;
  *(uint8_t **)&(vp->impl).io_hdr.request = (vp->impl).tmf_request;
  *(type_2 *)((int)&(vp->impl).io_hdr.request + 4) = 0;
  (vp->impl).io_hdr.request_len = 1;
  return;
}


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

void MASKED(int param_1,undefined1 param_2)

{
  *(undefined1 *)(param_1 + 0xd8) = param_2;
  *(undefined4 *)(param_1 + 8) = 1;
  *(int *)(param_1 + 0x10) = param_1 + 0xd8;
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0xc) = 1;
  return;
}

