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

void bc_out_long(long val,int size,int space,_func_void_int *out_char)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  uint *puVar4;
  undefined1 *puVar5;
  uint *puVar6;
  uint *puVar7;
  int in_GS_OFFSET;
  bool bVar8;
  undefined1 auStack_4b [3];
  char digits [40];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (space != 0) {
    (*out_char)(0x20);
  }
  puVar7 = (uint *)digits;
  __snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val);
  puVar6 = puVar7;
  do {
    puVar4 = puVar6;
    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;
    uVar3 = uVar2 & 0x80808080;
    puVar6 = puVar4 + 1;
  } while (uVar3 == 0);
  bVar8 = (uVar2 & 0x8080) == 0;
  if (bVar8) {
    uVar3 = uVar3 >> 0x10;
  }
  if (bVar8) {
    puVar6 = (uint *)((int)puVar4 + 6);
  }
  puVar5 = (undefined1 *)
           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7));
  if ((int)puVar5 < size) {
    do {
      (*out_char)(0x30);
      size = size + -1;
    } while (puVar5 != (undefined1 *)size);
  }
  if (puVar5 != (undefined1 *)0x0) {
    puVar6 = (uint *)(puVar5 + (int)puVar7);
    do {
      uVar3 = *puVar7;
      puVar7 = (uint *)((int)puVar7 + 1);
      (*out_char)((int)(char)uVar3);
    } while (puVar6 != puVar7);
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



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

void FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)

{
  uint uVar1;
  uint uVar2;
  uint *puVar3;
  undefined1 *puVar4;
  uint *puVar5;
  uint *puVar6;
  int in_GS_OFFSET;
  bool bVar7;
  undefined1 auStack_4b [43];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x176bb;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 != 0) {
    (*param_4)(0x20);
  }
  puVar6 = (uint *)(auStack_4b + 3);
  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);
  puVar5 = puVar6;
  do {
    puVar3 = puVar5;
    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;
    uVar2 = uVar1 & 0x80808080;
    puVar5 = puVar3 + 1;
  } while (uVar2 == 0);
  bVar7 = (uVar1 & 0x8080) == 0;
  if (bVar7) {
    uVar2 = uVar2 >> 0x10;
  }
  if (bVar7) {
    puVar5 = (uint *)((int)puVar3 + 6);
  }
  puVar4 = (undefined1 *)
           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));
  if ((int)puVar4 < (int)param_2) {
    do {
      (*param_4)(0x30);
      param_2 = param_2 + -1;
    } while (puVar4 != param_2);
  }
  if (puVar4 != (undefined1 *)0x0) {
    puVar5 = (uint *)(puVar4 + (int)puVar6);
    do {
      uVar2 = *puVar6;
      puVar6 = (uint *)((int)puVar6 + 1);
      (*param_4)((char)uVar2);
    } while (puVar5 != puVar6);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00018840();
  }
  return;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00011640
ADD EBX,0x682d
SUB ESP,0x3c
MOV ESI,dword ptr [EBP + 0x14]
MOV EAX,GS:[0x14]
MOV dword ptr [EBP + -0x1c],EAX
XOR EAX,EAX
MOV EAX,dword ptr [EBP + 0x10]
TEST EAX,EAX
JZ 0x000176e3
SUB ESP,0xc
PUSH 0x20
CALL ESI
ADD ESP,0x10
SUB ESP,0x8
LEA EAX,[EBX + 0xffffbb79]
LEA EDI,[EBP + -0x44]
PUSH dword ptr [EBP + 0x8]
PUSH EAX
PUSH 0x28
PUSH 0x1
PUSH 0x28
PUSH EDI
CALL 0x00011040
MOV EBX,EDI
MOV EDX,dword ptr [EBX]
ADD EBX,0x4
LEA EAX,[EDX + 0xfefefeff]
NOT EDX
AND EAX,EDX
AND EAX,0x80808080
JZ 0x00017701
MOV EDX,EAX
SHR EDX,0x10
TEST EAX,0x8080
CMOVZ EAX,EDX
LEA EDX,[EBX + 0x2]
CMOVZ EBX,EDX
MOV ECX,EAX
ADD CL,AL
SBB EBX,0x3
ADD ESP,0x20
SUB EBX,EDI
CMP EBX,dword ptr [EBP + 0xc]
JGE 0x00017753
LEA ESI,[ESI]
NOP
SUB ESP,0xc
PUSH 0x30
CALL ESI
SUB dword ptr [EBP + 0xc],0x1
ADD ESP,0x10
CMP EBX,dword ptr [EBP + 0xc]
JNZ 0x00017740
TEST EBX,EBX
JZ 0x00017773
ADD EBX,EDI
LEA ESI,[ESI]
MOVZX EAX,byte ptr [EDI]
SUB ESP,0xc
ADD EDI,0x1
PUSH EAX
CALL ESI
ADD ESP,0x10
CMP EBX,EDI
JNZ 0x00017760
MOV EAX,dword ptr [EBP + -0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00017787
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00018840
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00018840();\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00018840();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" identifier (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00018840();\n  }\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "undefined1 auStack_4b [43];" type_identifier (array_declarator "auStack_4b [43]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x176bb;" (assignment_expression "uStack_14 = 0x176bb" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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) ))))) ;) (if_statement "if (param_3 != 0) {\n    (*param_4)(0x20);\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    (*param_4)(0x20);\n  }" { (expression_statement "(*param_4)(0x20);" (call_expression "(*param_4)(0x20)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(0x20)" ( number_literal ))) ;) })) (expression_statement "puVar6 = (uint *)(auStack_4b + 3);" (assignment_expression "puVar6 = (uint *)(auStack_4b + 3)" identifier = (cast_expression "(uint *)(auStack_4b + 3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(auStack_4b + 3)" ( (binary_expression "auStack_4b + 3" identifier + number_literal) )))) ;) (expression_statement "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);" (call_expression "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" identifier (argument_list "(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "&DAT_00019a61" & identifier) , identifier ))) ;) (expression_statement "puVar5 = puVar6;" (assignment_expression "puVar5 = puVar6" identifier = identifier) ;) (do_statement "do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);" do (compound_statement "{\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  }" { (expression_statement "puVar3 = puVar5;" (assignment_expression "puVar3 = puVar5" identifier = identifier) ;) (expression_statement "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;" (assignment_expression "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3" identifier = (binary_expression "*puVar3 + 0xfefefeff & ~*puVar3" (binary_expression "*puVar3 + 0xfefefeff" (pointer_expression "*puVar3" * identifier) + number_literal) & (unary_expression "~*puVar3" ~ (pointer_expression "*puVar3" * identifier)))) ;) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" identifier = (binary_expression "uVar1 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar5 = puVar3 + 1;" (assignment_expression "puVar5 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) ;) (expression_statement "bVar7 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar7 = (uVar1 & 0x8080) == 0" identifier = (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" ( (binary_expression "uVar1 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" { (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" identifier = (binary_expression "uVar2 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" { (expression_statement "puVar5 = (uint *)((int)puVar3 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar3 + 6)" identifier = (cast_expression "(uint *)((int)puVar3 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + 6)" ( (binary_expression "(int)puVar3 + 6" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));" (assignment_expression "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" identifier = (cast_expression "(undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" ( (binary_expression "(int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" identifier (argument_list "((byte)uVar2,(byte)uVar2)" ( (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (if_statement "if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" if (parenthesized_expression "((int)puVar4 < (int)param_2)" ( (binary_expression "(int)puVar4 < (int)param_2" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" { (do_statement "do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);" do (compound_statement "{\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    }" { (expression_statement "(*param_4)(0x30);" (call_expression "(*param_4)(0x30)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(0x30)" ( number_literal ))) ;) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar4 != param_2)" ( (binary_expression "puVar4 != param_2" identifier != identifier) )) ;) })) (if_statement "if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" if (parenthesized_expression "(puVar4 != (undefined1 *)0x0)" ( (binary_expression "puVar4 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" { (expression_statement "puVar5 = (uint *)(puVar4 + (int)puVar6);" (assignment_expression "puVar5 = (uint *)(puVar4 + (int)puVar6)" identifier = (cast_expression "(uint *)(puVar4 + (int)puVar6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + (int)puVar6)" ( (binary_expression "puVar4 + (int)puVar6" identifier + (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (do_statement "do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);" do (compound_statement "{\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    }" { (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "puVar6 = (uint *)((int)puVar6 + 1);" (assignment_expression "puVar6 = (uint *)((int)puVar6 + 1)" identifier = (cast_expression "(uint *)((int)puVar6 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + 1)" ( (binary_expression "(int)puVar6 + 1" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*param_4)((char)uVar2);" (call_expression "(*param_4)((char)uVar2)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "((char)uVar2)" ( (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier) ))) ;) }) while (parenthesized_expression "(puVar5 != puVar6)" ( (binary_expression "puVar5 != puVar6" identifier != identifier) )) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00018840();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(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                    /* WARNING: Subroutine does not return */\n    FUN_00018840();\n  }" { comment (expression_statement "FUN_00018840();" (call_expression "FUN_00018840()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid bc_out_long(long val,int size,int space,_func_void_int *out_char)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint *puVar4;\n  undefined1 *puVar5;\n  uint *puVar6;\n  uint *puVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  undefined1 auStack_4b [3];\n  char digits [40];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (space != 0) {\n    (*out_char)(0x20);\n  }\n  puVar7 = (uint *)digits;\n  __snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val);\n  puVar6 = puVar7;\n  do {\n    puVar4 = puVar6;\n    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar3 = uVar2 & 0x80808080;\n    puVar6 = puVar4 + 1;\n  } while (uVar3 == 0);\n  bVar8 = (uVar2 & 0x8080) == 0;\n  if (bVar8) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar8) {\n    puVar6 = (uint *)((int)puVar4 + 6);\n  }\n  puVar5 = (undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7));\n  if ((int)puVar5 < size) {\n    do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);\n  }\n  if (puVar5 != (undefined1 *)0x0) {\n    puVar6 = (uint *)(puVar5 + (int)puVar7);\n    do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment (function_definition "void bc_out_long(long val,int size,int space,_func_void_int *out_char)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint *puVar4;\n  undefined1 *puVar5;\n  uint *puVar6;\n  uint *puVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  undefined1 auStack_4b [3];\n  char digits [40];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (space != 0) {\n    (*out_char)(0x20);\n  }\n  puVar7 = (uint *)digits;\n  __snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val);\n  puVar6 = puVar7;\n  do {\n    puVar4 = puVar6;\n    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar3 = uVar2 & 0x80808080;\n    puVar6 = puVar4 + 1;\n  } while (uVar3 == 0);\n  bVar8 = (uVar2 & 0x8080) == 0;\n  if (bVar8) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar8) {\n    puVar6 = (uint *)((int)puVar4 + 6);\n  }\n  puVar5 = (undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7));\n  if ((int)puVar5 < size) {\n    do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);\n  }\n  if (puVar5 != (undefined1 *)0x0) {\n    puVar6 = (uint *)(puVar5 + (int)puVar7);\n    do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "bc_out_long(long val,int size,int space,_func_void_int *out_char)" identifier (parameter_list "(long val,int size,int space,_func_void_int *out_char)" ( (parameter_declaration "long val" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int size" primitive_type identifier) , (parameter_declaration "int space" primitive_type identifier) , (parameter_declaration "_func_void_int *out_char" type_identifier (pointer_declarator "*out_char" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  uint *puVar4;\n  undefined1 *puVar5;\n  uint *puVar6;\n  uint *puVar7;\n  int in_GS_OFFSET;\n  bool bVar8;\n  undefined1 auStack_4b [3];\n  char digits [40];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (space != 0) {\n    (*out_char)(0x20);\n  }\n  puVar7 = (uint *)digits;\n  __snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val);\n  puVar6 = puVar7;\n  do {\n    puVar4 = puVar6;\n    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar3 = uVar2 & 0x80808080;\n    puVar6 = puVar4 + 1;\n  } while (uVar3 == 0);\n  bVar8 = (uVar2 & 0x8080) == 0;\n  if (bVar8) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar8) {\n    puVar6 = (uint *)((int)puVar4 + 6);\n  }\n  puVar5 = (undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7));\n  if ((int)puVar5 < size) {\n    do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);\n  }\n  if (puVar5 != (undefined1 *)0x0) {\n    puVar6 = (uint *)(puVar5 + (int)puVar7);\n    do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "undefined1 auStack_4b [3];" type_identifier (array_declarator "auStack_4b [3]" identifier [ number_literal ]) ;) (declaration "char digits [40];" primitive_type (array_declarator "digits [40]" identifier [ number_literal ]) ;) (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) ))))) ;) (if_statement "if (space != 0) {\n    (*out_char)(0x20);\n  }" if (parenthesized_expression "(space != 0)" ( (binary_expression "space != 0" identifier != number_literal) )) (compound_statement "{\n    (*out_char)(0x20);\n  }" { (expression_statement "(*out_char)(0x20);" (call_expression "(*out_char)(0x20)" (parenthesized_expression "(*out_char)" ( (pointer_expression "*out_char" * identifier) )) (argument_list "(0x20)" ( number_literal ))) ;) })) (expression_statement "puVar7 = (uint *)digits;" (assignment_expression "puVar7 = (uint *)digits" identifier = (cast_expression "(uint *)digits" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "__snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val);" (call_expression "__snprintf_chk(puVar7,0x28,1,0x28,&DAT_00019a61,val)" identifier (argument_list "(puVar7,0x28,1,0x28,&DAT_00019a61,val)" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "&DAT_00019a61" & identifier) , identifier ))) ;) (expression_statement "puVar6 = puVar7;" (assignment_expression "puVar6 = puVar7" identifier = identifier) ;) (do_statement "do {\n    puVar4 = puVar6;\n    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar3 = uVar2 & 0x80808080;\n    puVar6 = puVar4 + 1;\n  } while (uVar3 == 0);" do (compound_statement "{\n    puVar4 = puVar6;\n    uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;\n    uVar3 = uVar2 & 0x80808080;\n    puVar6 = puVar4 + 1;\n  }" { (expression_statement "puVar4 = puVar6;" (assignment_expression "puVar4 = puVar6" identifier = identifier) ;) (expression_statement "uVar2 = *puVar4 + 0xfefefeff & ~*puVar4;" (assignment_expression "uVar2 = *puVar4 + 0xfefefeff & ~*puVar4" identifier = (binary_expression "*puVar4 + 0xfefefeff & ~*puVar4" (binary_expression "*puVar4 + 0xfefefeff" (pointer_expression "*puVar4" * identifier) + number_literal) & (unary_expression "~*puVar4" ~ (pointer_expression "*puVar4" * identifier)))) ;) (expression_statement "uVar3 = uVar2 & 0x80808080;" (assignment_expression "uVar3 = uVar2 & 0x80808080" identifier = (binary_expression "uVar2 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar6 = puVar4 + 1;" (assignment_expression "puVar6 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) ;) (expression_statement "bVar8 = (uVar2 & 0x8080) == 0;" (assignment_expression "bVar8 = (uVar2 & 0x8080) == 0" identifier = (binary_expression "(uVar2 & 0x8080) == 0" (parenthesized_expression "(uVar2 & 0x8080)" ( (binary_expression "uVar2 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar8) {\n    uVar3 = uVar3 >> 0x10;\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    uVar3 = uVar3 >> 0x10;\n  }" { (expression_statement "uVar3 = uVar3 >> 0x10;" (assignment_expression "uVar3 = uVar3 >> 0x10" identifier = (binary_expression "uVar3 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar8) {\n    puVar6 = (uint *)((int)puVar4 + 6);\n  }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n    puVar6 = (uint *)((int)puVar4 + 6);\n  }" { (expression_statement "puVar6 = (uint *)((int)puVar4 + 6);" (assignment_expression "puVar6 = (uint *)((int)puVar4 + 6)" identifier = (cast_expression "(uint *)((int)puVar4 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar4 + 6)" ( (binary_expression "(int)puVar4 + 6" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "puVar5 = (undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7));" (assignment_expression "puVar5 = (undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7))" identifier = (cast_expression "(undefined1 *)\n           ((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7))" ( (binary_expression "(int)puVar6 + ((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7)" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)) - (int)puVar7" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar3,(byte)uVar3)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar3,(byte)uVar3)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar3,(byte)uVar3)" identifier (argument_list "((byte)uVar3,(byte)uVar3)" ( (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (if_statement "if ((int)puVar5 < size) {\n    do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);\n  }" if (parenthesized_expression "((int)puVar5 < size)" ( (binary_expression "(int)puVar5 < size" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n    do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);\n  }" { (do_statement "do {\n      (*out_char)(0x30);\n      size = size + -1;\n    } while (puVar5 != (undefined1 *)size);" do (compound_statement "{\n      (*out_char)(0x30);\n      size = size + -1;\n    }" { (expression_statement "(*out_char)(0x30);" (call_expression "(*out_char)(0x30)" (parenthesized_expression "(*out_char)" ( (pointer_expression "*out_char" * identifier) )) (argument_list "(0x30)" ( number_literal ))) ;) (expression_statement "size = size + -1;" (assignment_expression "size = size + -1" identifier = (binary_expression "size + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar5 != (undefined1 *)size)" ( (binary_expression "puVar5 != (undefined1 *)size" identifier != (cast_expression "(undefined1 *)size" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) ;) })) (if_statement "if (puVar5 != (undefined1 *)0x0) {\n    puVar6 = (uint *)(puVar5 + (int)puVar7);\n    do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);\n  }" if (parenthesized_expression "(puVar5 != (undefined1 *)0x0)" ( (binary_expression "puVar5 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar6 = (uint *)(puVar5 + (int)puVar7);\n    do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);\n  }" { (expression_statement "puVar6 = (uint *)(puVar5 + (int)puVar7);" (assignment_expression "puVar6 = (uint *)(puVar5 + (int)puVar7)" identifier = (cast_expression "(uint *)(puVar5 + (int)puVar7)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar5 + (int)puVar7)" ( (binary_expression "puVar5 + (int)puVar7" identifier + (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (do_statement "do {\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    } while (puVar6 != puVar7);" do (compound_statement "{\n      uVar3 = *puVar7;\n      puVar7 = (uint *)((int)puVar7 + 1);\n      (*out_char)((int)(char)uVar3);\n    }" { (expression_statement "uVar3 = *puVar7;" (assignment_expression "uVar3 = *puVar7" identifier = (pointer_expression "*puVar7" * identifier)) ;) (expression_statement "puVar7 = (uint *)((int)puVar7 + 1);" (assignment_expression "puVar7 = (uint *)((int)puVar7 + 1)" identifier = (cast_expression "(uint *)((int)puVar7 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar7 + 1)" ( (binary_expression "(int)puVar7 + 1" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*out_char)((int)(char)uVar3);" (call_expression "(*out_char)((int)(char)uVar3)" (parenthesized_expression "(*out_char)" ( (pointer_expression "*out_char" * identifier) )) (argument_list "((int)(char)uVar3)" ( (cast_expression "(int)(char)uVar3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)uVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ))) ;) }) while (parenthesized_expression "(puVar6 != puVar7)" ( (binary_expression "puVar6 != puVar7" identifier != identifier) )) ;) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }\n  return;\n}\n\n" (function_definition "void FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" identifier (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "code *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "undefined1 auStack_4b [43];" type_identifier (array_declarator "auStack_4b [43]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x176bb;" (assignment_expression "uStack_14 = 0x176bb" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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) ))))) ;) (if_statement "if (param_3 != 0) {\n    (*param_4)(0x20);\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    (*param_4)(0x20);\n  }" { (expression_statement "(*param_4)(0x20);" (call_expression "(*param_4)(0x20)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(0x20)" ( number_literal ))) ;) })) (expression_statement "puVar6 = (uint *)(auStack_4b + 3);" (assignment_expression "puVar6 = (uint *)(auStack_4b + 3)" identifier = (cast_expression "(uint *)(auStack_4b + 3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(auStack_4b + 3)" ( (binary_expression "auStack_4b + 3" identifier + number_literal) )))) ;) (expression_statement "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);" (call_expression "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" identifier (argument_list "(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "&DAT_00019a61" & identifier) , identifier ))) ;) (expression_statement "puVar5 = puVar6;" (assignment_expression "puVar5 = puVar6" identifier = identifier) ;) (do_statement "do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);" do (compound_statement "{\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  }" { (expression_statement "puVar3 = puVar5;" (assignment_expression "puVar3 = puVar5" identifier = identifier) ;) (expression_statement "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;" (assignment_expression "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3" identifier = (binary_expression "*puVar3 + 0xfefefeff & ~*puVar3" (binary_expression "*puVar3 + 0xfefefeff" (pointer_expression "*puVar3" * identifier) + number_literal) & (unary_expression "~*puVar3" ~ (pointer_expression "*puVar3" * identifier)))) ;) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" identifier = (binary_expression "uVar1 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar5 = puVar3 + 1;" (assignment_expression "puVar5 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) ;) (expression_statement "bVar7 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar7 = (uVar1 & 0x8080) == 0" identifier = (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" ( (binary_expression "uVar1 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" { (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" identifier = (binary_expression "uVar2 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" if (parenthesized_expression "(bVar7)" ( identifier )) (compound_statement "{\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" { (expression_statement "puVar5 = (uint *)((int)puVar3 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar3 + 6)" identifier = (cast_expression "(uint *)((int)puVar3 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + 6)" ( (binary_expression "(int)puVar3 + 6" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));" (assignment_expression "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" identifier = (cast_expression "(undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" ( (binary_expression "(int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" ( (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" ( (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" number_literal - (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" identifier (argument_list "((byte)uVar2,(byte)uVar2)" ( (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar2" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) )) - (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )))) ;) (if_statement "if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" if (parenthesized_expression "((int)puVar4 < (int)param_2)" ( (binary_expression "(int)puVar4 < (int)param_2" (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" { (do_statement "do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);" do (compound_statement "{\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    }" { (expression_statement "(*param_4)(0x30);" (call_expression "(*param_4)(0x30)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "(0x30)" ( number_literal ))) ;) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar4 != param_2)" ( (binary_expression "puVar4 != param_2" identifier != identifier) )) ;) })) (if_statement "if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" if (parenthesized_expression "(puVar4 != (undefined1 *)0x0)" ( (binary_expression "puVar4 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" { (expression_statement "puVar5 = (uint *)(puVar4 + (int)puVar6);" (assignment_expression "puVar5 = (uint *)(puVar4 + (int)puVar6)" identifier = (cast_expression "(uint *)(puVar4 + (int)puVar6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + (int)puVar6)" ( (binary_expression "puVar4 + (int)puVar6" identifier + (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (do_statement "do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);" do (compound_statement "{\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    }" { (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "puVar6 = (uint *)((int)puVar6 + 1);" (assignment_expression "puVar6 = (uint *)((int)puVar6 + 1)" identifier = (cast_expression "(uint *)((int)puVar6 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + 1)" ( (binary_expression "(int)puVar6 + 1" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "(*param_4)((char)uVar2);" (call_expression "(*param_4)((char)uVar2)" (parenthesized_expression "(*param_4)" ( (pointer_expression "*param_4" * identifier) )) (argument_list "((char)uVar2)" ( (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier) ))) ;) }) while (parenthesized_expression "(puVar5 != puVar6)" ( (binary_expression "puVar5 != puVar6" identifier != identifier) )) ;) })) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(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                    \n    FUN_00018840();\n  }" { (expression_statement "FUN_00018840();" (call_expression "FUN_00018840()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (pointer_expression & IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) & (unary_expression ~ (pointer_expression * IDENT)))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))))) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != 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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000176b0(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" (identifier "FUN_000176b0") (parameter_list "(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "code *param_4" (type_identifier "code") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint *puVar3;\n  undefined1 *puVar4;\n  uint *puVar5;\n  uint *puVar6;\n  int in_GS_OFFSET;\n  bool bVar7;\n  undefined1 auStack_4b [43];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x176bb;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 != 0) {\n    (*param_4)(0x20);\n  }\n  puVar6 = (uint *)(auStack_4b + 3);\n  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);\n  puVar5 = puVar6;\n  do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);\n  bVar7 = (uVar1 & 0x8080) == 0;\n  if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }\n  if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }\n  puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));\n  if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }\n  if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "uint *puVar5;" (type_identifier "uint") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "uint *puVar6;" (type_identifier "uint") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (declaration "undefined1 auStack_4b [43];" (type_identifier "undefined1") (array_declarator "auStack_4b [43]" (identifier "auStack_4b") ([ "[") (number_literal "43") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x176bb;" (assignment_expression "uStack_14 = 0x176bb" (identifier "uStack_14") (= "=") (number_literal "0x176bb")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if (param_3 != 0) {\n    (*param_4)(0x20);\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    (*param_4)(0x20);\n  }" ({ "{") (expression_statement "(*param_4)(0x20);" (call_expression "(*param_4)(0x20)" (parenthesized_expression "(*param_4)" (( "(") (pointer_expression "*param_4" (* "*") (identifier "param_4")) () ")")) (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar6 = (uint *)(auStack_4b + 3);" (assignment_expression "puVar6 = (uint *)(auStack_4b + 3)" (identifier "puVar6") (= "=") (cast_expression "(uint *)(auStack_4b + 3)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(auStack_4b + 3)" (( "(") (binary_expression "auStack_4b + 3" (identifier "auStack_4b") (+ "+") (number_literal "3")) () ")")))) (; ";")) (expression_statement "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);" (call_expression "__snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" (identifier "__snprintf_chk") (argument_list "(puVar6,0x28,1,0x28,&DAT_00019a61,param_1)" (( "(") (identifier "puVar6") (, ",") (number_literal "0x28") (, ",") (number_literal "1") (, ",") (number_literal "0x28") (, ",") (pointer_expression "&DAT_00019a61" (& "&") (identifier "DAT_00019a61")) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "puVar5 = puVar6;" (assignment_expression "puVar5 = puVar6" (identifier "puVar5") (= "=") (identifier "puVar6")) (; ";")) (do_statement "do {\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  } while (uVar2 == 0);" (do "do") (compound_statement "{\n    puVar3 = puVar5;\n    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;\n    uVar2 = uVar1 & 0x80808080;\n    puVar5 = puVar3 + 1;\n  }" ({ "{") (expression_statement "puVar3 = puVar5;" (assignment_expression "puVar3 = puVar5" (identifier "puVar3") (= "=") (identifier "puVar5")) (; ";")) (expression_statement "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;" (assignment_expression "uVar1 = *puVar3 + 0xfefefeff & ~*puVar3" (identifier "uVar1") (= "=") (binary_expression "*puVar3 + 0xfefefeff & ~*puVar3" (binary_expression "*puVar3 + 0xfefefeff" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (+ "+") (number_literal "0xfefefeff")) (& "&") (unary_expression "~*puVar3" (~ "~") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))))) (; ";")) (expression_statement "uVar2 = uVar1 & 0x80808080;" (assignment_expression "uVar2 = uVar1 & 0x80808080" (identifier "uVar2") (= "=") (binary_expression "uVar1 & 0x80808080" (identifier "uVar1") (& "&") (number_literal "0x80808080"))) (; ";")) (expression_statement "puVar5 = puVar3 + 1;" (assignment_expression "puVar5 = puVar3 + 1" (identifier "puVar5") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar2 == 0)" (( "(") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0")) () ")")) (; ";")) (expression_statement "bVar7 = (uVar1 & 0x8080) == 0;" (assignment_expression "bVar7 = (uVar1 & 0x8080) == 0" (identifier "bVar7") (= "=") (binary_expression "(uVar1 & 0x8080) == 0" (parenthesized_expression "(uVar1 & 0x8080)" (( "(") (binary_expression "uVar1 & 0x8080" (identifier "uVar1") (& "&") (number_literal "0x8080")) () ")")) (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar7) {\n    uVar2 = uVar2 >> 0x10;\n  }" (if "if") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (compound_statement "{\n    uVar2 = uVar2 >> 0x10;\n  }" ({ "{") (expression_statement "uVar2 = uVar2 >> 0x10;" (assignment_expression "uVar2 = uVar2 >> 0x10" (identifier "uVar2") (= "=") (binary_expression "uVar2 >> 0x10" (identifier "uVar2") (>> ">>") (number_literal "0x10"))) (; ";")) (} "}"))) (if_statement "if (bVar7) {\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" (if "if") (parenthesized_expression "(bVar7)" (( "(") (identifier "bVar7") () ")")) (compound_statement "{\n    puVar5 = (uint *)((int)puVar3 + 6);\n  }" ({ "{") (expression_statement "puVar5 = (uint *)((int)puVar3 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar3 + 6)" (identifier "puVar5") (= "=") (cast_expression "(uint *)((int)puVar3 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar3 + 6)" (( "(") (binary_expression "(int)puVar3 + 6" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (+ "+") (number_literal "6")) () ")")))) (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));" (assignment_expression "puVar4 = (undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)\n           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6))" (( "(") (binary_expression "(int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (parenthesized_expression "((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6)" (( "(") (binary_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6" (parenthesized_expression "(-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2))" (( "(") (binary_expression "-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)" (number_literal "-3") (- "-") (cast_expression "(uint)CARRY1((byte)uVar2,(byte)uVar2)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY1((byte)uVar2,(byte)uVar2)" (identifier "CARRY1") (argument_list "((byte)uVar2,(byte)uVar2)" (( "(") (cast_expression "(byte)uVar2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar2")) (, ",") (cast_expression "(byte)uVar2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar2")) () ")"))))) () ")")) (- "-") (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6"))) () ")"))) () ")")))) (; ";")) (if_statement "if ((int)puVar4 < (int)param_2) {\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" (if "if") (parenthesized_expression "((int)puVar4 < (int)param_2)" (( "(") (binary_expression "(int)puVar4 < (int)param_2" (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4")) (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n    do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);\n  }" ({ "{") (do_statement "do {\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    } while (puVar4 != param_2);" (do "do") (compound_statement "{\n      (*param_4)(0x30);\n      param_2 = param_2 + -1;\n    }" ({ "{") (expression_statement "(*param_4)(0x30);" (call_expression "(*param_4)(0x30)" (parenthesized_expression "(*param_4)" (( "(") (pointer_expression "*param_4" (* "*") (identifier "param_4")) () ")")) (argument_list "(0x30)" (( "(") (number_literal "0x30") () ")"))) (; ";")) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" (identifier "param_2") (= "=") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar4 != param_2)" (( "(") (binary_expression "puVar4 != param_2" (identifier "puVar4") (!= "!=") (identifier "param_2")) () ")")) (; ";")) (} "}"))) (if_statement "if (puVar4 != (undefined1 *)0x0) {\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" (if "if") (parenthesized_expression "(puVar4 != (undefined1 *)0x0)" (( "(") (binary_expression "puVar4 != (undefined1 *)0x0" (identifier "puVar4") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar5 = (uint *)(puVar4 + (int)puVar6);\n    do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);\n  }" ({ "{") (expression_statement "puVar5 = (uint *)(puVar4 + (int)puVar6);" (assignment_expression "puVar5 = (uint *)(puVar4 + (int)puVar6)" (identifier "puVar5") (= "=") (cast_expression "(uint *)(puVar4 + (int)puVar6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + (int)puVar6)" (( "(") (binary_expression "puVar4 + (int)puVar6" (identifier "puVar4") (+ "+") (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6"))) () ")")))) (; ";")) (do_statement "do {\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    } while (puVar5 != puVar6);" (do "do") (compound_statement "{\n      uVar2 = *puVar6;\n      puVar6 = (uint *)((int)puVar6 + 1);\n      (*param_4)((char)uVar2);\n    }" ({ "{") (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" (identifier "uVar2") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (expression_statement "puVar6 = (uint *)((int)puVar6 + 1);" (assignment_expression "puVar6 = (uint *)((int)puVar6 + 1)" (identifier "puVar6") (= "=") (cast_expression "(uint *)((int)puVar6 + 1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar6 + 1)" (( "(") (binary_expression "(int)puVar6 + 1" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "(*param_4)((char)uVar2);" (call_expression "(*param_4)((char)uVar2)" (parenthesized_expression "(*param_4)" (( "(") (pointer_expression "*param_4" (* "*") (identifier "param_4")) () ")")) (argument_list "((char)uVar2)" (( "(") (cast_expression "(char)uVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar2")) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar5 != puVar6)" (( "(") (binary_expression "puVar5 != puVar6" (identifier "puVar5") (!= "!=") (identifier "puVar6")) () ")")) (; ";")) (} "}"))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00018840();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (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                    \n    FUN_00018840();\n  }" ({ "{") (expression_statement "FUN_00018840();" (call_expression "FUN_00018840()" (identifier "FUN_00018840") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(long val,int var_8,int var_2,type_1 *out_char)

{
  int var_12;
  type_2 var_4;
  type_2 var_6;
  type_2 *var_5;
  type_3 *var_9;
  type_2 *var_10;
  type_2 *var_11;
  int var_1;
  bool bVar8;
  type_3 auStack_4b [3];
  char digits [40];
  
  var_12 = *(int *)(var_1 + 0x14);
  if (var_2 != 0) {
    (*out_char)(0x20);
  }
  var_11 = (type_2 *)digits;
  var_3(var_11,0x28,1,0x28,&DAT_00019a61,val);
  var_10 = var_11;
  do {
    var_5 = var_10;
    var_4 = *var_5 + 0xfefefeff & ~*var_5;
    var_6 = var_4 & 0x80808080;
    var_10 = var_5 + 1;
  } while (var_6 == 0);
  bVar8 = (var_4 & 0x8080) == 0;
  if (bVar8) {
    var_6 = var_6 >> 0x10;
  }
  if (bVar8) {
    var_10 = (type_2 *)((int)var_5 + 6);
  }
  var_9 = (type_3 *)
           ((int)var_10 + ((-3 - (type_2)var_7((type_4)var_6,(type_4)var_6)) - (int)var_11));
  if ((int)var_9 < var_8) {
    do {
      (*out_char)(0x30);
      var_8 = var_8 + -1;
    } while (var_9 != (type_3 *)var_8);
  }
  if (var_9 != (type_3 *)0x0) {
    var_10 = (type_2 *)(var_9 + (int)var_11);
    do {
      var_6 = *var_11;
      var_11 = (type_2 *)((int)var_11 + 1);
      (*out_char)((int)(char)var_6);
    } while (var_10 != var_11);
  }
  if (var_12 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_13();
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator 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: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)) right: (unary_expression argument: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement))))

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

void MASKED(undefined4 param_1,undefined1 *param_2,int param_3,code *param_4)

{
  uint uVar1;
  uint uVar2;
  uint *puVar3;
  undefined1 *puVar4;
  uint *puVar5;
  uint *puVar6;
  int in_GS_OFFSET;
  bool bVar7;
  undefined1 auStack_4b [43];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x176bb;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 != 0) {
    (*param_4)(0x20);
  }
  puVar6 = (uint *)(auStack_4b + 3);
  __snprintf_chk(puVar6,0x28,1,0x28,&DAT_00019a61,param_1);
  puVar5 = puVar6;
  do {
    puVar3 = puVar5;
    uVar1 = *puVar3 + 0xfefefeff & ~*puVar3;
    uVar2 = uVar1 & 0x80808080;
    puVar5 = puVar3 + 1;
  } while (uVar2 == 0);
  bVar7 = (uVar1 & 0x8080) == 0;
  if (bVar7) {
    uVar2 = uVar2 >> 0x10;
  }
  if (bVar7) {
    puVar5 = (uint *)((int)puVar3 + 6);
  }
  puVar4 = (undefined1 *)
           ((int)puVar5 + ((-3 - (uint)CARRY1((byte)uVar2,(byte)uVar2)) - (int)puVar6));
  if ((int)puVar4 < (int)param_2) {
    do {
      (*param_4)(0x30);
      param_2 = param_2 + -1;
    } while (puVar4 != param_2);
  }
  if (puVar4 != (undefined1 *)0x0) {
    puVar5 = (uint *)(puVar4 + (int)puVar6);
    do {
      uVar2 = *puVar6;
      puVar6 = (uint *)((int)puVar6 + 1);
      (*param_4)((char)uVar2);
    } while (puVar5 != puVar6);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00018840();
  }
  return;
}

