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

void loggingbuttons_handler(control *ctrl,void *dlg,void *data,int event)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  
  if (event != 0) {
    if (event != 2) {
      return;
    }
    iVar3 = dlg_radiobutton_get(ctrl,dlg);
    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {
      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);
      return;
    }
                    /* WARNING: Subroutine does not return */
    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,
                  "loggingbuttons_handler");
  }
  pvVar2 = (void *)conf_get_int((Conf *)data,0x78);
  iVar3 = (ctrl->editbox).password;
  iVar1 = 0;
  iVar4 = iVar1;
  if (iVar3 < 1) {
    if (iVar3 == 0) {
LAB_00021ead:
      conf_set_int((Conf *)data,0x78,0);
      iVar4 = iVar1;
    }
  }
  else if (pvVar2 != ((ctrl->radio).buttondata)->p) {
    iVar4 = 0;
    do {
      iVar4 = iVar4 + 1;
      if (iVar3 == iVar4) goto LAB_00021ead;
    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);
  }
  dlg_radiobutton_set(ctrl,dlg,iVar4);
  return;
}



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

void FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (param_4 != 0) {
    if (param_4 != 2) {
      return;
    }
    iVar3 = FUN_0004b500(param_1,param_2);
    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {
      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));
      return;
    }
                    /* WARNING: Subroutine does not return */
    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,
                  "loggingbuttons_handler");
  }
  iVar2 = FUN_0001ea70(param_3,0x78);
  iVar3 = *(int *)(param_1 + 0x24);
  iVar1 = 0;
  iVar4 = iVar1;
  if (iVar3 < 1) {
    if (iVar3 == 0) {
LAB_00021ead:
      FUN_0001f190(param_3,0x78,0);
      iVar4 = iVar1;
    }
  }
  else if (iVar2 != **(int **)(param_1 + 0x30)) {
    iVar4 = 0;
    do {
      iVar4 = iVar4 + 1;
      if (iVar3 == iVar4) goto LAB_00021ead;
    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);
  }
  FUN_0004b450(param_1,param_2,iVar4);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x8e95b
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x2c]
MOV ESI,dword ptr [ESP + 0x20]
TEST EDI,EDI
JZ 0x00021e70
CMP EDI,0x2
JZ 0x00021ee8
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x78
PUSH dword ptr [ESP + 0x34]
CALL 0x0001ea70
MOV ECX,dword ptr [ESI + 0x24]
ADD ESP,0x10
TEST ECX,ECX
JLE 0x00021f20
MOV EBP,dword ptr [ESI + 0x30]
CMP EAX,dword ptr [EBP]
JZ 0x00021ec0
XOR EDX,EDX
JMP 0x00021ea6
CMP dword ptr [EBP + EDX*0x4],EAX
JZ 0x00021ee0
ADD EDX,0x1
CMP ECX,EDX
JNZ 0x00021ea0
SUB ESP,0x4
PUSH 0x0
PUSH 0x78
PUSH dword ptr [ESP + 0x34]
CALL 0x0001f190
ADD ESP,0x10
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x2c]
PUSH ESI
CALL 0x0004b450
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,EDX
JMP 0x00021ec0
SUB ESP,0x8
PUSH dword ptr [ESP + 0x2c]
PUSH ESI
CALL 0x0004b500
ADD ESP,0x10
TEST EAX,EAX
JS 0x00021f24
CMP EAX,dword ptr [ESI + 0x24]
JGE 0x00021f24
MOV EDX,dword ptr [ESI + 0x30]
SUB ESP,0x4
PUSH dword ptr [EDX + EAX*0x4]
PUSH 0x78
PUSH dword ptr [ESP + 0x34]
CALL 0x0001f190
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
JNZ 0x00021ec0
JMP 0x00021ead
LEA EAX,[EBX + 0xfffcb9b0]
PUSH EAX
LEA EAX,[EBX + 0xfffc91bf]
PUSH 0x13c
PUSH EAX
LEA EAX,[EBX + 0xfffca218]
PUSH EAX
CALL 0x0001af20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}\n\n" comment (function_definition "void FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}" primitive_type (function_declarator "FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" { (if_statement "if (param_4 != 2) {\n      return;\n    }" if (parenthesized_expression "(param_4 != 2)" ( (binary_expression "param_4 != 2" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar3 = FUN_0004b500(param_1,param_2);" (assignment_expression "iVar3 = FUN_0004b500(param_1,param_2)" identifier = (call_expression "FUN_0004b500(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" if (parenthesized_expression "((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24)))" ( (binary_expression "(-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x24))" ( (binary_expression "iVar3 < *(int *)(param_1 + 0x24)" identifier < (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" { (expression_statement "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));" (call_expression "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" identifier (argument_list "(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" ( identifier , number_literal , (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x30) + iVar3 * 4)" ( (binary_expression "*(int *)(param_1 + 0x30) + iVar3 * 4" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");" (call_expression "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" identifier (argument_list "("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" ( (string_literal ""button >= 0 && button < ctrl->radio.nbuttons"" " string_content ") , (string_literal ""config.c"" " string_content ") , number_literal , (string_literal ""loggingbuttons_handler"" " string_content ") ))) ;) })) (expression_statement "iVar2 = FUN_0001ea70(param_3,0x78);" (assignment_expression "iVar2 = FUN_0001ea70(param_3,0x78)" identifier = (call_expression "FUN_0001ea70(param_3,0x78)" identifier (argument_list "(param_3,0x78)" ( identifier , number_literal )))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x24);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x24)" identifier = (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }" { (if_statement "if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" { (labeled_statement "LAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);" statement_identifier : (expression_statement "FUN_0001f190(param_3,0x78,0);" (call_expression "FUN_0001f190(param_3,0x78,0)" identifier (argument_list "(param_3,0x78,0)" ( identifier , number_literal , number_literal ))) ;)) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) })) }) (else_clause "else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" else (if_statement "if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" if (parenthesized_expression "(iVar2 != **(int **)(param_1 + 0x30))" ( (binary_expression "iVar2 != **(int **)(param_1 + 0x30)" identifier != (pointer_expression "**(int **)(param_1 + 0x30)" * (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))))) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);" do (compound_statement "{\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == iVar4) goto LAB_00021ead;" if (parenthesized_expression "(iVar3 == iVar4)" ( (binary_expression "iVar3 == iVar4" identifier == identifier) )) (goto_statement "goto LAB_00021ead;" goto statement_identifier ;)) }) while (parenthesized_expression "((*(int **)(param_1 + 0x30))[iVar4] != iVar2)" ( (binary_expression "(*(int **)(param_1 + 0x30))[iVar4] != iVar2" (subscript_expression "(*(int **)(param_1 + 0x30))[iVar4]" (parenthesized_expression "(*(int **)(param_1 + 0x30))" ( (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) )) [ identifier ]) != identifier) )) ;) })))) (expression_statement "FUN_0004b450(param_1,param_2,iVar4);" (call_expression "FUN_0004b450(param_1,param_2,iVar4)" identifier (argument_list "(param_1,param_2,iVar4)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid loggingbuttons_handler(control *ctrl,void *dlg,void *data,int event)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (event != 0) {\n    if (event != 2) {\n      return;\n    }\n    iVar3 = dlg_radiobutton_get(ctrl,dlg);\n    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  pvVar2 = (void *)conf_get_int((Conf *)data,0x78);\n  iVar3 = (ctrl->editbox).password;\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }\n  dlg_radiobutton_set(ctrl,dlg,iVar4);\n  return;\n}\n\n" comment comment (function_definition "void loggingbuttons_handler(control *ctrl,void *dlg,void *data,int event)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (event != 0) {\n    if (event != 2) {\n      return;\n    }\n    iVar3 = dlg_radiobutton_get(ctrl,dlg);\n    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  pvVar2 = (void *)conf_get_int((Conf *)data,0x78);\n  iVar3 = (ctrl->editbox).password;\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }\n  dlg_radiobutton_set(ctrl,dlg,iVar4);\n  return;\n}" primitive_type (function_declarator "loggingbuttons_handler(control *ctrl,void *dlg,void *data,int event)" identifier (parameter_list "(control *ctrl,void *dlg,void *data,int event)" ( (parameter_declaration "control *ctrl" type_identifier (pointer_declarator "*ctrl" * identifier)) , (parameter_declaration "void *dlg" primitive_type (pointer_declarator "*dlg" * identifier)) , (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int event" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (event != 0) {\n    if (event != 2) {\n      return;\n    }\n    iVar3 = dlg_radiobutton_get(ctrl,dlg);\n    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  pvVar2 = (void *)conf_get_int((Conf *)data,0x78);\n  iVar3 = (ctrl->editbox).password;\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }\n  dlg_radiobutton_set(ctrl,dlg,iVar4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (event != 0) {\n    if (event != 2) {\n      return;\n    }\n    iVar3 = dlg_radiobutton_get(ctrl,dlg);\n    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" if (parenthesized_expression "(event != 0)" ( (binary_expression "event != 0" identifier != number_literal) )) (compound_statement "{\n    if (event != 2) {\n      return;\n    }\n    iVar3 = dlg_radiobutton_get(ctrl,dlg);\n    if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" { (if_statement "if (event != 2) {\n      return;\n    }" if (parenthesized_expression "(event != 2)" ( (binary_expression "event != 2" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar3 = dlg_radiobutton_get(ctrl,dlg);" (assignment_expression "iVar3 = dlg_radiobutton_get(ctrl,dlg)" identifier = (call_expression "dlg_radiobutton_get(ctrl,dlg)" identifier (argument_list "(ctrl,dlg)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar3) && (iVar3 < (ctrl->editbox).password)) {\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }" if (parenthesized_expression "((-1 < iVar3) && (iVar3 < (ctrl->editbox).password))" ( (binary_expression "(-1 < iVar3) && (iVar3 < (ctrl->editbox).password)" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(iVar3 < (ctrl->editbox).password)" ( (binary_expression "iVar3 < (ctrl->editbox).password" identifier < (field_expression "(ctrl->editbox).password" (parenthesized_expression "(ctrl->editbox)" ( (field_expression "ctrl->editbox" identifier -> field_identifier) )) . field_identifier)) ))) )) (compound_statement "{\n      conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);\n      return;\n    }" { (expression_statement "conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i);" (call_expression "conf_set_int((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i)" identifier (argument_list "((Conf *)data,0x78,(ctrl->radio).buttondata[iVar3].i)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , (field_expression "(ctrl->radio).buttondata[iVar3].i" (subscript_expression "(ctrl->radio).buttondata[iVar3]" (field_expression "(ctrl->radio).buttondata" (parenthesized_expression "(ctrl->radio)" ( (field_expression "ctrl->radio" identifier -> field_identifier) )) . field_identifier) [ identifier ]) . field_identifier) ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");" (call_expression "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" identifier (argument_list "("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" ( (string_literal ""button >= 0 && button < ctrl->radio.nbuttons"" " string_content ") , (string_literal ""config.c"" " string_content ") , number_literal , (string_literal ""loggingbuttons_handler"" " string_content ") ))) ;) })) (expression_statement "pvVar2 = (void *)conf_get_int((Conf *)data,0x78);" (assignment_expression "pvVar2 = (void *)conf_get_int((Conf *)data,0x78)" identifier = (cast_expression "(void *)conf_get_int((Conf *)data,0x78)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "conf_get_int((Conf *)data,0x78)" identifier (argument_list "((Conf *)data,0x78)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal ))))) ;) (expression_statement "iVar3 = (ctrl->editbox).password;" (assignment_expression "iVar3 = (ctrl->editbox).password" identifier = (field_expression "(ctrl->editbox).password" (parenthesized_expression "(ctrl->editbox)" ( (field_expression "ctrl->editbox" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }\n  }" { (if_statement "if (iVar3 == 0) {\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);\n      iVar4 = iVar1;\n    }" { (labeled_statement "LAB_00021ead:\n      conf_set_int((Conf *)data,0x78,0);" statement_identifier : (expression_statement "conf_set_int((Conf *)data,0x78,0);" (call_expression "conf_set_int((Conf *)data,0x78,0)" identifier (argument_list "((Conf *)data,0x78,0)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , number_literal ))) ;)) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) })) }) (else_clause "else if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }" else (if_statement "if (pvVar2 != ((ctrl->radio).buttondata)->p) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }" if (parenthesized_expression "(pvVar2 != ((ctrl->radio).buttondata)->p)" ( (binary_expression "pvVar2 != ((ctrl->radio).buttondata)->p" identifier != (field_expression "((ctrl->radio).buttondata)->p" (parenthesized_expression "((ctrl->radio).buttondata)" ( (field_expression "(ctrl->radio).buttondata" (parenthesized_expression "(ctrl->radio)" ( (field_expression "ctrl->radio" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((ctrl->radio).buttondata[iVar4].p != pvVar2);" do (compound_statement "{\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == iVar4) goto LAB_00021ead;" if (parenthesized_expression "(iVar3 == iVar4)" ( (binary_expression "iVar3 == iVar4" identifier == identifier) )) (goto_statement "goto LAB_00021ead;" goto statement_identifier ;)) }) while (parenthesized_expression "((ctrl->radio).buttondata[iVar4].p != pvVar2)" ( (binary_expression "(ctrl->radio).buttondata[iVar4].p != pvVar2" (field_expression "(ctrl->radio).buttondata[iVar4].p" (subscript_expression "(ctrl->radio).buttondata[iVar4]" (field_expression "(ctrl->radio).buttondata" (parenthesized_expression "(ctrl->radio)" ( (field_expression "ctrl->radio" identifier -> field_identifier) )) . field_identifier) [ identifier ]) . field_identifier) != identifier) )) ;) })))) (expression_statement "dlg_radiobutton_set(ctrl,dlg,iVar4);" (call_expression "dlg_radiobutton_set(ctrl,dlg,iVar4)" identifier (argument_list "(ctrl,dlg,iVar4)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}\n\n" (function_definition "void FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}" primitive_type (function_declarator "FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" { (if_statement "if (param_4 != 2) {\n      return;\n    }" if (parenthesized_expression "(param_4 != 2)" ( (binary_expression "param_4 != 2" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar3 = FUN_0004b500(param_1,param_2);" (assignment_expression "iVar3 = FUN_0004b500(param_1,param_2)" identifier = (call_expression "FUN_0004b500(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" if (parenthesized_expression "((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24)))" ( (binary_expression "(-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))" (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) && (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x24))" ( (binary_expression "iVar3 < *(int *)(param_1 + 0x24)" identifier < (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" { (expression_statement "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));" (call_expression "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" identifier (argument_list "(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" ( identifier , number_literal , (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x30) + iVar3 * 4)" ( (binary_expression "*(int *)(param_1 + 0x30) + iVar3 * 4" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) ))) ;) (return_statement "return;" return ;) })) (expression_statement "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");" (call_expression "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" identifier (argument_list "("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" ( (string_literal ""button >= 0 && button < ctrl->radio.nbuttons"" " string_content ") , (string_literal ""config.c"" " string_content ") , number_literal , (string_literal ""loggingbuttons_handler"" " string_content ") ))) ;) })) (expression_statement "iVar2 = FUN_0001ea70(param_3,0x78);" (assignment_expression "iVar2 = FUN_0001ea70(param_3,0x78)" identifier = (call_expression "FUN_0001ea70(param_3,0x78)" identifier (argument_list "(param_3,0x78)" ( identifier , number_literal )))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x24);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x24)" identifier = (pointer_expression "*(int *)(param_1 + 0x24)" * (cast_expression "(int *)(param_1 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x24)" ( (binary_expression "param_1 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) (if_statement "if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }" { (if_statement "if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" { (labeled_statement "LAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);" statement_identifier : (expression_statement "FUN_0001f190(param_3,0x78,0);" (call_expression "FUN_0001f190(param_3,0x78,0)" identifier (argument_list "(param_3,0x78,0)" ( identifier , number_literal , number_literal ))) ;)) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" identifier = identifier) ;) })) }) (else_clause "else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" else (if_statement "if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" if (parenthesized_expression "(iVar2 != **(int **)(param_1 + 0x30))" ( (binary_expression "iVar2 != **(int **)(param_1 + 0x30)" identifier != (pointer_expression "**(int **)(param_1 + 0x30)" * (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))))) )) (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);" do (compound_statement "{\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    }" { (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == iVar4) goto LAB_00021ead;" if (parenthesized_expression "(iVar3 == iVar4)" ( (binary_expression "iVar3 == iVar4" identifier == identifier) )) (goto_statement "goto LAB_00021ead;" goto statement_identifier ;)) }) while (parenthesized_expression "((*(int **)(param_1 + 0x30))[iVar4] != iVar2)" ( (binary_expression "(*(int **)(param_1 + 0x30))[iVar4] != iVar2" (subscript_expression "(*(int **)(param_1 + 0x30))[iVar4]" (parenthesized_expression "(*(int **)(param_1 + 0x30))" ( (pointer_expression "*(int **)(param_1 + 0x30)" * (cast_expression "(int **)(param_1 + 0x30)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) )) [ identifier ]) != identifier) )) ;) })))) (expression_statement "FUN_0004b450(param_1,param_2,iVar4);" (call_expression "FUN_0004b450(param_1,param_2,iVar4)" identifier (argument_list "(param_1,param_2,iVar4)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (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 = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) [ IDENT ]) != IDENT) )) ;) })))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00021e40(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (identifier "FUN_00021e40") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }\n  iVar2 = FUN_0001ea70(param_3,0x78);\n  iVar3 = *(int *)(param_1 + 0x24);\n  iVar1 = 0;\n  iVar4 = iVar1;\n  if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }\n  FUN_0004b450(param_1,param_2,iVar4);\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") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (if_statement "if (param_4 != 0) {\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_4 != 2) {\n      return;\n    }\n    iVar3 = FUN_0004b500(param_1,param_2);\n    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }\n                    \n    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");\n  }" ({ "{") (if_statement "if (param_4 != 2) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_4 != 2)" (( "(") (binary_expression "param_4 != 2" (identifier "param_4") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar3 = FUN_0004b500(param_1,param_2);" (assignment_expression "iVar3 = FUN_0004b500(param_1,param_2)" (identifier "iVar3") (= "=") (call_expression "FUN_0004b500(param_1,param_2)" (identifier "FUN_0004b500") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" (if "if") (parenthesized_expression "((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24)))" (( "(") (binary_expression "(-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))" (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x24))" (( "(") (binary_expression "iVar3 < *(int *)(param_1 + 0x24)" (identifier "iVar3") (< "<") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));\n      return;\n    }" ({ "{") (expression_statement "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));" (call_expression "FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" (identifier "FUN_0001f190") (argument_list "(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4))" (( "(") (identifier "param_3") (, ",") (number_literal "0x78") (, ",") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x30) + iVar3 * 4)" (( "(") (binary_expression "*(int *)(param_1 + 0x30) + iVar3 * 4" (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")")))) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler");" (call_expression "__assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" (identifier "__assert_fail") (argument_list "("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,\n                  "loggingbuttons_handler")" (( "(") (string_literal ""button >= 0 && button < ctrl->radio.nbuttons"" (" """) (string_content "button >= 0 && button < ctrl->radio.nbuttons") (" """)) (, ",") (string_literal ""config.c"" (" """) (string_content "config.c") (" """)) (, ",") (number_literal "0x13c") (, ",") (string_literal ""loggingbuttons_handler"" (" """) (string_content "loggingbuttons_handler") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_0001ea70(param_3,0x78);" (assignment_expression "iVar2 = FUN_0001ea70(param_3,0x78)" (identifier "iVar2") (= "=") (call_expression "FUN_0001ea70(param_3,0x78)" (identifier "FUN_0001ea70") (argument_list "(param_3,0x78)" (( "(") (identifier "param_3") (, ",") (number_literal "0x78") () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x24);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x24)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x24)" (* "*") (cast_expression "(int *)(param_1 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x24)" (( "(") (binary_expression "param_1 + 0x24" (identifier "param_1") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" (identifier "iVar4") (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar3 < 1) {\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }\n  else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" (if "if") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }\n  }" ({ "{") (if_statement "if (iVar3 == 0) {\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);\n      iVar4 = iVar1;\n    }" ({ "{") (labeled_statement "LAB_00021ead:\n      FUN_0001f190(param_3,0x78,0);" (statement_identifier "LAB_00021ead") (: ":") (expression_statement "FUN_0001f190(param_3,0x78,0);" (call_expression "FUN_0001f190(param_3,0x78,0)" (identifier "FUN_0001f190") (argument_list "(param_3,0x78,0)" (( "(") (identifier "param_3") (, ",") (number_literal "0x78") (, ",") (number_literal "0") () ")"))) (; ";"))) (expression_statement "iVar4 = iVar1;" (assignment_expression "iVar4 = iVar1" (identifier "iVar4") (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (} "}")) (else_clause "else if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" (else "else") (if_statement "if (iVar2 != **(int **)(param_1 + 0x30)) {\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" (if "if") (parenthesized_expression "(iVar2 != **(int **)(param_1 + 0x30))" (( "(") (binary_expression "iVar2 != **(int **)(param_1 + 0x30)" (identifier "iVar2") (!= "!=") (pointer_expression "**(int **)(param_1 + 0x30)" (* "*") (pointer_expression "*(int **)(param_1 + 0x30)" (* "*") (cast_expression "(int **)(param_1 + 0x30)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))))) () ")")) (compound_statement "{\n    iVar4 = 0;\n    do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);\n  }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);" (do "do") (compound_statement "{\n      iVar4 = iVar4 + 1;\n      if (iVar3 == iVar4) goto LAB_00021ead;\n    }" ({ "{") (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar3 == iVar4) goto LAB_00021ead;" (if "if") (parenthesized_expression "(iVar3 == iVar4)" (( "(") (binary_expression "iVar3 == iVar4" (identifier "iVar3") (== "==") (identifier "iVar4")) () ")")) (goto_statement "goto LAB_00021ead;" (goto "goto") (statement_identifier "LAB_00021ead") (; ";"))) (} "}")) (while "while") (parenthesized_expression "((*(int **)(param_1 + 0x30))[iVar4] != iVar2)" (( "(") (binary_expression "(*(int **)(param_1 + 0x30))[iVar4] != iVar2" (subscript_expression "(*(int **)(param_1 + 0x30))[iVar4]" (parenthesized_expression "(*(int **)(param_1 + 0x30))" (( "(") (pointer_expression "*(int **)(param_1 + 0x30)" (* "*") (cast_expression "(int **)(param_1 + 0x30)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) () ")")) ([ "[") (identifier "iVar4") (] "]")) (!= "!=") (identifier "iVar2")) () ")")) (; ";")) (} "}"))))) (expression_statement "FUN_0004b450(param_1,param_2,iVar4);" (call_expression "FUN_0004b450(param_1,param_2,iVar4)" (identifier "FUN_0004b450") (argument_list "(param_1,param_2,iVar4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *ctrl,void *dlg,void *data,int var_1)

{
  int iVar1;
  void *var_7;
  int var_3;
  int var_8;
  
  if (var_1 != 0) {
    if (var_1 != 2) {
      return;
    }
    var_3 = var_2(ctrl,dlg);
    if ((-1 < var_3) && (var_3 < (ctrl->editbox).password)) {
      var_4((type_2 *)data,0x78,(ctrl->radio).buttondata[var_3].i);
      return;
    }
                    /* WARNING: Subroutine does not return */
    var_5("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,
                  "loggingbuttons_handler");
  }
  var_7 = (void *)var_6((type_2 *)data,0x78);
  var_3 = (ctrl->editbox).password;
  iVar1 = 0;
  var_8 = iVar1;
  if (var_3 < 1) {
    if (var_3 == 0) {
LAB_00021ead:
      var_4((type_2 *)data,0x78,0);
      var_8 = iVar1;
    }
  }
  else if (var_7 != ((ctrl->radio).buttondata)->p) {
    var_8 = 0;
    do {
      var_8 = var_8 + 1;
      if (var_3 == var_8) goto LAB_00021ead;
    } while ((ctrl->radio).buttondata[var_8].p != var_7);
  }
  var_9(ctrl,dlg,var_8);
  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)) (parameter_declaration type: (type_identifier) 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)) (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_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))))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (binary_expression left: (identifier) right: (number_literal))))))))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (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: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) index: (identifier)) right: (identifier)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (return_statement))))

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

