
size_t dir_len(char *file)

{
  char cVar1;
  size_t sVar2;
  char *pcVar3;
  size_t sVar4;
  uint uVar5;
  
  cVar1 = *file;
  pcVar3 = last_component(file);
  uVar5 = (int)pcVar3 - (int)file;
  if (((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')) {
    do {
      sVar4 = sVar2;
      if ((cVar1 == '/') == sVar4) {
        return sVar4;
      }
      sVar2 = sVar4 - 1;
    } while (file[sVar4 - 1] == '/');
    return sVar4;
  }
  return uVar5;
}



uint dir_len(char *param_1)

{
  char cVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  
  cVar1 = *param_1;
  iVar3 = last_component();
  uVar4 = iVar3 - (int)param_1;
  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {
    do {
      uVar4 = uVar2;
      if ((cVar1 == '/') == uVar4) {
        return uVar4;
      }
      uVar2 = uVar4 - 1;
    } while (param_1[uVar4 - 1] == '/');
    return uVar4;
  }
  return uVar4;
}


lui gp,0x3
addiu gp,gp,0x1f40
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7fa0(gp)
sw s1,0x20(sp)
or s1,a0,zero
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s0,0x1c(sp)
bal 0x0001f3f0
_lb s0,0x0(a0)
subu v1,v0,s1
xori s0,s0,0x2f
sltiu s0,s0,0x1
sltu v0,s0,v1
beq v0,zero,0x0001f334
_addiu v0,v1,-0x1
li a0,0x2f
addu a1,s1,v0
lb a1,0x0(a1)
bne a1,a0,0x0001f334
_li a1,0x2f
b 0x0001f318
_nop
addu a0,s1,v1
lb a0,0x0(a0)
bne a0,a1,0x0001f324
_lw ra,0x24(sp)
or v0,v1,zero
bne s0,v0,0x0001f304
_addiu v1,v0,-0x1
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw ra,0x24(sp)
or v0,v1,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "uint dir_len(char *param_1)\n\n{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint dir_len(char *param_1)\n\n{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "dir_len(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar3 = last_component();" (assignment_expression "iVar3 = last_component()" identifier = (call_expression "last_component()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = iVar3 - (int)param_1;" (assignment_expression "uVar4 = iVar3 - (int)param_1" identifier = (binary_expression "iVar3 - (int)param_1" identifier - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" if (parenthesized_expression "(((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'))" ( (binary_expression "((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" (parenthesized_expression "((cVar1 == '/') < uVar4)" ( (binary_expression "(cVar1 == '/') < uVar4" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) < identifier) )) && (parenthesized_expression "(uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" ( (comma_expression "uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'" (assignment_expression "uVar2 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) , (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" identifier [ (binary_expression "uVar4 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character '))) ))) )) (compound_statement "{\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" { (do_statement "do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');" do (compound_statement "{\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    }" { (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" identifier = identifier) ;) (if_statement "if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }" if (parenthesized_expression "((cVar1 == '/') == uVar4)" ( (binary_expression "(cVar1 == '/') == uVar4" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) == identifier) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "uVar2 = uVar4 - 1;" (assignment_expression "uVar2 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(param_1[uVar4 - 1] == '/')" ( (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" identifier [ (binary_expression "uVar4 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) ;) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "size_t dir_len(char *file)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  size_t sVar4;\n  uint uVar5;\n  \n  cVar1 = *file;\n  pcVar3 = last_component(file);\n  uVar5 = (int)pcVar3 - (int)file;\n  if (((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')) {\n    do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');\n    return sVar4;\n  }\n  return uVar5;\n}\n\n" (function_definition "size_t dir_len(char *file)\n\n{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  size_t sVar4;\n  uint uVar5;\n  \n  cVar1 = *file;\n  pcVar3 = last_component(file);\n  uVar5 = (int)pcVar3 - (int)file;\n  if (((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')) {\n    do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');\n    return sVar4;\n  }\n  return uVar5;\n}" primitive_type (function_declarator "dir_len(char *file)" identifier (parameter_list "(char *file)" ( (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  char *pcVar3;\n  size_t sVar4;\n  uint uVar5;\n  \n  cVar1 = *file;\n  pcVar3 = last_component(file);\n  uVar5 = (int)pcVar3 - (int)file;\n  if (((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')) {\n    do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');\n    return sVar4;\n  }\n  return uVar5;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "cVar1 = *file;" (assignment_expression "cVar1 = *file" identifier = (pointer_expression "*file" * identifier)) ;) (expression_statement "pcVar3 = last_component(file);" (assignment_expression "pcVar3 = last_component(file)" identifier = (call_expression "last_component(file)" identifier (argument_list "(file)" ( identifier )))) ;) (expression_statement "uVar5 = (int)pcVar3 - (int)file;" (assignment_expression "uVar5 = (int)pcVar3 - (int)file" identifier = (binary_expression "(int)pcVar3 - (int)file" (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)file" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')) {\n    do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');\n    return sVar4;\n  }" if (parenthesized_expression "(((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/'))" ( (binary_expression "((cVar1 == '/') < uVar5) && (sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')" (parenthesized_expression "((cVar1 == '/') < uVar5)" ( (binary_expression "(cVar1 == '/') < uVar5" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) < identifier) )) && (parenthesized_expression "(sVar2 = uVar5 - 1, file[uVar5 - 1] == '/')" ( (comma_expression "sVar2 = uVar5 - 1, file[uVar5 - 1] == '/'" (assignment_expression "sVar2 = uVar5 - 1" identifier = (binary_expression "uVar5 - 1" identifier - number_literal)) , (binary_expression "file[uVar5 - 1] == '/'" (subscript_expression "file[uVar5 - 1]" identifier [ (binary_expression "uVar5 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character '))) ))) )) (compound_statement "{\n    do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');\n    return sVar4;\n  }" { (do_statement "do {\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    } while (file[sVar4 - 1] == '/');" do (compound_statement "{\n      sVar4 = sVar2;\n      if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }\n      sVar2 = sVar4 - 1;\n    }" { (expression_statement "sVar4 = sVar2;" (assignment_expression "sVar4 = sVar2" identifier = identifier) ;) (if_statement "if ((cVar1 == '/') == sVar4) {\n        return sVar4;\n      }" if (parenthesized_expression "((cVar1 == '/') == sVar4)" ( (binary_expression "(cVar1 == '/') == sVar4" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) == identifier) )) (compound_statement "{\n        return sVar4;\n      }" { (return_statement "return sVar4;" return identifier ;) })) (expression_statement "sVar2 = sVar4 - 1;" (assignment_expression "sVar2 = sVar4 - 1" identifier = (binary_expression "sVar4 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(file[sVar4 - 1] == '/')" ( (binary_expression "file[sVar4 - 1] == '/'" (subscript_expression "file[sVar4 - 1]" identifier [ (binary_expression "sVar4 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) ;) (return_statement "return sVar4;" return identifier ;) })) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit "uint dir_len(char *param_1)\n\n{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint dir_len(char *param_1)\n\n{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "dir_len(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "iVar3 = last_component();" (assignment_expression "iVar3 = last_component()" identifier = (call_expression "last_component()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = iVar3 - (int)param_1;" (assignment_expression "uVar4 = iVar3 - (int)param_1" identifier = (binary_expression "iVar3 - (int)param_1" identifier - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" if (parenthesized_expression "(((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'))" ( (binary_expression "((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" (parenthesized_expression "((cVar1 == '/') < uVar4)" ( (binary_expression "(cVar1 == '/') < uVar4" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) < identifier) )) && (parenthesized_expression "(uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" ( (comma_expression "uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'" (assignment_expression "uVar2 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) , (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" identifier [ (binary_expression "uVar4 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character '))) ))) )) (compound_statement "{\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" { (do_statement "do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');" do (compound_statement "{\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    }" { (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" identifier = identifier) ;) (if_statement "if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }" if (parenthesized_expression "((cVar1 == '/') == uVar4)" ( (binary_expression "(cVar1 == '/') == uVar4" (parenthesized_expression "(cVar1 == '/')" ( (binary_expression "cVar1 == '/'" identifier == (char_literal "'/'" ' character ')) )) == identifier) )) (compound_statement "{\n        return uVar4;\n      }" { (return_statement "return uVar4;" return identifier ;) })) (expression_statement "uVar2 = uVar4 - 1;" (assignment_expression "uVar2 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(param_1[uVar4 - 1] == '/')" ( (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" identifier [ (binary_expression "uVar4 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) )) ;) (return_statement "return uVar4;" return identifier ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT - LIT)) , (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' character '))) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' character ')) )) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "uint dir_len(char *param_1)\n\n{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "dir_len(char *param_1)" (identifier "dir_len") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  \n  cVar1 = *param_1;\n  iVar3 = last_component();\n  uVar4 = iVar3 - (int)param_1;\n  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }\n  return uVar4;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "cVar1 = *param_1;" (assignment_expression "cVar1 = *param_1" (identifier "cVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar3 = last_component();" (assignment_expression "iVar3 = last_component()" (identifier "iVar3") (= "=") (call_expression "last_component()" (identifier "last_component") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = iVar3 - (int)param_1;" (assignment_expression "uVar4 = iVar3 - (int)param_1" (identifier "uVar4") (= "=") (binary_expression "iVar3 - (int)param_1" (identifier "iVar3") (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")))) (; ";")) (if_statement "if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" (if "if") (parenthesized_expression "(((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'))" (( "(") (binary_expression "((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" (parenthesized_expression "((cVar1 == '/') < uVar4)" (( "(") (binary_expression "(cVar1 == '/') < uVar4" (parenthesized_expression "(cVar1 == '/')" (( "(") (binary_expression "cVar1 == '/'" (identifier "cVar1") (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (< "<") (identifier "uVar4")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')" (( "(") (comma_expression "uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/'" (assignment_expression "uVar2 = uVar4 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) (, ",") (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" (identifier "param_1") ([ "[") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'")))) () ")"))) () ")")) (compound_statement "{\n    do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');\n    return uVar4;\n  }" ({ "{") (do_statement "do {\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    } while (param_1[uVar4 - 1] == '/');" (do "do") (compound_statement "{\n      uVar4 = uVar2;\n      if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }\n      uVar2 = uVar4 - 1;\n    }" ({ "{") (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" (identifier "uVar4") (= "=") (identifier "uVar2")) (; ";")) (if_statement "if ((cVar1 == '/') == uVar4) {\n        return uVar4;\n      }" (if "if") (parenthesized_expression "((cVar1 == '/') == uVar4)" (( "(") (binary_expression "(cVar1 == '/') == uVar4" (parenthesized_expression "(cVar1 == '/')" (( "(") (binary_expression "cVar1 == '/'" (identifier "cVar1") (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (== "==") (identifier "uVar4")) () ")")) (compound_statement "{\n        return uVar4;\n      }" ({ "{") (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "uVar2 = uVar4 - 1;" (assignment_expression "uVar2 = uVar4 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1[uVar4 - 1] == '/')" (( "(") (binary_expression "param_1[uVar4 - 1] == '/'" (subscript_expression "param_1[uVar4 - 1]" (identifier "param_1") ([ "[") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

size_t function_1(char *file)

{
  char var_2;
  size_t sVar2;
  char *pcVar3;
  size_t var_4;
  type_1 var_3;
  
  var_2 = *file;
  pcVar3 = var_1(file);
  var_3 = (int)pcVar3 - (int)file;
  if (((var_2 == '/') < var_3) && (sVar2 = var_3 - 1, file[var_3 - 1] == '/')) {
    do {
      var_4 = sVar2;
      if ((var_2 == '/') == var_4) {
        return var_4;
      }
      sVar2 = var_4 - 1;
    } while (file[var_4 - 1] == '/');
    return var_4;
  }
  return var_3;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (character))))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (character))))) (return_statement (identifier)))) (return_statement (identifier)))))

uint MASKED(char *param_1)

{
  char cVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  
  cVar1 = *param_1;
  iVar3 = last_component();
  uVar4 = iVar3 - (int)param_1;
  if (((cVar1 == '/') < uVar4) && (uVar2 = uVar4 - 1, param_1[uVar4 - 1] == '/')) {
    do {
      uVar4 = uVar2;
      if ((cVar1 == '/') == uVar4) {
        return uVar4;
      }
      uVar2 = uVar4 - 1;
    } while (param_1[uVar4 - 1] == '/');
    return uVar4;
  }
  return uVar4;
}

