// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeList
SQLITE_PRIVATE int sqlite3VdbeList(
  Vdbe *p                   /* The VDBE */
){
  Mem *pSub = 0;                       /* Memory cell hold array of subprogs */
  sqlite3 *db = p->db;                 /* The database connection */
  int i;                               /* Loop counter */
  int rc = SQLITE_OK;                  /* Return code */
  Mem *pMem = &p->aMem[1];             /* First Mem of result set */
  int bListSubprogs = (p->explain==1 || (db->flags & SQLITE_TriggerEQP)!=0);
  Op *aOp;                             /* Array of opcodes */
  Op *pOp;                             /* Current opcode */

  assert( p->explain );
  assert( p->magic==VDBE_MAGIC_RUN );
  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM );

  /* Even though this opcode does not use dynamic strings for
  ** the result, result columns may become dynamic if the user calls
  ** sqlite3_column_text16(), causing a translation to UTF-16 encoding.
  */
  releaseMemArray(pMem, 8);
  p->pResultSet = 0;

  if( p->rc==SQLITE_NOMEM ){
    /* This happens if a malloc() inside a call to sqlite3_column_text() or
    ** sqlite3_column_text16() failed.  */
    sqlite3OomFault(db);
    return SQLITE_ERROR;
  }

  if( bListSubprogs ){
    /* The first 8 memory cells are used for the result set.  So we will
    ** commandeer the 9th cell to use as storage for an array of pointers
    ** to trigger subprograms.  The VDBE is guaranteed to have at least 9
    ** cells.  */
    assert( p->nMem>9 );
    pSub = &p->aMem[9];
  }else{
    pSub = 0;
  }

  /* Figure out which opcode is next to display */
  rc = sqlite3VdbeNextOpcode(p, pSub, p->explain==2, &p->pc, &i, &aOp);

  if( rc==SQLITE_OK ){
    pOp = aOp + i;
    if( AtomicLoad(&db->u1.isInterrupted) ){
      p->rc = SQLITE_INTERRUPT;
      rc = SQLITE_ERROR;
      sqlite3VdbeError(p, sqlite3ErrStr(p->rc));
    }else{
      char *zP4 = sqlite3VdbeDisplayP4(db, pOp);
      if( p->explain==2 ){
        sqlite3VdbeMemSetInt64(pMem, pOp->p1);
        sqlite3VdbeMemSetInt64(pMem+1, pOp->p2);
        sqlite3VdbeMemSetInt64(pMem+2, pOp->p3);
        sqlite3VdbeMemSetStr(pMem+3, zP4, -1, SQLITE_UTF8, sqlite3_free);
        p->nResColumn = 4;
      }else{
        sqlite3VdbeMemSetInt64(pMem+0, i);
        sqlite3VdbeMemSetStr(pMem+1, (char*)sqlite3OpcodeName(pOp->opcode),
                             -1, SQLITE_UTF8, SQLITE_STATIC);
        sqlite3VdbeMemSetInt64(pMem+2, pOp->p1);
        sqlite3VdbeMemSetInt64(pMem+3, pOp->p2);
        sqlite3VdbeMemSetInt64(pMem+4, pOp->p3);
        /* pMem+5 for p4 is done last */
        sqlite3VdbeMemSetInt64(pMem+6, pOp->p5);
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
        {
          char *zCom = sqlite3VdbeDisplayComment(db, pOp, zP4);
          sqlite3VdbeMemSetStr(pMem+7, zCom, -1, SQLITE_UTF8, sqlite3_free);
        }
#else
        sqlite3VdbeMemSetNull(pMem+7);
#endif
        sqlite3VdbeMemSetStr(pMem+5, zP4, -1, SQLITE_UTF8, sqlite3_free);
        p->nResColumn = 8;
      }
      p->pResultSet = pMem;
      if( db->mallocFailed ){
        p->rc = SQLITE_NOMEM;
        rc = SQLITE_ERROR;
      }else{
        p->rc = SQLITE_OK;
        rc = SQLITE_ROW;
      }
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
addq $0x38, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movw 0xc6(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzwl %ax, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x59(%rbp)
je 0x3f017e
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
movl $0x8, %esi
callq 0x3eb310
movq -0x10(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
cmpl $0x7, 0x38(%rax)
jne 0x3f01c5
movq -0x20(%rbp), %rdi
callq 0x3c8ba0
movl $0x1, -0x4(%rbp)
jmp 0x3f045a
cmpl $0x0, -0x34(%rbp)
je 0x3f01df
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
addq $0x1f8, %rax            # imm = 0x1F8
movq %rax, -0x18(%rbp)
jmp 0x3f01e7
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movw 0xc6(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzwl %ax, %eax
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movzbl %al, %edx
movq -0x10(%rbp), %rcx
addq $0x34, %rcx
leaq -0x24(%rbp), %r8
leaq -0x40(%rbp), %r9
callq 0x3f9270
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x3f0454
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl 0x168(%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x3f0292
movq -0x10(%rbp), %rax
movl $0x9, 0x38(%rax)
movl $0x1, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x3c8a80
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x3ed820
jmp 0x3f0452
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3f9580
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movw 0xc6(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzwl %ax, %eax
cmpl $0x2, %eax
jne 0x3f0330
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rax
movslq 0x4(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
movq -0x48(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movq -0x48(%rbp), %rax
movslq 0xc(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0xa8, %rdi
movq -0x58(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
leaq -0x2fb19(%rip), %r8     # 0x3c0800
callq 0x3c8170
movq -0x10(%rbp), %rax
movw $0x4, 0xc0(%rax)
jmp 0x3f0411
movq -0x30(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movzbl (%rax), %edi
callq 0x3f9a00
movq -0x70(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x3c8170
movq -0x30(%rbp), %rdi
addq $0x70, %rdi
movq -0x48(%rbp), %rax
movslq 0x4(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0xa8, %rdi
movq -0x48(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0xe0, %rdi
movq -0x48(%rbp), %rax
movslq 0xc(%rax), %rsi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
movq -0x48(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, %esi
callq 0x3c84b0
movq -0x30(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
callq 0x3c8550
movq -0x30(%rbp), %rdi
addq $0x118, %rdi            # imm = 0x118
movq -0x58(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
leaq -0x2fbff(%rip), %r8     # 0x3c0800
callq 0x3c8170
movq -0x10(%rbp), %rax
movw $0x8, 0xc0(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x61(%rax)
je 0x3f043e
movq -0x10(%rbp), %rax
movl $0x7, 0x38(%rax)
movl $0x1, -0x28(%rbp)
jmp 0x3f0450
movq -0x10(%rbp), %rax
movl $0x0, 0x38(%rax)
movl $0x64, -0x28(%rbp)
jmp 0x3f0452
jmp 0x3f0454
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)