
control * ctrl_fontsel(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,
                      intorptr context)

{
  control *pcVar1;
  
  pcVar1 = ctrl_new(s,8,helpctx,handler,context);
  if (label != (char *)0x0) {
    label = dupstr(label);
  }
  (pcVar1->generic).label = label;
  (pcVar1->editbox).shortcut = shortcut;
  return pcVar1;
}



int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,
                undefined4 param_5,undefined4 param_6)

{
  int iVar1;
  
  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);
  if (param_2 != 0) {
    param_2 = dupstr(param_2);
  }
  *(int *)(iVar1 + 4) = param_2;
  *(undefined1 *)(iVar1 + 0x1c) = param_3;
  return iVar1;
}


lui gp,0x9
addiu gp,gp,0x3f48
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s2,0x28(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
sw gp,0x18(sp)
or s0,a1,zero
or s2,a2,zero
or a2,a3,zero
lw v0,0x44(sp)
sw v0,0x10(sp)
lw a3,0x40(sp)
li a1,0x8
lw t9,-0x7d7c(gp)
addiu t9,t9,0x164
bal 0x00030164
_nop
lw gp,0x18(sp)
beq s0,zero,0x000312fc
_or s1,v0,zero
or a0,s0,zero
lw t9,-0x7f60(gp)
bal 0x000373a4
_nop
lw gp,0x18(sp)
or s0,v0,zero
sw s0,0x4(s1)
sb s2,0x1c(s1)
or v0,s1,zero
lw ra,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}\n\n" (function_definition "int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" primitive_type (function_declarator "ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);" (assignment_expression "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6)" identifier = (call_expression "FUN_00030164(param_1,8,param_4,param_5,param_6)" identifier (argument_list "(param_1,8,param_4,param_5,param_6)" ( identifier , number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    param_2 = dupstr(param_2);\n  }" { (expression_statement "param_2 = dupstr(param_2);" (assignment_expression "param_2 = dupstr(param_2)" identifier = (call_expression "dupstr(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "*(int *)(iVar1 + 4) = param_2;" (assignment_expression "*(int *)(iVar1 + 4) = param_2" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar1 + 0x1c) = param_3;" (assignment_expression "*(undefined1 *)(iVar1 + 0x1c) = param_3" (pointer_expression "*(undefined1 *)(iVar1 + 0x1c)" * (cast_expression "(undefined1 *)(iVar1 + 0x1c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "control * ctrl_fontsel(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,\n                      intorptr context)\n\n{\n  control *pcVar1;\n  \n  pcVar1 = ctrl_new(s,8,helpctx,handler,context);\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).shortcut = shortcut;\n  return pcVar1;\n}\n\n" (function_definition "control * ctrl_fontsel(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,\n                      intorptr context)\n\n{\n  control *pcVar1;\n  \n  pcVar1 = ctrl_new(s,8,helpctx,handler,context);\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).shortcut = shortcut;\n  return pcVar1;\n}" type_identifier (pointer_declarator "* ctrl_fontsel(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,\n                      intorptr context)" * (function_declarator "ctrl_fontsel(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,\n                      intorptr context)" identifier (parameter_list "(controlset *s,char *label,char shortcut,intorptr helpctx,handler_fn handler,\n                      intorptr context)" ( (parameter_declaration "controlset *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "char *label" primitive_type (pointer_declarator "*label" * identifier)) , (parameter_declaration "char shortcut" primitive_type identifier) , (parameter_declaration "intorptr helpctx" type_identifier identifier) , (parameter_declaration "handler_fn handler" type_identifier identifier) , (parameter_declaration "intorptr context" type_identifier identifier) )))) (compound_statement "{\n  control *pcVar1;\n  \n  pcVar1 = ctrl_new(s,8,helpctx,handler,context);\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).shortcut = shortcut;\n  return pcVar1;\n}" { (declaration "control *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "pcVar1 = ctrl_new(s,8,helpctx,handler,context);" (assignment_expression "pcVar1 = ctrl_new(s,8,helpctx,handler,context)" identifier = (call_expression "ctrl_new(s,8,helpctx,handler,context)" identifier (argument_list "(s,8,helpctx,handler,context)" ( identifier , number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (label != (char *)0x0) {\n    label = dupstr(label);\n  }" if (parenthesized_expression "(label != (char *)0x0)" ( (binary_expression "label != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    label = dupstr(label);\n  }" { (expression_statement "label = dupstr(label);" (assignment_expression "label = dupstr(label)" identifier = (call_expression "dupstr(label)" identifier (argument_list "(label)" ( identifier )))) ;) })) (expression_statement "(pcVar1->generic).label = label;" (assignment_expression "(pcVar1->generic).label = label" (field_expression "(pcVar1->generic).label" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(pcVar1->editbox).shortcut = shortcut;" (assignment_expression "(pcVar1->editbox).shortcut = shortcut" (field_expression "(pcVar1->editbox).shortcut" (parenthesized_expression "(pcVar1->editbox)" ( (field_expression "pcVar1->editbox" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}\n\n" (function_definition "int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" primitive_type (function_declarator "ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);" (assignment_expression "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6)" identifier = (call_expression "FUN_00030164(param_1,8,param_4,param_5,param_6)" identifier (argument_list "(param_1,8,param_4,param_5,param_6)" ( identifier , number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    param_2 = dupstr(param_2);\n  }" { (expression_statement "param_2 = dupstr(param_2);" (assignment_expression "param_2 = dupstr(param_2)" identifier = (call_expression "dupstr(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "*(int *)(iVar1 + 4) = param_2;" (assignment_expression "*(int *)(iVar1 + 4) = param_2" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(iVar1 + 0x1c) = param_3;" (assignment_expression "*(undefined1 *)(iVar1 + 0x1c) = param_3" (pointer_expression "*(undefined1 *)(iVar1 + 0x1c)" * (cast_expression "(undefined1 *)(iVar1 + 0x1c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1c)" ( (binary_expression "iVar1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })))
(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) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" (primitive_type "int") (function_declarator "ctrl_fontsel(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" (identifier "ctrl_fontsel") (parameter_list "(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined1 param_3" (type_identifier "undefined1") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);\n  if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }\n  *(int *)(iVar1 + 4) = param_2;\n  *(undefined1 *)(iVar1 + 0x1c) = param_3;\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);" (assignment_expression "iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6)" (identifier "iVar1") (= "=") (call_expression "FUN_00030164(param_1,8,param_4,param_5,param_6)" (identifier "FUN_00030164") (argument_list "(param_1,8,param_4,param_5,param_6)" (( "(") (identifier "param_1") (, ",") (number_literal "8") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")")))) (; ";")) (if_statement "if (param_2 != 0) {\n    param_2 = dupstr(param_2);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    param_2 = dupstr(param_2);\n  }" ({ "{") (expression_statement "param_2 = dupstr(param_2);" (assignment_expression "param_2 = dupstr(param_2)" (identifier "param_2") (= "=") (call_expression "dupstr(param_2)" (identifier "dupstr") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (} "}"))) (expression_statement "*(int *)(iVar1 + 4) = param_2;" (assignment_expression "*(int *)(iVar1 + 4) = param_2" (pointer_expression "*(int *)(iVar1 + 4)" (* "*") (cast_expression "(int *)(iVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined1 *)(iVar1 + 0x1c) = param_3;" (assignment_expression "*(undefined1 *)(iVar1 + 0x1c) = param_3" (pointer_expression "*(undefined1 *)(iVar1 + 0x1c)" (* "*") (cast_expression "(undefined1 *)(iVar1 + 0x1c)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1c)" (( "(") (binary_expression "iVar1 + 0x1c" (identifier "iVar1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

type_1 * function_1(type_2 *s,char *var_2,char shortcut,type_3 helpctx,type_4 handler,
                      type_3 context)

{
  type_1 *pcVar1;
  
  pcVar1 = var_1(s,8,helpctx,handler,context);
  if (var_2 != (char *)0x0) {
    var_2 = var_3(var_2);
  }
  (pcVar1->generic).var_2 = var_2;
  (pcVar1->editbox).shortcut = shortcut;
  return pcVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,int param_2,undefined1 param_3,undefined4 param_4,
                undefined4 param_5,undefined4 param_6)

{
  int iVar1;
  
  iVar1 = FUN_00030164(param_1,8,param_4,param_5,param_6);
  if (param_2 != 0) {
    param_2 = dupstr(param_2);
  }
  *(int *)(iVar1 + 4) = param_2;
  *(undefined1 *)(iVar1 + 0x1c) = param_3;
  return iVar1;
}

