// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: explainIndexRange
static char *explainIndexRange(sqlite3 *db, WhereLoop *pLoop, Table *pTab){
  Index *pIndex = pLoop->u.btree.pIndex;
  int nEq = pLoop->u.btree.nEq;
  int i, j;
  Column *aCol = pTab->aCol;
  int *aiColumn = pIndex->aiColumn;
  StrAccum txt;

  if( nEq==0 && (pLoop->wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ){
    return 0;
  }
  sqlite3StrAccumInit(&txt, 0, 0, SQLITE_MAX_LENGTH);
  txt.db = db;
  sqlite3StrAccumAppend(&txt, " (", 2);
  for(i=0; i<nEq; i++){
    char *z = (i==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[i]].zName;
    explainAppendTerm(&txt, i, z, "=");
  }

  j = i;
  if( pLoop->wsFlags&WHERE_BTM_LIMIT ){
    char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
    explainAppendTerm(&txt, i++, z, ">");
  }
  if( pLoop->wsFlags&WHERE_TOP_LIMIT ){
    char *z = (j==pIndex->nColumn ) ? "rowid" : aCol[aiColumn[j]].zName;
    explainAppendTerm(&txt, i, z, "<");
  }
  sqlite3StrAccumAppend(&txt, ")", 1);
  return sqlite3StrAccumFinish(&txt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x7ae47
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x30, %eax
cmpl $0x0, %eax
jne 0x7ae47
movq $0x0, -0x8(%rbp)
jmp 0x7b00c
leaq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
callq 0xa720
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0x37b28(%rip), %rsi     # 0xb2996
movl $0x2, %edx
callq 0x1bb70
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x7aef4
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
cmpl %ecx, %eax
jne 0x7aea6
leaq 0x33bd3(%rip), %rax     # 0xaea70
movq %rax, -0x90(%rbp)
jmp 0x7aec7
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x30(%rbp), %esi
movq -0x78(%rbp), %rdx
leaq -0x70(%rbp), %rdi
leaq 0x3780d(%rip), %rcx     # 0xb26f1
callq 0x7b020
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7ae7f
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x7af73
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
cmpl %ecx, %eax
jne 0x7af28
leaq 0x33b51(%rip), %rax     # 0xaea70
movq %rax, -0x98(%rbp)
jmp 0x7af49
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x30(%rbp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x80(%rbp), %rdx
leaq -0x70(%rbp), %rdi
leaq 0x357a8(%rip), %rcx     # 0xb0716
callq 0x7b020
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7afea
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x54(%rcx), %ecx
cmpl %ecx, %eax
jne 0x7afa1
leaq 0x33ad8(%rip), %rax     # 0xaea70
movq %rax, -0xa0(%rbp)
jmp 0x7afc2
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x30(%rbp), %esi
movq -0x88(%rbp), %rdx
leaq -0x70(%rbp), %rdi
leaq 0x35733(%rip), %rcx     # 0xb0718
callq 0x7b020
leaq -0x70(%rbp), %rdi
leaq 0x34e5c(%rip), %rsi     # 0xafe51
movl $0x1, %edx
callq 0x1bb70
leaq -0x70(%rbp), %rdi
callq 0xc310
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)