LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::trimR(char const*)
GStr& GStr::trimR(const char* c) {
 int iend;
 for (iend=length()-1; iend>=0 && strchr(c,my_data->chars[iend])!=NULL;iend--) ;
 if (iend==-1) {
       make_unique();
       prep_data(0); //string was entirely trimmed
       return *this;
       }
 int newlen=iend+1;
 if (newlen==length())  //nothing to trim
           return *this;
 make_unique(); //edit operation ahead
 my_data->length=newlen;
 my_data->chars[newlen]='\0';
 /*
 Data *data = new_data(newlen);
 ::memcpy(data->chars, my_data->chars, newlen);
 replace_data(data);
 */
 return *this;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x20(%rdi), %r13
movslq 0x8(%r13), %rcx
movl %ecx, %ebx
xorl %edx, %edx
movq %rbx, %r12
movq %rcx, %r15
movl %edx, %ebp
testl %r12d, %r12d
jle 0x5af4
leaq -0x1(%r12), %rbx
movsbl 0xb(%r13,%r12), %esi
movq %r14, %rdi
callq 0x2100
leaq -0x1(%r15), %rcx
leal 0x1(%rbp), %edx
testq %rax, %rax
jne 0x5ac6
jmp 0x5af9
testq %r12, %r12
je 0x5b19
testl %ebp, %ebp
movq (%rsp), %r14
je 0x5b42
movq %r14, %rdi
callq 0x4a4c
movq 0x20(%r14), %rax
movl %r12d, 0x8(%rax)
movb $0x0, 0xc(%rax,%r15)
jmp 0x5b42
movq (%rsp), %r14
movq %r14, %rdi
callq 0x4a4c
movq 0x20(%r14), %rdi
leaq 0xe720(%rip), %rbx      # 0x14250
cmpq %rbx, %rdi
je 0x5b3e
decl (%rdi)
jne 0x5b3e
callq 0x22e0
movq %rbx, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::chomp(char const*)
GStr& GStr::chomp(const char* cstr) {
 int iend;
 if (cstr==NULL || *cstr==0) return *this;
 //check if this ends with cstr
 int cend=strlen(cstr)-1;
 iend=my_data->length-1;
 while (iend>=0 && cend>=0) {
  if (my_data->chars[iend]!=cstr[cend]) return *this;
  iend--;
  cend--;
  }
 if (iend==-1) {
       make_unique();
       prep_data(0); //string will be entirely trimmed
       return *this;
       }
 int newlen=iend+1;
 make_unique(); //edit operation ahead
 my_data->length=newlen;
 my_data->chars[newlen]='\0';
 //Data *data = new_data(newlen);
 //::memcpy(data->chars, my_data->chars, newlen);
 //replace_data(data);
 return *this;
 }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x5c16
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x5c16
movq %r14, %rdi
callq 0x2140
movq 0x20(%rbx), %rcx
movl 0x8(%rcx), %r12d
movl %eax, %eax
decq %rax
movq %r12, %r15
shlq $0x20, %r15
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
leaq -0x1(%r12), %rdi
movl %edi, %r8d
orl %eax, %r8d
btl $0x1f, %r8d
jb 0x5bd3
movq %rdi, %r8
andq %rdx, %r8
movb 0xc(%rcx,%r8), %r8b
movq %rax, %r9
andq %rdx, %r9
decq %rax
addq %rsi, %r15
movq %rdi, %r12
cmpb (%r14,%r9), %r8b
je 0x5b9f
jmp 0x5c16
movq %rbx, %rdi
testq %r12, %r12
je 0x5bf4
callq 0x4a4c
movq 0x20(%rbx), %rax
movl %r12d, 0x8(%rax)
sarq $0x20, %r15
movb $0x0, 0xc(%rax,%r15)
jmp 0x5c16
callq 0x4a4c
movq 0x20(%rbx), %rdi
leaq 0xe64c(%rip), %r14      # 0x14250
cmpq %r14, %rdi
je 0x5c12
decl (%rdi)
jne 0x5c12
callq 0x22e0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::trimL(char)
GStr& GStr::trimL(char c) {
 int istart;
 for (istart=0; istart<length() && my_data->chars[istart]==c;istart++) ;
 if (istart==length()) {
       prep_data(0); //string was entirely trimmed
       return *this;
       }
 int newlen=length()-istart;
 if (newlen==length())  //nothing to trim
           return *this;
 make_unique(); //edit operation ahead
 Data *data = new_data(newlen);
 ::memcpy(data->chars, &my_data->chars[istart], newlen);
 replace_data(data);
 return *this;
 }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movslq 0x8(%rdi), %r14
testq %r14, %r14
jle 0x5c52
xorl %r12d, %r12d
cmpb %sil, 0xc(%rdi,%r12)
jne 0x5c59
incq %r12
cmpq %r12, %r14
jne 0x5c41
jmp 0x5c5e
testl %r14d, %r14d
jne 0x5c77
jmp 0x5c5e
cmpl %r12d, %r14d
jne 0x5c86
leaq 0xe5eb(%rip), %r14      # 0x14250
cmpq %r14, %rdi
je 0x5c73
decl (%rdi)
jne 0x5c73
callq 0x22e0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testq %r12, %r12
je 0x5c77
subq %r12, %r14
movq %rbx, %rdi
callq 0x4a4c
movl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%r12), %rsi
addq $0xc, %rsi
movq %r14, %rdx
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a92
jmp 0x5c77
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::trimL(char const*)
GStr& GStr::trimL(const char* c) {
 int istart;
 for (istart=0; istart<length() && strchr(c,my_data->chars[istart])!=NULL;istart++) ;
 if (istart==length()) {
       prep_data(0); //string was entirely trimmed
       return *this;
       }
 int newlen=length()-istart;
 if (newlen==length())  //nothing to trim
           return *this;
 make_unique(); //edit operation ahead

 Data *data = new_data(newlen);
 ::memcpy(data->chars, &my_data->chars[istart], newlen);
 replace_data(data);
 return *this;
 }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movslq 0x8(%r15), %r14
testq %r14, %r14
jle 0x5d04
movq %rsi, %r12
xorl %r13d, %r13d
movsbl 0xc(%r15,%r13), %esi
movq %r12, %rdi
callq 0x2100
testq %rax, %rax
je 0x5d0b
incq %r13
cmpq %r13, %r14
jne 0x5ce7
jmp 0x5d10
testl %r14d, %r14d
jne 0x5d2d
jmp 0x5d10
cmpl %r13d, %r14d
jne 0x5d3a
leaq 0xe539(%rip), %r14      # 0x14250
cmpq %r14, %r15
je 0x5d29
decl (%r15)
jne 0x5d29
movq %r15, %rdi
callq 0x22e0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testq %r13, %r13
je 0x5d2d
subq %r13, %r14
movq %rbx, %rdi
callq 0x4a4c
movl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rax
leaq (%rax,%r13), %rsi
addq $0xc, %rsi
movq %r14, %rdx
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a92
jmp 0x5d2d
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::padR(unsigned int, char)
GStr& GStr::padR(uint len, char c) {
 //pad with c until total string length is len
 if (my_data->length>=len) return *this; //no room for padding
 make_unique(); //edit operation ahead
 if (my_data->cap>=len) {
	 ::memset(my_data->chars, c, len-my_data->length);
	 my_data->length=len;
	 return *this;
 }
 Data *data = new_data(len);
 ::memset(data->chars,c,len-my_data->length);
 ::memcpy(&data->chars[len-length()], my_data->chars, my_data->length);
 replace_data(data);
 return *this;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpl %esi, 0x8(%rax)
jae 0x5e0d
movl %edx, %ebp
movl %esi, %r14d
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rdi
cmpl %r14d, 0x4(%rdi)
jae 0x5df2
movl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rax
movl %r14d, %edx
subl 0x8(%rax), %edx
movzbl %bpl, %esi
callq 0x2190
movq 0x20(%rbx), %rsi
movl 0x8(%rsi), %edx
subl %edx, %r14d
leaq (%r15,%r14), %rdi
addq $0xc, %rdi
addq $0xc, %rsi
callq 0x21e0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a92
jmp 0x5e0d
movl %r14d, %edx
subl 0x8(%rdi), %edx
addq $0xc, %rdi
movzbl %bpl, %esi
callq 0x2190
movq 0x20(%rbx), %rax
movl %r14d, 0x8(%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::padL(unsigned int, char)
GStr& GStr::padL(uint len, char c) { //align left the string
 if (my_data->length>=len) return *this; //no room for padding
 make_unique(); //edit operation ahead
 Data *data = new_data(len);
 ::memcpy(data->chars, my_data->chars, length());
 ::memset(&data->chars[length()],c,len-length());
 replace_data(data);
 return *this;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpl %esi, 0x8(%rax)
jae 0x5e88
movl %edx, %ebp
movl %esi, %r14d
movq %rbx, %rdi
callq 0x4a4c
movl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%rbx), %rax
movslq 0x8(%rax), %rax
leaq (%r15,%rax), %rdi
addq $0xc, %rdi
subl %eax, %r14d
movzbl %bpl, %esi
movq %r14, %rdx
callq 0x2190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a92
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::padC(unsigned int, char)
GStr& GStr::padC(uint len, char c) {
 if (my_data->length>=len) return *this; //no room for padding
 make_unique(); //edit operation ahead
 uint istart=(len-length())/2;
 Data *data = new_data(len);
 if (istart>0)
      ::memset(data->chars, c, istart);
 ::memcpy(&data->chars[istart], my_data->chars, length());
 uint iend=istart+length();
 if (iend<len)
      ::memset(&data->chars[iend],c,len-iend);
 replace_data(data);
 return *this;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpl %esi, 0x8(%rax)
jae 0x5f44
movl %edx, %ebp
movl %esi, %r14d
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rax
movl %r14d, %r12d
subl 0x8(%rax), %r12d
movl %r12d, %r13d
shrl %r13d
movl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
movzbl %bpl, %ebp
cmpl $0x1, %r12d
ja 0x5eeb
movl %r13d, %r12d
jmp 0x5efc
leaq 0xc(%r15), %rdi
movl %r13d, %r12d
movl %ebp, %esi
movq %r12, %rdx
callq 0x2190
leaq (%r15,%r12), %rdi
addq $0xc, %rdi
movq 0x20(%rbx), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r13d
subl %r13d, %r14d
jbe 0x5f39
movq %r15, %rax
addq $0xc, %rax
movl %r13d, %edi
addq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x2190
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4a92
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_O3/gpertea[P]gclib/GStr.cpp
// Function: operator+(char const*, GStr const&)
GStr operator+(const char *s1, const GStr& s2) {
    const int s1_length = ::strlen(s1);

    if (s1_length == 0)
        return s2;
    else {
        GStr newstring;
        newstring.prep_data(s1_length + s2.length());
        ::memcpy(newstring.chrs(), s1, s1_length);
        ::memcpy(&(newstring.chrs())[s1_length], s2.chars(), s2.length());
        return newstring;
        }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2140
movq %rax, %r12
leaq 0x10(%rbx), %rax
leaq 0xe2d2(%rip), %rcx      # 0x14250
movq %rcx, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x8(%rbx)
xorps %xmm0, %xmm0
testl %r12d, %r12d
je 0x5fe7
movups %xmm0, (%rax)
movq 0x20(%r14), %rax
movl 0x8(%rax), %esi
addl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %r13
leaq 0xc(%r13), %rdi
movslq %r12d, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x21e0
leaq (%r12,%r13), %rdi
addq $0xc, %rdi
movq 0x20(%r14), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
jmp 0x5ff6
movups %xmm0, (%rax)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4a92
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator+(GStr const&) const
GStr GStr::operator+(const GStr& s) const {
    if (length() == 0)
        return s;
    else if (s.length() == 0)
        return *this;
    else {
        GStr newstring;
        newstring.prep_data(length() + s.length());
        ::memcpy(newstring.chrs(), my_data->chars, length());
        ::memcpy(&(newstring.chrs())[length()], s.chars(), s.length());
        return newstring;
        }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %rsi
movl 0x8(%rsi), %ecx
testl %ecx, %ecx
je 0x60af
movq 0x20(%r14), %rax
movl 0x8(%rax), %eax
leaq 0xe210(%rip), %rdx      # 0x14250
movq %rdx, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rdx      # imm = 0x100000000
movq %rdx, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
testl %eax, %eax
je 0x60da
addl %ecx, %eax
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %r12
leaq 0xc(%r12), %rdi
movq 0x20(%r15), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r15), %rax
movslq 0x8(%rax), %rax
leaq (%r12,%rax), %rdi
addq $0xc, %rdi
movq 0x20(%r14), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
jmp 0x60e2
leaq 0xe19a(%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 0x4a92
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator+(char const*) const
GStr GStr::operator+(const char *s) const {

    const int s_length = ::strlen(s);

    if (s_length == 0)
        return *this;
    else {
        GStr newstring;
        newstring.prep_data(length() + s_length);
        ::memcpy(newstring.chrs(), my_data->chars, length());
        ::memcpy(&(newstring.chrs())[length()], s, s_length);
        return newstring;
        }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x2140
movq %rax, %r12
leaq 0x10(%rbx), %rax
leaq 0xe124(%rip), %rcx      # 0x14250
movq %rcx, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x8(%rbx)
xorps %xmm0, %xmm0
testl %r12d, %r12d
je 0x619a
movups %xmm0, (%rax)
movq 0x20(%r15), %rax
movl 0x8(%rax), %esi
addl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %r13
leaq 0xc(%r13), %rdi
movq 0x20(%r15), %rsi
movslq 0x8(%rsi), %rdx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r15), %rax
movslq 0x8(%rax), %rax
leaq (%rax,%r13), %rdi
addq $0xc, %rdi
movslq %r12d, %rdx
movq %r14, %rsi
callq 0x21e0
jmp 0x61a9
movups %xmm0, (%rax)
movq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x4a92
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator+(int) const
GStr GStr::operator+(const int i) const {
    char buf[20];
    sprintf(buf, "%d", i);
    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 $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x7f87(%rip), %rsi      # 0xe169
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2080
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
leaq 0xe04f(%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 0x497c
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 $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator+(char) const
GStr GStr::operator+(const char c) const {
    char buf[4];
    sprintf(buf, "%c", c);
    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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %rdi
movb %dl, (%rdi)
movb $0x0, 0x1(%rdi)
callq 0x2140
movq %rax, %r15
leaq 0xdf9c(%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 0x497c
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
leaq 0x4(%rsp), %rsi
callq 0x21e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7e12(%rip), %rsi      # 0xe16c
movq %rsp, %r15
movq %r15, %rdi
movb $0x1, %al
callq 0x2080
movq %r15, %rdi
callq 0x2140
movq %rax, %r15
leaq 0xded7(%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 0x497c
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 0x4d60
movq %r14, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
movq 0x20(%rdi), %rbx
leaq 0xde40(%rip), %rax      # 0x14250
cmpq %rax, %rbx
je 0x643a
movb 0xc(%rbx), %cl
testb %cl, %cl
je 0x643e
addq $0xd, %rbx
movsbl %cl, %edi
callq 0x2050
testl %eax, %eax
setne %al
je 0x6440
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x6420
jmp 0x6440
xorl %eax, %eax
jmp 0x6440
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movl 0x8(%rax), %eax
testl %edx, %edx
js 0x6467
cmpl %ebp, %eax
jg 0x6469
xorl %r15d, %r15d
movl %eax, %ebp
jmp 0x64b0
addl %eax, %ebp
testl %ecx, %ecx
je 0x64ad
movl %eax, %edx
subl %ebp, %edx
cmpl %ecx, %edx
movl %ecx, %r15d
cmovll %edx, %r15d
testl %ecx, %ecx
cmovsl %edx, %r15d
testl %ebp, %ebp
js 0x6496
cmpl %ebp, %eax
setle %al
testl %r15d, %r15d
sets %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x64b0
leaq 0x7d45(%rip), %rdi      # 0xe1e2
leaq 0x7cdd(%rip), %rsi      # 0xe181
xorl %eax, %eax
callq 0x286c
jmp 0x64b0
xorl %r15d, %r15d
leaq 0xdd99(%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 %r15d, %r15d
je 0x6508
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movq 0x20(%r14), %rax
movslq %ebp, %rcx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
movslq %r15d, %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 0x4d60
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
decl %eax
testl %eax, %eax
jle 0x6584
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 0x6559
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x66f0
movq 0x20(%rbx), %rax
cmpl $0x0, 0x8(%rax)
je 0x66f0
movq %rdx, %r15
movq %rsi, %r14
movq %rsi, %rdi
callq 0x2140
testq %rax, %rax
je 0x66f0
testq %r15, %r15
je 0x664c
cmpb $0x0, (%r15)
je 0x664c
movq %rax, %r12
movq %r15, %rdi
callq 0x2140
movl %r12d, %ecx
cmpq %rcx, %rax
je 0x65fc
leaq 0x7bf4(%rip), %rdi      # 0xe1e2
leaq 0x7b90(%rip), %rsi      # 0xe185
xorl %eax, %eax
callq 0x286c
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %r12
cmpl $0x0, 0x8(%r12)
jle 0x66f0
xorl %r13d, %r13d
movsbl 0xc(%r12,%r13), %esi
movq %r14, %rdi
callq 0x2100
testq %rax, %rax
je 0x663a
subq %r14, %rax
movb (%r15,%rax), %al
movb %al, 0xc(%r12,%r13)
movq 0x20(%rbx), %r12
incq %r13
movslq 0x8(%r12), %rax
cmpq %rax, %r13
jl 0x6617
jmp 0x66f0
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %rbp
movq 0x20(%rbx), %r13
addq $0xc, %r13
movq %rax, 0x10(%rsp)
addq $0xc, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x23f0
testq %rax, %rax
movq %rbp, 0x8(%rsp)
je 0x66be
movq %rax, %r12
movq %r12, %r15
subq %r13, %r15
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x21e0
movq %r12, %r13
incq %r13
addq %r15, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x23f0
movq %rax, %r12
testq %rax, %rax
jne 0x668e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x2220
movq %r13, %rdi
callq 0x2140
movb $0x0, (%rbp,%rax)
movq 0x8(%rsp), %rdi
callq 0x2140
movq 0x10(%rsp), %rsi
movl %eax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x4a92
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6a0f
movl %edx, %r14d
movl %esi, %ebp
movq %rbx, %rdi
callq 0x4a4c
testl %ebp, %ebp
jns 0x6976
movq 0x20(%rbx), %rax
addl 0x8(%rax), %ebp
cmpl $-0x1, %r14d
jne 0x6987
movq 0x20(%rbx), %rax
movl 0x8(%rax), %r14d
subl %ebp, %r14d
testl %ebp, %ebp
js 0x69a2
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
movl %edi, %eax
subl %ebp, %eax
jle 0x69a2
testl %r14d, %r14d
js 0x69a2
cmpl %eax, %r14d
jle 0x69be
leaq 0x7839(%rip), %rdi      # 0xe1e2
leaq 0x77da(%rip), %rsi      # 0xe18a
xorl %eax, %eax
callq 0x286c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
subl %r14d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
testl %ebp, %ebp
jle 0x69e2
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 0x4a92
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
testl %edx, %edx
jns 0x6a3d
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r14d
movq %rbx, %rdi
callq 0x4a4c
cmpl $-0x1, %ebp
jne 0x6a54
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ebp
subl %r14d, %ebp
testl %r14d, %r14d
js 0x6a6d
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
subl %r14d, %eax
jle 0x6a6d
testl %ebp, %ebp
js 0x6a6d
cmpl %eax, %ebp
jle 0x6a82
leaq 0x776e(%rip), %rdi      # 0xe1e2
leaq 0x7715(%rip), %rsi      # 0xe190
xorl %eax, %eax
callq 0x286c
movq 0x20(%r15), %rsi
movl 0x8(%rsi), %edi
movq 0x20(%rbx), %rax
subl %ebp, %edi
jne 0x6aaf
cmpl $0x1, (%rax)
jne 0x6aaf
movslq %r14d, %rcx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
addq $0xc, %rsi
movslq %ebp, %rdx
callq 0x21e0
jmp 0x6b2e
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r12
testl %r14d, %r14d
jle 0x6ad6
leaq 0xc(%r12), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %r14d, %edx
callq 0x21e0
movq 0x20(%r15), %rsi
movslq 0x8(%rsi), %rdx
testq %rdx, %rdx
jle 0x6afe
movslq %r14d, %rax
leaq (%r12,%rax), %rdi
addq $0xc, %rdi
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%r15), %rax
movl 0x8(%rax), %edx
addl %r14d, %edx
movslq %edx, %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 0x4a92
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
testl %r14d, %r14d
jns 0x6b62
movq 0x20(%rbx), %rax
addl 0x8(%rax), %r14d
cmpl $-0x1, %ebp
jne 0x6b71
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ebp
subl %r14d, %ebp
testl %r14d, %r14d
js 0x6b8a
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
subl %r14d, %eax
jle 0x6b8a
testl %ebp, %ebp
js 0x6b8a
cmpl %eax, %ebp
jle 0x6b9f
leaq 0x7651(%rip), %rdi      # 0xe1e2
leaq 0x75f8(%rip), %rsi      # 0xe190
xorl %eax, %eax
callq 0x286c
movq %r15, %rdi
callq 0x2140
movq %rax, %r12
movl %r12d, %edi
movq 0x20(%rbx), %rax
subl %ebp, %edi
jne 0x6bd2
cmpl $0x1, (%rax)
jne 0x6bd2
movslq %r14d, %rcx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
movslq %ebp, %rdx
movq %r15, %rsi
callq 0x21e0
jmp 0x6c49
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r13
testl %r14d, %r14d
jle 0x6bf8
leaq 0xc(%r13), %rdi
movq 0x20(%rbx), %rsi
addq $0xc, %rsi
movl %r14d, %edx
callq 0x21e0
testl %r12d, %r12d
jle 0x6c19
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 0x4a92
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_O3/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 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
testl %ebp, %ebp
jns 0x6c80
addl %eax, %ebp
js 0x6c84
cmpl %eax, %ebp
jl 0x6c99
leaq 0x7577(%rip), %rdi      # 0xe202
leaq 0x7508(%rip), %rsi      # 0xe19a
xorl %eax, %eax
callq 0x286c
movq 0x20(%r14), %rax
movl 0x8(%rax), %edi
testl %edi, %edi
jle 0x6d17
movq 0x20(%rbx), %rax
addl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r15
testl %ebp, %ebp
jle 0x6ccc
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 0x4a92
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %eax
testl %r14d, %r14d
jns 0x6d4e
addl %eax, %r14d
js 0x6d53
cmpl %eax, %r14d
jl 0x6d68
leaq 0x74a8(%rip), %rdi      # 0xe202
leaq 0x7439(%rip), %rsi      # 0xe19a
xorl %eax, %eax
callq 0x286c
movq %r15, %rdi
callq 0x2140
movq %rax, %r12
testl %r12d, %r12d
jle 0x6dee
movq 0x20(%rbx), %rax
movl 0x8(%rax), %edi
addl %r12d, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r13
testl %r14d, %r14d
jle 0x6da5
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 0x4a92
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_O3/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 0x4a4c
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edx
testl %edx, %edx
je 0x6e3f
movl 0x8(%rax), %ecx
leal 0x1(%rcx), %r14d
cmpl %edx, %r14d
jbe 0x6e74
movl %r14d, %esi
addq $0x10, %rsi
movq %rax, %rdi
callq 0x23d0
testq %rax, %rax
je 0x6e5b
movq %rax, 0x20(%rbx)
jmp 0x6e6d
movq %rbx, %rdi
movl $0x1, %esi
movl $0x6, %edx
callq 0x497c
movq 0x20(%rbx), %rax
movb %bpl, 0xc(%rax)
jmp 0x6e8c
leaq 0x71be(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
movq 0x20(%rbx), %rax
movl %r14d, 0x4(%rax)
movl 0x8(%rax), %ecx
movl %ecx, %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
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6eb8
leaq 0x72f8(%rip), %rsi      # 0xe1a3
movq %r14, %rdi
callq 0x23f0
testq %rax, %rax
je 0x6f09
movsbl %bpl, %esi
leal -0x3c(%rsi), %eax
cmpl $0x3f, %eax
ja 0x6eda
movabsq $-0x7fffffff7fffffff, %rcx # imm = 0x8000000080000001
btq %rax, %rcx
jae 0x6eda
addb $0x2, %bpl
jmp 0x6ee2
cmpl $0x28, %esi
jne 0x6ee2
movb $0x29, %bpl
movq %rbx, %rdi
callq 0x6e00
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52be
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x6e00
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52be
jmp 0x6f01
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
leal (%rcx,%r15), %ebp
cmpl %ecx, %ebp
jbe 0x7004
testl %ecx, %ecx
sete %sil
movl 0x4(%rax), %edx
cmpl %ebp, %edx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x6f7e
movq %rbx, %rdi
movl %r15d, %esi
movl $0x4, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x2180
jmp 0x7004
cmpl %edx, %ebp
jb 0x6fb5
movl %ebp, %esi
addq $0x11, %rsi
movq %rax, %rdi
callq 0x23d0
testq %rax, %rax
je 0x6f9b
movq %rax, 0x20(%rbx)
jmp 0x6fad
leaq 0x707e(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
movq 0x20(%rbx), %rax
incl %ebp
movl %ebp, 0x4(%rax)
movl 0x8(%rax), %ecx
movb (%r14), %dl
testb %dl, %dl
sete %sil
testl %r15d, %r15d
setle %dil
orb %sil, %dil
jne 0x6ffa
movl %r15d, %eax
xorl %esi, %esi
movq 0x20(%rbx), %rdi
movl 0x8(%rdi), %r8d
addl %esi, %r8d
movb %dl, 0xc(%rdi,%r8)
leaq 0x1(%rsi), %rdi
cmpq %rax, %rdi
jae 0x6ff4
movb 0x1(%r14,%rsi), %dl
movq %rdi, %rsi
testb %dl, %dl
jne 0x6fcf
movq 0x20(%rbx), %rax
addl %edi, %ecx
movl %ecx, 0x8(%rax)
movl %ecx, %ecx
movb $0x0, 0xc(%rax,%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
testl %edx, %edx
jle 0x70c5
movl %edx, %r15d
movq %rsi, %r14
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
testl %ecx, %ecx
je 0x7063
leal (%rcx,%r15), %r12d
movl %r12d, %r13d
cmpl 0x4(%rax), %r12d
jb 0x70a2
leaq 0x11(%r13), %rsi
movq %rax, %rdi
callq 0x23d0
testq %rax, %rax
je 0x7085
movq %rax, 0x20(%rbx)
jmp 0x7097
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movl %r15d, %edx
movq %r14, %rsi
callq 0x21e0
jmp 0x70c5
leaq 0x6f94(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
movq 0x20(%rbx), %rax
leal 0x1(%r12), %ecx
movl %ecx, 0x4(%rax)
movl 0x8(%rax), %ecx
movl %ecx, %ecx
leaq (%rax,%rcx), %rdi
addq $0xc, %rdi
movl %r15d, %edx
movq %r14, %rsi
callq 0x21e0
movq 0x20(%rbx), %rax
movl %r12d, 0x8(%rax)
movb $0x0, 0xc(%rax,%r13)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
movq 0x20(%rbx), %r14
movb 0xc(%r14), %al
testb %al, %al
je 0x7114
addq $0xd, %r14
movsbl %al, %edi
callq 0x2430
movb %al, -0x1(%r14)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x70fe
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4c
movq 0x20(%rbx), %r14
movb 0xc(%r14), %al
testb %al, %al
je 0x7152
addq $0xd, %r14
movsbl %al, %edi
callq 0x2380
movb %al, -0x1(%r14)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x713c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x719d
movq 0x20(%rdi), %rcx
movl 0x8(%rcx), %edi
testl %edi, %edi
sete %r8b
cmpl %edx, %edi
setle %r9b
orb %r8b, %r9b
jne 0x719d
decl %edi
testl %edx, %edx
cmovnsl %edx, %edi
testl %edi, %edi
js 0x719d
movl %edi, %edx
cmpb %sil, 0xc(%rcx,%rdx)
je 0x719e
leal -0x1(%rdi), %edx
testl %edi, %edi
movl %edx, %edi
jg 0x718b
retq
movl %edi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x723d
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0x723d
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 0x723d
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 0x723d
subl %eax, %r13d
incl %r13d
js 0x723d
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 0x723a
leal -0x1(%r13), %eax
decq %r12
testl %r13d, %r13d
movl %eax, %r13d
jg 0x7217
jmp 0x723d
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_O3/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 0xcfe7(%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 0x54be
movl %eax, %r15d
testl %eax, %eax
js 0x72dc
movq %r12, %rdi
callq 0x2140
leal (%rax,%r15), %edx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x6442
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4e58
movq %rsp, %rdi
callq 0x4d60
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x694c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x4d60
jmp 0x72fd
jmp 0x72fa
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xcf2c(%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 0x55c4
movl %eax, %r15d
testl %eax, %eax
js 0x7394
leal 0x1(%r15), %edx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x6442
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4e58
leaq 0x8(%rsp), %rdi
callq 0x4d60
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x694c
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4d60
jmp 0x73b5
jmp 0x73b2
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d60
movq %r14, %rdi
callq 0x2400
nop