LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator+(double) const
GStr GStr::operator+(const double f) const {
    char buf[30];
    sprintf(buf, "%f", f);
    const int s_length = ::strlen(buf);
    GStr newstring;
    newstring.prep_data(length() + s_length);
    ::memcpy(newstring.chrs(), my_data->chars, length());
    ::memcpy(&(newstring.chrs())[length()], buf, s_length);
    return newstring;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7cda(%rip), %rsi      # 0xe16c
movq %rsp, %r15
movq %r15, %rdi
movb $0x1, %al
callq 0x2080
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
leaq 0xdd9f(%rip), %rax      # 0x14250
movq %rax, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%r14), %rax
movl 0x8(%rax), %esi
addl %r15d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4a2a
movq 0x20(%rbx), %r12
leaq 0xc(%r12), %rdi
movq 0x20(%r14), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r14), %rax
movslq 0x8(%rax), %rax
leaq (%r12,%rax), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %rsp, %rsi
callq 0x21e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::is_space() const
bool GStr::is_space() const {

    if (my_data == &null_data)
        return false;

    for (const char *p = my_data->chars; *p; p++)
        if (!isspace(*p))
            return false;

    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r14
leaq 0xdd05(%rip), %rax      # 0x14250
cmpq %rax, %r14
je 0x6582
movsbl 0xc(%r14), %edi
testl %edi, %edi
sete %bl
je 0x6584
callq 0x2050
testl %eax, %eax
je 0x6584
addq $0xd, %r14
movsbl (%r14), %edi
testl %edi, %edi
sete %bl
je 0x6584
callq 0x2050
incq %r14
testl %eax, %eax
jne 0x6569
jmp 0x6584
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::substr(int, int) const
GStr GStr::substr(int idx, int len) const {
    // A negative idx specifies an idx from the right of the string.
    if (idx < 0)
        idx += length();
    else if (idx>=length()) {
             len=0;
             idx=length();
             }
    if (len) {
      // A length of -1 specifies the rest of the string.
      if (len < 0  || len>length()-idx)
        len = length() - idx;
      if (idx<0 || idx>=length() || len<0 )
        invalid_args_error("substr()");
    }

    GStr newstring;
    if (len) {
      newstring.prep_data(len);
      ::memcpy(newstring.chrs(), &my_data->chars[idx], len);
    }
    return newstring;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movl 0x8(%rax), %r15d
testl %edx, %edx
js 0x65b7
xorl %eax, %eax
cmpl %edx, %r15d
cmovlel %eax, %ebp
cmovgel %edx, %r15d
jmp 0x65ba
addl %edx, %r15d
testl %ebp, %ebp
je 0x6602
js 0x65ce
movq 0x20(%r14), %rax
movl 0x8(%rax), %eax
subl %r15d, %eax
cmpl %eax, %ebp
jle 0x65d8
movq 0x20(%r14), %rax
movl 0x8(%rax), %ebp
subl %r15d, %ebp
testl %r15d, %r15d
js 0x65eb
movq 0x20(%r14), %rax
cmpl 0x8(%rax), %r15d
jge 0x65eb
testl %ebp, %ebp
jns 0x6604
leaq 0x7bf0(%rip), %rdi      # 0xe1e2
leaq 0x7b88(%rip), %rsi      # 0xe181
xorl %eax, %eax
callq 0x289c
jmp 0x6604
xorl %ebp, %ebp
leaq 0xdc45(%rip), %rax      # 0x14250
movq %rax, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
testl %ebp, %ebp
je 0x665a
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x4a2a
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movq 0x20(%r14), %rax
movslq %r15d, %rcx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
movslq %ebp, %rdx
callq 0x21e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::reverse()
GStr& GStr::reverse() {
  make_unique();
  int l=0;
  int r=my_data->length-1;
  char c;
  while (l<r) {
     c=my_data->chars[l];
     my_data->chars[l]=my_data->chars[r];
     my_data->chars[r]=c;
     l++;r--;
     }
  return *this;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4b0e
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
decl %eax
testl %eax, %eax
jle 0x66d6
movl %eax, %eax
decq %rax
xorl %ecx, %ecx
movq 0x20(%rbx), %rdx
movb 0xc(%rdx,%rcx), %sil
movb 0xd(%rdx,%rax), %dil
movb %dil, 0xc(%rdx,%rcx)
movq 0x20(%rbx), %rdx
movb %sil, 0xd(%rdx,%rax)
incq %rcx
leaq -0x1(%rax), %rdx
cmpq %rax, %rcx
movq %rdx, %rax
jl 0x66ab
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::tr(char const*, char const*)
GStr&  GStr::tr(const char *rfrom, const char* rto) {
 if (length() == 0 || rfrom==NULL || strlen(rfrom)==0)
        return *this;
 unsigned int l=strlen(rfrom);
 if (rto!=NULL && rto[0]==0) rto=NULL;
 if (rto!=NULL && strlen(rto)!=l)
      invalid_args_error("tr()");
 make_unique(); //edit operation ahead

 if (rto==NULL) { //delete all characters
   Data *data = new_data(length());
   char* s = my_data->chars;
   char* p=NULL;
   char* dest = data->chars;
   do {
      if ((p=strpbrk(s,rfrom))!=NULL) {
        memcpy(dest,s,p-s);
        dest+=p-s;
        s=p+1;
        }
       else {
        strcpy(dest, s);
        dest+=strlen(s);
        }
      } while (p!=NULL);
   (*dest)='\0';
   data->length=strlen(data->chars);
   replace_data(data);
   }
  else { //char substitution case - easier!
   const char* p=NULL;
   for (int i=0; i<length(); i++) {
    if ((p=strchr(rfrom, my_data->chars[i]))!=NULL)
         my_data->chars[i]=rto[p-rfrom];
    }
   }
 return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x6847
movq 0x20(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x6847
movq %rdx, %r13
movq %rsi, %r14
movq %rsi, %rdi
callq 0x2140
testq %rax, %rax
je 0x6847
movq %rax, %r12
xorl %r15d, %r15d
testq %r13, %r13
je 0x672f
cmpb $0x0, (%r13)
cmovneq %r13, %r15
testq %r15, %r15
je 0x67ae
movq %r15, %rdi
callq 0x2140
movl %r12d, %ecx
cmpq %rcx, %rax
je 0x6759
leaq 0x7a97(%rip), %rdi      # 0xe1e2
leaq 0x7a33(%rip), %rsi      # 0xe185
xorl %eax, %eax
callq 0x289c
movq %rbx, %rdi
callq 0x4b0e
testq %r15, %r15
je 0x67b6
movq 0x20(%rbx), %r12
cmpl $0x0, 0x8(%r12)
jle 0x6847
xorl %r13d, %r13d
movsbl 0xc(%r12,%r13), %esi
movq %r14, %rdi
callq 0x2100
testq %rax, %rax
je 0x6798
subq %r14, %rax
movb (%r15,%rax), %al
movb %al, 0xc(%r12,%r13)
incq %r13
movq 0x20(%rbx), %r12
movslq 0x8(%r12), %rax
cmpq %rax, %r13
jl 0x6779
jmp 0x6847
movq %rbx, %rdi
callq 0x4b0e
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %rbp
movq 0x20(%rbx), %r13
addq $0xc, %r13
movq %rax, 0x10(%rsp)
addq $0xc, %rbp
movq %rbp, 0x8(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x23f0
movq %rax, %r12
testq %rax, %rax
je 0x680b
movq %r12, %r15
subq %r13, %r15
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x21e0
leaq 0x1(%r12), %r13
jmp 0x6821
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2220
movq %r13, %rdi
callq 0x2140
movq %rax, %r15
addq %r15, %rbp
testq %r12, %r12
jne 0x67dd
movb $0x0, (%rbp)
movq 0x8(%rsp), %rdi
callq 0x2140
movq 0x10(%rsp), %rsi
movl %eax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x4b54
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::cut(int, int)
GStr&  GStr::cut(int idx, int len) {

    if (len == 0)
        return *this;
    make_unique(); //edit operation ahead

    // A negative idx specifies an idx from the right of the string,
    // so the left part will be cut out
    if (idx < 0)
        idx += length();

    // A length of -1 specifies the rest of the string.
    if (len == -1)
        len = length() - idx;

    if (idx<0 || idx>=length() || len<0 || len>length()-idx)
        invalid_args_error("cut()");

    Data *data = new_data(length() - len);
    if (idx > 0)
        ::memcpy(data->chars, my_data->chars, idx);
    ::strcpy(&data->chars[idx], &my_data->chars[idx+len]);
    replace_data(data);

    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
je 0x6b19
movl %edx, %r14d
movl %esi, %ebp
movq %rbx, %rdi
callq 0x4b0e
testl %ebp, %ebp
jns 0x6a82
movq 0x20(%rbx), %rax
addl 0x8(%rax), %ebp
cmpl $-0x1, %r14d
jne 0x6a93
movq 0x20(%rbx), %rax
movl 0x8(%rax), %r14d
subl %ebp, %r14d
testl %ebp, %ebp
js 0x6aac
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
subl %ebp, %eax
jle 0x6aac
testl %r14d, %r14d
js 0x6aac
cmpl %eax, %r14d
jle 0x6ac1
leaq 0x772f(%rip), %rdi      # 0xe1e2
leaq 0x76d0(%rip), %rsi      # 0xe18a
xorl %eax, %eax
callq 0x289c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
subl %r14d, %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %r15
testl %ebp, %ebp
jle 0x6aec
leaq 0xc(%r15), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %ebp, %edx
callq 0x21e0
movslq %ebp, %rax
leaq (%r15,%rax), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rax
addl %ebp, %r14d
movslq %r14d, %rcx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4b54
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::paste(GStr const&, int, int)
GStr&  GStr::paste(const GStr& s, int idx, int len) {
    // A negative idx specifies an idx from the right of the string.
    if (idx < 0)
        idx += length();
    make_unique(); //edit operation ahead

    // A length of -1 specifies the rest of the string.
    if (len == -1)
        len = length() - idx;

    if (idx<0 || idx>=length() || len<0 || len>length()-idx)
        invalid_args_error("replace()");

    if (len == s.length() && my_data->ref_count == 1)
        ::memcpy(&chrs()[idx], s.chars(), len);
    else {
        Data *data = new_data(length() - len + s.length());
        if (idx > 0)
            ::memcpy(data->chars, my_data->chars, idx);
        if (s.length() > 0)
            ::memcpy(&data->chars[idx], s.chars(), s.length());
        ::strcpy(&data->chars[idx+s.length()], &my_data->chars[idx+len]);
        replace_data(data);
    }

    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
testl %edx, %edx
jns 0x6b4a
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r14d
movq %rbx, %rdi
callq 0x4b0e
cmpl $-0x1, %ebp
jne 0x6b61
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ebp
subl %r14d, %ebp
testl %r14d, %r14d
js 0x6b7a
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
subl %r14d, %eax
jle 0x6b7a
testl %ebp, %ebp
js 0x6b7a
cmpl %eax, %ebp
jle 0x6b8f
leaq 0x7661(%rip), %rdi      # 0xe1e2
leaq 0x7608(%rip), %rsi      # 0xe190
xorl %eax, %eax
callq 0x289c
movq 0x20(%r15), %rsi
movl 0x8(%rsi), %edi
subl %ebp, %edi
jne 0x6bbf
movq 0x20(%rbx), %rax
cmpl $0x1, (%rax)
jne 0x6bbf
movslq %r14d, %rcx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
addq $0xc, %rsi
movslq %ebp, %rdx
callq 0x21e0
jmp 0x6c40
movq 0x20(%rbx), %rax
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %r12
testl %r14d, %r14d
jle 0x6bea
leaq 0xc(%r12), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %r14d, %edx
callq 0x21e0
movq 0x20(%r15), %rsi
movslq 0x8(%rsi), %rdx
movslq %r14d, %r13
testq %rdx, %rdx
jle 0x6c0b
leaq (%r12,%r13), %rdi
addq $0xc, %rdi
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r15), %rax
movslq 0x8(%rax), %rax
addq %r13, %rax
leaq (%r12,%rax), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rax
addl %r14d, %ebp
movslq %ebp, %rcx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4b54
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::paste(char const*, int, int)
GStr& GStr::paste(const char *s, int idx, int len) {

    // A negative idx specifies an idx from the right of the string.
    make_unique(); //edit operation ahead
    if (idx < 0)
        idx += length();

    // A length of -1 specifies the rest of the string.
    if (len == -1)
        len = length() - idx;

    if (idx<0 || idx>=length() || len<0 || len>length()-idx)
        invalid_args_error("replace()");

    const int s_length = ::strlen(s);

    if (len == s_length && my_data->ref_count == 1)
        ::memcpy(&chrs()[idx], s, len);
    else {
        Data *data = new_data(length() - len + s_length);
        if (idx > 0)
            ::memcpy(data->chars, my_data->chars, idx);
        if (s_length > 0)
            ::memcpy(&data->chars[idx], s, s_length);
        ::strcpy(&data->chars[idx+s_length], &my_data->chars[idx+len]);
        replace_data(data);
    }

    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4b0e
testl %r14d, %r14d
jns 0x6c7a
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r14d
cmpl $-0x1, %ebp
jne 0x6c89
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ebp
subl %r14d, %ebp
testl %r14d, %r14d
js 0x6ca2
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
subl %r14d, %eax
jle 0x6ca2
testl %ebp, %ebp
js 0x6ca2
cmpl %eax, %ebp
jle 0x6cb7
leaq 0x7539(%rip), %rdi      # 0xe1e2
leaq 0x74e0(%rip), %rsi      # 0xe190
xorl %eax, %eax
callq 0x289c
movq %r15, %rdi
callq 0x2140
movq %rax, %r12
movl %r12d, %edi
subl %ebp, %edi
jne 0x6cea
movq 0x20(%rbx), %rax
cmpl $0x1, (%rax)
jne 0x6cea
movslq %r14d, %rcx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
movslq %ebp, %rdx
movq %r15, %rsi
callq 0x21e0
jmp 0x6d65
movq 0x20(%rbx), %rax
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %r13
testl %r14d, %r14d
jle 0x6d14
leaq 0xc(%r13), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %r14d, %edx
callq 0x21e0
testl %r12d, %r12d
jle 0x6d35
movslq %r14d, %rax
leaq (%rax,%r13), %rdi
addq $0xc, %rdi
movl %r12d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %r15, %rsi
callq 0x21e0
leal (%r14,%r12), %eax
cltq
leaq (%rax,%r13), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rax
addl %r14d, %ebp
movslq %ebp, %rcx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4b54
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::insert(GStr const&, int)
GStr& GStr::insert(const GStr& s, int idx) {
    make_unique(); //edit operation ahead

    // A negative idx specifies an idx from the right of the string.
    if (idx < 0)
        idx += length();

    if (idx < 0 || idx >= length())
        invalid_index_error("insert()");

    if (s.length() > 0) {
        Data *data = new_data(length() + s.length());
        if (idx > 0)
            ::memcpy(data->chars, my_data->chars, idx);
        ::memcpy(&data->chars[idx], s.chars(), s.length());
        ::strcpy(&data->chars[idx+s.length()], &my_data->chars[idx]);
        replace_data(data);
    }

    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4b0e
testl %ebp, %ebp
jns 0x6d98
movq 0x20(%rbx), %rax
addl 0x8(%rax), %ebp
testl %ebp, %ebp
js 0x6da5
movq 0x20(%rbx), %rax
cmpl 0x8(%rax), %ebp
jl 0x6dba
leaq 0x7456(%rip), %rdi      # 0xe202
leaq 0x73e7(%rip), %rsi      # 0xe19a
xorl %eax, %eax
callq 0x289c
movq 0x20(%r14), %rax
movl 0x8(%rax), %edi
testl %edi, %edi
jle 0x6e38
movq 0x20(%rbx), %rax
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %r15
testl %ebp, %ebp
jle 0x6ded
leaq 0xc(%r15), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %ebp, %edx
callq 0x21e0
movslq %ebp, %r12
leaq (%r15,%r12), %rdi
addq $0xc, %rdi
movq 0x20(%r14), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r14), %rax
movslq 0x8(%rax), %rax
addq %r12, %rax
leaq (%r15,%rax), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%r12), %rsi
addq $0xc, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4b54
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::insert(char const*, int)
GStr& GStr::insert(const char *s, int idx) {
    // A negative idx specifies an idx from the right of the string.
    make_unique(); //edit operation ahead
    if (idx < 0)
        idx += length();

    if (idx < 0 || idx >= length())
        invalid_index_error("insert()");

    const int s_length = ::strlen(s);

    if (s_length > 0) {
        Data *data = new_data(length() + s_length);
        if (idx > 0)
            ::memcpy(data->chars, my_data->chars, idx);
        ::memcpy(&data->chars[idx], s, s_length);
        ::strcpy(&data->chars[idx+s_length], &my_data->chars[idx]);
        replace_data(data);
    }

    return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4b0e
testl %r14d, %r14d
jns 0x6e6a
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r14d
testl %r14d, %r14d
js 0x6e79
movq 0x20(%rbx), %rax
cmpl 0x8(%rax), %r14d
jl 0x6e8e
leaq 0x7382(%rip), %rdi      # 0xe202
leaq 0x7313(%rip), %rsi      # 0xe19a
xorl %eax, %eax
callq 0x289c
movq %r15, %rdi
callq 0x2140
movq %rax, %r12
testl %r12d, %r12d
jle 0x6f14
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
addl %r12d, %edi
xorl %esi, %esi
callq 0x4928
movq %rax, %r13
testl %r14d, %r14d
jle 0x6ecb
leaq 0xc(%r13), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %r14d, %edx
callq 0x21e0
movslq %r14d, %rbp
leaq 0xc(,%rbp), %rdi
addq %r13, %rdi
movl %r12d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq %r15, %rsi
callq 0x21e0
leal (%r12,%r14), %eax
cltq
leaq (%rax,%r13), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%rbp), %rsi
addq $0xc, %rsi
callq 0x2220
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4b54
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::append(char)
GStr& GStr::append(char c) {
  make_unique(); //edit operation ahead
  uint newlen=my_data->length+1;
  if (my_data->cap==0) {
    prep_data(1, 6);
    my_data->chars[0]=c;
    return *this;
  }
  if (newlen>my_data->cap) {
	  //not enough room to append this char
	  GREALLOC(my_data, sizeof(Data)+newlen);
	  my_data->cap=newlen;
  }
  my_data->chars[my_data->length]=c;
  my_data->length++;
  my_data->chars[my_data->length]='\0';
  return *this;
 }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4b0e
movq 0x20(%rbx), %rdi
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0x6f5e
movl 0x8(%rdi), %r14d
incl %r14d
cmpl %eax, %r14d
jbe 0x6faa
movl %r14d, %esi
addq $0x10, %rsi
testq %rdi, %rdi
je 0x6f7a
callq 0x23d0
jmp 0x6f82
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6, %edx
callq 0x4a2a
movq 0x20(%rbx), %rax
movb %bpl, 0xc(%rax)
jmp 0x6fc7
movq %rsi, %rdi
callq 0x2330
testq %rax, %rax
setne %cl
je 0x6f90
movq %rax, 0x20(%rbx)
jmp 0x6fa2
testb %cl, %cl
jne 0x6fa2
leaq 0x7085(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x289c
movq 0x20(%rbx), %rax
movl %r14d, 0x4(%rax)
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
movb %bpl, 0xc(%rax,%rcx)
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
incl %ecx
movl %ecx, 0x8(%rax)
movb $0x0, 0xc(%rax,%rcx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::appendQuoted(char const*, char, bool)
GStr& GStr::appendQuoted(const char* s, char q, bool onlyIfSpaced) {
	if (onlyIfSpaced) {
		if (strpbrk(s, "\t ")==NULL)
			return this->append(s);
	}
	char qend=q;
	if (q=='[' || q=='{' || q=='<')
		qend=q+2;
	else if (q=='(')
		qend=')';
	this->append(q);
	this->append(s);
	this->append(qend);
	return *this;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testl %ecx, %ecx
je 0x6ff4
leaq 0x71bc(%rip), %rsi      # 0xe1a3
movq %r14, %rdi
callq 0x23f0
testq %rax, %rax
je 0x7045
movsbl %bpl, %esi
leal -0x3c(%rsi), %eax
cmpl $0x3f, %eax
ja 0x7016
movabsq $-0x7fffffff7fffffff, %rcx # imm = 0x8000000080000001
btq %rax, %rcx
jae 0x7016
addb $0x2, %bpl
jmp 0x701e
cmpl $0x28, %esi
jne 0x701e
movb $0x29, %bpl
movq %rbx, %rdi
callq 0x6f26
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5398
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x6f26
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5398
jmp 0x703d
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::append(char const*, int)
GStr& GStr::append(const char* s, int len) {
  make_unique(); //edit operation ahead
  //uint len=::strlen(s);
  uint newlen=len+my_data->length;
  if (newlen<=my_data->length) return *this;
  if (my_data->length==0 && my_data->cap<newlen) {
    prep_data(len,4);
    ::strncpy(my_data->chars, s, len);
    return *this;
   }
  if (newlen>=my_data->cap) {
	  //not enough room to append these chars
	  GREALLOC(my_data, sizeof(Data)+newlen+1);
	  my_data->cap=newlen+1;
  }
  //strncpy(my_data->chars+my_data->length, s, len);
  newlen=my_data->length;
  for (int i=0;s[i]!='\0' && i<len;++i) {
	my_data->chars[my_data->length+i]=s[i];
	++newlen;
  }
  my_data->length=newlen;
  my_data->chars[newlen]='\0';
  return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4b0e
movq 0x20(%rbx), %rdi
movl 0x8(%rdi), %eax
leal (%rax,%r15), %ebp
cmpl %eax, %ebp
jbe 0x7148
testl %eax, %eax
jne 0x70ab
cmpl %ebp, 0x4(%rdi)
jae 0x70ab
movq %rbx, %rdi
movl %r15d, %esi
movl $0x4, %edx
callq 0x4a2a
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x2180
jmp 0x7148
cmpl 0x4(%rdi), %ebp
jb 0x70f3
movl %ebp, %esi
addq $0x11, %rsi
testq %rdi, %rdi
je 0x70c2
callq 0x23d0
jmp 0x70ca
movq %rsi, %rdi
callq 0x2330
testq %rax, %rax
setne %cl
je 0x70d8
movq %rax, 0x20(%rbx)
jmp 0x70ea
testb %cl, %cl
jne 0x70ea
leaq 0x6f3d(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x289c
incl %ebp
movq 0x20(%rbx), %rax
movl %ebp, 0x4(%rax)
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
movb (%r14), %cl
testb %cl, %cl
sete %dl
testl %r15d, %r15d
setle %sil
orb %dl, %sil
jne 0x713a
movl %r15d, %edx
xorl %esi, %esi
movq 0x20(%rbx), %rdi
movl 0x8(%rdi), %r8d
addl %esi, %r8d
movb %cl, 0xc(%rdi,%r8)
leaq 0x1(%rsi), %rdi
cmpq %rdx, %rdi
jae 0x7138
movb 0x1(%r14,%rsi), %cl
movq %rdi, %rsi
testb %cl, %cl
jne 0x7113
addl %edi, %eax
movq 0x20(%rbx), %rcx
movl %eax, 0x8(%rcx)
movl %eax, %eax
movb $0x0, 0xc(%rcx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::appendmem(char const*, int)
GStr& GStr::appendmem(const char* m, int len) {
  if (len<=0) return *this;
  make_unique(); //edit operation ahead
  uint newlen=len+my_data->length;
  //if (newlength<=my_data->length) return *this;
  if (my_data->length==0) {
    prep_data(len);
    ::memcpy(my_data->chars, m, len);
    return *this;
   }
  //faster solution with realloc
  if (newlen>=my_data->cap) {
	  //not enough room to append these chars
	  GREALLOC(my_data, sizeof(Data)+newlen+1);
	  my_data->cap=newlen+1;
  }
  ::memcpy(my_data->chars + my_data->length, m, len);
  my_data->length=newlen;
  my_data->chars[newlen]='\0';
  return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
jle 0x721a
movl %edx, %ebp
movq %rsi, %r14
movq %rbx, %rdi
callq 0x4b0e
movq 0x20(%rbx), %rdi
movl 0x8(%rdi), %r15d
testl %r15d, %r15d
je 0x71a0
addl %ebp, %r15d
movl %r15d, %r12d
cmpl 0x4(%rdi), %r15d
jb 0x71f3
leaq 0x11(%r12), %rsi
testq %rdi, %rdi
je 0x71c0
callq 0x23d0
jmp 0x71c8
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x4a2a
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movl %ebp, %edx
movq %r14, %rsi
callq 0x21e0
jmp 0x721a
movq %rsi, %rdi
callq 0x2330
testq %rax, %rax
setne %cl
je 0x71d6
movq %rax, 0x20(%rbx)
jmp 0x71e8
testb %cl, %cl
jne 0x71e8
leaq 0x6e3f(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x289c
leal 0x1(%r15), %eax
movq 0x20(%rbx), %rcx
movl %eax, 0x4(%rcx)
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
movl %ebp, %edx
movq %r14, %rsi
callq 0x21e0
movq 0x20(%rbx), %rax
movl %r15d, 0x8(%rax)
movb $0x0, 0xc(%rax,%r12)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::upper()
GStr& GStr::upper() {
  make_unique(); //edit operation ahead
  for (char *p = chrs(); *p; p++)
            *p = (char) toupper(*p);

    return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4b0e
movq 0x20(%rbx), %r14
movb 0xc(%r14), %al
testb %al, %al
je 0x7268
addq $0xd, %r14
movsbl %al, %edi
callq 0x2430
movb %al, -0x1(%r14)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x7252
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::lower()
GStr& GStr::lower() {
    make_unique();

    for (char *p = chrs(); *p; p++)
          *p = (char) tolower(*p);

    return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4b0e
movq 0x20(%rbx), %r14
movb 0xc(%r14), %al
testb %al, %al
je 0x72a6
addq $0xd, %r14
movsbl %al, %edi
callq 0x2380
movb %al, -0x1(%r14)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x7290
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::rindex(char, int) const
int GStr::rindex(char c, int end_index) const {
    if (c == 0 || length()==0 || end_index>=length()) return -1;
    if (end_index<0) end_index=my_data->length-1;
    for (int i=end_index;i>=0;i--) {
      if (my_data->chars[i]==c) return i;
      }
    return -1;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %sil, %sil
je 0x72f1
movq 0x20(%rdi), %rcx
movl 0x8(%rcx), %edi
testl %edi, %edi
sete %r8b
cmpl %edx, %edi
setle %r9b
orb %r8b, %r9b
jne 0x72f1
decl %edi
testl %edx, %edx
cmovnsl %edx, %edi
testl %edi, %edi
js 0x72f1
movl %edi, %edx
cmpb %sil, 0xc(%rcx,%rdx)
je 0x72f2
leal -0x1(%rdi), %edx
testl %edi, %edi
movl %edx, %edi
jg 0x72df
retq
movl %edi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::rindex(char const*, int) const
int GStr::rindex(const char* str, int end_index) const {
    if (str==NULL || *str == '\0' || length()==0 || end_index>=length())
        return -1;
    int slen=strlen(str);
    if (end_index<0) end_index=my_data->length-1;
    //end_index is the index of the right-side boundary
    //the scanning starts at the end
    if (end_index>=0 && end_index<slen-1) return -1;
    for (int i=end_index-slen+1;i>=0;i--) {
       if (memcmp((void*)(my_data->chars+i),(void*)str, slen)==0)
           return i;
       }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x7391
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x7391
movl %edx, %ebp
movq 0x20(%rdi), %r12
movl 0x8(%r12), %r13d
testl %r13d, %r13d
sete %al
cmpl %edx, %r13d
setle %cl
orb %al, %cl
jne 0x7391
movq %r14, %rdi
callq 0x2140
decl %r13d
testl %ebp, %ebp
cmovnsl %ebp, %r13d
testl %r13d, %r13d
setns %cl
leal -0x1(%rax), %edx
cmpl %edx, %r13d
setl %dl
testb %dl, %cl
jne 0x7391
subl %eax, %r13d
incl %r13d
js 0x7391
movslq %eax, %r15
movl %r13d, %eax
addq %rax, %r12
addq $0xc, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2260
testl %eax, %eax
je 0x738e
leal -0x1(%r13), %eax
decq %r12
testl %r13d, %r13d
movl %eax, %r13d
jg 0x736b
jmp 0x7391
movl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::split(char const*)
GStr GStr::split(const char* delim) {
           /* splits "this" in two parts, at the first (left)
                 encounter of delim:
                 1st would stay in "this",
                 2nd part will be returned
                 as a new string!
           */
 GStr result;
 int i=index(delim);
 if (i>=0){
      result=substr(i+strlen(delim));
      cut(i);
      return result;
      }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xce93(%rip), %rax      # 0x14250
movq %rax, 0x20(%rdi)
movq $0x0, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x559e
movl %eax, %r15d
testl %eax, %eax
js 0x7430
movq %r12, %rdi
callq 0x2140
leal (%rax,%r15), %edx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x658e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4f2c
movq %rsp, %rdi
callq 0x4e2a
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a58
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e2a
jmp 0x7451
jmp 0x744e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::split(char)
GStr GStr::split(char c) {
           /* splits "this" in two parts, at the first (left)
                 encounter of delim:
                 1st would stay in "this",
                 2nd part will be returned
                 as a new string!
           */
 GStr result;
 int i=index(c);
 if (i>=0){
      result=substr(i+1);
      cut(i);
      return result;
      }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xcdd8(%rip), %rax      # 0x14250
movq %rax, 0x20(%rdi)
movq $0x0, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x56b2
movl %eax, %r15d
testl %eax, %eax
js 0x74e8
leal 0x1(%r15), %edx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x658e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4f2c
leaq 0x8(%rsp), %rdi
callq 0x4e2a
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a58
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e2a
jmp 0x7509
jmp 0x7506
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::splitr(char const*)
GStr GStr::splitr(const char* delim) {
 GStr result;
 int i=rindex(delim);
 if (i>=0){
      result=substr(i+strlen(delim));
      cut(i);
      return result;
      }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xcd1b(%rip), %rax      # 0x14250
movq %rax, 0x20(%rdi)
movq $0x0, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x72f6
testl %eax, %eax
js 0x75ab
movl %eax, %r15d
movq %r12, %rdi
callq 0x2140
leal (%rax,%r15), %edx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x658e
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4f2c
movq %rsp, %rdi
callq 0x4e2a
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a58
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x75c9
movq %rax, %r14
movq %rsp, %rdi
callq 0x4e2a
jmp 0x75cc
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::splitr(char)
GStr GStr::splitr(char c) {
 GStr result;
 int i=rindex(c);
 if (i>=0){
      result=substr(i+1);
      cut(i);
      return result;
      }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xcc5e(%rip), %rax      # 0x14250
movq %rax, 0x20(%rdi)
movq $0x0, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %dl, %dl
je 0x7643
movq 0x20(%r14), %rcx
movslq 0x8(%rcx), %rax
testq %rax, %rax
jle 0x7643
cmpb %dl, 0xb(%rcx,%rax)
je 0x763e
decq %rax
leaq 0x1(%rax), %rsi
cmpq $0x2, %rsi
jge 0x7629
jmp 0x7643
decl %eax
movl %eax, %r15d
testl %r15d, %r15d
js 0x7685
leal 0x1(%r15), %edx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x658e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4f2c
leaq 0x8(%rsp), %rdi
callq 0x4e2a
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x6a58
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x76a3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4e2a
jmp 0x76a6
movq %rax, %r14
movq %rbx, %rdi
callq 0x4e2a
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::startTokenize(char const*, enTokenizeMode)
void GStr::startTokenize(const char* delimiter, enTokenizeMode tokenizemode) {
 GFREE(fTokenDelimiter);
 if (delimiter) {
    GMALLOC(fTokenDelimiter,strlen(delimiter)+1);
    strcpy(fTokenDelimiter, delimiter);
    }
 fLastTokenStart=0;
 fTokenizeMode=tokenizemode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x76d0
callq 0x22e0
movq $0x0, (%r14)
testq %r15, %r15
je 0x771a
movq %r15, %rdi
callq 0x2140
movq $0x0, (%r14)
incq %rax
je 0x76fb
movq %rax, %rdi
callq 0x2330
movq %rax, (%r14)
cmpq $0x0, (%r14)
jne 0x770f
leaq 0x6918(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x289c
movq (%r14), %rdi
movq %r15, %rsi
callq 0x2220
movl $0x0, 0x8(%r14)
movl %ebx, 0xc(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::asInt(int&, int)
bool GStr::asInt(int& r, int base) {
 errno=0;
 char*endptr;
 long val=strtol(text(), &endptr, base);
 if (errno!=0) return false;
 if (endptr == text()) return false;
 /* If we got here, strtol() successfully parsed a number */
 r=val;
 return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2040
movq %rax, %r15
movl $0x0, (%rax)
movq 0x20(%r14), %rdi
addq $0xc, %rdi
movq %rsp, %rsi
movl %ebp, %edx
callq 0x2360
cmpl $0x0, (%r15)
je 0x7c59
xorl %eax, %eax
jmp 0x7c6b
movq 0x20(%r14), %rcx
addq $0xc, %rcx
cmpq %rcx, (%rsp)
je 0x7c55
movl %eax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::asReal(double&)
bool GStr::asReal(double& r) {
  errno=0;
  char* endptr;
  double val=strtod(text(), &endptr);
  if (errno!=0) return false;
  if (endptr == text()) return false; //no digits to parse
  r=val;
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2040
movq %rax, %r15
movl $0x0, (%rax)
movq 0x20(%r14), %rdi
addq $0xc, %rdi
leaq 0x8(%rsp), %rsi
callq 0x21d0
cmpl $0x0, (%r15)
je 0x7cbf
xorl %eax, %eax
jmp 0x7cd4
movq 0x20(%r14), %rax
addq $0xc, %rax
cmpq %rax, 0x8(%rsp)
je 0x7cbb
movsd %xmm0, (%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::to(char)
GStr GStr::to(char c) { //return the first part up to first occurence of c
 int i=index(c);
 if (i>=0) return substr(0,i);
      else return (*this);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x56b2
testl %eax, %eax
js 0x7e7d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %eax, %ecx
callq 0x658e
jmp 0x7eb0
leaq 0xc3cc(%rip), %rax      # 0x14250
movq %rax, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4b54
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::from(char)
GStr GStr::from(char c) { //same as to, but starting from the right side
 int i=rindex(c);
 if (i>=0) return substr(i+1);
      else return (*this);
}

// Assembly:
pushq %rbx
movl %edx, %eax
movq %rdi, %rbx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x7ef1
movq 0x20(%rsi), %rdi
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x7ef1
cmpb %al, 0xb(%rdi,%rcx)
je 0x7eed
decq %rcx
leaq 0x1(%rcx), %r8
cmpq $0x2, %r8
jge 0x7ed8
jmp 0x7ef1
decl %ecx
movl %ecx, %edx
testl %edx, %edx
js 0x7f06
incl %edx
movq %rbx, %rdi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x658e
jmp 0x7f39
leaq 0xc343(%rip), %rax      # 0x14250
movq %rax, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq 0x20(%rsi), %rsi
movq %rbx, %rdi
callq 0x4b54
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GStr.cpp
// Function: GStr::count(char)
int GStr::count(char c){
 //return the number of occurences of char c within the string
 int result=0;
 for (int i=0;i<length();i++)
    if (my_data->chars[i]==c) result++;
 return result;
 }

// Assembly:
movq 0x20(%rdi), %rcx
movslq 0x8(%rcx), %rdx
testq %rdx, %rdx
jle 0x7f67
xorl %edi, %edi
xorl %eax, %eax
xorl %r8d, %r8d
cmpb %sil, 0xc(%rcx,%rdi)
sete %r8b
addl %r8d, %eax
incq %rdi
cmpq %rdi, %rdx
jne 0x7f4f
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: dbg_dequote(char*&)
void dbg_dequote(char* &p) {
   int alen=strlen(p);
   if (alen>1 && p[0]=='\'' && p[alen-1]=='\'') {
	 p++;
	 p[alen-2 ]='\0';
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x2140
cmpl $0x2, %eax
jl 0x88a4
cmpb $0x27, (%rbx)
jne 0x88a4
leal -0x1(%rax), %ecx
cmpb $0x27, (%rbx,%rcx)
jne 0x88a4
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
leaq 0x1(%rbx), %rdx
movq %rdx, (%r14)
addl %ecx, %eax
movb $0x0, 0x1(%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::validLongOpt(char*, char*)
int GArgs::validLongOpt(char* o, char* to) {
 char* pstr=Gstrdup(o,to);
 for (int i=0; i<fmtcount; i++) {
  if (fmt[i].longopt && strcmp(fmt[i].longopt, pstr)==0) {
       GFREE(pstr);
       return i;
       }
  }
 GFREE(pstr); 
 return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x29ac
movq %rax, %r14
movslq (%rbx), %r15
testq %r15, %r15
jle 0x8920
movq 0x8(%rbx), %r12
xorl %ebx, %ebx
movq (%r12), %rdi
testq %rdi, %rdi
je 0x8914
movq %r14, %rsi
callq 0x2350
testl %eax, %eax
je 0x8925
incq %rbx
addq $0x10, %r12
cmpq %rbx, %r15
jne 0x88ff
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r14, %r14
je 0x8932
movq %r14, %rdi
callq 0x22e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::printError(_IO_FILE*, char const*, bool)
void GArgs::printError(FILE* fout, const char* usage, bool exitProgram) {
 if (errarg==0) return;
 if (usage) fprintf(fout, "%s\n", usage);
 if (err_valmissing) 
     fprintf(fout, "Error: value required for option '%s'\n", _argv[errarg]);
    else 
     fprintf(fout, "Error: invalid argument '%s'\n", _argv[errarg]);
 if (exitProgram)
     exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x38(%rdi)
je 0x899a
movl %ecx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x8969
leaq 0x5759(%rip), %rsi      # 0xe0b8
movq %r14, %rdi
xorl %eax, %eax
callq 0x2370
movq 0x18(%r15), %rax
movslq 0x38(%r15), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x58a6(%rip), %rax      # 0xe222
leaq 0x58c6(%rip), %rsi      # 0xe249
cmpb $0x0, 0x3c(%r15)
cmovneq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2370
testb %bl, %bl
jne 0x89a0
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %edi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::GArgs(int, char**, GArgsDef const*, bool)
GArgs::GArgs(int argc, char* argv[], const GArgsDef fmtrecs[], bool nodigitopts) {
 fmtcount=0;
 count=0;
 nonOptCount=0;
 nonOptPos=0;
 optPos=0;
 errarg=0;
 err_valmissing=false;
 args=NULL;
 fmt=NULL;
 _argc=argc;
 _argv=argv;
 if (fmtrecs==NULL) return;
 
 const GArgsDef* frec=fmtrecs;
 while ((frec->longopt || frec->opt) && fmtcount<255) {
     fmtcount++;
     frec=&(fmtrecs[fmtcount]);
     }
 GCALLOC(fmt, fmtcount*sizeof(fmtdef));
 for (int i=0;i<fmtcount;i++) {
   fmt[i].longopt=Gstrdup(fmtrecs[i].longopt); //do we need to use Gstrdup here?
   fmt[i].opt=fmtrecs[i].opt;
   fmt[i].req_value=fmtrecs[i].req_value;
   fmt[i].code=fmtrecs[i].code;
   }
 parseArgs(nodigitopts);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x2d(%rdi)
movl %esi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
testq %rcx, %rcx
je 0x8b30
movl %r8d, %ebx
movq %rcx, %r14
movq %rdi, %r15
movslq (%rdi), %rax
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rcx,%r14), %rsi
addq $0x10, %rsi
leal 0x1(%rax), %ecx
movq %r14, %rdi
movq %rsi, %rdx
cmpq $0x0, (%rdi)
je 0x8a86
cmpq $0xfe, %rax
jle 0x8a94
jmp 0x8aa5
cmpb $0x0, 0x8(%rdi)
je 0x8aa5
cmpq $0xff, %rax
jge 0x8aa5
incq %rax
movl %ecx, (%r15)
leaq 0x10(%rdx), %rsi
incl %ecx
movq %rdx, %rdi
jmp 0x8a73
movslq (%r15), %rdi
shlq $0x4, %rdi
movl $0x1, %esi
callq 0x21c0
movq %rax, 0x8(%r15)
testq %rax, %rax
jne 0x8acd
leaq 0x555a(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x289c
cmpl $0x0, (%r15)
jle 0x8b1c
movl $0xc, %r12d
xorl %r13d, %r13d
movq -0xc(%r14,%r12), %rdi
xorl %esi, %esi
callq 0x2936
movq 0x8(%r15), %rcx
movq %rax, -0xc(%rcx,%r12)
movb -0x4(%r14,%r12), %al
movb %al, -0x4(%rcx,%r12)
movb -0x3(%r14,%r12), %al
movb %al, -0x3(%rcx,%r12)
movl (%r14,%r12), %eax
movl %eax, (%rcx,%r12)
incq %r13
movslq (%r15), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x8adc
movzbl %bl, %esi
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x8228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::~GArgs()
GArgs::~GArgs() {
 int i;
 for (i=0; i<fmtcount; i++)
    GFREE(fmt[i].longopt);
 GFREE(fmt);
 for (i=0; i<count; i++) {
  GFREE(args[i].opt);
  GFREE(args[i].value);
  }
 GFREE(args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x8ba1
xorl %r12d, %r12d
leaq 0x5715(%rip), %r14      # 0xe26c
leaq 0x5712(%rip), %r15      # 0xe270
xorl %r13d, %r13d
movq 0x8(%rbx), %rbp
testq %rbp, %rbp
jne 0x8b7a
movq %r14, %rdi
movq %r15, %rsi
movl $0xf6, %edx
callq 0x285c
movq (%rbp,%r12), %rdi
testq %rdi, %rdi
je 0x8b89
callq 0x22e0
movq $0x0, (%rbp,%r12)
incq %r13
movslq (%rbx), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x8b61
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8baf
callq 0x22e0
movq $0x0, 0x8(%rbx)
cmpl $0x0, 0x28(%rbx)
jle 0x8c2e
xorl %r12d, %r12d
leaq 0x56a5(%rip), %r14      # 0xe26c
leaq 0x56a2(%rip), %r15      # 0xe270
xorl %r13d, %r13d
movq 0x20(%rbx), %rbp
testq %rbp, %rbp
jne 0x8bea
movq %r14, %rdi
movq %r15, %rsi
movl $0xf6, %edx
callq 0x285c
movq (%rbp,%r12), %rdi
testq %rdi, %rdi
je 0x8bf9
callq 0x22e0
movq $0x0, (%rbp,%r12)
movq 0x20(%rbx), %rbp
movq 0x8(%rbp,%r12), %rdi
testq %rdi, %rdi
je 0x8c15
callq 0x22e0
movq $0x0, 0x8(%rbp,%r12)
incq %r13
movslq 0x28(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x8bd1
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8c3c
callq 0x22e0
movq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8c55
movq %rax, %rdi
callq 0x8eb0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::getOpt(char const*)
char* GArgs::getOpt(const char* o) { /* retrieve the value for option o
                   returns 
                       NULL    if option not given at all
                     !=NULL    if boolean option was given
                     opt.value if value option was given
                     */
 for (int i=0; i<count; i++) 
  if (args[i].opt!=NULL && strcmp(args[i].opt, o)==0) 
           return args[i].value;
 return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x28(%rdi), %rax
testq %rax, %rax
jle 0x8cd4
movq %rsi, %r14
movq 0x20(%rdi), %r15
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
testq %rdi, %rdi
je 0x8cc9
movq %r14, %rsi
callq 0x2350
testl %eax, %eax
je 0x8cd8
addq $0x18, %r13
cmpq %r13, %r12
jne 0x8cb4
jmp 0x8cdd
xorl %ebx, %ebx
jmp 0x8cdd
movq 0x8(%r15,%r13), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::getOpt(char)
char* GArgs::getOpt(const char o) {
 for (int i=0; i<count; i++) 
  if (args[i].opt!=NULL && args[i].opt[0]==o && args[i].opt[1]=='\0') 
      return args[i].value;
 return NULL;
}

// Assembly:
movslq 0x28(%rdi), %rax
testq %rax, %rax
jle 0x8d22
movq 0x20(%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %eax, %eax
xorl %edi, %edi
movq (%rcx,%rdi), %r8
testq %r8, %r8
je 0x8d18
cmpb %sil, (%r8)
jne 0x8d18
cmpb $0x0, 0x1(%r8)
je 0x8d25
addq $0x18, %rdi
cmpq %rdi, %rdx
jne 0x8d03
retq
xorl %eax, %eax
retq
movq 0x8(%rcx,%rdi), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::getOpt(int)
char* GArgs::getOpt(int c) {
 for (int i=0; i<count; i++) 
  if (args[i].fmti>=0 && fmt[args[i].fmti].code==c)
      return args[i].value;
 return NULL;
}

// Assembly:
movslq 0x28(%rdi), %rax
testq %rax, %rax
jle 0x8d69
movq 0x8(%rdi), %rdx
movq 0x20(%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
xorl %eax, %eax
xorl %r8d, %r8d
movslq 0x10(%rcx,%r8), %r9
testq %r9, %r9
js 0x8d5f
shlq $0x4, %r9
cmpl %esi, 0xc(%rdx,%r9)
je 0x8d6c
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x8d4a
retq
xorl %eax, %eax
retq
movq 0x8(%rcx,%r8), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/GArgs.cpp
// Function: GArgs::getOptName(int)
char* GArgs::getOptName(int c) {
 for (int i=0; i<count; i++) 
  if (args[i].fmti>=0 && fmt[args[i].fmti].code==c)
      return args[i].opt;
 return NULL;
}

// Assembly:
movslq 0x28(%rdi), %rax
testq %rax, %rax
jle 0x8daf
movq 0x8(%rdi), %rdx
movq 0x20(%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
xorl %eax, %eax
xorl %r8d, %r8d
movslq 0x10(%rcx,%r8), %r9
testq %r9, %r9
js 0x8da5
shlq $0x4, %r9
cmpl %esi, 0xc(%rdx,%r9)
je 0x8db2
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x8d90
retq
xorl %eax, %eax
retq
movq (%rcx,%r8), %rax
retq
nop