// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: codeTriggerProgram
static int codeTriggerProgram(
  Parse *pParse,            /* The parser context */
  TriggerStep *pStepList,   /* List of statements inside the trigger body */
  int orconf                /* Conflict algorithm. (OE_Abort, etc) */  
){
  TriggerStep *pStep;
  Vdbe *v = pParse->pVdbe;
  sqlite3 *db = pParse->db;

  assert( pParse->pTriggerTab && pParse->pToplevel );
  assert( pStepList );
  assert( v!=0 );
  for(pStep=pStepList; pStep; pStep=pStep->pNext){
    /* Figure out the ON CONFLICT policy that will be used for this step
    ** of the trigger program. If the statement that caused this trigger
    ** to fire had an explicit ON CONFLICT, then use it. Otherwise, use
    ** the ON CONFLICT policy that was specified as part of the trigger
    ** step statement. Example:
    **
    **   CREATE TRIGGER AFTER INSERT ON t1 BEGIN;
    **     INSERT OR REPLACE INTO t2 VALUES(new.a, new.b);
    **   END;
    **
    **   INSERT INTO t1 ... ;            -- insert into t2 uses REPLACE policy
    **   INSERT OR IGNORE INTO t1 ... ;  -- insert into t2 uses IGNORE policy
    */
    pParse->eOrconf = (orconf==OE_Default)?pStep->orconf:(u8)orconf;
    assert( pParse->okConstFactor==0 );

    switch( pStep->op ){
      case TK_UPDATE: {
        sqlite3Update(pParse, 
          targetSrcList(pParse, pStep),
          sqlite3ExprListDup(db, pStep->pExprList, 0), 
          sqlite3ExprDup(db, pStep->pWhere, 0), 
          pParse->eOrconf
        );
        break;
      }
      case TK_INSERT: {
        sqlite3Insert(pParse, 
          targetSrcList(pParse, pStep),
          sqlite3SelectDup(db, pStep->pSelect, 0), 
          sqlite3IdListDup(db, pStep->pIdList), 
          pParse->eOrconf
        );
        break;
      }
      case TK_DELETE: {
        sqlite3DeleteFrom(pParse, 
          targetSrcList(pParse, pStep),
          sqlite3ExprDup(db, pStep->pWhere, 0)
        );
        break;
      }
      default: assert( pStep->op==TK_SELECT ); {
        SelectDest sDest;
        Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0);
        sqlite3SelectDestInit(&sDest, SRT_Discard, 0);
        sqlite3Select(pParse, pSelect, &sDest);
        sqlite3SelectDelete(db, pSelect);
        break;
      }
    } 
    if( pStep->op!=TK_SELECT ){
      sqlite3VdbeAddOp0(v, OP_ResetCount);
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x91afc
cmpl $0xa, -0x14(%rbp)
jne 0x91923
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x9192c
movl -0x14(%rbp), %eax
movzbl %al, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1e1(%rax)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x58(%rbp)
subl $0x6c, %eax
je 0x919d4
jmp 0x91950
movl -0x58(%rbp), %eax
subl $0x6d, %eax
je 0x91a40
jmp 0x9195e
movl -0x58(%rbp), %eax
subl $0x6e, %eax
jne 0x91a8a
jmp 0x9196c
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x91bd0
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
xorl %edx, %edx
callq 0x71a60
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %edx, %edx
callq 0x713e0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rax, %rcx
movq -0x8(%rbp), %rax
movzbl 0x1e1(%rax), %r8d
callq 0x628b0
jmp 0x91acf
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x91bd0
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
callq 0x71840
movq %rax, -0x78(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x72090
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq %rax, %rcx
movq -0x8(%rbp), %rax
movzbl 0x1e1(%rax), %r8d
callq 0x63f80
jmp 0x91acf
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x91bd0
movq %rax, -0x90(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rsi
xorl %edx, %edx
callq 0x713e0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq %rax, %rdx
callq 0x61bb0
jmp 0x91acf
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
callq 0x71840
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x72520
movq -0x8(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x5f480
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x53840
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x77, %eax
je 0x91ae9
movq -0x28(%rbp), %rdi
movl $0x64, %esi
callq 0x6be00
jmp 0x91aeb
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x91905
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)