// File: /workspace/github_c_makefile_star2_O3/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 0x2bc630
movq %rax, %r14
movb 0x1f(%rbx), %al
testb %al, %al
je 0x2de3e3
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0xd4(%rbx,%rax,4), %ebp
jmp 0x2de3eb
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 0x2a83e1
cmpl $0x3, %r12d
jl 0x2de41e
movb 0x1f(%rbx), %al
testb %al, %al
je 0x2de444
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0xd4(%rbx,%rax,4), %r13d
jmp 0x2de44f
movl 0x90(%r14), %ecx
addl $0x2, %ecx
movq %r14, %rdi
movl $0xf, %esi
movl %r15d, %edx
xorl %r8d, %r8d
callq 0x2a83e1
movl 0x90(%r14), %ecx
jmp 0x2de4b5
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 0x2a83e1
leaq 0xebd05(%rip), %rdx     # 0x3ca170
movq %r14, %rdi
movl %eax, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x27b778
movl 0x90(%r14), %ecx
addl $0x2, %ecx
movq %r14, %rdi
movl $0x39, %esi
movl %r13d, %edx
movl %r15d, %r8d
callq 0x2a83e1
movslq 0x90(%r14), %rcx
testq %rcx, %rcx
jle 0x2de4b5
movq 0x88(%r14), %rax
leaq (%rcx,%rcx,2), %rdx
movw $0x53, -0x16(%rax,%rdx,8)
movl %r12d, %r12d
leaq 0xf6df1(%rip), %rax     # 0x3d52b0
movl (%rax,%r12,4), %esi
addl $0x2, %ecx
movq %r14, %rdi
movl %ebp, %edx
movl %r15d, %r8d
callq 0x2a83e1
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 0x2a83e1
movq (%r14), %rax
cmpb $0x0, 0x61(%rax)
jne 0x2de532
leaq 0xf6d89(%rip), %rax     # 0x3d5298
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 0x2de54d
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x2de54d
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