LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_unlock_notify
SQLITE_API int sqlite3_unlock_notify(
  sqlite3 *db,
  void (*xNotify)(void **, int),
  void *pArg
){
  int rc = SQLITE_OK;

  sqlite3_mutex_enter(db->mutex);
  enterMutex();

  if( xNotify==0 ){
    removeFromBlockedList(db);
    db->pBlockingConnection = 0;
    db->pUnlockConnection = 0;
    db->xUnlockNotify = 0;
    db->pUnlockArg = 0;
  }else if( 0==db->pBlockingConnection ){
    /* The blocking transaction has been concluded. Or there never was a
    ** blocking transaction. In either case, invoke the notify callback
    ** immediately.
    */
    xNotify(&pArg, 1);
  }else{
    sqlite3 *p;

    for(p=db->pBlockingConnection; p && p!=db; p=p->pUnlockConnection){}
    if( p ){
      rc = SQLITE_LOCKED;              /* Deadlock detected. */
    }else{
      db->pUnlockConnection = db->pBlockingConnection;
      db->xUnlockNotify = xNotify;
      db->pUnlockArg = pArg;
      removeFromBlockedList(db);
      addToBlockedList(db);
    }
  }

  leaveMutex();
  assert( !db->mallocFailed );
  sqlite3ErrorWithMsg(db, rc, (rc?"database is deadlocked":0));
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdx, (%rsp)
testq %rsi, %rsi
je 0x28c30b
movq %rsi, %rax
movq 0x2d8(%rbx), %rsi
testq %rsi, %rsi
je 0x28c339
movq %rdx, %rcx
movl $0x6, %ebp
leaq 0x152ec4(%rip), %rdx    # 0x3df15a
cmpq %rbx, %rsi
je 0x28c36b
movq %rsi, %rdi
movq 0x2e0(%rdi), %rdi
testq %rdi, %rdi
je 0x28c2b3
cmpq %rbx, %rdi
jne 0x28c2a2
testq %rdi, %rdi
jne 0x28c36b
movq %rsi, 0x2e0(%rbx)
movq %rax, 0x2f0(%rbx)
movq %rcx, 0x2e8(%rbx)
movq 0x23db80(%rip), %rax    # 0x4c9e58
testq %rax, %rax
je 0x28c391
cmpq %rbx, %rax
je 0x28c380
movq %rax, %rcx
movq 0x2f8(%rax), %rax
testq %rax, %rax
je 0x28c391
cmpq %rbx, %rax
jne 0x28c2ea
addq $0x2f8, %rcx            # imm = 0x2F8
jmp 0x28c387
movq 0x23db46(%rip), %rax    # 0x4c9e58
testq %rax, %rax
je 0x28c356
cmpq %rbx, %rax
je 0x28c345
movq %rax, %rcx
movq 0x2f8(%rax), %rax
testq %rax, %rax
je 0x28c356
cmpq %rbx, %rax
jne 0x28c31c
addq $0x2f8, %rcx            # imm = 0x2F8
jmp 0x28c34c
movq %rsp, %rdi
movl $0x1, %esi
callq *%rax
jmp 0x28c367
leaq 0x23db0c(%rip), %rcx    # 0x4c9e58
movq 0x2f8(%rax), %rax
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2e8(%rbx)
movups %xmm0, 0x2d8(%rbx)
xorl %edx, %edx
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x27fc17
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x23dad1(%rip), %rcx    # 0x4c9e58
movq 0x2f8(%rax), %rax
movq %rax, (%rcx)
movq 0x23dac0(%rip), %rax    # 0x4c9e58
leaq 0x23dab9(%rip), %rcx    # 0x4c9e58
testq %rax, %rax
je 0x28c3d3
movq 0x2f0(%rbx), %rdx
cmpq %rdx, 0x2f0(%rax)
je 0x28c3d3
movq %rax, %rcx
movq 0x2f8(%rax), %rax
testq %rax, %rax
je 0x28c3cc
cmpq %rdx, 0x2f0(%rax)
jne 0x28c3b4
addq $0x2f8, %rcx            # imm = 0x2F8
movq %rax, 0x2f8(%rbx)
movq %rbx, (%rcx)
jmp 0x28c367
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movb %bpl, 0x1c(%rdi)
cmpl $0x0, 0x14(%rdi)
je 0x28c49d
movq %rbx, %rdi
callq 0x27e394
cmpb $0x12, %bpl
jne 0x28c4c1
movq (%rbx), %rax
testq %rax, %rax
je 0x28c4c1
movq 0x130(%rax), %rax
testq %rax, %rax
je 0x28c4c1
movl $0x12, 0x18(%rax)
incl 0x30(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rsi, %rsi
je 0x28c504
cmpq %rsi, 0x1c0(%rdi)
jbe 0x28c5be
cmpq %rsi, 0x1b0(%rdi)
jbe 0x28c509
cmpq %rsi, 0x1b8(%rdi)
ja 0x28c5be
movzwl 0x176(%rdi), %eax
cmpq %rdx, %rax
jb 0x28c5be
movq %rsi, %rax
retq
movq %rdx, %rsi
jmp 0x28c518
cmpq $0x81, %rdx
jae 0x28c5be
jmp 0x28c500
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
cmpb $0x0, 0x61(%rdi)
je 0x28c5d5
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %r15
movq %rdi, %rbx
cmpq %rsi, 0x1b8(%rdi)
ja 0x28c632
cmpq %r15, 0x1c0(%rbx)
jbe 0x28c632
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x28c518
testq %rax, %rax
je 0x28c5c9
movq %rax, %r14
movl $0x80, %edx
cmpq %r15, 0x1b0(%rbx)
jbe 0x28c615
movzwl 0x176(%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x17660
testq %r15, %r15
je 0x28c5cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28c3e7
jmp 0x28c5cc
movq %r15, %rdi
movq %rdx, %rsi
callq 0x27c4f3
movq %rax, %r14
testq %rax, %rax
jne 0x28c5cc
movq %rbx, %rdi
callq 0x2824bb
jmp 0x28c5c9
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x27c381
movq %rax, %r14
testq %rax, %rax
jne 0x28c671
movq %rbx, %rdi
callq 0x2824bb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x18(%rbx), %esi
incl %esi
testq %rdi, %rdi
je 0x28c697
callq 0x28c518
jmp 0x28c69f
movq %rsi, %rdi
callq 0x27c381
movq %rax, %r14
testq %rax, %rax
je 0x28c6be
movq 0x8(%rbx), %rsi
movl 0x18(%rbx), %edx
incl %edx
movq %r14, %rdi
callq 0x17660
orb $0x4, 0x1d(%rbx)
jmp 0x28c6d0
movb $0x7, 0x1c(%rbx)
cmpl $0x0, 0x14(%rbx)
je 0x28c6d0
movq %rbx, %rdi
callq 0x27e394
movq %r14, 0x8(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
callq 0x28db57
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28cd28
cmpl $0x0, 0x1c(%r14)
je 0x28c72b
movq 0x10(%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x28(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq %rcx, 0x28(%rax)
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x30(%rbx)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x28c778
decl 0x30(%r14)
jne 0x28c778
movq %rbx, %rdi
callq 0x28dea7
movq 0x48(%r14), %rax
leaq 0x40(%rax), %rcx
testq %rax, %rax
leaq 0x23d64c(%rip), %rax    # 0x4c9da0
cmovneq %rcx, %rax
movq 0x40(%r14), %rcx
movq %rcx, (%rax)
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x28c770
movq 0x48(%r14), %rcx
movq %rcx, 0x48(%rax)
movq %r14, %rdi
callq 0x27c490
movq %rbx, %rdi
callq 0x28dbfe
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %edi
leaq 0x8(%rsp), %rsi
callq *0x23a0a2(%rip)         # 0x4c6b50
testl %eax, %eax
je 0x28cac4
callq 0x17060
movl (%rax), %eax
movl %eax, 0x20(%r14)
movl $0x70a, %eax            # imm = 0x70A
jmp 0x28cadb
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movl $0x0, %edx
cmovneq %rcx, %rdx
movq %rdx, (%rbx)
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq 0x10(%rdi), %rax
cmpb $0x1, 0x20(%rax)
ja 0x28ceb6
xorl %ebp, %ebp
cmpb $0x0, 0x21(%rax)
movl $0x0, %eax
jne 0x28cebd
movq %rdi, %r14
movslq 0x239c4a(%rip), %rax    # 0x4c6ac0
incq %rax
movq %rsp, %rdx
movq %rax, 0x8(%rdx)
movq $0x1, 0x10(%rdx)
movl $0x1, (%rdx)
movl 0x18(%rdi), %edi
xorl %ebp, %ebp
movl $0x5, %esi
xorl %eax, %eax
callq *0x239ce0(%rip)         # 0x4c6b80
testl %eax, %eax
je 0x28cec8
callq 0x17060
movl (%rax), %eax
movl %eax, 0x20(%r14)
movl $0xe0a, %eax            # imm = 0xE0A
jmp 0x28cebd
xorl %eax, %eax
movl $0x1, %ebp
movl %ebp, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
cmpw $0x2, (%rsp)
setne %bpl
xorl %eax, %eax
jmp 0x28cebd
// File: /workspace/github_c_makefile_star2_O1/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:
testb $-0x80, 0x1e(%rdi)
jne 0x28db97
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %rbx
movl 0x18(%rdi), %edi
movq %rsp, %rsi
callq *0x238fdc(%rip)         # 0x4c6b50
testl %eax, %eax
je 0x28db98
movq 0x38(%rbx), %rdx
leaq 0x151643(%rip), %rsi    # 0x3df1c6
movl $0x1c, %edi
xorl %eax, %eax
callq 0x27e637
addq $0x120, %rsp            # imm = 0x120
popq %rbx
retq
movq 0x10(%rsp), %rax
cmpq $0x1, %rax
je 0x28dbb5
testq %rax, %rax
jne 0x28dbf1
movq 0x38(%rbx), %rdx
leaq 0x15162b(%rip), %rsi    # 0x3df1de
jmp 0x28db83
cmpq $0x0, 0x10(%rbx)
je 0x28db8f
movq 0x38(%rbx), %rdi
leaq 0x90(%rsp), %rsi
callq *0x238f6a(%rip)         # 0x4c6b38
testl %eax, %eax
jne 0x28dbe4
movq 0x98(%rsp), %rax
movq 0x10(%rbx), %rcx
cmpq 0x8(%rcx), %rax
je 0x28db8f
movq 0x38(%rbx), %rdx
leaq 0x151627(%rip), %rsi    # 0x3df216
jmp 0x28db83
movq 0x38(%rbx), %rdx
leaq 0x1515ff(%rip), %rsi    # 0x3df1fb
jmp 0x28db83
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rdi
testq %rdi, %rdi
je 0x28dc24
movq 0x58(%rbx), %rsi
callq *0x2390eb(%rip)         # 0x4c6d00
movq $0x0, 0x68(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movl 0x18(%rbx), %edi
testl %edi, %edi
js 0x28dc5f
callq *0x238ebf(%rip)         # 0x4c6af0
testl %eax, %eax
je 0x28dc58
testq %rbx, %rbx
je 0x28dc40
movq 0x38(%rbx), %rdx
jmp 0x28dc42
xorl %edx, %edx
leaq 0x1443bb(%rip), %rsi    # 0x3d2004
movl $0x100a, %edi           # imm = 0x100A
movl $0x8b38, %ecx           # imm = 0x8B38
callq 0x28de48
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movq 0x30(%rbx), %rdi
callq 0x27c490
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x70(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rsi, %rbx
movq %rdi, %rcx
leaq 0x144522(%rip), %rdx    # 0x3d21d1
movq %rsp, %r14
movl $0x200, %edi            # imm = 0x200
movq %r14, %rsi
xorl %eax, %eax
callq 0x27e570
movq %r14, %rdi
callq 0x172f0
testl %eax, %eax
jle 0x28dcdd
movl %eax, %ecx
cmpb $0x2f, (%rsp,%rcx)
je 0x28dcee
leal -0x1(%rcx), %eax
cmpl $0x2, %ecx
jge 0x28dccd
cmpb $0x2f, (%rsp)
je 0x28dce7
movb $0x2e, (%rsp)
leaq 0x1(%rsp), %rax
jmp 0x28dcf2
leaq (%rsp,%rcx), %rax
movb $0x0, (%rax)
movq %rsp, %rdi
xorl %ebp, %ebp
xorl %esi, %esi
xorl %edx, %edx
callq 0x28dd65
movl %eax, (%rbx)
testl %eax, %eax
jns 0x28dd4d
leaq 0x15160f(%rip), %rsi    # 0x3df31f
leaq 0x1515f7(%rip), %rdx    # 0x3df30e
leaq 0x151467(%rip), %r8     # 0x3df185
movl $0xe, %ebp
movl $0xe, %edi
movl $0x917b, %ecx           # imm = 0x917B
xorl %eax, %eax
callq 0x27e637
leaq 0x151544(%rip), %rsi    # 0x3df27f
movq %rsp, %rdx
movl $0xe, %edi
movl $0x917b, %ecx           # imm = 0x917B
callq 0x28de48
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebp
andl $0x1ffff, %r14d         # imm = 0x1FFFF
movl %ebp, %edi
movq %r12, %rsi
xorl %edx, %edx
callq 0x176b0
movq %rax, %rbx
testq %rax, %rax
js 0x28df63
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
callq *0x238c82(%rip)         # 0x4c6be0
movq %rax, %r13
jmp 0x28df69
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testq %rbx, %rbx
js 0x28df7d
testl %r13d, %r13d
jns 0x28df7d
callq 0x17060
cmpl $0x4, (%rax)
je 0x28df3c
testl %r13d, %r13d
jns 0x28df8f
callq 0x17060
movl (%rax), %eax
movq (%rsp), %rcx
movl %eax, (%rcx)
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movzwl 0x1e(%rdi), %eax
andl $0x3, %eax
cmpw $0x1, %ax
jne 0x28e000
pushq %rbx
subq $0x20, %rsp
movq 0x10(%rdi), %rbx
xorl %eax, %eax
cmpb $0x0, 0x21(%rbx)
jne 0x28dffa
movslq 0x238afa(%rip), %rax    # 0x4c6ac0
addq $0x2, %rax
movq %rsp, %rdx
movq %rax, 0x8(%rdx)
movq $0x1fe, 0x10(%rdx)      # imm = 0x1FE
movl $0x1, (%rdx)
movl 0x18(%rdi), %edi
movl $0x6, %esi
xorl %eax, %eax
callq *0x238b91(%rip)         # 0x4c6b80
testl %eax, %eax
js 0x28dffa
movb $0x1, 0x21(%rbx)
incl 0x1c(%rbx)
addq $0x20, %rsp
popq %rbx
retq
movq %rsi, %rdx
movq 0x238b76(%rip), %rcx    # 0x4c6b80
movl 0x18(%rdi), %edi
movl $0x6, %esi
xorl %eax, %eax
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movl %edi, 0x4(%rsp)
movb $0x0, (%rsi)
leaq 0x23bc6c(%rip), %rax    # 0x4c9cd8
movq (%rax), %r14
cmpq $0x0, 0x238d19(%rip)    # 0x4c6d90
jne 0x28e08c
leaq 0x1512d4(%rip), %rdi    # 0x3df354
callq 0x17950
movq %rax, 0x238d04(%rip)    # 0x4c6d90
cmpq $0x0, 0x238d04(%rip)    # 0x4c6d98
jne 0x28e0a9
leaq 0x1512be(%rip), %rdi    # 0x3df35b
callq 0x17950
movq %rax, 0x238cef(%rip)    # 0x4c6d98
leaq 0x238ce0(%rip), %r12    # 0x4c6d90
leaq 0x8(%rsp), %r15
movl $0xf000, %r13d          # imm = 0xF000
xorl %ebp, %ebp
testq %r14, %r14
je 0x28e0f2
movq %r14, %rdi
movq %r15, %rsi
callq *0x238a6a(%rip)         # 0x4c6b38
testl %eax, %eax
jne 0x28e0f2
movl 0x20(%rsp), %eax
andl %r13d, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x28e0f2
movq %r14, %rdi
movl $0x3, %esi
callq *0x238a1a(%rip)         # 0x4c6b08
testl %eax, %eax
je 0x28e106
cmpq $0x30, %rbp
je 0x28e103
movq (%rbp,%r12), %r14
addq $0x8, %rbp
jmp 0x28e0bd
xorl %r14d, %r14d
testq %r14, %r14
je 0x28e173
movslq 0x4(%rsp), %r15
leaq 0x15122c(%rip), %r13    # 0x3df343
xorl %r12d, %r12d
movl $0x8, %edi
leaq 0x8(%rsp), %rsi
callq 0x27e7ad
movb $0x0, -0x2(%rbx,%r15)
movq 0x8(%rsp), %r8
movl %r15d, %edi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x27e570
cmpb $0x0, -0x2(%rbx,%r15)
movl $0x1, %ebp
jne 0x28e178
cmpl $0xa, %r12d
ja 0x28e178
incl %r12d
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq *0x23899b(%rip)         # 0x4c6b08
testl %eax, %eax
je 0x28e11a
jmp 0x28e178
movl $0x190a, %ebp           # imm = 0x190A
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
xorl %eax, %eax
cmpl $0x0, 0x4c(%rdi)
jle 0x28e195
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
js 0x28e22d
movq 0x50(%rbx), %r13
movq 0x60(%rbx), %r14
cmpq %r14, %r15
cmovlq %r15, %r14
movl $0x0, %eax
cmpq %r13, %r14
je 0x28e2af
movl 0x18(%rbx), %r8d
movq 0x68(%rbx), %rbp
testq %rbp, %rbp
je 0x28e250
movl %r8d, %r15d
movq 0x58(%rbx), %rsi
subq %r13, %rsi
je 0x28e1f3
movq %rbp, %rdi
addq %r13, %rdi
callq *0x238b0d(%rip)         # 0x4c6d00
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x1, %ecx
xorl %eax, %eax
callq *0x238b0f(%rip)         # 0x4c6d18
movq %rax, %r12
incq %rax
cmpq $0x1, %rax
ja 0x28e221
movq %rbp, %rdi
movq %r13, %rsi
callq *0x238adf(%rip)         # 0x4c6d00
movl %r15d, %r8d
leaq 0x151071(%rip), %r15    # 0x3df29c
jmp 0x28e25a
movl 0x18(%rbx), %edi
leaq 0x8(%rsp), %rsi
callq *0x238915(%rip)         # 0x4c6b50
testl %eax, %eax
jne 0x28e244
movq 0x38(%rsp), %r15
movl $0x70a, %eax            # imm = 0x70A
jne 0x28e2af
jmp 0x28e1b1
leaq 0xef3b8(%rip), %r15     # 0x37d60f
xorl %r12d, %r12d
testq %r12, %r12
jne 0x28e27a
xorl %edi, %edi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq *0x238a71(%rip)         # 0x4c6ce8
movq %rax, %r12
cmpq $-0x1, %r12
jne 0x28e2a1
movq 0x38(%rbx), %rdx
xorl %r12d, %r12d
xorl %edi, %edi
movq %r15, %rsi
movl $0x96fd, %ecx           # imm = 0x96FD
callq 0x28de48
movq $0x0, 0x60(%rbx)
xorl %r14d, %r14d
movq %r12, 0x68(%rbx)
movq %r14, 0x58(%rbx)
movq %r14, 0x50(%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rax
movq 0x38(%rax), %rbx
testq %rbx, %rbx
je 0x28e448
cmpl $0x0, 0x30(%rbx)
je 0x28e454
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdi, %r14
callq *0x2388d3(%rip)         # 0x4c6d30
cmpw $0x0, 0x20(%rbx)
je 0x28e4ae
movl %eax, %ecx
shrl $0xf, %ecx
cmpl $0x8000, %eax           # imm = 0x8000
movl $0x1, %r15d
cmovgel %ecx, %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x18(%rbx)
js 0x28e495
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rdi
movslq 0x1c(%rbx), %rsi
callq *0x23886d(%rip)         # 0x4c6d00
jmp 0x28e4a2
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x27c490
addq %r15, %r12
movzwl 0x20(%rbx), %eax
cmpq %rax, %r12
jb 0x28e47b
movq 0x28(%rbx), %rdi
callq 0x27c490
movl 0x18(%rbx), %edi
testl %edi, %edi
js 0x28e4f2
callq *0x23862c(%rip)         # 0x4c6af0
testl %eax, %eax
je 0x28e4eb
testq %r14, %r14
je 0x28e4d3
movq 0x38(%r14), %rdx
jmp 0x28e4d5
xorl %edx, %edx
leaq 0x143b28(%rip), %rsi    # 0x3d2004
movl $0x100a, %edi           # imm = 0x100A
movl $0x944a, %ecx           # imm = 0x944A
callq 0x28de48
movl $0xffffffff, 0x18(%rbx) # imm = 0xFFFFFFFF
movq (%rbx), %rax
movq $0x0, 0x38(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x27c490
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x28e5b0
movq 0x28(%rbx), %rdi
callq 0x27c490
movq %rbx, %rdi
callq 0x28dbfe
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rsi, %rbx
movq 0x28(%rdi), %rdi
xorl %esi, %esi
callq *0x2384f7(%rip)         # 0x4c6b08
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VMPrintf
SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
  char *z;
  char zBase[SQLITE_PRINT_BUF_SIZE];
  StrAccum acc;
  assert( db!=0 );
  sqlite3StrAccumInit(&acc, db, zBase, sizeof(zBase),
                      db->aLimit[SQLITE_LIMIT_LENGTH]);
  acc.printfFlags = SQLITE_PRINTF_INTERNAL;
  sqlite3_str_vappendf(&acc, zFormat, ap);
  z = sqlite3StrAccumFinish(&acc);
  if( acc.accError==SQLITE_NOMEM ){
    sqlite3OomFault(db);
  }
  return z;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movl 0x7c(%rdi), %eax
leaq 0x20(%rsp), %rcx
movq %rsp, %r15
movq %rcx, 0x8(%r15)
movq %rdi, (%r15)
movl $0x46, 0x10(%r15)
movl %eax, 0x14(%r15)
movl $0x0, 0x18(%r15)
movw $0x100, 0x1c(%r15)      # imm = 0x100
movq %r15, %rdi
callq 0x27c5ec
movq %r15, %rdi
callq 0x27e336
movq %rax, %r14
cmpb $0x7, 0x1c(%r15)
jne 0x28e689
movq %rbx, %rdi
callq 0x2824bb
movq %r14, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3OpenTempDatabase
SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){
  sqlite3 *db = pParse->db;
  if( db->aDb[1].pBt==0 && !pParse->explain ){
    int rc;
    Btree *pBt;
    static const int flags =
          SQLITE_OPEN_READWRITE |
          SQLITE_OPEN_CREATE |
          SQLITE_OPEN_EXCLUSIVE |
          SQLITE_OPEN_DELETEONCLOSE |
          SQLITE_OPEN_TEMP_DB;

    rc = sqlite3BtreeOpen(db->pVfs, 0, db, &pBt, 0, flags);
    if( rc!=SQLITE_OK ){
      sqlite3ErrorMsg(pParse, "unable to open a temporary database "
        "file for storing temporary tables");
      pParse->rc = rc;
      return 1;
    }
    db->aDb[1].pBt = pBt;
    assert( db->aDb[1].pSchema );
    if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, 0, 0) ){
      sqlite3OomFault(db);
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq (%rdi), %rbx
movq 0x20(%rbx), %rax
xorl %ebp, %ebp
cmpq $0x0, 0x28(%rax)
jne 0x28e782
movq %rdi, %r14
cmpb $0x0, 0x11b(%rdi)
jne 0x28e782
movq (%rbx), %rdi
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
movq %rbx, %rdx
xorl %r8d, %r8d
movl $0x21e, %r9d            # imm = 0x21E
callq 0x28e78d
testl %eax, %eax
je 0x28e755
movl %eax, %ebp
leaq 0x150c66(%rip), %rsi    # 0x3df3ab
movq %r14, %rdi
xorl %eax, %eax
callq 0x284eb8
movl %ebp, 0x18(%r14)
jmp 0x28e77d
movq 0x8(%rsp), %rdi
movq 0x20(%rbx), %rax
movq %rdi, 0x28(%rax)
movl 0x6c(%rbx), %esi
xorl %ebp, %ebp
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x28b2a9
cmpl $0x7, %eax
jne 0x28e782
movq %rbx, %rdi
callq 0x2824bb
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheSetPageSize
SQLITE_PRIVATE int sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
  assert( pCache->nRefSum==0 && pCache->pDirty==0 );
  if( pCache->szPage ){
    sqlite3_pcache *pNew;
    pNew = sqlite3GlobalConfig.pcache2.xCreate(
                szPage, pCache->szExtra + ROUND8(sizeof(PgHdr)),
                pCache->bPurgeable
    );
    if( pNew==0 ) return SQLITE_NOMEM_BKPT;
    sqlite3GlobalConfig.pcache2.xCachesize(pNew, numberOfCachePages(pCache));
    if( pCache->pCache ){
      sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
    }
    pCache->pCache = pNew;
    pCache->szPage = szPage;
    pcacheTrace(("%p.PAGESIZE %d\n",pCache,szPage));
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x24(%rdi)
je 0x28f9ef
movl %esi, %ebx
movq %rdi, %r14
movl 0x28(%rdi), %esi
addl $0x48, %esi
movzbl 0x2c(%rdi), %edx
movl %ebx, %edi
callq *0x236d94(%rip)         # 0x4c6728
movl $0x7, %ebp
testq %rax, %rax
je 0x28f9f1
movq %rax, %r15
movq 0x236d88(%rip), %rcx    # 0x4c6730
movslq 0x1c(%r14), %rsi
testq %rsi, %rsi
jns 0x28f9ce
shlq $0xa, %rsi
negq %rsi
movslq 0x24(%r14), %rax
movslq 0x28(%r14), %rdi
addq %rax, %rdi
movq %rsi, %rax
cqto
idivq %rdi
movq %rax, %rsi
movq %r15, %rdi
callq *%rcx
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x28f9e2
callq *0x236d7e(%rip)         # 0x4c6760
movq %r15, 0x40(%r14)
movl %ebx, 0x24(%r14)
testq %r15, %r15
je 0x28f9f1
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PcacheMakeClean
SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
  assert( sqlite3PcachePageSanity(p) );
  assert( (p->flags & PGHDR_DIRTY)!=0 );
  assert( (p->flags & PGHDR_CLEAN)==0 );
  pcacheManageDirtyList(p, PCACHE_DIRTYLIST_REMOVE);
  p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC|PGHDR_WRITEABLE);
  p->flags |= PGHDR_CLEAN;
  pcacheTrace(("%p.CLEAN %d\n",p->pCache,p->pgno));
  assert( sqlite3PcachePageSanity(p) );
  if( p->nRef==0 ){
    pcacheUnpin(p);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x292ab5
movl 0x34(%rbx), %eax
andl $-0x10, %eax
incl %eax
movw %ax, 0x34(%rbx)
cmpw $0x0, 0x36(%rbx)
je 0x2906f8
popq %rbx
retq
movq 0x18(%rbx), %rax
cmpb $0x0, 0x2c(%rax)
je 0x2906f6
movq 0x23603f(%rip), %rcx    # 0x4c6748
movq 0x40(%rax), %rdi
movq (%rbx), %rsi
xorl %edx, %edx
popq %rbx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BitvecTestNotNull
SQLITE_PRIVATE int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
  assert( p!=0 );
  i--;
  if( i>=p->iSize ) return 0;
  while( p->iDivisor ){
    u32 bin = i/p->iDivisor;
    i = i%p->iDivisor;
    p = p->u.apSub[bin];
    if (!p) {
      return 0;
    }
  }
  if( p->iSize<=BITVEC_NBIT ){
    return (p->u.aBitmap[i/BITVEC_SZELEM] & (1<<(i&(BITVEC_SZELEM-1))))!=0;
  } else{
    u32 h = BITVEC_HASH(i++);
    while( p->u.aHash[h] ){
      if( p->u.aHash[h]==i ) return 1;
      h = (h+1) % BITVEC_NINT;
    }
    return 0;
  }
}

// Assembly:
movl %esi, %edx
decl %edx
xorl %eax, %eax
cmpl (%rdi), %edx
jae 0x29073a
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x29073b
movl %edx, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
xorl %eax, %eax
movq 0x10(%rdi,%rcx,8), %rdi
testq %rdi, %rdi
jne 0x29071f
retq
cmpl $0xf80, (%rdi)          # imm = 0xF80
ja 0x290759
movl %edx, %eax
shrl $0x3, %eax
movzbl 0x10(%rdi,%rax), %ecx
andl $0x7, %edx
xorl %eax, %eax
btl %edx, %ecx
setb %al
retq
movl %edx, %eax
shrl $0x2, %eax
imulq $0x21084211, %rax, %rax # imm = 0x21084211
shrq $0x22, %rax
imull $0x7c, %eax, %eax
movl %edx, %ecx
subl %eax, %ecx
movl 0x10(%rdi,%rcx,4), %esi
movl $0x0, %eax
testl %esi, %esi
je 0x29073a
incl %edx
xorl %eax, %eax
cmpl %edx, %esi
je 0x290797
incl %ecx
cmpl $0x7c, %ecx
cmovel %eax, %ecx
movl 0x10(%rdi,%rcx,4), %esi
testl %esi, %esi
jne 0x290781
jmp 0x29073a
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memjrnlRead
static int memjrnlRead(
  sqlite3_file *pJfd,    /* The journal file from which to read */
  void *zBuf,            /* Put the results here */
  int iAmt,              /* Number of bytes to read */
  sqlite_int64 iOfst     /* Begin reading at this offset */
){
  MemJournal *p = (MemJournal *)pJfd;
  u8 *zOut = zBuf;
  int nRead = iAmt;
  int iChunkOffset;
  FileChunk *pChunk;

  if( (iAmt+iOfst)>p->endpoint.iOffset ){
    return SQLITE_IOERR_SHORT_READ;
  }
  assert( p->readpoint.iOffset==0 || p->readpoint.pChunk!=0 );
  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){
    sqlite3_int64 iOff = 0;
    for(pChunk=p->pFirst;
        ALWAYS(pChunk) && (iOff+p->nChunkSize)<=iOfst;
        pChunk=pChunk->pNext
    ){
      iOff += p->nChunkSize;
    }
  }else{
    pChunk = p->readpoint.pChunk;
    assert( pChunk!=0 );
  }

  iChunkOffset = (int)(iOfst%p->nChunkSize);
  do {
    int iSpace = p->nChunkSize - iChunkOffset;
    int nCopy = MIN(nRead, (p->nChunkSize - iChunkOffset));
    memcpy(zOut, (u8*)pChunk->zChunk + iChunkOffset, nCopy);
    zOut += nCopy;
    nRead -= iSpace;
    iChunkOffset = 0;
  } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 );
  p->readpoint.iOffset = pChunk ? iOfst+iAmt : 0;
  p->readpoint.pChunk = pChunk;

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movslq %edx, %rdx
addq %rcx, %rdx
movl $0x20a, %eax            # imm = 0x20A
cmpq 0x20(%rdi), %rdx
jg 0x29093b
movq %rsi, %r14
movq %rdi, %rbx
testq %rcx, %rcx
movq %rdx, (%rsp)
je 0x2908c1
cmpq %rcx, 0x30(%rbx)
jne 0x2908c1
movq 0x38(%rbx), %r13
jmp 0x2908dc
leaq 0x18(%rbx), %r13
xorl %eax, %eax
movq (%r13), %r13
testq %r13, %r13
je 0x2908dc
movslq 0x8(%rbx), %rdx
addq %rdx, %rax
cmpq %rcx, %rax
jle 0x2908c7
movslq 0x8(%rbx), %rsi
movq %rcx, %rax
cqto
idivq %rsi
movl 0x8(%rbx), %r12d
subl %edx, %r12d
cmpl %r12d, %ebp
movl %r12d, %eax
cmovll %ebp, %eax
movslq %edx, %rcx
leaq (%rcx,%r13), %rsi
addq $0x8, %rsi
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x17660
subl %r12d, %ebp
js 0x290926
movq (%r13), %r13
je 0x290926
addq %r15, %r14
xorl %edx, %edx
testq %r13, %r13
jne 0x2908e8
testq %r13, %r13
movq (%rsp), %rax
cmoveq %r13, %rax
movq %rax, 0x30(%rbx)
movq %r13, 0x38(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memjrnlTruncate
static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
  MemJournal *p = (MemJournal *)pJfd;
  if( ALWAYS(size==0) ){
    memjrnlFreeChunks(p);
    p->nSize = 0;
    p->endpoint.pChunk = 0;
    p->endpoint.iOffset = 0;
    p->readpoint.pChunk = 0;
    p->readpoint.iOffset = 0;
  }
  return SQLITE_OK;
}

// Assembly:
testq %rsi, %rsi
jne 0x290c87
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x290c67
movq (%rdi), %r15
callq 0x27c490
movq %r15, %rdi
testq %r15, %r15
jne 0x290c57
movl $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x20(%r14)
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walWriteOneFrame
static int walWriteOneFrame(
  WalWriter *p,               /* Where to write the frame */
  PgHdr *pPage,               /* The page of the frame to be written */
  int nTruncate,              /* The commit flag.  Usually 0.  >0 for commit */
  sqlite3_int64 iOffset       /* Byte offset at which to write */
){
  int rc;                         /* Result code from subfunctions */
  void *pData;                    /* Data actually written */
  u8 aFrame[WAL_FRAME_HDRSIZE];   /* Buffer to assemble frame-header in */
  pData = pPage->pData;
  walEncodeFrame(p->pWal, pPage->pgno, nTruncate, pData, aFrame);
  rc = walWriteToLog(p, aFrame, sizeof(aFrame), iOffset);
  if( rc ) return rc;
  /* Write the page data */
  rc = walWriteToLog(p, pData, p->szPage, iOffset+sizeof(aFrame));
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r15
movq 0x8(%rsi), %r14
movq (%rdi), %rdi
movl 0x30(%rsi), %esi
movq %rsp, %r12
movq %r14, %rcx
movq %r12, %r8
callq 0x29268d
movq %r15, %rdi
movq %r12, %rsi
movl $0x18, %edx
movq %rbx, %rcx
callq 0x29273a
testl %eax, %eax
jne 0x2910d1
movl 0x1c(%r15), %edx
addq $0x18, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x29273a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walIndexWriteHdr
static SQLITE_NO_TSAN void walIndexWriteHdr(Wal *pWal){
  volatile WalIndexHdr *aHdr = walIndexHdr(pWal);
  const int nCksum = offsetof(WalIndexHdr, aCksum);

  assert( pWal->writeLock );
  pWal->hdr.isInit = 1;
  pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
  walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
  /* Possible TSAN false-positive.  See tag-20200519-1 */
  memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
  walShmBarrier(pWal);
  memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq (%rax), %rbx
leaq 0x48(%rdi), %r14
movb $0x1, 0x54(%rdi)
movl $0x2de218, 0x48(%rdi)   # imm = 0x2DE218
xorl %eax, %eax
movl $0x40, %ecx
xorl %edx, %edx
addl %eax, %edx
addl 0x8(%rdi,%rcx), %edx
addl 0xc(%rdi,%rcx), %eax
addl %edx, %eax
addq $0x8, %rcx
cmpq $0x68, %rcx
jb 0x29129b
movl %edx, 0x70(%rdi)
movl %eax, 0x74(%rdi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x50(%rbx)
movups %xmm1, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
cmpb $0x2, 0x3f(%rdi)
je 0x2912e1
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walRestartHdr
static void walRestartHdr(Wal *pWal, u32 salt1){
  volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
  int i;                          /* Loop counter */
  u32 *aSalt = pWal->hdr.aSalt;   /* Big-endian salt values */
  pWal->nCkpt++;
  pWal->hdr.mxFrame = 0;
  sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
  memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
  walIndexWriteHdr(pWal);
  AtomicStore(&pInfo->nBackfill, 0);
  pInfo->nBackfillAttempted = 0;
  pInfo->aReadMark[1] = 0;
  for(i=2; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
  assert( pInfo->aReadMark[0]==0 );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rdi), %rax
movq (%rax), %rbx
incl 0x88(%rdi)
xorl %r14d, %r14d
movl %r14d, 0x58(%rdi)
movl 0x68(%rdi), %eax
bswapl %eax
incl %eax
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x68(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x69(%rdi)
movb %ah, 0x6a(%rdi)
movb %al, 0x6b(%rdi)
movl %esi, 0x6c(%rdi)
callq 0x291278
movl $0x0, 0x60(%rbx)
movl %r14d, 0x80(%rbx)
movl %r14d, 0x68(%rbx)
movl $0xffffffff, 0x6c(%rbx,%r14,4) # imm = 0xFFFFFFFF
incq %r14
cmpq $0x3, %r14
jne 0x291351
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walIndexClose
static void walIndexClose(Wal *pWal, int isDelete){
  if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE || pWal->bShmUnreliable ){
    int i;
    for(i=0; i<pWal->nWiData; i++){
      sqlite3_free((void *)pWal->apWiData[i]);
      pWal->apWiData[i] = 0;
    }
  }
  if( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE ){
    sqlite3OsShmUnmap(pWal->pDbFd, isDelete);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpb $0x2, 0x3f(%rdi)
je 0x29237f
cmpb $0x0, 0x46(%r14)
je 0x2923ae
cmpl $0x0, 0x28(%r14)
jle 0x2923ae
xorl %r15d, %r15d
movq 0x30(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x27c490
movq 0x30(%r14), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
movslq 0x28(%r14), %rax
cmpq %rax, %r15
jl 0x292389
cmpb $0x2, 0x3f(%r14)
jne 0x2923bb
popq %rbx
popq %r14
popq %r15
retq
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x80(%rax), %rax
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WalEndWriteTransaction
SQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal){
  if( pWal->writeLock ){
    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
    pWal->writeLock = 0;
    pWal->iReCksum = 0;
    pWal->truncateOnCommit = 0;
  }
  return SQLITE_OK;
}

// Assembly:
cmpb $0x0, 0x40(%rdi)
je 0x292624
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x3f(%rdi)
jne 0x292614
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
xorl %eax, %eax
movb %al, 0x40(%rbx)
movl $0x0, 0x7c(%rbx)
movb %al, 0x43(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: walHashGet
static int walHashGet(
  Wal *pWal,                      /* WAL handle */
  int iHash,                      /* Find the iHash'th table */
  WalHashLoc *pLoc                /* OUT: Hash table location */
){
  int rc;                         /* Return code */

  rc = walIndexPage(pWal, iHash, &pLoc->aPgno);
  assert( rc==SQLITE_OK || iHash>0 );

  if( rc==SQLITE_OK ){
    pLoc->aHash = (volatile ht_slot *)&pLoc->aPgno[HASHTABLE_NPAGE];
    if( iHash==0 ){
      pLoc->aPgno = &pLoc->aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
      pLoc->iZero = 0;
    }else{
      pLoc->iZero = HASHTABLE_NPAGE_ONE + (iHash-1)*HASHTABLE_NPAGE;
    }
    pLoc->aPgno = &pLoc->aPgno[-1];
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
leaq 0x8(%rdx), %r14
cmpl %esi, 0x28(%rdi)
jle 0x29264c
movq 0x30(%rdi), %rax
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rcx
movq %rcx, (%r14)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x292656
movl %ebp, %esi
movq %r14, %rdx
callq 0x2923d2
testl %eax, %eax
jne 0x292688
movq 0x8(%rbx), %rcx
leaq 0x4000(%rcx), %rdx
movq %rdx, (%rbx)
testl %ebp, %ebp
je 0x292674
shll $0xc, %ebp
addl $-0x22, %ebp
jmp 0x292680
addq $0x88, %rcx
movq %rcx, (%r14)
xorl %ebp, %ebp
movl %ebp, 0x10(%rbx)
addq $-0x4, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq