// File: /workspace/github_c_makefile_star2_O2/ukontainer[P]sqlite-bench/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_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  },
      };
      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*);
          u32 oldFlags = db->flags;
          if( onoff>0 ){
            db->flags |= aFlagOp[i].mask;
          }else if( onoff==0 ){
            db->flags &= ~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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x41005a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
cmpl $0x3e8, %esi            # imm = 0x3E8
je 0x4100db
cmpl $0x3e9, %esi            # imm = 0x3E9
jne 0x4100fb
movl (%rsp), %eax
cmpq $0x29, %rax
jae 0x41014b
movq 0x10(%rsp), %rcx
leal 0x8(%rax), %edx
movl %edx, (%rsp)
movq (%rcx,%rax), %rsi
cmpl $0x21, %eax
jae 0x41015c
movq 0x10(%rsp), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movl %ecx, (%rsp)
movl 0x8(%rdx,%rax), %edx
cmpl $0x18, %eax
ja 0x41016c
addq 0x10(%rsp), %rcx
addl $0x18, %eax
movl %eax, (%rsp)
jmp 0x41017a
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x410186
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x410194
xorl %ecx, %ecx
pushq $0x1
popq %rax
leaq 0x12a929(%rip), %r14    # 0x53aa30
cmpq $0x8, %rcx
je 0x4101fe
leaq 0x1(%rcx), %r15
cmpl %esi, (%r14,%rcx,8)
movq %r15, %rcx
jne 0x410107
movl (%rsp), %edx
cmpq $0x29, %rdx
jae 0x4101a2
movq 0x10(%rsp), %rax
movq %rdx, %rcx
addq $0x8, %rcx
movl %ecx, (%rsp)
movl (%rax,%rdx), %eax
cmpl $0x20, %edx
ja 0x4101b2
addq 0x10(%rsp), %rcx
addl $0x10, %edx
movl %edx, (%rsp)
jmp 0x4101c0
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rsi
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %edx
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
movl (%rcx), %ecx
movq %rbx, %rdi
callq 0x410218
jmp 0x4101fe
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rax
movq 0x20(%rbx), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
jmp 0x4101fe
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %eax
movq 0x8(%rsp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq (%rcx), %r12
movl 0x30(%rbx), %ecx
testl %eax, %eax
jle 0x4101e4
movl -0x4(%r14,%r15,8), %eax
orl %ecx, %eax
movl %eax, 0x30(%rbx)
cmpl %eax, %ecx
je 0x4101e6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40d106
jmp 0x4101e6
je 0x41020d
xorl %eax, %eax
testq %r12, %r12
je 0x4101fe
movl -0x4(%r14,%r15,8), %ecx
xorl %edx, %edx
testl %ecx, 0x30(%rbx)
setne %dl
movl %edx, (%r12)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl -0x4(%r14,%r15,8), %eax
notl %eax
andl %ecx, %eax
jmp 0x4101d1