// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_step
SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
  int rc = SQLITE_OK;      /* Result from sqlite3Step() */
  int rc2 = SQLITE_OK;     /* Result from sqlite3Reprepare() */
  Vdbe *v = (Vdbe*)pStmt;  /* the prepared statement */
  int cnt = 0;             /* Counter to prevent infinite loop of reprepares */
  sqlite3 *db;             /* The database connection */

  if( vdbeSafetyNotNull(v) ){
    return SQLITE_MISUSE_BKPT;
  }
  db = v->db;
  sqlite3_mutex_enter(db->mutex);
  v->doingRerun = 0;
  while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
         && cnt++ < SQLITE_MAX_SCHEMA_RETRY
         && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
    sqlite3_reset(pStmt);
    v->doingRerun = 1;
    assert( v->expired==0 );
  }
  if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
    /* This case occurs after failing to recompile an sql statement. 
    ** The error message from the SQL compiler has already been loaded 
    ** into the database handle. This block copies the error message 
    ** from the database handle into the statement and sets the statement
    ** program counter to 0 to ensure that when the statement is 
    ** finalized or reset the parser error message is available via
    ** sqlite3_errmsg() and sqlite3_errcode().
    */
    const char *zErr = (const char *)sqlite3_value_text(db->pErr); 
    sqlite3DbFree(db, v->zErrMsg);
    if( !db->mallocFailed ){
      v->zErrMsg = sqlite3DbStrDup(db, zErr);
      v->rc = rc2;
    } else {
      v->zErrMsg = 0;
      v->rc = rc = SQLITE_NOMEM;
    }
  }
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %r14
callq 0xf150
testl %eax, %eax
je 0xe68f
movl $0xf933, %edi           # imm = 0xF933
callq 0x9008
pushq $0x15
popq %rax
jmp 0xf13e
movq (%r14), %rax
movq %rax, -0x68(%rbp)
movzwl 0x9a(%r14), %eax
andl $0xf7ff, %eax           # imm = 0xF7FF
leaq 0xc0(%r14), %rcx
movq %rcx, -0x88(%rbp)
leaq 0x58(%r14), %rcx
movq %rcx, -0x60(%rbp)
pushq $0x7
popq %r12
movl $0x0, -0x4c(%rbp)
movw %ax, 0x9a(%r14)
cmpl $0xbdf20da3, 0x50(%r14) # imm = 0xBDF20DA3
je 0xe6de
movq %r14, %rdi
callq 0xdca3
movq (%r14), %r15
cmpb $0x0, 0x50(%r15)
jne 0xf129
movl 0x90(%r14), %ecx
movzwl 0x9a(%r14), %eax
testl %ecx, %ecx
jle 0xe73c
testb $0x3, %al
je 0xe7d8
movq (%r14), %r12
movq 0x10(%r14), %rbx
leaq 0x38(%rbx), %rdi
movq %rdi, -0x38(%rbp)
pushq $0x8
popq %rsi
callq 0x1fb19
andq $0x0, 0x28(%r14)
cmpl $0x7, 0x94(%r14)
jne 0xe805
movb $0x1, 0x50(%r12)
jmp 0xe8d4
pushq $0x11
popq %rdx
pushq $0x1
popq %rsi
movl %esi, %ebx
testb $0x20, %al
jne 0xe9d6
testl %ecx, %ecx
jns 0xe6ff
movl 0x9c(%r15), %eax
testl %eax, %eax
jne 0xe766
movl $0x0, 0x148(%r15)
cmpq $0x0, 0xc8(%r15)
je 0xe790
cmpb $0x0, 0x99(%r15)
jne 0xe790
movq (%r15), %rdi
movq -0x88(%rbp), %rsi
callq 0x21b2a
movl 0x9c(%r15), %eax
incl %eax
movl %eax, 0x9c(%r15)
movzwl 0x9a(%r14), %eax
btl $0x8, %eax
jb 0xe7b6
incl 0xa4(%r15)
movzwl 0x9a(%r14), %eax
btl $0x9, %eax
jae 0xe7cb
incl 0xa0(%r15)
movzwl 0x9a(%r14), %eax
andl $0x0, 0x90(%r14)
jmp 0xe6ff
incl 0xa8(%r15)
movq %r14, %rdi
callq 0x21b7e
decl 0xa8(%r15)
movl %eax, %r12d
pushq $0x64
popq %rax
movl %eax, %ebx
cmpl $0x64, %r12d
jne 0xe8d8
jmp 0xe9b7
movl 0x34(%r14), %ecx
movzwl 0x9a(%r14), %eax
andl $0x3, %eax
cmpw $0x1, %ax
jne 0xe835
movq 0x10(%r14), %rdx
testb $0x10, 0x21c(%rdx)
jne 0xeb39
xorl %r13d, %r13d
xorl %esi, %esi
jmp 0xeb49
xorl %r13d, %r13d
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movl %ecx, %esi
movslq 0x90(%r14), %rdx
movslq %esi, %rdi
cmpq %rdx, %rdi
movq %rdx, %rsi
cmovgq %rdi, %rsi
imulq $0x18, %rdx, %r10
leal 0x1(%rdx), %r11d
movq %rdx, %r9
cmpq %rdi, %r9
jge 0xeb21
movl %r11d, %r8d
cmpw $0x2, %ax
jne 0xe897
movq 0x8(%r14), %r11
incq %r9
cmpb $-0x6a, (%r11,%r10)
leaq 0x18(%r10), %r10
leal 0x1(%r8), %r11d
jne 0xe869
decq %r9
movq %r9, %rdx
movl %r8d, 0x90(%r14)
cmpl $0x0, 0x148(%r12)
je 0xeb7d
movl $0x9, 0x94(%r14)
movq -0x60(%rbp), %rdi
movq %r12, %rsi
leaq 0x5ce33(%rip), %rdx     # 0x6b6f9
leaq 0x6089b(%rip), %rcx     # 0x6f168
xorl %eax, %eax
callq 0x20d5f
pushq $0x1
popq %r12
cmpq $0x0, 0xc8(%r15)
je 0xe92f
cmpb $0x0, 0x99(%r15)
jne 0xe92f
cmpq $0x0, 0xe0(%r14)
je 0xe92f
movq (%r15), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x21b2a
movq 0xd0(%r15), %rdi
movq 0xe0(%r14), %rsi
movq -0x1b0(%rbp), %rax
subq 0xc0(%r14), %rax
imulq $0xf4240, %rax, %rdx    # imm = 0xF4240
callq *0xc8(%r15)
movl %r12d, %ebx
cmpl $0x65, %r12d
jne 0xe9b7
xorl %ebx, %ebx
pushq $0x8
popq %r12
xorl %eax, %eax
movslq 0x28(%r15), %rcx
cmpq %rcx, %rbx
jge 0xe9a3
movq 0x20(%r15), %rdx
movq (%rdx,%r12), %rcx
testq %rcx, %rcx
je 0xe99a
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movq 0x118(%rcx), %rsi
testq %rsi, %rsi
je 0xe972
movl 0x18(%rsi), %ecx
andl $0x0, 0x18(%rsi)
jmp 0xe974
xorl %ecx, %ecx
movq 0x108(%r15), %r8
testq %r8, %r8
je 0xe99a
testl %ecx, %ecx
jle 0xe99a
testl %eax, %eax
jne 0xe99a
movq 0x110(%r15), %rdi
movq -0x8(%rdx,%r12), %rdx
movq %r15, %rsi
callq *%r8
incq %rbx
addq $0x20, %r12
jmp 0xe940
movl %eax, 0x94(%r14)
testl %eax, %eax
pushq $0x1
popq %rax
movl %eax, %ebx
pushq $0x65
popq %rax
cmovel %eax, %ebx
movl %ebx, 0x44(%r15)
movq (%r14), %rdi
movl 0x94(%r14), %esi
callq 0xdc59
pushq $0x7
popq %r12
movl %r12d, %edx
cmpl $0x7, %eax
jne 0xe9dd
movl %edx, 0x94(%r14)
leal -0x66(%rbx), %eax
cmpl $-0x3, %eax
ja 0xe9fe
movzwl 0x9a(%r14), %eax
andl $0x400, %eax            # imm = 0x400
je 0xe9fe
movq %r14, %rdi
callq 0x20600
movl %eax, %ebx
andl 0x48(%r15), %ebx
cmpl $0x11, %ebx
jne 0xf133
cmpl $0x32, -0x4c(%rbp)
je 0xf10d
testb $0x4, 0x9b(%r14)
jne 0xea23
xorl %esi, %esi
jmp 0xea2a
movq 0xe0(%r14), %rsi
movq (%r14), %r15
andq $0x0, (%rsp)
movq %r15, %rdi
pushq $-0x1
popq %rdx
xorl %ecx, %ecx
movq %r14, %r8
leaq -0x78(%rbp), %r9
callq 0x118f7
testl %eax, %eax
jne 0xf0c0
incl -0x4c(%rbp)
movq -0x78(%rbp), %rbx
movl $0x128, %edx            # imm = 0x128
leaq -0x1b0(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x82c0
movl $0x128, %edx            # imm = 0x128
movq %rbx, %rdi
movq %r14, %rsi
callq 0x82c0
movl $0x128, %edx            # imm = 0x128
movq %r14, %rdi
movq %r15, %rsi
callq 0x82c0
movq 0x68(%rbx), %rax
movq 0x68(%r14), %rcx
movq %rcx, 0x68(%rbx)
movq %rax, 0x68(%r14)
movq 0x60(%rbx), %rax
movq 0x60(%r14), %rcx
movq %rcx, 0x60(%rbx)
movq %rax, 0x60(%r14)
movq 0xe0(%rbx), %rax
movq 0xe0(%r14), %rcx
movq %rcx, 0xe0(%rbx)
movq %rax, 0xe0(%r14)
movzwl 0x9a(%rbx), %eax
andl $0x400, %eax            # imm = 0x400
movzwl 0x9a(%r14), %ecx
andl $0xfffffbff, %ecx       # imm = 0xFFFFFBFF
orl %eax, %ecx
movw %cx, 0x9a(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfca3
movq -0x78(%rbp), %rdi
andl $0x0, 0x94(%rdi)
callq 0xdc20
movq %r14, %rdi
callq 0xdca3
movzwl 0x9a(%r14), %eax
orl $0x800, %eax            # imm = 0x800
jmp 0xe6c4
incl %esi
movl %esi, 0x90(%r14)
andl $0x0, 0x94(%r14)
pushq $0x65
jmp 0xe8d6
movl 0x218(%rdx), %esi
sarl $0x3, %esi
movq 0x200(%rdx), %r13
addq $0x1f8, %rdx            # imm = 0x1F8
movq %rdx, -0x48(%rbp)
testl %esi, %esi
movl $0x0, %edx
movq %rsi, -0x40(%rbp)
cmovgl %esi, %edx
xorl %edi, %edi
movl %ecx, %esi
cmpq %rdi, %rdx
je 0xe84a
movq (%r13,%rdi,8), %r8
addl 0x8(%r8), %esi
incq %rdi
jmp 0xeb66
movl %edx, %esi
subl %ecx, %esi
jge 0xeb90
movslq %edx, %rcx
imulq $0x18, %rcx, %r8
addq 0x8(%r14), %r8
jmp 0xebb1
movq %r13, %rcx
movl %esi, %edx
movq (%rcx), %rdi
subl 0x8(%rdi), %edx
jl 0xeba5
addq $0x8, %rcx
movl %edx, %esi
jmp 0xeb95
movslq %esi, %rcx
imulq $0x18, %rcx, %r8
addq (%rdi), %r8
movl %esi, %edx
cmpw $0x1, %ax
jne 0xec93
movw $0x4, 0x5c(%rbx)
movb $0x1, 0x5e(%rbx)
movslq %edx, %rax
movq %rax, 0x50(%rbx)
movw $0xa02, 0x94(%rbx)      # imm = 0xA02
movzbl (%r8), %eax
leaq 0x77360(%rip), %rcx     # 0x85f40
movq (%rcx,%rax,8), %rdi
movq %rdi, 0x78(%rbx)
movq %r8, %r12
callq 0x8f8e
movq %r12, %r8
movl %eax, 0x90(%rbx)
movw $0x103, 0x96(%rbx)      # imm = 0x103
addq $0xa8, %rbx
cmpb $-0x12, 0x1(%r12)
jne 0xec8f
movq -0x40(%rbp), %r9
leal 0x8(,%r9,8), %esi
testl %r9d, %r9d
movl $0x0, %eax
cmovgl %r9d, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xec42
movq (%r13,%rcx,8), %rdx
cmpq 0x10(%r8), %rdx
je 0xec40
incq %rcx
jmp 0xec2b
movl %ecx, %eax
cmpl %r9d, %eax
jne 0xec8f
xorl %edx, %edx
testl %r9d, %r9d
setne %dl
movq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r9, -0x40(%rbp)
movl %esi, -0x38(%rbp)
callq 0xf2c6
testl %eax, %eax
je 0xec6f
movq %rbx, -0x38(%rbp)
movq %r12, %r8
jmp 0xec93
movq 0x8(%r13), %rax
movq %r12, %r8
movq 0x10(%r12), %rcx
movslq -0x40(%rbp), %rdx
movq %rcx, (%rax,%rdx,8)
orb $0x10, 0x24(%r13)
movl -0x38(%rbp), %eax
movl %eax, 0x20(%r13)
movq %rbx, -0x38(%rbp)
movq %r8, -0x70(%rbp)
movw $0x4, %dx
movq -0x38(%rbp), %rbx
movw %dx, 0x24(%rbx)
movslq 0x4(%r8), %rax
movq %rax, 0x18(%rbx)
movb $0x1, %cl
movb %cl, 0x26(%rbx)
movw %dx, 0x5c(%rbx)
movslq 0x8(%r8), %rax
movq %rax, 0x50(%rbx)
movb %cl, 0x5e(%rbx)
movw %dx, 0x94(%rbx)
movslq 0xc(%r8), %rax
movq %rax, 0x88(%rbx)
movb %cl, 0x96(%rbx)
leaq 0xa8(%rbx), %r13
movq %r13, %rdi
pushq $0x20
popq %rsi
xorl %edx, %edx
callq 0xf2c6
pushq $0x1
popq %r12
testl %eax, %eax
jne 0xe8d8
movq %r13, -0x30(%rbp)
movw $0x602, 0xcc(%rbx)      # imm = 0x602
movq 0xb0(%rbx), %r9
movq -0x70(%rbp), %rcx
movzbl 0x1(%rcx), %eax
addl $0xffffff13, %eax       # imm = 0xFFFFFF13
cmpl $0xf, %eax
movq %rcx, %rdx
ja 0xf03d
leaq 0x58351(%rip), %rcx     # 0x6707c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rdx), %r13
movzwl 0xa(%r13), %ecx
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5d01b(%rip), %rdx     # 0x6bd65
xorl %eax, %eax
movq %r9, %rbx
callq 0xaf26
movq %rbx, -0x58(%rbp)
movq %rbx, %rdi
callq 0x8f8e
movl %eax, %ebx
xorl %ecx, %ecx
movq %r13, -0x48(%rbp)
movzwl 0xa(%r13), %eax
movl %ebx, %r12d
cmpq %rax, %rcx
jae 0xedfd
movq %rcx, -0x40(%rbp)
movq 0x18(%r13,%rcx,8), %rax
leaq 0x5cfe7(%rip), %rcx     # 0x6bd70
testq %rax, %rax
je 0xed91
movq (%rax), %rcx
movq %rcx, -0x80(%rbp)
movq %rcx, %rdi
callq 0x8f8e
movl %eax, %r13d
leal (%rbx,%r13), %eax
cmpl $0x1a, %eax
jg 0xf05a
movq -0x58(%rbp), %rcx
movb $0x2c, (%rcx,%r12)
incq %r12
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rdx
cmpb $0x0, (%rax,%rdx)
je 0xedd5
addl $0x2, %ebx
movb $0x2d, (%rcx,%r12)
jmp 0xedd8
movl %r12d, %ebx
movl %ebx, %edi
addq %rcx, %rdi
leal 0x1(%r13), %edx
movq -0x80(%rbp), %rsi
callq 0x82c0
addl %r13d, %ebx
movq -0x40(%rbp), %rcx
incq %rcx
movq -0x48(%rbp), %r13
jmp 0xed68
movq -0x58(%rbp), %rsi
jmp 0xf066
movq 0x10(%rdx), %rax
movq 0x30(%rax), %rcx
movswl (%rax), %r8d
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5cf64(%rip), %rdx     # 0x6bd83
xorl %eax, %eax
movq %r9, %r12
callq 0xaf26
jmp 0xef4f
movl 0x10(%rdx), %ecx
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5e880(%rip), %rdx     # 0x6d6be
xorl %eax, %eax
movq %r9, %r12
callq 0xaf26
jmp 0xef4f
movq 0x10(%rdx), %rax
movq (%rax), %rcx
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5cf13(%rip), %rdx     # 0x6bd74
jmp 0xee83
movb $0x0, (%r9)
movq %r9, %rsi
jmp 0xef52
movq 0x10(%rdx), %rax
movq (%rax), %rcx
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5db87(%rip), %rdx     # 0x6ca0a
xorl %eax, %eax
movq %r9, %r12
callq 0xaf26
jmp 0xef4f
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5e801(%rip), %rdx     # 0x6d6a0
jmp 0xeed2
movq 0x10(%rdx), %rax
movsd (%rax), %xmm0
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5ced4(%rip), %rdx     # 0x6bd8a
movb $0x1, %al
movq %r9, %r12
callq 0xaf26
jmp 0xef4f
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5ced0(%rip), %rdx     # 0x6bda2
xorl %eax, %eax
movq %r9, %r12
callq 0xaf26
jmp 0xef4f
movq 0x10(%rdx), %rax
movzwl 0x24(%rax), %ecx
testb $0x2, %cl
movq -0x30(%rbp), %r12
jne 0xf076
testb $0x4, %cl
jne 0xf07f
testb $0x8, %cl
jne 0xf09c
leaq 0x5ce84(%rip), %rsi     # 0x6bd90
testb $0x1, %cl
je 0xef56
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5f571(%rip), %rdx     # 0x6e48f
xorl %eax, %eax
movq %r9, %r13
callq 0xaf26
jmp 0xf0b8
movq 0x10(%rdx), %rax
movq 0x10(%rax), %rcx
movq (%rcx), %r8
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5ce52(%rip), %rdx     # 0x6bd97
xorl %eax, %eax
movq %r9, %r12
callq 0xaf26
movq %r12, %rsi
movq -0x30(%rbp), %r12
movq 0xb0(%rbx), %rdi
cmpq %rdi, %rsi
je 0xef75
movq %r12, %rdi
pushq $-0x1
popq %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0xe1d3
jmp 0xef87
callq 0x8f8e
movl %eax, 0xc8(%rbx)
movb $0x1, 0xcf(%rbx)
movb $0x3, 0xce(%rbx)
movzwl 0x9a(%r14), %eax
movl %eax, %ecx
andl $0x3, %ecx
cmpw $0x1, %cx
jne 0xf012
leaq 0xe0(%rbx), %rdi
pushq $0x4
popq %rsi
xorl %edx, %edx
callq 0xf2c6
pushq $0x1
popq %r12
testl %eax, %eax
movq -0x70(%rbp), %rax
jne 0xe8d8
movw $0x602, 0x104(%rbx)     # imm = 0x602
movl $0x2, 0x100(%rbx)
movq 0xe8(%rbx), %rsi
movzbl 0x3(%rax), %ecx
pushq $0x3
popq %rdi
leaq 0x5c947(%rip), %rdx     # 0x6b931
xorl %eax, %eax
callq 0xaf26
movw $0x103, 0x106(%rbx)     # imm = 0x103
movw $0x1, 0x13c(%rbx)
movb $0x5, 0x13e(%rbx)
movzwl 0x9a(%r14), %eax
notl %eax
shll $0x2, %eax
andl $0xc, %eax
movw %ax, 0x48(%r14)
movq 0x10(%r14), %rax
addq $0x38, %rax
movq %rax, 0x28(%r14)
andl $0x0, 0x94(%r14)
pushq $0x64
popq %rax
movl %eax, %ebx
jmp 0xe9b7
movq 0x10(%rdx), %rsi
testq %rsi, %rsi
movq -0x30(%rbp), %r12
jne 0xef56
movb $0x0, (%r9)
movq %r9, %rsi
jmp 0xef56
movq -0x58(%rbp), %rsi
movl $0x2e2e2e2c, (%rsi,%r12) # imm = 0x2E2E2E2C
movw $0x29, (%rsi,%r12)
movq -0x38(%rbp), %rbx
jmp 0xef52
movq 0x8(%rax), %rsi
jmp 0xef56
movq 0x18(%rax), %rcx
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5d97a(%rip), %rdx     # 0x6ca0a
xorl %eax, %eax
movq %r9, %r13
callq 0xaf26
jmp 0xf0b8
movsd 0x10(%rax), %xmm0
pushq $0x20
popq %rdi
movq %r9, %rsi
leaq 0x5ccdc(%rip), %rdx     # 0x6bd8a
movb $0x1, %al
movq %r9, %r13
callq 0xaf26
movq %r13, %rsi
jmp 0xef56
movl %eax, %ebx
cmpl $0x7, %eax
jne 0xf0cc
movb $0x1, 0x50(%r15)
movq -0x68(%rbp), %r12
testb $0x4, 0x9b(%r14)
je 0xf133
movq 0x130(%r12), %rdi
testq %rdi, %rdi
je 0xf133
callq 0xdf1e
movq %rax, %r15
movq -0x60(%rbp), %rax
movq (%rax), %rsi
movq %r12, %rdi
callq 0x968b
cmpb $0x0, 0x50(%r12)
je 0xf114
pushq $0x7
popq %rbx
xorl %eax, %eax
jmp 0xf11f
pushq $0x11
popq %rax
movl %eax, %ebx
jmp 0xf133
movq %r12, %rdi
movq %r15, %rsi
callq 0xf173
movq -0x60(%rbp), %rcx
movq %rax, (%rcx)
movl %ebx, %r12d
movl %r12d, 0x94(%r14)
movl %r12d, %ebx
movq -0x68(%rbp), %rdi
movl %ebx, %esi
callq 0xdc59
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq