LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1120
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1120
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x11b0
cmpl $0x0, %eax
je 0x18e2
movq 0x18(%rsp), %rdi
callq 0x11a0
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x11c0
movl $0x2, 0x24(%rsp)
jmp 0x18f9
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1180
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x1030
movl %eax, 0x34(%rsp)
movq 0x38(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1120
movq %rax, 0x28(%rsp)
cmpl $0x1, 0x34(%rsp)
jle 0x1959
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1120
movq 0x28(%rsp), %rdi
callq 0x1090
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x19af
movq 0x38(%rsp), %rdi
callq 0x11a0
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x11c0
movl $0x2, 0x44(%rsp)
jmp 0x1a16
movq 0x38(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x10b0
movq 0x18(%rsp), %rdi
callq 0x1170
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x1a04
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x13, %rsi
callq 0x11c0
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %edx
addl $0x1, %edx
movl %edx, 0x14(%rsp)
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1140
jmp 0x19c0
movq 0x18(%rsp), %rdi
callq 0x1110
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x158f
movq -0x8(%rbp), %rdi
callq 0x1670
movq -0x8(%rbp), %rdi
callq 0x17b0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1160
leaq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x1090
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x2b(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x10000, %ecx          # imm = 0x10000
cltd
idivl %ecx
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x2a(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x1000000, %ecx        # imm = 0x1000000
cltd
idivl %ecx
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1160
leaq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x11c0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1150
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x168b
jmp 0x179e
movq -0x8(%rbp), %rax
movl $0x0, 0x60(%rax)
movl $0x0, -0x34(%rbp)
cmpl $0x20, -0x34(%rbp)
jge 0x16b7
movslq -0x34(%rbp), %rax
movb $0x0, -0x30(%rbp,%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x169d
movb $0x3, -0x30(%rbp)
movb $0x5f, -0x2f(%rbp)
movb $0x7, -0x2e(%rbp)
movb $0x1a, -0x2d(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x27(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x26(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rax
movl 0x70(%rax), %eax
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1160
leaq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x11c0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movl $0x20, %esi
callq 0x11c0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
shll $0x5, %ecx
addl $0x20, %ecx
cmpl %ecx, %eax
jle 0x179e
movb $0xd, -0x35(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
leaq -0x35(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x11c0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0x1886
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x40(%rax)
jle 0x1886
movq -0x10(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x40(%rcx), %rcx
imulq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x1160
cmpl $0x0, %eax
jne 0x1847
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %edx
callq 0x11c0
cmpq $0x1, %rax
je 0x1884
leaq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edx
leaq 0x38c7(%rip), %rsi      # 0x5123
movb $0x0, %al
callq 0x11b0
movq 0x578e(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq -0xa0(%rbp), %rsi
movb $0x0, %al
callq 0x1120
movl $0x0, -0x4(%rbp)
jmp 0x188d
jmp 0x1886
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x20f3
movq -0x8(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x205a
movq -0x8(%rbp), %rdi
callq 0x1670
movq -0x8(%rbp), %rdi
callq 0x17b0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x2076
movq -0x8(%rbp), %rdi
callq 0x1570
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x10b0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFAddField
int  DBFAddField(DBFHandle psDBF, const char *pszFieldName,
                 DBFFieldType eType, int nWidth, int nDecimals) {
  char chNativeType = 'C';

  if (eType == FTLogical)
    chNativeType = 'L';
  else if (eType == FTString)
    chNativeType = 'C';
  else
    chNativeType = 'N';
  return DBFAddNativeFieldType(psDBF, pszFieldName, chNativeType,nWidth, nDecimals);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movb $0x43, -0x1d(%rbp)
cmpl $0x3, -0x14(%rbp)
jne 0x24ca
movb $0x4c, -0x1d(%rbp)
jmp 0x24dc
cmpl $0x0, -0x14(%rbp)
jne 0x24d6
movb $0x43, -0x1d(%rbp)
jmp 0x24da
movb $0x4e, -0x1d(%rbp)
jmp 0x24dc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x1d(%rbp), %al
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movsbl %al, %edx
callq 0x2500
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFGetNullCharacter
static char DBFGetNullCharacter(char chType) {
  switch (chType) {
  case 'N':
  case 'F':
    return '*';
  case 'D':
    return '0';
  case 'L':
    return '?';
  default:
    return ' ';
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
movsbl -0x2(%rbp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0xa, %eax
ja 0x2982
movq -0x10(%rbp), %rax
leaq 0x26f1(%rip), %rcx      # 0x5058
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x2a, -0x1(%rbp)
jmp 0x2986
movb $0x30, -0x1(%rbp)
jmp 0x2986
movb $0x3f, -0x1(%rbp)
jmp 0x2986
movb $0x20, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x2ca0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2d35
movl $0x1, -0x4(%rbp)
jmp 0x2d53
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x18(%rbp), %rcx
movb (%rax,%rcx), %al
movq -0x20(%rbp), %rsi
movsbl %al, %edi
callq 0x2d60
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x2d85
movl $0x1, -0x4(%rbp)
jmp 0x2e63
movsbl -0x5(%rbp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xa, %eax
ja 0x2e4b
movq -0x20(%rbp), %rax
leaq 0x22de(%rip), %rcx      # 0x5084
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x2dc7
movl $0x1, -0x4(%rbp)
jmp 0x2e63
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x2e06
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x2df9
movl $0x0, -0x4(%rbp)
jmp 0x2e63
jmp 0x2dfb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2dce
movl $0x1, -0x4(%rbp)
jmp 0x2e63
movq -0x10(%rbp), %rdi
leaq 0x2328(%rip), %rsi      # 0x5142
movl $0x8, %edx
callq 0x1060
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x2e63
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x2e63
movq -0x10(%rbp), %rdi
callq 0x10c0
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x2edd
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jl 0x2ee9
movl $0x4, -0x4(%rbp)
jmp 0x301f
cmpq $0x0, -0x28(%rbp)
je 0x2f05
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2f21
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x2f9a
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
movl -0x14(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rsi
movl $0xb, %edx
callq 0x1040
movq -0x20(%rbp), %rax
movb $0x0, 0xb(%rax)
movl $0xa, -0x34(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x34(%rbp)
movb %al, -0x35(%rbp)
jle 0x2f78
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x2f81
jmp 0x2f98
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2f58
jmp 0x2f9a
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4c, %eax
jne 0x2fb8
movl $0x3, -0x4(%rbp)
jmp 0x301f
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4e, %eax
je 0x2fe2
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x46, %eax
jne 0x3018
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jg 0x3006
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpl $0xa, (%rax,%rcx,4)
jle 0x300f
movl $0x2, -0x4(%rbp)
jmp 0x301f
movl $0x1, -0x4(%rbp)
jmp 0x301f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x32da
movq -0x10(%rbp), %rdi
callq 0x17b0
cmpl $0x0, %eax
jne 0x31fc
movl $0x0, -0x4(%rbp)
jmp 0x32e1
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq %rcx, %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x1160
cmpl $0x0, %eax
je 0x326c
leaq -0xa0(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x1f07(%rip), %rsi      # 0x514b
movb $0x0, %al
callq 0x11b0
movq 0x3da6(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq -0xa0(%rbp), %rsi
movb $0x0, %al
callq 0x1120
movl $0x0, -0x4(%rbp)
jmp 0x32e1
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %edx
callq 0x1090
cmpq $0x1, %rax
je 0x32d0
leaq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
leaq 0x1ec3(%rip), %rsi      # 0x516b
movb $0x0, %al
callq 0x11b0
movq 0x3d42(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
leaq -0xa0(%rbp), %rsi
movb $0x0, %al
callq 0x1120
movl $0x0, -0x4(%rbp)
jmp 0x32e1
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x38b5
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x38c1
movl $0x0, -0x4(%rbp)
jmp 0x3997
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x38d4
movq -0x10(%rbp), %rdi
callq 0x1670
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x393f
movq -0x10(%rbp), %rdi
callq 0x17b0
cmpl $0x0, %eax
jne 0x38fa
movl $0x0, -0x4(%rbp)
jmp 0x3997
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x3935
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x24(%rbp), %rcx
movb $0x20, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x390e
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31c0
cmpl $0x0, %eax
jne 0x3959
movl $0x0, -0x4(%rbp)
jmp 0x3997
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rdx
callq 0x1130
movq -0x10(%rbp), %rax
movl $0x1, 0x44(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x64(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bmottershead[P]DBF2TSV/dbf.c
// Function: DBFReadTuple
const char* DBFReadTuple(DBFHandle psDBF, int hEntity) {
  if (hEntity < 0 || hEntity >= psDBF->nRecords)
    return (NULL);

  if (!DBFLoadRecord(psDBF, hEntity))
    return NULL;

  return (const char *) psDBF->pszCurrentRecord;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x39c1
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x39cb
movq $0x0, -0x8(%rbp)
jmp 0x39f2
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31c0
cmpl $0x0, %eax
jne 0x39e6
movq $0x0, -0x8(%rbp)
jmp 0x39f2
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0xb, %edx
callq 0x1040
movb $0x0, -0x25(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e70
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jge 0x3ccd
movq -0x10(%rbp), %rdi
movl -0x40(%rbp), %esi
leaq -0x24(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x2eb0
leaq -0x3c(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl $0xb, %edx
callq 0x1040
leaq -0x3c(%rbp), %rdi
callq 0x3ce0
leaq -0x30(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movl $0xa, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x3cc0
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3cd4
jmp 0x3cc2
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3c56
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movl %eax, -0xc(%rbp)
movw $0xffff, -0xe(%rbp)     # imm = 0xFFFF
movw -0xe(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xe(%rbp)
cwtl
cmpl -0xc(%rbp), %eax
jge 0x3d7e
callq 0x11d0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movswq -0xe(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x3d7c
callq 0x11d0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movswq -0xe(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x3d7c
movq -0x8(%rbp), %rax
movswq -0xe(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x1080
movb %al, %dl
movq -0x8(%rbp), %rax
movswq -0xe(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x3cfe
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x3db1
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x3dba
movl $0x1, -0x4(%rbp)
jmp 0x3ded
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31c0
cmpl $0x0, %eax
jne 0x3dd4
movl $0x0, -0x4(%rbp)
jmp 0x3ded
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x3e24
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x3e2d
movl $0x0, -0x4(%rbp)
jmp 0x3e94
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x31c0
cmpl $0x0, %eax
jne 0x3e47
movl $0x0, -0x4(%rbp)
jmp 0x3e94
cmpl $0x0, -0x18(%rbp)
je 0x3e53
movb $0x2a, -0x19(%rbp)
jmp 0x3e57
movb $0x20, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movsbl (%rax), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
je 0x3e8d
movq -0x10(%rbp), %rax
movl $0x1, 0x44(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x64(%rax)
movb -0x19(%rbp), %cl
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3b52
jmp 0x3b71
leaq 0x1d158(%rip), %rdi     # 0x20cb1
leaq 0x1aa1c(%rip), %rsi     # 0x1e57c
movl $0x95, %edx
leaq 0x1aa2f(%rip), %rcx     # 0x1e59b
callq 0x21d0
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x20f0
movsd %xmm0, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x3b9f
cmpl $0x0, -0x1c(%rbp)
jne 0x3bac
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3bac
callq 0x20a0
movl $0x16, (%rax)
jmp 0x3bd5
movsd -0x30(%rbp), %xmm1
movsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x3bc8
movsd -0x30(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x3bd3
callq 0x20a0
movl $0x22, (%rax)
jmp 0x3bd5
movsd -0x30(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x40(%rax), %rdi
callq 0x96a0
cmpl $0x0, %eax
jne 0x4084
movq -0x18(%rbp), %rsi
leaq -0x35(%rip), %rdi       # 0x4020
leaq 0x1a6e4(%rip), %rdx     # 0x1e740
callq 0x12560
movq -0x18(%rbp), %rcx
movq %rax, 0xb8(%rcx)
cmpq $0x0, %rax
jne 0x407b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x40ad
movl $0x0, -0x4(%rbp)
jmp 0x40ad
movq -0x18(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0xc0(%rax)
movq -0x18(%rbp), %rdi
callq 0x4440
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x42ec
jmp 0x430b
leaq 0x1a473(%rip), %rdi     # 0x1e766
leaq 0x1a480(%rip), %rsi     # 0x1e77a
movl $0x2e3, %edx            # imm = 0x2E3
leaq 0x1a47f(%rip), %rcx     # 0x1e785
callq 0x21d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x4318
jmp 0x4337
leaq 0x1a491(%rip), %rdi     # 0x1e7b0
leaq 0x1a454(%rip), %rsi     # 0x1e77a
movl $0x2e4, %edx            # imm = 0x2E4
leaq 0x1a453(%rip), %rcx     # 0x1e785
callq 0x21d0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x4344
jmp 0x4363
leaq 0x1a477(%rip), %rdi     # 0x1e7c2
leaq 0x1a428(%rip), %rsi     # 0x1e77a
movl $0x2e5, %edx            # imm = 0x2E5
leaq 0x1a427(%rip), %rcx     # 0x1e785
callq 0x21d0
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x436e
jmp 0x438d
leaq 0x1a464(%rip), %rdi     # 0x1e7d9
leaq 0x1a3fe(%rip), %rsi     # 0x1e77a
movl $0x2e6, %edx            # imm = 0x2E6
leaq 0x1a3fd(%rip), %rcx     # 0x1e785
callq 0x21d0
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x127a0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x13080
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x13750
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x21f0
cmpl $0x0, %eax
je 0x440d
callq 0x20a0
cmpl $0x4, (%rax)
jne 0x43d4
jmp 0x43b7
jmp 0x43d6
callq 0x20a0
cmpl $0x0, (%rax)
je 0x43fb
leaq 0x1bffb(%rip), %rdi     # 0x203e2
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4409
leaq 0x1bfe0(%rip), %rdi     # 0x203e2
movb $0x0, %al
callq 0x182f0
jmp 0x440b
jmp 0x441f
movq -0x10(%rbp), %rdi
callq 0x2040
movl $0x0, -0x4(%rbp)
jmp 0x442f
movq -0x10(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: callback_mr_done
static int
callback_mr_done(void * cookie)
{
	struct dispatch_state * D = cookie;

#ifdef SANITY_CHECKS
	/* Sanity check the B+Tree. */
	btree_sanity(D->T);
#endif

	/* We've handled a bunch of requests. */
	D->nrequests -= D->mr_reqs;

	/* No MRs are in progress any more. */
	D->mr_inprogress = 0;

	/* Check if we need to read more requests. */
	if (readreqs(D))
		goto err0;

	/* Maybe we can launch some more MRs? */
	return (poke_mr(D));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x80(%rax)
movq -0x18(%rbp), %rdi
callq 0x4b10
cmpl $0x0, %eax
je 0x48b9
jmp 0x48c7
movq -0x18(%rbp), %rdi
callq 0x4440
movl %eax, -0x4(%rbp)
jmp 0x48ce
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: callback_mr_timer
static int
callback_mr_timer(void * cookie)
{
	struct dispatch_state * D = cookie;

	/* The timer has expired. */
	D->mr_timer_expired = 1;

	/* We don't have a timer any more. */
	D->mr_timer = NULL;

	/* Launch modifying requests if possible. */
	return (poke_mr(D));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x98(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rdi
callq 0x4440
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x4b2a
jmp 0x4bb5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4b37
jmp 0x4bb5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4b44
jmp 0x4bb5
movq -0x10(%rbp), %rax
cmpq $0x1000, 0x20(%rax)     # imm = 0x1000
jne 0x4b54
jmp 0x4bb5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x69(%rip), %rsi        # 0x4bd0
callq 0x1b0c0
movq -0x10(%rbp), %rcx
movq %rax, 0x18(%rcx)
cmpq $0x0, %rax
jne 0x4bb3
jmp 0x4b7c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4ba1
leaq 0x19d4b(%rip), %rdi     # 0x1e8d8
movb $0x0, %al
callq 0x180a0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4baf
leaq 0x19d30(%rip), %rdi     # 0x1e8d8
movb $0x0, %al
callq 0x182f0
jmp 0x4bb1
jmp 0x4bbe
jmp 0x4bb5
movl $0x0, -0x4(%rbp)
jmp 0x4bc5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x4fed
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpl $0x130, 0x8(%rax)       # imm = 0x130
jne 0x4f32
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movsbl 0x1d(%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x4f63
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movsbq 0x1d(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movl $0x14, %esi
xorl %edx, %edx
divq %rsi
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jbe 0x4f8a
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x18(%rbp), %rcx
addq 0x18(%rcx), %rax
movq -0x10(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jbe 0x4f8a
jmp 0x4fed
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %r8
leaq 0x228(%rip), %rcx       # 0x51f0
callq 0x63b0
cmpl $0x0, %eax
je 0x4fd4
jmp 0x4ff6
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x50(%rax), %rcx
movq %rcx, 0x50(%rax)
jmp 0x4eec
movl $0x0, -0x4(%rbp)
jmp 0x4ffd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: dropconnection
static int
dropconnection(void * cookie)
{
	struct dispatch_state * D = cookie;
	struct requestq * RQ;

	/* This connection is dying. */
	D->dying = 1;

	/* If we're reading a packet, stop it. */
	if (D->read_cookie != NULL) {
		wire_readpacket_wait_cancel(D->read_cookie);
		D->read_cookie = NULL;
	}

	/* Free queued requests. */
	while ((RQ = D->nmr_head) != NULL) {
		/* Remove from the queue. */
		D->nmr_head = RQ->next;

		/* Free the request and linked list node. */
		proto_kvlds_request_free(RQ->R);
		mpool_requestq_free(RQ);

		/* That's one request we won't be responding to. */
		D->nrequests -= 1;
	}
	while ((RQ = D->mr_head) != NULL) {
		/* Remove from the queue. */
		D->mr_head = RQ->next;
		D->mr_qlen -= 1;

		/* Free the request and linked list node. */
		proto_kvlds_request_free(RQ->R);
		mpool_requestq_free(RQ);

		/* That's one request we won't be responding to. */
		D->nrequests -= 1;
	}

	/* Cancel any stop-queuing timer; we've freed the queue anyway. */
	if (D->mr_timer != NULL) {
		events_timer_cancel(D->mr_timer);
		D->mr_timer = NULL;
	}

	/* The (unset) timer hasn't expired. */
	D->mr_timer_expired = 0;

	/* Success!  (We can't fail -- but netbuf_write doesn't know that.) */
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5052
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1b290
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x5054
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x509d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x19810
movq -0x18(%rbp), %rdi
callq 0x4840
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x20(%rax)
jmp 0x5054
jmp 0x509f
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x50fe
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x88(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x19810
movq -0x18(%rbp), %rdi
callq 0x4840
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x20(%rax)
jmp 0x509f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x512b
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x127a0
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x98(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/dispatch.c
// Function: callback_nmr_done
static int
callback_nmr_done(void * cookie)
{
	struct requestq * RQ = cookie;
	struct dispatch_state * D = RQ->D;

	/* This NMR is no longer in progress. */
	D->nmr_ip -= RQ->npages;

	/* Free request cookie. */
	mpool_requestq_free(RQ);

	/* We've finished with this request. */
	D->nrequests -= 1;

	/* Check if we need to read more requests. */
	if (readreqs(D))
		goto err0;

	/* Poke the queue in case we can now handle another request. */
	if (poke_nmr(D))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rdi
callq 0x4840
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rdi
callq 0x4b10
cmpl $0x0, %eax
je 0x5250
jmp 0x5269
movq -0x20(%rbp), %rdi
callq 0x4ee0
cmpl $0x0, %eax
je 0x5260
jmp 0x5269
movl $0x0, -0x4(%rbp)
jmp 0x5270
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]kivaloo/kvlds/dispatch_mr.c
// Function: callback_gotleaves
static int
callback_gotleaves(void * cookie)
{
	struct batch * B = cookie;

	/* Dirty the nodes we will need to modify. */
	if (batch_dirty(B))
		goto err0;

	/*
	 * If we didn't dirty anything, skip the operation-performing,
	 * balancing, and syncing, and go straight to sending responses.
	 */
	if (B->T->root_dirty->state == NODE_STATE_CLEAN)
		goto dosync;

	/* Perform the requested operations. */
	if (batch_run(B))
		goto err0;

	/* Next we need to rebalance the tree. */
	if (btree_balance(B->T, callback_balanced, B))
		goto err0;

	/* Success! */
	return (0);

dosync:
	/* We're skipping balancing and syncing because nothing changed. */
	if (!events_immediate_register(callback_synced, B, 0))
		goto err0;

	/* Success! */
	return (0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x59d0
cmpl $0x0, %eax
je 0x55f4
jmp 0x566d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movb 0x1c(%rax), %al
shrb $0x2, %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x5612
jmp 0x564a
movq -0x18(%rbp), %rdi
callq 0x5d00
cmpl $0x0, %eax
je 0x5622
jmp 0x566d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x95b(%rip), %rsi       # 0x5f90
callq 0x7ce0
cmpl $0x0, %eax
je 0x5641
jmp 0x566d
movl $0x0, -0x4(%rbp)
jmp 0x5674
movq -0x18(%rbp), %rsi
leaq 0x97b(%rip), %rdi       # 0x5fd0
xorl %edx, %edx
callq 0x111b0
cmpq $0x0, %rax
jne 0x5664
jmp 0x566d
movl $0x0, -0x4(%rbp)
jmp 0x5674
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)