void MASKED(int param_1,undefined4 param_2,undefined4 param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  if (param_4 != 0) {
    if (param_4 != 2) {
      return;
    }
    iVar3 = FUN_0004b500(param_1,param_2);
    if ((-1 < iVar3) && (iVar3 < *(int *)(param_1 + 0x24))) {
      FUN_0001f190(param_3,0x78,*(undefined4 *)(*(int *)(param_1 + 0x30) + iVar3 * 4));
      return;
    }
                    /* WARNING: Subroutine does not return */
    __assert_fail("button >= 0 && button < ctrl->radio.nbuttons","config.c",0x13c,
                  "loggingbuttons_handler");
  }
  iVar2 = FUN_0001ea70(param_3,0x78);
  iVar3 = *(int *)(param_1 + 0x24);
  iVar1 = 0;
  iVar4 = iVar1;
  if (iVar3 < 1) {
    if (iVar3 == 0) {
LAB_00021ead:
      FUN_0001f190(param_3,0x78,0);
      iVar4 = iVar1;
    }
  }
  else if (iVar2 != **(int **)(param_1 + 0x30)) {
    iVar4 = 0;
    do {
      iVar4 = iVar4 + 1;
      if (iVar3 == iVar4) goto LAB_00021ead;
    } while ((*(int **)(param_1 + 0x30))[iVar4] != iVar2);
  }
  FUN_0004b450(param_1,param_2,iVar4);
  return;
}

