LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeMemStringify
SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
  int fg = pMem->flags;
  const int nByte = 32;

  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( !(fg&MEM_Zero) );
  assert( !(fg&(MEM_Str|MEM_Blob)) );
  assert( fg&(MEM_Int|MEM_Real) );
  assert( (pMem->flags&MEM_RowSet)==0 );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );


  if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
    return SQLITE_NOMEM;
  }

  /* For a Real or Integer, use sqlite3_snprintf() to produce the UTF-8
  ** string representation of the value. Then, if the required encoding
  ** is UTF-16le or UTF-16be do a translation.
  ** 
  ** FIX ME: It would be better if sqlite3_snprintf() could do UTF-16.
  */
  if( fg & MEM_Int ){
    sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
  }else{
    assert( fg & MEM_Real );
    sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->u.r);
  }
  pMem->n = sqlite3Strlen30(pMem->z);
  pMem->enc = SQLITE_UTF8;
  pMem->flags |= MEM_Str|MEM_Term;
  if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real);
  sqlite3VdbeChangeEncoding(pMem, enc);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
movzwl 0x8(%rdi), %r13d
cmpl $0x20, 0x20(%rdi)
jge 0x2a5d1
movq %rbx, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x2a35d
movl $0x7, %r12d
testl %eax, %eax
jne 0x2a667
jmp 0x2a5e3
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movl %r13d, %eax
andl $0xd, %eax
movw %ax, 0x8(%rbx)
movq 0x10(%rbx), %rsi
testb $0x4, %r13b
jne 0x2a606
movsd (%rbx), %xmm0
leaq 0x50fdd(%rip), %rdx     # 0x7b5d5
movl $0x20, %edi
movb $0x1, %al
callq 0xa350
jmp 0x2a61c
movq (%rbx), %rcx
leaq 0x520e2(%rip), %rdx     # 0x7c6f2
movl $0x20, %edi
xorl %eax, %eax
callq 0xa350
movq 0x10(%rbx), %rdi
xorl %r12d, %r12d
movl $0x0, %eax
testq %rdi, %rdi
je 0x2a637
callq 0xa190
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, 0xc(%rbx)
movb $0x1, 0xa(%rbx)
movl $0x202, %eax            # imm = 0x202
orl 0x8(%rbx), %eax
movl %eax, %ecx
andl $-0xd, %ecx
testb %r15b, %r15b
cmovel %eax, %ecx
movw %cx, 0x8(%rbx)
cmpb $0x1, %r14b
je 0x2a667
movzbl %r14b, %esi
movq %rbx, %rdi
callq 0x2a679
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeMemAddTerminator
static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
  if( sqlite3VdbeMemGrow(pMem, pMem->n+2, 1) ){
    return SQLITE_NOMEM;
  }
  pMem->z[pMem->n] = 0;
  pMem->z[pMem->n+1] = 0;
  pMem->flags |= MEM_Term;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %esi
addl $0x2, %esi
movl $0x1, %edx
callq 0x2a35d
testl %eax, %eax
jne 0x2ac63
movq 0x10(%rbx), %rax
movslq 0xc(%rbx), %rcx
xorl %edx, %edx
movb %dl, (%rax,%rcx)
movq 0x10(%rbx), %rax
movslq 0xc(%rbx), %rcx
movb %dl, 0x1(%rax,%rcx)
orb $0x2, 0x9(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeMemClearAndResize
SQLITE_PRIVATE int sqlite3VdbeMemClearAndResize(Mem *pMem, int szNew){
  assert( szNew>0 );
  assert( (pMem->flags & MEM_Dyn)==0 || pMem->szMalloc==0 );
  if( pMem->szMalloc<szNew ){
    return sqlite3VdbeMemGrow(pMem, szNew, 0);
  }
  assert( (pMem->flags & MEM_Dyn)==0 );
  pMem->z = pMem->zMalloc;
  pMem->flags &= (MEM_Null|MEM_Int|MEM_Real);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl %esi, 0x20(%rdi)
jge 0x2ac7b
xorl %edx, %edx
popq %rbp
jmp 0x2a35d
movq 0x18(%rdi), %rax
movq %rax, 0x10(%rdi)
andw $0xd, 0x8(%rdi)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeMemShallowCopy
SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
  assert( (pFrom->flags & MEM_RowSet)==0 );
  assert( pTo->db==pFrom->db );
  if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
  memcpy(pTo, pFrom, MEMCELLSIZE);
  if( (pFrom->flags&MEM_Static)==0 ){
    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
    assert( srcType==MEM_Ephem || srcType==MEM_Static );
    pTo->flags |= srcType;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x31d41
popq %rbp
jmp 0x36103
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
testb $0x8, 0x9(%rsi)
jne 0x31d63
movl $0xffffe3ff, %eax       # imm = 0xFFFFE3FF
andl 0x8(%rdi), %eax
orl %edx, %eax
movw %ax, 0x8(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3MulInt64
SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
  i64 iA = *pA;
  i64 iA1, iA0, iB1, iB0, r;

  iA1 = iA/TWOPOWER32;
  iA0 = iA % TWOPOWER32;
  iB1 = iB/TWOPOWER32;
  iB0 = iB % TWOPOWER32;
  if( iA1==0 ){
    if( iB1==0 ){
      *pA *= iB;
      return 0;
    }
    r = iA0*iB1;
  }else if( iB1==0 ){
    r = iA1*iB0;
  }else{
    /* If both iA1 and iB1 are non-zero, overflow will result */
    return 1;
  }
  testcase( r==(-TWOPOWER31)-1 );
  testcase( r==(-TWOPOWER31) );
  testcase( r==TWOPOWER31 );
  testcase( r==TWOPOWER31-1 );
  if( r<(-TWOPOWER31) || r>=TWOPOWER31 ) return 1;
  r *= TWOPOWER32;
  if( sqlite3AddInt64(&r, iA0*iB0) ) return 1;
  *pA = r;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movabsq $0x1ffffffff, %r11      # imm = 0x1FFFFFFFF
movq (%rdi), %rdx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq (%rdx,%rbx), %rax
testq %rdx, %rdx
movq %rdx, %r10
cmovsq %rax, %r10
movabsq $-0x100000000, %r14     # imm = 0xFFFFFFFF00000000
movq %r10, %r8
andq %r14, %r8
movq %rdx, %rcx
subq %r8, %rcx
addq %rsi, %rbx
testq %rsi, %rsi
movq %rsi, %r9
cmovsq %rbx, %r9
andq %r9, %r14
movq %rsi, %r8
subq %r14, %r8
cmpq %r11, %rax
jae 0x31e3c
cmpq %r11, %rbx
jae 0x31e53
imulq %rsi, %rdx
jmp 0x31ebc
movl $0x1, %eax
cmpq %r11, %rbx
jae 0x31ec1
sarq $0x20, %r10
imulq %r8, %r10
movq %r10, %r9
jmp 0x31e5b
sarq $0x20, %r9
imulq %rcx, %r9
movslq %r9d, %rdx
movl $0x1, %eax
cmpq %r9, %rdx
jne 0x31ec1
movq %r9, %rdx
shlq $0x20, %rdx
imulq %r8, %rcx
testq %rcx, %rcx
js 0x31e9a
testq %r9, %r9
setg %sil
movabsq $0x7fffffffffffffff, %r8 # imm = 0x7FFFFFFFFFFFFFFF
subq %rdx, %r8
cmpq %rcx, %r8
setb %r8b
testb %r8b, %sil
je 0x31eb9
jmp 0x31ec1
testq %r9, %r9
jns 0x31eb9
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
subq %rdx, %rsi
addq $0x2, %rsi
leaq 0x1(%rcx), %r8
cmpq %r8, %rsi
jg 0x31ec1
addq %rcx, %rdx
movq %rdx, (%rdi)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: applyAffinity
static void applyAffinity(
  Mem *pRec,          /* The value to apply affinity to */
  char affinity,      /* The affinity to be applied */
  u8 enc              /* Use this text encoding */
){
  if( affinity>=SQLITE_AFF_NUMERIC ){
    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
             || affinity==SQLITE_AFF_NUMERIC );
    if( (pRec->flags & MEM_Int)==0 ){
      if( (pRec->flags & MEM_Real)==0 ){
        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
      }else{
        sqlite3VdbeIntegerAffinity(pRec);
      }
    }
  }else if( affinity==SQLITE_AFF_TEXT ){
    /* Only attempt the conversion to TEXT if there is an integer or real
    ** representation (blob and NULL do not get converted) but no string
    ** representation.
    */
    if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
      sqlite3VdbeMemStringify(pRec, enc, 1);
    }
    pRec->flags &= ~(MEM_Real|MEM_Int);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x43, %sil
jl 0x31f5b
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x31f94
testb $0x8, %al
jne 0x31f9b
testb $0x2, %al
je 0x31f94
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13e37
cmpb $0x42, %sil
jne 0x31f94
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0x2, %ecx
shrl %ecx
testb $0xc, %al
sete %sil
orb %cl, %sil
jne 0x31f8b
movzbl %dl, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x2a590
movzwl 0x8(%rbx), %eax
andl $0xfff3, %eax           # imm = 0xFFF3
movw %ax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movsd (%rbx), %xmm0
movapd 0x49019(%rip), %xmm1    # 0x7afc0
andpd %xmm0, %xmm1
ucomisd 0x48f2d(%rip), %xmm1    # 0x7aee0
jae 0x31f94
cvttsd2si %xmm0, %rcx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
ucomisd %xmm1, %xmm0
setp %dl
setne %sil
orb %dl, %sil
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
addq %rcx, %rdx
cmpq $-0x2, %rdx
setae %dl
orb %sil, %dl
jne 0x31f94
movq %rcx, (%rbx)
andl $0xbe00, %eax           # imm = 0xBE00
orl $0x4, %eax
jmp 0x31f90
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeMemCast
SQLITE_PRIVATE void sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){
  if( pMem->flags & MEM_Null ) return;
  switch( aff ){
    case SQLITE_AFF_BLOB: {   /* Really a cast to BLOB */
      if( (pMem->flags & MEM_Blob)==0 ){
        sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
        assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
        MemSetTypeFlag(pMem, MEM_Blob);
      }else{
        pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
      }
      break;
    }
    case SQLITE_AFF_NUMERIC: {
      sqlite3VdbeMemNumerify(pMem);
      break;
    }
    case SQLITE_AFF_INTEGER: {
      sqlite3VdbeMemIntegerify(pMem);
      break;
    }
    case SQLITE_AFF_REAL: {
      sqlite3VdbeMemRealify(pMem);
      break;
    }
    default: {
      assert( aff==SQLITE_AFF_TEXT );
      assert( MEM_Str==(MEM_Blob>>3) );
      pMem->flags |= (pMem->flags&MEM_Blob)>>3;
      sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
      assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
      pMem->flags &= ~(MEM_Int|MEM_Real|MEM_Blob|MEM_Zero);
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzwl 0x8(%rdi), %eax
testb $0x1, %al
jne 0x320ba
movq %rdi, %rbx
movzbl %sil, %ecx
addl $-0x41, %ecx
cmpl $0x4, %ecx
ja 0x3208b
leaq 0x4570a(%rip), %rsi     # 0x77728
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
testb $0x10, %al
jne 0x320b1
movzbl %dl, %edx
movq %rbx, %rdi
movl $0x42, %esi
callq 0x31f29
movl $0xffffbe00, %eax       # imm = 0xFFFFBE00
andl 0x8(%rbx), %eax
orl $0x10, %eax
jmp 0x320b6
movq %rbx, %rdi
callq 0x11819
movq %rax, (%rbx)
movl $0xffffbe00, %eax       # imm = 0xFFFFBE00
andl 0x8(%rbx), %eax
orl $0x4, %eax
jmp 0x320b6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3617d
movq %rbx, %rdi
callq 0x117c1
movsd %xmm0, (%rbx)
movl $0xffffbe00, %eax       # imm = 0xFFFFBE00
andl 0x8(%rbx), %eax
orl $0x8, %eax
jmp 0x320b6
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x2, %ecx
orl %eax, %ecx
movw %cx, 0x8(%rbx)
movzbl %dl, %edx
movq %rbx, %rdi
movl $0x42, %esi
callq 0x31f29
andw $0xbfe3, 0x8(%rbx)      # imm = 0xBFE3
jmp 0x320ba
andl $0xfe10, %eax           # imm = 0xFE10
movw %ax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeCursorMoveto
SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor *p){
  if( p->eCurType==CURTYPE_BTREE ){
    if( p->deferredMoveto ){
      return handleDeferredMoveto(p);
    }
    if( sqlite3BtreeCursorHasMoved(p->uc.pCursor) ){
      return handleMovedCursor(p);
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, (%rdi)
je 0x321f1
xorl %eax, %eax
popq %rbp
retq
cmpb $0x0, 0x3(%rdi)
je 0x321fd
popq %rbp
jmp 0x363b7
movq 0x10(%rdi), %rax
cmpb $0x1, 0x56(%rax)
je 0x321ed
popq %rbp
jmp 0x36428
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3BtreeCursor
SQLITE_PRIVATE int sqlite3BtreeCursor(
  Btree *p,                                   /* The btree */
  int iTable,                                 /* Root page of table to open */
  int wrFlag,                                 /* 1 to write. 0 read-only */
  struct KeyInfo *pKeyInfo,                   /* First arg to xCompare() */
  BtCursor *pCur                              /* Write new cursor here */
){
  int rc;
  if( iTable<1 ){
    rc = SQLITE_CORRUPT_BKPT;
  }else{
    sqlite3BtreeEnter(p);
    rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
    sqlite3BtreeLeave(p);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x3283e
movq %r8, %r14
movl %edx, %r13d
movl %esi, %r15d
movq %rdi, %rbx
cmpb $0x0, 0x11(%rdi)
je 0x32774
incl 0x14(%rbx)
cmpb $0x0, 0x12(%rbx)
jne 0x32774
movq %rbx, %rdi
movq %rcx, %r12
callq 0x2520c
movq %r12, %rcx
movq 0x8(%rbx), %r12
testl %r13d, %r13d
je 0x327bb
cmpq $0x0, 0x80(%r12)
jne 0x327bb
movq %rcx, -0x30(%rbp)
movl 0x30(%r12), %edi
callq 0x224c8
movq %rax, 0x80(%r12)
testq %rax, %rax
je 0x32875
movq $0x0, (%rax)
addq $0x4, 0x80(%r12)
movq -0x30(%rbp), %rcx
cmpl $0x1, %r15d
jne 0x327ce
xorl %r15d, %r15d
cmpl $0x0, 0x3c(%r12)
setne %r15b
testl %r13d, %r13d
sete %al
movl %r15d, 0x48(%r14)
movb $-0x1, 0x58(%r14)
movq %rcx, 0x60(%r14)
movq %rbx, (%r14)
movq %r12, 0x8(%r14)
setne 0x54(%r14)
addb %al, %al
movb %al, 0x55(%r14)
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x32818
movq %rax, %rcx
cmpl %r15d, 0x48(%rcx)
jne 0x3280f
orb $0x20, 0x54(%rcx)
orb $0x20, 0x54(%r14)
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x32800
movq %rax, 0x10(%r14)
movq %r14, 0x10(%r12)
movb $0x0, 0x56(%r14)
xorl %r14d, %r14d
cmpb $0x0, 0x11(%rbx)
je 0x32863
decl 0x14(%rbx)
jne 0x32863
movq %rbx, %rdi
callq 0x25292
jmp 0x32863
leaq 0x48ca3(%rip), %rsi     # 0x7b4e8
leaq 0x48941(%rip), %rcx     # 0x7b18d
movl $0xb, %r14d
movl $0xb, %edi
movl $0xe786, %edx           # imm = 0xE786
xorl %eax, %eax
callq 0xa4c0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7, %r14d
jmp 0x32829
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3BtreeNext
SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
  MemPage *pPage;
  assert( cursorHoldsMutex(pCur) );
  assert( pRes!=0 );
  assert( *pRes==0 || *pRes==1 );
  assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
  pCur->info.nSize = 0;
  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
  *pRes = 0;
  if( pCur->eState!=CURSOR_VALID ) return btreeNext(pCur, pRes);
  pPage = pCur->apPage[pCur->iPage];
  if( (++pCur->aiIdx[pCur->iPage])>=pPage->nCell ){
    pCur->aiIdx[pCur->iPage]--;
    return btreeNext(pCur, pRes);
  }
  if( pPage->leaf ){
    return SQLITE_OK;
  }else{
    return moveToLeftmost(pCur);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw $0x0, 0x36(%rdi)
andb $-0x7, 0x54(%rdi)
movl $0x0, (%rsi)
cmpb $0x1, 0x56(%rdi)
jne 0x332bc
movsbq 0x58(%rdi), %rax
movq 0x98(%rdi,%rax,8), %rcx
movzwl 0x70(%rdi,%rax,2), %edx
leal 0x1(%rdx), %r8d
movw %r8w, 0x70(%rdi,%rax,2)
cmpw 0x12(%rcx), %r8w
jae 0x332b7
cmpb $0x0, 0x5(%rcx)
je 0x332c2
xorl %eax, %eax
popq %rbp
retq
movw %dx, 0x70(%rdi,%rax,2)
popq %rbp
jmp 0x3735a
popq %rbp
jmp 0x3745d
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3BtreePrevious
SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
  assert( cursorHoldsMutex(pCur) );
  assert( pRes!=0 );
  assert( *pRes==0 || *pRes==1 );
  assert( pCur->skipNext==0 || pCur->eState!=CURSOR_VALID );
  *pRes = 0;
  pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey);
  pCur->info.nSize = 0;
  if( pCur->eState!=CURSOR_VALID
   || pCur->aiIdx[pCur->iPage]==0
   || pCur->apPage[pCur->iPage]->leaf==0
  ){
    return btreePrevious(pCur, pRes);
  }
  pCur->aiIdx[pCur->iPage]--;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, (%rsi)
andb $-0xf, 0x54(%rdi)
movw $0x0, 0x36(%rdi)
cmpb $0x1, 0x56(%rdi)
jne 0x3330a
movsbq 0x58(%rdi), %rax
movzwl 0x70(%rdi,%rax,2), %ecx
testw %cx, %cx
je 0x3330a
movq 0x98(%rdi,%rax,8), %rdx
cmpb $0x0, 0x5(%rdx)
je 0x3330a
decl %ecx
movw %cx, 0x70(%rdi,%rax,2)
xorl %eax, %eax
popq %rbp
retq
popq %rbp
jmp 0x374b6
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeRecordUnpack
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */
  UnpackedRecord *p      /* Populate this structure before returning. */
){
  const unsigned char *aKey = (const unsigned char *)pKey;
  int d; 
  u32 idx;                        /* Offset in aKey[] to read from */
  u16 u;                          /* Unsigned loop counter */
  u32 szHdr;
  Mem *pMem = p->aMem;

  p->default_rc = 0;
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
  idx = getVarint32(aKey, szHdr);
  d = szHdr;
  u = 0;
  while( idx<szHdr && d<=nKey ){
    u32 serial_type;

    idx += getVarint32(&aKey[idx], serial_type);
    pMem->enc = pKeyInfo->enc;
    pMem->db = pKeyInfo->db;
    /* pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us */
    pMem->szMalloc = 0;
    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
    pMem++;
    if( (++u)>=p->nField ) break;
  }
  assert( u<=pKeyInfo->nField + 1 );
  p->nField = u;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, -0x48(%rbp)
movq 0x8(%rcx), %r13
movq %rcx, -0x38(%rbp)
movb $0x0, 0x12(%rcx)
movsbl (%rdx), %r14d
testl %r14d, %r14d
movq %rdx, -0x40(%rbp)
js 0x333ae
movl $0x1, %ebx
jmp 0x333c3
leaq -0x4c(%rbp), %r14
movq %rdx, %rdi
movq %r14, %rsi
callq 0x3220d
movzbl %al, %ebx
movl (%r14), %r14d
xorl %r15d, %r15d
movl %r14d, %r12d
cmpl %r14d, %ebx
jae 0x3343f
cmpl -0x2c(%rbp), %r12d
jg 0x3343f
movl %ebx, %edi
movq -0x40(%rbp), %rdx
movsbl (%rdx,%rdi), %esi
testl %esi, %esi
js 0x333e9
movl $0x1, %eax
jmp 0x333ff
addq %rdx, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3220d
movq -0x40(%rbp), %rdx
movzbl %al, %eax
movl -0x30(%rbp), %esi
addl %eax, %ebx
movq -0x48(%rbp), %rcx
movb 0x4(%rcx), %al
movb %al, 0xa(%r13)
movq 0x10(%rcx), %rax
movq %rax, 0x28(%r13)
movl $0x0, 0x20(%r13)
movslq %r12d, %rdi
addq %rdx, %rdi
movq %r13, %rdx
callq 0x322cb
addl %eax, %r12d
addq $0x38, %r13
incl %r15d
movq -0x38(%rbp), %rax
cmpw 0x10(%rax), %r15w
jb 0x333c9
movq -0x38(%rbp), %rax
movw %r15w, 0x10(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeSorterCompare
SQLITE_PRIVATE int sqlite3VdbeSorterCompare(
  const VdbeCursor *pCsr,         /* Sorter cursor */
  Mem *pVal,                      /* Value to compare to current sorter key */
  int nKeyCol,                    /* Compare this many columns */
  int *pRes                       /* OUT: Result of comparison */
){
  VdbeSorter *pSorter;
  UnpackedRecord *r2;
  KeyInfo *pKeyInfo;
  int i;
  void *pKey; int nKey;           /* Sorter key to compare pVal with */

  assert( pCsr->eCurType==CURTYPE_SORTER );
  pSorter = pCsr->uc.pSorter;
  r2 = pSorter->pUnpacked;
  pKeyInfo = pCsr->pKeyInfo;
  if( r2==0 ){
    char *p;
    r2 = pSorter->pUnpacked = sqlite3VdbeAllocUnpackedRecord(pKeyInfo,0,0,&p);
    assert( pSorter->pUnpacked==(UnpackedRecord*)p );
    if( r2==0 ) return SQLITE_NOMEM;
    r2->nField = nKeyCol;
  }
  assert( r2->nField==nKeyCol );

  pKey = vdbeSorterRowkey(pSorter, &nKey);
  sqlite3VdbeRecordUnpack(pKeyInfo, nKey, pKey, r2);
  for(i=0; i<nKeyCol; i++){
    if( r2->aMem[i].flags & MEM_Null ){
      *pRes = -1;
      return SQLITE_OK;
    }
  }

  *pRes = sqlite3VdbeRecordCompare(pVal->n, pVal->z, r2);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x30(%rbp)
movl %ecx, %r12d
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
movq 0x30(%rdi), %r15
testq %r15, %r15
jne 0x33dd0
leaq -0x38(%rbp), %rcx
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33310
movq %rax, 0x30(%rbx)
testq %rax, %rax
je 0x33e65
movq %rax, %r15
movw %r12w, 0x10(%rax)
cmpb $0x0, 0x58(%rbx)
je 0x33de2
cmpb $0x0, 0x59(%rbx)
je 0x33dec
movq 0x10(%rbx), %rax
jmp 0x33e04
movq 0x38(%rbx), %rax
leaq 0x10(%rax), %rdx
jmp 0x33e0c
movq 0x18(%rbx), %rcx
movq 0x10(%rcx), %rax
movslq 0x4(%rax), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq 0x18(%rcx), %rax
movq 0x28(%rax), %rdx
addq $0x14, %rax
movl (%rax), %esi
movq %r13, %rdi
movq %r15, %rcx
callq 0x33376
testl %r12d, %r12d
jle 0x33e3b
movq 0x8(%r15), %rax
movl %r12d, %ecx
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
testb $0x1, 0x8(%rax,%rdx)
jne 0x33e57
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x33e2b
movl 0xc(%r14), %edi
movq 0x10(%r14), %rsi
xorl %ebx, %ebx
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x36d84
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
jmp 0x33e6a
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
xorl %ebx, %ebx
jmp 0x33e6a
movl $0x7, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeSorterRowkey
SQLITE_PRIVATE int sqlite3VdbeSorterRowkey(const VdbeCursor *pCsr, Mem *pOut){
  VdbeSorter *pSorter;
  void *pKey; int nKey;           /* Sorter key to copy into pOut */

  assert( pCsr->eCurType==CURTYPE_SORTER );
  pSorter = pCsr->uc.pSorter;
  pKey = vdbeSorterRowkey(pSorter, &nKey);
  if( sqlite3VdbeMemClearAndResize(pOut, nKey) ){
    return SQLITE_NOMEM;
  }
  pOut->n = nKey;
  MemSetTypeFlag(pOut, MEM_Blob);
  memcpy(pOut->z, pKey, nKey);

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, 0x58(%rdi)
je 0x33e9a
cmpb $0x0, 0x59(%rdi)
je 0x33ea4
movq 0x10(%rdi), %rax
jmp 0x33ebc
movq 0x38(%rdi), %rax
leaq 0x10(%rax), %r14
jmp 0x33ec4
movq 0x18(%rdi), %rcx
movq 0x10(%rcx), %rax
movslq 0x4(%rax), %rax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq 0x18(%rcx), %rax
movq 0x28(%rax), %r14
addq $0x14, %rax
movl (%rax), %r15d
cmpl %r15d, 0x20(%rbx)
jge 0x33ef6
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x2a35d
movl %eax, %ecx
movl $0x7, %eax
testl %ecx, %ecx
jne 0x33f17
movq 0x10(%rbx), %rdi
movl $0xffffbe00, %eax       # imm = 0xFFFFBE00
andl 0x8(%rbx), %eax
orl $0x10, %eax
jmp 0x33f02
movq 0x18(%rbx), %rdi
movq %rdi, 0x10(%rbx)
movw $0x10, %ax
movslq %r15d, %rdx
movl %r15d, 0xc(%rbx)
movw %ax, 0x8(%rbx)
movq %r14, %rsi
callq 0xa320
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeSorterNext
SQLITE_PRIVATE int sqlite3VdbeSorterNext(sqlite3 *db, const VdbeCursor *pCsr, int *pbEof){
  VdbeSorter *pSorter;
  int rc;                         /* Return code */

  assert( pCsr->eCurType==CURTYPE_SORTER );
  pSorter = pCsr->uc.pSorter;
  assert( pSorter->bUsePMA || (pSorter->pReader==0 && pSorter->pMerger==0) );
  if( pSorter->bUsePMA ){
    assert( pSorter->pReader==0 || pSorter->pMerger==0 );
    assert( pSorter->bUseThreads==0 || pSorter->pReader );
    assert( pSorter->bUseThreads==1 || pSorter->pMerger );
#if SQLITE_MAX_WORKER_THREADS>0
    if( pSorter->bUseThreads ){
      rc = vdbePmaReaderNext(pSorter->pReader);
      *pbEof = (pSorter->pReader->pFd==0);
    }else
#endif
    /*if( !pSorter->bUseThreads )*/ {
      assert( pSorter->pMerger!=0 );
      assert( pSorter->pMerger->pTask==(&pSorter->aTask[0]) );
      rc = vdbeMergeEngineStep(pSorter->pMerger, pbEof);
    }
  }else{
    SorterRecord *pFree = pSorter->list.pList;
    pSorter->list.pList = pFree->u.pNext;
    pFree->u.pNext = 0;
    if( pSorter->list.aMemory==0 ) vdbeSorterRecordFree(db, pFree);
    *pbEof = !pSorter->list.pList;
    rc = SQLITE_OK;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
cmpb $0x0, 0x58(%rsi)
je 0x33f5b
cmpb $0x0, 0x59(%r14)
je 0x33fa4
movq 0x10(%r14), %rdi
callq 0x3b76b
movq 0x10(%r14), %rcx
xorl %edx, %edx
cmpq $0x0, 0x18(%rcx)
sete %dl
movl %edx, (%rbx)
jmp 0x33f9b
movq 0x38(%r14), %rsi
movq 0x8(%rsi), %rax
movq %rax, 0x38(%r14)
movq $0x0, 0x8(%rsi)
cmpq $0x0, 0x40(%r14)
jne 0x33f8d
movq %rdi, %r15
movq 0x8(%rsi), %r12
movq %r15, %rdi
callq 0xb752
movq %r12, %rsi
testq %r12, %r12
jne 0x33f79
xorl %eax, %eax
cmpq $0x0, 0x38(%r14)
sete %al
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3bba2
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3UnlinkAndDeleteIndex
SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
  Index *pIndex;
  Hash *pHash;

  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  pHash = &db->aDb[iDb].pSchema->idxHash;
  pIndex = sqlite3HashInsert(pHash, zIdxName, 0);
  if( ALWAYS(pIndex) ){
    if( pIndex->pTable->pIndex==pIndex ){
      pIndex->pTable->pIndex = pIndex->pNext;
    }else{
      Index *p;
      /* Justification of ALWAYS();  The index must be on the list of
      ** indices. */
      p = pIndex->pTable->pIndex;
      while( ALWAYS(p) && p->pNext!=pIndex ){ p = p->pNext; }
      if( ALWAYS(p && p->pNext==pIndex) ){
        p->pNext = pIndex->pNext;
      }
    }
    freeIndex(db, pIndex);
  }
  db->flags |= SQLITE_InternChanges;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movslq %esi, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rdi
addq $0x20, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x3c5eb
testq %rax, %rax
je 0x349df
movq 0x18(%rax), %rcx
movq 0x10(%rcx), %rdx
cmpq %rax, %rdx
je 0x349c9
testq %rdx, %rdx
je 0x349d4
movq %rdx, %rcx
movq 0x28(%rdx), %rdx
cmpq %rax, %rdx
jne 0x349b2
addq $0x28, %rcx
jmp 0x349cd
addq $0x10, %rcx
movq 0x28(%rax), %rdx
movq %rdx, (%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c8af
orb $0x2, 0x2c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeMemSetRowSet
SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
  sqlite3 *db = pMem->db;
  assert( db!=0 );
  assert( (pMem->flags & MEM_RowSet)==0 );
  sqlite3VdbeMemRelease(pMem);
  pMem->zMalloc = sqlite3DbMallocRaw(db, 64);
  if( db->mallocFailed ){
    pMem->flags = MEM_Null;
    pMem->szMalloc = 0;
  }else{
    assert( pMem->zMalloc );
    pMem->szMalloc = sqlite3DbMallocSize(db, pMem->zMalloc);
    pMem->u.pRowSet = sqlite3RowSetInit(db, pMem->zMalloc, pMem->szMalloc);
    assert( pMem->u.pRowSet!=0 );
    pMem->flags = MEM_RowSet;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
jne 0x34e80
cmpl $0x0, 0x20(%rbx)
je 0x34e88
movq %rbx, %rdi
callq 0x2a1cb
movl $0x40, %esi
movq %r14, %rdi
callq 0x145aa
movq %rax, 0x18(%rbx)
cmpb $0x0, 0x51(%r14)
je 0x34eaf
movw $0x1, 0x8(%rbx)
movl $0x0, 0x20(%rbx)
jmp 0x34f27
movq %rax, %rdi
cmpq %rax, 0x170(%r14)
ja 0x34ece
cmpq %rdi, 0x178(%r14)
jbe 0x34ece
movzwl 0x150(%r14), %eax
jmp 0x34ed8
callq *0x5c49c(%rip)          # 0x91370
movq 0x18(%rbx), %rdi
movl %eax, 0x20(%rbx)
xorl %ecx, %ecx
movq %rcx, (%rdi)
movq %r14, 0x8(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x38(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl %eax, %eax
addq $-0x38, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
movq %rcx, 0x20(%rdi)
shrl $0x4, %edx
movw %dx, 0x30(%rdi)
movw $0x1, 0x32(%rdi)
movl $0x0, 0x34(%rdi)
movq %rdi, (%rbx)
movw $0x20, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VtabBegin
SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
  int rc = SQLITE_OK;
  const sqlite3_module *pModule;

  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater
  ** than zero, then this function is being called from within a
  ** virtual module xSync() callback. It is illegal to write to 
  ** virtual module tables in this case, so return SQLITE_LOCKED.
  */
  if( sqlite3VtabInSync(db) ){
    return SQLITE_LOCKED;
  }
  if( !pVTab ){
    return SQLITE_OK;
  } 
  pModule = pVTab->pVtab->pModule;

  if( pModule->xBegin ){
    int i;

    /* If pVtab is already in the aVTrans array, return early */
    for(i=0; i<db->nVTrans; i++){
      if( db->aVTrans[i]==pVTab ){
        return SQLITE_OK;
      }
    }

    /* Invoke the xBegin method. If successful, add the vtab to the 
    ** sqlite3.aVTrans[] array. */
    rc = growVTrans(db);
    if( rc==SQLITE_OK ){
      rc = pModule->xBegin(pVTab->pVtab);
      if( rc==SQLITE_OK ){
        int iSvpt = db->nStatement + db->nSavepoint;
        addToVTrans(db, pVTab);
        if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1);
      }
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movslq 0x1a4(%rdi), %rax
testq %rax, %rax
jle 0x35948
cmpq $0x0, 0x1c8(%r14)
je 0x35996
xorl %ebx, %ebx
testq %r15, %r15
je 0x3599f
movq 0x10(%r15), %rcx
movq (%rcx), %r12
cmpq $0x0, 0x70(%r12)
je 0x3599f
testl %eax, %eax
jle 0x35979
movq 0x1c8(%r14), %rcx
xorl %edx, %edx
cmpq %r15, (%rcx,%rdx,8)
je 0x3599d
incq %rdx
cmpq %rdx, %rax
jne 0x3596b
movq %r14, %rdi
callq 0x3df73
testl %eax, %eax
jne 0x35992
movq 0x10(%r15), %rdi
callq *0x70(%r12)
testl %eax, %eax
je 0x359aa
movl %eax, %ebx
jmp 0x3599f
movl $0x6, %ebx
jmp 0x3599f
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x30c(%r14), %eax
movq 0x1c8(%r14), %rcx
movslq 0x1a4(%r14), %rsi
leal 0x1(%rsi), %edx
movl %edx, 0x1a4(%r14)
movl 0x310(%r14), %edx
movq %r15, (%rcx,%rsi,8)
incl 0x18(%r15)
addl %eax, %edx
je 0x3599f
decl %edx
movq %r14, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2a11f
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VtabCallDestroy
SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
  int rc = SQLITE_OK;
  Table *pTab;

  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
  if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
    VTable *p;
    int (*xDestroy)(sqlite3_vtab *);
    for(p=pTab->pVTable; p; p=p->pNext){
      assert( p->pVtab );
      if( p->pVtab->nRef>0 ){
        return SQLITE_LOCKED;
      }
    }
    p = vtabDisconnectAll(db, pTab);
    xDestroy = p->pMod->pModule->xDestroy;
    assert( xDestroy!=0 );  /* Checked before the virtual table is created */
    rc = xDestroy(p->pVtab);
    /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */
    if( rc==SQLITE_OK ){
      assert( pTab->pVTable==p && p->pNext==0 );
      p->pVtab = 0;
      pTab->pVTable = 0;
      sqlite3VtabUnlock(p);
    }
  }

  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rax
movslq %esi, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x1abc5
xorl %r12d, %r12d
testq %rax, %rax
je 0x35bc3
movq %rax, %rbx
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x35bc3
addq $0x58, %rbx
movq %rax, %rcx
movq 0x10(%rcx), %rdx
cmpl $0x0, 0x8(%rdx)
jg 0x35bbd
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
jne 0x35b44
movq $0x0, (%rbx)
xorl %r15d, %r15d
movq (%rax), %rcx
cmpq %r14, %rcx
je 0x35b79
movq 0x1d0(%rcx), %rdx
addq $0x1d0, %rcx            # imm = 0x1D0
jmp 0x35b81
movq %rbx, %rcx
xorl %edx, %edx
movq %rax, %r15
movq 0x28(%rax), %rsi
movq %rax, (%rcx)
movq %rdx, 0x28(%rax)
movq %rsi, %rax
testq %rsi, %rsi
jne 0x35b61
movq 0x8(%r15), %rax
movq 0x10(%r15), %rdi
movq (%rax), %rax
callq *0x28(%rax)
movl %eax, %r12d
testl %eax, %eax
jne 0x35bc3
xorl %r12d, %r12d
movq %r12, 0x10(%r15)
movq %r12, (%rbx)
movq %r15, %rdi
callq 0x28580
jmp 0x35bc3
movl $0x6, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeCompareMemString
static int vdbeCompareMemString(
  const Mem *pMem1,
  const Mem *pMem2,
  const CollSeq *pColl,
  u8 *prcErr                      /* If an OOM occurs, set to SQLITE_NOMEM */
){
  if( pMem1->enc==pColl->enc ){
    /* The strings are already in the correct encoding.  Call the
     ** comparison function directly */
    return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);
  }else{
    int rc;
    const void *v1, *v2;
    int n1, n2;
    Mem c1;
    Mem c2;
    sqlite3VdbeMemInit(&c1, pMem1->db, MEM_Null);
    sqlite3VdbeMemInit(&c2, pMem1->db, MEM_Null);
    sqlite3VdbeMemShallowCopy(&c1, pMem1, MEM_Ephem);
    sqlite3VdbeMemShallowCopy(&c2, pMem2, MEM_Ephem);
    v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
    n1 = v1==0 ? 0 : c1.n;
    v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
    n2 = v2==0 ? 0 : c2.n;
    rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
    sqlite3VdbeMemRelease(&c1);
    sqlite3VdbeMemRelease(&c2);
    if( (v1==0 || v2==0) && prcErr ) *prcErr = SQLITE_NOMEM;
    return rc;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rax
movb 0xa(%rdi), %dl
cmpb 0x8(%r14), %dl
jne 0x36286
movq 0x10(%r14), %rdi
movq 0x18(%r14), %r9
movl 0xc(%rax), %esi
movq 0x10(%rax), %rdx
movl 0xc(%r15), %ecx
movq 0x10(%r15), %r8
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r9
movq %rcx, -0x30(%rbp)
movq 0x28(%rax), %rcx
movw $0x1, %dx
leaq -0xa0(%rbp), %rbx
movw %dx, 0x8(%rbx)
movq %rcx, 0x28(%rbx)
xorl %r12d, %r12d
movl %r12d, 0x20(%rbx)
leaq -0x68(%rbp), %r13
movw %dx, 0x8(%r13)
movq %rcx, 0x28(%r13)
movl %r12d, 0x20(%r13)
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x31d2c
movq %r13, %rdi
movq %r15, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x31d2c
movzbl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x118a2
movq %rax, %r15
movl $0x0, %ebx
testq %rax, %rax
je 0x362f9
movl -0x94(%rbp), %ebx
movzbl 0x8(%r14), %esi
movq %r13, %rdi
callq 0x118a2
movq %rax, %r13
testq %rax, %rax
je 0x36312
movl -0x5c(%rbp), %r12d
movq 0x10(%r14), %rdi
movl %ebx, %esi
movq %r15, %rdx
movl %r12d, %ecx
movq %r13, %r8
callq *0x18(%r14)
movl %eax, %r14d
movzwl -0x98(%rbp), %eax
testl $0x2460, %eax           # imm = 0x2460
jne 0x3633c
cmpl $0x0, -0x80(%rbp)
je 0x36348
leaq -0xa0(%rbp), %rdi
callq 0x2a1cb
movzwl -0x60(%rbp), %eax
testl $0x2460, %eax           # imm = 0x2460
jne 0x36359
cmpl $0x0, -0x48(%rbp)
je 0x36362
leaq -0x68(%rbp), %rdi
callq 0x2a1cb
testq %r13, %r13
sete %al
testq %r15, %r15
sete %cl
movq -0x30(%rbp), %rdx
testq %rdx, %rdx
je 0x3637e
orb %al, %cl
je 0x3637e
movb $0x7, (%rdx)
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeMemFromBtreeResize
static SQLITE_NOINLINE int vdbeMemFromBtreeResize(
  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
  u32 offset,       /* Offset from the start of data to return bytes from. */
  u32 amt,          /* Number of bytes to return. */
  int key,          /* If true, retrieve from the btree key, not data. */
  Mem *pMem         /* OUT: Return data in this Mem structure. */
){
  int rc;
  pMem->flags = MEM_Null;
  if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+2)) ){
    if( key ){
      rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
    }else{
      rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
    }
    if( rc==SQLITE_OK ){
      pMem->z[amt] = 0;
      pMem->z[amt+1] = 0;
      pMem->flags = MEM_Blob|MEM_Term;
      pMem->n = (int)amt;
    }else{
      sqlite3VdbeMemRelease(pMem);
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r12d
movl %edx, %r14d
movl %esi, %edx
movq %rdi, %r13
movw $0x1, 0x8(%r8)
leal 0x2(%r14), %esi
cmpl %esi, 0x20(%r8)
jge 0x36626
movq %rbx, %rdi
movl %edx, %r15d
xorl %edx, %edx
callq 0x2a35d
movl %r15d, %edx
movl %eax, %r15d
testl %eax, %eax
jne 0x3669a
jmp 0x36634
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movw $0x1, 0x8(%rbx)
movq 0x10(%rbx), %rcx
movq %r13, %rdi
movl %edx, %esi
movl %r14d, %edx
testl %r12d, %r12d
je 0x3664f
xorl %r8d, %r8d
callq 0x26c6a
jmp 0x36654
callq 0x153d2
movl %eax, %r15d
testl %eax, %eax
je 0x36676
movzwl 0x8(%rbx), %eax
testl $0x2460, %eax           # imm = 0x2460
jne 0x3666c
cmpl $0x0, 0x20(%rbx)
je 0x3669a
movq %rbx, %rdi
callq 0x2a1cb
jmp 0x3669a
movq 0x10(%rbx), %rax
movl %r14d, %ecx
xorl %r15d, %r15d
movb %r15b, (%rax,%rcx)
movq 0x10(%rbx), %rax
leal 0x1(%r14), %ecx
movb %r15b, (%rax,%rcx)
movw $0x210, 0x8(%rbx)       # imm = 0x210
movl %r14d, 0xc(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: moveToChild
static int moveToChild(BtCursor *pCur, u32 newPgno){
  BtShared *pBt = pCur->pBt;

  assert( cursorHoldsMutex(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
  assert( pCur->iPage>=0 );
  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
    return SQLITE_CORRUPT_BKPT;
  }
  pCur->info.nSize = 0;
  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
  pCur->iPage++;
  pCur->aiIdx[pCur->iPage] = 0;
  return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
                        pCur, pCur->curPagerFlags);
}

// Assembly:
movsbq 0x58(%rdi), %rax
cmpq $0x13, %rax
jl 0x368f6
pushq %rbp
movq %rsp, %rbp
leaq 0x44c11(%rip), %rsi     # 0x7b4e8
leaq 0x448af(%rip), %rcx     # 0x7b18d
movl $0xb, %edi
movl $0xe9e8, %edx           # imm = 0xE9E8
xorl %eax, %eax
callq 0xa4c0
movl $0xb, %eax
popq %rbp
retq
movq %rdi, %rcx
movq 0x8(%rdi), %rdi
xorl %edx, %edx
movw %dx, 0x36(%rcx)
andb $-0x7, 0x54(%rcx)
leaq 0x1(%rax), %r8
movb %r8b, 0x58(%rcx)
movw %dx, 0x72(%rcx,%rax,2)
leaq (%rcx,%rax,8), %rdx
addq $0xa0, %rdx
movzbl 0x55(%rcx), %r8d
jmp 0x36926
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: moveToRightmost
static int moveToRightmost(BtCursor *pCur){
  Pgno pgno;
  int rc = SQLITE_OK;
  MemPage *pPage = 0;

  assert( cursorHoldsMutex(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  while( !(pPage = pCur->apPage[pCur->iPage])->leaf ){
    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    pCur->aiIdx[pCur->iPage] = pPage->nCell;
    rc = moveToChild(pCur, pgno);
    if( rc ) return rc;
  }
  pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
  assert( pCur->info.nSize==0 );
  assert( (pCur->curFlags & BTCF_ValidNKey)==0 );
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbq 0x58(%rbx), %rax
movq 0x98(%rbx,%rax,8), %rcx
cmpb $0x0, 0x5(%rcx)
jne 0x37621
movq 0x50(%rcx), %rdx
movzbl 0x6(%rcx), %esi
movl 0x8(%rdx,%rsi), %esi
bswapl %esi
movzwl 0x12(%rcx), %ecx
movw %cx, 0x70(%rbx,%rax,2)
movq %rbx, %rdi
callq 0x368c1
testl %eax, %eax
je 0x375e9
jmp 0x3762e
movzwl 0x12(%rcx), %ecx
decl %ecx
movw %cx, 0x70(%rbx,%rax,2)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: invalidateIncrblobCursors
static void invalidateIncrblobCursors(
  Btree *pBtree,          /* The database file to check */
  i64 iRow,               /* The rowid that might be changing */
  int isClearTable        /* True if all rows are being deleted */
){
  BtCursor *p;
  if( pBtree->hasIncrblobCur==0 ) return;
  assert( sqlite3BtreeHoldsMutex(pBtree) );
  pBtree->hasIncrblobCur = 0;
  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
    if( (p->curFlags & BTCF_Incrblob)!=0 ){
      pBtree->hasIncrblobCur = 1;
      if( isClearTable || p->info.nKey==iRow ){
        p->eState = CURSOR_INVALID;
      }
    }
  }
}

// Assembly:
cmpb $0x0, 0x13(%rdi)
je 0x3766b
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x13(%rdi)
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x3766a
testb $0x10, 0x54(%rax)
je 0x37647
movb $0x1, 0x13(%rdi)
testl %edx, %edx
jne 0x37664
cmpq %rsi, 0x20(%rax)
jne 0x37647
movb $0x0, 0x56(%rax)
jmp 0x37647
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: pageInsertArray
static int pageInsertArray(
  MemPage *pPg,                   /* Page to add cells to */
  u8 *pBegin,                     /* End of cell-pointer array */
  u8 **ppData,                    /* IN/OUT: Page content -area pointer */
  u8 *pCellptr,                   /* Pointer to cell-pointer area */
  int iFirst,                     /* Index of first cell to add */
  int nCell,                      /* Number of cells to add to pPg */
  CellArray *pCArray              /* Array of cells */
){
  int i;
  u8 *aData = pPg->aData;
  u8 *pData = *ppData;
  int iEnd = iFirst + nCell;
  assert( CORRUPT_DB || pPg->hdrOffset==0 );    /* Never called on page 1 */
  for(i=iFirst; i<iEnd; i++){
    int sz, rc;
    u8 *pSlot;
    sz = cachedCellSize(pCArray, i);
    if( (aData[1]==0 && aData[2]==0) || (pSlot = pageFindSlot(pPg,sz,&rc))==0 ){
      pData -= sz;
      if( pData<pBegin ) return 1;
      pSlot = pData;
    }
    /* pSlot and pCArray->apCell[i] will never overlap on a well-formed
    ** database.  But they might for a corrupt database.  Hence use memmove()
    ** since memcpy() sends SIGABORT with overlapping buffers on OpenBSD */
    assert( (pSlot+sz)<=pCArray->apCell[i]
         || pSlot>=(pCArray->apCell[i]+sz)
         || CORRUPT_DB );
    memmove(pSlot, pCArray->apCell[i], sz);
    put2byte(pCellptr, (pSlot - aData));
    pCellptr += 2;
  }
  *ppData = pData;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq (%rdx), %rax
movq %rax, -0x30(%rbp)
testl %r9d, %r9d
jle 0x3a575
movq %rcx, %r14
movq 0x10(%rbp), %r13
addl %r8d, %r9d
movq %rdi, -0x50(%rbp)
movq 0x50(%rdi), %rax
movq %rax, -0x38(%rbp)
movslq %r8d, %rbx
movslq %r9d, %rax
movq %rax, -0x58(%rbp)
movq 0x18(%r13), %rax
movzwl (%rax,%rbx,2), %eax
testw %ax, %ax
jne 0x3a4ff
movq %r13, %rdi
movl %ebx, %esi
callq 0x3a372
movzwl %ax, %esi
movq -0x38(%rbp), %rax
cmpb $0x0, 0x1(%rax)
movl %esi, %r15d
jne 0x3a519
movq -0x38(%rbp), %rax
cmpb $0x0, 0x2(%rax)
je 0x3a530
movq -0x50(%rbp), %rdi
leaq -0x5c(%rbp), %rdx
callq 0x39b48
testq %rax, %rax
je 0x3a530
movq %rax, %r12
jmp 0x3a544
movq -0x30(%rbp), %rax
subq %r15, %rax
movq %rax, %r12
movq %rax, -0x30(%rbp)
cmpq -0x48(%rbp), %rax
jb 0x3a591
movq 0x10(%r13), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0xa450
subl -0x38(%rbp), %r12d
rolw $0x8, %r12w
movw %r12w, (%r14)
addq $0x2, %r14
incq %rbx
cmpq -0x58(%rbp), %rbx
jl 0x3a4e8
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x3a582
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeSorterSort
static int vdbeSorterSort(SortSubtask *pTask, SorterList *pList){
  int i;
  SorterRecord **aSlot;
  SorterRecord *p;
  int rc;

  rc = vdbeSortAllocUnpacked(pTask);
  if( rc!=SQLITE_OK ) return rc;

  p = pList->pList;
  pTask->xCompare = vdbeSorterGetCompare(pTask->pSorter);

  aSlot = (SorterRecord **)sqlite3MallocZero(64 * sizeof(SorterRecord *));
  if( !aSlot ){
    return SQLITE_NOMEM;
  }

  while( p ){
    SorterRecord *pNext;
    if( pList->aMemory ){
      if( (u8*)p==pList->aMemory ){
        pNext = 0;
      }else{
        assert( p->u.iNext<sqlite3MallocSize(pList->aMemory) );
        pNext = (SorterRecord*)&pList->aMemory[p->u.iNext];
      }
    }else{
      pNext = p->u.pNext;
    }

    p->u.pNext = 0;
    for(i=0; aSlot[i]; i++){
      vdbeSorterMerge(pTask, p, aSlot[i], &p);
      aSlot[i] = 0;
    }
    aSlot[i] = p;
    p = pNext;
  }

  p = 0;
  for(i=0; i<64; i++){
    vdbeSorterMerge(pTask, p, aSlot[i], &p);
  }
  pList->pList = p;

  sqlite3_free(aSlot);
  assert( pTask->pUnpacked->errCode==SQLITE_OK 
       || pTask->pUnpacked->errCode==SQLITE_NOMEM 
  );
  return pTask->pUnpacked->errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3a838
testl %eax, %eax
jne 0x3a6e8
movq %r14, -0x38(%rbp)
movq (%r14), %r14
movq %r14, -0x30(%rbp)
movq 0x10(%rbx), %rax
movb 0x5c(%rax), %al
cmpb $0x2, %al
leaq 0x4aa(%rip), %rcx       # 0x3aa81
leaq 0x5aa(%rip), %rdx       # 0x3ab88
cmoveq %rcx, %rdx
cmpb $0x1, %al
leaq 0x372(%rip), %rax       # 0x3a95d
cmovneq %rdx, %rax
movq %rax, 0x40(%rbx)
movl $0x200, %edi            # imm = 0x200
callq 0xc0e2
testq %rax, %rax
je 0x3a6e3
movq %rax, %r15
movl $0x200, %edx            # imm = 0x200
movq %rax, %rdi
xorl %esi, %esi
callq 0xa220
testq %r14, %r14
movq -0x38(%rbp), %rcx
je 0x3a69b
leaq -0x30(%rbp), %r12
movq %r15, -0x40(%rbp)
movq 0x8(%rcx), %r13
testq %r13, %r13
je 0x3a640
cmpq %r13, %r14
je 0x3a646
movslq 0x8(%r14), %rax
addq %rax, %r13
jmp 0x3a649
movq 0x8(%r14), %r13
jmp 0x3a649
xorl %r13d, %r13d
movq $0x0, 0x8(%r14)
movq (%r15), %rdx
testq %rdx, %rdx
je 0x3a688
movq -0x40(%rbp), %r15
movq -0x30(%rbp), %rsi
movq %rbx, %rdi
movq %r12, %rcx
callq 0x3a89a
movq $0x0, (%r15)
movq 0x8(%r15), %rdx
addq $0x8, %r15
testq %rdx, %rdx
jne 0x3a65d
movq -0x30(%rbp), %r14
movq -0x38(%rbp), %rcx
movq %r14, (%r15)
movq %r13, -0x30(%rbp)
movq %r13, %r14
testq %r13, %r13
movq -0x40(%rbp), %r15
jne 0x3a629
leaq -0x30(%rbp), %r12
movq $0x0, (%r12)
xorl %r14d, %r14d
movq -0x30(%rbp), %rsi
movq (%r15,%r14,8), %rdx
movq %rbx, %rdi
movq %r12, %rcx
callq 0x3a89a
incq %r14
cmpq $0x40, %r14
jne 0x3a6aa
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %r15, %rdi
callq 0xa630
movq 0x18(%rbx), %rax
movzbl 0x13(%rax), %eax
jmp 0x3a6e8
movl $0x7, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeSortAllocUnpacked
static int vdbeSortAllocUnpacked(SortSubtask *pTask){
  if( pTask->pUnpacked==0 ){
    char *pFree;
    pTask->pUnpacked = sqlite3VdbeAllocUnpackedRecord(
        pTask->pSorter->pKeyInfo, 0, 0, &pFree
    );
    assert( pTask->pUnpacked==(UnpackedRecord*)pFree );
    if( pFree==0 ) return SQLITE_NOMEM;
    pTask->pUnpacked->nField = pTask->pSorter->pKeyInfo->nField;
    pTask->pUnpacked->errCode = 0;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpq $0x0, 0x18(%rdi)
jne 0x3a88d
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq 0x28(%rax), %rdi
xorl %ebx, %ebx
leaq -0x20(%rbp), %r15
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq 0x33310
movq %rax, 0x18(%r14)
cmpq $0x0, (%r15)
je 0x3a888
movq 0x10(%r14), %rcx
movq 0x28(%rcx), %rcx
movzwl 0x6(%rcx), %ecx
movw %cx, 0x10(%rax)
movb $0x0, 0x13(%rax)
jmp 0x3a88d
movl $0x7, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq