
/* WARNING: Unknown calling convention */

void addtok_wc(dfa *dfa,wint_t wc)

{
  byte bVar1;
  undefined *puVar2;
  int iVar3;
  int iVar4;
  char mbprop;
  token_conflict tVar5;
  dfa *dfa_00;
  byte *pbVar6;
  mbstate_t s;
  uchar buf [16];
  
  puVar2 = PTR___stack_chk_guard_004b238c;
  s.__count = 0;
  s.__value.__wch = 0;
  iVar3 = *(int *)PTR___stack_chk_guard_004b238c;
  iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s);
  if (iVar4 == -1) {
    buf[0] = '\0';
    addtok_mb(dfa,0,'\x03');
    dfa_00 = dfa;
  }
  else if (iVar4 == 1) {
    addtok_mb(dfa,(uint)buf[0],'\x03');
    dfa_00 = dfa;
  }
  else {
    dfa_00 = dfa;
    addtok_mb(dfa,(uint)buf[0],'\x01');
    if (1 < iVar4) {
      pbVar6 = buf + 1;
      do {
        bVar1 = *pbVar6;
        mbprop = '\x02';
        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {
          mbprop = '\0';
        }
        pbVar6 = pbVar6 + 1;
        addtok_mb(dfa,(uint)bVar1,mbprop);
        dfa_00 = dfa;
        addtok(dfa,0x105);
      } while (buf + iVar4 != pbVar6);
    }
  }
  if (iVar3 != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_004b2348)();
    branch(dfa_00);
    iVar3 = (dfa_00->parse).tok;
    while (iVar3 == 0x106) {
      tVar5 = lex(dfa_00);
      (dfa_00->parse).tok = tVar5;
      branch(dfa_00);
      addtok(dfa_00,0x106);
      iVar3 = (dfa_00->parse).tok;
    }
    return;
  }
  return;
}



void FUN_00477a68(int param_1,undefined4 param_2)

{
  undefined1 uVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  undefined1 *puVar6;
  undefined4 local_3c;
  undefined4 local_38;
  undefined1 local_34 [16];
  int local_24;
  
  puVar2 = PTR___stack_chk_guard_004b238c;
  local_3c = 0;
  local_38 = 0;
  local_24 = *(int *)PTR___stack_chk_guard_004b238c;
  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);
  if (iVar3 == -1) {
    local_34[0] = 0;
    FUN_00477748(param_1,0,3);
    iVar5 = param_1;
  }
  else if (iVar3 == 1) {
    FUN_00477748(param_1,local_34[0],3);
    iVar5 = param_1;
  }
  else {
    iVar5 = param_1;
    FUN_00477748(param_1,local_34[0],1);
    if (1 < iVar3) {
      puVar6 = local_34 + 1;
      do {
        uVar1 = *puVar6;
        uVar4 = 2;
        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {
          uVar4 = 0;
        }
        puVar6 = puVar6 + 1;
        FUN_00477748(param_1,uVar1,uVar4);
        iVar5 = param_1;
        FUN_0047796c(param_1,0x105);
      } while (local_34 + iVar3 != puVar6);
    }
  }
  if (local_24 != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_004b2348)();
    FUN_00478130();
    iVar3 = *(int *)(iVar5 + 0x44);
    while (iVar3 == 0x106) {
      uVar4 = FUN_00476c6c(iVar5);
      *(undefined4 *)(iVar5 + 0x44) = uVar4;
      FUN_00478130(iVar5);
      FUN_0047796c(iVar5,0x106);
      iVar3 = *(int *)(iVar5 + 0x44);
    }
    return;
  }
  return;
}


lui gp,0x4c
addiu sp,sp,-0x60
addiu gp,gp,-0x64e0
addiu a2,sp,0x24
sw s5,0x54(sp)
lw s5,-0x7794(gp)
lw t9,-0x7744(gp)
sw s3,0x4c(sp)
addiu s3,sp,0x2c
sw s1,0x44(sp)
or s1,a0,zero
sw ra,0x5c(sp)
or a0,s3,zero
sw s6,0x58(sp)
sw s4,0x50(sp)
sw s2,0x48(sp)
sw s0,0x40(sp)
sw gp,0x10(sp)
sw zero,0x24(sp)
sw zero,0x28(sp)
lw v0,0x0(s5)
sw v0,0x3c(sp)
jalr t9
_nop
li v1,-0x1
beq v0,v1,0x00477b8c
_li v1,0x1
beq v0,v1,0x00477b78
_lbu a1,0x2c(sp)
li a2,0x1
sw v0,0x1c(sp)
jal 0x00477748
_or a0,s1,zero
lw v0,0x1c(sp)
slti v1,v0,0x2
bne v1,zero,0x00477b44
_lw gp,0x10(sp)
addiu s4,v0,-0x1
addiu s0,sp,0x2d
addu s2,s3,v0
li s6,0x2
subu a2,s0,s3
lbu a1,0x0(s0)
or v0,s6,zero
xor a2,s4,a2
movn v0,zero,a2
or a0,s1,zero
addiu s0,s0,0x1
jal 0x00477748
_or a2,v0,zero
li a1,0x105
jal 0x0047796c
_or a0,s1,zero
bne s2,s0,0x00477b0c
_lw gp,0x10(sp)
lw v1,0x3c(sp)
lw v0,0x0(s5)
bne v1,v0,0x00477ba8
_lw ra,0x5c(sp)
lw s6,0x58(sp)
lw s5,0x54(sp)
lw s4,0x50(sp)
lw s3,0x4c(sp)
lw s2,0x48(sp)
lw s1,0x44(sp)
lw s0,0x40(sp)
jr ra
_addiu sp,sp,0x60
li a2,0x3
jal 0x00477748
_or a0,s1,zero
b 0x00477b44
_lw gp,0x10(sp)
li a2,0x3
sb zero,0x2c(sp)
or a1,zero,zero
jal 0x00477748
_or a0,s1,zero
b 0x00477b44
_lw gp,0x10(sp)
lw t9,-0x77d8(gp)
jalr t9
_nop
(translation_unit "void FUN_00477a68(int param_1,undefined4 param_2)\n\n{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00477a68(int param_1,undefined4 param_2)\n\n{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00477a68(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined1 local_34 [16];" type_identifier (array_declarator "local_34 [16]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar2 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);" (assignment_expression "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" identifier = (call_expression "(*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" (parenthesized_expression "(*(code *)PTR_wcrtomb_004b23dc)" ( (pointer_expression "*(code *)PTR_wcrtomb_004b23dc" * (cast_expression "(code *)PTR_wcrtomb_004b23dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_34,param_2,&local_3c)" ( identifier , identifier , (pointer_expression "&local_3c" & identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }" { (expression_statement "local_34[0] = 0;" (assignment_expression "local_34[0] = 0" (subscript_expression "local_34[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_00477748(param_1,0,3);" (call_expression "FUN_00477748(param_1,0,3)" identifier (argument_list "(param_1,0,3)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) }) (else_clause "else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" else (if_statement "if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }" { (expression_statement "FUN_00477748(param_1,local_34[0],3);" (call_expression "FUN_00477748(param_1,local_34[0],3)" identifier (argument_list "(param_1,local_34[0],3)" ( identifier , (subscript_expression "local_34[0]" identifier [ number_literal ]) , number_literal ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) }) (else_clause "else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" else (compound_statement "{\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" { (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) (expression_statement "FUN_00477748(param_1,local_34[0],1);" (call_expression "FUN_00477748(param_1,local_34[0],1)" identifier (argument_list "(param_1,local_34[0],1)" ( identifier , (subscript_expression "local_34[0]" identifier [ number_literal ]) , number_literal ))) ;) (if_statement "if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" if (parenthesized_expression "(1 < iVar3)" ( (binary_expression "1 < iVar3" number_literal < identifier) )) (compound_statement "{\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" { (expression_statement "puVar6 = local_34 + 1;" (assignment_expression "puVar6 = local_34 + 1" identifier = (binary_expression "local_34 + 1" identifier + number_literal)) ;) (do_statement "do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);" do (compound_statement "{\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      }" { (expression_statement "uVar1 = *puVar6;" (assignment_expression "uVar1 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) (if_statement "if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }" if (parenthesized_expression "(iVar3 + -1 != (int)puVar6 - (int)local_34)" ( (binary_expression "iVar3 + -1 != (int)puVar6 - (int)local_34" (binary_expression "iVar3 + -1" identifier + number_literal) != (binary_expression "(int)puVar6 - (int)local_34" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_34" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n          uVar4 = 0;\n        }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00477748(param_1,uVar1,uVar4);" (call_expression "FUN_00477748(param_1,uVar1,uVar4)" identifier (argument_list "(param_1,uVar1,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) (expression_statement "FUN_0047796c(param_1,0x105);" (call_expression "FUN_0047796c(param_1,0x105)" identifier (argument_list "(param_1,0x105)" ( identifier , number_literal ))) ;) }) while (parenthesized_expression "(local_34 + iVar3 != puVar6)" ( (binary_expression "local_34 + iVar3 != puVar6" (binary_expression "local_34 + iVar3" identifier + identifier) != identifier) )) ;) })) }))))) (if_statement "if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" if (parenthesized_expression "(local_24 != *(int *)puVar2)" ( (binary_expression "local_24 != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_00478130();" (call_expression "FUN_00478130()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" identifier = (pointer_expression "*(int *)(iVar5 + 0x44)" * (cast_expression "(int *)(iVar5 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) ))))) ;) (while_statement "while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" while (parenthesized_expression "(iVar3 == 0x106)" ( (binary_expression "iVar3 == 0x106" identifier == number_literal) )) (compound_statement "{\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" { (expression_statement "uVar4 = FUN_00476c6c(iVar5);" (assignment_expression "uVar4 = FUN_00476c6c(iVar5)" identifier = (call_expression "FUN_00476c6c(iVar5)" identifier (argument_list "(iVar5)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(iVar5 + 0x44) = uVar4;" (assignment_expression "*(undefined4 *)(iVar5 + 0x44) = uVar4" (pointer_expression "*(undefined4 *)(iVar5 + 0x44)" * (cast_expression "(undefined4 *)(iVar5 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_00478130(iVar5);" (call_expression "FUN_00478130(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "FUN_0047796c(iVar5,0x106);" (call_expression "FUN_0047796c(iVar5,0x106)" identifier (argument_list "(iVar5,0x106)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" identifier = (pointer_expression "*(int *)(iVar5 + 0x44)" * (cast_expression "(int *)(iVar5 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) ))))) ;) })) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid addtok_wc(dfa *dfa,wint_t wc)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  char mbprop;\n  token_conflict tVar5;\n  dfa *dfa_00;\n  byte *pbVar6;\n  mbstate_t s;\n  uchar buf [16];\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  s.__count = 0;\n  s.__value.__wch = 0;\n  iVar3 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s);\n  if (iVar4 == -1) {\n    buf[0] = '\0';\n    addtok_mb(dfa,0,'\x03');\n    dfa_00 = dfa;\n  }\n  else if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }\n  if (iVar3 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    branch(dfa_00);\n    iVar3 = (dfa_00->parse).tok;\n    while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void addtok_wc(dfa *dfa,wint_t wc)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  char mbprop;\n  token_conflict tVar5;\n  dfa *dfa_00;\n  byte *pbVar6;\n  mbstate_t s;\n  uchar buf [16];\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  s.__count = 0;\n  s.__value.__wch = 0;\n  iVar3 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s);\n  if (iVar4 == -1) {\n    buf[0] = '\0';\n    addtok_mb(dfa,0,'\x03');\n    dfa_00 = dfa;\n  }\n  else if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }\n  if (iVar3 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    branch(dfa_00);\n    iVar3 = (dfa_00->parse).tok;\n    while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "addtok_wc(dfa *dfa,wint_t wc)" identifier (parameter_list "(dfa *dfa,wint_t wc)" ( (parameter_declaration "dfa *dfa" type_identifier (pointer_declarator "*dfa" * identifier)) , (parameter_declaration "wint_t wc" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  int iVar3;\n  int iVar4;\n  char mbprop;\n  token_conflict tVar5;\n  dfa *dfa_00;\n  byte *pbVar6;\n  mbstate_t s;\n  uchar buf [16];\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  s.__count = 0;\n  s.__value.__wch = 0;\n  iVar3 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s);\n  if (iVar4 == -1) {\n    buf[0] = '\0';\n    addtok_mb(dfa,0,'\x03');\n    dfa_00 = dfa;\n  }\n  else if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }\n  if (iVar3 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    branch(dfa_00);\n    iVar3 = (dfa_00->parse).tok;\n    while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }\n    return;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char mbprop;" primitive_type identifier ;) (declaration "token_conflict tVar5;" type_identifier identifier ;) (declaration "dfa *dfa_00;" type_identifier (pointer_declarator "*dfa_00" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "mbstate_t s;" type_identifier identifier ;) (declaration "uchar buf [16];" type_identifier (array_declarator "buf [16]" identifier [ number_literal ]) ;) (expression_statement "puVar2 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar2 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "s.__count = 0;" (assignment_expression "s.__count = 0" (field_expression "s.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "s.__value.__wch = 0;" (assignment_expression "s.__value.__wch = 0" (field_expression "s.__value.__wch" (field_expression "s.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "iVar3 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "iVar3 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s);" (assignment_expression "iVar4 = (*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s)" identifier = (call_expression "(*(code *)PTR_wcrtomb_004b23dc)(buf,wc,&s)" (parenthesized_expression "(*(code *)PTR_wcrtomb_004b23dc)" ( (pointer_expression "*(code *)PTR_wcrtomb_004b23dc" * (cast_expression "(code *)PTR_wcrtomb_004b23dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(buf,wc,&s)" ( identifier , identifier , (pointer_expression "&s" & identifier) )))) ;) (if_statement "if (iVar4 == -1) {\n    buf[0] = '\0';\n    addtok_mb(dfa,0,'\x03');\n    dfa_00 = dfa;\n  }\n  else if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n    buf[0] = '\0';\n    addtok_mb(dfa,0,'\x03');\n    dfa_00 = dfa;\n  }" { (expression_statement "buf[0] = '\0';" (assignment_expression "buf[0] = '\0'" (subscript_expression "buf[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "addtok_mb(dfa,0,'\x03');" (call_expression "addtok_mb(dfa,0,'\x03')" identifier (argument_list "(dfa,0,'\x03')" ( identifier , number_literal , (char_literal "'\x03'" ' escape_sequence ') ))) ;) (expression_statement "dfa_00 = dfa;" (assignment_expression "dfa_00 = dfa" identifier = identifier) ;) }) (else_clause "else if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }" else (if_statement "if (iVar4 == 1) {\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }\n  else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    addtok_mb(dfa,(uint)buf[0],'\x03');\n    dfa_00 = dfa;\n  }" { (expression_statement "addtok_mb(dfa,(uint)buf[0],'\x03');" (call_expression "addtok_mb(dfa,(uint)buf[0],'\x03')" identifier (argument_list "(dfa,(uint)buf[0],'\x03')" ( identifier , (cast_expression "(uint)buf[0]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[0]" identifier [ number_literal ])) , (char_literal "'\x03'" ' escape_sequence ') ))) ;) (expression_statement "dfa_00 = dfa;" (assignment_expression "dfa_00 = dfa" identifier = identifier) ;) }) (else_clause "else {\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }" else (compound_statement "{\n    dfa_00 = dfa;\n    addtok_mb(dfa,(uint)buf[0],'\x01');\n    if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }\n  }" { (expression_statement "dfa_00 = dfa;" (assignment_expression "dfa_00 = dfa" identifier = identifier) ;) (expression_statement "addtok_mb(dfa,(uint)buf[0],'\x01');" (call_expression "addtok_mb(dfa,(uint)buf[0],'\x01')" identifier (argument_list "(dfa,(uint)buf[0],'\x01')" ( identifier , (cast_expression "(uint)buf[0]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[0]" identifier [ number_literal ])) , (char_literal "'\x01'" ' escape_sequence ') ))) ;) (if_statement "if (1 < iVar4) {\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }" if (parenthesized_expression "(1 < iVar4)" ( (binary_expression "1 < iVar4" number_literal < identifier) )) (compound_statement "{\n      pbVar6 = buf + 1;\n      do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);\n    }" { (expression_statement "pbVar6 = buf + 1;" (assignment_expression "pbVar6 = buf + 1" identifier = (binary_expression "buf + 1" identifier + number_literal)) ;) (do_statement "do {\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      } while (buf + iVar4 != pbVar6);" do (compound_statement "{\n        bVar1 = *pbVar6;\n        mbprop = '\x02';\n        if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }\n        pbVar6 = pbVar6 + 1;\n        addtok_mb(dfa,(uint)bVar1,mbprop);\n        dfa_00 = dfa;\n        addtok(dfa,0x105);\n      }" { (expression_statement "bVar1 = *pbVar6;" (assignment_expression "bVar1 = *pbVar6" identifier = (pointer_expression "*pbVar6" * identifier)) ;) (expression_statement "mbprop = '\x02';" (assignment_expression "mbprop = '\x02'" identifier = (char_literal "'\x02'" ' escape_sequence ')) ;) (if_statement "if (iVar4 + -1 != (int)pbVar6 - (int)buf) {\n          mbprop = '\0';\n        }" if (parenthesized_expression "(iVar4 + -1 != (int)pbVar6 - (int)buf)" ( (binary_expression "iVar4 + -1 != (int)pbVar6 - (int)buf" (binary_expression "iVar4 + -1" identifier + number_literal) != (binary_expression "(int)pbVar6 - (int)buf" (cast_expression "(int)pbVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n          mbprop = '\0';\n        }" { (expression_statement "mbprop = '\0';" (assignment_expression "mbprop = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) })) (expression_statement "pbVar6 = pbVar6 + 1;" (assignment_expression "pbVar6 = pbVar6 + 1" identifier = (binary_expression "pbVar6 + 1" identifier + number_literal)) ;) (expression_statement "addtok_mb(dfa,(uint)bVar1,mbprop);" (call_expression "addtok_mb(dfa,(uint)bVar1,mbprop)" identifier (argument_list "(dfa,(uint)bVar1,mbprop)" ( identifier , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier ))) ;) (expression_statement "dfa_00 = dfa;" (assignment_expression "dfa_00 = dfa" identifier = identifier) ;) (expression_statement "addtok(dfa,0x105);" (call_expression "addtok(dfa,0x105)" identifier (argument_list "(dfa,0x105)" ( identifier , number_literal ))) ;) }) while (parenthesized_expression "(buf + iVar4 != pbVar6)" ( (binary_expression "buf + iVar4 != pbVar6" (binary_expression "buf + iVar4" identifier + identifier) != identifier) )) ;) })) }))))) (if_statement "if (iVar3 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    branch(dfa_00);\n    iVar3 = (dfa_00->parse).tok;\n    while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }\n    return;\n  }" if (parenthesized_expression "(iVar3 != *(int *)puVar2)" ( (binary_expression "iVar3 != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    branch(dfa_00);\n    iVar3 = (dfa_00->parse).tok;\n    while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }\n    return;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "branch(dfa_00);" (call_expression "branch(dfa_00)" identifier (argument_list "(dfa_00)" ( identifier ))) ;) (expression_statement "iVar3 = (dfa_00->parse).tok;" (assignment_expression "iVar3 = (dfa_00->parse).tok" identifier = (field_expression "(dfa_00->parse).tok" (parenthesized_expression "(dfa_00->parse)" ( (field_expression "dfa_00->parse" identifier -> field_identifier) )) . field_identifier)) ;) (while_statement "while (iVar3 == 0x106) {\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }" while (parenthesized_expression "(iVar3 == 0x106)" ( (binary_expression "iVar3 == 0x106" identifier == number_literal) )) (compound_statement "{\n      tVar5 = lex(dfa_00);\n      (dfa_00->parse).tok = tVar5;\n      branch(dfa_00);\n      addtok(dfa_00,0x106);\n      iVar3 = (dfa_00->parse).tok;\n    }" { (expression_statement "tVar5 = lex(dfa_00);" (assignment_expression "tVar5 = lex(dfa_00)" identifier = (call_expression "lex(dfa_00)" identifier (argument_list "(dfa_00)" ( identifier )))) ;) (expression_statement "(dfa_00->parse).tok = tVar5;" (assignment_expression "(dfa_00->parse).tok = tVar5" (field_expression "(dfa_00->parse).tok" (parenthesized_expression "(dfa_00->parse)" ( (field_expression "dfa_00->parse" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "branch(dfa_00);" (call_expression "branch(dfa_00)" identifier (argument_list "(dfa_00)" ( identifier ))) ;) (expression_statement "addtok(dfa_00,0x106);" (call_expression "addtok(dfa_00,0x106)" identifier (argument_list "(dfa_00,0x106)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = (dfa_00->parse).tok;" (assignment_expression "iVar3 = (dfa_00->parse).tok" identifier = (field_expression "(dfa_00->parse).tok" (parenthesized_expression "(dfa_00->parse)" ( (field_expression "dfa_00->parse" identifier -> field_identifier) )) . field_identifier)) ;) })) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00477a68(int param_1,undefined4 param_2)\n\n{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00477a68(int param_1,undefined4 param_2)\n\n{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00477a68(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined1 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined1 local_34 [16];" type_identifier (array_declarator "local_34 [16]" identifier [ number_literal ]) ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "puVar2 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar2 = PTR___stack_chk_guard_004b238c" identifier = identifier) ;) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" * (cast_expression "(int *)PTR___stack_chk_guard_004b238c" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);" (assignment_expression "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" identifier = (call_expression "(*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" (parenthesized_expression "(*(code *)PTR_wcrtomb_004b23dc)" ( (pointer_expression "*(code *)PTR_wcrtomb_004b23dc" * (cast_expression "(code *)PTR_wcrtomb_004b23dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_34,param_2,&local_3c)" ( identifier , identifier , (pointer_expression "&local_3c" & identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }" { (expression_statement "local_34[0] = 0;" (assignment_expression "local_34[0] = 0" (subscript_expression "local_34[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "FUN_00477748(param_1,0,3);" (call_expression "FUN_00477748(param_1,0,3)" identifier (argument_list "(param_1,0,3)" ( identifier , number_literal , number_literal ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) }) (else_clause "else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" else (if_statement "if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }" { (expression_statement "FUN_00477748(param_1,local_34[0],3);" (call_expression "FUN_00477748(param_1,local_34[0],3)" identifier (argument_list "(param_1,local_34[0],3)" ( identifier , (subscript_expression "local_34[0]" identifier [ number_literal ]) , number_literal ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) }) (else_clause "else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" else (compound_statement "{\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" { (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) (expression_statement "FUN_00477748(param_1,local_34[0],1);" (call_expression "FUN_00477748(param_1,local_34[0],1)" identifier (argument_list "(param_1,local_34[0],1)" ( identifier , (subscript_expression "local_34[0]" identifier [ number_literal ]) , number_literal ))) ;) (if_statement "if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" if (parenthesized_expression "(1 < iVar3)" ( (binary_expression "1 < iVar3" number_literal < identifier) )) (compound_statement "{\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" { (expression_statement "puVar6 = local_34 + 1;" (assignment_expression "puVar6 = local_34 + 1" identifier = (binary_expression "local_34 + 1" identifier + number_literal)) ;) (do_statement "do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);" do (compound_statement "{\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      }" { (expression_statement "uVar1 = *puVar6;" (assignment_expression "uVar1 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) (if_statement "if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }" if (parenthesized_expression "(iVar3 + -1 != (int)puVar6 - (int)local_34)" ( (binary_expression "iVar3 + -1 != (int)puVar6 - (int)local_34" (binary_expression "iVar3 + -1" identifier + number_literal) != (binary_expression "(int)puVar6 - (int)local_34" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_34" ( (type_descriptor "int" primitive_type) ) identifier))) )) (compound_statement "{\n          uVar4 = 0;\n        }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" identifier = (binary_expression "puVar6 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00477748(param_1,uVar1,uVar4);" (call_expression "FUN_00477748(param_1,uVar1,uVar4)" identifier (argument_list "(param_1,uVar1,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" identifier = identifier) ;) (expression_statement "FUN_0047796c(param_1,0x105);" (call_expression "FUN_0047796c(param_1,0x105)" identifier (argument_list "(param_1,0x105)" ( identifier , number_literal ))) ;) }) while (parenthesized_expression "(local_34 + iVar3 != puVar6)" ( (binary_expression "local_34 + iVar3 != puVar6" (binary_expression "local_34 + iVar3" identifier + identifier) != identifier) )) ;) })) }))))) (if_statement "if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" if (parenthesized_expression "(local_24 != *(int *)puVar2)" ( (binary_expression "local_24 != *(int *)puVar2" identifier != (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" { (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" * (cast_expression "(code *)PTR___stack_chk_fail_004b2348" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_00478130();" (call_expression "FUN_00478130()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" identifier = (pointer_expression "*(int *)(iVar5 + 0x44)" * (cast_expression "(int *)(iVar5 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) ))))) ;) (while_statement "while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" while (parenthesized_expression "(iVar3 == 0x106)" ( (binary_expression "iVar3 == 0x106" identifier == number_literal) )) (compound_statement "{\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" { (expression_statement "uVar4 = FUN_00476c6c(iVar5);" (assignment_expression "uVar4 = FUN_00476c6c(iVar5)" identifier = (call_expression "FUN_00476c6c(iVar5)" identifier (argument_list "(iVar5)" ( identifier )))) ;) (expression_statement "*(undefined4 *)(iVar5 + 0x44) = uVar4;" (assignment_expression "*(undefined4 *)(iVar5 + 0x44) = uVar4" (pointer_expression "*(undefined4 *)(iVar5 + 0x44)" * (cast_expression "(undefined4 *)(iVar5 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_00478130(iVar5);" (call_expression "FUN_00478130(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "FUN_0047796c(iVar5,0x106);" (call_expression "FUN_0047796c(iVar5,0x106)" identifier (argument_list "(iVar5,0x106)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" identifier = (pointer_expression "*(int *)(iVar5 + 0x44)" * (cast_expression "(int *)(iVar5 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x44)" ( (binary_expression "iVar5 + 0x44" identifier + number_literal) ))))) ;) })) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) })) }))))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (return_statement return ;) })) (return_statement return ;) })))
(function_definition "void FUN_00477a68(int param_1,undefined4 param_2)\n\n{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00477a68(int param_1,undefined4 param_2)" (identifier "FUN_00477a68") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined1 *puVar6;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined1 local_34 [16];\n  int local_24;\n  \n  puVar2 = PTR___stack_chk_guard_004b238c;\n  local_3c = 0;\n  local_38 = 0;\n  local_24 = *(int *)PTR___stack_chk_guard_004b238c;\n  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);\n  if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }\n  if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }\n  return;\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined1 *puVar6;" (type_identifier "undefined1") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "undefined4 local_3c;" (type_identifier "undefined4") (identifier "local_3c") (; ";")) (declaration "undefined4 local_38;" (type_identifier "undefined4") (identifier "local_38") (; ";")) (declaration "undefined1 local_34 [16];" (type_identifier "undefined1") (array_declarator "local_34 [16]" (identifier "local_34") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (expression_statement "puVar2 = PTR___stack_chk_guard_004b238c;" (assignment_expression "puVar2 = PTR___stack_chk_guard_004b238c" (identifier "puVar2") (= "=") (identifier "PTR___stack_chk_guard_004b238c")) (; ";")) (expression_statement "local_3c = 0;" (assignment_expression "local_3c = 0" (identifier "local_3c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" (identifier "local_38") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_24 = *(int *)PTR___stack_chk_guard_004b238c;" (assignment_expression "local_24 = *(int *)PTR___stack_chk_guard_004b238c" (identifier "local_24") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_004b238c" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_004b238c" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_004b238c")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);" (assignment_expression "iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c)" (parenthesized_expression "(*(code *)PTR_wcrtomb_004b23dc)" (( "(") (pointer_expression "*(code *)PTR_wcrtomb_004b23dc" (* "*") (cast_expression "(code *)PTR_wcrtomb_004b23dc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wcrtomb_004b23dc"))) () ")")) (argument_list "(local_34,param_2,&local_3c)" (( "(") (identifier "local_34") (, ",") (identifier "param_2") (, ",") (pointer_expression "&local_3c" (& "&") (identifier "local_3c")) () ")")))) (; ";")) (if_statement "if (iVar3 == -1) {\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }\n  else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 == -1)" (( "(") (binary_expression "iVar3 == -1" (identifier "iVar3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    local_34[0] = 0;\n    FUN_00477748(param_1,0,3);\n    iVar5 = param_1;\n  }" ({ "{") (expression_statement "local_34[0] = 0;" (assignment_expression "local_34[0] = 0" (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_00477748(param_1,0,3);" (call_expression "FUN_00477748(param_1,0,3)" (identifier "FUN_00477748") (argument_list "(param_1,0,3)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "3") () ")"))) (; ";")) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" (identifier "iVar5") (= "=") (identifier "param_1")) (; ";")) (} "}")) (else_clause "else if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" (else "else") (if_statement "if (iVar3 == 1) {\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }\n  else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    FUN_00477748(param_1,local_34[0],3);\n    iVar5 = param_1;\n  }" ({ "{") (expression_statement "FUN_00477748(param_1,local_34[0],3);" (call_expression "FUN_00477748(param_1,local_34[0],3)" (identifier "FUN_00477748") (argument_list "(param_1,local_34[0],3)" (( "(") (identifier "param_1") (, ",") (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) (, ",") (number_literal "3") () ")"))) (; ";")) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" (identifier "iVar5") (= "=") (identifier "param_1")) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" (else "else") (compound_statement "{\n    iVar5 = param_1;\n    FUN_00477748(param_1,local_34[0],1);\n    if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }\n  }" ({ "{") (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" (identifier "iVar5") (= "=") (identifier "param_1")) (; ";")) (expression_statement "FUN_00477748(param_1,local_34[0],1);" (call_expression "FUN_00477748(param_1,local_34[0],1)" (identifier "FUN_00477748") (argument_list "(param_1,local_34[0],1)" (( "(") (identifier "param_1") (, ",") (subscript_expression "local_34[0]" (identifier "local_34") ([ "[") (number_literal "0") (] "]")) (, ",") (number_literal "1") () ")"))) (; ";")) (if_statement "if (1 < iVar3) {\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" (if "if") (parenthesized_expression "(1 < iVar3)" (( "(") (binary_expression "1 < iVar3" (number_literal "1") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n      puVar6 = local_34 + 1;\n      do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);\n    }" ({ "{") (expression_statement "puVar6 = local_34 + 1;" (assignment_expression "puVar6 = local_34 + 1" (identifier "puVar6") (= "=") (binary_expression "local_34 + 1" (identifier "local_34") (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      } while (local_34 + iVar3 != puVar6);" (do "do") (compound_statement "{\n        uVar1 = *puVar6;\n        uVar4 = 2;\n        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }\n        puVar6 = puVar6 + 1;\n        FUN_00477748(param_1,uVar1,uVar4);\n        iVar5 = param_1;\n        FUN_0047796c(param_1,0x105);\n      }" ({ "{") (expression_statement "uVar1 = *puVar6;" (assignment_expression "uVar1 = *puVar6" (identifier "uVar1") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" (identifier "uVar4") (= "=") (number_literal "2")) (; ";")) (if_statement "if (iVar3 + -1 != (int)puVar6 - (int)local_34) {\n          uVar4 = 0;\n        }" (if "if") (parenthesized_expression "(iVar3 + -1 != (int)puVar6 - (int)local_34)" (( "(") (binary_expression "iVar3 + -1 != (int)puVar6 - (int)local_34" (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1")) (!= "!=") (binary_expression "(int)puVar6 - (int)local_34" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (- "-") (cast_expression "(int)local_34" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_34")))) () ")")) (compound_statement "{\n          uVar4 = 0;\n        }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "puVar6 = puVar6 + 1;" (assignment_expression "puVar6 = puVar6 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + 1" (identifier "puVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_00477748(param_1,uVar1,uVar4);" (call_expression "FUN_00477748(param_1,uVar1,uVar4)" (identifier "FUN_00477748") (argument_list "(param_1,uVar1,uVar4)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "iVar5 = param_1;" (assignment_expression "iVar5 = param_1" (identifier "iVar5") (= "=") (identifier "param_1")) (; ";")) (expression_statement "FUN_0047796c(param_1,0x105);" (call_expression "FUN_0047796c(param_1,0x105)" (identifier "FUN_0047796c") (argument_list "(param_1,0x105)" (( "(") (identifier "param_1") (, ",") (number_literal "0x105") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(local_34 + iVar3 != puVar6)" (( "(") (binary_expression "local_34 + iVar3 != puVar6" (binary_expression "local_34 + iVar3" (identifier "local_34") (+ "+") (identifier "iVar3")) (!= "!=") (identifier "puVar6")) () ")")) (; ";")) (} "}"))) (} "}")))))) (if_statement "if (local_24 != *(int *)puVar2) {\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" (if "if") (parenthesized_expression "(local_24 != *(int *)puVar2)" (( "(") (binary_expression "local_24 != *(int *)puVar2" (identifier "local_24") (!= "!=") (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2")))) () ")")) (compound_statement "{\n    (*(code *)PTR___stack_chk_fail_004b2348)();\n    FUN_00478130();\n    iVar3 = *(int *)(iVar5 + 0x44);\n    while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }\n    return;\n  }" ({ "{") (expression_statement "(*(code *)PTR___stack_chk_fail_004b2348)();" (call_expression "(*(code *)PTR___stack_chk_fail_004b2348)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_004b2348)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_004b2348" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_004b2348" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_004b2348"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00478130();" (call_expression "FUN_00478130()" (identifier "FUN_00478130") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar5 + 0x44)" (* "*") (cast_expression "(int *)(iVar5 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x44)" (( "(") (binary_expression "iVar5 + 0x44" (identifier "iVar5") (+ "+") (number_literal "0x44")) () ")"))))) (; ";")) (while_statement "while (iVar3 == 0x106) {\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" (while "while") (parenthesized_expression "(iVar3 == 0x106)" (( "(") (binary_expression "iVar3 == 0x106" (identifier "iVar3") (== "==") (number_literal "0x106")) () ")")) (compound_statement "{\n      uVar4 = FUN_00476c6c(iVar5);\n      *(undefined4 *)(iVar5 + 0x44) = uVar4;\n      FUN_00478130(iVar5);\n      FUN_0047796c(iVar5,0x106);\n      iVar3 = *(int *)(iVar5 + 0x44);\n    }" ({ "{") (expression_statement "uVar4 = FUN_00476c6c(iVar5);" (assignment_expression "uVar4 = FUN_00476c6c(iVar5)" (identifier "uVar4") (= "=") (call_expression "FUN_00476c6c(iVar5)" (identifier "FUN_00476c6c") (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar5 + 0x44) = uVar4;" (assignment_expression "*(undefined4 *)(iVar5 + 0x44) = uVar4" (pointer_expression "*(undefined4 *)(iVar5 + 0x44)" (* "*") (cast_expression "(undefined4 *)(iVar5 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x44)" (( "(") (binary_expression "iVar5 + 0x44" (identifier "iVar5") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "FUN_00478130(iVar5);" (call_expression "FUN_00478130(iVar5)" (identifier "FUN_00478130") (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")"))) (; ";")) (expression_statement "FUN_0047796c(iVar5,0x106);" (call_expression "FUN_0047796c(iVar5,0x106)" (identifier "FUN_0047796c") (argument_list "(iVar5,0x106)" (( "(") (identifier "iVar5") (, ",") (number_literal "0x106") () ")"))) (; ";")) (expression_statement "iVar3 = *(int *)(iVar5 + 0x44);" (assignment_expression "iVar3 = *(int *)(iVar5 + 0x44)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(iVar5 + 0x44)" (* "*") (cast_expression "(int *)(iVar5 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x44)" (( "(") (binary_expression "iVar5 + 0x44" (identifier "iVar5") (+ "+") (number_literal "0x44")) () ")"))))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(type_1 *type_1,type_2 wc)

{
  type_3 bVar1;
  type_4 *puVar2;
  int var_6;
  int var_1;
  char mbprop;
  type_5 tVar5;
  type_1 *dfa_00;
  type_3 *var_4;
  type_6 s;
  type_7 var_3 [16];
  
  puVar2 = PTR___stack_chk_guard_004b238c;
  s.__count = 0;
  s.__value.__wch = 0;
  var_6 = *(int *)PTR___stack_chk_guard_004b238c;
  var_1 = (*(type_8 *)PTR_wcrtomb_004b23dc)(var_3,wc,&s);
  if (var_1 == -1) {
    var_3[0] = '\0';
    var_2(type_1,0,'\x03');
    dfa_00 = type_1;
  }
  else if (var_1 == 1) {
    var_2(type_1,(type_9)var_3[0],'\x03');
    dfa_00 = type_1;
  }
  else {
    dfa_00 = type_1;
    var_2(type_1,(type_9)var_3[0],'\x01');
    if (1 < var_1) {
      var_4 = var_3 + 1;
      do {
        bVar1 = *var_4;
        mbprop = '\x02';
        if (var_1 + -1 != (int)var_4 - (int)var_3) {
          mbprop = '\0';
        }
        var_4 = var_4 + 1;
        var_2(type_1,(type_9)bVar1,mbprop);
        dfa_00 = type_1;
        var_5(type_1,0x105);
      } while (var_3 + var_1 != var_4);
    }
  }
  if (var_6 != *(int *)puVar2) {
    (*(type_8 *)PTR___stack_chk_fail_004b2348)();
    var_7(dfa_00);
    var_6 = (dfa_00->parse).tok;
    while (var_6 == 0x106) {
      tVar5 = var_8(dfa_00);
      (dfa_00->parse).tok = tVar5;
      var_7(dfa_00);
      var_5(dfa_00,0x106);
      var_6 = (dfa_00->parse).tok;
    }
    return;
  }
  return;
}


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

void MASKED(int param_1,undefined4 param_2)

{
  undefined1 uVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  undefined1 *puVar6;
  undefined4 local_3c;
  undefined4 local_38;
  undefined1 local_34 [16];
  int local_24;
  
  puVar2 = PTR___stack_chk_guard_004b238c;
  local_3c = 0;
  local_38 = 0;
  local_24 = *(int *)PTR___stack_chk_guard_004b238c;
  iVar3 = (*(code *)PTR_wcrtomb_004b23dc)(local_34,param_2,&local_3c);
  if (iVar3 == -1) {
    local_34[0] = 0;
    FUN_00477748(param_1,0,3);
    iVar5 = param_1;
  }
  else if (iVar3 == 1) {
    FUN_00477748(param_1,local_34[0],3);
    iVar5 = param_1;
  }
  else {
    iVar5 = param_1;
    FUN_00477748(param_1,local_34[0],1);
    if (1 < iVar3) {
      puVar6 = local_34 + 1;
      do {
        uVar1 = *puVar6;
        uVar4 = 2;
        if (iVar3 + -1 != (int)puVar6 - (int)local_34) {
          uVar4 = 0;
        }
        puVar6 = puVar6 + 1;
        FUN_00477748(param_1,uVar1,uVar4);
        iVar5 = param_1;
        FUN_0047796c(param_1,0x105);
      } while (local_34 + iVar3 != puVar6);
    }
  }
  if (local_24 != *(int *)puVar2) {
    (*(code *)PTR___stack_chk_fail_004b2348)();
    FUN_00478130();
    iVar3 = *(int *)(iVar5 + 0x44);
    while (iVar3 == 0x106) {
      uVar4 = FUN_00476c6c(iVar5);
      *(undefined4 *)(iVar5 + 0x44) = uVar4;
      FUN_00478130(iVar5);
      FUN_0047796c(iVar5,0x106);
      iVar3 = *(int *)(iVar5 + 0x44);
    }
    return;
  }
  return;
}

