
size_t get_softwrap_breakpoint(char *text,size_t leftedge,_Bool *end_of_line)

{
  _Bool _Var1;
  wchar_t wVar2;
  ulong uVar3;
  size_t sVar4;
  size_t sVar5;
  char *buf;
  long in_FS_OFFSET;
  size_t column;
  size_t last_blank_col;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  uVar3 = (long)editwincols + leftedge;
  column = 0;
  last_blank_col = 0;
  if (*text == '\0') {
LAB_00128863:
    *end_of_line = column < uVar3;
    sVar4 = column;
    goto LAB_0012886d;
  }
  sVar5 = uVar3;
  if (leftedge == 0) {
LAB_001287f3:
    buf = (char *)0x0;
    do {
      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&
         (column < uVar3)) {
        last_blank_col = column;
        buf = text;
      }
      sVar5 = column;
      if (*text == '\t') {
        sVar5 = uVar3;
      }
      wVar2 = parse_mbchar(text,(char *)0x0,&column);
      text = text + wVar2;
      if (*text == '\0') {
        if (column <= uVar3) goto LAB_00128863;
        break;
      }
    } while (column <= uVar3);
    if (buf != (char *)0x0) {
      parse_mbchar(buf,(char *)0x0,&last_blank_col);
      sVar4 = last_blank_col;
      if (last_blank_col <= uVar3) goto LAB_0012886d;
      if (*buf == '\t') {
        sVar5 = uVar3;
      }
    }
  }
  else {
    do {
      wVar2 = parse_mbchar(text,(char *)0x0,&column);
      text = text + wVar2;
      if (*text == '\0') {
        if (uVar3 < column) goto LAB_001288b8;
        goto LAB_00128863;
      }
    } while (column < leftedge);
    if (column <= uVar3) goto LAB_001287f3;
  }
LAB_001288b8:
  sVar4 = sVar5;
  if (editwincols < L'\x02') {
    sVar4 = column - 1;
  }
LAB_0012886d:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return sVar4;
}



ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)

{
  char cVar1;
  int iVar2;
  ulong uVar3;
  ulong uVar4;
  ulong uVar5;
  char *pcVar6;
  long in_FS_OFFSET;
  ulong local_50;
  ulong local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  uVar3 = (long)DAT_0013b070 + param_2;
  local_50 = 0;
  local_48 = 0;
  if (*param_1 == '\0') {
LAB_00128863:
    *(bool *)param_3 = local_50 < uVar3;
    uVar4 = local_50;
    goto LAB_0012886d;
  }
  uVar5 = uVar3;
  if (param_2 == 0) {
LAB_001287f3:
    pcVar6 = (char *)0x0;
    do {
      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&
         (local_50 < uVar3)) {
        local_48 = local_50;
        pcVar6 = param_1;
      }
      uVar5 = local_50;
      if (*param_1 == '\t') {
        uVar5 = uVar3;
      }
      iVar2 = FUN_00107814(param_1,0,&local_50);
      param_1 = param_1 + iVar2;
      if (*param_1 == '\0') {
        if (local_50 <= uVar3) goto LAB_00128863;
        break;
      }
    } while (local_50 <= uVar3);
    if (pcVar6 != (char *)0x0) {
      FUN_00107814(pcVar6,0,&local_48);
      uVar4 = local_48;
      if (local_48 <= uVar3) goto LAB_0012886d;
      if (*pcVar6 == '\t') {
        uVar5 = uVar3;
      }
    }
  }
  else {
    do {
      iVar2 = FUN_00107814(param_1,0,&local_50);
      param_1 = param_1 + iVar2;
      if (*param_1 == '\0') {
        if (uVar3 < local_50) goto LAB_001288b8;
        goto LAB_00128863;
      }
    } while (local_50 < param_2);
    if (local_50 <= uVar3) goto LAB_001287f3;
  }
LAB_001288b8:
  uVar4 = uVar5;
  if (DAT_0013b070 < 2) {
    uVar4 = local_50 - 1;
  }
LAB_0012886d:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar4;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
MOVSXD RBP,dword ptr [0x0013b070]
ADD RBP,RSI
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
CMP byte ptr [RDI],0x0
JZ 0x001288e5
MOV RBX,RDI
MOV R12,RSI
TEST RSI,RSI
JZ 0x001287f3
LEA R13,[RSP + 0x8]
MOV RDX,R13
MOV ESI,0x0
MOV RDI,RBX
CALL 0x00107814
CDQE
ADD RBX,RAX
CMP byte ptr [RBX],0x0
JZ 0x001288d6
CMP qword ptr [RSP + 0x8],R12
JC 0x001287c3
CMP RBP,qword ptr [RSP + 0x8]
JC 0x001288cc
MOV R14D,0x0
LEA R13,[RSP + 0x8]
JMP 0x00128846
MOV RDI,RBX
CALL 0x001075e9
TEST AL,AL
JZ 0x0012884f
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RBP
JNC 0x0012884f
MOV qword ptr [RSP + 0x10],RAX
MOV R14,RBX
JMP 0x0012884f
MOV R12,qword ptr [RSP + 0x8]
MOV RDX,R13
MOV ESI,0x0
MOV RDI,RBX
CALL 0x00107814
CDQE
ADD RBX,RAX
CMP byte ptr [RBX],0x0
JZ 0x00128859
CMP qword ptr [RSP + 0x8],RBP
JA 0x0012888f
TEST byte ptr [0x0013bc55],0x4
JNZ 0x00128800
MOV R12,RBP
CMP byte ptr [RBX],0x9
JNZ 0x00128820
JMP 0x00128825
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RBP
JA 0x0012888f
CMP RBP,RAX
SETA byte ptr [R15]
MOV R12,RAX
MOV RAX,R12
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x001288ef
ADD RSP,0x28
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
TEST R14,R14
JZ 0x001288b8
LEA RDX,[RSP + 0x10]
MOV ESI,0x0
MOV RDI,R14
CALL 0x00107814
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RBP
JBE 0x001288d1
CMP byte ptr [R14],0x9
CMOVZ R12,RBP
CMP dword ptr [0x0013b070],0x1
JG 0x0012886d
MOV RAX,qword ptr [RSP + 0x8]
LEA R12,[RAX + -0x1]
JMP 0x0012886d
MOV R12,RBP
JMP 0x001288b8
MOV R12,RAX
JMP 0x0012886d
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RBP
JBE 0x00128863
MOV R12,RBP
JMP 0x001288b8
MOV RAX,qword ptr [RSP + 0x8]
JMP 0x00128863
CALL 0x00105340
(translation_unit "ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar4;\n}\n\n" (function_definition "ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)" identifier (parameter_list "(char *param_1,ulong param_2,undefined8 param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return uVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong local_50;" type_identifier identifier ;) (declaration "ulong local_48;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = (long)DAT_0013b070 + param_2;" (assignment_expression "uVar3 = (long)DAT_0013b070 + param_2" identifier = (binary_expression "(long)DAT_0013b070 + param_2" (cast_expression "(long)DAT_0013b070" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier)) ;) (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) (if_statement "if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" { (labeled_statement "LAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;" statement_identifier : (expression_statement "*(bool *)param_3 = local_50 < uVar3;" (assignment_expression "*(bool *)param_3 = local_50 < uVar3" (pointer_expression "*(bool *)param_3" * (cast_expression "(bool *)param_3" ( (type_descriptor "bool *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "local_50 < uVar3" identifier < identifier)) ;)) (expression_statement "uVar4 = local_50;" (assignment_expression "uVar4 = local_50" identifier = identifier) ;) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;) })) (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) (if_statement "if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }" { (labeled_statement "LAB_001287f3:\n    pcVar6 = (char *)0x0;" statement_identifier : (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (do_statement "do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);" do (compound_statement "{\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    }" { (if_statement "if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" if (parenthesized_expression "((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3))" ( (binary_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)" (parenthesized_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0'))" ( (binary_expression "((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" (parenthesized_expression "((DAT_0013bc54._1_1_ & 4) != 0)" ( (binary_expression "(DAT_0013bc54._1_1_ & 4) != 0" (parenthesized_expression "(DAT_0013bc54._1_1_ & 4)" ( (binary_expression "DAT_0013bc54._1_1_ & 4" (field_expression "DAT_0013bc54._1_1_" identifier . field_identifier) & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" ( (comma_expression "cVar1 = FUN_001075e9(param_1), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_001075e9(param_1)" identifier = (call_expression "FUN_001075e9(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) && (parenthesized_expression "(local_50 < uVar3)" ( (binary_expression "local_50 < uVar3" identifier < identifier) ))) )) (compound_statement "{\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" { (expression_statement "local_48 = local_50;" (assignment_expression "local_48 = local_50" identifier = identifier) ;) (expression_statement "pcVar6 = param_1;" (assignment_expression "pcVar6 = param_1" identifier = identifier) ;) })) (expression_statement "uVar5 = local_50;" (assignment_expression "uVar5 = local_50" identifier = identifier) ;) (if_statement "if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }" if (parenthesized_expression "(*param_1 == '\t')" ( (binary_expression "*param_1 == '\t'" (pointer_expression "*param_1" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        uVar5 = uVar3;\n      }" { (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) })) (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" identifier = (call_expression "FUN_00107814(param_1,0,&local_50)" identifier (argument_list "(param_1,0,&local_50)" ( identifier , number_literal , (pointer_expression "&local_50" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" identifier = (binary_expression "param_1 + iVar2" identifier + identifier)) ;) (if_statement "if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" { (if_statement "if (local_50 <= uVar3) goto LAB_00128863;" if (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_00128863;" goto statement_identifier ;)) (break_statement "break;" break ;) })) }) while (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) ;) (if_statement "if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" if (parenthesized_expression "(pcVar6 != (char *)0x0)" ( (binary_expression "pcVar6 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" { (expression_statement "FUN_00107814(pcVar6,0,&local_48);" (call_expression "FUN_00107814(pcVar6,0,&local_48)" identifier (argument_list "(pcVar6,0,&local_48)" ( identifier , number_literal , (pointer_expression "&local_48" & identifier) ))) ;) (expression_statement "uVar4 = local_48;" (assignment_expression "uVar4 = local_48" identifier = identifier) ;) (if_statement "if (local_48 <= uVar3) goto LAB_0012886d;" if (parenthesized_expression "(local_48 <= uVar3)" ( (binary_expression "local_48 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;)) (if_statement "if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }" if (parenthesized_expression "(*pcVar6 == '\t')" ( (binary_expression "*pcVar6 == '\t'" (pointer_expression "*pcVar6" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        uVar5 = uVar3;\n      }" { (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) })) })) }) (else_clause "else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" else (compound_statement "{\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" { (do_statement "do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);" do (compound_statement "{\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    }" { (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" identifier = (call_expression "FUN_00107814(param_1,0,&local_50)" identifier (argument_list "(param_1,0,&local_50)" ( identifier , number_literal , (pointer_expression "&local_50" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" identifier = (binary_expression "param_1 + iVar2" identifier + identifier)) ;) (if_statement "if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" { (if_statement "if (uVar3 < local_50) goto LAB_001288b8;" if (parenthesized_expression "(uVar3 < local_50)" ( (binary_expression "uVar3 < local_50" identifier < identifier) )) (goto_statement "goto LAB_001288b8;" goto statement_identifier ;)) (goto_statement "goto LAB_00128863;" goto statement_identifier ;) })) }) while (parenthesized_expression "(local_50 < param_2)" ( (binary_expression "local_50 < param_2" identifier < identifier) )) ;) (if_statement "if (local_50 <= uVar3) goto LAB_001287f3;" if (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_001287f3;" goto statement_identifier ;)) }))) (labeled_statement "LAB_001288b8:\n  uVar4 = uVar5;" statement_identifier : (expression_statement "uVar4 = uVar5;" (assignment_expression "uVar4 = uVar5" identifier = identifier) ;)) (if_statement "if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }" if (parenthesized_expression "(DAT_0013b070 < 2)" ( (binary_expression "DAT_0013b070 < 2" identifier < number_literal) )) (compound_statement "{\n    uVar4 = local_50 - 1;\n  }" { (expression_statement "uVar4 = local_50 - 1;" (assignment_expression "uVar4 = local_50 - 1" identifier = (binary_expression "local_50 - 1" identifier - number_literal)) ;) })) (labeled_statement "LAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "size_t get_softwrap_breakpoint(char *text,size_t leftedge,_Bool *end_of_line)\n\n{\n  _Bool _Var1;\n  wchar_t wVar2;\n  ulong uVar3;\n  size_t sVar4;\n  size_t sVar5;\n  char *buf;\n  long in_FS_OFFSET;\n  size_t column;\n  size_t last_blank_col;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)editwincols + leftedge;\n  column = 0;\n  last_blank_col = 0;\n  if (*text == '\0') {\nLAB_00128863:\n    *end_of_line = column < uVar3;\n    sVar4 = column;\n    goto LAB_0012886d;\n  }\n  sVar5 = uVar3;\n  if (leftedge == 0) {\nLAB_001287f3:\n    buf = (char *)0x0;\n    do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);\n    if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  sVar4 = sVar5;\n  if (editwincols < L'\x02') {\n    sVar4 = column - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return sVar4;\n}\n\n" (function_definition "size_t get_softwrap_breakpoint(char *text,size_t leftedge,_Bool *end_of_line)\n\n{\n  _Bool _Var1;\n  wchar_t wVar2;\n  ulong uVar3;\n  size_t sVar4;\n  size_t sVar5;\n  char *buf;\n  long in_FS_OFFSET;\n  size_t column;\n  size_t last_blank_col;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)editwincols + leftedge;\n  column = 0;\n  last_blank_col = 0;\n  if (*text == '\0') {\nLAB_00128863:\n    *end_of_line = column < uVar3;\n    sVar4 = column;\n    goto LAB_0012886d;\n  }\n  sVar5 = uVar3;\n  if (leftedge == 0) {\nLAB_001287f3:\n    buf = (char *)0x0;\n    do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);\n    if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  sVar4 = sVar5;\n  if (editwincols < L'\x02') {\n    sVar4 = column - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return sVar4;\n}" primitive_type (function_declarator "get_softwrap_breakpoint(char *text,size_t leftedge,_Bool *end_of_line)" identifier (parameter_list "(char *text,size_t leftedge,_Bool *end_of_line)" ( (parameter_declaration "char *text" primitive_type (pointer_declarator "*text" * identifier)) , (parameter_declaration "size_t leftedge" primitive_type identifier) , (parameter_declaration "_Bool *end_of_line" type_identifier (pointer_declarator "*end_of_line" * identifier)) ))) (compound_statement "{\n  _Bool _Var1;\n  wchar_t wVar2;\n  ulong uVar3;\n  size_t sVar4;\n  size_t sVar5;\n  char *buf;\n  long in_FS_OFFSET;\n  size_t column;\n  size_t last_blank_col;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)editwincols + leftedge;\n  column = 0;\n  last_blank_col = 0;\n  if (*text == '\0') {\nLAB_00128863:\n    *end_of_line = column < uVar3;\n    sVar4 = column;\n    goto LAB_0012886d;\n  }\n  sVar5 = uVar3;\n  if (leftedge == 0) {\nLAB_001287f3:\n    buf = (char *)0x0;\n    do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);\n    if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  sVar4 = sVar5;\n  if (editwincols < L'\x02') {\n    sVar4 = column - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return sVar4;\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "char *buf;" primitive_type (pointer_declarator "*buf" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t column;" primitive_type identifier ;) (declaration "size_t last_blank_col;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = (long)editwincols + leftedge;" (assignment_expression "uVar3 = (long)editwincols + leftedge" identifier = (binary_expression "(long)editwincols + leftedge" (cast_expression "(long)editwincols" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier)) ;) (expression_statement "column = 0;" (assignment_expression "column = 0" identifier = number_literal) ;) (expression_statement "last_blank_col = 0;" (assignment_expression "last_blank_col = 0" identifier = number_literal) ;) (if_statement "if (*text == '\0') {\nLAB_00128863:\n    *end_of_line = column < uVar3;\n    sVar4 = column;\n    goto LAB_0012886d;\n  }" if (parenthesized_expression "(*text == '\0')" ( (binary_expression "*text == '\0'" (pointer_expression "*text" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00128863:\n    *end_of_line = column < uVar3;\n    sVar4 = column;\n    goto LAB_0012886d;\n  }" { (labeled_statement "LAB_00128863:\n    *end_of_line = column < uVar3;" statement_identifier : (expression_statement "*end_of_line = column < uVar3;" (assignment_expression "*end_of_line = column < uVar3" (pointer_expression "*end_of_line" * identifier) = (binary_expression "column < uVar3" identifier < identifier)) ;)) (expression_statement "sVar4 = column;" (assignment_expression "sVar4 = column" identifier = identifier) ;) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;) })) (expression_statement "sVar5 = uVar3;" (assignment_expression "sVar5 = uVar3" identifier = identifier) ;) (if_statement "if (leftedge == 0) {\nLAB_001287f3:\n    buf = (char *)0x0;\n    do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);\n    if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }" if (parenthesized_expression "(leftedge == 0)" ( (binary_expression "leftedge == 0" identifier == number_literal) )) (compound_statement "{\nLAB_001287f3:\n    buf = (char *)0x0;\n    do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);\n    if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }\n  }" { (labeled_statement "LAB_001287f3:\n    buf = (char *)0x0;" statement_identifier : (expression_statement "buf = (char *)0x0;" (assignment_expression "buf = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (do_statement "do {\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (column <= uVar3);" do (compound_statement "{\n      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }\n      sVar5 = column;\n      if (*text == '\t') {\n        sVar5 = uVar3;\n      }\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }\n    }" { (if_statement "if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)) {\n        last_blank_col = column;\n        buf = text;\n      }" if (parenthesized_expression "((((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3))" ( (binary_expression "(((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)) &&\n         (column < uVar3)" (parenthesized_expression "(((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1))" ( (binary_expression "((flags[1]._1_1_ & 4) != 0) && (_Var1 = is_blank_mbchar(text), _Var1)" (parenthesized_expression "((flags[1]._1_1_ & 4) != 0)" ( (binary_expression "(flags[1]._1_1_ & 4) != 0" (parenthesized_expression "(flags[1]._1_1_ & 4)" ( (binary_expression "flags[1]._1_1_ & 4" (field_expression "flags[1]._1_1_" (subscript_expression "flags[1]" identifier [ number_literal ]) . field_identifier) & number_literal) )) != number_literal) )) && (parenthesized_expression "(_Var1 = is_blank_mbchar(text), _Var1)" ( (comma_expression "_Var1 = is_blank_mbchar(text), _Var1" (assignment_expression "_Var1 = is_blank_mbchar(text)" identifier = (call_expression "is_blank_mbchar(text)" identifier (argument_list "(text)" ( identifier )))) , identifier) ))) )) && (parenthesized_expression "(column < uVar3)" ( (binary_expression "column < uVar3" identifier < identifier) ))) )) (compound_statement "{\n        last_blank_col = column;\n        buf = text;\n      }" { (expression_statement "last_blank_col = column;" (assignment_expression "last_blank_col = column" identifier = identifier) ;) (expression_statement "buf = text;" (assignment_expression "buf = text" identifier = identifier) ;) })) (expression_statement "sVar5 = column;" (assignment_expression "sVar5 = column" identifier = identifier) ;) (if_statement "if (*text == '\t') {\n        sVar5 = uVar3;\n      }" if (parenthesized_expression "(*text == '\t')" ( (binary_expression "*text == '\t'" (pointer_expression "*text" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        sVar5 = uVar3;\n      }" { (expression_statement "sVar5 = uVar3;" (assignment_expression "sVar5 = uVar3" identifier = identifier) ;) })) (expression_statement "wVar2 = parse_mbchar(text,(char *)0x0,&column);" (assignment_expression "wVar2 = parse_mbchar(text,(char *)0x0,&column)" identifier = (call_expression "parse_mbchar(text,(char *)0x0,&column)" identifier (argument_list "(text,(char *)0x0,&column)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&column" & identifier) )))) ;) (expression_statement "text = text + wVar2;" (assignment_expression "text = text + wVar2" identifier = (binary_expression "text + wVar2" identifier + identifier)) ;) (if_statement "if (*text == '\0') {\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }" if (parenthesized_expression "(*text == '\0')" ( (binary_expression "*text == '\0'" (pointer_expression "*text" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (column <= uVar3) goto LAB_00128863;\n        break;\n      }" { (if_statement "if (column <= uVar3) goto LAB_00128863;" if (parenthesized_expression "(column <= uVar3)" ( (binary_expression "column <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_00128863;" goto statement_identifier ;)) (break_statement "break;" break ;) })) }) while (parenthesized_expression "(column <= uVar3)" ( (binary_expression "column <= uVar3" identifier <= identifier) )) ;) (if_statement "if (buf != (char *)0x0) {\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }" if (parenthesized_expression "(buf != (char *)0x0)" ( (binary_expression "buf != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      parse_mbchar(buf,(char *)0x0,&last_blank_col);\n      sVar4 = last_blank_col;\n      if (last_blank_col <= uVar3) goto LAB_0012886d;\n      if (*buf == '\t') {\n        sVar5 = uVar3;\n      }\n    }" { (expression_statement "parse_mbchar(buf,(char *)0x0,&last_blank_col);" (call_expression "parse_mbchar(buf,(char *)0x0,&last_blank_col)" identifier (argument_list "(buf,(char *)0x0,&last_blank_col)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&last_blank_col" & identifier) ))) ;) (expression_statement "sVar4 = last_blank_col;" (assignment_expression "sVar4 = last_blank_col" identifier = identifier) ;) (if_statement "if (last_blank_col <= uVar3) goto LAB_0012886d;" if (parenthesized_expression "(last_blank_col <= uVar3)" ( (binary_expression "last_blank_col <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;)) (if_statement "if (*buf == '\t') {\n        sVar5 = uVar3;\n      }" if (parenthesized_expression "(*buf == '\t')" ( (binary_expression "*buf == '\t'" (pointer_expression "*buf" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        sVar5 = uVar3;\n      }" { (expression_statement "sVar5 = uVar3;" (assignment_expression "sVar5 = uVar3" identifier = identifier) ;) })) })) }) (else_clause "else {\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }" else (compound_statement "{\n    do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);\n    if (column <= uVar3) goto LAB_001287f3;\n  }" { (do_statement "do {\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (column < leftedge);" do (compound_statement "{\n      wVar2 = parse_mbchar(text,(char *)0x0,&column);\n      text = text + wVar2;\n      if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    }" { (expression_statement "wVar2 = parse_mbchar(text,(char *)0x0,&column);" (assignment_expression "wVar2 = parse_mbchar(text,(char *)0x0,&column)" identifier = (call_expression "parse_mbchar(text,(char *)0x0,&column)" identifier (argument_list "(text,(char *)0x0,&column)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&column" & identifier) )))) ;) (expression_statement "text = text + wVar2;" (assignment_expression "text = text + wVar2" identifier = (binary_expression "text + wVar2" identifier + identifier)) ;) (if_statement "if (*text == '\0') {\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" if (parenthesized_expression "(*text == '\0')" ( (binary_expression "*text == '\0'" (pointer_expression "*text" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (uVar3 < column) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" { (if_statement "if (uVar3 < column) goto LAB_001288b8;" if (parenthesized_expression "(uVar3 < column)" ( (binary_expression "uVar3 < column" identifier < identifier) )) (goto_statement "goto LAB_001288b8;" goto statement_identifier ;)) (goto_statement "goto LAB_00128863;" goto statement_identifier ;) })) }) while (parenthesized_expression "(column < leftedge)" ( (binary_expression "column < leftedge" identifier < identifier) )) ;) (if_statement "if (column <= uVar3) goto LAB_001287f3;" if (parenthesized_expression "(column <= uVar3)" ( (binary_expression "column <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_001287f3;" goto statement_identifier ;)) }))) (labeled_statement "LAB_001288b8:\n  sVar4 = sVar5;" statement_identifier : (expression_statement "sVar4 = sVar5;" (assignment_expression "sVar4 = sVar5" identifier = identifier) ;)) (if_statement "if (editwincols < L'\x02') {\n    sVar4 = column - 1;\n  }" if (parenthesized_expression "(editwincols < L'\x02')" ( (binary_expression "editwincols < L'\x02'" identifier < (char_literal "L'\x02'" L' escape_sequence ')) )) (compound_statement "{\n    sVar4 = column - 1;\n  }" { (expression_statement "sVar4 = column - 1;" (assignment_expression "sVar4 = column - 1" identifier = (binary_expression "column - 1" identifier - number_literal)) ;) })) (labeled_statement "LAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return sVar4;" return identifier ;) })))
(translation_unit "ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar4;\n}\n\n" (function_definition "ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)" identifier (parameter_list "(char *param_1,ulong param_2,undefined8 param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar4;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ulong uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong local_50;" type_identifier identifier ;) (declaration "ulong local_48;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = (long)DAT_0013b070 + param_2;" (assignment_expression "uVar3 = (long)DAT_0013b070 + param_2" identifier = (binary_expression "(long)DAT_0013b070 + param_2" (cast_expression "(long)DAT_0013b070" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier)) ;) (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" identifier = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) (if_statement "if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" { (labeled_statement "LAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;" statement_identifier : (expression_statement "*(bool *)param_3 = local_50 < uVar3;" (assignment_expression "*(bool *)param_3 = local_50 < uVar3" (pointer_expression "*(bool *)param_3" * (cast_expression "(bool *)param_3" ( (type_descriptor "bool *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "local_50 < uVar3" identifier < identifier)) ;)) (expression_statement "uVar4 = local_50;" (assignment_expression "uVar4 = local_50" identifier = identifier) ;) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;) })) (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) (if_statement "if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }" { (labeled_statement "LAB_001287f3:\n    pcVar6 = (char *)0x0;" statement_identifier : (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (do_statement "do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);" do (compound_statement "{\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    }" { (if_statement "if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" if (parenthesized_expression "((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3))" ( (binary_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)" (parenthesized_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0'))" ( (binary_expression "((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" (parenthesized_expression "((DAT_0013bc54._1_1_ & 4) != 0)" ( (binary_expression "(DAT_0013bc54._1_1_ & 4) != 0" (parenthesized_expression "(DAT_0013bc54._1_1_ & 4)" ( (binary_expression "DAT_0013bc54._1_1_ & 4" (field_expression "DAT_0013bc54._1_1_" identifier . field_identifier) & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" ( (comma_expression "cVar1 = FUN_001075e9(param_1), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_001075e9(param_1)" identifier = (call_expression "FUN_001075e9(param_1)" identifier (argument_list "(param_1)" ( identifier )))) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) && (parenthesized_expression "(local_50 < uVar3)" ( (binary_expression "local_50 < uVar3" identifier < identifier) ))) )) (compound_statement "{\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" { (expression_statement "local_48 = local_50;" (assignment_expression "local_48 = local_50" identifier = identifier) ;) (expression_statement "pcVar6 = param_1;" (assignment_expression "pcVar6 = param_1" identifier = identifier) ;) })) (expression_statement "uVar5 = local_50;" (assignment_expression "uVar5 = local_50" identifier = identifier) ;) (if_statement "if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }" if (parenthesized_expression "(*param_1 == '\t')" ( (binary_expression "*param_1 == '\t'" (pointer_expression "*param_1" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        uVar5 = uVar3;\n      }" { (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) })) (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" identifier = (call_expression "FUN_00107814(param_1,0,&local_50)" identifier (argument_list "(param_1,0,&local_50)" ( identifier , number_literal , (pointer_expression "&local_50" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" identifier = (binary_expression "param_1 + iVar2" identifier + identifier)) ;) (if_statement "if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" { (if_statement "if (local_50 <= uVar3) goto LAB_00128863;" if (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_00128863;" goto statement_identifier ;)) (break_statement "break;" break ;) })) }) while (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) ;) (if_statement "if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" if (parenthesized_expression "(pcVar6 != (char *)0x0)" ( (binary_expression "pcVar6 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" { (expression_statement "FUN_00107814(pcVar6,0,&local_48);" (call_expression "FUN_00107814(pcVar6,0,&local_48)" identifier (argument_list "(pcVar6,0,&local_48)" ( identifier , number_literal , (pointer_expression "&local_48" & identifier) ))) ;) (expression_statement "uVar4 = local_48;" (assignment_expression "uVar4 = local_48" identifier = identifier) ;) (if_statement "if (local_48 <= uVar3) goto LAB_0012886d;" if (parenthesized_expression "(local_48 <= uVar3)" ( (binary_expression "local_48 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_0012886d;" goto statement_identifier ;)) (if_statement "if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }" if (parenthesized_expression "(*pcVar6 == '\t')" ( (binary_expression "*pcVar6 == '\t'" (pointer_expression "*pcVar6" * identifier) == (char_literal "'\t'" ' escape_sequence ')) )) (compound_statement "{\n        uVar5 = uVar3;\n      }" { (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" identifier = identifier) ;) })) })) }) (else_clause "else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" else (compound_statement "{\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" { (do_statement "do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);" do (compound_statement "{\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    }" { (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" identifier = (call_expression "FUN_00107814(param_1,0,&local_50)" identifier (argument_list "(param_1,0,&local_50)" ( identifier , number_literal , (pointer_expression "&local_50" & identifier) )))) ;) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" identifier = (binary_expression "param_1 + iVar2" identifier + identifier)) ;) (if_statement "if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" { (if_statement "if (uVar3 < local_50) goto LAB_001288b8;" if (parenthesized_expression "(uVar3 < local_50)" ( (binary_expression "uVar3 < local_50" identifier < identifier) )) (goto_statement "goto LAB_001288b8;" goto statement_identifier ;)) (goto_statement "goto LAB_00128863;" goto statement_identifier ;) })) }) while (parenthesized_expression "(local_50 < param_2)" ( (binary_expression "local_50 < param_2" identifier < identifier) )) ;) (if_statement "if (local_50 <= uVar3) goto LAB_001287f3;" if (parenthesized_expression "(local_50 <= uVar3)" ( (binary_expression "local_50 <= uVar3" identifier <= identifier) )) (goto_statement "goto LAB_001287f3;" goto statement_identifier ;)) }))) (labeled_statement "LAB_001288b8:\n  uVar4 = uVar5;" statement_identifier : (expression_statement "uVar4 = uVar5;" (assignment_expression "uVar4 = uVar5" identifier = identifier) ;)) (if_statement "if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }" if (parenthesized_expression "(DAT_0013b070 < 2)" ( (binary_expression "DAT_0013b070 < 2" identifier < number_literal) )) (compound_statement "{\n    uVar4 = local_50 - 1;\n  }" { (expression_statement "uVar4 = local_50 - 1;" (assignment_expression "uVar4 = local_50 - 1" identifier = (binary_expression "local_50 - 1" identifier - number_literal)) ;) })) (labeled_statement "LAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = (binary_expression IDENT < IDENT)) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;)) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) & LIT) )) != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != (char_literal ' escape_sequence '))) ))) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (break_statement break ;) })) }) while (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar4;\n}" (type_identifier "ulong") (function_declarator "FUN_0012876d(char *param_1,ulong param_2,undefined8 param_3)" (identifier "FUN_0012876d") (parameter_list "(char *param_1,ulong param_2,undefined8 param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) () ")"))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  ulong uVar3;\n  ulong uVar4;\n  ulong uVar5;\n  char *pcVar6;\n  long in_FS_OFFSET;\n  ulong local_50;\n  ulong local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar3 = (long)DAT_0013b070 + param_2;\n  local_50 = 0;\n  local_48 = 0;\n  if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }\n  uVar5 = uVar3;\n  if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }\nLAB_001288b8:\n  uVar4 = uVar5;\n  if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }\nLAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return uVar4;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "ulong uVar5;" (type_identifier "ulong") (identifier "uVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "ulong local_50;" (type_identifier "ulong") (identifier "local_50") (; ";")) (declaration "ulong local_48;" (type_identifier "ulong") (identifier "local_48") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "uVar3 = (long)DAT_0013b070 + param_2;" (assignment_expression "uVar3 = (long)DAT_0013b070 + param_2" (identifier "uVar3") (= "=") (binary_expression "(long)DAT_0013b070 + param_2" (cast_expression "(long)DAT_0013b070" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "DAT_0013b070")) (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "local_50 = 0;" (assignment_expression "local_50 = 0" (identifier "local_50") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" (identifier "local_48") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*param_1 == '\0') {\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\nLAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;\n    uVar4 = local_50;\n    goto LAB_0012886d;\n  }" ({ "{") (labeled_statement "LAB_00128863:\n    *(bool *)param_3 = local_50 < uVar3;" (statement_identifier "LAB_00128863") (: ":") (expression_statement "*(bool *)param_3 = local_50 < uVar3;" (assignment_expression "*(bool *)param_3 = local_50 < uVar3" (pointer_expression "*(bool *)param_3" (* "*") (cast_expression "(bool *)param_3" (( "(") (type_descriptor "bool *" (primitive_type "bool") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_3"))) (= "=") (binary_expression "local_50 < uVar3" (identifier "local_50") (< "<") (identifier "uVar3"))) (; ";"))) (expression_statement "uVar4 = local_50;" (assignment_expression "uVar4 = local_50" (identifier "uVar4") (= "=") (identifier "local_50")) (; ";")) (goto_statement "goto LAB_0012886d;" (goto "goto") (statement_identifier "LAB_0012886d") (; ";")) (} "}"))) (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" (identifier "uVar5") (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (param_2 == 0) {\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }\n  else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_001287f3:\n    pcVar6 = (char *)0x0;\n    do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);\n    if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }\n  }" ({ "{") (labeled_statement "LAB_001287f3:\n    pcVar6 = (char *)0x0;" (statement_identifier "LAB_001287f3") (: ":") (expression_statement "pcVar6 = (char *)0x0;" (assignment_expression "pcVar6 = (char *)0x0" (identifier "pcVar6") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";"))) (do_statement "do {\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    } while (local_50 <= uVar3);" (do "do") (compound_statement "{\n      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }\n      uVar5 = local_50;\n      if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }\n    }" ({ "{") (if_statement "if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)) {\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" (if "if") (parenthesized_expression "((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3))" (( "(") (binary_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&\n         (local_50 < uVar3)" (parenthesized_expression "(((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0'))" (( "(") (binary_expression "((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" (parenthesized_expression "((DAT_0013bc54._1_1_ & 4) != 0)" (( "(") (binary_expression "(DAT_0013bc54._1_1_ & 4) != 0" (parenthesized_expression "(DAT_0013bc54._1_1_ & 4)" (( "(") (binary_expression "DAT_0013bc54._1_1_ & 4" (field_expression "DAT_0013bc54._1_1_" (identifier "DAT_0013bc54") (. ".") (field_identifier "_1_1_")) (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(cVar1 = FUN_001075e9(param_1), cVar1 != '\0')" (( "(") (comma_expression "cVar1 = FUN_001075e9(param_1), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_001075e9(param_1)" (identifier "cVar1") (= "=") (call_expression "FUN_001075e9(param_1)" (identifier "FUN_001075e9") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (, ",") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(local_50 < uVar3)" (( "(") (binary_expression "local_50 < uVar3" (identifier "local_50") (< "<") (identifier "uVar3")) () ")"))) () ")")) (compound_statement "{\n        local_48 = local_50;\n        pcVar6 = param_1;\n      }" ({ "{") (expression_statement "local_48 = local_50;" (assignment_expression "local_48 = local_50" (identifier "local_48") (= "=") (identifier "local_50")) (; ";")) (expression_statement "pcVar6 = param_1;" (assignment_expression "pcVar6 = param_1" (identifier "pcVar6") (= "=") (identifier "param_1")) (; ";")) (} "}"))) (expression_statement "uVar5 = local_50;" (assignment_expression "uVar5 = local_50" (identifier "uVar5") (= "=") (identifier "local_50")) (; ";")) (if_statement "if (*param_1 == '\t') {\n        uVar5 = uVar3;\n      }" (if "if") (parenthesized_expression "(*param_1 == '\t')" (( "(") (binary_expression "*param_1 == '\t'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\t'" (' "'") (escape_sequence "\t") (' "'"))) () ")")) (compound_statement "{\n        uVar5 = uVar3;\n      }" ({ "{") (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" (identifier "uVar5") (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" (identifier "iVar2") (= "=") (call_expression "FUN_00107814(param_1,0,&local_50)" (identifier "FUN_00107814") (argument_list "(param_1,0,&local_50)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_50" (& "&") (identifier "local_50")) () ")")))) (; ";")) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" (identifier "param_1") (= "=") (binary_expression "param_1 + iVar2" (identifier "param_1") (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if (*param_1 == '\0') {\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        if (local_50 <= uVar3) goto LAB_00128863;\n        break;\n      }" ({ "{") (if_statement "if (local_50 <= uVar3) goto LAB_00128863;" (if "if") (parenthesized_expression "(local_50 <= uVar3)" (( "(") (binary_expression "local_50 <= uVar3" (identifier "local_50") (<= "<=") (identifier "uVar3")) () ")")) (goto_statement "goto LAB_00128863;" (goto "goto") (statement_identifier "LAB_00128863") (; ";"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(local_50 <= uVar3)" (( "(") (binary_expression "local_50 <= uVar3" (identifier "local_50") (<= "<=") (identifier "uVar3")) () ")")) (; ";")) (if_statement "if (pcVar6 != (char *)0x0) {\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" (if "if") (parenthesized_expression "(pcVar6 != (char *)0x0)" (( "(") (binary_expression "pcVar6 != (char *)0x0" (identifier "pcVar6") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      FUN_00107814(pcVar6,0,&local_48);\n      uVar4 = local_48;\n      if (local_48 <= uVar3) goto LAB_0012886d;\n      if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }\n    }" ({ "{") (expression_statement "FUN_00107814(pcVar6,0,&local_48);" (call_expression "FUN_00107814(pcVar6,0,&local_48)" (identifier "FUN_00107814") (argument_list "(pcVar6,0,&local_48)" (( "(") (identifier "pcVar6") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) () ")"))) (; ";")) (expression_statement "uVar4 = local_48;" (assignment_expression "uVar4 = local_48" (identifier "uVar4") (= "=") (identifier "local_48")) (; ";")) (if_statement "if (local_48 <= uVar3) goto LAB_0012886d;" (if "if") (parenthesized_expression "(local_48 <= uVar3)" (( "(") (binary_expression "local_48 <= uVar3" (identifier "local_48") (<= "<=") (identifier "uVar3")) () ")")) (goto_statement "goto LAB_0012886d;" (goto "goto") (statement_identifier "LAB_0012886d") (; ";"))) (if_statement "if (*pcVar6 == '\t') {\n        uVar5 = uVar3;\n      }" (if "if") (parenthesized_expression "(*pcVar6 == '\t')" (( "(") (binary_expression "*pcVar6 == '\t'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (== "==") (char_literal "'\t'" (' "'") (escape_sequence "\t") (' "'"))) () ")")) (compound_statement "{\n        uVar5 = uVar3;\n      }" ({ "{") (expression_statement "uVar5 = uVar3;" (assignment_expression "uVar5 = uVar3" (identifier "uVar5") (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" (else "else") (compound_statement "{\n    do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);\n    if (local_50 <= uVar3) goto LAB_001287f3;\n  }" ({ "{") (do_statement "do {\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    } while (local_50 < param_2);" (do "do") (compound_statement "{\n      iVar2 = FUN_00107814(param_1,0,&local_50);\n      param_1 = param_1 + iVar2;\n      if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }\n    }" ({ "{") (expression_statement "iVar2 = FUN_00107814(param_1,0,&local_50);" (assignment_expression "iVar2 = FUN_00107814(param_1,0,&local_50)" (identifier "iVar2") (= "=") (call_expression "FUN_00107814(param_1,0,&local_50)" (identifier "FUN_00107814") (argument_list "(param_1,0,&local_50)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_50" (& "&") (identifier "local_50")) () ")")))) (; ";")) (expression_statement "param_1 = param_1 + iVar2;" (assignment_expression "param_1 = param_1 + iVar2" (identifier "param_1") (= "=") (binary_expression "param_1 + iVar2" (identifier "param_1") (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if (*param_1 == '\0') {\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        if (uVar3 < local_50) goto LAB_001288b8;\n        goto LAB_00128863;\n      }" ({ "{") (if_statement "if (uVar3 < local_50) goto LAB_001288b8;" (if "if") (parenthesized_expression "(uVar3 < local_50)" (( "(") (binary_expression "uVar3 < local_50" (identifier "uVar3") (< "<") (identifier "local_50")) () ")")) (goto_statement "goto LAB_001288b8;" (goto "goto") (statement_identifier "LAB_001288b8") (; ";"))) (goto_statement "goto LAB_00128863;" (goto "goto") (statement_identifier "LAB_00128863") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(local_50 < param_2)" (( "(") (binary_expression "local_50 < param_2" (identifier "local_50") (< "<") (identifier "param_2")) () ")")) (; ";")) (if_statement "if (local_50 <= uVar3) goto LAB_001287f3;" (if "if") (parenthesized_expression "(local_50 <= uVar3)" (( "(") (binary_expression "local_50 <= uVar3" (identifier "local_50") (<= "<=") (identifier "uVar3")) () ")")) (goto_statement "goto LAB_001287f3;" (goto "goto") (statement_identifier "LAB_001287f3") (; ";"))) (} "}")))) (labeled_statement "LAB_001288b8:\n  uVar4 = uVar5;" (statement_identifier "LAB_001288b8") (: ":") (expression_statement "uVar4 = uVar5;" (assignment_expression "uVar4 = uVar5" (identifier "uVar4") (= "=") (identifier "uVar5")) (; ";"))) (if_statement "if (DAT_0013b070 < 2) {\n    uVar4 = local_50 - 1;\n  }" (if "if") (parenthesized_expression "(DAT_0013b070 < 2)" (( "(") (binary_expression "DAT_0013b070 < 2" (identifier "DAT_0013b070") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    uVar4 = local_50 - 1;\n  }" ({ "{") (expression_statement "uVar4 = local_50 - 1;" (assignment_expression "uVar4 = local_50 - 1" (identifier "uVar4") (= "=") (binary_expression "local_50 - 1" (identifier "local_50") (- "-") (number_literal "1"))) (; ";")) (} "}"))) (labeled_statement "LAB_0012886d:\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (statement_identifier "LAB_0012886d") (: ":") (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

size_t function_1(char *var_7,size_t var_2,type_1 *end_of_line)

{
  type_1 _Var1;
  type_2 var_8;
  type_3 var_4;
  size_t sVar4;
  size_t sVar5;
  char *var_9;
  long var_1;
  size_t var_3;
  size_t var_10;
  long var_12;
  
  var_12 = *(long *)(var_1 + 0x28);
  var_4 = (long)var_11 + var_2;
  var_3 = 0;
  var_10 = 0;
  if (*var_7 == '\0') {
LAB_00128863:
    *end_of_line = var_3 < var_4;
    sVar4 = var_3;
    goto LAB_0012886d;
  }
  sVar5 = var_4;
  if (var_2 == 0) {
LAB_001287f3:
    var_9 = (char *)0x0;
    do {
      if ((((flags[1]._1_1_ & 4) != 0) && (_Var1 = var_5(var_7), _Var1)) &&
         (var_3 < var_4)) {
        var_10 = var_3;
        var_9 = var_7;
      }
      sVar5 = var_3;
      if (*var_7 == '\t') {
        sVar5 = var_4;
      }
      var_8 = var_6(var_7,(char *)0x0,&var_3);
      var_7 = var_7 + var_8;
      if (*var_7 == '\0') {
        if (var_3 <= var_4) goto LAB_00128863;
        break;
      }
    } while (var_3 <= var_4);
    if (var_9 != (char *)0x0) {
      var_6(var_9,(char *)0x0,&var_10);
      sVar4 = var_10;
      if (var_10 <= var_4) goto LAB_0012886d;
      if (*var_9 == '\t') {
        sVar5 = var_4;
      }
    }
  }
  else {
    do {
      var_8 = var_6(var_7,(char *)0x0,&var_3);
      var_7 = var_7 + var_8;
      if (*var_7 == '\0') {
        if (var_4 < var_3) goto LAB_001288b8;
        goto LAB_00128863;
      }
    } while (var_3 < var_2);
    if (var_3 <= var_4) goto LAB_001287f3;
  }
LAB_001288b8:
  sVar4 = sVar5;
  if (var_11 < L'\x02') {
    sVar4 = var_3 - 1;
  }
LAB_0012886d:
  if (var_12 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_13();
  }
  return sVar4;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence))))))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (break_statement)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) alternative: (else_clause (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (return_statement (identifier)))))

ulong MASKED(char *param_1,ulong param_2,undefined8 param_3)

{
  char cVar1;
  int iVar2;
  ulong uVar3;
  ulong uVar4;
  ulong uVar5;
  char *pcVar6;
  long in_FS_OFFSET;
  ulong local_50;
  ulong local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  uVar3 = (long)DAT_0013b070 + param_2;
  local_50 = 0;
  local_48 = 0;
  if (*param_1 == '\0') {
LAB_00128863:
    *(bool *)param_3 = local_50 < uVar3;
    uVar4 = local_50;
    goto LAB_0012886d;
  }
  uVar5 = uVar3;
  if (param_2 == 0) {
LAB_001287f3:
    pcVar6 = (char *)0x0;
    do {
      if ((((DAT_0013bc54._1_1_ & 4) != 0) && (cVar1 = FUN_001075e9(param_1), cVar1 != '\0')) &&
         (local_50 < uVar3)) {
        local_48 = local_50;
        pcVar6 = param_1;
      }
      uVar5 = local_50;
      if (*param_1 == '\t') {
        uVar5 = uVar3;
      }
      iVar2 = FUN_00107814(param_1,0,&local_50);
      param_1 = param_1 + iVar2;
      if (*param_1 == '\0') {
        if (local_50 <= uVar3) goto LAB_00128863;
        break;
      }
    } while (local_50 <= uVar3);
    if (pcVar6 != (char *)0x0) {
      FUN_00107814(pcVar6,0,&local_48);
      uVar4 = local_48;
      if (local_48 <= uVar3) goto LAB_0012886d;
      if (*pcVar6 == '\t') {
        uVar5 = uVar3;
      }
    }
  }
  else {
    do {
      iVar2 = FUN_00107814(param_1,0,&local_50);
      param_1 = param_1 + iVar2;
      if (*param_1 == '\0') {
        if (uVar3 < local_50) goto LAB_001288b8;
        goto LAB_00128863;
      }
    } while (local_50 < param_2);
    if (local_50 <= uVar3) goto LAB_001287f3;
  }
LAB_001288b8:
  uVar4 = uVar5;
  if (DAT_0013b070 < 2) {
    uVar4 = local_50 - 1;
  }
LAB_0012886d:
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar4;
}

