// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameTableTest
static void renameTableTest(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  sqlite3 *db = sqlite3_context_db_handle(context);
  char const *zDb = (const char*)sqlite3_value_text(argv[0]);
  char const *zInput = (const char*)sqlite3_value_text(argv[1]);
  int bTemp = sqlite3_value_int(argv[4]);
  int isLegacy = (db->flags & SQLITE_LegacyAlter);

#ifndef SQLITE_OMIT_AUTHORIZATION
  sqlite3_xauth xAuth = db->xAuth;
  db->xAuth = 0;
#endif

  UNUSED_PARAMETER(NotUsed);
  if( zDb && zInput ){
    int rc;
    Parse sParse;
    rc = renameParseSql(&sParse, zDb, db, zInput, bTemp);
    if( rc==SQLITE_OK ){
      if( isLegacy==0 && sParse.pNewTable && sParse.pNewTable->pSelect ){
        NameContext sNC;
        memset(&sNC, 0, sizeof(sNC));
        sNC.pParse = &sParse;
        sqlite3SelectPrep(&sParse, sParse.pNewTable->pSelect, &sNC);
        if( sParse.nErr ) rc = sParse.rc;
      }

      else if( sParse.pNewTrigger ){
        if( isLegacy==0 ){
          rc = renameResolveTrigger(&sParse);
        }
        if( rc==SQLITE_OK ){
          int i1 = sqlite3SchemaToIndex(db, sParse.pNewTrigger->pTabSchema);
          int i2 = sqlite3FindDbName(db, zDb);
          if( i1==i2 ) sqlite3_result_int(context, 1);
        }
      }
    }

    if( rc!=SQLITE_OK ){
      renameColumnParseError(context, 1, argv[2], argv[3], &sParse);
    }
    renameParseCleanup(&sParse);
  }

#ifndef SQLITE_OMIT_AUTHORIZATION
  db->xAuth = xAuth;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3c9230
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x3c7880
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3c7880
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3c7a40
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x4000000, %rax        # imm = 0x4000000
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x1c8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x1c8(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x469520
cmpq $0x0, -0x30(%rbp)
je 0x469520
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %r8d
leaq -0x1f0(%rbp), %rdi
callq 0x469540
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x4694e9
cmpl $0x0, -0x38(%rbp)
jne 0x469473
cmpq $0x0, -0xa8(%rbp)
je 0x469473
movq -0xa8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x469473
leaq -0x228(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x19360
leaq -0x1f0(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0xa8(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x1f0(%rbp), %rdi
leaq -0x228(%rbp), %rdx
callq 0x438710
cmpl $0x0, -0x1c0(%rbp)
je 0x469471
movl -0x1d8(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x4694e7
cmpq $0x0, -0x98(%rbp)
je 0x4694e5
cmpl $0x0, -0x38(%rbp)
jne 0x469492
leaq -0x1f0(%rbp), %rdi
callq 0x4697f0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x4694e3
movq -0x20(%rbp), %rdi
movq -0x98(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x3cb770
movl %eax, -0x22c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x3d23d0
movl %eax, -0x230(%rbp)
movl -0x22c(%rbp), %eax
cmpl -0x230(%rbp), %eax
jne 0x4694e1
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3c8480
jmp 0x4694e3
jmp 0x4694e5
jmp 0x4694e7
jmp 0x4694e9
cmpl $0x0, -0x44(%rbp)
je 0x469514
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movl $0x1, %esi
leaq -0x1f0(%rbp), %r8
callq 0x469ff0
leaq -0x1f0(%rbp), %rdi
callq 0x46a080
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x1c8(%rax)
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopl (%rax,%rax)