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

int string_width(char *text)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  int iVar4;
  int in_GS_OFFSET;
  PangoRectangle logrect;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = gtk_label_new(text);
  uVar3 = gtk_label_get_type();
  uVar3 = g_type_check_instance_cast(uVar2,uVar3);
  uVar3 = gtk_label_get_layout(uVar3);
  pango_layout_get_extents(uVar3,0,&logrect);
  iVar4 = logrect.width + 0x3ff;
  if (-1 < logrect.width) {
    iVar4 = logrect.width;
  }
  uVar3 = g_type_check_instance_cast(uVar2,0x50);
  g_object_ref_sink(uVar3);
  g_object_unref(uVar2);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4 >> 10;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_00066b00(undefined4 param_1)

{
  undefined4 uVar1;
  undefined4 uVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined1 local_20 [8];
  int local_18;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = gtk_label_new(param_1);
  uVar2 = gtk_label_get_type();
  uVar2 = g_type_check_instance_cast(uVar1,uVar2);
  uVar2 = gtk_label_get_layout(uVar2);
  pango_layout_get_extents(uVar2,0,local_20);
  iVar3 = local_18 + 0x3ff;
  if (-1 < local_18) {
    iVar3 = local_18;
  }
  uVar2 = g_type_check_instance_cast(uVar1,0x50);
  g_object_ref_sink(uVar2);
  g_object_unref(uVar1);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3 >> 10;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00077880();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x5ec9c
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
PUSH dword ptr [ESP + 0x3c]
CALL 0x00019cc0
MOV EDI,EAX
CALL 0x000194b0
POP EDX
POP ECX
PUSH EAX
PUSH EDI
CALL 0x00019590
MOV dword ptr [ESP],EAX
CALL 0x00019b40
ADD ESP,0xc
LEA EDX,[ESP + 0x10]
PUSH EDX
PUSH 0x0
PUSH EAX
CALL 0x00019700
MOV EAX,dword ptr [ESP + 0x24]
POP EDX
POP ECX
PUSH 0x50
PUSH EDI
TEST EAX,EAX
LEA ESI,[EAX + 0x3ff]
CMOVNS ESI,EAX
CALL 0x00019590
SAR ESI,0xa
MOV dword ptr [ESP],EAX
CALL 0x0001ac60
MOV dword ptr [ESP],EDI
CALL 0x0001a850
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x00066b93
ADD ESP,0x20
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
CALL 0x00077880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00066b00(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}\n\n" comment (function_definition "int FUN_00066b00(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}" primitive_type (function_declarator "FUN_00066b00(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_20 [8];" type_identifier (array_declarator "local_20 [8]" identifier [ number_literal ]) ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = gtk_label_new(param_1);" (assignment_expression "uVar1 = gtk_label_new(param_1)" identifier = (call_expression "gtk_label_new(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = gtk_label_get_type();" (assignment_expression "uVar2 = gtk_label_get_type()" identifier = (call_expression "gtk_label_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(uVar1,uVar2)" identifier (argument_list "(uVar1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = gtk_label_get_layout(uVar2);" (assignment_expression "uVar2 = gtk_label_get_layout(uVar2)" identifier = (call_expression "gtk_label_get_layout(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "pango_layout_get_extents(uVar2,0,local_20);" (call_expression "pango_layout_get_extents(uVar2,0,local_20)" identifier (argument_list "(uVar2,0,local_20)" ( identifier , number_literal , identifier ))) ;) (expression_statement "iVar3 = local_18 + 0x3ff;" (assignment_expression "iVar3 = local_18 + 0x3ff" identifier = (binary_expression "local_18 + 0x3ff" identifier + number_literal)) ;) (if_statement "if (-1 < local_18) {\n    iVar3 = local_18;\n  }" if (parenthesized_expression "(-1 < local_18)" ( (binary_expression "-1 < local_18" number_literal < identifier) )) (compound_statement "{\n    iVar3 = local_18;\n  }" { (expression_statement "iVar3 = local_18;" (assignment_expression "iVar3 = local_18" identifier = identifier) ;) })) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,0x50)" identifier = (call_expression "g_type_check_instance_cast(uVar1,0x50)" identifier (argument_list "(uVar1,0x50)" ( identifier , number_literal )))) ;) (expression_statement "g_object_ref_sink(uVar2);" (call_expression "g_object_ref_sink(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "g_object_unref(uVar1);" (call_expression "g_object_unref(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3 >> 10;\n  }" { (return_statement "return iVar3 >> 10;" return (binary_expression "iVar3 >> 10" identifier >> number_literal) ;) })) comment (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint string_width(char *text)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  PangoRectangle logrect;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = gtk_label_new(text);\n  uVar3 = gtk_label_get_type();\n  uVar3 = g_type_check_instance_cast(uVar2,uVar3);\n  uVar3 = gtk_label_get_layout(uVar3);\n  pango_layout_get_extents(uVar3,0,&logrect);\n  iVar4 = logrect.width + 0x3ff;\n  if (-1 < logrect.width) {\n    iVar4 = logrect.width;\n  }\n  uVar3 = g_type_check_instance_cast(uVar2,0x50);\n  g_object_ref_sink(uVar3);\n  g_object_unref(uVar2);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int string_width(char *text)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  PangoRectangle logrect;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = gtk_label_new(text);\n  uVar3 = gtk_label_get_type();\n  uVar3 = g_type_check_instance_cast(uVar2,uVar3);\n  uVar3 = gtk_label_get_layout(uVar3);\n  pango_layout_get_extents(uVar3,0,&logrect);\n  iVar4 = logrect.width + 0x3ff;\n  if (-1 < logrect.width) {\n    iVar4 = logrect.width;\n  }\n  uVar3 = g_type_check_instance_cast(uVar2,0x50);\n  g_object_ref_sink(uVar3);\n  g_object_unref(uVar2);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "string_width(char *text)" identifier (parameter_list "(char *text)" ( (parameter_declaration "char *text" primitive_type (pointer_declarator "*text" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  PangoRectangle logrect;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = gtk_label_new(text);\n  uVar3 = gtk_label_get_type();\n  uVar3 = g_type_check_instance_cast(uVar2,uVar3);\n  uVar3 = gtk_label_get_layout(uVar3);\n  pango_layout_get_extents(uVar3,0,&logrect);\n  iVar4 = logrect.width + 0x3ff;\n  if (-1 < logrect.width) {\n    iVar4 = logrect.width;\n  }\n  uVar3 = g_type_check_instance_cast(uVar2,0x50);\n  g_object_ref_sink(uVar3);\n  g_object_unref(uVar2);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4 >> 10;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "PangoRectangle logrect;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = gtk_label_new(text);" (assignment_expression "uVar2 = gtk_label_new(text)" identifier = (call_expression "gtk_label_new(text)" identifier (argument_list "(text)" ( identifier )))) ;) (expression_statement "uVar3 = gtk_label_get_type();" (assignment_expression "uVar3 = gtk_label_get_type()" identifier = (call_expression "gtk_label_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = g_type_check_instance_cast(uVar2,uVar3);" (assignment_expression "uVar3 = g_type_check_instance_cast(uVar2,uVar3)" identifier = (call_expression "g_type_check_instance_cast(uVar2,uVar3)" identifier (argument_list "(uVar2,uVar3)" ( identifier , identifier )))) ;) (expression_statement "uVar3 = gtk_label_get_layout(uVar3);" (assignment_expression "uVar3 = gtk_label_get_layout(uVar3)" identifier = (call_expression "gtk_label_get_layout(uVar3)" identifier (argument_list "(uVar3)" ( identifier )))) ;) (expression_statement "pango_layout_get_extents(uVar3,0,&logrect);" (call_expression "pango_layout_get_extents(uVar3,0,&logrect)" identifier (argument_list "(uVar3,0,&logrect)" ( identifier , number_literal , (pointer_expression "&logrect" & identifier) ))) ;) (expression_statement "iVar4 = logrect.width + 0x3ff;" (assignment_expression "iVar4 = logrect.width + 0x3ff" identifier = (binary_expression "logrect.width + 0x3ff" (field_expression "logrect.width" identifier . field_identifier) + number_literal)) ;) (if_statement "if (-1 < logrect.width) {\n    iVar4 = logrect.width;\n  }" if (parenthesized_expression "(-1 < logrect.width)" ( (binary_expression "-1 < logrect.width" number_literal < (field_expression "logrect.width" identifier . field_identifier)) )) (compound_statement "{\n    iVar4 = logrect.width;\n  }" { (expression_statement "iVar4 = logrect.width;" (assignment_expression "iVar4 = logrect.width" identifier = (field_expression "logrect.width" identifier . field_identifier)) ;) })) (expression_statement "uVar3 = g_type_check_instance_cast(uVar2,0x50);" (assignment_expression "uVar3 = g_type_check_instance_cast(uVar2,0x50)" identifier = (call_expression "g_type_check_instance_cast(uVar2,0x50)" identifier (argument_list "(uVar2,0x50)" ( identifier , number_literal )))) ;) (expression_statement "g_object_ref_sink(uVar3);" (call_expression "g_object_ref_sink(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "g_object_unref(uVar2);" (call_expression "g_object_unref(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4 >> 10;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar4 >> 10;\n  }" { (return_statement "return iVar4 >> 10;" return (binary_expression "iVar4 >> 10" identifier >> number_literal) ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00066b00(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    \n  FUN_00077880();\n}\n\n" (function_definition "int FUN_00066b00(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    \n  FUN_00077880();\n}" primitive_type (function_declarator "FUN_00066b00(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    \n  FUN_00077880();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_20 [8];" type_identifier (array_declarator "local_20 [8]" identifier [ number_literal ]) ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = gtk_label_new(param_1);" (assignment_expression "uVar1 = gtk_label_new(param_1)" identifier = (call_expression "gtk_label_new(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = gtk_label_get_type();" (assignment_expression "uVar2 = gtk_label_get_type()" identifier = (call_expression "gtk_label_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(uVar1,uVar2)" identifier (argument_list "(uVar1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = gtk_label_get_layout(uVar2);" (assignment_expression "uVar2 = gtk_label_get_layout(uVar2)" identifier = (call_expression "gtk_label_get_layout(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "pango_layout_get_extents(uVar2,0,local_20);" (call_expression "pango_layout_get_extents(uVar2,0,local_20)" identifier (argument_list "(uVar2,0,local_20)" ( identifier , number_literal , identifier ))) ;) (expression_statement "iVar3 = local_18 + 0x3ff;" (assignment_expression "iVar3 = local_18 + 0x3ff" identifier = (binary_expression "local_18 + 0x3ff" identifier + number_literal)) ;) (if_statement "if (-1 < local_18) {\n    iVar3 = local_18;\n  }" if (parenthesized_expression "(-1 < local_18)" ( (binary_expression "-1 < local_18" number_literal < identifier) )) (compound_statement "{\n    iVar3 = local_18;\n  }" { (expression_statement "iVar3 = local_18;" (assignment_expression "iVar3 = local_18" identifier = identifier) ;) })) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,0x50)" identifier = (call_expression "g_type_check_instance_cast(uVar1,0x50)" identifier (argument_list "(uVar1,0x50)" ( identifier , number_literal )))) ;) (expression_statement "g_object_ref_sink(uVar2);" (call_expression "g_object_ref_sink(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "g_object_unref(uVar1);" (call_expression "g_object_unref(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3 >> 10;\n  }" { (return_statement "return iVar3 >> 10;" return (binary_expression "iVar3 >> 10" identifier >> number_literal) ;) })) (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return (binary_expression IDENT >> LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00066b00(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    \n  FUN_00077880();\n}" (primitive_type "int") (function_declarator "FUN_00066b00(undefined4 param_1)" (identifier "FUN_00066b00") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined1 local_20 [8];\n  int local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = gtk_label_new(param_1);\n  uVar2 = gtk_label_get_type();\n  uVar2 = g_type_check_instance_cast(uVar1,uVar2);\n  uVar2 = gtk_label_get_layout(uVar2);\n  pango_layout_get_extents(uVar2,0,local_20);\n  iVar3 = local_18 + 0x3ff;\n  if (-1 < local_18) {\n    iVar3 = local_18;\n  }\n  uVar2 = g_type_check_instance_cast(uVar1,0x50);\n  g_object_ref_sink(uVar2);\n  g_object_unref(uVar1);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }\n                    \n  FUN_00077880();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_20 [8];" (type_identifier "undefined1") (array_declarator "local_20 [8]" (identifier "local_20") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "int local_18;" (primitive_type "int") (identifier "local_18") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar1 = gtk_label_new(param_1);" (assignment_expression "uVar1 = gtk_label_new(param_1)" (identifier "uVar1") (= "=") (call_expression "gtk_label_new(param_1)" (identifier "gtk_label_new") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar2 = gtk_label_get_type();" (assignment_expression "uVar2 = gtk_label_get_type()" (identifier "uVar2") (= "=") (call_expression "gtk_label_get_type()" (identifier "gtk_label_get_type") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,uVar2)" (identifier "uVar2") (= "=") (call_expression "g_type_check_instance_cast(uVar1,uVar2)" (identifier "g_type_check_instance_cast") (argument_list "(uVar1,uVar2)" (( "(") (identifier "uVar1") (, ",") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "uVar2 = gtk_label_get_layout(uVar2);" (assignment_expression "uVar2 = gtk_label_get_layout(uVar2)" (identifier "uVar2") (= "=") (call_expression "gtk_label_get_layout(uVar2)" (identifier "gtk_label_get_layout") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "pango_layout_get_extents(uVar2,0,local_20);" (call_expression "pango_layout_get_extents(uVar2,0,local_20)" (identifier "pango_layout_get_extents") (argument_list "(uVar2,0,local_20)" (( "(") (identifier "uVar2") (, ",") (number_literal "0") (, ",") (identifier "local_20") () ")"))) (; ";")) (expression_statement "iVar3 = local_18 + 0x3ff;" (assignment_expression "iVar3 = local_18 + 0x3ff" (identifier "iVar3") (= "=") (binary_expression "local_18 + 0x3ff" (identifier "local_18") (+ "+") (number_literal "0x3ff"))) (; ";")) (if_statement "if (-1 < local_18) {\n    iVar3 = local_18;\n  }" (if "if") (parenthesized_expression "(-1 < local_18)" (( "(") (binary_expression "-1 < local_18" (number_literal "-1") (< "<") (identifier "local_18")) () ")")) (compound_statement "{\n    iVar3 = local_18;\n  }" ({ "{") (expression_statement "iVar3 = local_18;" (assignment_expression "iVar3 = local_18" (identifier "iVar3") (= "=") (identifier "local_18")) (; ";")) (} "}"))) (expression_statement "uVar2 = g_type_check_instance_cast(uVar1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(uVar1,0x50)" (identifier "uVar2") (= "=") (call_expression "g_type_check_instance_cast(uVar1,0x50)" (identifier "g_type_check_instance_cast") (argument_list "(uVar1,0x50)" (( "(") (identifier "uVar1") (, ",") (number_literal "0x50") () ")")))) (; ";")) (expression_statement "g_object_ref_sink(uVar2);" (call_expression "g_object_ref_sink(uVar2)" (identifier "g_object_ref_sink") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "g_object_unref(uVar1);" (call_expression "g_object_unref(uVar1)" (identifier "g_object_unref") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3 >> 10;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar3 >> 10;\n  }" ({ "{") (return_statement "return iVar3 >> 10;" (return "return") (binary_expression "iVar3 >> 10" (identifier "iVar3") (>> ">>") (number_literal "10")) (; ";")) (} "}"))) (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" (identifier "FUN_00077880") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(char *text)

{
  int var_9;
  type_1 uVar2;
  type_1 uVar3;
  int var_10;
  int var_1;
  type_2 logrect;
  
  var_9 = *(int *)(var_1 + 0x14);
  uVar2 = var_2(text);
  uVar3 = var_3();
  uVar3 = var_4(uVar2,uVar3);
  uVar3 = var_5(uVar3);
  var_6(uVar3,0,&logrect);
  var_10 = logrect.width + 0x3ff;
  if (-1 < logrect.width) {
    var_10 = logrect.width;
  }
  uVar3 = var_4(uVar2,0x50);
  var_7(uVar3);
  var_8(uVar2);
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return var_10 >> 10;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (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: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (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 (return_statement (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

int MASKED(undefined4 param_1)

{
  undefined4 uVar1;
  undefined4 uVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined1 local_20 [8];
  int local_18;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = gtk_label_new(param_1);
  uVar2 = gtk_label_get_type();
  uVar2 = g_type_check_instance_cast(uVar1,uVar2);
  uVar2 = gtk_label_get_layout(uVar2);
  pango_layout_get_extents(uVar2,0,local_20);
  iVar3 = local_18 + 0x3ff;
  if (-1 < local_18) {
    iVar3 = local_18;
  }
  uVar2 = g_type_check_instance_cast(uVar1,0x50);
  g_object_ref_sink(uVar2);
  g_object_unref(uVar1);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3 >> 10;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00077880();
}

