
char * make_dir_path(char *path,mode_t mode)

{
  int iVar1;
  size_t sVar2;
  char *__path;
  int *piVar3;
  char *pcVar4;
  uint uVar5;
  
  iVar1 = 0;
  while( true ) {
    sVar2 = strcspn(path + iVar1,"/");
    uVar5 = iVar1 + (int)sVar2;
    if (0 < (int)uVar5) {
      __path = dupprintf("%.*s",(ulong)uVar5,path);
      iVar1 = mkdir(__path,mode);
      if (iVar1 < 0) {
        piVar3 = __errno_location();
        if (*piVar3 != 0x11) {
          pcVar4 = strerror(*piVar3);
          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);
          safefree(__path);
          return pcVar4;
        }
      }
      safefree(__path);
    }
    if (path[(int)uVar5] == '\0') break;
    sVar2 = strspn(path + (int)uVar5,"/");
    iVar1 = uVar5 + (int)sVar2;
  }
  return (char *)0x0;
}



undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)

{
  int iVar1;
  size_t sVar2;
  char *__path;
  int *piVar3;
  char *pcVar4;
  undefined8 uVar5;
  int iVar6;
  
  iVar6 = 0;
  while( true ) {
    sVar2 = strcspn((char *)(iVar6 + param_1),"/");
    iVar6 = iVar6 + (int)sVar2;
    if (0 < iVar6) {
      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);
      iVar1 = mkdir(__path,param_2);
      if (iVar1 < 0) {
        piVar3 = __errno_location();
        if (*piVar3 != 0x11) {
          pcVar4 = strerror(*piVar3);
          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);
          FUN_001217b3(__path);
          return uVar5;
        }
      }
      FUN_001217b3(__path);
    }
    if (*(char *)(iVar6 + param_1) == '\0') break;
    sVar2 = strspn((char *)(iVar6 + param_1),"/");
    iVar6 = iVar6 + (int)sVar2;
  }
  return 0;
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBP,RDI
MOV R13D,ESI
MOV EBX,0x0
LEA R12,[0x17925f]
JMP 0x0014a0e2
MOV RDI,R14
CALL 0x001217b3
MOVSXD RDI,EBX
ADD RDI,RBP
CMP byte ptr [RDI],0x0
JZ 0x0014a153
MOV RSI,R12
CALL 0x0010f590
ADD EBX,EAX
MOVSXD RDI,EBX
ADD RDI,RBP
MOV RSI,R12
CALL 0x0010f110
ADD EBX,EAX
TEST EBX,EBX
JLE 0x0014a0cd
MOV RDX,RBP
MOV ESI,EBX
LEA RDI,[0x16d6d4]
MOV EAX,0x0
CALL 0x00121586
MOV R14,RAX
MOV ESI,R13D
MOV RDI,RAX
CALL 0x0010f620
TEST EAX,EAX
JNS 0x0014a0c5
CALL 0x0010f080
MOV EDI,dword ptr [RAX]
CMP EDI,0x11
JZ 0x0014a0c5
CALL 0x0010f4c0
MOV RDX,RAX
MOV RSI,R14
LEA RDI,[0x179244]
MOV EAX,0x0
CALL 0x00121586
MOV RBX,RAX
MOV RDI,R14
CALL 0x001217b3
JMP 0x0014a158
MOV EBX,0x0
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
(translation_unit "undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0014a0a9(long param_1,__mode_t param_2)" identifier (parameter_list "(long param_1,__mode_t param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "__mode_t param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__path;" primitive_type (pointer_declarator "*__path" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" { (expression_statement "sVar2 = strcspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strcspn((char *)(iVar6 + param_1),"/")" identifier = (call_expression "strcspn((char *)(iVar6 + param_1),"/")" identifier (argument_list "((char *)(iVar6 + param_1),"/")" ( (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) ))) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" identifier = (binary_expression "iVar6 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" if (parenthesized_expression "(0 < iVar6)" ( (binary_expression "0 < iVar6" number_literal < identifier) )) (compound_statement "{\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" { (expression_statement "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);" (assignment_expression "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" identifier = (cast_expression "(char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" identifier (argument_list "(&DAT_0016d6d4,iVar6,param_1)" ( (pointer_expression "&DAT_0016d6d4" & identifier) , identifier , identifier ))))) ;) (expression_statement "iVar1 = mkdir(__path,param_2);" (assignment_expression "iVar1 = mkdir(__path,param_2)" identifier = (call_expression "mkdir(__path,param_2)" identifier (argument_list "(__path,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" if (parenthesized_expression "(*piVar3 != 0x11)" ( (binary_expression "*piVar3 != 0x11" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" { (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);" (assignment_expression "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4)" identifier = (call_expression "FUN_00121586("%s: mkdir: %s",__path,pcVar4)" identifier (argument_list "("%s: mkdir: %s",__path,pcVar4)" ( (string_literal ""%s: mkdir: %s"" " string_content ") , identifier , identifier )))) ;) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) (return_statement "return uVar5;" return identifier ;) })) })) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) })) (if_statement "if (*(char *)(iVar6 + param_1) == '\0') break;" if (parenthesized_expression "(*(char *)(iVar6 + param_1) == '\0')" ( (binary_expression "*(char *)(iVar6 + param_1) == '\0'" (pointer_expression "*(char *)(iVar6 + param_1)" * (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "sVar2 = strspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strspn((char *)(iVar6 + param_1),"/")" identifier = (call_expression "strspn((char *)(iVar6 + param_1),"/")" identifier (argument_list "((char *)(iVar6 + param_1),"/")" ( (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) ))) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" identifier = (binary_expression "iVar6 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "char * make_dir_path(char *path,mode_t mode)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  uint uVar5;\n  \n  iVar1 = 0;\n  while( true ) {\n    sVar2 = strcspn(path + iVar1,"/");\n    uVar5 = iVar1 + (int)sVar2;\n    if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }\n    if (path[(int)uVar5] == '\0') break;\n    sVar2 = strspn(path + (int)uVar5,"/");\n    iVar1 = uVar5 + (int)sVar2;\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * make_dir_path(char *path,mode_t mode)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  uint uVar5;\n  \n  iVar1 = 0;\n  while( true ) {\n    sVar2 = strcspn(path + iVar1,"/");\n    uVar5 = iVar1 + (int)sVar2;\n    if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }\n    if (path[(int)uVar5] == '\0') break;\n    sVar2 = strspn(path + (int)uVar5,"/");\n    iVar1 = uVar5 + (int)sVar2;\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* make_dir_path(char *path,mode_t mode)" * (function_declarator "make_dir_path(char *path,mode_t mode)" identifier (parameter_list "(char *path,mode_t mode)" ( (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) , (parameter_declaration "mode_t mode" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  uint uVar5;\n  \n  iVar1 = 0;\n  while( true ) {\n    sVar2 = strcspn(path + iVar1,"/");\n    uVar5 = iVar1 + (int)sVar2;\n    if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }\n    if (path[(int)uVar5] == '\0') break;\n    sVar2 = strspn(path + (int)uVar5,"/");\n    iVar1 = uVar5 + (int)sVar2;\n  }\n  return (char *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__path;" primitive_type (pointer_declarator "*__path" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    sVar2 = strcspn(path + iVar1,"/");\n    uVar5 = iVar1 + (int)sVar2;\n    if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }\n    if (path[(int)uVar5] == '\0') break;\n    sVar2 = strspn(path + (int)uVar5,"/");\n    iVar1 = uVar5 + (int)sVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    sVar2 = strcspn(path + iVar1,"/");\n    uVar5 = iVar1 + (int)sVar2;\n    if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }\n    if (path[(int)uVar5] == '\0') break;\n    sVar2 = strspn(path + (int)uVar5,"/");\n    iVar1 = uVar5 + (int)sVar2;\n  }" { (expression_statement "sVar2 = strcspn(path + iVar1,"/");" (assignment_expression "sVar2 = strcspn(path + iVar1,"/")" identifier = (call_expression "strcspn(path + iVar1,"/")" identifier (argument_list "(path + iVar1,"/")" ( (binary_expression "path + iVar1" identifier + identifier) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "uVar5 = iVar1 + (int)sVar2;" (assignment_expression "uVar5 = iVar1 + (int)sVar2" identifier = (binary_expression "iVar1 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0 < (int)uVar5) {\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }" if (parenthesized_expression "(0 < (int)uVar5)" ( (binary_expression "0 < (int)uVar5" number_literal < (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      __path = dupprintf("%.*s",(ulong)uVar5,path);\n      iVar1 = mkdir(__path,mode);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }\n      safefree(__path);\n    }" { (expression_statement "__path = dupprintf("%.*s",(ulong)uVar5,path);" (assignment_expression "__path = dupprintf("%.*s",(ulong)uVar5,path)" identifier = (call_expression "dupprintf("%.*s",(ulong)uVar5,path)" identifier (argument_list "("%.*s",(ulong)uVar5,path)" ( (string_literal ""%.*s"" " string_content ") , (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) , identifier )))) ;) (expression_statement "iVar1 = mkdir(__path,mode);" (assignment_expression "iVar1 = mkdir(__path,mode)" identifier = (call_expression "mkdir(__path,mode)" identifier (argument_list "(__path,mode)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }" if (parenthesized_expression "(*piVar3 != 0x11)" ( (binary_expression "*piVar3 != 0x11" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n          pcVar4 = strerror(*piVar3);\n          pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);\n          safefree(__path);\n          return pcVar4;\n        }" { (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4);" (assignment_expression "pcVar4 = dupprintf("%s: mkdir: %s",__path,pcVar4)" identifier = (call_expression "dupprintf("%s: mkdir: %s",__path,pcVar4)" identifier (argument_list "("%s: mkdir: %s",__path,pcVar4)" ( (string_literal ""%s: mkdir: %s"" " string_content ") , identifier , identifier )))) ;) (expression_statement "safefree(__path);" (call_expression "safefree(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) (return_statement "return pcVar4;" return identifier ;) })) })) (expression_statement "safefree(__path);" (call_expression "safefree(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) })) (if_statement "if (path[(int)uVar5] == '\0') break;" if (parenthesized_expression "(path[(int)uVar5] == '\0')" ( (binary_expression "path[(int)uVar5] == '\0'" (subscript_expression "path[(int)uVar5]" identifier [ (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier) ]) == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "sVar2 = strspn(path + (int)uVar5,"/");" (assignment_expression "sVar2 = strspn(path + (int)uVar5,"/")" identifier = (call_expression "strspn(path + (int)uVar5,"/")" identifier (argument_list "(path + (int)uVar5,"/")" ( (binary_expression "path + (int)uVar5" identifier + (cast_expression "(int)uVar5" ( (type_descriptor "int" primitive_type) ) identifier)) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "iVar1 = uVar5 + (int)sVar2;" (assignment_expression "iVar1 = uVar5 + (int)sVar2" identifier = (binary_expression "uVar5 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0014a0a9(long param_1,__mode_t param_2)" identifier (parameter_list "(long param_1,__mode_t param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "__mode_t param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__path;" primitive_type (pointer_declarator "*__path" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" { (expression_statement "sVar2 = strcspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strcspn((char *)(iVar6 + param_1),"/")" identifier = (call_expression "strcspn((char *)(iVar6 + param_1),"/")" identifier (argument_list "((char *)(iVar6 + param_1),"/")" ( (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) ))) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" identifier = (binary_expression "iVar6 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" if (parenthesized_expression "(0 < iVar6)" ( (binary_expression "0 < iVar6" number_literal < identifier) )) (compound_statement "{\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" { (expression_statement "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);" (assignment_expression "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" identifier = (cast_expression "(char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" identifier (argument_list "(&DAT_0016d6d4,iVar6,param_1)" ( (pointer_expression "&DAT_0016d6d4" & identifier) , identifier , identifier ))))) ;) (expression_statement "iVar1 = mkdir(__path,param_2);" (assignment_expression "iVar1 = mkdir(__path,param_2)" identifier = (call_expression "mkdir(__path,param_2)" identifier (argument_list "(__path,param_2)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" if (parenthesized_expression "(*piVar3 != 0x11)" ( (binary_expression "*piVar3 != 0x11" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" { (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);" (assignment_expression "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4)" identifier = (call_expression "FUN_00121586("%s: mkdir: %s",__path,pcVar4)" identifier (argument_list "("%s: mkdir: %s",__path,pcVar4)" ( (string_literal ""%s: mkdir: %s"" " string_content ") , identifier , identifier )))) ;) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) (return_statement "return uVar5;" return identifier ;) })) })) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" identifier (argument_list "(__path)" ( identifier ))) ;) })) (if_statement "if (*(char *)(iVar6 + param_1) == '\0') break;" if (parenthesized_expression "(*(char *)(iVar6 + param_1) == '\0')" ( (binary_expression "*(char *)(iVar6 + param_1) == '\0'" (pointer_expression "*(char *)(iVar6 + param_1)" * (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "sVar2 = strspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strspn((char *)(iVar6 + param_1),"/")" identifier = (call_expression "strspn((char *)(iVar6 + param_1),"/")" identifier (argument_list "((char *)(iVar6 + param_1),"/")" ( (cast_expression "(char *)(iVar6 + param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + param_1)" ( (binary_expression "iVar6 + param_1" identifier + identifier) ))) , (string_literal ""/"" " string_content ") )))) ;) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" identifier = (binary_expression "iVar6 + (int)sVar2" identifier + (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) == (char_literal ' escape_sequence ')) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined8 FUN_0014a0a9(long param_1,__mode_t param_2)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_0014a0a9(long param_1,__mode_t param_2)" (identifier "FUN_0014a0a9") (parameter_list "(long param_1,__mode_t param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "__mode_t param_2" (type_identifier "__mode_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *__path;\n  int *piVar3;\n  char *pcVar4;\n  undefined8 uVar5;\n  int iVar6;\n  \n  iVar6 = 0;\n  while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__path;" (primitive_type "char") (pointer_declarator "*__path" (* "*") (identifier "__path")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" (identifier "iVar6") (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    sVar2 = strcspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n    if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }\n    if (*(char *)(iVar6 + param_1) == '\0') break;\n    sVar2 = strspn((char *)(iVar6 + param_1),"/");\n    iVar6 = iVar6 + (int)sVar2;\n  }" ({ "{") (expression_statement "sVar2 = strcspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strcspn((char *)(iVar6 + param_1),"/")" (identifier "sVar2") (= "=") (call_expression "strcspn((char *)(iVar6 + param_1),"/")" (identifier "strcspn") (argument_list "((char *)(iVar6 + param_1),"/")" (( "(") (cast_expression "(char *)(iVar6 + param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + param_1)" (( "(") (binary_expression "iVar6 + param_1" (identifier "iVar6") (+ "+") (identifier "param_1")) () ")"))) (, ",") (string_literal ""/"" (" """) (string_content "/") (" """)) () ")")))) (; ";")) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" (identifier "iVar6") (= "=") (binary_expression "iVar6 + (int)sVar2" (identifier "iVar6") (+ "+") (cast_expression "(int)sVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar2")))) (; ";")) (if_statement "if (0 < iVar6) {\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" (if "if") (parenthesized_expression "(0 < iVar6)" (( "(") (binary_expression "0 < iVar6" (number_literal "0") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);\n      iVar1 = mkdir(__path,param_2);\n      if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }\n      FUN_001217b3(__path);\n    }" ({ "{") (expression_statement "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);" (assignment_expression "__path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" (identifier "__path") (= "=") (cast_expression "(char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00121586(&DAT_0016d6d4,iVar6,param_1)" (identifier "FUN_00121586") (argument_list "(&DAT_0016d6d4,iVar6,param_1)" (( "(") (pointer_expression "&DAT_0016d6d4" (& "&") (identifier "DAT_0016d6d4")) (, ",") (identifier "iVar6") (, ",") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "iVar1 = mkdir(__path,param_2);" (assignment_expression "iVar1 = mkdir(__path,param_2)" (identifier "iVar1") (= "=") (call_expression "mkdir(__path,param_2)" (identifier "mkdir") (argument_list "(__path,param_2)" (( "(") (identifier "__path") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        piVar3 = __errno_location();\n        if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }\n      }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar3 != 0x11) {\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" (if "if") (parenthesized_expression "(*piVar3 != 0x11)" (( "(") (binary_expression "*piVar3 != 0x11" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "0x11")) () ")")) (compound_statement "{\n          pcVar4 = strerror(*piVar3);\n          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);\n          FUN_001217b3(__path);\n          return uVar5;\n        }" ({ "{") (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);" (assignment_expression "uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4)" (identifier "uVar5") (= "=") (call_expression "FUN_00121586("%s: mkdir: %s",__path,pcVar4)" (identifier "FUN_00121586") (argument_list "("%s: mkdir: %s",__path,pcVar4)" (( "(") (string_literal ""%s: mkdir: %s"" (" """) (string_content "%s: mkdir: %s") (" """)) (, ",") (identifier "__path") (, ",") (identifier "pcVar4") () ")")))) (; ";")) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" (identifier "FUN_001217b3") (argument_list "(__path)" (( "(") (identifier "__path") () ")"))) (; ";")) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_001217b3(__path);" (call_expression "FUN_001217b3(__path)" (identifier "FUN_001217b3") (argument_list "(__path)" (( "(") (identifier "__path") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(char *)(iVar6 + param_1) == '\0') break;" (if "if") (parenthesized_expression "(*(char *)(iVar6 + param_1) == '\0')" (( "(") (binary_expression "*(char *)(iVar6 + param_1) == '\0'" (pointer_expression "*(char *)(iVar6 + param_1)" (* "*") (cast_expression "(char *)(iVar6 + param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + param_1)" (( "(") (binary_expression "iVar6 + param_1" (identifier "iVar6") (+ "+") (identifier "param_1")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "sVar2 = strspn((char *)(iVar6 + param_1),"/");" (assignment_expression "sVar2 = strspn((char *)(iVar6 + param_1),"/")" (identifier "sVar2") (= "=") (call_expression "strspn((char *)(iVar6 + param_1),"/")" (identifier "strspn") (argument_list "((char *)(iVar6 + param_1),"/")" (( "(") (cast_expression "(char *)(iVar6 + param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + param_1)" (( "(") (binary_expression "iVar6 + param_1" (identifier "iVar6") (+ "+") (identifier "param_1")) () ")"))) (, ",") (string_literal ""/"" (" """) (string_content "/") (" """)) () ")")))) (; ";")) (expression_statement "iVar6 = iVar6 + (int)sVar2;" (assignment_expression "iVar6 = iVar6 + (int)sVar2" (identifier "iVar6") (= "=") (binary_expression "iVar6 + (int)sVar2" (identifier "iVar6") (+ "+") (cast_expression "(int)sVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar2")))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

char * function_1(char *var_2,type_1 mode)

{
  int var_3;
  size_t sVar2;
  char *__path;
  int *piVar3;
  char *pcVar4;
  type_2 var_10;
  
  var_3 = 0;
  while( true ) {
    sVar2 = var_1(var_2 + var_3,"/");
    var_10 = var_3 + (int)sVar2;
    if (0 < (int)var_10) {
      __path = var_4("%.*s",(type_3)var_10,var_2);
      var_3 = var_5(__path,mode);
      if (var_3 < 0) {
        piVar3 = var_6();
        if (*piVar3 != 0x11) {
          pcVar4 = var_7(*piVar3);
          pcVar4 = var_4("%s: mkdir: %s",__path,pcVar4);
          var_8(__path);
          return pcVar4;
        }
      }
      var_8(__path);
    }
    if (var_2[(int)var_10] == '\0') break;
    sVar2 = var_9(var_2 + (int)var_10,"/");
    var_3 = var_10 + (int)sVar2;
  }
  return (char *)0x0;
}


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

undefined8 MASKED(long param_1,__mode_t param_2)

{
  int iVar1;
  size_t sVar2;
  char *__path;
  int *piVar3;
  char *pcVar4;
  undefined8 uVar5;
  int iVar6;
  
  iVar6 = 0;
  while( true ) {
    sVar2 = strcspn((char *)(iVar6 + param_1),"/");
    iVar6 = iVar6 + (int)sVar2;
    if (0 < iVar6) {
      __path = (char *)FUN_00121586(&DAT_0016d6d4,iVar6,param_1);
      iVar1 = mkdir(__path,param_2);
      if (iVar1 < 0) {
        piVar3 = __errno_location();
        if (*piVar3 != 0x11) {
          pcVar4 = strerror(*piVar3);
          uVar5 = FUN_00121586("%s: mkdir: %s",__path,pcVar4);
          FUN_001217b3(__path);
          return uVar5;
        }
      }
      FUN_001217b3(__path);
    }
    if (*(char *)(iVar6 + param_1) == '\0') break;
    sVar2 = strspn((char *)(iVar6 + param_1),"/");
    iVar6 = iVar6 + (int)sVar2;
  }
  return 0;
}

