// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprAlloc
SQLITE_PRIVATE Expr *sqlite3ExprAlloc(
  sqlite3 *db,            /* Handle for sqlite3DbMallocRawNN() */
  int op,                 /* Expression opcode */
  const Token *pToken,    /* Token argument.  Might be NULL */
  int dequote             /* True to dequote */
){
  Expr *pNew;
  int nExtra = 0;
  int iValue = 0;

  assert( db!=0 );
  if( pToken ){
    if( op!=TK_INTEGER || pToken->z==0
          || sqlite3GetInt32(pToken->z, &iValue)==0 ){
      nExtra = pToken->n+1;
      assert( iValue>=0 );
    }
  }
  pNew = sqlite3DbMallocRawNN(db, sizeof(Expr)+nExtra);
  if( pNew ){
    memset(pNew, 0, sizeof(Expr));
    pNew->op = (u8)op;
    pNew->iAgg = -1;
    if( pToken ){
      if( nExtra==0 ){
        pNew->flags |= EP_IntValue|EP_Leaf|(iValue?EP_IsTrue:EP_IsFalse);
        pNew->u.iValue = iValue;
      }else{
        pNew->u.zToken = (char*)&pNew[1];
        assert( pToken->z!=0 || pToken->n==0 );
        if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n);
        pNew->u.zToken[pToken->n] = 0;
        if( dequote && sqlite3Isquote(pNew->u.zToken[0]) ){
          sqlite3DequoteExpr(pNew);
        }
      }
    }
#if SQLITE_MAX_EXPR_DEPTH>0
    pNew->nHeight = 1;
#endif
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x41d6c2
cmpl $0x98, -0xc(%rbp)
jne 0x41d6b3
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x41d6b3
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x40c300
cmpl $0x0, %eax
jne 0x41d6c0
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x41d6c2
movq -0x8(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
addq $0x48, %rsi
callq 0x3d62a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x41d7d1
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x19360
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movw $0xffff, 0x32(%rax)     # imm = 0xFFFF
cmpq $0x0, -0x18(%rbp)
je 0x41d7c6
cmpl $0x0, -0x2c(%rbp)
jne 0x41d747
movl -0x30(%rbp), %edx
movl $0x20000000, %ecx       # imm = 0x20000000
movl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %edx
cmovnel %eax, %ecx
orl $0x800400, %ecx         # imm = 0x800400
movq -0x28(%rbp), %rax
orl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x41d7c4
movq -0x28(%rbp), %rcx
addq $0x48, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x41d77e
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x19610
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0x1c(%rbp)
je 0x41d7c2
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x189425(%rip), %rax    # 0x5a6bd0
movzbl (%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x41d7c2
movq -0x28(%rbp), %rdi
callq 0x43cc20
jmp 0x41d7c4
jmp 0x41d7c6
movq -0x28(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)