LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbFreeNN
SQLITE_PRIVATE void sqlite3DbFreeNN(sqlite3 *db, void *p){
  assert( db==0 || sqlite3_mutex_held(db->mutex) );
  assert( p!=0 );
  if( db ){
    if( db->pnBytesFreed ){
      measureAllocationSize(db, p);
      return;
    }
    if( ((uptr)p)<(uptr)(db->lookaside.pEnd) ){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
      if( ((uptr)p)>=(uptr)(db->lookaside.pMiddle) ){
        LookasideSlot *pBuf = (LookasideSlot*)p;
#ifdef SQLITE_DEBUG
        memset(p, 0xaa, LOOKASIDE_SMALL);  /* Trash freed content */
#endif
        pBuf->pNext = db->lookaside.pSmallFree;
        db->lookaside.pSmallFree = pBuf;
        return;
      }
#endif /* SQLITE_OMIT_TWOSIZE_LOOKASIDE */
      if( ((uptr)p)>=(uptr)(db->lookaside.pStart) ){
        LookasideSlot *pBuf = (LookasideSlot*)p;
#ifdef SQLITE_DEBUG
        memset(p, 0xaa, db->lookaside.szTrue);  /* Trash freed content */
#endif
        pBuf->pNext = db->lookaside.pFree;
        db->lookaside.pFree = pBuf;
        return;
      }
    }
  }
  assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
  assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
  assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );
  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
  sqlite3_free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3d60c5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2d0(%rax)
