// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_file_control
SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
  int rc = SQLITE_ERROR;
  Btree *pBtree;

#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
#endif
  sqlite3_mutex_enter(db->mutex);
  pBtree = sqlite3DbNameToBtree(db, zDbName);
  if( pBtree ){
    Pager *pPager;
    sqlite3_file *fd;
    sqlite3BtreeEnter(pBtree);
    pPager = sqlite3BtreePager(pBtree);
    assert( pPager!=0 );
    fd = sqlite3PagerFile(pPager);
    assert( fd!=0 );
    if( op==SQLITE_FCNTL_FILE_POINTER ){
      *(sqlite3_file**)pArg = fd;
      rc = SQLITE_OK;
    }else if( op==SQLITE_FCNTL_VFS_POINTER ){
      *(sqlite3_vfs**)pArg = sqlite3PagerVfs(pPager);
      rc = SQLITE_OK;
    }else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
      *(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
      rc = SQLITE_OK;
    }else if( op==SQLITE_FCNTL_DATA_VERSION ){
      *(unsigned int*)pArg = sqlite3PagerDataVersion(pPager);
      rc = SQLITE_OK;
    }else if( op==SQLITE_FCNTL_RESERVE_BYTES ){
      int iNew = *(int*)pArg;
      *(int*)pArg = sqlite3BtreeGetRequestedReserve(pBtree);
      if( iNew>=0 && iNew<=255 ){
        sqlite3BtreeSetPageSize(pBtree, 0, iNew, 0);
      }
      rc = SQLITE_OK;
    }else{
      rc = sqlite3OsFileControl(fd, op, pArg);
    }
    sqlite3BtreeLeave(pBtree);
  }
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3d3ee0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3d3ed6
movq -0x30(%rbp), %rdi
callq 0x3c5aa0
movq -0x30(%rbp), %rdi
callq 0x3bfda0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3c65d0
movq %rax, -0x40(%rbp)
cmpl $0x7, -0x14(%rbp)
jne 0x3d3e0a
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x24(%rbp)
jmp 0x3d3ed4
cmpl $0x1b, -0x14(%rbp)
jne 0x3d3e2f
movq -0x38(%rbp), %rdi
callq 0x3d3f50
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x24(%rbp)
jmp 0x3d3ed2
cmpl $0x1c, -0x14(%rbp)
jne 0x3d3e51
movq -0x38(%rbp), %rdi
callq 0x3d3f70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x24(%rbp)
jmp 0x3d3ed0
cmpl $0x23, -0x14(%rbp)
jne 0x3d3e71
movq -0x38(%rbp), %rdi
callq 0x3d3fc0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x24(%rbp)
jmp 0x3d3ece
cmpl $0x26, -0x14(%rbp)
jne 0x3d3eb9
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3d3fe0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x44(%rbp)
jl 0x3d3eb0
cmpl $0xff, -0x44(%rbp)
jg 0x3d3eb0
movq -0x30(%rbp), %rdi
movl -0x44(%rbp), %edx
xorl %ecx, %ecx
movl %ecx, %esi
callq 0x3d4030
movl $0x0, -0x24(%rbp)
jmp 0x3d3ecc
movq -0x40(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x3d4130
movl %eax, -0x24(%rbp)
jmp 0x3d3ece
jmp 0x3d3ed0
jmp 0x3d3ed2
jmp 0x3d3ed4
jmp 0x3d3ed6
movl -0x24(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop