// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: windowCheckValue
static void windowCheckValue(Parse *pParse, int reg, int eCond){
  static const char *azErr[] = {
    "frame starting offset must be a non-negative integer",
    "frame ending offset must be a non-negative integer",
    "second argument to nth_value must be a positive integer",
    "frame starting offset must be a non-negative number",
    "frame ending offset must be a non-negative number",
  };
  static int aOp[] = { OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge };
  Vdbe *v = sqlite3GetVdbe(pParse);
  int regZero = sqlite3GetTempReg(pParse);
  assert( eCond>=0 && eCond<ArraySize(azErr) );
  sqlite3VdbeAddOp2(v, OP_Integer, 0, regZero);
  if( eCond>=WINDOW_STARTING_NUM ){
    int regString = sqlite3GetTempReg(pParse);
    sqlite3VdbeAddOp4(v, OP_String8, 0, regString, 0, "", P4_STATIC);
    sqlite3VdbeAddOp3(v, OP_Ge, regString, sqlite3VdbeCurrentAddr(v)+2, reg);
    sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL);
    VdbeCoverage(v);
    assert( eCond==3 || eCond==4 );
    VdbeCoverageIf(v, eCond==3);
    VdbeCoverageIf(v, eCond==4);
  }else{
    sqlite3VdbeAddOp2(v, OP_MustBeInt, reg, sqlite3VdbeCurrentAddr(v)+2);
    VdbeCoverage(v);
    assert( eCond==0 || eCond==1 || eCond==2 );
    VdbeCoverageIf(v, eCond==0);
    VdbeCoverageIf(v, eCond==1);
    VdbeCoverageIf(v, eCond==2);
  }
  sqlite3VdbeAddOp3(v, aOp[eCond], regZero, sqlite3VdbeCurrentAddr(v)+2, reg);
  VdbeCoverageNeverNullIf(v, eCond==0); /* NULL case captured by */
  VdbeCoverageNeverNullIf(v, eCond==1); /*   the OP_MustBeInt */
  VdbeCoverageNeverNullIf(v, eCond==2);
  VdbeCoverageNeverNullIf(v, eCond==3); /* NULL case caught by */
  VdbeCoverageNeverNullIf(v, eCond==4); /*   the OP_Ge */
  sqlite3MayAbort(pParse);
  sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_ERROR, OE_Abort);
  sqlite3VdbeAppendP4(v, (void*)azErr[eCond], P4_STATIC);
  sqlite3ReleaseTempReg(pParse, regZero);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x2645be
movq %rax, %r14
movq %rbx, %rdi
callq 0x267d61
movl %eax, %ebp
pushq $0x45
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
callq 0x24d51a
cmpl $0x3, %r12d
jl 0x27ccfd
movq %rbx, %rdi
callq 0x267d61
movl %eax, %r13d
orl $-0x1, (%rsp)
leaq 0xed8c0(%rip), %r9      # 0x36a570
pushq $0x73
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x264609
movl 0x90(%r14), %ecx
addl $0x2, %ecx
pushq $0x39
popq %rsi
movq %r14, %rdi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x24d51f
movslq 0x90(%r14), %rcx
testq %rcx, %rcx
jle 0x27cd1c
movq 0x88(%r14), %rax
imulq $0x18, %rcx, %rdx
movw $0x53, -0x16(%rax,%rdx)
jmp 0x27cd1c
movl 0x90(%r14), %ecx
addl $0x2, %ecx
pushq $0xf
popq %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x24d51a
movl 0x90(%r14), %ecx
movl %r12d, %r12d
leaq 0xf899a(%rip), %rax     # 0x3756c0
movl (%rax,%r12,4), %esi
addl $0x2, %ecx
movq %r14, %rdi
movl %ebp, %edx
movl %r15d, %r8d
callq 0x24d51f
movq 0xa0(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movb $0x1, 0x21(%rax)
pushq $0x44
popq %rsi
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
movq %r14, %rdi
callq 0x24d51a
leaq 0xf8944(%rip), %rax     # 0x3756a8
movslq (%rax,%r12,4), %rsi
addq %rax, %rsi
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x26495f
testl %ebp, %ebp
je 0x27cd91
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x27cd91
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %ebp, 0xd4(%rbx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq