LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ComplexNetworks-DCC-FCUP[P]gtrieScanner/nauty/naugraph.c
// Function: updatecan
void
updatecan(graph *g, graph *canong, permutation *lab, int samerows, int m, int n)
{
	int i;
	set *ph;

#if !MAXN
	DYNALLOC1(permutation,workperm,workperm_sz,n,"updatecan");
#endif

	for (i = 0; i < n; ++i) workperm[lab[i]] = i;

	for (i = samerows, ph = GRAPHROW(canong,samerows,M);
                                                   i < n; ++i, ph += M)
	    permset(GRAPHROW(g,lab[i],M),ph,M,workperm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movl %r8d, %r14d
movl %ecx, %r13d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, (%rsp)
movslq %r9d, %rbp
movq 0x1b681(%rip), %rax     # 0x29ad0
cmpq %rbp, %rax
jae 0xe491
testq %rax, %rax
je 0xe465
movq 0x1b678(%rip), %rdi     # 0x29ad8
callq 0x2280
movq %rbp, 0x1b664(%rip)     # 0x29ad0
leaq (,%rbp,4), %rdi
callq 0x22d0
movq %rax, 0x1b658(%rip)     # 0x29ad8
testq %rax, %rax
jne 0xe491
leaq 0x34cf(%rip), %rdi      # 0x1195b
callq 0xda1f
movq 0x1b640(%rip), %rax     # 0x29ad8
xorl %ecx, %ecx
testl %r12d, %r12d
cmovlel %ecx, %r12d
cmpq %rcx, %r12
je 0xe4b2
movslq (%rbx,%rcx,4), %rdx
movl %ecx, (%rax,%rdx,4)
incq %rcx
jmp 0xe4a1
movslq %r13d, %r13
movslq %r14d, %r12
movq %r12, %rax
imulq %r13, %rax
leaq (%r15,%rax,4), %r15
leaq (,%r12,4), %r14
cmpq %rbp, %r13
jge 0xe4fa
movslq (%rbx,%r13,4), %rax
imulq %r12, %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,4), %rdi
movq 0x1b5f1(%rip), %rcx     # 0x29ad8
movq %r15, %rsi
movl %r12d, %edx
callq 0xd5f5
incq %r13
addq %r14, %r15
jmp 0xe4cb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ComplexNetworks-DCC-FCUP[P]gtrieScanner/nauty/naugraph.c
// Function: cheapautom
boolean
cheapautom(int *ptn, int level, boolean digraph, int n)
{
	int i,k,nnt;

	if (digraph) return FALSE;

	k = n;
	nnt = 0;
	for (i = 0; i < n; ++i)
	{
	    --k;
	    if (ptn[i] > level)
	    {
	        ++nnt;
	        while (ptn[++i] > level) {}
	    }
	}

	return (k <= nnt + 1 || k <= 4);
}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
je 0xf401
retq
leaq 0x4(%rdi), %rdx
xorl %r9d, %r9d
movl %ecx, %eax
xorl %r8d, %r8d
cmpl %ecx, %r9d
jge 0xf438
movslq %r9d, %r10
cmpl %esi, (%rdi,%r10,4)
jle 0xf431
leaq (%rdx,%r10,4), %r10
incl %r9d
leaq 0x4(%r10), %r11
cmpl %esi, (%r10)
movq %r11, %r10
jg 0xf41f
incl %r8d
decl %eax
incl %r9d
jmp 0xf40d
incl %r8d
cmpl %r8d, %eax
setle %cl
cmpl $0x5, %eax
setl %al
orb %cl, %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ComplexNetworks-DCC-FCUP[P]gtrieScanner/main.cpp
// Function: main
int main(int argc, char **argv) {

  CmdLine::init(argc, argv);
  CmdLine::decide_action();  
  CmdLine::finish();

  return 0;
}

// Assembly:
pushq %rax
callq 0x39ca
callq 0x3980
callq 0x3f7a
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/eric-lo[P]3150/5-Signal/break_sleep.c
// Function: main
int main(void) {
	signal(SIGINT, signal_handler);
	printf("I'm sleeping for 24 hours...\n");
	if(sleep(60 * 60 * 24) != 0) {
		perror("haha");
	}
	printf("Wake up and die\n");
	return 0;
}

// Assembly:
pushq %rax
leaq -0x14(%rip), %rsi       # 0x116c
pushq $0x2
popq %rdi
callq 0x1040
leaq 0xe8b(%rip), %rdi       # 0x201a
callq 0x1030
movl $0x15180, %edi          # imm = 0x15180
callq 0x1060
testl %eax, %eax
jne 0x11b2
leaq 0xe8e(%rip), %rdi       # 0x2037
callq 0x1030
xorl %eax, %eax
popq %rcx
retq
leaq 0xe4b(%rip), %rdi       # 0x2004
callq 0x1050
jmp 0x11a2
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: luaopen_xpfs
LUAMOD_API int luaopen_xpfs(lua_State *L)
{
   const luaL_Reg *preg;

   // create table
   lua_createtable(L, 0, ARRAY_LENGTH(xpfs_regs));

   // push c functions into the table
   for (preg = &xpfs_regs[0]; preg->func; ++preg) {
      lua_pushcfunction(L, preg->func);
      lua_setfield(L, -2, preg->name);
   }

   return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x10b0
leaq 0x2ac4(%rip), %r14      # 0x3d88
pushq $-0x2
popq %rbp
movq (%r14), %rsi
testq %rsi, %rsi
je 0x12ed
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1080
movq -0x8(%r14), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x10f0
addq $0x10, %r14
jmp 0x12c7
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_chmod
static int xpfs_chmod(lua_State *L)
{
   const char *filename = luaL_checkstring(L, 1);
   const char *szmode = luaL_checkstring(L, 2);
   int n;

	struct stat info;

   /* we only want to change user bits here, so get the current state */
	n = stat(filename, &info);
   if (n == 0) {
      mode_t MMM = info.st_mode;
      char pm = szmode[0];
      if (pm == '+' || pm == '-') {
         ++szmode;
      } else {
         #ifdef _WIN32
            MMM &= ~( _S_IREAD | _S_IWRITE );
         #else
            MMM &= ~S_IRWXU;
         #endif
      }

      for (; *szmode; ++szmode) {
         int bit = 0;
         #ifdef _WIN32
            if (*szmode == 'r') { bit = _S_IREAD; }
            if (*szmode == 'w') { bit = _S_IWRITE; }
         #else
            if (*szmode == 'r') { bit = S_IRUSR; }
            if (*szmode == 'w') { bit = S_IWUSR; }
            if (*szmode == 'x') { bit = S_IXUSR; }
         #endif
         if (pm == '-') {
            MMM &= ~bit;
         } else {
            MMM |= bit;
         }
      }
      n = chmod(filename, MMM);
   }

   if (n==0) {
      lua_pushboolean(L, 1);
      return 1;
   } else {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
pushq $0x1
popq %r14
movl %r14d, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %r15
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %r12
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1150
testl %eax, %eax
jne 0x13ab
movl 0x18(%rsp), %esi
movzbl (%r12), %eax
cmpl $0x2d, %eax
je 0x134c
cmpl $0x2b, %eax
jne 0x1351
incq %r12
jmp 0x1357
andl $0xfffffe3f, %esi       # imm = 0xFFFFFE3F
movl $0x80, %ecx
pushq $0x40
popq %rdx
movb (%r12), %dil
testb %dil, %dil
je 0x139f
xorl %r8d, %r8d
cmpb $0x72, %dil
sete %r8b
shll $0x8, %r8d
cmpb $0x77, %dil
cmovel %ecx, %r8d
cmpb $0x78, %dil
cmovel %edx, %r8d
movl %r8d, %edi
notl %edi
andl %esi, %edi
orl %esi, %r8d
cmpb $0x2d, %al
cmovel %edi, %r8d
incq %r12
movl %r8d, %esi
jmp 0x135f
movq %r15, %rdi
callq 0x1190
testl %eax, %eax
je 0x13dc
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1180
movl %r14d, %ebp
jmp 0x13ca
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_remove
static int xpfs_remove(lua_State *L)
{
   const char *filename = luaL_checkstring(L, 1);

   int nerr = remove(filename);

   #ifdef _WIN32
   if (nerr) {
      nerr = chmod(filename, _S_IWRITE | _S_IREAD);
      if (nerr == 0) {
         nerr = remove(filename);
         if (nerr) { chmod(filename, _S_IREAD); }
      }
   }
   #endif

   if (nerr) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %rdi
callq 0x1060
testl %eax, %eax
je 0x1894
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rbp
jmp 0x189e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1180
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_mkdir
static int xpfs_mkdir(lua_State *L)
{
   const char *dirname = luaL_checkstring(L, 1);

   if (mkdir(dirname, 0777)) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   // success
   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x1070
testl %eax, %eax
je 0x18ee
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rbp
jmp 0x18f8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1180
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_chdir
static int xpfs_chdir(lua_State *L)
{
   const char *dirname = luaL_checkstring(L, 1);

   if (chdir(dirname)) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   // success
   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1943
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rbp
jmp 0x194d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1180
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_rmdir
static int xpfs_rmdir(lua_State *L)
{
   const char *dirname = luaL_checkstring(L, 1);

   if (rmdir(dirname)) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   // success
   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %rdi
callq 0x10a0
testl %eax, %eax
je 0x1998
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rbp
jmp 0x19a2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1180
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_getcwd
static int xpfs_getcwd(lua_State *L)
{
   char *dir = getcwd(NULL, 0);

   if (dir == NULL) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   // success
   lua_pushstring(L, dir);
   free(dir);
   return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1100
testq %rax, %rax
je 0x19da
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
movq %r14, %rdi
callq 0x1040
pushq $0x1
jmp 0x19fb
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_rename
static int xpfs_rename(lua_State *L)
{
   const char *from = luaL_checkstring(L, 1);
   const char *to = luaL_checkstring(L, 2);;

   if (rename(from, to)) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   // success
   lua_pushboolean(L, 1);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %r14
movl %r14d, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %r15
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %r15, %rdi
movq %rax, %rsi
callq 0x11b0
testl %eax, %eax
je 0x1a5e
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
jmp 0x1a6c
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1180
movl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/luau/xpfs.c
// Function: xpfs_dir
static int xpfs_dir(lua_State *L)
{
   int nargs = lua_gettop(L);
   const char *dirname = luaL_checkstring(L, 1);
   struct dirent *pde;
   DIR *pdir;
   int ndx;

   if (nargs > 1) {
      (void) luaL_checkstring(L, 2);
   }

   pdir = opendir(dirname);
   ndx = 0;

   if (!pdir) {
      lua_pushnil(L);
      lua_pushstring(L, strerror(errno));
      return 2;
   }

   lua_createtable(L, 2, 0); // at least two entries

   while ( (pde = readdir(pdir)) != NULL ) {
      lua_pushstring(L, pde->d_name);
      lua_rawseti(L, -2, ++ndx);
   }

   closedir(pdir);

   // success
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1030
movl %eax, %r15d
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1120
movq %rax, %r14
cmpl $0x2, %r15d
jl 0x1ab0
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1120
movq %r14, %rdi
callq 0x1090
testq %rax, %rax
je 0x1b0a
movq %rax, %r14
pushq $0x2
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x10b0
pushq $-0x2
popq %r15
movq %r14, %rdi
callq 0x1170
testq %rax, %rax
je 0x1afe
addq $0x13, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x1140
incl %ebp
jmp 0x1ad1
movq %r14, %rdi
callq 0x1110
pushq $0x1
jmp 0x1b2b
movq %rbx, %rdi
callq 0x11a0
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c0
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFUpdateHeader
void  DBFUpdateHeader(DBFHandle psDBF) {
  unsigned char abyFileHeader[32];

  if (psDBF->bNoHeader)
    DBFWriteHeader(psDBF);
  DBFFlushRecord(psDBF);
  fseek(psDBF->fp, 0, 0);
  fread(abyFileHeader, 32, 1, psDBF->fp);
  abyFileHeader[4] = (unsigned char) (psDBF->nRecords % 256);
  abyFileHeader[5] = (unsigned char) ((psDBF->nRecords / 256) % 256);
  abyFileHeader[6] = (unsigned char) ((psDBF->nRecords / (256 * 256)) % 256);
  abyFileHeader[7] = (unsigned char) ((psDBF->nRecords / (256 * 256 * 256)) % 256);
  fseek(psDBF->fp, 0, 0);
  fwrite(abyFileHeader, 32, 1, psDBF->fp);
  fflush(psDBF->fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x60(%rdi)
je 0x1524
movq %rbx, %rdi
callq 0x15b5
movq %rbx, %rdi
callq 0x1672
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movq (%rbx), %rcx
movq %rsp, %r14
pushq $0x20
popq %r15
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10a0
movl 0x8(%rbx), %ecx
movb %cl, 0x4(%r14)
movl $0x100, %esi            # imm = 0x100
movl %ecx, %eax
cltd
idivl %esi
movb %al, 0x5(%r14)
movl $0x10000, %esi          # imm = 0x10000
movl %ecx, %eax
cltd
idivl %esi
movb %al, 0x6(%r14)
movl $0x1000000, %esi        # imm = 0x1000000
movl %ecx, %eax
cltd
idivl %esi
movb %al, 0x7(%r14)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movq (%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x11e0
movq (%rbx), %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1170
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFWriteHeader
static void DBFWriteHeader(DBFHandle psDBF) {
  unsigned char abyHeader[XBASE_FLDHDR_SZ];
  int i;

  if (!psDBF->bNoHeader)
    return;
  psDBF->bNoHeader = FALSE;

  /* Initialize the file header information. */
  for (i = 0; i < XBASE_FLDHDR_SZ; i++)
    abyHeader[i] = 0;

  /* write out a dummy date */
  abyHeader[0] = 0x03;  /* memo field? - just copying */
  abyHeader[1] = 95;    /* YY */
  abyHeader[2] = 7;     /* MM */
  abyHeader[3] = 26;    /* DD */

  /* record count preset at zero */
  abyHeader[8] = (unsigned char) (psDBF->nHeaderLength % 256);
  abyHeader[9] = (unsigned char) (psDBF->nHeaderLength / 256);
  abyHeader[10] = (unsigned char) (psDBF->nRecordLength % 256);
  abyHeader[11] = (unsigned char) (psDBF->nRecordLength / 256);
  abyHeader[29] = (unsigned char) (psDBF->iLanguageDriver);

  /* Write the initial 32 byte file header, and all the field desc */
  fseek(psDBF->fp, 0, 0);
  fwrite(abyHeader, XBASE_FLDHDR_SZ, 1, psDBF->fp);
  fwrite(psDBF->pszHeader, XBASE_FLDHDR_SZ, psDBF->nFields, psDBF->fp);

  /* Write out the newline character if there is room for it. */
  if (psDBF->nHeaderLength > 32 * psDBF->nFields + 32) {
    char cNewline = 0x0d;
    fwrite(&cNewline, 1, 1, psDBF->fp);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0x60(%rdi)
je 0x1668
movq %rdi, %rbx
andl $0x0, 0x60(%rdi)
xorl %eax, %eax
cmpq $0x20, %rax
je 0x15e0
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0x15d1
movq %rsp, %r14
movl $0x1a075f03, (%r14)     # imm = 0x1A075F03
movl 0x10(%rbx), %eax
movb %al, 0x8(%r14)
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, 0x9(%r14)
movl 0xc(%rbx), %eax
movb %al, 0xa(%r14)
cltd
idivl %ecx
movb %al, 0xb(%r14)
movb 0x70(%rbx), %al
movb %al, 0x1d(%r14)
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movq (%rbx), %rcx
pushq $0x20
popq %r15
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x11e0
movq (%rbx), %rcx
movq 0x38(%rbx), %rdi
movslq 0x14(%rbx), %rdx
movq %r15, %rsi
callq 0x11e0
movl 0x14(%rbx), %eax
shll $0x5, %eax
addl $0x20, %eax
cmpl %eax, 0x10(%rbx)
jle 0x1668
movq (%rbx), %rsi
pushq $0xd
popq %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x1100
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFFlushRecord
static int DBFFlushRecord(DBFHandle psDBF) {
  unsigned long nRecordOffset;

  if (psDBF->bCurrentRecordModified && psDBF->nCurrentRecord > -1) {
    psDBF->bCurrentRecordModified = FALSE;
    nRecordOffset = psDBF->nRecordLength * (unsigned long) psDBF->nCurrentRecord
      + psDBF->nHeaderLength;
    if (fseek(psDBF->fp, nRecordOffset, 0) != 0
        || fwrite(psDBF->pszCurrentRecord,psDBF->nRecordLength, 1, psDBF->fp) != 1) {
      char szMessage[128];
      sprintf(szMessage, "Failure writing DBF record %d.", psDBF->nCurrentRecord);
      fprintf(stderr, szMessage);
      return FALSE;
    }
  }
  return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
pushq $0x1
popq %rbx
cmpl $0x0, 0x44(%rdi)
je 0x16cc
movq %rdi, %r14
movslq 0x40(%rdi), %rax
testq %rax, %rax
js 0x16cc
andl $0x0, 0x44(%r14)
movslq 0xc(%r14), %rcx
imulq %rax, %rcx
movslq 0x10(%r14), %rsi
addq %rcx, %rsi
movq (%r14), %rdi
xorl %edx, %edx
callq 0x1180
testl %eax, %eax
jne 0x16d9
movq (%r14), %rcx
movq 0x48(%r14), %rdi
movslq 0xc(%r14), %rsi
pushq $0x1
popq %rdx
callq 0x11e0
cmpq $0x1, %rax
jne 0x16d9
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movl 0x40(%r14), %edx
leaq 0x29cc(%rip), %rsi      # 0x40b0
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11d0
movq 0x4900(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1140
xorl %ebx, %ebx
jmp 0x16cc
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFClose
void  DBFClose(DBFHandle psDBF) {
  if (psDBF != NULL) {
    if (psDBF->bNoHeader)
      DBFWriteHeader(psDBF);
    DBFFlushRecord(psDBF);
    if (psDBF->bUpdated)
      DBFUpdateHeader(psDBF);
    fclose(psDBF->fp);
    free(psDBF->panFieldOffset);
    free(psDBF->panFieldSize);
    free(psDBF->panFieldDecimals);
    free(psDBF->pachFieldType);
    free(psDBF->pszWorkField);
    free(psDBF->pszHeader);
    free(psDBF->pszCurrentRecord);
    free(psDBF->pszCodePage);
    free(psDBF);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1c04
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x60(%rdi)
je 0x1b95
movq %rbx, %rdi
callq 0x15b5
movq %rbx, %rdi
callq 0x1672
cmpl $0x0, 0x64(%rbx)
je 0x1bab
movq %rbx, %rdi
callq 0x1508
movq (%rbx), %rdi
callq 0x10c0
movq 0x18(%rbx), %rdi
callq 0x1030
movq 0x20(%rbx), %rdi
callq 0x1030
movq 0x28(%rbx), %rdi
callq 0x1030
movq 0x30(%rbx), %rdi
callq 0x1030
movq 0x58(%rbx), %rdi
callq 0x1030
movq 0x38(%rbx), %rdi
callq 0x1030
movq 0x48(%rbx), %rdi
callq 0x1030
movq 0x78(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFIsAttributeNULL
int  DBFIsAttributeNULL(DBFHandle psDBF, int iRecord, int iField) {
  const char *pszValue;

  pszValue = DBFReadStringAttribute(psDBF, iRecord, iField);

  if (pszValue == NULL)
    return TRUE;

  return DBFIsValueNULL(psDBF->pachFieldType[iField], pszValue);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
callq 0x2208
testq %rax, %rax
je 0x2242
movq 0x30(%r14), %rcx
movslq %ebx, %rdx
movsbl (%rcx,%rdx), %edi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x224d
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFIsValueNULL
static int DBFIsValueNULL(char chType, const char *pszValue) {
  int i;

  if (pszValue == NULL)
    return TRUE;

  switch (chType) {
  case 'N':
  case 'F':
    /*
    ** We accept all asterisks or all blanks as NULL
    ** though according to the spec I think it should be all
    ** asterisks.
    */
    if (pszValue[0] == '*')
      return TRUE;
    for (i = 0; pszValue[i] != '\0'; i++) {
      if (pszValue[i] != ' ')
        return FALSE;
    }
    return TRUE;

  case 'D':
    /* NULL date fields have value "00000000" */
    return strncmp(pszValue, "00000000", 8) == 0;

  case 'L':
    /* NULL boolean fields have value "?" */
    return pszValue[0] == '?';

  default:
    /* empty string fields are considered NULL */
    return strlen(pszValue) == 0;
  }
}

// Assembly:
pushq %rax
movb $0x1, %al
testq %rsi, %rsi
je 0x22b5
movsbl %dil, %ecx
addl $-0x44, %ecx
rorl %ecx
cmpl $0x5, %ecx
ja 0x22af
leaq 0x1dea(%rip), %rdx      # 0x4054
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb (%rsi), %cl
cmpb $0x2a, %cl
jne 0x227e
jmp 0x22b5
movb (%rsi), %cl
incq %rsi
cmpb $0x20, %cl
je 0x227c
movzbl %cl, %ecx
testl %ecx, %ecx
je 0x22b5
xorl %eax, %eax
jmp 0x22b5
leaq 0x1e37(%rip), %rax      # 0x40cf
pushq $0x8
popq %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1070
testl %eax, %eax
jmp 0x22b2
cmpb $0x3f, (%rsi)
jmp 0x22b2
cmpb $0x0, (%rsi)
sete %al
movzbl %al, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFGetFieldInfo
DBFFieldType  DBFGetFieldInfo(DBFHandle psDBF, int iField, char *pszFieldName,
                                         int *pnWidth, int *pnDecimals) {
  if (iField < 0 || iField >= psDBF->nFields)
    return (FTInvalid);

  if (pnWidth != NULL)
    *pnWidth = psDBF->panFieldSize[iField];
  if (pnDecimals != NULL)
    *pnDecimals = psDBF->panFieldDecimals[iField];
  if (pszFieldName != NULL) {
    int i;
    strncpy(pszFieldName, (char *) psDBF->pszHeader + iField * 32, 11);
    pszFieldName[11] = '\0';
    for (i = 10; i > 0 && pszFieldName[i] == ' '; i--)
      pszFieldName[i] = '\0';
  }

  if (psDBF->pachFieldType[iField] == 'L')
    return (FTLogical);
  else if (psDBF->pachFieldType[iField] == 'N'
           || psDBF->pachFieldType[iField] == 'F') {
    if (psDBF->panFieldDecimals[iField] > 0
        || psDBF->panFieldSize[iField] > 10)
      return (FTDouble);
    else
      return (FTInteger);
  } else {
    return (FTString);
  }
}

// Assembly:
pushq $0x4
popq %rax
testl %esi, %esi
js 0x2380
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x14(%rdi)
jle 0x237b
movq %rdx, %r14
movl %esi, %r15d
testq %rcx, %rcx
je 0x22f3
movq 0x20(%rbx), %rax
movl (%rax,%r15,4), %eax
movl %eax, (%rcx)
testq %r8, %r8
je 0x2303
movq 0x28(%rbx), %rax
movl (%rax,%r15,4), %eax
movl %eax, (%r8)
testq %r14, %r14
je 0x233b
shll $0x5, %esi
addq 0x38(%rbx), %rsi
pushq $0xb
popq %rdx
movq %r14, %rdi
callq 0x1050
movb $0x0, 0xb(%r14)
pushq $0xa
popq %rcx
movl %ecx, %eax
subl $0x1, %eax
jb 0x233b
movl %ecx, %ecx
cmpb $0x20, (%r14,%rcx)
jne 0x233b
movb $0x0, (%r14,%rcx)
movl %eax, %ecx
jmp 0x2324
movq 0x30(%rbx), %rax
movzbl (%rax,%r15), %eax
cmpl $0x4e, %eax
je 0x2353
cmpl $0x4c, %eax
je 0x2362
cmpl $0x46, %eax
jne 0x2367
movq 0x28(%rbx), %rax
cmpl $0x0, (%rax,%r15,4)
jle 0x236b
pushq $0x2
jmp 0x2364
pushq $0x3
popq %rax
jmp 0x237b
xorl %eax, %eax
jmp 0x237b
movq 0x20(%rbx), %rcx
xorl %eax, %eax
cmpl $0xb, (%rcx,%r15,4)
setge %al
incl %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFWriteAttributeDirectly
int  DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField,void *pValue) {
  int i, j;
  unsigned char *pabyRec;

  /* Is this a valid record? */
  if (hEntity < 0 || hEntity > psDBF->nRecords)
    return (FALSE);

  if (psDBF->bNoHeader)
    DBFWriteHeader(psDBF);

  /* Is this a brand new record? */
  if (hEntity == psDBF->nRecords) {
    if (!DBFFlushRecord(psDBF))
      return FALSE;

    psDBF->nRecords++;
    for (i = 0; i < psDBF->nRecordLength; i++)
      psDBF->pszCurrentRecord[i] = ' ';
    psDBF->nCurrentRecord = hEntity;
  }

  /* Is this an existing record, but different than the last one */
  /* we accessed? */
  if (!DBFLoadRecord(psDBF, hEntity))
    return FALSE;
  pabyRec = (unsigned char *) psDBF->pszCurrentRecord;

  /* Assign all the record fields. */
  if ((int) strlen((char *) pValue) > psDBF->panFieldSize[iField])
    j = psDBF->panFieldSize[iField];
  else {
    memset(pabyRec + psDBF->panFieldOffset[iField], ' ',psDBF->panFieldSize[iField]);
    j = strlen((char *) pValue);
  }

  strncpy((char *) (pabyRec + psDBF->panFieldOffset[iField]),(char *) pValue, j);
  psDBF->bCurrentRecordModified = TRUE;
  psDBF->bUpdated = TRUE;
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
testl %esi, %esi
js 0x245c
movl %esi, %r12d
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jl 0x245c
movq %rcx, %r14
movl %edx, %r15d
cmpl $0x0, 0x60(%rbx)
je 0x23bb
movq %rbx, %rdi
callq 0x15b5
movl 0x8(%rbx), %eax
cmpl %r12d, %eax
jne 0x23ef
movq %rbx, %rdi
callq 0x1672
testl %eax, %eax
je 0x245c
incl 0x8(%rbx)
xorl %eax, %eax
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rax
jge 0x23eb
movq 0x48(%rbx), %rcx
movb $0x20, (%rcx,%rax)
incq %rax
jmp 0x23d5
movl %r12d, 0x40(%rbx)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2467
testl %eax, %eax
je 0x245c
movq 0x48(%rbx), %r12
movq %r14, %rdi
callq 0x10d0
movq %rax, %rcx
movq 0x20(%rbx), %rax
movslq %r15d, %r15
movl (%rax,%r15,4), %eax
cmpl %ecx, %eax
jl 0x243a
movslq %eax, %rdx
movq 0x18(%rbx), %rax
movslq (%rax,%r15,4), %rdi
addq %r12, %rdi
pushq $0x20
popq %rsi
callq 0x10f0
movq %r14, %rdi
callq 0x10d0
movq 0x18(%rbx), %rcx
movslq (%rcx,%r15,4), %rcx
addq %rcx, %r12
movslq %eax, %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1050
pushq $0x1
popq %rbp
movl %ebp, 0x44(%rbx)
movl %ebp, 0x64(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFLoadRecord
static int DBFLoadRecord(DBFHandle psDBF, int iRecord) {
  if (psDBF->nCurrentRecord != iRecord) {
    unsigned long nRecordOffset;
    char szMessage[128];

    if (!DBFFlushRecord(psDBF))
      return FALSE;
    nRecordOffset = psDBF->nRecordLength * (unsigned long) iRecord + psDBF->nHeaderLength;
    if (fseek(psDBF->fp, nRecordOffset, SEEK_SET) != 0) {
      sprintf(szMessage, "fseek(%ld) failed on DBF file.\n",(long) nRecordOffset);
      fprintf(stderr,szMessage);
      return FALSE;
    }
    if (fread(psDBF->pszCurrentRecord,psDBF->nRecordLength, 1, psDBF->fp) != 1) {
      sprintf(szMessage, "fread(%d) failed on DBF file.\n",psDBF->nRecordLength);
      fprintf(stderr,szMessage);
      return FALSE;
    }
    psDBF->nCurrentRecord = iRecord;
  }
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
pushq $0x1
popq %rbx
cmpl %esi, 0x40(%rdi)
je 0x2514
movl %esi, %ebp
movq %rdi, %r14
callq 0x1672
testl %eax, %eax
je 0x2512
movslq 0xc(%r14), %rax
movl %ebp, %ecx
imulq %rax, %rcx
movslq 0x10(%r14), %r15
addq %rcx, %r15
movq (%r14), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1180
testl %eax, %eax
jne 0x24d3
movq (%r14), %rcx
movq 0x48(%r14), %rdi
movslq 0xc(%r14), %rsi
pushq $0x1
popq %rdx
callq 0x10a0
cmpq $0x1, %rax
jne 0x24e9
movl %ebp, 0x40(%r14)
jmp 0x2514
leaq 0x1bfe(%rip), %rsi      # 0x40d8
movq %rsp, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x11d0
jmp 0x24fe
movl 0xc(%r14), %edx
leaq 0x1c04(%rip), %rsi      # 0x40f8
movq %rsp, %rdi
xorl %eax, %eax
callq 0x11d0
movq 0x3af3(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq %rsp, %rsi
xorl %eax, %eax
callq 0x1140
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFWriteTuple
int  DBFWriteTuple(DBFHandle psDBF, int hEntity, void *pRawTuple) {
  int i;
  unsigned char *pabyRec;

  /* Is this a valid record? */
  if (hEntity < 0 || hEntity > psDBF->nRecords)
    return (FALSE);

  if (psDBF->bNoHeader)
    DBFWriteHeader(psDBF);

  /* Is this a brand new record? */
  if (hEntity == psDBF->nRecords) {
    if (!DBFFlushRecord(psDBF))
      return FALSE;
    psDBF->nRecords++;
    for (i = 0; i < psDBF->nRecordLength; i++)
      psDBF->pszCurrentRecord[i] = ' ';
    psDBF->nCurrentRecord = hEntity;
  }

  /* Is this an existing record, but different than the last one */
  /* we accessed? */
  if (!DBFLoadRecord(psDBF, hEntity))
    return FALSE;
  pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
  memcpy(pabyRec, pRawTuple, psDBF->nRecordLength);
  psDBF->bCurrentRecordModified = TRUE;
  psDBF->bUpdated = TRUE;
  return (TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %esi, %esi
js 0x282d
movl %esi, %ebp
movq %rdi, %r14
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jl 0x282d
movq %rdx, %r15
cmpl $0x0, 0x60(%r14)
je 0x27d4
movq %r14, %rdi
callq 0x15b5
movl 0x8(%r14), %eax
cmpl %ebp, %eax
jne 0x2804
movq %r14, %rdi
callq 0x1672
testl %eax, %eax
je 0x282d
incl 0x8(%r14)
xorl %eax, %eax
movslq 0xc(%r14), %rcx
cmpq %rcx, %rax
jge 0x2800
movq 0x48(%r14), %rcx
movb $0x20, (%rcx,%rax)
incq %rax
jmp 0x27ea
movl %ebp, 0x40(%r14)
movq %r14, %rdi
movl %ebp, %esi
callq 0x2467
testl %eax, %eax
je 0x282d
movq 0x48(%r14), %rdi
movslq 0xc(%r14), %rdx
movq %r15, %rsi
callq 0x1150
pushq $0x1
popq %rbx
movl %ebx, 0x44(%r14)
movl %ebx, 0x64(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFCloneEmpty
DBFHandle  DBFCloneEmpty(DBFHandle psDBF, const char *pszFilename) {
  DBFHandle newDBF;

  newDBF = DBFCreateEx(pszFilename, psDBF->pszCodePage);
  if (newDBF == NULL)
    return (NULL);

  newDBF->nFields = psDBF->nFields;
  newDBF->nRecordLength = psDBF->nRecordLength;
  newDBF->nHeaderLength = psDBF->nHeaderLength;
  newDBF->pszHeader = (char *) malloc(newDBF->nHeaderLength);
  memcpy(newDBF->pszHeader, psDBF->pszHeader, newDBF->nHeaderLength);
  newDBF->panFieldOffset = (int *) malloc(sizeof(int) * psDBF->nFields);
  memcpy(newDBF->panFieldOffset, psDBF->panFieldOffset,  sizeof(int) * psDBF->nFields);
  newDBF->panFieldSize = (int *) malloc(sizeof(int) * psDBF->nFields);
  memcpy(newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields);
  newDBF->panFieldDecimals = (int *) malloc(sizeof(int) * psDBF->nFields);
  memcpy(newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields);
  newDBF->pachFieldType = (char *) malloc(sizeof(char) * psDBF->nFields);
  memcpy(newDBF->pachFieldType, psDBF->pachFieldType, sizeof(char) * psDBF->nFields);

  newDBF->bNoHeader = TRUE;
  newDBF->bUpdated = TRUE;
  DBFWriteHeader(newDBF);
  DBFClose(newDBF);
  newDBF = DBFOpen(pszFilename, "rb+");
  return (newDBF);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x78(%rdi), %rsi
movq %rbx, %rdi
callq 0x1c11
testq %rax, %rax
je 0x2964
movq %rax, %r14
movslq 0x14(%r15), %r12
movl %r12d, 0x14(%rax)
movl 0xc(%r15), %eax
movl %eax, 0xc(%r14)
movslq 0x10(%r15), %r13
movl %r13d, 0x10(%r14)
movq %r13, %rdi
callq 0x1160
movq %rax, 0x38(%r14)
movq 0x38(%r15), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x1150
leaq (,%r12,4), %r13
movq %r13, %rdi
callq 0x1160
movq %rax, 0x18(%r14)
movq 0x18(%r15), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x1150
movq %r13, %rdi
callq 0x1160
movq %rax, 0x20(%r14)
movq 0x20(%r15), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x1150
movq %r13, %rdi
callq 0x1160
movq %rax, 0x28(%r14)
movq 0x28(%r15), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x1150
movq %r12, %rdi
callq 0x1160
movq %rax, 0x30(%r14)
movq 0x30(%r15), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x1150
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x60(%r14)
movq %r14, %rdi
callq 0x15b5
movq %r14, %rdi
callq 0x1b7a
leaq 0x171b(%rip), %rsi      # 0x406e
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1709
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFGetFieldIndex
int  DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName) {
  char name[12], name1[12], name2[12];
  int i;

  strncpy(name1, pszFieldName, 11);
  name1[11] = '\0';
  str_to_upper(name1);
  for (i = 0; i < DBFGetFieldCount(psDBF); i++) {
    DBFGetFieldInfo(psDBF, i, name, NULL, NULL);
    strncpy(name2, name, 11);
    str_to_upper(name2);
    if (!strncmp(name1, name2, 10))
      return (i);
  }
  return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
pushq $0xb
popq %rdx
movq %r14, %rdi
callq 0x1050
movb $0x0, 0xb(%r14)
movq %r14, %rdi
callq 0x2a21
xorl %r12d, %r12d
leaq 0x1c(%rsp), %r13
leaq 0x4(%rsp), %rbp
pushq $0xa
popq %r15
cmpl 0x14(%rbx), %r12d
jge 0x2a0a
movq %rbx, %rdi
movl %r12d, %esi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x22c2
movq %rbp, %rdi
movq %r13, %rsi
pushq $0xb
popq %rdx
callq 0x1050
movq %rbp, %rdi
callq 0x2a21
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x1070
testl %eax, %eax
je 0x2a0f
incl %r12d
jmp 0x29c4
pushq $-0x1
popq %rax
jmp 0x2a12
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: str_to_upper
static void str_to_upper(char *string) {
  int len = strlen(string);
  short i = -1;
  while (++i < len)
    if (isalpha(string[i]) && islower(string[i]))
      string[i] = (char) toupper((int) string[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x10d0
movq %rax, %r14
xorl %ebp, %ebp
movswl %bp, %eax
cmpl %r14d, %eax
jge 0x2a67
callq 0x11f0
movq (%rax), %rax
movswq %bp, %r15
movsbq (%rbx,%r15), %rdi
movzwl (%rax,%rdi,2), %eax
notl %eax
testw $0x600, %ax             # imm = 0x600
jne 0x2a63
callq 0x1090
movb %al, (%rbx,%r15)
incl %ebp
jmp 0x2a35
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFIsRecordDeleted
int  DBFIsRecordDeleted(DBFHandle psDBF, int iShape) {
  /* Verify selection. */
  if (iShape < 0 || iShape >= psDBF->nRecords)
    return TRUE;

  /* Have we read the record? */
  if (!DBFLoadRecord(psDBF, iShape))
    return FALSE;

  /* '*' means deleted. */
  return psDBF->pszCurrentRecord[0] == '*';
}

// Assembly:
pushq $0x1
popq %rax
testl %esi, %esi
js 0x2a9f
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x8(%rdi)
jle 0x2a9e
movq %rbx, %rdi
callq 0x2467
testl %eax, %eax
je 0x2a9c
movq 0x48(%rbx), %rcx
xorl %eax, %eax
cmpb $0x2a, (%rcx)
sete %al
jmp 0x2a9e
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFMarkRecordDeleted
int  DBFMarkRecordDeleted(DBFHandle psDBF, int iShape, int bIsDeleted) {
  char chNewFlag;

  /* Verify selection. */
  if (iShape < 0 || iShape >= psDBF->nRecords)
    return FALSE;

  /* Is this an existing record, but different than the last one */
  /* we accessed? */
  if (!DBFLoadRecord(psDBF, iShape))
    return FALSE;

  /* Assign value, marking record as dirty if it changes. */
  if (bIsDeleted)
    chNewFlag = '*';
  else
    chNewFlag = ' ';

  if (psDBF->pszCurrentRecord[0] != chNewFlag) {
    psDBF->bCurrentRecordModified = TRUE;
    psDBF->bUpdated = TRUE;
    psDBF->pszCurrentRecord[0] = chNewFlag;
  }

  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testl %esi, %esi
js 0x2ae5
movq %rdi, %r14
cmpl %esi, 0x8(%rdi)
jle 0x2ae5
movl %edx, %ebp
movq %r14, %rdi
callq 0x2467
testl %eax, %eax
je 0x2ae5
testl %ebp, %ebp
pushq $0x20
popq %rcx
pushq $0x2a
popq %rax
cmovel %ecx, %eax
movq 0x48(%r14), %rcx
cmpb %al, (%rcx)
jne 0x2ad8
pushq $0x1
popq %rbx
jmp 0x2ae5
pushq $0x1
popq %rbx
movl %ebx, 0x44(%r14)
movl %ebx, 0x64(%r14)
movb %al, (%rcx)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/../libcperciva/util/parsenum.h
// Function: parsenum_float
static inline double
parsenum_float(const char * s, double min, double max, int trailing)
{
	char * eptr;
	double val;

	/* Sanity check. */
	assert(s != NULL);

	val = strtod(s, &eptr);
	if (eptr == s || (!trailing && (*eptr != '\0')))
		errno = EINVAL;
	else if ((val < min) || (val > max))
		errno = ERANGE;
	return (val);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x319e
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x20f0
movq (%r14), %rax
pushq $0x16
popq %rbp
cmpq %rbx, %rax
je 0x3184
cmpb $0x0, (%rax)
jne 0x3184
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3195
pushq $0x22
popq %rbp
movsd %xmm0, (%rsp)
callq 0x20a0
movsd (%rsp), %xmm0
movl %ebp, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x10542(%rip), %rdi     # 0x136e7
leaq 0xe219(%rip), %rsi      # 0x113c5
leaq 0xe231(%rip), %rcx      # 0x113e4
movl $0x95, %edx
callq 0x21c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: callback_mrc_timer
static int
callback_mrc_timer(void * cookie)
{
	struct dispatch_state * D = cookie;

	/* If we have no pending cleaning, reset the timer. */
	if (!btree_cleaning_possible(D->T->cstate)) {
		if ((D->mrc_timer = events_timer_register(callback_mrc_timer,
		    D, &fivesec)) == NULL)
			return (-1);
		else
			return (0);
	}

	/* This timer isn't ticking any more. */
	D->mrc_timer = NULL;

	/* We want to force a batch of MRs so that we can clean. */
	D->docleans = 1;

	/* Launch a (possibly empty) batch of MRs if possible. */
	return (poke_mr(D));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq 0x40(%rax), %rdi
callq 0x61d2
testl %eax, %eax
je 0x337e
andq $0x0, 0xb8(%rbx)
movl $0x1, 0xc0(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x363c
leaq -0x37(%rip), %rdi       # 0x334e
leaq 0xe09c(%rip), %rdx      # 0x11428
movq %rbx, %rsi
callq 0xaa98
movq %rax, 0xb8(%rbx)
xorl %ecx, %ecx
cmpq $0x1, %rax
sbbl %ecx, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: callback_accept
static int
callback_accept(void * cookie, int s)
{
	struct dispatch_state * D = cookie;

	/* We have a socket. */
	if ((D->s = s) == -1) {
		warnp("Error accepting connection");
		goto err0;
	}

	/* Make the accepted connection non-blocking. */
	if (fcntl(D->s, F_SETFL, O_NONBLOCK) == -1) {
		warnp("Cannot make connection non-blocking");
		goto err1;
	}

	/* Create a buffered writer for the connection. */
	if ((D->writeq = netbuf_write_init(D->s, dropconnection, D)) == NULL) {
		warnp("Cannot create packet write queue");
		goto err1;
	}

	/* Create a buffered reader for the connection. */
	if ((D->readq = netbuf_read_init(D->s)) == NULL) {
		warn0("Cannot create packet read queue");
		goto err2;
	}

	/* Start listening for packets. */
	if (readreqs(D))
		goto err3;

	/* Success! */
	return (0);

err3:
	netbuf_read_free(D->readq);
err2:
	netbuf_write_free(D->writeq);
err1:
	if (close(D->s))
		warnp("close");
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, 0x4(%rdi)
cmpl $-0x1, %esi
je 0x341c
movq %rdi, %rbx
pushq $0x4
popq %rax
movl %esi, %edi
movl %eax, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x2120
cmpl $-0x1, %eax
je 0x343c
movl 0x4(%rbx), %edi
leaq 0x995(%rip), %rsi       # 0x3d6d
movq %rbx, %rdx
callq 0xb0f4
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x3452
movl 0x4(%rbx), %edi
callq 0xad78
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3486
movq %rbx, %rdi
callq 0x3a0f
testl %eax, %eax
je 0x34b0
movq 0x8(%rbx), %rdi
callq 0xb08b
jmp 0x349c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3473
movq %rax, %rbx
leaq 0xe198(%rip), %rdi      # 0x115c8
xorl %eax, %eax
callq 0xdf55
andl $0x0, (%rbx)
jmp 0x3481
callq 0x20a0
cmpl $0x0, (%rax)
je 0x34a7
movq %rax, %r14
leaq 0xe193(%rip), %rdi      # 0x115e3
jmp 0x3466
callq 0x20a0
cmpl $0x0, (%rax)
je 0x34b4
movq %rax, %r14
leaq 0xe1a1(%rip), %rdi      # 0x11607
xorl %eax, %eax
callq 0xdf55
andl $0x0, (%r14)
jmp 0x34c2
leaq 0xe14e(%rip), %rdi      # 0x115c8
xorl %eax, %eax
callq 0xe0e4
pushq $-0x1
popq %rbx
jmp 0x3500
leaq 0xe19b(%rip), %rdi      # 0x11628
xorl %eax, %eax
callq 0xe0e4
callq 0x20a0
andl $0x0, (%rax)
movq 0x10(%rbx), %rdi
callq 0xb440
jmp 0x34c2
leaq 0xe135(%rip), %rdi      # 0x115e3
jmp 0x34bb
xorl %ebx, %ebx
jmp 0x3500
leaq 0xe14c(%rip), %rdi      # 0x11607
xorl %eax, %eax
callq 0xe0e4
movl 0x4(%rbx), %edi
callq 0x21f0
pushq $-0x1
popq %rbx
testl %eax, %eax
je 0x3500
callq 0x20a0
cmpl $0x0, (%rax)
je 0x34f2
movq %rax, %r14
leaq 0xfa4d(%rip), %rdi      # 0x12f32
xorl %eax, %eax
callq 0xdf55
andl $0x0, (%r14)
jmp 0x3500
leaq 0xfa39(%rip), %rdi      # 0x12f32
xorl %eax, %eax
callq 0xe0e4
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: dispatch_done
int
dispatch_done(struct dispatch_state * D)
{

	/*
	 * There should not be a MR timer running, because there should be
	 * no requests in progress.  We should not be reading a request, and
	 * the connection should be dying.
	 */
	assert(D->mr_timer == NULL);
	assert(D->nrequests == 0);
	assert(D->read_cookie == NULL);
	assert(D->dying == 1);

	/* Stop the cleaning timer. */
	events_timer_cancel(D->mrc_timer);

	/* Free the buffered reader. */
	netbuf_read_free(D->readq);

	/* Free the buffered writer. */
	netbuf_write_free(D->writeq);

	/* Close the socket. */
	while (close(D->s)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err1;
	}

	/* Free the dispatcher state. */
	free(D);

	/* Success! */
	return (0);

err1:
	free(D);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x90(%rdi)
jne 0x35c0
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x35df
cmpq $0x0, 0x18(%rbx)
jne 0x35fe
cmpl $0x1, (%rbx)
jne 0x361d
movq 0xb8(%rbx), %rdi
callq 0xac0b
movq 0x8(%rbx), %rdi
callq 0xb08b
movq 0x10(%rbx), %rdi
callq 0xb440
movl 0x4(%rbx), %edi
callq 0x21f0
testl %eax, %eax
je 0x359f
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x3570
leaq 0xf9a0(%rip), %rdi      # 0x12f32
testl %eax, %eax
jne 0x35a3
xorl %eax, %eax
callq 0xe0e4
jmp 0x35ae
xorl %ebp, %ebp
jmp 0x35b1
xorl %eax, %eax
callq 0xdf55
andl $0x0, (%r14)
pushq $-0x1
popq %rbp
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xde87(%rip), %rdi      # 0x1144e
leaq 0xde94(%rip), %rsi      # 0x11462
leaq 0xde98(%rip), %rcx      # 0x1146d
movl $0x2e3, %edx            # imm = 0x2E3
callq 0x21c0
leaq 0xdeb2(%rip), %rdi      # 0x11498
leaq 0xde75(%rip), %rsi      # 0x11462
leaq 0xde79(%rip), %rcx      # 0x1146d
movl $0x2e4, %edx            # imm = 0x2E4
callq 0x21c0
leaq 0xdea5(%rip), %rdi      # 0x114aa
leaq 0xde56(%rip), %rsi      # 0x11462
leaq 0xde5a(%rip), %rcx      # 0x1146d
movl $0x2e5, %edx            # imm = 0x2E5
callq 0x21c0
leaq 0xde9d(%rip), %rdi      # 0x114c1
leaq 0xde37(%rip), %rsi      # 0x11462
leaq 0xde3b(%rip), %rcx      # 0x1146d
movl $0x2e6, %edx            # imm = 0x2E6
callq 0x21c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: readreqs
static int
readreqs(struct dispatch_state * D)
{

	/* If this connection is dying, do nothing. */
	if (D->dying)
		goto done;

	/* If we don't have a reader, don't try to read. */
	if (D->readq == NULL)
		goto done;

	/* If we are already reading, do nothing. */
	if (D->read_cookie != NULL)
		goto done;

	/* If we have MAXREQS requests in progress, do nothing. */
	if (D->nrequests == MAXREQS)
		goto done;

	/* Wait for a request to arrive. */
	if ((D->read_cookie = wire_readpacket_wait(D->readq,
	    gotrequest, D)) == NULL) {
		warnp("Error reading request from connection");
		goto err0;
	}

done:
	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x0, (%rdi)
je 0x3a24
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3a1a
cmpq $0x0, 0x18(%r14)
jne 0x3a1a
cmpq $0x1000, 0x20(%r14)     # imm = 0x1000
je 0x3a1a
leaq 0x44(%rip), %rsi        # 0x3a8c
movq %r14, %rdx
callq 0xf945
movq %rax, 0x18(%r14)
testq %rax, %rax
jne 0x3a1a
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3a79
movq %rax, %rbx
leaq 0xdb0b(%rip), %rdi      # 0x11578
xorl %eax, %eax
callq 0xdf55
andl $0x0, (%rbx)
jmp 0x3a87
leaq 0xdaf8(%rip), %rdi      # 0x11578
xorl %eax, %eax
callq 0xe0e4
pushq $-0x1
popq %rbx
jmp 0x3a1a
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: poke_nmr
static int
poke_nmr(struct dispatch_state * D)
{
	struct requestq * RQ;

	/* If we have any queued requests, try to launch them. */
	while ((RQ = D->nmr_head) != NULL) {
		/* How many pages would this request need to touch? */
		if (RQ->R->type == PROTO_KVLDS_GET)
			RQ->npages = (size_t)(D->T->root_shadow->height + 1);
		else
			RQ->npages = (size_t)D->T->root_shadow->height +
			    D->T->pagelen / SERIALIZE_PERCHILD;

		/* Can we handle this request? */
		if ((D->nmr_ip > 0) &&
		    (D->nmr_ip + RQ->npages > D->nmr_concurrency))
			break;

		/* Dequeue this request. */
		D->nmr_head = RQ->next;

		/* Launch the request. */
		RQ->D = D;
		if (dispatch_nmr_launch(D->T, RQ->R, D->writeq,
		    callback_nmr_done, RQ))
			goto err0;
		D->nmr_ip += RQ->npages;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x131(%rip), %r15       # 0x3e0c
pushq $-0x1
popq %rbp
xorl %ebx, %ebx
pushq $0x14
popq %r13
movq 0x40(%r14), %r12
testq %r12, %r12
je 0x3d5c
movq (%r12), %rsi
cmpl $0x130, 0x8(%rsi)       # imm = 0x130
movq 0x28(%r14), %rdi
movq 0x20(%rdi), %rax
movsbq 0x1d(%rax), %rcx
jne 0x3d0c
incq %rcx
jmp 0x3d17
movq (%rdi), %rax
xorl %edx, %edx
divq %r13
addq %rax, %rcx
movq %rcx, 0x18(%r12)
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x3d2e
addq %rax, %rcx
cmpq 0x58(%r14), %rcx
ja 0x3d5c
movq 0x8(%r12), %rax
movq %rax, 0x40(%r14)
movq %r14, 0x10(%r12)
movq 0x10(%r14), %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x4690
testl %eax, %eax
jne 0x3d5a
movq 0x18(%r12), %rax
addq %rax, 0x50(%r14)
jmp 0x3ce4
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq