// File: /workspace/github_c_makefile_star2_O0/skeeto[P]flappy/sqlite3.c
// Function: explainIndexRange
static char *explainIndexRange(sqlite3 *db, WhereLoop *pLoop, Table *pTab){
  Index *pIndex = pLoop->u.btree.pIndex;
  u16 nEq = pLoop->u.btree.nEq;
  u16 nSkip = pLoop->u.btree.nSkip;
  int i, j;
  Column *aCol = pTab->aCol;
  i16 *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->nKeyCol ) ? "rowid" : aCol[aiColumn[i]].zName;
    if( i>=nSkip ){
      explainAppendTerm(&txt, i, z, "=");
    }else{
      if( i ) sqlite3StrAccumAppend(&txt, " AND ", 5);
      sqlite3StrAccumAppend(&txt, "ANY(", 4);
      sqlite3StrAccumAppend(&txt, z, -1);
      sqlite3StrAccumAppend(&txt, ")", 1);
    }
  }

  j = i;
  if( pLoop->wsFlags&WHERE_BTM_LIMIT ){
    char *z = (j==pIndex->nKeyCol ) ? "rowid" : aCol[aiColumn[j]].zName;
    explainAppendTerm(&txt, i++, z, ">");
  }
  if( pLoop->wsFlags&WHERE_TOP_LIMIT ){
    char *z = (j==pIndex->nKeyCol ) ? "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
movw 0x18(%rax), %ax
movw %ax, -0x2a(%rbp)
movq -0x18(%rbp), %rax
movw 0x1a(%rax), %ax
movw %ax, -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)
movzwl -0x2a(%rbp), %eax
cmpl $0x0, %eax
jne 0x81ec8
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x30, %eax
cmpl $0x0, %eax
jne 0x81ec8
movq $0x0, -0x8(%rbp)
jmp 0x82100
leaq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
callq 0xd400
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0x19759(%rip), %rsi     # 0x9b648
movl $0x2, %edx
callq 0x1fab0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movzwl -0x2a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x81fe6
movl -0x30(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x5e(%rcx), %ecx
cmpl %ecx, %eax
jne 0x81f2e
leaq 0x17910(%rip), %rax     # 0x99835
movq %rax, -0x90(%rbp)
jmp 0x81f50
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x30(%rbp), %rdx
movswq (%rcx,%rdx,2), %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), %eax
movzwl -0x2c(%rbp), %ecx
cmpl %ecx, %eax
jl 0x81f7f
movl -0x30(%rbp), %esi
movq -0x78(%rbp), %rdx
leaq -0x70(%rbp), %rdi
leaq 0x120b8(%rip), %rcx     # 0x94030
callq 0x82110
jmp 0x81fd6
cmpl $0x0, -0x30(%rbp)
je 0x81f9a
leaq -0x70(%rbp), %rdi
leaq 0x196bb(%rip), %rsi     # 0x9b64b
movl $0x5, %edx
callq 0x1fab0
leaq -0x70(%rbp), %rdi
leaq 0x196ac(%rip), %rsi     # 0x9b651
movl $0x4, %edx
callq 0x1fab0
movq -0x78(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1fab0
leaq -0x70(%rbp), %rdi
leaq 0x18e58(%rip), %rsi     # 0x9ae24
movl $0x1, %edx
callq 0x1fab0
jmp 0x81fd8
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x81f00
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x82066
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x5e(%rcx), %ecx
cmpl %ecx, %eax
jne 0x8201a
leaq 0x17824(%rip), %rax     # 0x99835
movq %rax, -0x98(%rbp)
jmp 0x8203c
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movswq (%rcx,%rdx,2), %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 0x195f5(%rip), %rcx     # 0x9b656
callq 0x82110
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x820de
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
movzwl 0x5e(%rcx), %ecx
cmpl %ecx, %eax
jne 0x82094
leaq 0x177aa(%rip), %rax     # 0x99835
movq %rax, -0xa0(%rbp)
jmp 0x820b6
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movswq (%rcx,%rdx,2), %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 0x1957f(%rip), %rcx     # 0x9b658
callq 0x82110
leaq -0x70(%rbp), %rdi
leaq 0x18d3b(%rip), %rsi     # 0x9ae24
movl $0x1, %edx
callq 0x1fab0
leaq -0x70(%rbp), %rdi
callq 0xeff0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)