LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: rstrstr(char const*, char const*, char const*)
char* rstrstr(const char* rstart, const char *lend, const char* substr) {
 //like strstr, but starts searching from right end, going up to lend and
 //returns a pointer to the last (right) matching character in str
 char *p;
 int l,i;
 l=strlen(substr);
 p=(char*)rstart-l+1;
 while (p>=lend) {
    for (i=0;i<l;i++) if (*(p+i) != *(substr+i)) break;
    if (i==l) return p+l-1;
    p--;
    }
 return NULL;
 }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2140
movslq %eax, %rdx
subq %rdx, %r14
incq %r14
cmpq %r15, %r14
jae 0x3d55
xorl %ecx, %ecx
jmp 0x3d93
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movl $0x0, %edi
testl %eax, %eax
jle 0x3d7e
xorl %edi, %edi
movb (%r14,%rdi), %r8b
cmpb (%rbx,%rdi), %r8b
jne 0x3d7e
incq %rdi
cmpq %rdi, %rsi
jne 0x3d6a
jmp 0x3d8c
cmpl %eax, %edi
je 0x3d8c
decq %r14
cmpq %r15, %r14
jae 0x3d5f
jmp 0x3d93
leaq (%r14,%rdx), %rcx
decq %rcx
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: strhash(char const*)
int strhash(const char* str){
  int h=0;
  int g;
  while (*str) {
    h=(h<<4)+*str++;
    g=h&0xF0000000;
    if(g) h^=g>>24;
    h&=0x0fffffff;
    }
  GASSERT(h<=0x0fffffff);
  return h;
  }

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x3dcd
incq %rdi
xorl %edx, %edx
shll $0x4, %edx
movsbl %cl, %eax
addl %edx, %eax
movl %eax, %ecx
sarl $0x18, %ecx
andl $0xffffff0, %ecx        # imm = 0xFFFFFF0
andl $0xfffffff, %eax        # imm = 0xFFFFFFF
xorl %ecx, %eax
movb (%rdi), %cl
incq %rdi
movl %eax, %edx
testb %cl, %cl
jne 0x3da7
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: djb_hash(char const*)
int djb_hash(const char* cp)
{
    int h = 5381;
    while (*cp)
        h = (int)(33 * h ^ (unsigned char) *cp++);
    return (h & 0x7FFFFFFF); //always positive
    //return h;
    //return absolute value of this int:
    //int mask = (h >> (sizeof(int) * CHAR_BIT - 1));
    //return (h + mask) ^ mask;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x3df9
incq %rdi
movl $0x1505, %eax           # imm = 0x1505
movl %eax, %edx
shll $0x5, %edx
addl %eax, %edx
movzbl %cl, %eax
xorl %edx, %eax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x3dde
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
retq
movl $0x1505, %eax           # imm = 0x1505
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: delFileName(char*)
void delFileName(char* filepath) {
 char *p, *sep;
 if (filepath==NULL) return;
 for (p=filepath, sep=filepath;*p!='\0';p++)
     if (*p=='/' || *p=='\\') sep=p+1;
 *sep='\0'; // truncate filepath
}

// Assembly:
testq %rdi, %rdi
je 0x3e3a
leaq 0x1(%rdi), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x2f, %ecx
je 0x3e2f
cmpl $0x5c, %ecx
je 0x3e2f
testl %ecx, %ecx
jne 0x3e32
jmp 0x3e37
movq %rax, %rdi
incq %rax
jmp 0x3e1b
movb $0x0, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: getFileExt(char const*)
const char* getFileExt(const char* filepath) {
 const char *p, *dp, *sep;
 if (filepath==NULL) return NULL;
 for (p=filepath, dp=filepath, sep=filepath;*p!='\0';p++) {
     if (*p=='.') dp=p+1;
       else if (*p=='/' || *p=='\\')
                  sep=p+1;
     }
 return (dp>sep) ? dp : NULL ;
}

// Assembly:
testq %rdi, %rdi
je 0x3ea4
leaq 0x1(%rdi), %rax
movq %rdi, %rcx
movzbl -0x1(%rax), %edx
cmpl $0x2e, %edx
jle 0x3e8a
cmpl $0x2f, %edx
je 0x3e85
cmpl $0x5c, %edx
jne 0x3e95
movq %rax, %rcx
jmp 0x3e95
jne 0x3e91
movq %rax, %rdi
jmp 0x3e95
testl %edx, %edx
je 0x3e9a
incq %rax
jmp 0x3e72
xorl %eax, %eax
cmpq %rcx, %rdi
cmovaq %rdi, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: parseNumber(char*&, double&)
bool parseNumber(char* &p, double& v) {
 //skip any spaces..
 while (*p==' ' || *p=='\t') p++;
 char* start=p;
 /*if (*p=='-') p++;
       else if (*p=='+') { p++;start++; }*/

 /* while ((*p>='1' && *p<='9') || *p=='0' ||
          *p=='.' || *p=='-' || tolower(*p)=='e') p++; */
 int numlen=strspn(start, "0123456789eE.-+");
 p=start+numlen;
 //now p is on a non-digit;
 if (*start=='-' && p==start+1) return false;
 char saved=*p;
 *p='\0';
 char* endptr=p;
 v=strtod(start,&endptr);
 *p=saved;
 if (endptr!=p) return false;
 return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movzbl (%r15), %eax
cmpl $0x20, %eax
je 0x3ef4
cmpl $0x9, %eax
jne 0x3efc
incq %r15
movq %r15, (%rbx)
jmp 0x3ee6
leaq 0xa1bc(%rip), %rsi      # 0xe0bf
movq %r15, %rdi
callq 0x2120
movslq %eax, %rcx
shlq $0x20, %rax
addq %r15, %rcx
movq %rcx, (%rbx)
cmpb $0x2d, (%r15)
sete %dl
movabsq $0x100000000, %rsi      # imm = 0x100000000
cmpq %rsi, %rax
sete %al
testb %al, %dl
je 0x3f37
xorl %eax, %eax
jmp 0x3f69
movb (%rcx), %bpl
movb $0x0, (%rcx)
movq (%rbx), %rax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movsd %xmm0, (%r14)
movq (%rbx), %rax
movb %bpl, (%rax)
movq (%r12), %rax
cmpq (%rbx), %rax
sete %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: parseFloat(char*&, float&)
bool parseFloat(char* &p, float& v) {
 double dv;
 bool parsed=parseNumber(p,dv);
 if (parsed) v=(float)dv;
 return parsed;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x3ed1
testb %al, %al
je 0x3f9b
cvtsd2ss 0x8(%rsp), %xmm0
movss %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: parseInt(char*&, int&)
bool parseInt(char* &p, int& i) { //pointer p is advanced after the number
 while (*p==' ' || *p=='\t') p++;
 char* start=p;
 char* p0=p;
 if (*p=='-') p++;
      else if (*p=='+') { p++;start++; }
 char* atdigits=p;
 while (*p>='0' && *p<='9') p++;
 //now p should be past the digits
 if (atdigits==p) {//no digits found!
	 p=p0;
	 return false;
 }
 char* endptr=NULL;
 long l=strtol(start,&endptr,10);
 i=(int)l;
 if (endptr!=p || endptr==start || i!=l) {
	 p=p0;
	 return false;
 }
 return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r13
movzbl (%r13), %eax
cmpl $0x1f, %eax
jle 0x3fc8
cmpl $0x20, %eax
je 0x3fcd
jmp 0x3fd5
cmpl $0x9, %eax
jne 0x3ff4
incq %r13
movq %r13, (%rbx)
jmp 0x3fb7
cmpl $0x2b, %eax
je 0x3fe8
cmpl $0x2d, %eax
jne 0x3ff4
leaq 0x1(%r13), %rax
movq %r13, %r15
jmp 0x3fef
leaq 0x1(%r13), %rax
movq %rax, %r15
movq %rax, (%rbx)
jmp 0x3ffa
movq %r13, %rax
movq %r13, %r15
movb (%rax), %dl
addb $-0x30, %dl
movq %rax, %rcx
cmpb $0x9, %dl
ja 0x401e
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
movb (%rcx), %dl
addb $-0x30, %dl
incq %rcx
cmpb $0xa, %dl
jb 0x400b
decq %rcx
cmpq %rcx, %rax
je 0x4068
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x2360
movl %eax, (%r14)
movq (%r12), %rcx
movq (%rbx), %rdx
xorq %rcx, %rdx
cmpq %r15, %rcx
setne %cl
movslq %eax, %rsi
xorq %rax, %rsi
orq %rdx, %rsi
sete %al
andb %cl, %al
jne 0x406d
movq %r13, (%rbx)
jmp 0x406d
movq %r13, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: strToInt(char*, int&)
bool strToInt(char* p, int& i) {
	 while (*p==' ' || *p=='\t') p++;
	 char* start=p;
	 if (*p=='-') p++;
	      else if (*p=='+') { p++;start++; }
	 char* atdigits=p;
	 while (*p>='0' && *p<='9') p++;
	 //now p should be past the digits
	 if (atdigits==p) //no digits found!
		 return false;
	 char* endptr=NULL;
	 long l=strtol(start,&endptr,10);
	 i=(int)l;
	 if (endptr!=p || endptr==start || i!=l)
		 return false;
	 return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rbx), %eax
cmpl $0x1f, %eax
jle 0x4098
cmpl $0x20, %eax
je 0x409d
jmp 0x40a2
cmpl $0x9, %eax
jne 0x40b5
incq %rbx
jmp 0x4089
cmpl $0x2b, %eax
je 0x40b2
cmpl $0x2d, %eax
jne 0x40b5
leaq 0x1(%rbx), %r12
jmp 0x40b8
incq %rbx
movq %rbx, %r12
decq %r12
movl $0x1, %eax
movb 0x1(%r12), %cl
incq %r12
addb $-0x30, %cl
decq %rax
cmpb $0xa, %cl
jb 0x40c0
testq %rax, %rax
je 0x4111
movq %rsp, %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2360
movl %eax, (%r14)
movq (%r15), %rcx
xorq %rcx, %r12
cmpq %rbx, %rcx
setne %cl
movslq %eax, %rdx
xorq %rax, %rdx
orq %r12, %rdx
sete %al
andb %cl, %al
jmp 0x4113
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: strToUInt(char*, unsigned int&)
bool strToUInt(char* p, uint& i) {
	while (*p==' ' || *p=='\t') p++;
	char* start=p;
	if (*p=='-') return false;
	else if (*p=='+') { p++;start++; }
	while (*p>='0' && *p<='9') p++;
	//now p is on a non-digit;
	if (start==p) return false;
	char* endptr=NULL;
	unsigned long l=strtoul(start,&endptr,10);
	i=(uint) l;
	if (endptr!=p || endptr==start || i!=l)
		return false;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movzbl (%rdi), %eax
cmpl $0x1f, %eax
jle 0x413a
cmpl $0x20, %eax
je 0x413f
jmp 0x4144
cmpl $0x9, %eax
jne 0x4153
incq %rdi
jmp 0x412b
cmpl $0x2b, %eax
je 0x4150
cmpl $0x2d, %eax
je 0x419a
jmp 0x4153
incq %rdi
xorl %eax, %eax
movb (%rdi,%rax), %cl
addb $-0x30, %cl
incq %rax
cmpb $0xa, %cl
jb 0x4155
cmpq $0x1, %rax
je 0x419a
leaq (%rdi,%rax), %r15
decq %r15
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq %r14, %rsi
movl $0xa, %edx
callq 0x20d0
movl %eax, (%rbx)
xorq (%r14), %r15
shrq $0x20, %rax
orq %r15, %rax
sete %al
jmp 0x419c
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: parseUInt(char*&, unsigned int&)
bool parseUInt(char* &p, uint& i) { //pointer p is advanced after the number
 while (*p==' ' || *p=='\t') p++;
 char* p0=p;
 char* start=p;
 if (*p=='-') return false;
       else if (*p=='+') { p++;start++; }
 while (*p>='0' && *p<='9') p++;
 //now p is on a non-digit;
 if (start==p) {
	 p=p0;
	 return false;
 }
 char* endptr=NULL;
 unsigned long l=strtoul(start,&endptr,10);
 i=(uint) l;
 if (endptr!=p || endptr==start || i!=l) {
	 p=p0;
	 return false;
 }
 return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r13
incq %r13
movb -0x1(%r13), %al
movzbl %al, %ecx
cmpl $0x1f, %ecx
jle 0x41d2
cmpl $0x20, %ecx
je 0x41d7
jmp 0x41dc
cmpl $0x9, %ecx
jne 0x41e6
movq %r13, (%rbx)
jmp 0x41bc
cmpl $0x2b, %ecx
je 0x41ec
cmpl $0x2d, %ecx
je 0x4262
leaq -0x1(%r13), %r15
jmp 0x41f6
movq %r13, (%rbx)
movb (%r13), %al
movq %r13, %r15
addb $-0x30, %al
movq %r15, %rcx
cmpb $0x9, %al
ja 0x4214
leaq 0x1(%r15), %rcx
movq %rcx, (%rbx)
movb (%rcx), %al
addb $-0x30, %al
incq %rcx
cmpb $0xa, %al
jb 0x4203
decq %rcx
decq %r13
cmpq %rcx, %r15
je 0x425f
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x20d0
movl %eax, (%r14)
movq (%r12), %rcx
movq (%rbx), %rdx
xorq %rcx, %rdx
cmpq %r15, %rcx
setne %cl
shrq $0x20, %rax
orq %rdx, %rax
sete %al
andb %cl, %al
jne 0x4264
movq %r13, (%rbx)
jmp 0x4264
movq %r13, (%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: parseHex(char*&, unsigned int&)
bool parseHex(char* &p, uint& i) {
 //skip initial spaces/prefix
 while (*p==' ' || *p=='\t' || *p=='0' || *p=='x') p++;
 char* start=p;
 if (*p=='-') return false;
       else if (*p=='+') { p++;start++; }
 while (isxdigit(*p)) p++;
 //now p is on a non-hexdigit;
 if (p==start+1) return false;
 char saved=*p;
 *p='\0';
 char* endptr=p;
 unsigned long l=strtoul(start,&endptr,16);
 i=(uint) l;
 *p=saved;
 if (endptr!=p || i!=l) return false;
 return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
incq %r15
movb -0x1(%r15), %bpl
movzbl %bpl, %eax
cmpl $0x2c, %eax
jg 0x42a2
cmpl $0x9, %eax
je 0x42ac
cmpl $0x20, %eax
je 0x42ac
jmp 0x42b1
cmpl $0x30, %eax
je 0x42ac
cmpl $0x78, %eax
jne 0x42be
movq %r15, (%r14)
jmp 0x4286
cmpl $0x2b, %eax
jne 0x42c3
movq %r15, (%r14)
movb (%r15), %bpl
jmp 0x42c6
cmpl $0x2d, %eax
je 0x42fc
decq %r15
movsbl %bpl, %edi
callq 0x20a0
testl %eax, %eax
je 0x4300
leaq 0x1(%r15), %r13
xorl %r12d, %r12d
leaq (%r12,%r13), %rax
movq %rax, (%r14)
movb (%r13,%r12), %bpl
incq %r12
movsbl %bpl, %edi
callq 0x20a0
testl %eax, %eax
jne 0x42da
cmpq $0x1, %r12
jne 0x4303
xorl %eax, %eax
jmp 0x433c
xorl %r12d, %r12d
movb $0x0, (%r15,%r12)
movq (%r14), %rax
movq %rsp, %r12
movq %rax, (%r12)
movq %r15, %rdi
movq %r12, %rsi
movl $0x10, %edx
callq 0x20d0
movl %eax, (%rbx)
movq (%r14), %rcx
movb %bpl, (%rcx)
movq (%r12), %rcx
xorq (%r14), %rcx
movl (%rbx), %edx
xorq %rax, %rdx
orq %rcx, %rdx
sete %al
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/GBase.cpp
// Function: writeFasta(_IO_FILE*, char const*, char const*, char const*, int, int)
void writeFasta(FILE *fw, const char* seqid, const char* descr,
        const char* seq, int linelen, int seqlen) {
  fflush(fw);
  // write header line only if given!
  if (seqid!=NULL) {
    if (descr==NULL || descr[0]==0)
             fprintf(fw,">%s\n",seqid);
        else fprintf(fw,">%s %s\n",seqid, descr);
    }
  fflush(fw);
  if (seq==NULL || *seq==0) return; //nothing to print
  if (linelen==0) { //unlimited line length: write the whole sequence on a line
     if (seqlen>0)
             fwrite((const void*)seq, 1, seqlen,fw);
        else fprintf(fw,"%s",seq);
     fprintf(fw,"\n");
     fflush(fw);
     return;
     }
  int ilen=0;
  if (seqlen>0) { //seq length given, so we know when to stop
    for (int i=0; i < seqlen; i++, ilen++) {
            if (ilen == linelen) {
                 fputc('\n', fw);
                 ilen = 0;
                 }
            fputc(seq[i], fw);
            }
    fputc('\n', fw);
    }
  else { //seq length not given, stop when 0 encountered
    for (int i=0; seq[i]!=0; i++, ilen++) {
            if (ilen == linelen) {
                 fputc('\n', fw);
                 ilen = 0;
                 }
            fputc(seq[i], fw);
            } //for
    fputc('\n', fw);
    }
  fflush(fw);
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r15d
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
callq 0x22c0
testq %r12, %r12
je 0x43ab
testq %r13, %r13
je 0x4397
cmpb $0x0, (%r13)
je 0x4397
leaq 0x9d4f(%rip), %rsi      # 0xe0d4
movq %rbx, %rdi
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2370
jmp 0x43ab
leaq 0x9d31(%rip), %rsi      # 0xe0cf
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2370
movq %rbx, %rdi
callq 0x22c0
testq %r14, %r14
je 0x4400
movb (%r14), %al
testb %al, %al
je 0x4400
testl %ebp, %ebp
je 0x440f
testl %r15d, %r15d
jle 0x4429
movl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl %ebp, %r13d
jne 0x43e6
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2300
xorl %r13d, %r13d
movsbl (%r14,%r12), %edi
movq %rbx, %rsi
callq 0x2300
incq %r12
incl %r13d
cmpq %r12, %r15
jne 0x43d1
jmp 0x446d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
jle 0x4462
movl %r15d, %edx
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rcx
callq 0x2450
jmp 0x446d
incq %r14
xorl %r15d, %r15d
cmpl %ebp, %r15d
jne 0x4448
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2300
movb -0x1(%r14), %al
xorl %r15d, %r15d
movsbl %al, %edi
movq %rbx, %rsi
callq 0x2300
incl %r15d
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x442f
jmp 0x446d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22b0
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2300
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22c0
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GBase.cpp
// Function: commaprintnum(unsigned long)
char* commaprintnum(uint64 n) {
  char retbuf[48];
  int comma = ',';
  char *p = &retbuf[sizeof(retbuf)-1];
  int i = 0;
  *p = '\0';
  do {
    if(i%3 == 0 && i != 0)
        *--p = comma;
    *--p = '0' + n % 10;
    n /= 10;
    i++;
  } while(n != 0);
  return Gstrdup(p);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, %rcx
leaq 0x2f(%rsp), %rdi
movb $0x0, (%rdi)
xorl %esi, %esi
movl $0xaaaaaaab, %r8d       # imm = 0xAAAAAAAB
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
xorl %r10d, %r10d
movl %esi, %eax
addl $-0x1, %esi
jae 0x44d4
movl %r10d, %edx
imulq %r8, %rdx
shrq $0x21, %rdx
leal (%rdx,%rdx,2), %edx
addl %edx, %eax
jne 0x44d4
movb $0x2c, -0x1(%rdi)
decq %rdi
movq %rcx, %rax
mulq %r9
shrq $0x3, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
movl %ecx, %r11d
subl %eax, %r11d
orb $0x30, %r11b
movb %r11b, -0x1(%rdi)
decq %rdi
incl %r10d
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x44b4
xorl %esi, %esi
callq 0x2906
addq $0x38, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/./GBase.h
// Function: GDynArray<char*>::Grow()
void Grow() {
    	int delta = (fCapacity>16) ? (fCapacity>>2) : 2;
    	if (GDynArray_MAXCOUNT-delta<=fCapacity)
    		delta=GDynArray_MAXCOUNT-fCapacity;
    	if (delta<=1) GError("Error at GDynArray::Grow(): max capacity reached!\n");
    	growTo(fCapacity + delta);
    }

// Assembly:
movl 0x1c(%rdi), %esi
movl %esi, %eax
shrl $0x2, %eax
cmpl $0x11, %esi
movl $0x2, %ecx
cmovael %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
subl %ecx, %edx
subl %esi, %eax
cmpl %esi, %edx
cmoval %ecx, %eax
cmpl $0x1, %eax
jle 0x46dc
addl %eax, %esi
jmp 0x46ec
pushq %rax
leaq 0x9a35(%rip), %rdi      # 0xe119
xorl %eax, %eax
callq 0x286c
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/./GBase.h
// Function: GDynArray<char*>::growTo(unsigned int)
void growTo(uint newcap) {
    	if (newcap==0) { Clear(); return; }
    	if (newcap <= fCapacity) return; //never shrink! (use Pack() for shrinking)
    	GREALLOC(fArray, newcap*sizeof(OBJ));
    	fCapacity=newcap;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4713
movl %esi, %ebp
cmpl %esi, 0x1c(%rbx)
jae 0x4735
movl %ebp, %esi
shlq $0x3, %rsi
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4721
callq 0x23d0
jmp 0x4729
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x474a
movq %rsi, %rdi
callq 0x2330
testq %rax, %rax
je 0x473c
movq %rax, 0x10(%rbx)
movl %ebp, 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x98dd(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/./GBase.h
// Function: GDynArray<char*>::Clear()
void Clear() { // clear array, shrinking its allocated memory
    	fCount = 0;
    	GREALLOC(fArray, sizeof(OBJ)*dyn_array_defcap);
    	// set initial memory size again
    	fCapacity = dyn_array_defcap;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x18(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x476a
movl $0x80, %esi
callq 0x23d0
jmp 0x4774
movl $0x80, %edi
callq 0x2330
testq %rax, %rax
je 0x4786
movq %rax, 0x10(%rbx)
movl $0x10, 0x1c(%rbx)
popq %rbx
retq
leaq 0x9893(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::new_data(unsigned int, unsigned int)
GStr::Data * GStr::new_data(uint len, uint addcap) {
//static method to return a new Data object (allocate length)
//content is undefined, but it's null terminated
    if (len > 0) {
        Data* data;
        GMALLOC(data, sizeof(Data)+len+addcap);
        data->ref_count = 0;
        data->length = len;
        data->cap=len+addcap;
        data->chars[len] = '\0';
        return data;
        }
    else
        return &null_data;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
je 0x48cc
movl %esi, %ebx
movl %edi, %ebp
movl %edi, %r15d
movl %esi, %eax
leaq (%r15,%rax), %rdi
addq $0x10, %rdi
callq 0x2330
movq %rax, %r14
testq %rax, %rax
jne 0x48b3
leaq 0x9774(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
movl $0x0, (%r14)
movl %ebp, 0x8(%r14)
addl %ebp, %ebx
movl %ebx, 0x4(%r14)
movb $0x0, 0xc(%r14,%r15)
jmp 0x48d3
leaq 0xf97d(%rip), %r14      # 0x14250
movq %r14, %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::new_data(char const*, unsigned int)
GStr::Data* GStr::new_data(const char* str, uint addcap) {
//static method to return a new Data object (allocate: length+addcap)
//as a copy of a given string
 //if (str==NULL) return &null_data;
 int len= (str==NULL)? 0 : strlen(str);
 if (len+addcap > 0) {
        Data* data;
        GMALLOC(data, sizeof(Data)+len+addcap);
        if (len) strcpy(data->chars, str);
        data->ref_count = 0;
        data->cap=len+addcap;
        data->length = len;
        data->chars[len] = '\0';
        return data;
        }
    else
        return &null_data;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testq %rdi, %rdi
je 0x4904
movq %rbx, %rdi
callq 0x2140
movq %rax, %r14
jmp 0x4907
xorl %r14d, %r14d
movl %r14d, %r12d
addl %ebp, %r12d
je 0x4963
movslq %r14d, %r13
movl %ebp, %edi
addq %r13, %rdi
addq $0x10, %rdi
je 0x492a
callq 0x2330
movq %rax, %r15
testq %rax, %rax
jne 0x493b
leaq 0x96ef(%rip), %rdi      # 0xe020
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x286c
testl %r14d, %r14d
je 0x494c
leaq 0xc(%r15), %rdi
movq %rbx, %rsi
callq 0x2220
movl $0x0, (%r15)
movl %r12d, 0x4(%r15)
movl %r14d, 0x8(%r15)
movb $0x0, 0xc(%r15,%r13)
jmp 0x496a
leaq 0xf8e6(%rip), %r15      # 0x14250
movq %r15, %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::prep_data(unsigned int, unsigned int)
void GStr::prep_data(uint len, uint addcap) {
	uint newcap=len+addcap;
    if (newcap > 0 && my_data->ref_count <= 1 &&
    	   my_data->cap>=newcap && my_data->cap-newcap<(newcap>>1)+2) {
    	//no need to shrink/reallocate the already allocated space
    	my_data->length = len;
    	my_data->chars[len]=0;
        return;
    }
    if (my_data != &null_data && --my_data->ref_count == 0)
        GFREE(my_data);

    if (len + addcap> 0) {
        GMALLOC(my_data, sizeof(Data)+len+addcap);
        my_data->ref_count = 1;
        my_data->length = len;
        my_data->cap=len+addcap;
        my_data->chars[len] = 0;
    }
    else
        my_data = &null_data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %edx, %r15d
movq 0x20(%rdi), %rdi
addl %esi, %r15d
je 0x49bc
cmpl $0x1, (%rdi)
ja 0x49bc
movl 0x4(%rdi), %eax
subl %r15d, %eax
jb 0x49bc
movl %r15d, %ecx
shrl %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jae 0x49bc
movl %ebx, 0x8(%rdi)
movl %ebx, %eax
movb $0x0, 0xc(%rdi,%rax)
jmp 0x4a1c
leaq 0xf88d(%rip), %r12      # 0x14250
cmpq %r12, %rdi
je 0x49d1
decl (%rdi)
jne 0x49d1
callq 0x22e0
testl %r15d, %r15d
je 0x4a18
movl %ebx, %r12d
movl %ebp, %eax
leaq (%r12,%rax), %rdi
addq $0x10, %rdi
callq 0x2330
movq %rax, 0x20(%r14)
testq %rax, %rax
jne 0x4a03
leaq 0x9628(%rip), %rdi      # 0xe020
xorl %eax, %eax
callq 0x286c
movq 0x20(%r14), %rax
movl $0x1, (%rax)
movl %ebx, 0x8(%rax)
movl %r15d, 0x4(%rax)
movb $0x0, 0xc(%rax,%r12)
jmp 0x4a1c
movq %r12, 0x20(%r14)
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::make_unique()
void GStr::make_unique() {//make sure it's not a reference to other string
    if (my_data->ref_count > 1) {
        Data *data = new_data(my_data->length, 0);
        ::memcpy(data->chars, my_data->chars, my_data->length);
        my_data->ref_count--;
        my_data = data;
        my_data->ref_count++;
    }
}

// Assembly:
movq 0x20(%rdi), %rax
cmpl $0x2, (%rax)
jb 0x4a91
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rax), %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r14
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rsi
movl 0x8(%rsi), %edx
addq $0xc, %rsi
callq 0x21e0
movq 0x20(%rbx), %rax
decl (%rax)
movq %r14, 0x20(%rbx)
incl (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::replace_data(GStr::Data*)
void GStr::replace_data(Data *data) {
    if (my_data != &null_data && --my_data->ref_count == 0)
        GFREE(my_data);
    if (data != &null_data)
        data->ref_count++;
    my_data = data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
leaq 0xf7a8(%rip), %r15      # 0x14250
cmpq %r15, %rdi
je 0x4ab6
decl (%rdi)
jne 0x4ab6
callq 0x22e0
cmpq %r15, %rbx
je 0x4abd
incl (%rbx)
movq %rbx, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::detach()
char* GStr::detach() {
 make_unique();
 char *r=my_data->chars;
 my_data=&null_data;
 fTokenDelimiter=NULL;
 fTokenizeMode=tkCharSet;
 fLastTokenStart=0;
 readbuf=NULL;
 readbufsize=0;
 return r;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4a4c
movq 0x20(%rbx), %rax
addq $0xc, %rax
leaq 0xf6b6(%rip), %rcx      # 0x14250
movq %rcx, 0x20(%rbx)
movq $0x0, (%rbx)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::GStr(char const*, unsigned int)
GStr::GStr(const char *s, uint addcap): my_data(&null_data) {
  fTokenDelimiter=NULL;
  fTokenizeMode=tkCharSet;
  fLastTokenStart=0;
  readbuf=NULL;
  readbufsize=0;
  my_data=new_data(s, addcap);
  my_data->ref_count = 1;
 }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xf659(%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
callq 0x48e2
movq %rax, 0x20(%rbx)
movl $0x1, (%rax)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::GStr(int, unsigned int)
GStr::GStr(const int i, uint addcap): my_data(&null_data) {
 fTokenDelimiter=NULL;
 fTokenizeMode=tkCharSet;
 fLastTokenStart=0;
 readbuf=NULL;
 readbufsize=0;
 char buf[20];
 sprintf(buf,"%d",i);
 my_data=new_data(buf, addcap);
 }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movl %esi, %edx
movq %rdi, %r14
leaq 0xf60b(%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)
leaq 0x94fd(%rip), %rsi      # 0xe169
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2080
movq %r15, %rdi
movl %ebx, %esi
callq 0x48e2
movq %rax, 0x20(%r14)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::GStr(double)
GStr::GStr(const double f): my_data(&null_data) {
 fTokenDelimiter=NULL;
 fTokenizeMode=tkCharSet;
 fLastTokenStart=0;
 readbuf=NULL;
 readbufsize=0;
 char buf[20];
 sprintf(buf,"%f",f);
 const int len = ::strlen(buf);
 prep_data(len);
 ::memcpy(chrs(), buf, len);
 }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xf5ab(%rip), %rax      # 0x14250
movq %rax, 0x20(%rdi)
movq $0x0, (%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x8(%rdi)
xorps %xmm1, %xmm1
movups %xmm1, 0x10(%rdi)
leaq 0x94a0(%rip), %rsi      # 0xe16c
movq %rsp, %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2080
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::GStr(char, int)
GStr::GStr(const char c, int n): my_data(&null_data) {
  fTokenDelimiter=NULL;
  fTokenizeMode=tkCharSet;
  fLastTokenStart=0;
  readbuf=NULL;
  readbufsize=0;
  prep_data(n);
  ::memset(chrs(), c, n);
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xf530(%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 %edx, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%r14), %rdi
addq $0xc, %rdi
movslq %ebx, %rdx
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2190
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::~GStr()
GStr::~GStr() {
  if (my_data != &null_data && --my_data->ref_count == 0)
             GFREE(my_data);
  GFREE(fTokenDelimiter);
  GFREE(readbuf);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
leaq 0xf4e1(%rip), %rax      # 0x14250
cmpq %rax, %rdi
je 0x4d85
decl (%rdi)
jne 0x4d85
callq 0x22e0
movq $0x0, 0x20(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d92
callq 0x22e0
movq $0x0, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4da7
callq 0x22e0
movq $0x0, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::peelIntR() const
char& GStr::operator[](int idx){
//returns reference to char (can be l-value)
  if (idx < 0) idx += length();
  if (idx < 0 || idx >= length()) invalid_index_error("operator[]");
  make_unique();  //because the user will probably modify this char!
  return chrs()[idx];
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x20(%rdi), %rcx
movl 0x8(%rcx), %edi
testq %rdi, %rdi
je 0x7c65
testl %edi, %edi
jle 0x7c65
leaq 0xc(%rcx), %rsi
movq %rdi, %r8
shlq $0x20, %r8
xorl %edx, %edx
movabsq $-0x100000000, %r9      # imm = 0xFFFFFFFF00000000
xorl %eax, %eax
xorl %r11d, %r11d
movsbl 0xb(%rcx,%rdi), %ebx
addl $-0x30, %ebx
cmpl $0xa, %ebx
setb %r10b
testb $0x1, %r11b
je 0x7c10
cmpl $0xa, %ebx
jae 0x7c32
movb $0x1, %r10b
movl $0x1, %r11d
jmp 0x7c1a
xorl %r11d, %r11d
cmpl $0xa, %ebx
setb %r11b
decq %rdi
addl %r11d, %eax
addq %r9, %r8
leaq 0x1(%rdi), %rbx
movl %r10d, %r11d
cmpq $0x1, %rbx
ja 0x7beb
jmp 0x7c39
sarq $0x20, %r8
movq %r8, %rdx
testl %eax, %eax
jle 0x7c65
addq %rdx, %rsi
movl %eax, %ebx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2180
movb $0x0, (%rsp,%rbx)
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2360
jmp 0x7c67
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator[](int) const
char GStr::operator[](int idx) const {
//returns char copy (cannot be l-value!)
  if (idx < 0) idx += length();
  if (idx < 0 || idx >= length()) invalid_index_error("operator[]");
  return my_data->chars[idx];
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x20(%rdi), %rax
movl 0x8(%rax), %ecx
testl %esi, %esi
jns 0x4e2c
addl %ecx, %ebx
js 0x4e30
cmpl %ecx, %ebx
jl 0x4e49
leaq 0x93cb(%rip), %rdi      # 0xe202
leaq 0x9331(%rip), %rsi      # 0xe16f
xorl %eax, %eax
callq 0x286c
movq 0x20(%r14), %rax
movslq %ebx, %rcx
movb 0xc(%rax,%rcx), %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator=(GStr const&)
GStr& GStr::operator=(const GStr& s) {
  if (s.my_data!=my_data) {
    make_unique(); //edit operation ahead
    replace_data(s.my_data);
  }
  return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rsi), %rax
cmpq 0x20(%rdi), %rax
je 0x4e80
movq %rsi, %r14
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4a92
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::operator=(char const*)
GStr& GStr::operator=(const char *s) {
  make_unique(); //edit operation ahead
  if (s==NULL) {
    prep_data(0);
    return *this;
  }
  const int len = ::strlen(s); prep_data(len);
  ::memcpy(my_data->chars, s, len);
  return *this;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4a4c
testq %r14, %r14
je 0x4ece
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
jmp 0x4eeb
movq 0x20(%rbx), %rdi
leaq 0xf377(%rip), %r14      # 0x14250
cmpq %r14, %rdi
je 0x4ee7
decl (%rdi)
jne 0x4ee7
callq 0x22e0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::assign(char const*)
GStr& GStr::assign(const char* s) {
  make_unique(); //edit operation ahead
  if (s==NULL) {
    prep_data(0, my_data->cap);
    return *this;
  }
  const int len = ::strlen(s);
  prep_data(len, my_data->cap-len-2);
  ::memcpy(my_data->chars, s, len);
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4a4c
testq %r14, %r14
je 0x4f41
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edx
subl %r15d, %edx
addl $-0x2, %edx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
jmp 0x4f52
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x497c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::assign(int)
GStr& GStr::assign(const int v) {
  make_unique(); //edit operation ahead
  char buf[20];
  sprintf(buf,"%d",v);
  const int len = ::strlen(buf);
  prep_data(len, my_data->cap-len-2);
  ::memcpy(my_data->chars, buf, len);
  return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4a4c
leaq 0x91f2(%rip), %rsi      # 0xe169
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2080
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq 0x20(%rbx), %rax
movl 0x4(%rax), %edx
subl %r15d, %edx
addl $-0x2, %edx
movq %rbx, %rdi
movl %r15d, %esi
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator=(double)
GStr& GStr::operator=(const double f) {
 make_unique(); //edit operation ahead
 char buf[20];
 sprintf(buf,"%f",f);
 const int len = ::strlen(buf);
 prep_data(len);
 ::memcpy(my_data->chars, buf, len);
 return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x4a4c
leaq 0x9184(%rip), %rsi      # 0xe16c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2080
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::operator=(int)
GStr& GStr::operator=(const int i) {
 make_unique(); //edit operation ahead
 char buf[20];
 sprintf(buf,"%d",i);
 const int len = ::strlen(buf);
 prep_data(len);
 ::memcpy(my_data->chars, buf, len);
 return *this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x4a4c
leaq 0x9118(%rip), %rsi      # 0xe169
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2080
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x21e0
movq %rbx, %rax
addq $0x18, %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::append(char const*)
GStr& GStr::append(const char* s) {
  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);
    ::memcpy(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;
  }
  ::memcpy(my_data->chars+my_data->length, s, len);
  my_data->length=newlen;
  my_data->chars[newlen]='\0';
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4a4c
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
leal (%rcx,%r15), %r12d
cmpl %ecx, %r12d
jbe 0x538e
testl %ecx, %ecx
sete %sil
movl 0x4(%rax), %edx
cmpl %r12d, %edx
setb %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x532f
movq %rbx, %rdi
movl %r15d, %esi
movl $0x4, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movl %r15d, %edx
movq %r14, %rsi
callq 0x21e0
jmp 0x538e
movl %r12d, %r13d
cmpl %edx, %r12d
jb 0x536b
leaq 0x11(%r13), %rsi
movq %rax, %rdi
callq 0x23d0
testq %rax, %rax
je 0x534e
movq %rax, 0x20(%rbx)
jmp 0x5360
leaq 0x8ccb(%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
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::index(char const*, int) const
int GStr::index(const char *s, int start_index) const {
    // A negative index specifies an index from the right of the string.
    if (strlen(s)>(size_t)length()) return -1;
    if (start_index < 0)
        start_index += length();

    if (start_index < 0 || start_index >= length())
        invalid_index_error("index()");
    const char* idx = strstr(&my_data->chars[start_index], s);
    if (!idx)
        return -1;
    else
        return idx - my_data->chars;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2140
movq %rax, %rcx
movq 0x20(%r14), %r15
movslq 0x8(%r15), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rdx, %rcx
ja 0x5538
testl %ebp, %ebp
jns 0x54f2
addl %edx, %ebp
js 0x54f6
cmpl %edx, %ebp
jl 0x550f
leaq 0x8d05(%rip), %rdi      # 0xe202
leaq 0x8ca2(%rip), %rsi      # 0xe1a6
xorl %eax, %eax
callq 0x286c
movq 0x20(%r14), %r15
movslq %ebp, %rax
leaq (%r15,%rax), %rdi
addq $0xc, %rdi
addq $0xc, %r15
movq %rbx, %rsi
callq 0x2090
movq %rax, %rcx
movl %ecx, %edx
subl %r15d, %edx
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
orl %edx, %eax
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::format(char const*, ...)
GStr& GStr::format(const char *fmt,...) {
// Format as in sprintf
  make_unique(); //edit operation ahead
  char* buf;
  GMALLOC(buf, strlen(fmt)+1024);
  va_list arguments;
  va_start(arguments,fmt);
  //+1K buffer, should be enough for common expressions
  int len=vsprintf(buf,fmt,arguments);
  va_end(arguments);
  prep_data(len); //this also adds the '\0' at the end!
                     //and sets the right len
  ::memcpy(chrs(), buf, len);
  GFREE(buf);
  return *this;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x56aa
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x4a4c
movq %r14, %rdi
callq 0x2140
addq $0x400, %rax            # imm = 0x400
je 0x56cf
movq %rax, %rdi
callq 0x2330
movq %rax, %r15
testq %rax, %rax
jne 0x56e0
leaq 0x894a(%rip), %rdi      # 0xe020
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x286c
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2160
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x497c
movq 0x20(%rbx), %rdi
addq $0xc, %rdi
movslq %ebp, %rdx
movq %r15, %rsi
callq 0x21e0
testq %r15, %r15
je 0x573e
movq %r15, %rdi
callq 0x22e0
movq %rbx, %rax
addq $0xd8, %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::appendfmt(char const*, ...)
GStr& GStr::appendfmt(const char *fmt,...) {
// Format as in sprintf
  make_unique(); //edit operation ahead
  char* buf;
  GMALLOC(buf, strlen(fmt)+1024);
  va_list arguments;
  va_start(arguments,fmt);
  //+1K buffer, should be enough for common expressions
  vsprintf(buf,fmt,arguments);
  va_end(arguments);
  append(buf);
  GFREE(buf);
  return *this;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x57b1
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x4a4c
movq %r14, %rdi
callq 0x2140
addq $0x400, %rax            # imm = 0x400
je 0x57d6
movq %rax, %rdi
callq 0x2330
movq %rax, %r15
testq %rax, %rax
jne 0x57e7
leaq 0x8843(%rip), %rdi      # 0xe020
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x286c
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2160
movq %rbx, %rdi
movq %r15, %rsi
callq 0x52be
testq %r15, %r15
je 0x582f
movq %r15, %rdi
callq 0x22e0
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/GStr.cpp
// Function: GStr::trim(char)
GStr& GStr::trim(char c) {
 int istart;
 int iend;
 for (istart=0; istart<length() && my_data->chars[istart]==c;istart++) ;
 if (istart==length()) {
       make_unique(); //edit operation ahead
       prep_data(0); //string was entirely trimmed
       return *this;
       }
 for (iend=length()-1; iend>istart && my_data->chars[iend]==c;iend--) ;
 int newlen=iend-istart+1;
 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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rcx
movslq 0x8(%rcx), %rax
xorl %r15d, %r15d
testq %rax, %rax
jle 0x586b
cmpb %sil, 0xc(%rcx,%r15)
jne 0x586b
incq %r15
cmpq %r15, %rax
jne 0x585a
jmp 0x5870
cmpl %eax, %r15d
jne 0x5897
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rdi
leaq 0xe9cd(%rip), %r14      # 0x14250
cmpq %r14, %rdi
je 0x5891
decl (%rdi)
jne 0x5891
callq 0x22e0
movq %r14, 0x20(%rbx)
jmp 0x5908
leal -0x1(%rax), %edx
cmpl %edx, %r15d
cmovll %r15d, %edx
movslq %r15d, %rdi
movq %rax, %r8
decq %r8
movl %eax, %ebp
cmpq %rdi, %r8
jle 0x58c3
decl %ebp
leaq -0x1(%r8), %r9
cmpb %sil, 0xc(%rcx,%r8)
movq %r9, %r8
je 0x58ac
jmp 0x58c5
movl %edx, %ebp
subl %r15d, %ebp
incl %ebp
cmpl %eax, %ebp
je 0x5908
movq %rbx, %rdi
callq 0x4a4c
movl %ebp, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r14
leaq 0xc(%rax), %rdi
movq 0x20(%rbx), %rax
movl %r15d, %ecx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
movslq %ebp, %rdx
callq 0x21e0
movq %rbx, %rdi
movq %r14, %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::trim(char const*)
GStr& GStr::trim(const char* c) {
 int istart;
 int iend;
 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;
        }
 for (iend=length()-1; iend>istart && strchr(c, my_data->chars[iend])!=NULL;iend--) ;
 int newlen=iend-istart+1;
 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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r13
movq 0x20(%rdi), %r14
movslq 0x8(%r14), %rbx
xorl %r12d, %r12d
testq %rbx, %rbx
jle 0x5957
movsbl 0xc(%r14,%r12), %esi
movq %r15, %rdi
callq 0x2100
testq %rax, %rax
je 0x5957
incq %r12
cmpq %r12, %rbx
jne 0x593a
jmp 0x595c
cmpl %ebx, %r12d
jne 0x597e
leaq 0xe8ed(%rip), %rbx      # 0x14250
cmpq %rbx, %r14
je 0x5975
decl (%r14)
jne 0x5975
movq %r14, %rdi
callq 0x22e0
movq %rbx, 0x20(%r13)
jmp 0x5a0e
movq %r13, 0x8(%rsp)
leal -0x1(%rbx), %eax
cmpl %eax, %r12d
cmovll %r12d, %eax
movl %eax, 0x4(%rsp)
movslq %r12d, %rax
movq %rax, 0x10(%rsp)
movq %rbx, %r13
decq %r13
movl %ebx, %ebp
cmpq 0x10(%rsp), %r13
jle 0x59c2
movsbl 0xc(%r14,%r13), %esi
movq %r15, %rdi
callq 0x2100
decl %ebp
decq %r13
testq %rax, %rax
jne 0x59a1
jmp 0x59c6
movl 0x4(%rsp), %ebp
subl %r12d, %ebp
incl %ebp
cmpl %ebx, %ebp
movq 0x8(%rsp), %r13
je 0x5a0e
movq %r13, %rdi
callq 0x4a4c
movl %ebp, %edi
xorl %esi, %esi
callq 0x487c
movq %rax, %r14
leaq 0xc(%rax), %rdi
movq 0x20(%r13), %rax
movl %r12d, %ecx
leaq (%rax,%rcx), %rsi
addq $0xc, %rsi
movslq %ebp, %rdx
callq 0x21e0
movq %r13, %rdi
movq %r14, %rsi
callq 0x4a92
movq %r13, %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::trimR(char)
GStr& GStr::trimR(char c) {
 //only trim the right end
 int iend;
 for (iend=length()-1; iend>=0 && my_data->chars[iend]==c;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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movslq 0x8(%rax), %rdx
movl %edx, %edi
xorl %r8d, %r8d
movq %rdi, %r15
movq %rdx, %r14
movl %r8d, %ecx
testl %r15d, %r15d
jle 0x5a58
leaq -0x1(%r15), %rdi
leaq -0x1(%r14), %rdx
leal 0x1(%rcx), %r8d
cmpb %sil, 0xb(%rax,%r15)
je 0x5a35
jmp 0x5a5d
testq %r15, %r15
je 0x5a79
testl %ecx, %ecx
je 0x5a9e
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rax
movl %r15d, 0x8(%rax)
movb $0x0, 0xc(%rax,%r14)
jmp 0x5a9e
movq %rbx, %rdi
callq 0x4a4c
movq 0x20(%rbx), %rdi
leaq 0xe7c4(%rip), %r14      # 0x14250
cmpq %r14, %rdi
je 0x5a9a
decl (%rdi)
jne 0x5a9a
callq 0x22e0
movq %r14, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop