// File: /workspace/github_c_makefile_star2_O0/ukontainer[P]sqlite-bench/sqlite3.c
// Function: renameParseSql
static int renameParseSql(
  Parse *p,                       /* Memory to use for Parse object */
  const char *zDb,                /* Name of schema SQL belongs to */
  int bTable,                     /* 1 -> RENAME TABLE, 0 -> RENAME COLUMN */
  sqlite3 *db,                    /* Database handle */
  const char *zSql,               /* SQL to parse */
  int bTemp                       /* True if SQL is from temp schema */
){
  int rc;
  char *zErr = 0;

  db->init.iDb = bTemp ? 1 : sqlite3FindDbName(db, zDb);

  /* Parse the SQL statement passed as the first argument. If no error
  ** occurs and the parse does not result in a new table, index or
  ** trigger object, the database must be corrupt. */
  memset(p, 0, sizeof(Parse));
  p->eParseMode = (bTable ? PARSE_MODE_RENAME_TABLE : PARSE_MODE_RENAME_COLUMN);
  p->db = db;
  p->nQueryLoop = 1;
  rc = sqlite3RunParser(p, zSql, &zErr);
  assert( p->zErrMsg==0 );
  assert( rc!=SQLITE_OK || zErr==0 );
  assert( (0!=p->pNewTable) + (0!=p->pNewIndex) + (0!=p->pNewTrigger)<2 );
  p->zErrMsg = zErr;
  if( db->mallocFailed ) rc = SQLITE_NOMEM;
  if( rc==SQLITE_OK 
   && p->pNewTable==0 && p->pNewIndex==0 && p->pNewTrigger==0 
  ){
    rc = SQLITE_CORRUPT_BKPT;
  }

#ifdef SQLITE_DEBUG
  /* Ensure that all mappings in the Parse.pRename list really do map to
  ** a part of the input string.  */
  if( rc==SQLITE_OK ){
    int nSql = sqlite3Strlen30(zSql);
    RenameToken *pToken;
    for(pToken=p->pRename; pToken; pToken=pToken->pNext){
      assert( pToken->t.z>=zSql && &pToken->t.z[pToken->t.n]<=&zSql[nSql] );
    }
  }
#endif

  db->init.iDb = 0;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x4a4dc7
movl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x4a4dd7
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x417ee0
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xb4(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x198, %edx            # imm = 0x198
callq 0x4010b0
movl -0x14(%rbp), %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x10c(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0xb4(%rax)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x4143a0
movl %eax, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x61(%rax)
je 0x4a4e5f
movl $0x7, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x4a4e9c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x138(%rax)
jne 0x4a4e9c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x140(%rax)
jne 0x4a4e9c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x148(%rax)
jne 0x4a4e9c
movl $0x18ebb, %edi          # imm = 0x18EBB
callq 0x424f40
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0xb4(%rax)
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq