
char * sqlite3DbSpanDup(sqlite3 *db,char *zStart,char *zEnd)

{
  byte bVar1;
  uint uVar2;
  ulong uVar3;
  char *pcVar4;
  byte *pbVar5;
  
  bVar1 = ""[(byte)*zStart];
  while ((bVar1 & 1) != 0) {
    zStart = (char *)((byte *)zStart + 1);
    bVar1 = ""[(byte)*zStart];
  }
  uVar2 = (uint)((long)zEnd - (long)zStart);
  uVar3 = (long)zEnd - (long)zStart & 0xffffffff;
  if ((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)) {
    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;
    do {
      uVar2 = (int)uVar3 - 1;
      uVar3 = (ulong)uVar2;
      if (uVar2 == 0) break;
      bVar1 = *pbVar5;
      pbVar5 = pbVar5 + -1;
    } while ((""[bVar1] & 1) != 0);
  }
  pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2);
  return pcVar4;
}



void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)

{
  byte bVar1;
  uint uVar2;
  ulong uVar3;
  byte *pbVar4;
  
  bVar1 = (&DAT_00196400)[*param_2];
  while ((bVar1 & 1) != 0) {
    param_2 = param_2 + 1;
    bVar1 = (&DAT_00196400)[*param_2];
  }
  uVar2 = (uint)(param_3 - (long)param_2);
  uVar3 = param_3 - (long)param_2 & 0xffffffff;
  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {
    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;
    do {
      uVar2 = (int)uVar3 - 1;
      uVar3 = (ulong)uVar2;
      if (uVar2 == 0) break;
      bVar1 = *pbVar4;
      pbVar4 = pbVar4 + -1;
    } while (((&DAT_00196400)[bVar1] & 1) != 0);
  }
  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);
  return;
}


