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

void palette_set(void *frontend,int n,int r,int g,int b)

{
  int iVar1;
  
  if (n < 0x10) {
    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;
    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;
    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;
    return;
  }
  iVar1 = n + 0xf0;
  if (iVar1 < 0x106) {
    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;
    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;
    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;
    if (iVar1 == 0x102) {
      set_window_background((gui_data *)frontend);
      draw_backing_rect((gui_data *)frontend);
      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));
      return;
    }
  }
  return;
}



void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)

{
  int iVar1;
  
  if (param_2 < 0x10) {
    param_1 = param_1 + param_2 * 0xc;
    *(short *)(param_1 + 0x74) = param_3 * 0x101;
    *(short *)(param_1 + 0x76) = param_4 * 0x101;
    *(short *)(param_1 + 0x78) = param_5 * 0x101;
    return;
  }
  param_2 = param_2 + 0xf0;
  if (param_2 < 0x106) {
    iVar1 = param_1 + param_2 * 0xc;
    *(short *)(iVar1 + 0x74) = param_3 * 0x101;
    *(short *)(iVar1 + 0x76) = param_4 * 0x101;
    *(short *)(iVar1 + 0x78) = param_5 * 0x101;
    if (param_2 == 0x102) {
      set_window_background();
      FUN_00066014(param_1);
      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));
      return;
    }
  }
  return;
}


