// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: resetAccumulator
static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
  Vdbe *v = pParse->pVdbe;
  int i;
  struct AggInfo_func *pFunc;
  int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
  if( nReg==0 ) return;
  if( pParse->nErr || pParse->db->mallocFailed ) return;
#ifdef SQLITE_DEBUG
  /* Verify that all AggInfo registers are within the range specified by
  ** AggInfo.mnReg..AggInfo.mxReg */
  assert( nReg==pAggInfo->mxReg-pAggInfo->mnReg+1 );
  for(i=0; i<pAggInfo->nColumn; i++){
    assert( pAggInfo->aCol[i].iMem>=pAggInfo->mnReg
         && pAggInfo->aCol[i].iMem<=pAggInfo->mxReg );
  }
  for(i=0; i<pAggInfo->nFunc; i++){
    assert( pAggInfo->aFunc[i].iMem>=pAggInfo->mnReg
         && pAggInfo->aFunc[i].iMem<=pAggInfo->mxReg );
  }
#endif
  sqlite3VdbeAddOp3(v, OP_Null, 0, pAggInfo->mnReg, pAggInfo->mxReg);
  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){
    if( pFunc->iDistinct>=0 ){
      Expr *pE = pFunc->pFExpr;
      assert( !ExprHasProperty(pE, EP_xIsSelect) );
      if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
        sqlite3ErrorMsg(pParse, "DISTINCT aggregates must have exactly one "
           "argument");
        pFunc->iDistinct = -1;
      }else{
        KeyInfo *pKeyInfo = sqlite3KeyInfoFromExprList(pParse, pE->x.pList,0,0);
        sqlite3VdbeAddOp4(v, OP_OpenEphemeral, pFunc->iDistinct, 0, 0,
                          (char*)pKeyInfo, P4_KEYINFO);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x445118
jmp 0x445226
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x445132
movq -0x8(%rbp), %rax
movq (%rax), %rax
movzbl 0x61(%rax), %eax
cmpl $0x0, %eax
je 0x445137
jmp 0x445226
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x14(%rax), %r8d
movl $0x48, %esi
xorl %edx, %edx
callq 0x410130
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x445226
movq -0x28(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jl 0x44520a
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x4451aa
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x1, (%rax)
je 0x4451c9
movq -0x8(%rbp), %rdi
leaq 0x168ebe(%rip), %rsi    # 0x5ae073
movb $0x0, %al
callq 0x3cb660
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
jmp 0x445208
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x440f30
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x14(%rax), %edx
movq -0x40(%rbp), %r9
movl $0x64, %esi
xorl %r8d, %r8d
movl %r8d, %ecx
movl $0xfffffff7, (%rsp)     # imm = 0xFFFFFFF7
callq 0x429aa0
jmp 0x44520a
jmp 0x44520c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x445169
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)