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

void term_scroll_to_selection(Terminal *term,wchar_t which_end)

{
  wchar_t wVar1;
  wchar_t wVar2;
  wchar_t where;
  
  wVar1 = sblines(term);
  if (term->selstate == ADDRTYPE_NAME) {
    if (which_end == L'\0') {
      wVar2 = (term->selstart).y;
    }
    else {
      wVar2 = (term->selend).y;
    }
    wVar2 = wVar2 - term->rows / 2;
    where = -wVar1;
    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {
      where = wVar2;
    }
    term_scroll(term,L'\xffffffff',where);
  }
  return;
}



void FUN_0013723c(long param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = FUN_0012d0aa();
  if (*(int *)(param_1 + 0xeb4) == 3) {
    if (param_2 == 0) {
      iVar2 = *(int *)(param_1 + 0xec0);
    }
    else {
      iVar2 = *(int *)(param_1 + 0xec8);
    }
    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;
    iVar3 = -iVar1;
    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {
      iVar3 = iVar2;
    }
    FUN_001371ed(param_1,0xffffffff,iVar3);
  }
  return;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV EBP,ESI
CALL 0x0012d0aa
CMP dword ptr [RBX + 0xeb4],0x3
JNZ 0x0013728f
TEST EBP,EBP
JZ 0x00137296
MOV ECX,dword ptr [RBX + 0xec8]
NEG EAX
MOV EDX,EAX
MOV ESI,dword ptr [RBX + 0x188]
MOV EAX,ESI
SHR EAX,0x1f
ADD EAX,ESI
SAR EAX,0x1
SUB ECX,EAX
CMP EDX,ECX
JG 0x00137282
TEST ECX,ECX
MOV EDX,0x0
CMOVLE EDX,ECX
MOV ESI,0xffffffff
MOV RDI,RBX
CALL 0x001371ed
ADD RSP,0x8
POP RBX
POP RBP
RET
MOV ECX,dword ptr [RBX + 0xec0]
JMP 0x0013725f
(translation_unit "void FUN_0013723c(long param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0013723c(long param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0013723c(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_0012d0aa();" (assignment_expression "iVar1 = FUN_0012d0aa()" identifier = (call_expression "FUN_0012d0aa()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xeb4) == 3)" ( (binary_expression "*(int *)(param_1 + 0xeb4) == 3" (pointer_expression "*(int *)(param_1 + 0xeb4)" * (cast_expression "(int *)(param_1 + 0xeb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xeb4)" ( (binary_expression "param_1 + 0xeb4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" { (if_statement "if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }" { (expression_statement "iVar2 = *(int *)(param_1 + 0xec0);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec0)" identifier = (pointer_expression "*(int *)(param_1 + 0xec0)" * (cast_expression "(int *)(param_1 + 0xec0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xec0)" ( (binary_expression "param_1 + 0xec0" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" else (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" { (expression_statement "iVar2 = *(int *)(param_1 + 0xec8);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec8)" identifier = (pointer_expression "*(int *)(param_1 + 0xec8)" * (cast_expression "(int *)(param_1 + 0xec8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xec8)" ( (binary_expression "param_1 + 0xec8" identifier + number_literal) ))))) ;) }))) (expression_statement "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;" (assignment_expression "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2" identifier = (binary_expression "iVar2 - *(int *)(param_1 + 0x188) / 2" identifier - (binary_expression "*(int *)(param_1 + 0x188) / 2" (pointer_expression "*(int *)(param_1 + 0x188)" * (cast_expression "(int *)(param_1 + 0x188)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x188)" ( (binary_expression "param_1 + 0x188" identifier + number_literal) )))) / number_literal))) ;) (expression_statement "iVar3 = -iVar1;" (assignment_expression "iVar3 = -iVar1" identifier = (unary_expression "-iVar1" - identifier)) ;) (if_statement "if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }" if (parenthesized_expression "((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1))" ( (binary_expression "(-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)" (parenthesized_expression "(-iVar1 <= iVar2)" ( (binary_expression "-iVar1 <= iVar2" (unary_expression "-iVar1" - identifier) <= identifier) )) && (parenthesized_expression "(iVar3 = 0, iVar2 < 1)" ( (comma_expression "iVar3 = 0, iVar2 < 1" (assignment_expression "iVar3 = 0" identifier = number_literal) , (binary_expression "iVar2 < 1" identifier < number_literal)) ))) )) (compound_statement "{\n      iVar3 = iVar2;\n    }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) })) (expression_statement "FUN_001371ed(param_1,0xffffffff,iVar3);" (call_expression "FUN_001371ed(param_1,0xffffffff,iVar3)" identifier (argument_list "(param_1,0xffffffff,iVar3)" ( identifier , number_literal , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid term_scroll_to_selection(Terminal *term,wchar_t which_end)\n\n{\n  wchar_t wVar1;\n  wchar_t wVar2;\n  wchar_t where;\n  \n  wVar1 = sblines(term);\n  if (term->selstate == ADDRTYPE_NAME) {\n    if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }\n    wVar2 = wVar2 - term->rows / 2;\n    where = -wVar1;\n    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }\n    term_scroll(term,L'\xffffffff',where);\n  }\n  return;\n}\n\n" comment (function_definition "void term_scroll_to_selection(Terminal *term,wchar_t which_end)\n\n{\n  wchar_t wVar1;\n  wchar_t wVar2;\n  wchar_t where;\n  \n  wVar1 = sblines(term);\n  if (term->selstate == ADDRTYPE_NAME) {\n    if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }\n    wVar2 = wVar2 - term->rows / 2;\n    where = -wVar1;\n    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }\n    term_scroll(term,L'\xffffffff',where);\n  }\n  return;\n}" primitive_type (function_declarator "term_scroll_to_selection(Terminal *term,wchar_t which_end)" identifier (parameter_list "(Terminal *term,wchar_t which_end)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) , (parameter_declaration "wchar_t which_end" type_identifier identifier) ))) (compound_statement "{\n  wchar_t wVar1;\n  wchar_t wVar2;\n  wchar_t where;\n  \n  wVar1 = sblines(term);\n  if (term->selstate == ADDRTYPE_NAME) {\n    if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }\n    wVar2 = wVar2 - term->rows / 2;\n    where = -wVar1;\n    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }\n    term_scroll(term,L'\xffffffff',where);\n  }\n  return;\n}" { (declaration "wchar_t wVar1;" type_identifier identifier ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "wchar_t where;" type_identifier identifier ;) (expression_statement "wVar1 = sblines(term);" (assignment_expression "wVar1 = sblines(term)" identifier = (call_expression "sblines(term)" identifier (argument_list "(term)" ( identifier )))) ;) (if_statement "if (term->selstate == ADDRTYPE_NAME) {\n    if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }\n    wVar2 = wVar2 - term->rows / 2;\n    where = -wVar1;\n    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }\n    term_scroll(term,L'\xffffffff',where);\n  }" if (parenthesized_expression "(term->selstate == ADDRTYPE_NAME)" ( (binary_expression "term->selstate == ADDRTYPE_NAME" (field_expression "term->selstate" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }\n    wVar2 = wVar2 - term->rows / 2;\n    where = -wVar1;\n    if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }\n    term_scroll(term,L'\xffffffff',where);\n  }" { (if_statement "if (which_end == L'\0') {\n      wVar2 = (term->selstart).y;\n    }\n    else {\n      wVar2 = (term->selend).y;\n    }" if (parenthesized_expression "(which_end == L'\0')" ( (binary_expression "which_end == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n      wVar2 = (term->selstart).y;\n    }" { (expression_statement "wVar2 = (term->selstart).y;" (assignment_expression "wVar2 = (term->selstart).y" identifier = (field_expression "(term->selstart).y" (parenthesized_expression "(term->selstart)" ( (field_expression "term->selstart" identifier -> field_identifier) )) . field_identifier)) ;) }) (else_clause "else {\n      wVar2 = (term->selend).y;\n    }" else (compound_statement "{\n      wVar2 = (term->selend).y;\n    }" { (expression_statement "wVar2 = (term->selend).y;" (assignment_expression "wVar2 = (term->selend).y" identifier = (field_expression "(term->selend).y" (parenthesized_expression "(term->selend)" ( (field_expression "term->selend" identifier -> field_identifier) )) . field_identifier)) ;) }))) (expression_statement "wVar2 = wVar2 - term->rows / 2;" (assignment_expression "wVar2 = wVar2 - term->rows / 2" identifier = (binary_expression "wVar2 - term->rows / 2" identifier - (binary_expression "term->rows / 2" (field_expression "term->rows" identifier -> field_identifier) / number_literal))) ;) (expression_statement "where = -wVar1;" (assignment_expression "where = -wVar1" identifier = (unary_expression "-wVar1" - identifier)) ;) (if_statement "if ((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')) {\n      where = wVar2;\n    }" if (parenthesized_expression "((-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01'))" ( (binary_expression "(-wVar1 <= wVar2) && (where = L'\0', wVar2 < L'\x01')" (parenthesized_expression "(-wVar1 <= wVar2)" ( (binary_expression "-wVar1 <= wVar2" (unary_expression "-wVar1" - identifier) <= identifier) )) && (parenthesized_expression "(where = L'\0', wVar2 < L'\x01')" ( (comma_expression "where = L'\0', wVar2 < L'\x01'" (assignment_expression "where = L'\0'" identifier = (char_literal "L'\0'" L' escape_sequence ')) , (binary_expression "wVar2 < L'\x01'" identifier < (char_literal "L'\x01'" L' escape_sequence '))) ))) )) (compound_statement "{\n      where = wVar2;\n    }" { (expression_statement "where = wVar2;" (assignment_expression "where = wVar2" identifier = identifier) ;) })) (expression_statement "term_scroll(term,L'\xffffffff',where);" (call_expression "term_scroll(term,L'\xffffffff',where)" identifier (argument_list "(term,L'\xffffffff',where)" ( identifier , (char_literal "L'\xffffffff'" L' escape_sequence character character character character ') , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0013723c(long param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0013723c(long param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0013723c(long param_1,int param_2)" identifier (parameter_list "(long param_1,int param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_0012d0aa();" (assignment_expression "iVar1 = FUN_0012d0aa()" identifier = (call_expression "FUN_0012d0aa()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xeb4) == 3)" ( (binary_expression "*(int *)(param_1 + 0xeb4) == 3" (pointer_expression "*(int *)(param_1 + 0xeb4)" * (cast_expression "(int *)(param_1 + 0xeb4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xeb4)" ( (binary_expression "param_1 + 0xeb4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" { (if_statement "if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }" { (expression_statement "iVar2 = *(int *)(param_1 + 0xec0);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec0)" identifier = (pointer_expression "*(int *)(param_1 + 0xec0)" * (cast_expression "(int *)(param_1 + 0xec0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xec0)" ( (binary_expression "param_1 + 0xec0" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" else (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" { (expression_statement "iVar2 = *(int *)(param_1 + 0xec8);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec8)" identifier = (pointer_expression "*(int *)(param_1 + 0xec8)" * (cast_expression "(int *)(param_1 + 0xec8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xec8)" ( (binary_expression "param_1 + 0xec8" identifier + number_literal) ))))) ;) }))) (expression_statement "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;" (assignment_expression "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2" identifier = (binary_expression "iVar2 - *(int *)(param_1 + 0x188) / 2" identifier - (binary_expression "*(int *)(param_1 + 0x188) / 2" (pointer_expression "*(int *)(param_1 + 0x188)" * (cast_expression "(int *)(param_1 + 0x188)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x188)" ( (binary_expression "param_1 + 0x188" identifier + number_literal) )))) / number_literal))) ;) (expression_statement "iVar3 = -iVar1;" (assignment_expression "iVar3 = -iVar1" identifier = (unary_expression "-iVar1" - identifier)) ;) (if_statement "if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }" if (parenthesized_expression "((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1))" ( (binary_expression "(-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)" (parenthesized_expression "(-iVar1 <= iVar2)" ( (binary_expression "-iVar1 <= iVar2" (unary_expression "-iVar1" - identifier) <= identifier) )) && (parenthesized_expression "(iVar3 = 0, iVar2 < 1)" ( (comma_expression "iVar3 = 0, iVar2 < 1" (assignment_expression "iVar3 = 0" identifier = number_literal) , (binary_expression "iVar2 < 1" identifier < number_literal)) ))) )) (compound_statement "{\n      iVar3 = iVar2;\n    }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) })) (expression_statement "FUN_001371ed(param_1,0xffffffff,iVar3);" (call_expression "FUN_001371ed(param_1,0xffffffff,iVar3)" identifier (argument_list "(param_1,0xffffffff,iVar3)" ( identifier , number_literal , identifier ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) / LIT))) ;) (expression_statement (assignment_expression IDENT = (unary_expression - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - IDENT) <= IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression IDENT < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0013723c(long param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0013723c(long param_1,int param_2)" (identifier "FUN_0013723c") (parameter_list "(long param_1,int param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = FUN_0012d0aa();\n  if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = FUN_0012d0aa();" (assignment_expression "iVar1 = FUN_0012d0aa()" (identifier "iVar1") (= "=") (call_expression "FUN_0012d0aa()" (identifier "FUN_0012d0aa") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*(int *)(param_1 + 0xeb4) == 3) {\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xeb4) == 3)" (( "(") (binary_expression "*(int *)(param_1 + 0xeb4) == 3" (pointer_expression "*(int *)(param_1 + 0xeb4)" (* "*") (cast_expression "(int *)(param_1 + 0xeb4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xeb4)" (( "(") (binary_expression "param_1 + 0xeb4" (identifier "param_1") (+ "+") (number_literal "0xeb4")) () ")")))) (== "==") (number_literal "3")) () ")")) (compound_statement "{\n    if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }\n    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;\n    iVar3 = -iVar1;\n    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }\n    FUN_001371ed(param_1,0xffffffff,iVar3);\n  }" ({ "{") (if_statement "if (param_2 == 0) {\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }\n    else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec0);\n    }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0xec0);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec0)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0xec0)" (* "*") (cast_expression "(int *)(param_1 + 0xec0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xec0)" (( "(") (binary_expression "param_1 + 0xec0" (identifier "param_1") (+ "+") (number_literal "0xec0")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" (else "else") (compound_statement "{\n      iVar2 = *(int *)(param_1 + 0xec8);\n    }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0xec8);" (assignment_expression "iVar2 = *(int *)(param_1 + 0xec8)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0xec8)" (* "*") (cast_expression "(int *)(param_1 + 0xec8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xec8)" (( "(") (binary_expression "param_1 + 0xec8" (identifier "param_1") (+ "+") (number_literal "0xec8")) () ")"))))) (; ";")) (} "}")))) (expression_statement "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;" (assignment_expression "iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2" (identifier "iVar2") (= "=") (binary_expression "iVar2 - *(int *)(param_1 + 0x188) / 2" (identifier "iVar2") (- "-") (binary_expression "*(int *)(param_1 + 0x188) / 2" (pointer_expression "*(int *)(param_1 + 0x188)" (* "*") (cast_expression "(int *)(param_1 + 0x188)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x188)" (( "(") (binary_expression "param_1 + 0x188" (identifier "param_1") (+ "+") (number_literal "0x188")) () ")")))) (/ "/") (number_literal "2")))) (; ";")) (expression_statement "iVar3 = -iVar1;" (assignment_expression "iVar3 = -iVar1" (identifier "iVar3") (= "=") (unary_expression "-iVar1" (- "-") (identifier "iVar1"))) (; ";")) (if_statement "if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {\n      iVar3 = iVar2;\n    }" (if "if") (parenthesized_expression "((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1))" (( "(") (binary_expression "(-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)" (parenthesized_expression "(-iVar1 <= iVar2)" (( "(") (binary_expression "-iVar1 <= iVar2" (unary_expression "-iVar1" (- "-") (identifier "iVar1")) (<= "<=") (identifier "iVar2")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = 0, iVar2 < 1)" (( "(") (comma_expression "iVar3 = 0, iVar2 < 1" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (, ",") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1"))) () ")"))) () ")")) (compound_statement "{\n      iVar3 = iVar2;\n    }" ({ "{") (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (} "}"))) (expression_statement "FUN_001371ed(param_1,0xffffffff,iVar3);" (call_expression "FUN_001371ed(param_1,0xffffffff,iVar3)" (identifier "FUN_001371ed") (argument_list "(param_1,0xffffffff,iVar3)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffffffff") (, ",") (identifier "iVar3") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *term,type_2 var_3)

{
  type_2 wVar1;
  type_2 var_4;
  type_2 where;
  
  wVar1 = var_1(term);
  if (term->selstate == var_2) {
    if (var_3 == L'\0') {
      var_4 = (term->selstart).y;
    }
    else {
      var_4 = (term->selend).y;
    }
    var_4 = var_4 - term->rows / 2;
    where = -wVar1;
    if ((-wVar1 <= var_4) && (where = L'\0', var_4 < L'\x01')) {
      where = var_4;
    }
    var_5(term,L'\xffffffff',where);
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_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: (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: (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)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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)))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_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: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (identifier)) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))))) (return_statement))))

void MASKED(long param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = FUN_0012d0aa();
  if (*(int *)(param_1 + 0xeb4) == 3) {
    if (param_2 == 0) {
      iVar2 = *(int *)(param_1 + 0xec0);
    }
    else {
      iVar2 = *(int *)(param_1 + 0xec8);
    }
    iVar2 = iVar2 - *(int *)(param_1 + 0x188) / 2;
    iVar3 = -iVar1;
    if ((-iVar1 <= iVar2) && (iVar3 = 0, iVar2 < 1)) {
      iVar3 = iVar2;
    }
    FUN_001371ed(param_1,0xffffffff,iVar3);
  }
  return;
}