lui gp,0x5
addiu gp,gp,-0x72a0
addu gp,gp,t9
addiu sp,sp,-0x20
slti t0,a1,0x10
lw v1,0x30(sp)
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
bne t0,zero,0x0006637c
_sw ra,0x1c(sp)
addiu a1,a1,0xf0
slti t0,a1,0x106
bne t0,zero,0x000663c0
_sll t0,a1,0x1
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
sll a0,a1,0x1
lw ra,0x1c(sp)
sll t1,a2,0x8
addu a0,a0,a1
sll t0,a3,0x8
sll a0,a0,0x2
sll a1,v1,0x8
addu a0,s0,a0
lw s0,0x18(sp)
addu a2,a2,t1
addu a3,a3,t0
addu v1,v1,a1
sh a2,0x74(a0)
sh a3,0x76(a0)
sh v1,0x78(a0)
jr ra
_addiu sp,sp,0x20
sll t3,a2,0x8
addu t0,t0,a1
addu a2,a2,t3
sll t0,t0,0x2
sll t2,a3,0x8
addu t0,a0,t0
sll t1,v1,0x8
addu a3,a3,t2
addu v1,v1,t1
sh a2,0x74(t0)
li a2,0x102
sh a3,0x76(t0)
bne a1,a2,0x0006636c
_sh v1,0x78(t0)
lw t9,-0x79dc(gp)
bal 0x00064f6c
_nop
lw gp,0x10(sp)
lw t9,-0x7a78(gp)
addiu t9,t9,0x6014
bal 0x00066014
_or a0,s0,zero
lw gp,0x10(sp)
lw a0,0x4(s0)
lw ra,0x1c(sp)
lw s0,0x18(sp)
lw t9,-0x70c4(gp)
jr t9
_addiu sp,sp,0x20
(translation_unit "void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)\n\n{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)\n\n{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)" identifier (parameter_list "(int param_1,int param_2,short param_3,short param_4,short param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "short param_3" (sized_type_specifier "short" short) identifier) , (parameter_declaration "short param_4" (sized_type_specifier "short" short) identifier) , (parameter_declaration "short param_5" (sized_type_specifier "short" short) identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" if (parenthesized_expression "(param_2 < 0x10)" ( (binary_expression "param_2 < 0x10" identifier < number_literal) )) (compound_statement "{\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" { (expression_statement "param_1 = param_1 + param_2 * 0xc;" (assignment_expression "param_1 = param_1 + param_2 * 0xc" identifier = (binary_expression "param_1 + param_2 * 0xc" identifier + (binary_expression "param_2 * 0xc" identifier * number_literal))) ;) (expression_statement "*(short *)(param_1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(param_1 + 0x74)" * (cast_expression "(short *)(param_1 + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) = (binary_expression "param_3 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(param_1 + 0x76)" * (cast_expression "(short *)(param_1 + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x76)" ( (binary_expression "param_1 + 0x76" identifier + number_literal) )))) = (binary_expression "param_4 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(param_1 + 0x78)" * (cast_expression "(short *)(param_1 + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) = (binary_expression "param_5 * 0x101" identifier * number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "param_2 = param_2 + 0xf0;" (assignment_expression "param_2 = param_2 + 0xf0" identifier = (binary_expression "param_2 + 0xf0" identifier + number_literal)) ;) (if_statement "if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" if (parenthesized_expression "(param_2 < 0x106)" ( (binary_expression "param_2 < 0x106" identifier < number_literal) )) (compound_statement "{\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" { (expression_statement "iVar1 = param_1 + param_2 * 0xc;" (assignment_expression "iVar1 = param_1 + param_2 * 0xc" identifier = (binary_expression "param_1 + param_2 * 0xc" identifier + (binary_expression "param_2 * 0xc" identifier * number_literal))) ;) (expression_statement "*(short *)(iVar1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x74)" * (cast_expression "(short *)(iVar1 + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x74)" ( (binary_expression "iVar1 + 0x74" identifier + number_literal) )))) = (binary_expression "param_3 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(iVar1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x76)" * (cast_expression "(short *)(iVar1 + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x76)" ( (binary_expression "iVar1 + 0x76" identifier + number_literal) )))) = (binary_expression "param_4 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(iVar1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x78)" * (cast_expression "(short *)(iVar1 + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x78)" ( (binary_expression "iVar1 + 0x78" identifier + number_literal) )))) = (binary_expression "param_5 * 0x101" identifier * number_literal)) ;) (if_statement "if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" if (parenthesized_expression "(param_2 == 0x102)" ( (binary_expression "param_2 == 0x102" identifier == number_literal) )) (compound_statement "{\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" { (expression_statement "set_window_background();" (call_expression "set_window_background()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00066014(param_1);" (call_expression "FUN_00066014(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));" (call_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4))" (parenthesized_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)" ( (pointer_expression "*(code *)PTR_gtk_widget_queue_draw_000a7fcc" * (cast_expression "(code *)PTR_gtk_widget_queue_draw_000a7fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 4))" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid palette_set(void *frontend,int n,int r,int g,int b)\n\n{\n  int iVar1;\n  \n  if (n < 0x10) {\n    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;\n    return;\n  }\n  iVar1 = n + 0xf0;\n  if (iVar1 < 0x106) {\n    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;\n    if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void palette_set(void *frontend,int n,int r,int g,int b)\n\n{\n  int iVar1;\n  \n  if (n < 0x10) {\n    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;\n    return;\n  }\n  iVar1 = n + 0xf0;\n  if (iVar1 < 0x106) {\n    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;\n    if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "palette_set(void *frontend,int n,int r,int g,int b)" identifier (parameter_list "(void *frontend,int n,int r,int g,int b)" ( (parameter_declaration "void *frontend" primitive_type (pointer_declarator "*frontend" * identifier)) , (parameter_declaration "int n" primitive_type identifier) , (parameter_declaration "int r" primitive_type identifier) , (parameter_declaration "int g" primitive_type identifier) , (parameter_declaration "int b" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (n < 0x10) {\n    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;\n    return;\n  }\n  iVar1 = n + 0xf0;\n  if (iVar1 < 0x106) {\n    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;\n    if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (n < 0x10) {\n    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;\n    return;\n  }" if (parenthesized_expression "(n < 0x10)" ( (binary_expression "n < 0x10" identifier < number_literal) )) (compound_statement "{\n    *(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;\n    return;\n  }" { (expression_statement "*(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101;" (assignment_expression "*(short *)((int)frontend + n * 0xc + 0x74) = (short)r * 0x101" (pointer_expression "*(short *)((int)frontend + n * 0xc + 0x74)" * (cast_expression "(short *)((int)frontend + n * 0xc + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + n * 0xc + 0x74)" ( (binary_expression "(int)frontend + n * 0xc + 0x74" (binary_expression "(int)frontend + n * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "n * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)r * 0x101" (cast_expression "(short)r" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (expression_statement "*(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101;" (assignment_expression "*(short *)((int)frontend + n * 0xc + 0x76) = (short)g * 0x101" (pointer_expression "*(short *)((int)frontend + n * 0xc + 0x76)" * (cast_expression "(short *)((int)frontend + n * 0xc + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + n * 0xc + 0x76)" ( (binary_expression "(int)frontend + n * 0xc + 0x76" (binary_expression "(int)frontend + n * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "n * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)g * 0x101" (cast_expression "(short)g" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (expression_statement "*(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101;" (assignment_expression "*(short *)((int)frontend + n * 0xc + 0x78) = (short)b * 0x101" (pointer_expression "*(short *)((int)frontend + n * 0xc + 0x78)" * (cast_expression "(short *)((int)frontend + n * 0xc + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + n * 0xc + 0x78)" ( (binary_expression "(int)frontend + n * 0xc + 0x78" (binary_expression "(int)frontend + n * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "n * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)b * 0x101" (cast_expression "(short)b" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "iVar1 = n + 0xf0;" (assignment_expression "iVar1 = n + 0xf0" identifier = (binary_expression "n + 0xf0" identifier + number_literal)) ;) (if_statement "if (iVar1 < 0x106) {\n    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;\n    if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }\n  }" if (parenthesized_expression "(iVar1 < 0x106)" ( (binary_expression "iVar1 < 0x106" identifier < number_literal) )) (compound_statement "{\n    *(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;\n    *(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;\n    if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }\n  }" { (expression_statement "*(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101;" (assignment_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x74) = (short)r * 0x101" (pointer_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x74)" * (cast_expression "(short *)((int)frontend + iVar1 * 0xc + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + iVar1 * 0xc + 0x74)" ( (binary_expression "(int)frontend + iVar1 * 0xc + 0x74" (binary_expression "(int)frontend + iVar1 * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)r * 0x101" (cast_expression "(short)r" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (expression_statement "*(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101;" (assignment_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x76) = (short)g * 0x101" (pointer_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x76)" * (cast_expression "(short *)((int)frontend + iVar1 * 0xc + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + iVar1 * 0xc + 0x76)" ( (binary_expression "(int)frontend + iVar1 * 0xc + 0x76" (binary_expression "(int)frontend + iVar1 * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)g * 0x101" (cast_expression "(short)g" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (expression_statement "*(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101;" (assignment_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x78) = (short)b * 0x101" (pointer_expression "*(short *)((int)frontend + iVar1 * 0xc + 0x78)" * (cast_expression "(short *)((int)frontend + iVar1 * 0xc + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + iVar1 * 0xc + 0x78)" ( (binary_expression "(int)frontend + iVar1 * 0xc + 0x78" (binary_expression "(int)frontend + iVar1 * 0xc" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 0xc" identifier * number_literal)) + number_literal) )))) = (binary_expression "(short)b * 0x101" (cast_expression "(short)b" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) * number_literal)) ;) (if_statement "if (iVar1 == 0x102) {\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }" if (parenthesized_expression "(iVar1 == 0x102)" ( (binary_expression "iVar1 == 0x102" identifier == number_literal) )) (compound_statement "{\n      set_window_background((gui_data *)frontend);\n      draw_backing_rect((gui_data *)frontend);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));\n      return;\n    }" { (expression_statement "set_window_background((gui_data *)frontend);" (call_expression "set_window_background((gui_data *)frontend)" identifier (argument_list "((gui_data *)frontend)" ( (cast_expression "(gui_data *)frontend" ( (type_descriptor "gui_data *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "draw_backing_rect((gui_data *)frontend);" (call_expression "draw_backing_rect((gui_data *)frontend)" identifier (argument_list "((gui_data *)frontend)" ( (cast_expression "(gui_data *)frontend" ( (type_descriptor "gui_data *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4));" (call_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)((int)frontend + 4))" (parenthesized_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)" ( (pointer_expression "*(code *)PTR_gtk_widget_queue_draw_000a7fcc" * (cast_expression "(code *)PTR_gtk_widget_queue_draw_000a7fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)((int)frontend + 4))" ( (pointer_expression "*(undefined4 *)((int)frontend + 4)" * (cast_expression "(undefined4 *)((int)frontend + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)frontend + 4)" ( (binary_expression "(int)frontend + 4" (cast_expression "(int)frontend" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)\n\n{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)\n\n{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)" identifier (parameter_list "(int param_1,int param_2,short param_3,short param_4,short param_5)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "short param_3" (sized_type_specifier "short" short) identifier) , (parameter_declaration "short param_4" (sized_type_specifier "short" short) identifier) , (parameter_declaration "short param_5" (sized_type_specifier "short" short) identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" if (parenthesized_expression "(param_2 < 0x10)" ( (binary_expression "param_2 < 0x10" identifier < number_literal) )) (compound_statement "{\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" { (expression_statement "param_1 = param_1 + param_2 * 0xc;" (assignment_expression "param_1 = param_1 + param_2 * 0xc" identifier = (binary_expression "param_1 + param_2 * 0xc" identifier + (binary_expression "param_2 * 0xc" identifier * number_literal))) ;) (expression_statement "*(short *)(param_1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(param_1 + 0x74)" * (cast_expression "(short *)(param_1 + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) = (binary_expression "param_3 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(param_1 + 0x76)" * (cast_expression "(short *)(param_1 + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x76)" ( (binary_expression "param_1 + 0x76" identifier + number_literal) )))) = (binary_expression "param_4 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(param_1 + 0x78)" * (cast_expression "(short *)(param_1 + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) = (binary_expression "param_5 * 0x101" identifier * number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "param_2 = param_2 + 0xf0;" (assignment_expression "param_2 = param_2 + 0xf0" identifier = (binary_expression "param_2 + 0xf0" identifier + number_literal)) ;) (if_statement "if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" if (parenthesized_expression "(param_2 < 0x106)" ( (binary_expression "param_2 < 0x106" identifier < number_literal) )) (compound_statement "{\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" { (expression_statement "iVar1 = param_1 + param_2 * 0xc;" (assignment_expression "iVar1 = param_1 + param_2 * 0xc" identifier = (binary_expression "param_1 + param_2 * 0xc" identifier + (binary_expression "param_2 * 0xc" identifier * number_literal))) ;) (expression_statement "*(short *)(iVar1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x74)" * (cast_expression "(short *)(iVar1 + 0x74)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x74)" ( (binary_expression "iVar1 + 0x74" identifier + number_literal) )))) = (binary_expression "param_3 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(iVar1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x76)" * (cast_expression "(short *)(iVar1 + 0x76)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x76)" ( (binary_expression "iVar1 + 0x76" identifier + number_literal) )))) = (binary_expression "param_4 * 0x101" identifier * number_literal)) ;) (expression_statement "*(short *)(iVar1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x78)" * (cast_expression "(short *)(iVar1 + 0x78)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x78)" ( (binary_expression "iVar1 + 0x78" identifier + number_literal) )))) = (binary_expression "param_5 * 0x101" identifier * number_literal)) ;) (if_statement "if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" if (parenthesized_expression "(param_2 == 0x102)" ( (binary_expression "param_2 == 0x102" identifier == number_literal) )) (compound_statement "{\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" { (expression_statement "set_window_background();" (call_expression "set_window_background()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00066014(param_1);" (call_expression "FUN_00066014(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));" (call_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4))" (parenthesized_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)" ( (pointer_expression "*(code *)PTR_gtk_widget_queue_draw_000a7fcc" * (cast_expression "(code *)PTR_gtk_widget_queue_draw_000a7fcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 4))" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier short) IDENT) , (parameter_declaration (sized_type_specifier short) IDENT) , (parameter_declaration (sized_type_specifier short) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (return_statement return ;) })) })) (return_statement return ;) })))
(function_definition "void palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)\n\n{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "palette_set(int param_1,int param_2,short param_3,short param_4,short param_5)" (identifier "palette_set") (parameter_list "(int param_1,int param_2,short param_3,short param_4,short param_5)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "short param_3" (sized_type_specifier "short" (short "short")) (identifier "param_3")) (, ",") (parameter_declaration "short param_4" (sized_type_specifier "short" (short "short")) (identifier "param_4")) (, ",") (parameter_declaration "short param_5" (sized_type_specifier "short" (short "short")) (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }\n  param_2 = param_2 + 0xf0;\n  if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (param_2 < 0x10) {\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 < 0x10)" (( "(") (binary_expression "param_2 < 0x10" (identifier "param_2") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n    param_1 = param_1 + param_2 * 0xc;\n    *(short *)(param_1 + 0x74) = param_3 * 0x101;\n    *(short *)(param_1 + 0x76) = param_4 * 0x101;\n    *(short *)(param_1 + 0x78) = param_5 * 0x101;\n    return;\n  }" ({ "{") (expression_statement "param_1 = param_1 + param_2 * 0xc;" (assignment_expression "param_1 = param_1 + param_2 * 0xc" (identifier "param_1") (= "=") (binary_expression "param_1 + param_2 * 0xc" (identifier "param_1") (+ "+") (binary_expression "param_2 * 0xc" (identifier "param_2") (* "*") (number_literal "0xc")))) (; ";")) (expression_statement "*(short *)(param_1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(param_1 + 0x74)" (* "*") (cast_expression "(short *)(param_1 + 0x74)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")")))) (= "=") (binary_expression "param_3 * 0x101" (identifier "param_3") (* "*") (number_literal "0x101"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(param_1 + 0x76)" (* "*") (cast_expression "(short *)(param_1 + 0x76)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x76)" (( "(") (binary_expression "param_1 + 0x76" (identifier "param_1") (+ "+") (number_literal "0x76")) () ")")))) (= "=") (binary_expression "param_4 * 0x101" (identifier "param_4") (* "*") (number_literal "0x101"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(param_1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(param_1 + 0x78)" (* "*") (cast_expression "(short *)(param_1 + 0x78)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")")))) (= "=") (binary_expression "param_5 * 0x101" (identifier "param_5") (* "*") (number_literal "0x101"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 + 0xf0;" (assignment_expression "param_2 = param_2 + 0xf0" (identifier "param_2") (= "=") (binary_expression "param_2 + 0xf0" (identifier "param_2") (+ "+") (number_literal "0xf0"))) (; ";")) (if_statement "if (param_2 < 0x106) {\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < 0x106)" (( "(") (binary_expression "param_2 < 0x106" (identifier "param_2") (< "<") (number_literal "0x106")) () ")")) (compound_statement "{\n    iVar1 = param_1 + param_2 * 0xc;\n    *(short *)(iVar1 + 0x74) = param_3 * 0x101;\n    *(short *)(iVar1 + 0x76) = param_4 * 0x101;\n    *(short *)(iVar1 + 0x78) = param_5 * 0x101;\n    if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }\n  }" ({ "{") (expression_statement "iVar1 = param_1 + param_2 * 0xc;" (assignment_expression "iVar1 = param_1 + param_2 * 0xc" (identifier "iVar1") (= "=") (binary_expression "param_1 + param_2 * 0xc" (identifier "param_1") (+ "+") (binary_expression "param_2 * 0xc" (identifier "param_2") (* "*") (number_literal "0xc")))) (; ";")) (expression_statement "*(short *)(iVar1 + 0x74) = param_3 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x74) = param_3 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x74)" (* "*") (cast_expression "(short *)(iVar1 + 0x74)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x74)" (( "(") (binary_expression "iVar1 + 0x74" (identifier "iVar1") (+ "+") (number_literal "0x74")) () ")")))) (= "=") (binary_expression "param_3 * 0x101" (identifier "param_3") (* "*") (number_literal "0x101"))) (; ";")) (expression_statement "*(short *)(iVar1 + 0x76) = param_4 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x76) = param_4 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x76)" (* "*") (cast_expression "(short *)(iVar1 + 0x76)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x76)" (( "(") (binary_expression "iVar1 + 0x76" (identifier "iVar1") (+ "+") (number_literal "0x76")) () ")")))) (= "=") (binary_expression "param_4 * 0x101" (identifier "param_4") (* "*") (number_literal "0x101"))) (; ";")) (expression_statement "*(short *)(iVar1 + 0x78) = param_5 * 0x101;" (assignment_expression "*(short *)(iVar1 + 0x78) = param_5 * 0x101" (pointer_expression "*(short *)(iVar1 + 0x78)" (* "*") (cast_expression "(short *)(iVar1 + 0x78)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x78)" (( "(") (binary_expression "iVar1 + 0x78" (identifier "iVar1") (+ "+") (number_literal "0x78")) () ")")))) (= "=") (binary_expression "param_5 * 0x101" (identifier "param_5") (* "*") (number_literal "0x101"))) (; ";")) (if_statement "if (param_2 == 0x102) {\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" (if "if") (parenthesized_expression "(param_2 == 0x102)" (( "(") (binary_expression "param_2 == 0x102" (identifier "param_2") (== "==") (number_literal "0x102")) () ")")) (compound_statement "{\n      set_window_background();\n      FUN_00066014(param_1);\n      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));\n      return;\n    }" ({ "{") (expression_statement "set_window_background();" (call_expression "set_window_background()" (identifier "set_window_background") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00066014(param_1);" (call_expression "FUN_00066014(param_1)" (identifier "FUN_00066014") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));" (call_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4))" (parenthesized_expression "(*(code *)PTR_gtk_widget_queue_draw_000a7fcc)" (( "(") (pointer_expression "*(code *)PTR_gtk_widget_queue_draw_000a7fcc" (* "*") (cast_expression "(code *)PTR_gtk_widget_queue_draw_000a7fcc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_gtk_widget_queue_draw_000a7fcc"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 4))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(void *frontend,int var_1,int r,int g,int b)

{
  int var_2;
  
  if (var_1 < 0x10) {
    *(short *)((int)frontend + var_1 * 0xc + 0x74) = (short)r * 0x101;
    *(short *)((int)frontend + var_1 * 0xc + 0x76) = (short)g * 0x101;
    *(short *)((int)frontend + var_1 * 0xc + 0x78) = (short)b * 0x101;
    return;
  }
  var_2 = var_1 + 0xf0;
  if (var_2 < 0x106) {
    *(short *)((int)frontend + var_2 * 0xc + 0x74) = (short)r * 0x101;
    *(short *)((int)frontend + var_2 * 0xc + 0x76) = (short)g * 0x101;
    *(short *)((int)frontend + var_2 * 0xc + 0x78) = (short)b * 0x101;
    if (var_2 == 0x102) {
      var_3((type_1 *)frontend);
      var_4((type_1 *)frontend);
      (*(type_2 *)PTR_gtk_widget_queue_draw_000a7fcc)(*(type_3 *)((int)frontend + 4));
      return;
    }
  }
  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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (return_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: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (return_statement))))) (return_statement))))

void MASKED(int param_1,int param_2,short param_3,short param_4,short param_5)

{
  int iVar1;
  
  if (param_2 < 0x10) {
    param_1 = param_1 + param_2 * 0xc;
    *(short *)(param_1 + 0x74) = param_3 * 0x101;
    *(short *)(param_1 + 0x76) = param_4 * 0x101;
    *(short *)(param_1 + 0x78) = param_5 * 0x101;
    return;
  }
  param_2 = param_2 + 0xf0;
  if (param_2 < 0x106) {
    iVar1 = param_1 + param_2 * 0xc;
    *(short *)(iVar1 + 0x74) = param_3 * 0x101;
    *(short *)(iVar1 + 0x76) = param_4 * 0x101;
    *(short *)(iVar1 + 0x78) = param_5 * 0x101;
    if (param_2 == 0x102) {
      set_window_background();
      FUN_00066014(param_1);
      (*(code *)PTR_gtk_widget_queue_draw_000a7fcc)(*(undefined4 *)(param_1 + 4));
      return;
    }
  }
  return;
}

