// File: /workspace/github_c_makefile_star2_O1/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 0x2c5ddf
movq %rax, %r14
movb 0x1f(%rbx), %al
testb %al, %al
je 0x2e7695
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0xd4(%rbx,%rax,4), %ebp
jmp 0x2e769d
movl 0x38(%rbx), %ebp
incl %ebp
movl %ebp, 0x38(%rbx)
movq %r14, %rdi
movl $0x45, %esi
xorl %edx, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x2b200c
cmpl $0x3, %r12d
jl 0x2e76d0
movb 0x1f(%rbx), %al
testb %al, %al
je 0x2e76ef
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0xd4(%rbx,%rax,4), %r13d
jmp 0x2e76fa
movl 0x90(%r14), %ecx
addl $0x2, %ecx
movq %r14, %rdi
movl $0xf, %esi
movl %r15d, %edx
xorl %r8d, %r8d
callq 0x2b200c
jmp 0x2e7760
movl 0x38(%rbx), %r13d
incl %r13d
movl %r13d, 0x38(%rbx)
movq %r14, %rdi
movl $0x73, %esi
xorl %edx, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x2b200c
leaq 0xec17a(%rip), %rdx     # 0x3d3890
movq %r14, %rdi
movl %eax, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x285198
movl 0x90(%r14), %ecx
addl $0x2, %ecx
movq %r14, %rdi
movl $0x39, %esi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x2b200c
movslq 0x90(%r14), %rax
testq %rax, %rax
jle 0x2e7760
movq 0x88(%r14), %rcx
leaq (%rax,%rax,2), %rax
movw $0x53, -0x16(%rcx,%rax,8)
movl %r12d, %r12d
leaq 0xf72c6(%rip), %rax     # 0x3dea30
movl (%rax,%r12,4), %esi
movl 0x90(%r14), %ecx
addl $0x2, %ecx
movq %r14, %rdi
movl %ebp, %edx
movl %r15d, %r8d
callq 0x2b200c
movq 0xa0(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movb $0x1, 0x21(%rax)
movq %r14, %rdi
movl $0x44, %esi
movl $0x1, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movq (%r14), %rax
cmpb $0x0, 0x61(%rax)
jne 0x2e77e4
leaq 0xf7257(%rip), %rax     # 0x3dea18
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
movq 0x88(%r14), %rax
movslq 0x90(%r14), %rdx
leaq (%rdx,%rdx,2), %rdx
movb $-0x1, -0x17(%rax,%rdx,8)
movq %rcx, -0x8(%rax,%rdx,8)
testl %ebp, %ebp
je 0x2e77ff
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x2e77ff
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