je 0x3d602b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d60e0
jmp 0x3d60ce
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x1c0(%rcx), %rcx
cmpq %rcx, %rax
jae 0x3d60c3
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x1b0(%rcx), %rcx
cmpq %rcx, %rax
jb 0x3d6082
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1a8(%rax)
jmp 0x3d60ce
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x1b8(%rcx), %rcx
cmpq %rcx, %rax
jb 0x3d60c1
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x198(%rax)
jmp 0x3d60ce
jmp 0x3d60c3
jmp 0x3d60c5
movq -0x10(%rbp), %rdi
callq 0x3c0800
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: setStrAccumError
static void setStrAccumError(StrAccum *p, u8 eError){
  assert( eError==SQLITE_NOMEM || eError==SQLITE_TOOBIG );
  p->accError = eError;
  if( p->mxAlloc ) sqlite3_str_reset(p);
  if( eError==SQLITE_TOOBIG ) sqlite3ErrorToParser(p->db, eError);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x3d614f
movq -0x8(%rbp), %rdi
callq 0x3c35b0
movzbl -0x9(%rbp), %eax
cmpl $0x12, %eax
jne 0x3d6168
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %esi
callq 0x3d6170
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ErrorToParser
SQLITE_PRIVATE int sqlite3ErrorToParser(sqlite3 *db, int errCode){
  Parse *pParse;
  if( db==0 || (pParse = db->pParse)==0 ) return errCode;
  pParse->rc = errCode;
  pParse->nErr++;
  return errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d6197
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3d619f
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d61bc
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x30(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbRealloc
SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){
  assert( db!=0 );
  if( p==0 ) return sqlite3DbMallocRawNN(db, n);
  assert( sqlite3_mutex_held(db->mutex) );
  if( ((uptr)p)<(uptr)db->lookaside.pEnd ){
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
    if( ((uptr)p)>=(uptr)db->lookaside.pMiddle ){
      if( n<=LOOKASIDE_SMALL ) return p;
    }else
#endif
    if( ((uptr)p)>=(uptr)db->lookaside.pStart ){
      if( n<=db->lookaside.szTrue ) return p;
    }
  }
  return dbReallocFinish(db, p, n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3d6201
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3d62a0
movq %rax, -0x8(%rbp)
jmp 0x3d628c
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x1c0(%rcx), %rcx
cmpq %rcx, %rax
jae 0x3d6277
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x1b0(%rcx), %rcx
cmpq %rcx, %rax
jb 0x3d623f
cmpq $0x80, -0x20(%rbp)
ja 0x3d623d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d628c
jmp 0x3d6275
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x1b8(%rcx), %rcx
cmpq %rcx, %rax
jb 0x3d6273
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0x176(%rcx), %ecx
cmpq %rcx, %rax
ja 0x3d6271
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d628c
jmp 0x3d6273
jmp 0x3d6275
jmp 0x3d6277
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3d6470
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dbReallocFinish
static SQLITE_NOINLINE void *dbReallocFinish(sqlite3 *db, void *p, u64 n){
  void *pNew = 0;
  assert( db!=0 );
  assert( p!=0 );
  if( db->mallocFailed==0 ){
    if( isLookaside(db, p) ){
      pNew = sqlite3DbMallocRawNN(db, n);
      if( pNew ){
        memcpy(pNew, p, lookasideMallocSize(db, p));
        sqlite3DbFree(db, p);
      }
    }else{
      assert( sqlite3MemdebugHasType(p, (MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
      assert( sqlite3MemdebugNoType(p, (u8)~(MEMTYPE_LOOKASIDE|MEMTYPE_HEAP)) );
      sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
      pNew = sqlite3Realloc(p, n);
      if( !pNew ){
        sqlite3OomFault(db);
      }
      sqlite3MemdebugSetType(pNew,
            (db->lookaside.bDisable==0 ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
    }
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x61(%rax), %eax
cmpl $0x0, %eax
jne 0x3d6528
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d6580
cmpl $0x0, %eax
je 0x3d6503
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d62a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3d6501
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d65d0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq %eax, %rdx
callq 0x19610
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3c00a0
jmp 0x3d6526
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3c0910
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3d6524
movq -0x8(%rbp), %rdi
callq 0x3c8ba0
jmp 0x3d6526
jmp 0x3d6528
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dbMallocRawFinish
static SQLITE_NOINLINE void *dbMallocRawFinish(sqlite3 *db, u64 n){
  void *p;
  assert( db!=0 );
  p = sqlite3Malloc(n);
  if( !p ) sqlite3OomFault(db);
  sqlite3MemdebugSetType(p,
         (db->lookaside.bDisable==0) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP);
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c0760
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3d656d
movq -0x8(%rbp), %rdi
callq 0x3c8ba0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: strAccumFinishRealloc
static SQLITE_NOINLINE char *strAccumFinishRealloc(StrAccum *p){
  char *zText;
  assert( p->mxAlloc>0 && !isMalloced(p) );
  zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
  if( zText ){
    memcpy(zText, p->zText, p->nChar+1);
    p->printfFlags |= SQLITE_PRINTF_MALLOCED;
  }else{
    setStrAccumError(p, SQLITE_NOMEM);
  }
  p->zText = zText;
  return zText;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3cd3a0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d6670
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x19610
movq -0x8(%rbp), %rax
movzbl 0x1d(%rax), %ecx
orl $0x4, %ecx
movb %cl, 0x1d(%rax)
jmp 0x3d667e
movq -0x8(%rbp), %rdi
movl $0x7, %esi
callq 0x3d6120
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixClose
static int unixClose(sqlite3_file *id){
  int rc = SQLITE_OK;
  unixFile *pFile = (unixFile *)id;
  unixInodeInfo *pInode = pFile->pInode;

  assert( pInode!=0 );
  verifyDbFile(pFile);
  unixUnlock(id, NO_LOCK);
  assert( unixFileMutexNotheld(pFile) );
  unixEnterMutex();

  /* unixFile.pInode is always valid here. Otherwise, a different close
  ** routine (e.g. nolockClose()) would be called instead.
  */
  assert( pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0 );
  sqlite3_mutex_enter(pInode->pLockMutex);
  if( pInode->nLock ){
    /* If there are outstanding locks, do not actually close the file just
    ** yet because that would clear those locks.  Instead, add the file
    ** descriptor to pInode->pUnused list.  It will be automatically closed
    ** when the last lock is cleared.
    */
    setPendingFd(pFile);
  }
  sqlite3_mutex_leave(pInode->pLockMutex);
  releaseInodeInfo(pFile);
  rc = closeUnixFile(id);
  unixLeaveMutex();
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3d7ae0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3d6eb0
callq 0x3d7bd0
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x3d6713
movq -0x18(%rbp), %rdi
callq 0x3d7be0
movq -0x18(%rbp), %rdi
callq 0x3d7c40
movq -0x8(%rbp), %rdi
callq 0x3d7ce0
movl %eax, -0xc(%rbp)
callq 0x3d7d50
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixFileSize
static int unixFileSize(sqlite3_file *id, i64 *pSize){
  int rc;
  struct stat buf;
  assert( id );
  rc = osFstat(((unixFile*)id)->h, &buf);
  SimulateIOError( rc=1 );
  if( rc!=0 ){
    storeLastErrno((unixFile*)id, errno);
    return SQLITE_IOERR_FSTAT;
  }
  *pSize = buf.st_size;

  /* When opening a zero-size database, the findInodeInfo() procedure
  ** writes a single byte into that file in order to work around a bug
  ** in the OS-X msdos filesystem.  In order to avoid problems with upper
  ** layers, we need to report this file size as zero even though it is
  ** really 1.   Ticket #3260.
  */
  if( *pSize==1 ) *pSize = 0;


  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x269216(%rip), %rax    # 0x63fd40
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %edi
leaq -0xb0(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x3d6b6a
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x19060
movq -0xb8(%rbp), %rdi
movl (%rax), %esi
callq 0x3d83c0
movl $0x70a, -0x4(%rbp)      # imm = 0x70A
jmp 0x3d6b91
movq -0x80(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x1, (%rax)
jne 0x3d6b8a
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixCheckReservedLock
static int unixCheckReservedLock(sqlite3_file *id, int *pResOut){
  int rc = SQLITE_OK;
  int reserved = 0;
  unixFile *pFile = (unixFile*)id;

  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );

  assert( pFile );
  assert( pFile->eFileLock<=SHARED_LOCK );
  sqlite3_mutex_enter(pFile->pInode->pLockMutex);

  /* Check if a thread in this process holds such a lock */
  if( pFile->pInode->eFileLock>SHARED_LOCK ){
    reserved = 1;
  }

  /* Otherwise see if some other process holds it.
  */
#ifndef __DJGPP__
  if( !reserved && !pFile->pInode->bProcessLock ){
    struct flock lock;
    lock.l_whence = SEEK_SET;
    lock.l_start = RESERVED_BYTE;
    lock.l_len = 1;
    lock.l_type = F_WRLCK;
    if( osFcntl(pFile->h, F_GETLK, &lock) ){
      rc = SQLITE_IOERR_CHECKRESERVEDLOCK;
      storeLastErrno(pFile, errno);
    } else if( lock.l_type!=F_UNLCK ){
      reserved = 1;
    }
  }
#endif

  sqlite3_mutex_leave(pFile->pInode->pLockMutex);
  OSTRACE(("TEST WR-LOCK %d %d %d (unix)\n", pFile->h, rc, reserved));

  *pResOut = reserved;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movzbl 0x20(%rax), %eax
cmpl $0x1, %eax
jle 0x3d6f1e
movl $0x1, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x3d6fae
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpb $0x0, 0x21(%rax)
jne 0x3d6fae
movw $0x0, -0x3e(%rbp)
movl 0x268d6e(%rip), %eax    # 0x63fcb0
addl $0x1, %eax
cltq
movq %rax, -0x38(%rbp)
movq $0x1, -0x30(%rbp)
movw $0x1, -0x40(%rbp)
movq 0x268e10(%rip), %rcx    # 0x63fd70
movq -0x20(%rbp), %rax
movl 0x18(%rax), %edi
movl $0x5, %esi
leaq -0x40(%rbp), %rdx
movb $0x0, %al
callq *%rcx
cmpl $0x0, %eax
je 0x3d6f9a
movl $0xe0a, -0x14(%rbp)     # imm = 0xE0A
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x19060
movq -0x48(%rbp), %rdi
movl (%rax), %esi
callq 0x3d83c0
jmp 0x3d6fac
movswl -0x40(%rbp), %eax
cmpl $0x2, %eax
je 0x3d6faa
movl $0x1, -0x18(%rbp)
jmp 0x3d6fac
jmp 0x3d6fae
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: verifyDbFile
static void verifyDbFile(unixFile *pFile){
  struct stat buf;
  int rc;

  /* These verifications occurs for the main database only */
  if( pFile->ctrlFlags & UNIXFILE_NOLOCK ) return;

  rc = osFstat(pFile->h, &buf);
  if( rc!=0 ){
    sqlite3_log(SQLITE_WARNING, "cannot fstat db file %s", pFile->zPath);
    return;
  }
  if( buf.st_nlink==0 ){
    sqlite3_log(SQLITE_WARNING, "file unlinked while open: %s", pFile->zPath);
    return;
  }
  if( buf.st_nlink>1 ){
    sqlite3_log(SQLITE_WARNING, "multiple links to file: %s", pFile->zPath);
    return;
  }
  if( fileHasMoved(pFile) ){
    sqlite3_log(SQLITE_WARNING, "file renamed while open: %s", pFile->zPath);
    return;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x1e(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x3d7b06
jmp 0x3d7bc0
movq 0x268233(%rip), %rax    # 0x63fd40
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %edi
leaq -0x98(%rbp), %rsi
callq *%rax
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x3d7b49
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdx
movl $0x1c, %edi
leaq 0x1d33b1(%rip), %rsi    # 0x5aaef1
movb $0x0, %al
callq 0x3c3970
jmp 0x3d7bc0
cmpq $0x0, -0x88(%rbp)
jne 0x3d7b70
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdx
movl $0x1c, %edi
leaq 0x1d33a2(%rip), %rsi    # 0x5aaf09
movb $0x0, %al
callq 0x3c3970
jmp 0x3d7bc0
cmpq $0x1, -0x88(%rbp)
jbe 0x3d7b97
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdx
movl $0x1c, %edi
leaq 0x1d3398(%rip), %rsi    # 0x5aaf26
movb $0x0, %al
callq 0x3c3970
jmp 0x3d7bc0
movq -0x8(%rbp), %rdi
callq 0x3d7d60
cmpl $0x0, %eax
je 0x3d7bc0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdx
movl $0x1c, %edi
leaq 0x1d3388(%rip), %rsi    # 0x5aaf41
movb $0x0, %al
callq 0x3c3970
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: setPendingFd
static void setPendingFd(unixFile *pFile){
  unixInodeInfo *pInode = pFile->pInode;
  UnixUnusedFd *p = pFile->pPreallocatedUnused;
  assert( unixFileMutexHeld(pFile) );
  p->pNext = pInode->pUnused;
  pInode->pUnused = p;
  pFile->h = -1;
  pFile->pPreallocatedUnused = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: releaseInodeInfo
static void releaseInodeInfo(unixFile *pFile){
  unixInodeInfo *pInode = pFile->pInode;
  assert( unixMutexHeld() );
  assert( unixFileMutexNotheld(pFile) );
  if( ALWAYS(pInode) ){
    pInode->nRef--;
    if( pInode->nRef==0 ){
      assert( pInode->pShmNode==0 );
      sqlite3_mutex_enter(pInode->pLockMutex);
      closePendingFds(pFile);
      sqlite3_mutex_leave(pInode->pLockMutex);
      if( pInode->pPrev ){
        assert( pInode->pPrev->pNext==pInode );
        pInode->pPrev->pNext = pInode->pNext;
      }else{
        assert( inodeList==pInode );
        inodeList = pInode->pNext;
      }
      if( pInode->pNext ){
        assert( pInode->pNext->pPrev==pInode );
        pInode->pNext->pPrev = pInode->pPrev;
      }
      sqlite3_mutex_free(pInode->pLockMutex);
      sqlite3_free(pInode);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d7cd9
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x3d7cd7
movq -0x8(%rbp), %rdi
callq 0x3d8170
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x3d7ca0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rcx, 0x40(%rax)
jmp 0x3d7caf
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x26b759(%rip)    # 0x643408
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3d7cce
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdi
callq 0x3c0800
jmp 0x3d7cd9
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: closeUnixFile
static int closeUnixFile(sqlite3_file *id){
  unixFile *pFile = (unixFile*)id;
#if SQLITE_MAX_MMAP_SIZE>0
  unixUnmapfile(pFile);
#endif
  if( pFile->h>=0 ){
    robust_close(pFile, pFile->h, __LINE__);
    pFile->h = -1;
  }
#if OS_VXWORKS
  if( pFile->pId ){
    if( pFile->ctrlFlags & UNIXFILE_DELETE ){
      osUnlink(pFile->pId->zCanonicalName);
    }
    vxworksReleaseFileId(pFile->pId);
    pFile->pId = 0;
  }
#endif
#ifdef SQLITE_UNLINK_AFTER_CLOSE
  if( pFile->ctrlFlags & UNIXFILE_DELETE ){
    osUnlink(pFile->zPath);
    sqlite3_free(*(char**)&pFile->zPath);
    pFile->zPath = 0;
  }
#endif
  OSTRACE(("CLOSE   %-3d\n", pFile->h));
  OpenCounter(-1);
  sqlite3_free(pFile->pPreallocatedUnused);
  memset(pFile, 0, sizeof(unixFile));
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3d8240
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jl 0x3d7d27
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movl $0x8b38, %edx           # imm = 0x8B38
callq 0x3d81e0
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3c0800
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x78, %edx
callq 0x19360
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: fileHasMoved
static int fileHasMoved(unixFile *pFile){
#if OS_VXWORKS
  return pFile->pInode!=0 && pFile->pId!=pFile->pInode->fileId.pId;
#else
  struct stat buf;
  return pFile->pInode!=0 &&
      (osStat(pFile->zPath, &buf)!=0
         || (u64)buf.st_ino!=pFile->pInode->fileId.ino);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x10(%rcx)
movb %al, -0x99(%rbp)
je 0x3d7dd1
movq 0x267f9f(%rip), %rax    # 0x63fd28
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rdi
leaq -0x98(%rbp), %rsi
callq *%rax
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x9a(%rbp)
jne 0x3d7dc5
movq -0x90(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq 0x8(%rcx), %rax
setne %al
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: openDirectory
static int openDirectory(const char *zFilename, int *pFd){
  int ii;
  int fd = -1;
  char zDirname[MAX_PATHNAME+1];

  sqlite3_snprintf(MAX_PATHNAME, zDirname, "%s", zFilename);
  for(ii=(int)strlen(zDirname); ii>0 && zDirname[ii]!='/'; ii--);
  if( ii>0 ){
    zDirname[ii] = '\0';
  }else{
    if( zDirname[0]!='/' ) zDirname[0] = '.';
    zDirname[1] = 0;
  }
  fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0);
  if( fd>=0 ){
    OSTRACE(("OPENDIR %-3d %s\n", fd, zDirname));
  }
  *pFd = fd;
  if( fd>=0 ) return SQLITE_OK;
  return unixLogError(SQLITE_CANTOPEN_BKPT, "openDirectory", zDirname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
leaq -0x230(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x200, %edi            # imm = 0x200
leaq 0x1c41d0(%rip), %rdx    # 0x59c021
movb $0x0, %al
callq 0x3c38c0
leaq -0x230(%rbp), %rdi
callq 0x192b0
movl %eax, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x231(%rbp)
jle 0x3d7e8d
movslq -0x1c(%rbp), %rax
movsbl -0x230(%rbp,%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x231(%rbp)
movb -0x231(%rbp), %al
testb $0x1, %al
jne 0x3d7e99
jmp 0x3d7ea6
jmp 0x3d7e9b
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3d7e67
cmpl $0x0, -0x1c(%rbp)
jle 0x3d7eba
movslq -0x1c(%rbp), %rax
movb $0x0, -0x230(%rbp,%rax)
jmp 0x3d7ed4
movsbl -0x230(%rbp), %eax
cmpl $0x2f, %eax
je 0x3d7ecd
movb $0x2e, -0x230(%rbp)
movb $0x0, -0x22f(%rbp)
leaq -0x230(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x3d7f50
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x3d7eef
jmp 0x3d7eef
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x20(%rbp)
jl 0x3d7f07
movl $0x0, -0x4(%rbp)
jmp 0x3d7f2e
movl $0x917b, %edi           # imm = 0x917B
callq 0x3d80e0
movl %eax, %edi
leaq -0x230(%rbp), %rdx
leaq 0x1d3089(%rip), %rsi    # 0x5aafaa
movl $0x917b, %ecx           # imm = 0x917B
callq 0x3d8070
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: seekAndRead
static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
  int got;
  int prior = 0;
#if (!defined(USE_PREAD) && !defined(USE_PREAD64))
  i64 newOffset;
#endif
  TIMER_START;
  assert( cnt==(cnt&0x1ffff) );
  assert( id->h>2 );
  do{
#if defined(USE_PREAD)
    got = osPread(id->h, pBuf, cnt, offset);
    SimulateIOError( got = -1 );
#elif defined(USE_PREAD64)
    got = osPread64(id->h, pBuf, cnt, offset);
    SimulateIOError( got = -1 );
#else
    newOffset = lseek(id->h, offset, SEEK_SET);
    SimulateIOError( newOffset = -1 );
    if( newOffset<0 ){
      storeLastErrno((unixFile*)id, errno);
      return -1;
    }
    got = osRead(id->h, pBuf, cnt);
#endif
    if( got==cnt ) break;
    if( got<0 ){
      if( errno==EINTR ){ got = 1; continue; }
      prior = 0;
      storeLastErrno((unixFile*)id,  errno);
      break;
    }else if( got>0 ){
      cnt -= got;
      offset += got;
      prior += got;
      pBuf = (void*)(got + (char*)pBuf);
    }
  }while( got>0 );
  TIMER_END;
  OSTRACE(("READ    %-3d %5d %7lld %llu\n",
            id->h, got+prior, offset-prior, TIMER_ELAPSED));
  return got+prior;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x19660
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0x3d82ff
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x19060
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x3d83c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d83ac
movq 0x267a82(%rip), %rax    # 0x63fd88
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %edi
movq -0x20(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq *%rax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x3d8324
jmp 0x3d83a3
cmpl $0x0, -0x28(%rbp)
jge 0x3d835e
callq 0x19060
cmpl $0x4, (%rax)
jne 0x3d833d
movl $0x1, -0x28(%rbp)
jmp 0x3d8399
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
callq 0x19060
movq -0x48(%rbp), %rdi
movl (%rax), %esi
callq 0x3d83c0
jmp 0x3d83a3
cmpl $0x0, -0x28(%rbp)
jle 0x3d8395
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movslq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x3d8397
jmp 0x3d8399
cmpl $0x0, -0x28(%rbp)
jg 0x3d82be
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: seekAndWriteFd
static int seekAndWriteFd(
  int fd,                         /* File descriptor to write to */
  i64 iOff,                       /* File offset to begin writing at */
  const void *pBuf,               /* Copy data from this buffer to the file */
  int nBuf,                       /* Size of buffer pBuf in bytes */
  int *piErrno                    /* OUT: Error number if error occurs */
){
  int rc = 0;                     /* Value returned by system call */

  assert( nBuf==(nBuf&0x1ffff) );
  assert( fd>2 );
  assert( piErrno!=0 );
  nBuf &= 0x1ffff;
  TIMER_START;

#if defined(USE_PREAD)
  do{ rc = (int)osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
#elif defined(USE_PREAD64)
  do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
#else
  do{
    i64 iSeek = lseek(fd, iOff, SEEK_SET);
    SimulateIOError( iSeek = -1 );
    if( iSeek<0 ){
      rc = -1;
      break;
    }
    rc = osWrite(fd, pBuf, nBuf);
  }while( rc<0 && errno==EINTR );
#endif

  TIMER_END;
  OSTRACE(("WRITE   %-3d %5d %7lld %llu\n", fd, rc, iOff, TIMER_ELAPSED));

  if( rc<0 ) *piErrno = errno;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x1ffff, %eax          # imm = 0x1FFFF
movl %eax, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x19660
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0x3d846e
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3d84a5
movq 0x26795b(%rip), %rax    # 0x63fdd0
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
movb %al, -0x39(%rbp)
jge 0x3d849e
callq 0x19060
cmpl $0x4, (%rax)
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x3d844c
cmpl $0x0, -0x2c(%rbp)
jge 0x3d84b8
callq 0x19060
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: robust_ftruncate
static int robust_ftruncate(int h, sqlite3_int64 sz){
  int rc;
#ifdef __ANDROID__
  /* On Android, ftruncate() always uses 32-bit offsets, even if
  ** _FILE_OFFSET_BITS=64 is defined. This means it is unsafe to attempt to
  ** truncate a file to any size larger than 2GiB. Silently ignore any
  ** such attempts.  */
  if( sz>(sqlite3_int64)0x7FFFFFFF ){
    rc = SQLITE_OK;
  }else
#endif
  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x267872(%rip), %rax    # 0x63fd58
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x15(%rbp)
jge 0x3d850b
callq 0x19060
cmpl $0x4, (%rax)
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x3d84df
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixFileLock
static int unixFileLock(unixFile *pFile, struct flock *pLock){
  int rc;
  unixInodeInfo *pInode = pFile->pInode;
  assert( pInode!=0 );
  assert( sqlite3_mutex_held(pInode->pLockMutex) );
  if( (pFile->ctrlFlags & (UNIXFILE_EXCL|UNIXFILE_RDONLY))==UNIXFILE_EXCL ){
    if( pInode->bProcessLock==0 ){
      struct flock lock;
      assert( pInode->nLock==0 );
      lock.l_whence = SEEK_SET;
      lock.l_start = SHARED_FIRST;
      lock.l_len = SHARED_SIZE;
      lock.l_type = F_WRLCK;
      rc = osSetPosixAdvisoryLock(pFile->h, &lock, pFile);
      if( rc<0 ) return rc;
      pInode->bProcessLock = 1;
      pInode->nLock++;
    }else{
      rc = 0;
    }
  }else{
    rc = osSetPosixAdvisoryLock(pFile->h, pLock, pFile);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x1e(%rax), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x3d85f8
movq -0x28(%rbp), %rax
movzbl 0x21(%rax), %eax
cmpl $0x0, %eax
jne 0x3d85ef
movw $0x0, -0x46(%rbp)
movl 0x26771b(%rip), %eax    # 0x63fcb0
addl $0x2, %eax
cltq
movq %rax, -0x40(%rbp)
movq $0x1fe, -0x38(%rbp)     # imm = 0x1FE
movw $0x1, -0x48(%rbp)
movq 0x2677bd(%rip), %rcx    # 0x63fd70
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movl $0x6, %esi
leaq -0x48(%rbp), %rdx
movb $0x0, %al
callq *%rcx
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x3d85d8
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d861c
movq -0x28(%rbp), %rax
movb $0x1, 0x21(%rax)
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
jmp 0x3d85f6
movl $0x0, -0x1c(%rbp)
jmp 0x3d8616
movq 0x267771(%rip), %rcx    # 0x63fd70
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rdx
movl $0x6, %esi
movb $0x0, %al
callq *%rcx
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqliteErrorFromPosixError
static int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {
  assert( (sqliteIOErr == SQLITE_IOERR_LOCK) ||
          (sqliteIOErr == SQLITE_IOERR_UNLOCK) ||
          (sqliteIOErr == SQLITE_IOERR_RDLOCK) ||
          (sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK) );
  switch (posixError) {
  case EACCES:
  case EAGAIN:
  case ETIMEDOUT:
  case EBUSY:
  case EINTR:
  case ENOLCK:
    /* random NFS retry error, unless during file system support
     * introspection, in which it actually means what it says */
    return SQLITE_BUSY;

  case EPERM:
    return SQLITE_PERM;

  default:
    return sqliteIOErr;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
subl $0x1, %eax
je 0x3d868c
jmp 0x3d8647
movl -0x10(%rbp), %eax
subl $0x4, %eax
je 0x3d8683
jmp 0x3d8651
movl -0x10(%rbp), %eax
subl $0xb, %eax
je 0x3d8683
jmp 0x3d865b
movl -0x10(%rbp), %eax
subl $0xd, %eax
je 0x3d8683
jmp 0x3d8665
movl -0x10(%rbp), %eax
subl $0x10, %eax
je 0x3d8683
jmp 0x3d866f
movl -0x10(%rbp), %eax
subl $0x25, %eax
je 0x3d8683
jmp 0x3d8679
movl -0x10(%rbp), %eax
subl $0x6e, %eax
jne 0x3d8695
jmp 0x3d8683
movl $0x5, -0x4(%rbp)
jmp 0x3d869b
movl $0x3, -0x4(%rbp)
jmp 0x3d869b
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixGetTempname
static int unixGetTempname(int nBuf, char *zBuf){
  const char *zDir;
  int iLimit = 0;

  /* It's odd to simulate an io-error here, but really this is just
  ** using the io-error infrastructure to test that SQLite handles this
  ** function failing.
  */
  zBuf[0] = 0;
  SimulateIOError( return SQLITE_IOERR );

  zDir = unixTempFileDir();
  if( zDir==0 ) return SQLITE_IOERR_GETTEMPPATH;
  do{
    u64 r;
    sqlite3_randomness(sizeof(r), &r);
    assert( nBuf>2 );
    zBuf[nBuf-2] = 0;
    sqlite3_snprintf(nBuf, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX"%llx%c",
                     zDir, r, 0);
    if( zBuf[nBuf-2]!=0 || (iLimit++)>10 ) return SQLITE_ERROR;
  }while( osAccess(zBuf,0)==0 );
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
callq 0x3d8cb0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x3d8b59
movl $0x190a, -0x4(%rbp)     # imm = 0x190A
jmp 0x3d8bea
jmp 0x3d8b5b
movl $0x8, %edi
leaq -0x28(%rbp), %rsi
callq 0x3c3b60
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq 0x1d24de(%rip), %rdx    # 0x5ab06e
xorl %r9d, %r9d
movb $0x0, %al
callq 0x3c38c0
movq -0x10(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x3d8bc0
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0xa, %eax
jle 0x3d8bc9
movl $0x1, -0x4(%rbp)
jmp 0x3d8bea
jmp 0x3d8bcb
movq 0x267126(%rip), %rax    # 0x63fcf8
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq *%rax
cmpl $0x0, %eax
je 0x3d8b5b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixMapfile
static int unixMapfile(unixFile *pFd, i64 nMap){
  assert( nMap>=0 || pFd->nFetchOut==0 );
  assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) );
  if( pFd->nFetchOut>0 ) return SQLITE_OK;

  if( nMap<0 ){
    struct stat statbuf;          /* Low-level file information */
    if( osFstat(pFd->h, &statbuf) ){
      return SQLITE_IOERR_FSTAT;
    }
    nMap = statbuf.st_size;
  }
  if( nMap>pFd->mmapSizeMax ){
    nMap = pFd->mmapSizeMax;
  }

  assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) );
  if( nMap!=pFd->mmapSize ){
    unixRemapfile(pFd, nMap);
  }

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jle 0x3d8c26
movl $0x0, -0x4(%rbp)
jmp 0x3d8c96
cmpq $0x0, -0x18(%rbp)
jge 0x3d8c5a
movq 0x26710c(%rip), %rax    # 0x63fd40
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %edi
leaq -0xa8(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x3d8c52
movl $0x70a, -0x4(%rbp)      # imm = 0x70A
jmp 0x3d8c96
movq -0x78(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jle 0x3d8c74
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
je 0x3d8c8f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d8dc0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixTempFileDir
static const char *unixTempFileDir(void){
  static const char *azDirs[] = {
     0,
     0,
     "/var/tmp",
     "/usr/tmp",
     "/tmp",
     "."
  };
  unsigned int i = 0;
  struct stat buf;
  const char *zDir = sqlite3_temp_directory;

  if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
  if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
  while(1){
    if( zDir!=0
     && osStat(zDir, &buf)==0
     && S_ISDIR(buf.st_mode)
     && osAccess(zDir, 03)==0
    ){
      return zDir;
    }
    if( i>=sizeof(azDirs)/sizeof(azDirs[0]) ) break;
    zDir = azDirs[i++];
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0x0, -0xc(%rbp)
leaq 0x26a677(%rip), %rax    # 0x643340
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, 0x2672a5(%rip)    # 0x63ff80
jne 0x3d8cf0
leaq 0x1d239b(%rip), %rdi    # 0x5ab07f
callq 0x198a0
movq %rax, 0x267290(%rip)    # 0x63ff80
cmpq $0x0, 0x267290(%rip)    # 0x63ff88
jne 0x3d8d0d
leaq 0x1d2385(%rip), %rdi    # 0x5ab086
callq 0x198a0
movq %rax, 0x26727b(%rip)    # 0x63ff88
jmp 0x3d8d0f
cmpq $0x0, -0xa8(%rbp)
je 0x3d8d6e
movq 0x267008(%rip), %rax    # 0x63fd28
movq -0xa8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
jne 0x3d8d6e
movl -0x88(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x3d8d6e
movq 0x266faa(%rip), %rax    # 0x63fcf8
movq -0xa8(%rbp), %rdi
movl $0x3, %esi
callq *%rax
cmpl $0x0, %eax
jne 0x3d8d6e
movq -0xa8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d8da7
movl -0xc(%rbp), %eax
cmpq $0x6, %rax
jb 0x3d8d79
jmp 0x3d8d9f
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0x2671f1(%rip), %rax    # 0x63ff80
movq (%rax,%rcx,8), %rax
movq %rax, -0xa8(%rbp)
jmp 0x3d8d0f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixShmRegionPerMap
static int unixShmRegionPerMap(void){
  int shmsz = 32*1024;            /* SHM region size */
  int pgsz = osGetpagesize();   /* System page size */
  assert( ((pgsz-1)&pgsz)==0 );   /* Page size must be a power of 2 */
  if( pgsz<shmsz ) return 1;
  return pgsz/shmsz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x8000, -0x8(%rbp)     # imm = 0x8000
callq *0x266f8b(%rip)         # 0x63ff20
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3d8fa9
movl $0x1, -0x4(%rbp)
jmp 0x3d8fb3
movl -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unixShmPurge
static void unixShmPurge(unixFile *pFd){
  unixShmNode *p = pFd->pInode->pShmNode;
  assert( unixMutexHeld() );
  if( p && ALWAYS(p->nRef==0) ){
    int nShmPerMap = unixShmRegionPerMap();
    int i;
    assert( p->pInode==pFd->pInode );
    sqlite3_mutex_free(p->pShmMutex);
    for(i=0; i<p->nRegion; i+=nShmPerMap){
      if( p->hShm>=0 ){
        osMunmap(p->apRegion[i], p->szRegion);
      }else{
        sqlite3_free(p->apRegion[i]);
      }
    }
    sqlite3_free(p->apRegion);
    if( p->hShm>=0 ){
      robust_close(pFd, p->hShm, __LINE__);
      p->hShm = -1;
    }
    p->pInode->pShmNode = 0;
    sqlite3_free(p);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d9511
movq -0x10(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x3d9511
callq 0x3d8f80
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jge 0x3d94c2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jl 0x3d94a0
movq 0x266a6c(%rip), %rax    # 0x63fef0
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq -0x10(%rbp), %rcx
movslq 0x1c(%rcx), %rsi
callq *%rax
jmp 0x3d94b5
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3c0800
jmp 0x3d94b7
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x3d9464
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3c0800
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jl 0x3d94f9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
movl $0x944a, %edx           # imm = 0x944A
callq 0x3d81e0
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rdi
callq 0x3c0800
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: getFileMode
static int getFileMode(
  const char *zFile,              /* File name */
  mode_t *pMode,                  /* OUT: Permissions of zFile */
  uid_t *pUid,                    /* OUT: uid of zFile. */
  gid_t *pGid                     /* OUT: gid of zFile. */
){
  struct stat sStat;              /* Output of stat() on database file */
  int rc = SQLITE_OK;
  if( 0==osStat(zFile, &sStat) ){
    *pMode = sStat.st_mode & 0777;
    *pUid = sStat.st_uid;
    *pGid = sStat.st_gid;
  }else{
    rc = SQLITE_IOERR_FSTAT;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0xb4(%rbp)
movq 0x26624c(%rip), %rax    # 0x63fd28
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x3d9b1d
movl -0x98(%rbp), %ecx
andl $0x1ff, %ecx            # imm = 0x1FF
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x94(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x90(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3d9b27
movl $0x70a, -0xb4(%rbp)     # imm = 0x70A
movl -0xb4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dotlockClose
static int dotlockClose(sqlite3_file *id) {
  unixFile *pFile = (unixFile*)id;
  assert( id!=0 );
  dotlockUnlock(id, NO_LOCK);
  sqlite3_free(pFile->lockingContext);
  return closeUnixFile(id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3d9ef0
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3c0800
movq -0x8(%rbp), %rdi
callq 0x3d7ce0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dotlockUnlock
static int dotlockUnlock(sqlite3_file *id, int eFileLock) {
  unixFile *pFile = (unixFile*)id;
  char *zLockFile = (char *)pFile->lockingContext;
  int rc;

  assert( pFile );
  OSTRACE(("UNLOCK  %d %d was %d pid=%d (dotlock)\n", pFile->h, eFileLock,
           pFile->eFileLock, osGetpid(0)));
  assert( eFileLock<=SHARED_LOCK );

  /* no-op if possible */
  if( pFile->eFileLock==eFileLock ){
    return SQLITE_OK;
  }

  /* To downgrade to shared, simply update our internal notion of the
  ** lock state.  No need to mess with the file on disk.
  */
  if( eFileLock==SHARED_LOCK ){
    pFile->eFileLock = SHARED_LOCK;
    return SQLITE_OK;
  }

  /* To fully unlock the database, delete the lock file */
  assert( eFileLock==NO_LOCK );
  rc = osRmdir(zLockFile);
  if( rc<0 ){
    int tErrno = errno;
    if( tErrno==ENOENT ){
      rc = SQLITE_OK;
    }else{
      rc = SQLITE_IOERR_UNLOCK;
      storeLastErrno(pFile, tErrno);
    }
    return rc;
  }
  pFile->eFileLock = NO_LOCK;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x3d9f29
movl $0x0, -0x4(%rbp)
jmp 0x3d9f99
cmpl $0x1, -0x14(%rbp)
jne 0x3d9f40
movq -0x20(%rbp), %rax
movb $0x1, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3d9f99
movq 0x265f49(%rip), %rax    # 0x63fe90
movq -0x28(%rbp), %rdi
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x3d9f8a
callq 0x19060
movl (%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x2, -0x30(%rbp)
jne 0x3d9f6f
movl $0x0, -0x2c(%rbp)
jmp 0x3d9f82
movl $0x80a, -0x2c(%rbp)     # imm = 0x80A
movq -0x20(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x3d83c0
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d9f99
movq -0x20(%rbp), %rax
movb $0x0, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dotlockCheckReservedLock
static int dotlockCheckReservedLock(sqlite3_file *id, int *pResOut) {
  int rc = SQLITE_OK;
  int reserved = 0;
  unixFile *pFile = (unixFile*)id;

  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );

  assert( pFile );
  reserved = osAccess((const char*)pFile->lockingContext, 0)==0;
  OSTRACE(("TEST WR-LOCK %d %d %d (dotlock)\n", pFile->h, rc, reserved));
  *pResOut = reserved;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x265d1b(%rip), %rax    # 0x63fcf8
movq -0x20(%rbp), %rcx
movq 0x28(%rcx), %rdi
xorl %esi, %esi
callq *%rax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)