LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/db.c
// Function: DB_GetRomSizeForNum
int DB_GetRomSizeForNum(sqlite3 *db, int num)
{
	__label__ out_finalize;
	char *zErr = NULL;
	int rc = SQLITE_OK;
	int size = -1;

	sqlite3_stmt *stmt;

	rc = sqlite3_prepare_v2(
		db,
		R"STATEMENT(
			select romsize from frags where num==:num limit 1;
		)STATEMENT",
		-1,
		&stmt,
		NULL
	);
	if (rc != SQLITE_OK) {
		zErr = "error in prepare";
		goto out_finalize;
	}

	rc = sqlite3_bind_int(stmt, 1, num);
	if (rc != SQLITE_OK) {
		zErr = "error in bind";
		goto out_finalize;
	}

	rc = sqlite3_step(stmt);
	switch(rc) {
	case SQLITE_DONE:
		size = -1;
		break;
	case SQLITE_ROW:
		size = sqlite3_column_int(stmt, 0);
		break;
	default:
		zErr = "error in step";
		break;
	}

out_finalize:
	if (zErr) fprintf(stderr, "DB_GetRomSizeForNum: %s\n", zErr);
	rc = sqlite3_finalize(stmt);
	if (rc != SQLITE_OK) fprintf(stderr,
		"DB_GetRomSizeForNum: error in finalize\n");
	return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
leaq 0x7e542(%rip), %rsi     # 0x87a8c
xorl %r15d, %r15d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rsp, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x14ef3
testl %eax, %eax
je 0x956f
leaq 0x7e50e(%rip), %r14     # 0x87a7b
jmp 0x958d
movq (%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x124d1
testl %eax, %eax
je 0x95ac
leaq 0x7e26e(%rip), %r14     # 0x877f8
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x95d4
movq (%rsp), %rdi
callq 0x100e6
testl %eax, %eax
jne 0x95f1
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
callq 0x10e17
movb $0x1, %r15b
cmpl $0x65, %eax
je 0x95f8
cmpl $0x64, %eax
jne 0x95fd
movq (%rsp), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x11faa
movl %eax, %ebx
jmp 0x958d
movq 0xa0a15(%rip), %rax     # 0xa9ff0
movq (%rax), %rdi
leaq 0x7e4e1(%rip), %rsi     # 0x87ac6
movq %r14, %rdx
xorl %eax, %eax
callq 0x81b0
jmp 0x9592
callq 0x8410
jmp 0x959f
xorl %r14d, %r14d
jmp 0x958d
leaq 0x7e469(%rip), %r14     # 0x87a6d
jmp 0x958a
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/db.c
// Function: DB_GetAddrForNum
int DB_GetAddrForNum(sqlite3 *db, int num)
{
	__label__ out_finalize;
	char *zErr = NULL;
	int rc = SQLITE_OK;
	int addr = -1;

	sqlite3_stmt *stmt;

	rc = sqlite3_prepare_v2(
		db,
		R"STATEMENT(
			select addr from frags where num==:num limit 1;
		)STATEMENT",
		-1,
		&stmt,
		NULL
	);
	if (rc != SQLITE_OK) {
		zErr = "error in prepare";
		goto out_finalize;
	}

	rc = sqlite3_bind_int(stmt, 1, num);
	if (rc != SQLITE_OK) {
		zErr = "error in bind";
		goto out_finalize;
	}

	rc = sqlite3_step(stmt);
	switch(rc) {
	case SQLITE_DONE:
		addr = -1;
		break;
	case SQLITE_ROW:
		addr = sqlite3_column_int(stmt, 0);
		break;
	default:
		zErr = "error in step";
		break;
	}

out_finalize:
	if (zErr) fprintf(stderr, "DB_GetAddrForNum: %s\n", zErr);
	rc = sqlite3_finalize(stmt);
	if (rc != SQLITE_OK) fprintf(stderr,
		"DB_GetAddrForNum: error in finalize\n");
	return addr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
leaq 0x7e4f1(%rip), %rsi     # 0x87b07
xorl %r15d, %r15d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rsp, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x14ef3
testl %eax, %eax
je 0x963b
leaq 0x7e442(%rip), %r14     # 0x87a7b
jmp 0x9659
movq (%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x124d1
testl %eax, %eax
je 0x9678
leaq 0x7e1a2(%rip), %r14     # 0x877f8
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x96a0
movq (%rsp), %rdi
callq 0x100e6
testl %eax, %eax
jne 0x96bd
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
callq 0x10e17
movb $0x1, %r15b
cmpl $0x65, %eax
je 0x96c4
cmpl $0x64, %eax
jne 0x96c9
movq (%rsp), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x11faa
movl %eax, %ebx
jmp 0x9659
movq 0xa0949(%rip), %rax     # 0xa9ff0
movq (%rax), %rdi
leaq 0x7e48d(%rip), %rsi     # 0x87b3e
movq %r14, %rdx
xorl %eax, %eax
callq 0x81b0
jmp 0x965e
callq 0x8432
jmp 0x966b
xorl %r14d, %r14d
jmp 0x9659
leaq 0x7e39d(%rip), %r14     # 0x87a6d
jmp 0x9656
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/db.c
// Function: DB_FragSearch
int DB_FragSearch(sqlite3 *db, uint8_t *data, ssize_t size)
{
	int rc = SQLITE_OK;
	char pcode[6] = {0};
	get_pcode(pcode, data);
	DB_Begin(db);
	for (ssize_t i = 0; i < (size - 15); i += 16) {
		struct fragment_s *frag = (struct fragment_s *)(data + i);
		if (!isfrag(frag)) continue;
		rc = DB_AddFrag(
			db,
			pcode,
			i,
			get_frag_num(frag),
			get_entrypoint(frag),
			ntohl(frag->offset_code),
			ntohl(frag->offset_relocs),
			ntohl(frag->romsize),
			ntohl(frag->ramsize),
			get_vma(frag)
		);
		if (rc != SQLITE_OK) {
			break;
		}
	}
	DB_End(db);
	return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
movw $0x0, 0x4(%rdi)
movl $0x0, (%rdi)
callq 0x99d8
leaq 0x7e237(%rip), %rsi     # 0x8793d
xorl %ebp, %ebp
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14a2f
cmpq $0x10, %r14
jl 0x97ec
addq $-0xf, %r14
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %r14, 0x20(%rsp)
movq %r15, 0x10(%rsp)
leaq (%r15,%r13), %r12
movq %r12, %rdi
callq 0x986b
movl $0x4, %ecx
testb %al, %al
je 0x97da
movq %r12, %rdi
callq 0x9818
cltq
movq %rax, 0x30(%rsp)
movq %r12, %rdi
callq 0x9849
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl 0x10(%r15,%r13), %r14d
movl 0x14(%r15,%r13), %ebp
bswapl %r14d
bswapl %ebp
movl 0x18(%r15,%r13), %ebx
bswapl %ebx
movq 0x10(%rsp), %rax
movl 0x1c(%rax,%r13), %r15d
bswapl %r15d
movq %r12, %rdi
callq 0x985a
movl %eax, %eax
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %r13, %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movq %r14, %r9
movq 0x20(%rsp), %r14
pushq %rax
pushq %r15
movq 0x20(%rsp), %r15
pushq %rbx
pushq %rbp
callq 0x93f3
addq $0x20, %rsp
movl %eax, %ebp
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
addl %ecx, %ecx
testb $0x3, %cl
jne 0x97ec
addq $0x10, %r13
cmpq %r14, %r13
jl 0x9739
leaq 0x7e151(%rip), %rsi     # 0x87944
movq 0x8(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x14a2f
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/mapfile.c
// Function: MappedFile_Create
struct MappedFile_s MappedFile_Create(char *filename, size_t size)
{
	__label__ out_error, out_ok, out_close;
	struct MappedFile_s m;

	m._fd = open(filename, O_RDWR | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR);
	if (!m._fd) goto out_error;
	close(m._fd);
	if (truncate(filename, size) < 0) goto out_error;
	m._fd = open(filename, O_RDWR);
	if (!m._fd) goto out_error;

	m.data = mmap(
		NULL,
		size,
		PROT_READ|PROT_WRITE,
		MAP_SHARED,
		m._fd,
		0
	);
	if (m.data == NULL) {
		goto out_close;
	}

	memset(m.data, 0, size);
	m.size = size;

	goto out_ok;

out_close:
	close(m._fd);
out_error:
	m.size = 0;
	m.data = NULL;
out_ok:
	return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x242, %esi            # imm = 0x242
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x82a0
movl %eax, 0x10(%rbx)
testl %eax, %eax
je 0x9919
movl %eax, %edi
callq 0x8140
movq %r15, %rdi
movq %r14, %rsi
callq 0x81e0
testl %eax, %eax
js 0x9919
movq %r15, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x82a0
movl %eax, 0x10(%rbx)
testl %eax, %eax
je 0x9919
movl %eax, %ebp
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x80c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x9912
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x8130
movq %r14, 0x8(%rbx)
jmp 0x991f
movl %ebp, %edi
callq 0x8140
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/mapfile.c
// Function: MappedFile_Open
struct MappedFile_s MappedFile_Open(char *filename, bool writable)
{
	__label__ out_error, out_ok, out_close;
	struct MappedFile_s m;
	struct stat sb;

	if (stat(filename, &sb) == -1) {
		goto out_error;
	}
	m.size = sb.st_size;

	m._fd = open(filename, writable ? O_RDWR : O_RDONLY);
	if (!m._fd) {
		goto out_error;
	}

	m.data = mmap(
		NULL,
		sb.st_size,
		PROT_READ|PROT_WRITE,
		writable ? MAP_SHARED : MAP_PRIVATE,
		m._fd,
		0
	);
	if (m.data == NULL) {
		goto out_close;
	}

	goto out_ok;

out_close:
	close(m._fd);
out_error:
	m.data = NULL;
out_ok:
	return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x81c0
cmpl $-0x1, %eax
je 0x99a4
movq 0x30(%rsp), %r14
movq %r14, 0x8(%rbx)
movzbl %bpl, %r12d
leal (%r12,%r12), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x82a0
movl %eax, 0x10(%rbx)
testl %eax, %eax
je 0x99a4
movl %eax, %ebp
movl $0x2, %ecx
subl %r12d, %ecx
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x80c0
movq %rax, (%rbx)
testq %rax, %rax
jne 0x99ab
movl %ebp, %edi
callq 0x8140
movq $0x0, (%rbx)
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/pcode.c
// Function: get_pcode
char *get_pcode(char pcode[6], uint8_t *rom)
{
	__label__ out;
	if (!rom or !pcode) goto out;
	pcode[0] = rom[0x3b];
	pcode[1] = rom[0x3c];
	pcode[2] = rom[0x3d];
	pcode[3] = rom[0x3e];
	pcode[4] = rom[0x3f] + '0';
	pcode[5] = '\0';
	for (int i=0; i < 4; i++) {
		if (!isalnum(pcode[i]))
			pcode[i] = '_';
		else
			pcode[i] = tolower(pcode[i]);
	}

	if (!isdigit(pcode[4]))
		pcode[4] = '_';

out:
	return pcode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x9a63
movb 0x3b(%rsi), %al
movb %al, (%rbx)
movb 0x3c(%rsi), %al
movb %al, 0x1(%rbx)
movb 0x3d(%rsi), %al
movb %al, 0x2(%rbx)
movb 0x3e(%rsi), %al
movb %al, 0x3(%rbx)
movb 0x3f(%rsi), %al
addb $0x30, %al
movb %al, 0x4(%rbx)
movb $0x0, 0x5(%rbx)
xorl %r15d, %r15d
callq 0x8380
movq %rax, %r14
movq (%r14), %rcx
movsbq (%rbx,%r15), %r12
movb $0x5f, %al
testb $0x8, (%rcx,%r12,2)
je 0x9a3e
callq 0x8370
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%rbx,%r15)
incq %r15
cmpq $0x4, %r15
jne 0x9a21
callq 0x8380
movq (%rax), %rax
movsbq 0x4(%rbx), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x9a63
movb $0x5f, 0x4(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: invokeProfileCallback
static SQLITE_NOINLINE void invokeProfileCallback(sqlite3 *db, Vdbe *p){
  sqlite3_int64 iNow;
  sqlite3_int64 iElapse;
  assert( p->startTime>0 );
  assert( (db->mTrace & (SQLITE_TRACE_PROFILE|SQLITE_TRACE_XPROFILE))!=0 );
  assert( db->init.busy==0 );
  assert( p->zSql!=0 );
  sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
  iElapse = (iNow - p->startTime)*1000000;
#ifndef SQLITE_OMIT_DEPRECATED
  if( db->xProfile ){
    db->xProfile(db->pProfileArg, p->zSql, iElapse);
  }
#endif
  if( db->mTrace & SQLITE_TRACE_PROFILE ){
    db->xTrace(SQLITE_TRACE_PROFILE, db->pTraceArg, p, (void*)&iElapse);
  }
  p->startTime = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x29000
movq (%r15), %rax
subq 0xb8(%rbx), %rax
imulq $0xf4240, %rax, %rdx    # imm = 0xF4240
movq %rdx, (%rsp)
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x101ea
movq 0xf8(%r14), %rdi
movq 0xf0(%rbx), %rsi
callq *%rax
testb $0x2, 0x68(%r14)
je 0x1020a
movq 0xe8(%r14), %rsi
movq %rsp, %rcx
movl $0x2, %edi
movq %rbx, %rdx
callq *0xe0(%r14)
movq $0x0, 0xb8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3OomFault
SQLITE_PRIVATE void sqlite3OomFault(sqlite3 *db){
  if( db->mallocFailed==0 && db->bBenignMalloc==0 ){
    db->mallocFailed = 1;
    if( db->nVdbeExec>0 ){
      db->u1.isInterrupted = 1;
    }
    db->lookaside.bDisable++;
    if( db->pParse ){
      db->pParse->rc = SQLITE_NOMEM_BKPT;
    }
  }
}

// Assembly:
cmpb $0x0, 0x61(%rdi)
je 0x10de0
retq
cmpb $0x0, 0x62(%rdi)
jne 0x10ddf
movb $0x1, 0x61(%rdi)
cmpl $0x0, 0xcc(%rdi)
jle 0x10dfd
movl $0x1, 0x168(%rdi)
incl 0x170(%rdi)
movq 0x130(%rdi), %rax
testq %rax, %rax
je 0x10ddf
movl $0x7, 0x18(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: columnName
static const void *columnName(
  sqlite3_stmt *pStmt,     /* The statement */
  int N,                   /* Which column to get the name for */
  int useUtf16,            /* True to return the name as UTF16 */
  int useType              /* What type of name */
){
  const void *ret;
  Vdbe *p;
  int n;
  sqlite3 *db;
#ifdef SQLITE_ENABLE_API_ARMOR
  if( pStmt==0 ){
    (void)SQLITE_MISUSE_BKPT;
    return 0;
  }
#endif
  ret = 0;
  p = (Vdbe *)pStmt;
  db = p->db;
  assert( db!=0 );
  n = sqlite3_column_count(pStmt);
  if( N<n && N>=0 ){
    N += useType*n;
    sqlite3_mutex_enter(db->mutex);
    assert( db->mallocFailed==0 );
#ifndef SQLITE_OMIT_UTF16
    if( useUtf16 ){
      ret = sqlite3_value_text16((sqlite3_value*)&p->aColName[N]);
    }else
#endif
    {
      ret = sqlite3_value_text((sqlite3_value*)&p->aColName[N]);
    }
    /* A malloc may have failed inside of the _text() call. If this
    ** is the case, clear the mallocFailed flag and return NULL.
    */
    if( db->mallocFailed ){
      sqlite3OomClear(db);
      ret = 0;
    }
    sqlite3_mutex_leave(db->mutex);
  }
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzwl 0xc0(%rdi), %ebp
cmpl %esi, %ebp
jbe 0x12141
movl %edx, %ebx
movq %rdi, %r14
movq (%rdi), %r15
imull %ecx, %ebp
addl %esi, %ebp
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x120f8
callq *0x98218(%rip)          # 0xaa310
movl %ebp, %eax
imulq $0x38, %rax, %rdi
addq 0x98(%r14), %rdi
cmpl $0x1, %ebx
movl $0x2, %esi
sbbl $0x0, %esi
callq 0x105b8
cmpb $0x0, 0x61(%r15)
je 0x12145
cmpl $0x0, 0xcc(%r15)
jne 0x1213d
movb $0x0, 0x61(%r15)
movl $0x0, 0x168(%r15)
decl 0x170(%r15)
xorl %ebx, %ebx
jmp 0x12148
xorl %ebx, %ebx
jmp 0x12157
movq %rax, %rbx
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x12157
callq *0x981c9(%rip)          # 0xaa320
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3_blob_close
SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
  Incrblob *p = (Incrblob *)pBlob;
  int rc;
  sqlite3 *db;

  if( p ){
    sqlite3_stmt *pStmt = p->pStmt;
    db = p->db;
    sqlite3_mutex_enter(db->mutex);
    sqlite3DbFree(db, p);
    sqlite3_mutex_leave(db->mutex);
    rc = sqlite3_finalize(pStmt);
  }else{
    rc = SQLITE_OK;
  }
  return rc;
}

// Assembly:
testq %rdi, %rdi
je 0x1425f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rbx
movq 0x20(%rdi), %r15
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x14238
callq *0x960d8(%rip)          # 0xaa310
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b7c1
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x14252
callq *0x960ce(%rip)          # 0xaa320
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x100e6
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3_enable_load_extension
SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
  sqlite3_mutex_enter(db->mutex);
  if( onoff ){
    db->flags |= SQLITE_LoadExtension|SQLITE_LoadExtFunc;
  }else{
    db->flags &= ~(u64)(SQLITE_LoadExtension|SQLITE_LoadExtFunc);
  }
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x154e8
callq *0x94e28(%rip)          # 0xaa310
movq $-0x30001, %rax         # imm = 0xFFFCFFFF
andq 0x30(%rbx), %rax
xorl %ecx, %ecx
testl %ebp, %ebp
movl $0x30000, %edx          # imm = 0x30000
cmoveq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x30(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x15516
callq *0x94e0a(%rip)          # 0xaa320
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3_profile
SQLITE_API void *sqlite3_profile(
  sqlite3 *db,
  void (*xProfile)(void*,const char*,sqlite_uint64),
  void *pArg
){
  void *pOld;

#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) ){
    (void)SQLITE_MISUSE_BKPT;
    return 0;
  }
#endif
  sqlite3_mutex_enter(db->mutex);
  pOld = db->pProfileArg;
  db->xProfile = xProfile;
  db->pProfileArg = pArg;
  db->mTrace &= SQLITE_TRACE_NONLEGACY_MASK;
  if( db->xProfile ) db->mTrace |= SQLITE_TRACE_XPROFILE;
  sqlite3_mutex_leave(db->mutex);
  return pOld;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x18ff6
callq *0x9131a(%rip)          # 0xaa310
movq 0xf8(%rbx), %r14
movq %r15, 0xf0(%rbx)
movq %r12, 0xf8(%rbx)
movb 0x68(%rbx), %al
andb $0xf, %al
leal -0x80(%rax), %ecx
testq %r15, %r15
movzbl %al, %eax
movzbl %cl, %ecx
cmovel %eax, %ecx
movb %cl, 0x68(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x19031
callq *0x912ef(%rip)          # 0xaa320
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: clearSelect
static void clearSelect(sqlite3 *db, Select *p, int bFree){
  while( p ){
    Select *pPrior = p->pPrior;
    sqlite3ExprListDelete(db, p->pEList);
    sqlite3SrcListDelete(db, p->pSrc);
    sqlite3ExprDelete(db, p->pWhere);
    sqlite3ExprListDelete(db, p->pGroupBy);
    sqlite3ExprDelete(db, p->pHaving);
    sqlite3ExprListDelete(db, p->pOrderBy);
    sqlite3ExprDelete(db, p->pLimit);
#ifndef SQLITE_OMIT_WINDOWFUNC
    if( OK_IF_ALWAYS_TRUE(p->pWinDefn) ){
      sqlite3WindowListDelete(db, p->pWinDefn);
    }
    assert( p->pWin==0 );
#endif
    if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
    if( bFree ) sqlite3DbFreeNN(db, p);
    p = pPrior;
    bFree = 1;
  }
}

// Assembly:
testq %rsi, %rsi
je 0x3f783
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
sete %bpl
movq (%r14), %rsi
movq 0x50(%r14), %r15
testq %rsi, %rsi
je 0x3f6cd
movq %rbx, %rdi
callq 0x3f953
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x3f784
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x3f6ea
movq %rbx, %rdi
callq 0x3f525
movq 0x38(%r14), %rsi
testq %rsi, %rsi
je 0x3f6fb
movq %rbx, %rdi
callq 0x3f953
movq 0x40(%r14), %rsi
testq %rsi, %rsi
je 0x3f70c
movq %rbx, %rdi
callq 0x3f525
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0x3f71d
movq %rbx, %rdi
callq 0x3f953
movq 0x60(%r14), %rsi
testq %rsi, %rsi
je 0x3f72e
movq %rbx, %rdi
callq 0x3f525
movq 0x78(%r14), %rsi
testq %rsi, %rsi
je 0x3f74b
movq 0x40(%rsi), %r12
movq %rbx, %rdi
callq 0x3f5d7
movq %r12, %rsi
testq %r12, %r12
jne 0x3f737
movq 0x68(%r14), %rsi
testq %rsi, %rsi
je 0x3f75c
movq %rbx, %rdi
callq 0x3f86d
testb $0x1, %bpl
jne 0x3f76d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b7c1
xorl %ebp, %ebp
movq %r15, %r14
testq %r15, %r15
jne 0x3f6b9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprIdToTrueFalse
SQLITE_PRIVATE int sqlite3ExprIdToTrueFalse(Expr *pExpr){
  assert( pExpr->op==TK_ID || pExpr->op==TK_STRING );
  if( !ExprHasProperty(pExpr, EP_Quoted)
   && (sqlite3StrICmp(pExpr->u.zToken, "true")==0
       || sqlite3StrICmp(pExpr->u.zToken, "false")==0)
  ){
    pExpr->op = TK_TRUEFALSE;
    ExprSetProperty(pExpr, pExpr->u.zToken[4]==0 ? EP_IsTrue : EP_IsFalse);
    return 1;
  }
  return 0;
}

// Assembly:
movl 0x4(%rdi), %eax
btl $0x1a, %eax
jb 0x47015
movq 0x8(%rdi), %rcx
xorl %esi, %esi
leaq 0x489c7(%rip), %r8      # 0x8f958
leaq 0x41ed8(%rip), %rdx     # 0x88e70
movzbl (%rcx,%rsi), %r9d
movzbl (%rsi,%r8), %r10d
cmpb %r10b, %r9b
jne 0x46fae
testq %r9, %r9
jne 0x46fb8
jmp 0x46fbd
movb (%r9,%rdx), %r11b
cmpb (%r10,%rdx), %r11b
jne 0x46fbd
incq %rsi
jmp 0x46f98
cmpb %r10b, %r9b
je 0x46ff5
xorl %esi, %esi
leaq 0x48992(%rip), %r8      # 0x8f95d
movzbl (%rcx,%rsi), %r9d
movzbl (%rsi,%r8), %r10d
cmpb %r10b, %r9b
jne 0x46fe1
testq %r9, %r9
jne 0x46feb
jmp 0x46ff0
movb (%r9,%rdx), %r11b
cmpb (%r10,%rdx), %r11b
jne 0x46ff0
incq %rsi
jmp 0x46fcb
cmpb %r10b, %r9b
jne 0x47015
movb $-0x5b, (%rdi)
xorl %edx, %edx
cmpb $0x0, 0x4(%rcx)
setne %dl
shll $0x1c, %edx
addl $0x10000000, %edx       # imm = 0x10000000
orl %eax, %edx
movl %edx, 0x4(%rdi)
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprAnd
SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
  sqlite3 *db = pParse->db;
  if( pLeft==0  ){
    return pRight;
  }else if( pRight==0 ){
    return pLeft;
  }else if( ExprAlwaysFalse(pLeft) || ExprAlwaysFalse(pRight) ){
    sqlite3ExprUnmapAndDelete(pParse, pLeft);
    sqlite3ExprUnmapAndDelete(pParse, pRight);
    return sqlite3Expr(db, TK_INTEGER, "0");
  }else{
    return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
testq %rsi, %rsi
je 0x4f945
movq %rsi, %rdx
testq %rbx, %rbx
je 0x4f942
movq %rdi, %r15
movq (%rdi), %r14
movl $0x20000001, %eax       # imm = 0x20000001
movl 0x4(%rdx), %ecx
andl %eax, %ecx
cmpl $0x20000000, %ecx       # imm = 0x20000000
je 0x4f904
andl 0x4(%rbx), %eax
cmpl $0x20000000, %eax       # imm = 0x20000000
jne 0x4f952
movq %r15, %rdi
movq %rdx, %rsi
callq 0x4f9aa
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4f9aa
leaq 0x3f876(%rip), %rax     # 0x8f197
movq %rsp, %rdx
movq %rax, (%rdx)
movl $0x1, 0x8(%rdx)
movq %r14, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
callq 0x4afc4
movq %rax, %rbx
jmp 0x4f945
movq %rdx, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
movl $0x2c, %esi
movq %rbx, %rcx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x46dc1
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: exprToRegister
SQLITE_PRIVATE Expr *sqlite3ExprSkipCollateAndLikely(Expr *pExpr){
  while( pExpr && ExprHasProperty(pExpr, EP_Skip|EP_Unlikely) ){
    if( ExprHasProperty(pExpr, EP_Unlikely) ){
      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
      assert( pExpr->x.pList->nExpr>0 );
      assert( pExpr->op==TK_FUNCTION );
      pExpr = pExpr->x.pList->a[0].pExpr;
    }else{
      assert( pExpr->op==TK_COLLATE );
      pExpr = pExpr->pLeft;
    }
  }   
  return pExpr;
}

// Assembly:
testq %rdi, %rdi
je 0x57e76
movl 0x4(%rdi), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x57e76
btl $0x12, %eax
jb 0x57e69
addq $0x10, %rdi
jmp 0x57e71
movq 0x20(%rdi), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
jmp 0x57e4e
movb (%rdi), %al
movb %al, 0x36(%rdi)
movb $-0x55, (%rdi)
movl %esi, 0x2c(%rdi)
andb $-0x11, 0x5(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprAffinity
SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr){
  int op;
  while( ExprHasProperty(pExpr, EP_Skip) ){
    assert( pExpr->op==TK_COLLATE );
    pExpr = pExpr->pLeft;
    assert( pExpr!=0 );
  }
  op = pExpr->op;
  if( op==TK_SELECT ){
    assert( pExpr->flags&EP_xIsSelect );
    return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
  }
  if( op==TK_REGISTER ) op = pExpr->op2;
#ifndef SQLITE_OMIT_CAST
  if( op==TK_CAST ){
    assert( !ExprHasProperty(pExpr, EP_IntValue) );
    return sqlite3AffinityType(pExpr->u.zToken, 0);
  }
#endif
  if( (op==TK_AGG_COLUMN || op==TK_COLUMN) && pExpr->y.pTab ){
    return sqlite3TableColumnAffinity(pExpr->y.pTab, pExpr->iColumn);
  }
  if( op==TK_SELECT_COLUMN ){
    assert( pExpr->pLeft->flags&EP_xIsSelect );
    return sqlite3ExprAffinity(
        pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr
    );
  }
  return pExpr->affExpr;
}

// Assembly:
testb $0x10, 0x5(%rdi)
je 0x58a38
movq 0x10(%rdi), %rdi
jmp 0x58a2c
movzbl (%rdi), %eax
cmpl $0xab, %eax
je 0x58a56
cmpl $0x86, %eax
jne 0x58a59
movq 0x20(%rdi), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
jmp 0x58a2c
movb 0x36(%rdi), %al
movzbl %al, %ecx
cmpl $0xa3, %ecx
jle 0x58a76
cmpl $0xa4, %ecx
je 0x58a7e
cmpl $0xad, %ecx
je 0x58a8b
jmp 0x58acd
cmpl $0xa2, %ecx
jne 0x58abd
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
jne 0x58aa6
cmpb $-0x53, %al
jne 0x58acd
movq 0x10(%rdi), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movswq 0x30(%rdi), %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
jmp 0x58a2c
movswq 0x30(%rdi), %rax
testq %rax, %rax
js 0x58ad1
movq 0x8(%rcx), %rcx
shlq $0x5, %rax
movb 0x19(%rcx,%rax), %al
retq
cmpl $0x24, %ecx
jne 0x58acd
movq 0x8(%rdi), %rdi
xorl %esi, %esi
jmp 0x569b8
movb 0x1(%rdi), %al
retq
movb $0x44, %al
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3WindowCompare
SQLITE_PRIVATE int sqlite3WindowCompare(Parse *pParse, Window *p1, Window *p2, int bFilter){
  if( p1->eFrmType!=p2->eFrmType ) return 1;
  if( p1->eStart!=p2->eStart ) return 1;
  if( p1->eEnd!=p2->eEnd ) return 1;
  if( p1->eExclude!=p2->eExclude ) return 1;
  if( sqlite3ExprCompare(pParse, p1->pStart, p2->pStart, -1) ) return 1;
  if( sqlite3ExprCompare(pParse, p1->pEnd, p2->pEnd, -1) ) return 1;
  if( sqlite3ExprListCompare(p1->pPartition, p2->pPartition, -1) ) return 1;
  if( sqlite3ExprListCompare(p1->pOrderBy, p2->pOrderBy, -1) ) return 1;
  if( bFilter ){
    if( sqlite3ExprCompare(pParse, p1->pFilter, p2->pFilter, -1) ) return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb 0x20(%rsi), %al
movl $0x1, %ebx
cmpb 0x20(%rdx), %al
jne 0x5936d
movq %rdx, %r15
movq %rsi, %r12
movb 0x21(%rsi), %al
cmpb 0x21(%rdx), %al
jne 0x5936d
movb 0x22(%r12), %al
cmpb 0x22(%r15), %al
jne 0x5936d
movb 0x24(%r12), %al
cmpb 0x24(%r15), %al
jne 0x5936d
movl %ecx, %ebp
movq %rdi, %r14
movq 0x28(%r12), %rsi
movq 0x28(%r15), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x58ef8
testl %eax, %eax
jne 0x5936d
movq 0x30(%r12), %rsi
movq 0x30(%r15), %rdx
movq %r14, %rdi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x58ef8
testl %eax, %eax
jne 0x5936d
movq 0x10(%r12), %rdi
movq 0x10(%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x59378
testl %eax, %eax
jne 0x5936d
movq 0x18(%r12), %rdi
movq 0x18(%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x59378
testl %eax, %eax
jne 0x5936d
testl %ebp, %ebp
je 0x5936b
movq 0x48(%r12), %rsi
movq 0x48(%r15), %rdx
movq %r14, %rdi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x58ef8
testl %eax, %eax
jne 0x5936d
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprListCompare
SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
  int i;
  if( pA==0 && pB==0 ) return 0;
  if( pA==0 || pB==0 ) return 1;
  if( pA->nExpr!=pB->nExpr ) return 1;
  for(i=0; i<pA->nExpr; i++){
    Expr *pExprA = pA->a[i].pExpr;
    Expr *pExprB = pB->a[i].pExpr;
    if( pA->a[i].sortFlags!=pB->a[i].sortFlags ) return 1;
    if( sqlite3ExprCompare(0, pExprA, pExprB, iTab) ) return 1;
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
movq %rdi, %rcx
orq %rsi, %rcx
je 0x593fc
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testq %rsi, %rsi
sete %cl
testq %rdi, %rdi
sete %dl
orb %cl, %dl
jne 0x593ee
movl (%r15), %ecx
cmpl (%r14), %ecx
jne 0x593ee
cmpl $0x0, (%r15)
jle 0x593f3
movl $0x20, %r12d
xorl %r13d, %r13d
movb (%r15,%r12), %al
cmpb (%r14,%r12), %al
jne 0x593ee
movq -0x18(%r14,%r12), %rdx
movq -0x18(%r15,%r12), %rsi
xorl %edi, %edi
movl %ebx, %ecx
callq 0x58ef8
testl %eax, %eax
jne 0x593ee
incq %r13
movslq (%r15), %rcx
addq $0x20, %r12
xorl %eax, %eax
cmpq %rcx, %r13
jl 0x593ba
jmp 0x593f3
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3WindowDup
SQLITE_PRIVATE Window *sqlite3WindowDup(sqlite3 *db, Expr *pOwner, Window *p){
  Window *pNew = 0;
  if( ALWAYS(p) ){
    pNew = sqlite3DbMallocZero(db, sizeof(Window));
    if( pNew ){
      pNew->zName = sqlite3DbStrDup(db, p->zName);
      pNew->zBase = sqlite3DbStrDup(db, p->zBase);
      pNew->pFilter = sqlite3ExprDup(db, p->pFilter, 0);
      pNew->pFunc = p->pFunc;
      pNew->pPartition = sqlite3ExprListDup(db, p->pPartition, 0);
      pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, 0);
      pNew->eFrmType = p->eFrmType;
      pNew->eEnd = p->eEnd;
      pNew->eStart = p->eStart;
      pNew->eExclude = p->eExclude;
      pNew->regResult = p->regResult;
      pNew->pStart = sqlite3ExprDup(db, p->pStart, 0);
      pNew->pEnd = sqlite3ExprDup(db, p->pEnd, 0);
      pNew->pOwner = pOwner;
      pNew->bImplicitFrame = p->bImplicitFrame;
    }
  }
  return pNew;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x5acce
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x90, %esi
callq 0x11de0
testq %rax, %rax
je 0x5acce
movq %rax, %rbx
movq (%r14), %rsi
movq %r12, %rdi
callq 0x11bdc
movq %rax, (%rbx)
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x11bdc
movq %rax, 0x8(%rbx)
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0x5acd5
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5a513
jmp 0x5acd7
xorl %ebx, %ebx
jmp 0x5ad71
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movq 0x50(%r14), %rax
movq %rax, 0x50(%rbx)
movq 0x10(%r14), %rsi
xorl %r13d, %r13d
movq %r12, %rdi
xorl %edx, %edx
callq 0x5aaa1
movq %rax, 0x10(%rbx)
movq 0x18(%r14), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x5aaa1
movq %rax, 0x18(%rbx)
movb 0x20(%r14), %al
movb %al, 0x20(%rbx)
movb 0x22(%r14), %al
movb %al, 0x22(%rbx)
movb 0x21(%r14), %al
movb %al, 0x21(%rbx)
movb 0x24(%r14), %al
movb %al, 0x24(%rbx)
movl 0x60(%r14), %eax
movl %eax, 0x60(%rbx)
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x5ad45
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5a513
movq %rax, %r13
movq %r13, 0x28(%rbx)
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x5ad60
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5a513
jmp 0x5ad62
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %r15, 0x70(%rbx)
movb 0x23(%r14), %al
movb %al, 0x23(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3CheckObjectName
SQLITE_PRIVATE int sqlite3CheckObjectName(
  Parse *pParse,            /* Parsing context */
  const char *zName,        /* Name of the object to check */
  const char *zType,        /* Type of this object */
  const char *zTblName      /* Parent table name for triggers and indexes */
){
  sqlite3 *db = pParse->db;
  if( sqlite3WritableSchema(db) || db->init.imposterTable ){
    /* Skip these error checks for writable_schema=ON */
    return SQLITE_OK;
  }
  if( db->init.busy ){
    if( sqlite3_stricmp(zType, db->init.azInit[0])
     || sqlite3_stricmp(zName, db->init.azInit[1])
     || sqlite3_stricmp(zTblName, db->init.azInit[2])
    ){
      if( sqlite3Config.bExtraSchemaChecks ){
        sqlite3ErrorMsg(pParse, ""); /* corruptSchema() will supply the error */
        return SQLITE_ERROR;
      }
    }
  }else{
    if( pParse->nested==0 
     && 0==sqlite3StrNICmp(zName, "sqlite_", 7)
    ){
      sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s",
                      zName);
      return SQLITE_ERROR;
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq (%rdi), %rax
movl $0x10000001, %esi       # imm = 0x10000001
andl 0x30(%rax), %esi
xorl %ebx, %ebx
cmpl $0x1, %esi
je 0x5b64c
testb $0x2, 0xb6(%rax)
jne 0x5b64c
movq %rdi, %r14
cmpb $0x0, 0xb5(%rax)
je 0x5b59a
movq 0xb8(%rax), %rax
movq (%rax), %rsi
testq %rdx, %rdx
je 0x5b5d7
testq %rsi, %rsi
je 0x5b62d
xorl %edi, %edi
leaq 0x2d8ff(%rip), %r8      # 0x88e70
movzbl (%rdx,%rdi), %r9d
movzbl (%rsi,%rdi), %r10d
cmpb %r10b, %r9b
jne 0x5b587
testq %r9, %r9
jne 0x5b595
jmp 0x5b5dc
movb (%r9,%r8), %r9b
cmpb (%r10,%r8), %r9b
jne 0x5b62d
incq %rdi
jmp 0x5b571
cmpb $0x0, 0x1e(%r14)
jne 0x5b64c
leaq 0x33a54(%rip), %rsi     # 0x8f000
movq %r15, %rdi
movl $0x7, %edx
callq 0xcfa1
testl %eax, %eax
jne 0x5b64c
leaq 0x33a40(%rip), %rsi     # 0x8f008
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x139b7
jmp 0x5b647
testq %rsi, %rsi
jne 0x5b62d
movq 0x8(%rax), %rdx
testq %r15, %r15
je 0x5b618
testq %rdx, %rdx
je 0x5b62d
xorl %esi, %esi
leaq 0x2d87d(%rip), %rdi     # 0x88e70
movzbl (%r15,%rsi), %r8d
movzbl (%rdx,%rsi), %r9d
cmpb %r9b, %r8b
jne 0x5b609
testq %r8, %r8
jne 0x5b613
jmp 0x5b61d
movb (%r8,%rdi), %r8b
cmpb (%r9,%rdi), %r8b
jne 0x5b62d
incq %rsi
jmp 0x5b5f3
testq %rdx, %rdx
jne 0x5b62d
movq 0x10(%rax), %rsi
movq %rcx, %rdi
callq 0xcf55
testl %eax, %eax
je 0x5b64c
cmpb $0x0, 0x4ec65(%rip)     # 0xaa299
je 0x5b64c
leaq 0x2c42f(%rip), %rsi     # 0x87a6c
movq %r14, %rdi
xorl %eax, %eax
callq 0x139b7
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ResolveSelfReference
SQLITE_PRIVATE int sqlite3ResolveSelfReference(
  Parse *pParse,      /* Parsing context */
  Table *pTab,        /* The table being referenced, or NULL */
  int type,           /* NC_IsCheck or NC_PartIdx or NC_IdxExpr, or 0 */
  Expr *pExpr,        /* Expression to resolve.  May be NULL. */
  ExprList *pList     /* Expression list to resolve.  May be NULL. */
){
  SrcList sSrc;                   /* Fake SrcList for pParse->pNewTable */
  NameContext sNC;                /* Name context for pParse->pNewTable */
  int rc;

  assert( type==0 || pTab!=0 );
  assert( type==NC_IsCheck || type==NC_PartIdx || type==NC_IdxExpr || pTab==0 );
  memset(&sNC, 0, sizeof(sNC));
  memset(&sSrc, 0, sizeof(sSrc));
  if( pTab ){
    sSrc.nSrc = 1;
    sSrc.a[0].zName = pTab->zName;
    sSrc.a[0].pTab = pTab;
    sSrc.a[0].iCursor = -1;
  }
  sNC.pParse = pParse;
  sNC.pSrcList = &sSrc;
  sNC.ncFlags = type | NC_IsDDL;
  if( (rc = sqlite3ResolveExprNames(&sNC, pExpr))!=SQLITE_OK ) return rc;
  if( pList ) rc = sqlite3ResolveExprListNames(&sNC, pList);
  return rc;
}

// Assembly:
pushq %rbx
subq $0xc0, %rsp
movq %r8, %rbx
xorl %eax, %eax
movq %rax, 0xb0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movq %rax, 0x70(%rsp)
testq %rsi, %rsi
je 0x5b7aa
movl $0x1, (%rsp)
movq (%rsi), %rax
movq %rax, 0x18(%rsp)
movq %rsi, 0x28(%rsp)
movl $0xffffffff, 0x48(%rsp) # imm = 0xFFFFFFFF
leaq 0x80(%rsp), %rax
movq %rdi, (%rax)
movq %rsp, %rsi
movq %rsi, 0x8(%rax)
orl $0x10000, %edx          # imm = 0x10000
movl %edx, 0x28(%rax)
movq %rax, %rdi
movq %rcx, %rsi
callq 0x5bf45
testl %eax, %eax
setne %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x5b7ef
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x5c01c
addq $0xc0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3TableAffinity
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
  int i;
  char *zColAff = pTab->zColAff;
  if( zColAff==0 ){
    sqlite3 *db = sqlite3VdbeDb(v);
    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
    if( !zColAff ){
      sqlite3OomFault(db);
      return;
    }

    for(i=0; i<pTab->nCol; i++){
      assert( pTab->aCol[i].affinity!=0 );
      zColAff[i] = pTab->aCol[i].affinity;
    }
    do{
      zColAff[i--] = 0;
    }while( i>=0 && zColAff[i]<=SQLITE_AFF_BLOB );
    pTab->zColAff = zColAff;
  }
  assert( zColAff!=0 );
  i = sqlite3Strlen30NN(zColAff);
  if( i ){
    if( iReg ){
      sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);
    }else{
      sqlite3VdbeChangeP4(v, -1, zColAff, i);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movq 0x28(%rsi), %r14
testq %r14, %r14
jne 0x5b99c
movq %rsi, %r15
movq (%rbx), %r12
movswq 0x46(%rsi), %rdi
incq %rdi
callq 0xa88d
movq %rax, %r14
testq %rax, %rax
je 0x5b971
cmpw $0x0, 0x46(%r15)
jle 0x5b97b
movl $0x19, %ecx
xorl %eax, %eax
movq 0x8(%r15), %rdx
movb (%rdx,%rcx), %dl
movb %dl, (%r14,%rax)
incq %rax
movswq 0x46(%r15), %rdx
addq $0x20, %rcx
cmpq %rdx, %rax
jl 0x5b953
jmp 0x5b97d
movq %r12, %rdi
callq 0x10dd9
jmp 0x5b997
xorl %eax, %eax
movb $0x0, (%r14,%rax)
testq %rax, %rax
jle 0x5b993
cmpb $0x42, -0x1(%r14,%rax)
leaq -0x1(%rax), %rax
jl 0x5b97d
movq %r14, 0x28(%r15)
testq %r14, %r14
je 0x5b9cd
movq %r14, %rdi
callq 0x80b0
movq %rax, %r15
andl $0x3fffffff, %r15d      # imm = 0x3FFFFFFF
je 0x5b9cd
testl %ebp, %ebp
je 0x5b9d6
movq %rbx, %rdi
movl $0x5b, %esi
movl %ebp, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x41932
movl %eax, %esi
jmp 0x5b9db
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %r14, %rdx
movl %r15d, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x13c8c
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: exprSrcCount
static int exprSrcCount(Walker *pWalker, Expr *pExpr){
  /* The NEVER() on the second term is because sqlite3FunctionUsesThisSrc()
  ** is always called before sqlite3ExprAnalyzeAggregates() and so the
  ** TK_COLUMNs have not yet been converted into TK_AGG_COLUMN.  If
  ** sqlite3FunctionUsesThisSrc() is used differently in the future, the
  ** NEVER() will need to be removed. */
  if( pExpr->op==TK_COLUMN || NEVER(pExpr->op==TK_AGG_COLUMN) ){
    int i;
    struct SrcCount *p = pWalker->u.pSrcCount;
    SrcList *pSrc = p->pSrc;
    int nSrc = pSrc ? pSrc->nSrc : 0;
    for(i=0; i<nSrc; i++){
      if( pExpr->iTable==pSrc->a[i].iCursor ) break;
    }
    if( i<nSrc ){
      p->nThis++;
    }else if( nSrc==0 || pExpr->iTable<pSrc->a[0].iCursor ){
      /* In a well-formed parse tree (no name resolution errors),
      ** TK_COLUMN nodes with smaller Expr.iTable values are in an
      ** outer context.  Those are the only ones to count as "other" */
      p->nOther++;
    }
  }
  return WRC_Continue;
}

// Assembly:
movzbl (%rsi), %eax
cmpl $0xa4, %eax
je 0x5e025
cmpl $0xa2, %eax
jne 0x5e06c
movq 0x28(%rdi), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x5e035
movl (%rcx), %edx
jmp 0x5e037
xorl %edx, %edx
testl %edx, %edx
jle 0x5e058
movl 0x2c(%rsi), %edi
movl %edx, %r8d
imulq $0x70, %r8, %r8
xorl %r9d, %r9d
cmpl 0x48(%rcx,%r9), %edi
je 0x5e069
addq $0x70, %r9
cmpq %r9, %r8
jne 0x5e048
testl %edx, %edx
je 0x5e064
movl 0x2c(%rsi), %edx
cmpl 0x48(%rcx), %edx
jge 0x5e06c
incl 0xc(%rax)
jmp 0x5e06c
incl 0x8(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: renameUnmapSelectCb
static int renameUnmapSelectCb(Walker *pWalker, Select *p){
  Parse *pParse = pWalker->pParse;
  int i;
  if( ALWAYS(p->pEList) ){
    ExprList *pList = p->pEList;
    for(i=0; i<pList->nExpr; i++){
      if( pList->a[i].zName ){
        sqlite3RenameTokenRemap(pParse, 0, (void*)pList->a[i].zName);
      }
    }
  }
  if( ALWAYS(p->pSrc) ){  /* Every Select as a SrcList, even if it is empty */
    SrcList *pSrc = p->pSrc;
    for(i=0; i<pSrc->nSrc; i++){
      sqlite3RenameTokenRemap(pParse, 0, (void*)pSrc->a[i].zName);
    }
  }
  return WRC_Continue;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x60aed
movslq (%rcx), %rdx
testq %rdx, %rdx
jle 0x60aed
addq $0x8, %rcx
xorl %edi, %edi
movq %rdi, %r8
shlq $0x5, %r8
movq 0x8(%rcx,%r8), %r8
testq %r8, %r8
je 0x60ae5
movq 0x198(%rax), %r9
testq %r9, %r9
je 0x60ae5
cmpq %r8, (%r9)
je 0x60ade
movq 0x18(%r9), %r9
jmp 0x60ace
movq $0x0, (%r9)
incq %rdi
cmpq %rdx, %rdi
jne 0x60ab6
movq 0x28(%rsi), %rcx
testq %rcx, %rcx
je 0x60b38
movslq (%rcx), %rdx
testq %rdx, %rdx
jle 0x60b38
addq $0x8, %rcx
xorl %esi, %esi
movq 0x198(%rax), %rdi
testq %rdi, %rdi
je 0x60b30
imulq $0x70, %rsi, %r8
movq 0x10(%rcx,%r8), %r8
cmpq %r8, (%rdi)
je 0x60b29
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x60b19
jmp 0x60b30
movq $0x0, (%rdi)
incq %rsi
cmpq %rdx, %rsi
jne 0x60b04
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: destroyRootPage
static void destroyRootPage(Parse *pParse, int iTable, int iDb){
  Vdbe *v = sqlite3GetVdbe(pParse);
  int r1 = sqlite3GetTempReg(pParse);
  if( iTable<2 ) sqlite3ErrorMsg(pParse, "corrupt schema");
  sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
  sqlite3MayAbort(pParse);
#ifndef SQLITE_OMIT_AUTOVACUUM
  /* OP_Destroy stores an in integer r1. If this integer
  ** is non-zero, then it is the root page number of a table moved to
  ** location iTable. The following code modifies the sqlite_master table to
  ** reflect this.
  **
  ** The "#NNN" in the SQL is a special constant that means whatever value
  ** is in register NNN.  See grammar rules associated with the TK_REGISTER
  ** token for additional information.
  */
  sqlite3NestedParse(pParse, 
     "UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d",
     pParse->db->aDb[iDb].zDbSName, MASTER_NAME, iTable, r1, r1);
#endif
  sqlite3ReleaseTempReg(pParse, r1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
callq 0x54e69
movq %rax, %r12
movb 0x1f(%rbx), %al
testb %al, %al
je 0x621de
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0xcc(%rbx,%rax,4), %ebp
jmp 0x621e6
movl 0x38(%rbx), %ebp
incl %ebp
movl %ebp, 0x38(%rbx)
cmpl $0x1, %r14d
jg 0x621fd
leaq 0x2dbde(%rip), %rsi     # 0x8fdd1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x139b7
movq %r12, %rdi
movl $0x88, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x41932
movq 0xa0(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movb $0x1, 0x21(%rax)
movq (%rbx), %rax
movq 0x20(%rax), %rax
movslq %r15d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdx
movl %ebp, (%rsp)
leaq 0x2dba0(%rip), %rsi     # 0x8fde0
leaq 0x2badf(%rip), %rcx     # 0x8dd26
movq %rbx, %rdi
movl %r14d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x5bc1d
testl %ebp, %ebp
je 0x62272
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x62272
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %ebp, 0xcc(%rbx,%rax,4)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprImpliesNonNullRow
SQLITE_PRIVATE int sqlite3ExprImpliesNonNullRow(Expr *p, int iTab){
  Walker w;
  p = sqlite3ExprSkipCollateAndLikely(p);
  while( p ){
    if( p->op==TK_NOTNULL ){
      p = p->pLeft;
    }else if( p->op==TK_AND ){
      if( sqlite3ExprImpliesNonNullRow(p->pLeft, iTab) ) return 1;
      p = p->pRight;
    }else{
      break;
    }
  }
  w.xExprCallback = impliesNotNullRow;
  w.xSelectCallback = 0;
  w.xSelectCallback2 = 0;
  w.eCode = 0;
  w.u.iCur = iTab;
  sqlite3WalkExpr(&w, p);
  return w.eCode;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %rbx
testq %rdi, %rdi
je 0x62a35
movl 0x4(%rbx), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x62a35
btl $0x12, %eax
jb 0x629f9
addq $0x10, %rbx
jmp 0x62a01
movq 0x20(%rbx), %rbx
addq $0x8, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x629e3
jmp 0x62a35
movzbl (%rbx), %edx
movl $0x10, %ecx
cmpl $0x33, %edx
je 0x62a31
cmpl $0x2c, %edx
jne 0x62a3d
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x629d3
movl $0x18, %ecx
testl %eax, %eax
jne 0x62a77
movq (%rbx,%rcx), %rbx
testq %rbx, %rbx
sete %al
jne 0x62a0b
leaq 0x695c(%rip), %rcx      # 0x693a0
movq %rcx, 0x10(%rsp)
movb $0x0, 0x2c(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movl %ebp, 0x30(%rsp)
testb $0x1, %al
jne 0x62a6b
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x58bd1
movzbl 0x2c(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
movl $0x1, %eax
jmp 0x62a70
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprAnalyzeAggregates
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
  Walker w;
  w.xExprCallback = analyzeAggregate;
  w.xSelectCallback = analyzeAggregatesInSelect;
  w.xSelectCallback2 = analyzeAggregatesInSelectEnd;
  w.walkerDepth = 0;
  w.u.pNC = pNC;
  w.pParse = 0;
  assert( pNC->pSrcList!=0 );
  sqlite3WalkExpr(&w, pExpr);
}

// Assembly:
subq $0x38, %rsp
leaq 0xe216(%rip), %rax      # 0x76765
movq %rax, 0x10(%rsp)
leaq 0xe4e7(%rip), %rax      # 0x76a42
movq %rax, 0x18(%rsp)
leaq 0xe4e1(%rip), %rax      # 0x76a48
movq %rax, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
movq $0x0, 0x8(%rsp)
testq %rsi, %rsi
je 0x68591
leaq 0x8(%rsp), %rdi
callq 0x58bd1
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/sqlite3.c
// Function: exprListAppendList
static ExprList *exprListAppendList(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to append. Might be NULL */
  ExprList *pAppend,      /* List of values to append. Might be NULL */
  int bIntToNull
){
  if( pAppend ){
    int i;
    int nInit = pList ? pList->nExpr : 0;
    for(i=0; i<pAppend->nExpr; i++){
      Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
      if( bIntToNull && pDup && pDup->op==TK_INTEGER ){
        pDup->op = TK_NULL;
        pDup->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
      }
      pList = sqlite3ExprListAppend(pParse, pList, pDup);
      if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
    }
  }
  return pList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdx, %rdx
je 0x6921c
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
testq %rbx, %rbx
je 0x69199
movslq (%rbx), %rax
movq %rax, (%rsp)
jmp 0x691a1
movq $0x0, (%rsp)
cmpl $0x0, (%r14)
jle 0x6921c
shlq $0x5, (%rsp)
movl $0x20, %r13d
xorl %r12d, %r12d
movq -0x18(%r14,%r13), %rsi
testq %rsi, %rsi
je 0x691d0
movq (%r15), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5a513
movq %rax, %rdx
jmp 0x691d2
xorl %edx, %edx
testl %ebp, %ebp
je 0x691ea
testq %rdx, %rdx
je 0x691ea
cmpb $-0x6a, (%rdx)
jne 0x691ea
movb $0x75, (%rdx)
andl $0xcffffbff, 0x4(%rdx)  # imm = 0xCFFFFBFF
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4ad8b
movq %rax, %rbx
testq %rax, %rax
je 0x6920d
movb (%r14,%r13), %al
movq (%rsp), %rcx
addq %rbx, %rcx
movb %al, (%r13,%rcx)
incq %r12
movslq (%r14), %rax
addq $0x20, %r13
cmpq %rax, %r12
jl 0x691b5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq