// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_db_config
SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
  va_list ap;
  int rc;
  va_start(ap, op);
  switch( op ){
    case SQLITE_DBCONFIG_MAINDBNAME: {
      /* IMP: R-06824-28531 */
      /* IMP: R-36257-52125 */
      db->aDb[0].zDbSName = va_arg(ap,char*);
      rc = SQLITE_OK;
      break;
    }
    case SQLITE_DBCONFIG_LOOKASIDE: {
      void *pBuf = va_arg(ap, void*); /* IMP: R-26835-10964 */
      int sz = va_arg(ap, int);       /* IMP: R-47871-25994 */
      int cnt = va_arg(ap, int);      /* IMP: R-04460-53386 */
      rc = setupLookaside(db, pBuf, sz, cnt);
      break;
    }
    default: {
      static const struct {
        int op;      /* The opcode */
        u32 mask;    /* Mask of the bit in sqlite3.flags to set/clear */
      } aFlagOp[] = {
        { SQLITE_DBCONFIG_ENABLE_FKEY,           SQLITE_ForeignKeys    },
        { SQLITE_DBCONFIG_ENABLE_TRIGGER,        SQLITE_EnableTrigger  },
        { SQLITE_DBCONFIG_ENABLE_VIEW,           SQLITE_EnableView     },
        { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer  },
        { SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, SQLITE_LoadExtension  },
        { SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE,      SQLITE_NoCkptOnClose  },
        { SQLITE_DBCONFIG_ENABLE_QPSG,           SQLITE_EnableQPSG     },
        { SQLITE_DBCONFIG_TRIGGER_EQP,           SQLITE_TriggerEQP     },
        { SQLITE_DBCONFIG_RESET_DATABASE,        SQLITE_ResetDatabase  },
        { SQLITE_DBCONFIG_DEFENSIVE,             SQLITE_Defensive      },
        { SQLITE_DBCONFIG_WRITABLE_SCHEMA,       SQLITE_WriteSchema|
                                                 SQLITE_NoSchemaError  },
        { SQLITE_DBCONFIG_LEGACY_ALTER_TABLE,    SQLITE_LegacyAlter    },
        { SQLITE_DBCONFIG_DQS_DDL,               SQLITE_DqsDDL         },
        { SQLITE_DBCONFIG_DQS_DML,               SQLITE_DqsDML         },
        { SQLITE_DBCONFIG_LEGACY_FILE_FORMAT,    SQLITE_LegacyFileFmt  },
        { SQLITE_DBCONFIG_TRUSTED_SCHEMA,        SQLITE_TrustedSchema  },
      };
      unsigned int i;
      rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
      for(i=0; i<ArraySize(aFlagOp); i++){
        if( aFlagOp[i].op==op ){
          int onoff = va_arg(ap, int);
          int *pRes = va_arg(ap, int*);
          u64 oldFlags = db->flags;
          if( onoff>0 ){
            db->flags |= aFlagOp[i].mask;
          }else if( onoff==0 ){
            db->flags &= ~(u64)aFlagOp[i].mask;
          }
          if( oldFlags!=db->flags ){
            sqlite3ExpirePreparedStatements(db, 0);
          }
          if( pRes ){
            *pRes = (db->flags & aFlagOp[i].mask)!=0;
          }
          rc = SQLITE_OK;
          break;
        }
      }
      break;
    }
  }
  va_end(ap);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
testb %al, %al
je 0x3d0a11
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x114(%rbp)
subl $0x3e8, %eax            # imm = 0x3E8
je 0x3d0a79
jmp 0x3d0a67
movl -0x114(%rbp), %eax
subl $0x3e9, %eax            # imm = 0x3E9
je 0x3d0af2
jmp 0x3d0c3b
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x118(%rbp)
cmpl $0x28, %eax
ja 0x3d0ab4
movq -0x120(%rbp), %rcx
movl -0x118(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x3d0ad1
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, (%rax)
movl $0x0, -0x34(%rbp)
jmp 0x3d0df9
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x3d0b2d
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x3d0b4a
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x3d0b93
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x3d0bb0
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x3d0bf7
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x3d0c14
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
callq 0x3d0e10
movl %eax, -0x34(%rbp)
jmp 0x3d0df9
movl $0x1, -0x34(%rbp)
movl $0x0, -0x4c(%rbp)
cmpl $0x10, -0x4c(%rbp)
jae 0x3d0df7
movl -0x4c(%rbp), %eax
movl %eax, %ecx
leaq 0x1d6521(%rip), %rax    # 0x5a7180
movl (%rax,%rcx,8), %eax
cmpl -0xc(%rbp), %eax
jne 0x3d0de7
leaq -0x30(%rbp), %rax
movq %rax, -0x180(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x174(%rbp)
cmpl $0x28, %eax
ja 0x3d0ca6
movq -0x180(%rbp), %rcx
movl -0x174(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x188(%rbp)
jmp 0x3d0cc3
movq -0x180(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x18c(%rbp)
cmpl $0x28, %eax
ja 0x3d0d0a
movq -0x198(%rbp), %rcx
movl -0x18c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1a0(%rbp)
jmp 0x3d0d27
movq -0x198(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x50(%rbp)
jle 0x3d0d67
movl -0x4c(%rbp), %eax
movl %eax, %ecx
leaq 0x1d642d(%rip), %rax    # 0x5a7180
movl 0x4(%rax,%rcx,8), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
orq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
jmp 0x3d0d91
cmpl $0x0, -0x50(%rbp)
jne 0x3d0d8f
movl -0x4c(%rbp), %eax
movl %eax, %ecx
leaq 0x1d6407(%rip), %rax    # 0x5a7180
movl 0x4(%rax,%rcx,8), %eax
movl %eax, %ecx
xorq $-0x1, %rcx
movq -0x8(%rbp), %rax
andq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
jmp 0x3d0d91
movq -0x60(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x30(%rcx), %rax
je 0x3d0daa
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3cc920
cmpq $0x0, -0x58(%rbp)
je 0x3d0dde
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x4c(%rbp), %ecx
movl %ecx, %edx
leaq 0x1d63bb(%rip), %rcx    # 0x5a7180
movl 0x4(%rcx,%rdx,8), %ecx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x58(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x34(%rbp)
jmp 0x3d0df7
jmp 0x3d0de9
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3d0c49
jmp 0x3d0df9
movl -0x34(%rbp), %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw %cs:(%rax,%rax)