
wchar_t * end_wpattern(wchar_t *pattern)

{
  undefined *puVar1;
  wchar_t *pwVar2;
  int iVar3;
  undefined4 uVar4;
  int *piVar5;
  code *pcVar6;
  undefined *puVar7;
  
  puVar1 = PTR_DAT_0004a208;
  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);
  puVar7 = PTR_DAT_0004a224 + -0x7e84;
  pwVar2 = pattern;
  do {
    while( true ) {
      piVar5 = pwVar2;
      iVar3 = piVar5[1];
      if (iVar3 == 0) {
        return pattern;
      }
      if (iVar3 == 0x5b) break;
      pwVar2 = piVar5 + 1;
      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {
        if (piVar5[2] == 0x28) {
          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);
        }
      }
      else if (iVar3 == 0x29) {
        return piVar5 + 2;
      }
    }
    if (*(int *)(puVar1 + -0x4830) == 0) {
      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);
      uVar4 = 0xffffffff;
      if (iVar3 != 0) {
        uVar4 = 1;
      }
      *(undefined4 *)(puVar1 + -0x4830) = uVar4;
    }
    pwVar2 = piVar5 + 2;
    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {
      pwVar2 = piVar5 + 3;
    }
    if (*pwVar2 == 0x5d) {
      pwVar2 = pwVar2 + 1;
    }
    while (iVar3 = *pwVar2, iVar3 != 0x5d) {
      pwVar2 = pwVar2 + 1;
      if (iVar3 == 0) {
        return pattern;
      }
    }
  } while( true );
}



int * FUN_0002b690(int *param_1)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  undefined4 uVar4;
  int *piVar5;
  code *pcVar6;
  undefined *puVar7;
  
  puVar1 = PTR_DAT_0004a208;
  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);
  puVar7 = PTR_DAT_0004a224 + -0x7e84;
  piVar2 = param_1;
  do {
    while( true ) {
      piVar5 = piVar2;
      iVar3 = piVar5[1];
      if (iVar3 == 0) {
        return param_1;
      }
      if (iVar3 == 0x5b) break;
      piVar2 = piVar5 + 1;
      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {
        if (piVar5[2] == 0x28) {
          piVar2 = (int *)(*pcVar6)(piVar5 + 2);
        }
      }
      else if (iVar3 == 0x29) {
        return piVar5 + 2;
      }
    }
    if (*(int *)(puVar1 + -0x4830) == 0) {
      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);
      uVar4 = 0xffffffff;
      if (iVar3 != 0) {
        uVar4 = 1;
      }
      *(undefined4 *)(puVar1 + -0x4830) = uVar4;
    }
    piVar2 = piVar5 + 2;
    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {
      piVar2 = piVar5 + 3;
    }
    if (*piVar2 == 0x5d) {
      piVar2 = piVar2 + 1;
    }
    while (iVar3 = *piVar2, iVar3 != 0x5d) {
      piVar2 = piVar2 + 1;
      if (iVar3 == 0) {
        return param_1;
      }
    }
  } while( true );
}


lui gp,0x2
addiu gp,gp,0x6b50
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s4,0x28(sp)
sw s3,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
or s3,a0,zero
or s0,a0,zero
lw s1,-0x7fc8(gp)
addiu s1,s1,-0x4970
lw s4,-0x7fd8(gp)
lw s2,-0x7fbc(gp)
b 0x0002b7b4
_addiu s2,s2,-0x7e84
lw v0,-0x4830(s4)
beq v0,zero,0x0002b75c
_or a0,s2,zero
lw v1,0x8(s0)
li a0,0x21
beq v1,a0,0x0002b70c
_addiu v0,s0,0x8
lw a0,-0x4830(s4)
bgez a0,0x0002b710
_li a0,0x5e
bne v1,a0,0x0002b710
_nop
addiu v0,s0,0xc
lw a0,0x0(v0)
li v1,0x5d
beq a0,v1,0x0002b780
_nop
li a0,0x5d
lw v1,0x0(v0)
beq v1,a0,0x0002b7b4
_or s0,v0,zero
bne v1,zero,0x0002b724
_addiu v0,v0,0x4
or v0,s3,zero
lw ra,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7c74(gp)
jalr t9
_nop
lw gp,0x10(sp)
li v1,0x1
li a0,-0x1
movn a0,v1,v0
b 0x0002b6e8
_sw a0,-0x4830(s4)
b 0x0002b720
_addiu v0,v0,0x4
or t9,s1,zero
jalr t9
_nop
lw gp,0x10(sp)
b 0x0002b7b4
_or s0,v0,zero
lw a0,0x8(s0)
li v1,0x28
beq a0,v1,0x0002b788
_addiu a0,s0,0x8
or s0,v0,zero
lw v1,0x4(s0)
beq v1,zero,0x0002b738
_addiu v0,s0,0x4
li a0,0x5b
beq v1,a0,0x0002b6dc
_addiu a0,v1,-0x21
sltiu a1,a0,0x20
beq a1,zero,0x0002b7ec
_lui a1,0xc000
addiu a1,a1,0x601
srlv a0,a1,a0
andi a0,a0,0x1
bne a0,zero,0x0002b7a0
_nop
li a0,0x29
bne v1,a0,0x0002b7b0
_nop
b 0x0002b738
_addiu s3,s0,0x8
(translation_unit "int * FUN_0002b690(int *param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}\n\n" (function_definition "int * FUN_0002b690(int *param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" primitive_type (pointer_declarator "* FUN_0002b690(int *param_1)" * (function_declarator "FUN_0002b690(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "code *pcVar6;" type_identifier (pointer_declarator "*pcVar6" * identifier) ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (expression_statement "puVar1 = PTR_DAT_0004a208;" (assignment_expression "puVar1 = PTR_DAT_0004a208" identifier = identifier) ;) (expression_statement "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);" (assignment_expression "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970)" identifier = (cast_expression "(code *)(PTR_LAB_0004a218 + -0x4970)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_0004a218 + -0x4970)" ( (binary_expression "PTR_LAB_0004a218 + -0x4970" identifier + number_literal) )))) ;) (expression_statement "puVar7 = PTR_DAT_0004a224 + -0x7e84;" (assignment_expression "puVar7 = PTR_DAT_0004a224 + -0x7e84" identifier = (binary_expression "PTR_DAT_0004a224 + -0x7e84" identifier + number_literal)) ;) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" identifier = identifier) ;) (do_statement "do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );" do (compound_statement "{\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" { (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (expression_statement "iVar3 = piVar5[1];" (assignment_expression "iVar3 = piVar5[1]" identifier = (subscript_expression "piVar5[1]" identifier [ number_literal ])) ;) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (if_statement "if (iVar3 == 0x5b) break;" if (parenthesized_expression "(iVar3 == 0x5b)" ( (binary_expression "iVar3 == 0x5b" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = piVar5 + 1;" (assignment_expression "piVar2 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0))" ( (binary_expression "(iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" (parenthesized_expression "(iVar3 - 0x21U < 0x20)" ( (binary_expression "iVar3 - 0x21U < 0x20" (binary_expression "iVar3 - 0x21U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" ( (binary_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0" (parenthesized_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1)" ( (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1" (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f)" number_literal >> (parenthesized_expression "(iVar3 - 0x21U & 0x1f)" ( (binary_expression "iVar3 - 0x21U & 0x1f" (binary_expression "iVar3 - 0x21U" identifier - number_literal) & number_literal) ))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }" { (if_statement "if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" if (parenthesized_expression "(piVar5[2] == 0x28)" ( (binary_expression "piVar5[2] == 0x28" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" { (expression_statement "piVar2 = (int *)(*pcVar6)(piVar5 + 2);" (assignment_expression "piVar2 = (int *)(*pcVar6)(piVar5 + 2)" identifier = (cast_expression "(int *)(*pcVar6)(piVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*pcVar6)(piVar5 + 2)" (parenthesized_expression "(*pcVar6)" ( (pointer_expression "*pcVar6" * identifier) )) (argument_list "(piVar5 + 2)" ( (binary_expression "piVar5 + 2" identifier + number_literal) ))))) ;) })) }) (else_clause "else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" else (if_statement "if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "(iVar3 == 0x29)" ( (binary_expression "iVar3 == 0x29" identifier == number_literal) )) (compound_statement "{\n        return piVar5 + 2;\n      }" { (return_statement "return piVar5 + 2;" return (binary_expression "piVar5 + 2" identifier + number_literal) ;) })))) })) (if_statement "if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" if (parenthesized_expression "(*(int *)(puVar1 + -0x4830) == 0)" ( (binary_expression "*(int *)(puVar1 + -0x4830) == 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" { (expression_statement "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);" (assignment_expression "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7)" identifier = (call_expression "(*(code *)PTR_getenv_0004a56c)(puVar7)" (parenthesized_expression "(*(code *)PTR_getenv_0004a56c)" ( (pointer_expression "*(code *)PTR_getenv_0004a56c" * (cast_expression "(code *)PTR_getenv_0004a56c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7)" ( identifier )))) ;) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = 1;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = 1;\n      }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "*(undefined4 *)(puVar1 + -0x4830) = uVar4;" (assignment_expression "*(undefined4 *)(puVar1 + -0x4830) = uVar4" (pointer_expression "*(undefined4 *)(puVar1 + -0x4830)" * (cast_expression "(undefined4 *)(puVar1 + -0x4830)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "piVar2 = piVar5 + 2;" (assignment_expression "piVar2 = piVar5 + 2" identifier = (binary_expression "piVar5 + 2" identifier + number_literal)) ;) (if_statement "if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }" if (parenthesized_expression "((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))))" ( (binary_expression "(piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" (parenthesized_expression "(piVar5[2] == 0x21)" ( (binary_expression "piVar5[2] == 0x21" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" ( (parenthesized_expression "(*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))" ( (binary_expression "*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)" (binary_expression "*(int *)(puVar1 + -0x4830) < 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) < number_literal) && (parenthesized_expression "(piVar5[2] == 0x5e)" ( (binary_expression "piVar5[2] == 0x5e" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (compound_statement "{\n      piVar2 = piVar5 + 3;\n    }" { (expression_statement "piVar2 = piVar5 + 3;" (assignment_expression "piVar2 = piVar5 + 3" identifier = (binary_expression "piVar5 + 3" identifier + number_literal)) ;) })) (if_statement "if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }" if (parenthesized_expression "(*piVar2 == 0x5d)" ( (binary_expression "*piVar2 == 0x5d" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      piVar2 = piVar2 + 1;\n    }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) })) (while_statement "while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" while (parenthesized_expression "(iVar3 = *piVar2, iVar3 != 0x5d)" ( (comma_expression "iVar3 = *piVar2, iVar3 != 0x5d" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) , (binary_expression "iVar3 != 0x5d" identifier != number_literal)) )) (compound_statement "{\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "wchar_t * end_wpattern(wchar_t *pattern)\n\n{\n  undefined *puVar1;\n  wchar_t *pwVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  pwVar2 = pattern;\n  do {\n    while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    pwVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }\n    if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }\n    while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }\n  } while( true );\n}\n\n" (function_definition "wchar_t * end_wpattern(wchar_t *pattern)\n\n{\n  undefined *puVar1;\n  wchar_t *pwVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  pwVar2 = pattern;\n  do {\n    while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    pwVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }\n    if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }\n    while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }\n  } while( true );\n}" type_identifier (pointer_declarator "* end_wpattern(wchar_t *pattern)" * (function_declarator "end_wpattern(wchar_t *pattern)" identifier (parameter_list "(wchar_t *pattern)" ( (parameter_declaration "wchar_t *pattern" type_identifier (pointer_declarator "*pattern" * identifier)) )))) (compound_statement "{\n  undefined *puVar1;\n  wchar_t *pwVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  pwVar2 = pattern;\n  do {\n    while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    pwVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }\n    if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }\n    while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "code *pcVar6;" type_identifier (pointer_declarator "*pcVar6" * identifier) ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (expression_statement "puVar1 = PTR_DAT_0004a208;" (assignment_expression "puVar1 = PTR_DAT_0004a208" identifier = identifier) ;) (expression_statement "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);" (assignment_expression "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970)" identifier = (cast_expression "(code *)(PTR_LAB_0004a218 + -0x4970)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_0004a218 + -0x4970)" ( (binary_expression "PTR_LAB_0004a218 + -0x4970" identifier + number_literal) )))) ;) (expression_statement "puVar7 = PTR_DAT_0004a224 + -0x7e84;" (assignment_expression "puVar7 = PTR_DAT_0004a224 + -0x7e84" identifier = (binary_expression "PTR_DAT_0004a224 + -0x7e84" identifier + number_literal)) ;) (expression_statement "pwVar2 = pattern;" (assignment_expression "pwVar2 = pattern" identifier = identifier) ;) (do_statement "do {\n    while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    pwVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }\n    if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }\n    while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }\n  } while( true );" do (compound_statement "{\n    while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    pwVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }\n    if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }\n    while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar5 = pwVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return pattern;\n      }\n      if (iVar3 == 0x5b) break;\n      pwVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" { (expression_statement "piVar5 = pwVar2;" (assignment_expression "piVar5 = pwVar2" identifier = identifier) ;) (expression_statement "iVar3 = piVar5[1];" (assignment_expression "iVar3 = piVar5[1]" identifier = (subscript_expression "piVar5[1]" identifier [ number_literal ])) ;) (if_statement "if (iVar3 == 0) {\n        return pattern;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return pattern;\n      }" { (return_statement "return pattern;" return identifier ;) })) (if_statement "if (iVar3 == 0x5b) break;" if (parenthesized_expression "(iVar3 == 0x5b)" ( (binary_expression "iVar3 == 0x5b" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "pwVar2 = piVar5 + 1;" (assignment_expression "pwVar2 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0))" ( (binary_expression "(iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" (parenthesized_expression "(iVar3 - 0x21U < 0x20)" ( (binary_expression "iVar3 - 0x21U < 0x20" (binary_expression "iVar3 - 0x21U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" ( (binary_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0" (parenthesized_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1)" ( (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1" (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f)" number_literal >> (parenthesized_expression "(iVar3 - 0x21U & 0x1f)" ( (binary_expression "iVar3 - 0x21U & 0x1f" (binary_expression "iVar3 - 0x21U" identifier - number_literal) & number_literal) ))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n        if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }\n      }" { (if_statement "if (piVar5[2] == 0x28) {\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }" if (parenthesized_expression "(piVar5[2] == 0x28)" ( (binary_expression "piVar5[2] == 0x28" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);\n        }" { (expression_statement "pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2);" (assignment_expression "pwVar2 = (wchar_t *)(*pcVar6)(piVar5 + 2)" identifier = (cast_expression "(wchar_t *)(*pcVar6)(piVar5 + 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*pcVar6)(piVar5 + 2)" (parenthesized_expression "(*pcVar6)" ( (pointer_expression "*pcVar6" * identifier) )) (argument_list "(piVar5 + 2)" ( (binary_expression "piVar5 + 2" identifier + number_literal) ))))) ;) })) }) (else_clause "else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" else (if_statement "if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "(iVar3 == 0x29)" ( (binary_expression "iVar3 == 0x29" identifier == number_literal) )) (compound_statement "{\n        return piVar5 + 2;\n      }" { (return_statement "return piVar5 + 2;" return (binary_expression "piVar5 + 2" identifier + number_literal) ;) })))) })) (if_statement "if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" if (parenthesized_expression "(*(int *)(puVar1 + -0x4830) == 0)" ( (binary_expression "*(int *)(puVar1 + -0x4830) == 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" { (expression_statement "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);" (assignment_expression "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7)" identifier = (call_expression "(*(code *)PTR_getenv_0004a56c)(puVar7)" (parenthesized_expression "(*(code *)PTR_getenv_0004a56c)" ( (pointer_expression "*(code *)PTR_getenv_0004a56c" * (cast_expression "(code *)PTR_getenv_0004a56c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7)" ( identifier )))) ;) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = 1;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = 1;\n      }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "*(undefined4 *)(puVar1 + -0x4830) = uVar4;" (assignment_expression "*(undefined4 *)(puVar1 + -0x4830) = uVar4" (pointer_expression "*(undefined4 *)(puVar1 + -0x4830)" * (cast_expression "(undefined4 *)(puVar1 + -0x4830)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "pwVar2 = piVar5 + 2;" (assignment_expression "pwVar2 = piVar5 + 2" identifier = (binary_expression "piVar5 + 2" identifier + number_literal)) ;) (if_statement "if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      pwVar2 = piVar5 + 3;\n    }" if (parenthesized_expression "((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))))" ( (binary_expression "(piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" (parenthesized_expression "(piVar5[2] == 0x21)" ( (binary_expression "piVar5[2] == 0x21" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" ( (parenthesized_expression "(*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))" ( (binary_expression "*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)" (binary_expression "*(int *)(puVar1 + -0x4830) < 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) < number_literal) && (parenthesized_expression "(piVar5[2] == 0x5e)" ( (binary_expression "piVar5[2] == 0x5e" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (compound_statement "{\n      pwVar2 = piVar5 + 3;\n    }" { (expression_statement "pwVar2 = piVar5 + 3;" (assignment_expression "pwVar2 = piVar5 + 3" identifier = (binary_expression "piVar5 + 3" identifier + number_literal)) ;) })) (if_statement "if (*pwVar2 == 0x5d) {\n      pwVar2 = pwVar2 + 1;\n    }" if (parenthesized_expression "(*pwVar2 == 0x5d)" ( (binary_expression "*pwVar2 == 0x5d" (pointer_expression "*pwVar2" * identifier) == number_literal) )) (compound_statement "{\n      pwVar2 = pwVar2 + 1;\n    }" { (expression_statement "pwVar2 = pwVar2 + 1;" (assignment_expression "pwVar2 = pwVar2 + 1" identifier = (binary_expression "pwVar2 + 1" identifier + number_literal)) ;) })) (while_statement "while (iVar3 = *pwVar2, iVar3 != 0x5d) {\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }" while (parenthesized_expression "(iVar3 = *pwVar2, iVar3 != 0x5d)" ( (comma_expression "iVar3 = *pwVar2, iVar3 != 0x5d" (assignment_expression "iVar3 = *pwVar2" identifier = (pointer_expression "*pwVar2" * identifier)) , (binary_expression "iVar3 != 0x5d" identifier != number_literal)) )) (compound_statement "{\n      pwVar2 = pwVar2 + 1;\n      if (iVar3 == 0) {\n        return pattern;\n      }\n    }" { (expression_statement "pwVar2 = pwVar2 + 1;" (assignment_expression "pwVar2 = pwVar2 + 1" identifier = (binary_expression "pwVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n        return pattern;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return pattern;\n      }" { (return_statement "return pattern;" return identifier ;) })) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int * FUN_0002b690(int *param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}\n\n" (function_definition "int * FUN_0002b690(int *param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" primitive_type (pointer_declarator "* FUN_0002b690(int *param_1)" * (function_declarator "FUN_0002b690(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "code *pcVar6;" type_identifier (pointer_declarator "*pcVar6" * identifier) ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (expression_statement "puVar1 = PTR_DAT_0004a208;" (assignment_expression "puVar1 = PTR_DAT_0004a208" identifier = identifier) ;) (expression_statement "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);" (assignment_expression "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970)" identifier = (cast_expression "(code *)(PTR_LAB_0004a218 + -0x4970)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_0004a218 + -0x4970)" ( (binary_expression "PTR_LAB_0004a218 + -0x4970" identifier + number_literal) )))) ;) (expression_statement "puVar7 = PTR_DAT_0004a224 + -0x7e84;" (assignment_expression "puVar7 = PTR_DAT_0004a224 + -0x7e84" identifier = (binary_expression "PTR_DAT_0004a224 + -0x7e84" identifier + number_literal)) ;) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" identifier = identifier) ;) (do_statement "do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );" do (compound_statement "{\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  }" { (while_statement "while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" { (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" identifier = identifier) ;) (expression_statement "iVar3 = piVar5[1];" (assignment_expression "iVar3 = piVar5[1]" identifier = (subscript_expression "piVar5[1]" identifier [ number_literal ])) ;) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (if_statement "if (iVar3 == 0x5b) break;" if (parenthesized_expression "(iVar3 == 0x5b)" ( (binary_expression "iVar3 == 0x5b" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = piVar5 + 1;" (assignment_expression "piVar2 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0))" ( (binary_expression "(iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" (parenthesized_expression "(iVar3 - 0x21U < 0x20)" ( (binary_expression "iVar3 - 0x21U < 0x20" (binary_expression "iVar3 - 0x21U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" ( (binary_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0" (parenthesized_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1)" ( (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1" (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f)" number_literal >> (parenthesized_expression "(iVar3 - 0x21U & 0x1f)" ( (binary_expression "iVar3 - 0x21U & 0x1f" (binary_expression "iVar3 - 0x21U" identifier - number_literal) & number_literal) ))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }" { (if_statement "if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" if (parenthesized_expression "(piVar5[2] == 0x28)" ( (binary_expression "piVar5[2] == 0x28" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" { (expression_statement "piVar2 = (int *)(*pcVar6)(piVar5 + 2);" (assignment_expression "piVar2 = (int *)(*pcVar6)(piVar5 + 2)" identifier = (cast_expression "(int *)(*pcVar6)(piVar5 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*pcVar6)(piVar5 + 2)" (parenthesized_expression "(*pcVar6)" ( (pointer_expression "*pcVar6" * identifier) )) (argument_list "(piVar5 + 2)" ( (binary_expression "piVar5 + 2" identifier + number_literal) ))))) ;) })) }) (else_clause "else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" else (if_statement "if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" if (parenthesized_expression "(iVar3 == 0x29)" ( (binary_expression "iVar3 == 0x29" identifier == number_literal) )) (compound_statement "{\n        return piVar5 + 2;\n      }" { (return_statement "return piVar5 + 2;" return (binary_expression "piVar5 + 2" identifier + number_literal) ;) })))) })) (if_statement "if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" if (parenthesized_expression "(*(int *)(puVar1 + -0x4830) == 0)" ( (binary_expression "*(int *)(puVar1 + -0x4830) == 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" { (expression_statement "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);" (assignment_expression "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7)" identifier = (call_expression "(*(code *)PTR_getenv_0004a56c)(puVar7)" (parenthesized_expression "(*(code *)PTR_getenv_0004a56c)" ( (pointer_expression "*(code *)PTR_getenv_0004a56c" * (cast_expression "(code *)PTR_getenv_0004a56c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar7)" ( identifier )))) ;) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = 1;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = 1;\n      }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) })) (expression_statement "*(undefined4 *)(puVar1 + -0x4830) = uVar4;" (assignment_expression "*(undefined4 *)(puVar1 + -0x4830) = uVar4" (pointer_expression "*(undefined4 *)(puVar1 + -0x4830)" * (cast_expression "(undefined4 *)(puVar1 + -0x4830)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "piVar2 = piVar5 + 2;" (assignment_expression "piVar2 = piVar5 + 2" identifier = (binary_expression "piVar5 + 2" identifier + number_literal)) ;) (if_statement "if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }" if (parenthesized_expression "((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))))" ( (binary_expression "(piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" (parenthesized_expression "(piVar5[2] == 0x21)" ( (binary_expression "piVar5[2] == 0x21" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" ( (parenthesized_expression "(*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))" ( (binary_expression "*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)" (binary_expression "*(int *)(puVar1 + -0x4830) < 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" * (cast_expression "(int *)(puVar1 + -0x4830)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x4830)" ( (binary_expression "puVar1 + -0x4830" identifier + number_literal) )))) < number_literal) && (parenthesized_expression "(piVar5[2] == 0x5e)" ( (binary_expression "piVar5[2] == 0x5e" (subscript_expression "piVar5[2]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (compound_statement "{\n      piVar2 = piVar5 + 3;\n    }" { (expression_statement "piVar2 = piVar5 + 3;" (assignment_expression "piVar2 = piVar5 + 3" identifier = (binary_expression "piVar5 + 3" identifier + number_literal)) ;) })) (if_statement "if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }" if (parenthesized_expression "(*piVar2 == 0x5d)" ( (binary_expression "*piVar2 == 0x5d" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n      piVar2 = piVar2 + 1;\n    }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) })) (while_statement "while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" while (parenthesized_expression "(iVar3 = *piVar2, iVar3 != 0x5d)" ( (comma_expression "iVar3 = *piVar2, iVar3 != 0x5d" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) , (binary_expression "iVar3 != 0x5d" identifier != number_literal)) )) (compound_statement "{\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" { (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression LIT >> (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) ))) & LIT) )) != LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (binary_expression IDENT + LIT) ))))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + LIT) ;) })))) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "int * FUN_0002b690(int *param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" (primitive_type "int") (pointer_declarator "* FUN_0002b690(int *param_1)" (* "*") (function_declarator "FUN_0002b690(int *param_1)" (identifier "FUN_0002b690") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int *piVar5;\n  code *pcVar6;\n  undefined *puVar7;\n  \n  puVar1 = PTR_DAT_0004a208;\n  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);\n  puVar7 = PTR_DAT_0004a224 + -0x7e84;\n  piVar2 = param_1;\n  do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "code *pcVar6;" (type_identifier "code") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "undefined *puVar7;" (type_identifier "undefined") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (expression_statement "puVar1 = PTR_DAT_0004a208;" (assignment_expression "puVar1 = PTR_DAT_0004a208" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0004a208")) (; ";")) (expression_statement "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);" (assignment_expression "pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970)" (identifier "pcVar6") (= "=") (cast_expression "(code *)(PTR_LAB_0004a218 + -0x4970)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_LAB_0004a218 + -0x4970)" (( "(") (binary_expression "PTR_LAB_0004a218 + -0x4970" (identifier "PTR_LAB_0004a218") (+ "+") (number_literal "-0x4970")) () ")")))) (; ";")) (expression_statement "puVar7 = PTR_DAT_0004a224 + -0x7e84;" (assignment_expression "puVar7 = PTR_DAT_0004a224 + -0x7e84" (identifier "puVar7") (= "=") (binary_expression "PTR_DAT_0004a224 + -0x7e84" (identifier "PTR_DAT_0004a224") (+ "+") (number_literal "-0x7e84"))) (; ";")) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" (identifier "piVar2") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  } while( true );" (do "do") (compound_statement "{\n    while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }\n    if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }\n    piVar2 = piVar5 + 2;\n    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }\n    if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }\n    while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }\n  }" ({ "{") (while_statement "while( true ) {\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      piVar5 = piVar2;\n      iVar3 = piVar5[1];\n      if (iVar3 == 0) {\n        return param_1;\n      }\n      if (iVar3 == 0x5b) break;\n      piVar2 = piVar5 + 1;\n      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }\n    }" ({ "{") (expression_statement "piVar5 = piVar2;" (assignment_expression "piVar5 = piVar2" (identifier "piVar5") (= "=") (identifier "piVar2")) (; ";")) (expression_statement "iVar3 = piVar5[1];" (assignment_expression "iVar3 = piVar5[1]" (identifier "iVar3") (= "=") (subscript_expression "piVar5[1]" (identifier "piVar5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return param_1;\n      }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (if_statement "if (iVar3 == 0x5b) break;" (if "if") (parenthesized_expression "(iVar3 == 0x5b)" (( "(") (binary_expression "iVar3 == 0x5b" (identifier "iVar3") (== "==") (number_literal "0x5b")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar2 = piVar5 + 1;" (assignment_expression "piVar2 = piVar5 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar5 + 1" (identifier "piVar5") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }\n      else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" (if "if") (parenthesized_expression "((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0))" (( "(") (binary_expression "(iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" (parenthesized_expression "(iVar3 - 0x21U < 0x20)" (( "(") (binary_expression "iVar3 - 0x21U < 0x20" (binary_expression "iVar3 - 0x21U" (identifier "iVar3") (- "-") (number_literal "0x21U")) (< "<") (number_literal "0x20")) () ")")) (&& "&&") (parenthesized_expression "((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)" (( "(") (binary_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0" (parenthesized_expression "(0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1)" (( "(") (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1" (binary_expression "0xc0000601U >> (iVar3 - 0x21U & 0x1f)" (number_literal "0xc0000601U") (>> ">>") (parenthesized_expression "(iVar3 - 0x21U & 0x1f)" (( "(") (binary_expression "iVar3 - 0x21U & 0x1f" (binary_expression "iVar3 - 0x21U" (identifier "iVar3") (- "-") (number_literal "0x21U")) (& "&") (number_literal "0x1f")) () ")"))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }\n      }" ({ "{") (if_statement "if (piVar5[2] == 0x28) {\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" (if "if") (parenthesized_expression "(piVar5[2] == 0x28)" (( "(") (binary_expression "piVar5[2] == 0x28" (subscript_expression "piVar5[2]" (identifier "piVar5") ([ "[") (number_literal "2") (] "]")) (== "==") (number_literal "0x28")) () ")")) (compound_statement "{\n          piVar2 = (int *)(*pcVar6)(piVar5 + 2);\n        }" ({ "{") (expression_statement "piVar2 = (int *)(*pcVar6)(piVar5 + 2);" (assignment_expression "piVar2 = (int *)(*pcVar6)(piVar5 + 2)" (identifier "piVar2") (= "=") (cast_expression "(int *)(*pcVar6)(piVar5 + 2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*pcVar6)(piVar5 + 2)" (parenthesized_expression "(*pcVar6)" (( "(") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) () ")")) (argument_list "(piVar5 + 2)" (( "(") (binary_expression "piVar5 + 2" (identifier "piVar5") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (} "}"))) (} "}")) (else_clause "else if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" (else "else") (if_statement "if (iVar3 == 0x29) {\n        return piVar5 + 2;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0x29)" (( "(") (binary_expression "iVar3 == 0x29" (identifier "iVar3") (== "==") (number_literal "0x29")) () ")")) (compound_statement "{\n        return piVar5 + 2;\n      }" ({ "{") (return_statement "return piVar5 + 2;" (return "return") (binary_expression "piVar5 + 2" (identifier "piVar5") (+ "+") (number_literal "2")) (; ";")) (} "}"))))) (} "}"))) (if_statement "if (*(int *)(puVar1 + -0x4830) == 0) {\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" (if "if") (parenthesized_expression "(*(int *)(puVar1 + -0x4830) == 0)" (( "(") (binary_expression "*(int *)(puVar1 + -0x4830) == 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" (* "*") (cast_expression "(int *)(puVar1 + -0x4830)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x4830)" (( "(") (binary_expression "puVar1 + -0x4830" (identifier "puVar1") (+ "+") (number_literal "-0x4830")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);\n      uVar4 = 0xffffffff;\n      if (iVar3 != 0) {\n        uVar4 = 1;\n      }\n      *(undefined4 *)(puVar1 + -0x4830) = uVar4;\n    }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);" (assignment_expression "iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_getenv_0004a56c)(puVar7)" (parenthesized_expression "(*(code *)PTR_getenv_0004a56c)" (( "(") (pointer_expression "*(code *)PTR_getenv_0004a56c" (* "*") (cast_expression "(code *)PTR_getenv_0004a56c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_getenv_0004a56c"))) () ")")) (argument_list "(puVar7)" (( "(") (identifier "puVar7") () ")")))) (; ";")) (expression_statement "uVar4 = 0xffffffff;" (assignment_expression "uVar4 = 0xffffffff" (identifier "uVar4") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (iVar3 != 0) {\n        uVar4 = 1;\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar4 = 1;\n      }" ({ "{") (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(puVar1 + -0x4830) = uVar4;" (assignment_expression "*(undefined4 *)(puVar1 + -0x4830) = uVar4" (pointer_expression "*(undefined4 *)(puVar1 + -0x4830)" (* "*") (cast_expression "(undefined4 *)(puVar1 + -0x4830)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x4830)" (( "(") (binary_expression "puVar1 + -0x4830" (identifier "puVar1") (+ "+") (number_literal "-0x4830")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (expression_statement "piVar2 = piVar5 + 2;" (assignment_expression "piVar2 = piVar5 + 2" (identifier "piVar2") (= "=") (binary_expression "piVar5 + 2" (identifier "piVar5") (+ "+") (number_literal "2"))) (; ";")) (if_statement "if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {\n      piVar2 = piVar5 + 3;\n    }" (if "if") (parenthesized_expression "((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))))" (( "(") (binary_expression "(piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" (parenthesized_expression "(piVar5[2] == 0x21)" (( "(") (binary_expression "piVar5[2] == 0x21" (subscript_expression "piVar5[2]" (identifier "piVar5") ([ "[") (number_literal "2") (] "]")) (== "==") (number_literal "0x21")) () ")")) (|| "||") (parenthesized_expression "((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))" (( "(") (parenthesized_expression "(*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e))" (( "(") (binary_expression "*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)" (binary_expression "*(int *)(puVar1 + -0x4830) < 0" (pointer_expression "*(int *)(puVar1 + -0x4830)" (* "*") (cast_expression "(int *)(puVar1 + -0x4830)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x4830)" (( "(") (binary_expression "puVar1 + -0x4830" (identifier "puVar1") (+ "+") (number_literal "-0x4830")) () ")")))) (< "<") (number_literal "0")) (&& "&&") (parenthesized_expression "(piVar5[2] == 0x5e)" (( "(") (binary_expression "piVar5[2] == 0x5e" (subscript_expression "piVar5[2]" (identifier "piVar5") ([ "[") (number_literal "2") (] "]")) (== "==") (number_literal "0x5e")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      piVar2 = piVar5 + 3;\n    }" ({ "{") (expression_statement "piVar2 = piVar5 + 3;" (assignment_expression "piVar2 = piVar5 + 3" (identifier "piVar2") (= "=") (binary_expression "piVar5 + 3" (identifier "piVar5") (+ "+") (number_literal "3"))) (; ";")) (} "}"))) (if_statement "if (*piVar2 == 0x5d) {\n      piVar2 = piVar2 + 1;\n    }" (if "if") (parenthesized_expression "(*piVar2 == 0x5d)" (( "(") (binary_expression "*piVar2 == 0x5d" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0x5d")) () ")")) (compound_statement "{\n      piVar2 = piVar2 + 1;\n    }" ({ "{") (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (while_statement "while (iVar3 = *piVar2, iVar3 != 0x5d) {\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" (while "while") (parenthesized_expression "(iVar3 = *piVar2, iVar3 != 0x5d)" (( "(") (comma_expression "iVar3 = *piVar2, iVar3 != 0x5d" (assignment_expression "iVar3 = *piVar2" (identifier "iVar3") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (, ",") (binary_expression "iVar3 != 0x5d" (identifier "iVar3") (!= "!=") (number_literal "0x5d"))) () ")")) (compound_statement "{\n      piVar2 = piVar2 + 1;\n      if (iVar3 == 0) {\n        return param_1;\n      }\n    }" ({ "{") (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar3 == 0) {\n        return param_1;\n      }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return param_1;\n      }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

type_1 * function_1(type_1 *pattern)

{
  type_2 *var_5;
  type_1 *var_6;
  int var_3;
  type_3 uVar4;
  int *var_4;
  type_4 *pcVar6;
  type_2 *puVar7;
  
  var_5 = PTR_DAT_0004a208;
  pcVar6 = (type_4 *)(var_1 + -0x4970);
  puVar7 = var_2 + -0x7e84;
  var_6 = pattern;
  do {
    while( true ) {
      var_4 = var_6;
      var_3 = var_4[1];
      if (var_3 == 0) {
        return pattern;
      }
      if (var_3 == 0x5b) break;
      var_6 = var_4 + 1;
      if ((var_3 - 0x21U < 0x20) && ((0xc0000601U >> (var_3 - 0x21U & 0x1f) & 1) != 0)) {
        if (var_4[2] == 0x28) {
          var_6 = (type_1 *)(*pcVar6)(var_4 + 2);
        }
      }
      else if (var_3 == 0x29) {
        return var_4 + 2;
      }
    }
    if (*(int *)(var_5 + -0x4830) == 0) {
      var_3 = (*(type_4 *)PTR_getenv_0004a56c)(puVar7);
      uVar4 = 0xffffffff;
      if (var_3 != 0) {
        uVar4 = 1;
      }
      *(type_3 *)(var_5 + -0x4830) = uVar4;
    }
    var_6 = var_4 + 2;
    if ((var_4[2] == 0x21) || ((*(int *)(var_5 + -0x4830) < 0 && (var_4[2] == 0x5e)))) {
      var_6 = var_4 + 3;
    }
    if (*var_6 == 0x5d) {
      var_6 = var_6 + 1;
    }
    while (var_3 = *var_6, var_3 != 0x5d) {
      var_6 = var_6 + 1;
      if (var_3 == 0) {
        return pattern;
      }
    }
  } while( true );
}


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

int * MASKED(int *param_1)

{
  undefined *puVar1;
  int *piVar2;
  int iVar3;
  undefined4 uVar4;
  int *piVar5;
  code *pcVar6;
  undefined *puVar7;
  
  puVar1 = PTR_DAT_0004a208;
  pcVar6 = (code *)(PTR_LAB_0004a218 + -0x4970);
  puVar7 = PTR_DAT_0004a224 + -0x7e84;
  piVar2 = param_1;
  do {
    while( true ) {
      piVar5 = piVar2;
      iVar3 = piVar5[1];
      if (iVar3 == 0) {
        return param_1;
      }
      if (iVar3 == 0x5b) break;
      piVar2 = piVar5 + 1;
      if ((iVar3 - 0x21U < 0x20) && ((0xc0000601U >> (iVar3 - 0x21U & 0x1f) & 1) != 0)) {
        if (piVar5[2] == 0x28) {
          piVar2 = (int *)(*pcVar6)(piVar5 + 2);
        }
      }
      else if (iVar3 == 0x29) {
        return piVar5 + 2;
      }
    }
    if (*(int *)(puVar1 + -0x4830) == 0) {
      iVar3 = (*(code *)PTR_getenv_0004a56c)(puVar7);
      uVar4 = 0xffffffff;
      if (iVar3 != 0) {
        uVar4 = 1;
      }
      *(undefined4 *)(puVar1 + -0x4830) = uVar4;
    }
    piVar2 = piVar5 + 2;
    if ((piVar5[2] == 0x21) || ((*(int *)(puVar1 + -0x4830) < 0 && (piVar5[2] == 0x5e)))) {
      piVar2 = piVar5 + 3;
    }
    if (*piVar2 == 0x5d) {
      piVar2 = piVar2 + 1;
    }
    while (iVar3 = *piVar2, iVar3 != 0x5d) {
      piVar2 = piVar2 + 1;
      if (iVar3 == 0) {
        return param_1;
      }
    }
  } while( true );
}