SUB RSP,0x8
MOVZX EAX,byte ptr [RSI]
LEA RCX,[0x196400]
TEST byte ptr [RCX + RAX*0x1],0x1
JZ 0x0011f10b
ADD RSI,0x1
MOVZX EAX,byte ptr [RSI]
TEST byte ptr [RCX + RAX*0x1],0x1
JNZ 0x0011f0fe
SUB RDX,RSI
MOV EAX,EDX
TEST EDX,EDX
JLE 0x0011f148
MOVSXD RCX,EDX
MOVZX ECX,byte ptr [RSI + RCX*0x1 + -0x1]
LEA R8,[0x196400]
TEST byte ptr [R8 + RCX*0x1],0x1
JZ 0x0011f148
SUB EDX,0x1
MOVSXD RDX,EDX
LEA RDX,[RSI + RDX*0x1 + -0x1]
SUB EAX,0x1
JZ 0x0011f148
MOVZX ECX,byte ptr [RDX]
SUB RDX,0x1
TEST byte ptr [R8 + RCX*0x1],0x1
JNZ 0x0011f135
MOVSXD RDX,EAX
CALL 0x0011f0a7
ADD RSP,0x8
RET
(translation_unit "void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)" identifier (parameter_list "(undefined8 param_1,byte *param_2,long param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" identifier = (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "*param_2" * identifier) ])) ;) (while_statement "while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" while (parenthesized_expression "((bVar1 & 1) != 0)" ( (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" { (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" identifier = (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "*param_2" * identifier) ])) ;) })) (expression_statement "uVar2 = (uint)(param_3 - (long)param_2);" (assignment_expression "uVar2 = (uint)(param_3 - (long)param_2)" identifier = (call_expression "(uint)(param_3 - (long)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 - (long)param_2)" ( (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "uVar3 = param_3 - (long)param_2 & 0xffffffff;" (assignment_expression "uVar3 = param_3 - (long)param_2 & 0xffffffff" identifier = (binary_expression "param_3 - (long)param_2 & 0xffffffff" (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) & number_literal)) ;) (if_statement "if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" if (parenthesized_expression "((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0))" ( (binary_expression "(0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" (parenthesized_expression "(0 < (int)uVar2)" ( (binary_expression "0 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" ( (binary_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1)" ( (binary_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1" (subscript_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (subscript_expression "param_2[(long)(int)uVar2 + -1]" identifier [ (binary_expression "(long)(int)uVar2 + -1" (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) ]) ]) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" { (expression_statement "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;" (assignment_expression "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1" identifier = (binary_expression "param_2 + (long)(int)(uVar2 - 1) + -1" (binary_expression "param_2 + (long)(int)(uVar2 - 1)" identifier + (cast_expression "(long)(int)(uVar2 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uVar2 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - 1)" ( (binary_expression "uVar2 - 1" identifier - number_literal) ))))) + number_literal)) ;) (do_statement "do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);" do (compound_statement "{\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    }" { (expression_statement "uVar2 = (int)uVar3 - 1;" (assignment_expression "uVar2 = (int)uVar3 - 1" identifier = (binary_expression "(int)uVar3 - 1" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (expression_statement "uVar3 = (ulong)uVar2;" (assignment_expression "uVar3 = (ulong)uVar2" identifier = (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar2 == 0) break;" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + -1;" (assignment_expression "pbVar4 = pbVar4 + -1" identifier = (binary_expression "pbVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(((&DAT_00196400)[bVar1] & 1) != 0)" ( (binary_expression "((&DAT_00196400)[bVar1] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[bVar1] & 1)" ( (binary_expression "(&DAT_00196400)[bVar1] & 1" (subscript_expression "(&DAT_00196400)[bVar1]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ identifier ]) & number_literal) )) != number_literal) )) ;) })) (expression_statement "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);" (call_expression "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2)" identifier (argument_list "(param_1,param_2,(long)(int)uVar2)" ( identifier , identifier , (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "char * sqlite3DbSpanDup(sqlite3 *db,char *zStart,char *zEnd)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  char *pcVar4;\n  byte *pbVar5;\n  \n  bVar1 = ""[(byte)*zStart];\n  while ((bVar1 & 1) != 0) {\n    zStart = (char *)((byte *)zStart + 1);\n    bVar1 = ""[(byte)*zStart];\n  }\n  uVar2 = (uint)((long)zEnd - (long)zStart);\n  uVar3 = (long)zEnd - (long)zStart & 0xffffffff;\n  if ((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);\n  }\n  pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2);\n  return pcVar4;\n}\n\n" (function_definition "char * sqlite3DbSpanDup(sqlite3 *db,char *zStart,char *zEnd)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  char *pcVar4;\n  byte *pbVar5;\n  \n  bVar1 = ""[(byte)*zStart];\n  while ((bVar1 & 1) != 0) {\n    zStart = (char *)((byte *)zStart + 1);\n    bVar1 = ""[(byte)*zStart];\n  }\n  uVar2 = (uint)((long)zEnd - (long)zStart);\n  uVar3 = (long)zEnd - (long)zStart & 0xffffffff;\n  if ((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);\n  }\n  pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* sqlite3DbSpanDup(sqlite3 *db,char *zStart,char *zEnd)" * (function_declarator "sqlite3DbSpanDup(sqlite3 *db,char *zStart,char *zEnd)" identifier (parameter_list "(sqlite3 *db,char *zStart,char *zEnd)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *zStart" primitive_type (pointer_declarator "*zStart" * identifier)) , (parameter_declaration "char *zEnd" primitive_type (pointer_declarator "*zEnd" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  char *pcVar4;\n  byte *pbVar5;\n  \n  bVar1 = ""[(byte)*zStart];\n  while ((bVar1 & 1) != 0) {\n    zStart = (char *)((byte *)zStart + 1);\n    bVar1 = ""[(byte)*zStart];\n  }\n  uVar2 = (uint)((long)zEnd - (long)zStart);\n  uVar3 = (long)zEnd - (long)zStart & 0xffffffff;\n  if ((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);\n  }\n  pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2);\n  return pcVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (expression_statement "bVar1 = ""[(byte)*zStart];" (assignment_expression "bVar1 = ""[(byte)*zStart]" identifier = (subscript_expression """[(byte)*zStart]" (string_literal """" " ") [ (binary_expression "(byte)*zStart" (parenthesized_expression "(byte)" ( identifier )) * identifier) ])) ;) (while_statement "while ((bVar1 & 1) != 0) {\n    zStart = (char *)((byte *)zStart + 1);\n    bVar1 = ""[(byte)*zStart];\n  }" while (parenthesized_expression "((bVar1 & 1) != 0)" ( (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    zStart = (char *)((byte *)zStart + 1);\n    bVar1 = ""[(byte)*zStart];\n  }" { (expression_statement "zStart = (char *)((byte *)zStart + 1);" (assignment_expression "zStart = (char *)((byte *)zStart + 1)" identifier = (cast_expression "(char *)((byte *)zStart + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)zStart + 1)" ( (binary_expression "(byte *)zStart + 1" (cast_expression "(byte *)zStart" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "bVar1 = ""[(byte)*zStart];" (assignment_expression "bVar1 = ""[(byte)*zStart]" identifier = (subscript_expression """[(byte)*zStart]" (string_literal """" " ") [ (binary_expression "(byte)*zStart" (parenthesized_expression "(byte)" ( identifier )) * identifier) ])) ;) })) (expression_statement "uVar2 = (uint)((long)zEnd - (long)zStart);" (assignment_expression "uVar2 = (uint)((long)zEnd - (long)zStart)" identifier = (call_expression "(uint)((long)zEnd - (long)zStart)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((long)zEnd - (long)zStart)" ( (binary_expression "(long)zEnd - (long)zStart" (cast_expression "(long)zEnd" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)zStart" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "uVar3 = (long)zEnd - (long)zStart & 0xffffffff;" (assignment_expression "uVar3 = (long)zEnd - (long)zStart & 0xffffffff" identifier = (binary_expression "(long)zEnd - (long)zStart & 0xffffffff" (binary_expression "(long)zEnd - (long)zStart" (cast_expression "(long)zEnd" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)zStart" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) & number_literal)) ;) (if_statement "if ((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);\n  }" if (parenthesized_expression "((0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0))" ( (binary_expression "(0 < (int)uVar2) && ((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)" (parenthesized_expression "(0 < (int)uVar2)" ( (binary_expression "0 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0)" ( (binary_expression "(""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1) != 0" (parenthesized_expression "(""[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1)" ( (binary_expression """[((byte *)zStart)[(long)(int)uVar2 + -1]] & 1" (subscript_expression """[((byte *)zStart)[(long)(int)uVar2 + -1]]" (string_literal """" " ") [ (subscript_expression "((byte *)zStart)[(long)(int)uVar2 + -1]" (parenthesized_expression "((byte *)zStart)" ( (cast_expression "(byte *)zStart" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ (binary_expression "(long)(int)uVar2 + -1" (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) ]) ]) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);\n  }" { (expression_statement "pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1;" (assignment_expression "pbVar5 = (byte *)zStart + (long)(int)(uVar2 - 1) + -1" identifier = (binary_expression "(byte *)zStart + (long)(int)(uVar2 - 1) + -1" (binary_expression "(byte *)zStart + (long)(int)(uVar2 - 1)" (cast_expression "(byte *)zStart" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + (cast_expression "(long)(int)(uVar2 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uVar2 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - 1)" ( (binary_expression "uVar2 - 1" identifier - number_literal) ))))) + number_literal)) ;) (do_statement "do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    } while ((""[bVar1] & 1) != 0);" do (compound_statement "{\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar5;\n      pbVar5 = pbVar5 + -1;\n    }" { (expression_statement "uVar2 = (int)uVar3 - 1;" (assignment_expression "uVar2 = (int)uVar3 - 1" identifier = (binary_expression "(int)uVar3 - 1" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (expression_statement "uVar3 = (ulong)uVar2;" (assignment_expression "uVar3 = (ulong)uVar2" identifier = (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar2 == 0) break;" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = *pbVar5;" (assignment_expression "bVar1 = *pbVar5" identifier = (pointer_expression "*pbVar5" * identifier)) ;) (expression_statement "pbVar5 = pbVar5 + -1;" (assignment_expression "pbVar5 = pbVar5 + -1" identifier = (binary_expression "pbVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "((""[bVar1] & 1) != 0)" ( (binary_expression "(""[bVar1] & 1) != 0" (parenthesized_expression "(""[bVar1] & 1)" ( (binary_expression """[bVar1] & 1" (subscript_expression """[bVar1]" (string_literal """" " ") [ identifier ]) & number_literal) )) != number_literal) )) ;) })) (expression_statement "pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2);" (assignment_expression "pcVar4 = sqlite3DbStrNDup(db,zStart,(long)(int)uVar2)" identifier = (call_expression "sqlite3DbStrNDup(db,zStart,(long)(int)uVar2)" identifier (argument_list "(db,zStart,(long)(int)uVar2)" ( identifier , identifier , (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)" identifier (parameter_list "(undefined8 param_1,byte *param_2,long param_3)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" identifier = (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "*param_2" * identifier) ])) ;) (while_statement "while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" while (parenthesized_expression "((bVar1 & 1) != 0)" ( (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" { (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" identifier = (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (pointer_expression "*param_2" * identifier) ])) ;) })) (expression_statement "uVar2 = (uint)(param_3 - (long)param_2);" (assignment_expression "uVar2 = (uint)(param_3 - (long)param_2)" identifier = (call_expression "(uint)(param_3 - (long)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 - (long)param_2)" ( (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "uVar3 = param_3 - (long)param_2 & 0xffffffff;" (assignment_expression "uVar3 = param_3 - (long)param_2 & 0xffffffff" identifier = (binary_expression "param_3 - (long)param_2 & 0xffffffff" (binary_expression "param_3 - (long)param_2" identifier - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) & number_literal)) ;) (if_statement "if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" if (parenthesized_expression "((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0))" ( (binary_expression "(0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" (parenthesized_expression "(0 < (int)uVar2)" ( (binary_expression "0 < (int)uVar2" number_literal < (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" ( (binary_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1)" ( (binary_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1" (subscript_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ (subscript_expression "param_2[(long)(int)uVar2 + -1]" identifier [ (binary_expression "(long)(int)uVar2 + -1" (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) + number_literal) ]) ]) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" { (expression_statement "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;" (assignment_expression "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1" identifier = (binary_expression "param_2 + (long)(int)(uVar2 - 1) + -1" (binary_expression "param_2 + (long)(int)(uVar2 - 1)" identifier + (cast_expression "(long)(int)(uVar2 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(uVar2 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar2 - 1)" ( (binary_expression "uVar2 - 1" identifier - number_literal) ))))) + number_literal)) ;) (do_statement "do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);" do (compound_statement "{\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    }" { (expression_statement "uVar2 = (int)uVar3 - 1;" (assignment_expression "uVar2 = (int)uVar3 - 1" identifier = (binary_expression "(int)uVar3 - 1" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) - number_literal)) ;) (expression_statement "uVar3 = (ulong)uVar2;" (assignment_expression "uVar3 = (ulong)uVar2" identifier = (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (uVar2 == 0) break;" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + -1;" (assignment_expression "pbVar4 = pbVar4 + -1" identifier = (binary_expression "pbVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(((&DAT_00196400)[bVar1] & 1) != 0)" ( (binary_expression "((&DAT_00196400)[bVar1] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[bVar1] & 1)" ( (binary_expression "(&DAT_00196400)[bVar1] & 1" (subscript_expression "(&DAT_00196400)[bVar1]" (parenthesized_expression "(&DAT_00196400)" ( (pointer_expression "&DAT_00196400" & identifier) )) [ identifier ]) & number_literal) )) != number_literal) )) ;) })) (expression_statement "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);" (call_expression "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2)" identifier (argument_list "(param_1,param_2,(long)(int)uVar2)" ( identifier , identifier , (cast_expression "(long)(int)uVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (pointer_expression * IDENT) ])) ;) (while_statement while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (pointer_expression * IDENT) ])) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (subscript_expression IDENT [ (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) + LIT) ]) ]) & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - LIT) ))))) + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) & LIT) )) != LIT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)\n\n{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0011f0ea(undefined8 param_1,byte *param_2,long param_3)" (identifier "FUN_0011f0ea") (parameter_list "(undefined8 param_1,byte *param_2,long param_3)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  ulong uVar3;\n  byte *pbVar4;\n  \n  bVar1 = (&DAT_00196400)[*param_2];\n  while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }\n  uVar2 = (uint)(param_3 - (long)param_2);\n  uVar3 = param_3 - (long)param_2 & 0xffffffff;\n  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }\n  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" (identifier "bVar1") (= "=") (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" (( "(") (pointer_expression "&DAT_00196400" (& "&") (identifier "DAT_00196400")) () ")")) ([ "[") (pointer_expression "*param_2" (* "*") (identifier "param_2")) (] "]"))) (; ";")) (while_statement "while ((bVar1 & 1) != 0) {\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" (while "while") (parenthesized_expression "((bVar1 & 1) != 0)" (( "(") (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" (( "(") (binary_expression "bVar1 & 1" (identifier "bVar1") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    param_2 = param_2 + 1;\n    bVar1 = (&DAT_00196400)[*param_2];\n  }" ({ "{") (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar1 = (&DAT_00196400)[*param_2];" (assignment_expression "bVar1 = (&DAT_00196400)[*param_2]" (identifier "bVar1") (= "=") (subscript_expression "(&DAT_00196400)[*param_2]" (parenthesized_expression "(&DAT_00196400)" (( "(") (pointer_expression "&DAT_00196400" (& "&") (identifier "DAT_00196400")) () ")")) ([ "[") (pointer_expression "*param_2" (* "*") (identifier "param_2")) (] "]"))) (; ";")) (} "}"))) (expression_statement "uVar2 = (uint)(param_3 - (long)param_2);" (assignment_expression "uVar2 = (uint)(param_3 - (long)param_2)" (identifier "uVar2") (= "=") (call_expression "(uint)(param_3 - (long)param_2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_3 - (long)param_2)" (( "(") (binary_expression "param_3 - (long)param_2" (identifier "param_3") (- "-") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2"))) () ")")))) (; ";")) (expression_statement "uVar3 = param_3 - (long)param_2 & 0xffffffff;" (assignment_expression "uVar3 = param_3 - (long)param_2 & 0xffffffff" (identifier "uVar3") (= "=") (binary_expression "param_3 - (long)param_2 & 0xffffffff" (binary_expression "param_3 - (long)param_2" (identifier "param_3") (- "-") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2"))) (& "&") (number_literal "0xffffffff"))) (; ";")) (if_statement "if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" (if "if") (parenthesized_expression "((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0))" (( "(") (binary_expression "(0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" (parenthesized_expression "(0 < (int)uVar2)" (( "(") (binary_expression "0 < (int)uVar2" (number_literal "0") (< "<") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) () ")")) (&& "&&") (parenthesized_expression "(((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)" (( "(") (binary_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1)" (( "(") (binary_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1" (subscript_expression "(&DAT_00196400)[param_2[(long)(int)uVar2 + -1]]" (parenthesized_expression "(&DAT_00196400)" (( "(") (pointer_expression "&DAT_00196400" (& "&") (identifier "DAT_00196400")) () ")")) ([ "[") (subscript_expression "param_2[(long)(int)uVar2 + -1]" (identifier "param_2") ([ "[") (binary_expression "(long)(int)uVar2 + -1" (cast_expression "(long)(int)uVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) (+ "+") (number_literal "-1")) (] "]")) (] "]")) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;\n    do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);\n  }" ({ "{") (expression_statement "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;" (assignment_expression "pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1" (identifier "pbVar4") (= "=") (binary_expression "param_2 + (long)(int)(uVar2 - 1) + -1" (binary_expression "param_2 + (long)(int)(uVar2 - 1)" (identifier "param_2") (+ "+") (cast_expression "(long)(int)(uVar2 - 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(uVar2 - 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar2 - 1)" (( "(") (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1")) () ")"))))) (+ "+") (number_literal "-1"))) (; ";")) (do_statement "do {\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    } while (((&DAT_00196400)[bVar1] & 1) != 0);" (do "do") (compound_statement "{\n      uVar2 = (int)uVar3 - 1;\n      uVar3 = (ulong)uVar2;\n      if (uVar2 == 0) break;\n      bVar1 = *pbVar4;\n      pbVar4 = pbVar4 + -1;\n    }" ({ "{") (expression_statement "uVar2 = (int)uVar3 - 1;" (assignment_expression "uVar2 = (int)uVar3 - 1" (identifier "uVar2") (= "=") (binary_expression "(int)uVar3 - 1" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (- "-") (number_literal "1"))) (; ";")) (expression_statement "uVar3 = (ulong)uVar2;" (assignment_expression "uVar3 = (ulong)uVar2" (identifier "uVar3") (= "=") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2"))) (; ";")) (if_statement "if (uVar2 == 0) break;" (if "if") (parenthesized_expression "(uVar2 == 0)" (( "(") (binary_expression "uVar2 == 0" (identifier "uVar2") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" (identifier "bVar1") (= "=") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + -1;" (assignment_expression "pbVar4 = pbVar4 + -1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + -1" (identifier "pbVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(((&DAT_00196400)[bVar1] & 1) != 0)" (( "(") (binary_expression "((&DAT_00196400)[bVar1] & 1) != 0" (parenthesized_expression "((&DAT_00196400)[bVar1] & 1)" (( "(") (binary_expression "(&DAT_00196400)[bVar1] & 1" (subscript_expression "(&DAT_00196400)[bVar1]" (parenthesized_expression "(&DAT_00196400)" (( "(") (pointer_expression "&DAT_00196400" (& "&") (identifier "DAT_00196400")) () ")")) ([ "[") (identifier "bVar1") (] "]")) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (expression_statement "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);" (call_expression "FUN_0011f0a7(param_1,param_2,(long)(int)uVar2)" (identifier "FUN_0011f0a7") (argument_list "(param_1,param_2,(long)(int)uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (cast_expression "(long)(int)uVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2"))) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

char * function_1(type_1 *db,char *var_1,char *zEnd)

{
  type_2 var_2;
  type_3 var_3;
  type_4 uVar3;
  char *pcVar4;
  type_2 *var_4;
  
  var_2 = ""[(type_2)*var_1];
  while ((var_2 & 1) != 0) {
    var_1 = (char *)((type_2 *)var_1 + 1);
    var_2 = ""[(type_2)*var_1];
  }
  var_3 = (type_3)((long)zEnd - (long)var_1);
  uVar3 = (long)zEnd - (long)var_1 & 0xffffffff;
  if ((0 < (int)var_3) && ((""[((type_2 *)var_1)[(long)(int)var_3 + -1]] & 1) != 0)) {
    var_4 = (type_2 *)var_1 + (long)(int)(var_3 - 1) + -1;
    do {
      var_3 = (int)uVar3 - 1;
      uVar3 = (type_4)var_3;
      if (var_3 == 0) break;
      var_2 = *var_4;
      var_4 = var_4 + -1;
    } while ((""[var_2] & 1) != 0);
  }
  pcVar4 = var_5(db,var_1,(long)(int)var_3);
  return pcVar4;
}


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

void MASKED(undefined8 param_1,byte *param_2,long param_3)

{
  byte bVar1;
  uint uVar2;
  ulong uVar3;
  byte *pbVar4;
  
  bVar1 = (&DAT_00196400)[*param_2];
  while ((bVar1 & 1) != 0) {
    param_2 = param_2 + 1;
    bVar1 = (&DAT_00196400)[*param_2];
  }
  uVar2 = (uint)(param_3 - (long)param_2);
  uVar3 = param_3 - (long)param_2 & 0xffffffff;
  if ((0 < (int)uVar2) && (((&DAT_00196400)[param_2[(long)(int)uVar2 + -1]] & 1) != 0)) {
    pbVar4 = param_2 + (long)(int)(uVar2 - 1) + -1;
    do {
      uVar2 = (int)uVar3 - 1;
      uVar3 = (ulong)uVar2;
      if (uVar2 == 0) break;
      bVar1 = *pbVar4;
      pbVar4 = pbVar4 + -1;
    } while (((&DAT_00196400)[bVar1] & 1) != 0);
  }
  FUN_0011f0a7(param_1,param_2,(long)(int)uVar2);
  return;
}

