// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: openDatabase
static int openDatabase(
  const char *zFilename, /* Database filename UTF-8 encoded */
  sqlite3 **ppDb,        /* OUT: Returned database handle */
  unsigned int flags,    /* Operational flags */
  const char *zVfs       /* Name of the VFS to use */
){
  sqlite3 *db;                    /* Store allocated handle here */
  int rc;                         /* Return code */
  int isThreadsafe;               /* True for threadsafe connections */
  char *zOpen = 0;                /* Filename argument to pass to BtreeOpen() */
  char *zErrMsg = 0;              /* Error message from sqlite3ParseUri() */

#ifdef SQLITE_ENABLE_API_ARMOR
  if( ppDb==0 ) return SQLITE_MISUSE_BKPT;
#endif
  *ppDb = 0;
#ifndef SQLITE_OMIT_AUTOINIT
  rc = sqlite3_initialize();
  if( rc ) return rc;
#endif

  /* Only allow sensible combinations of bits in the flags argument.  
  ** Throw an error if any non-sense combination is used.  If we
  ** do not block illegal combinations here, it could trigger
  ** assert() statements in deeper layers.  Sensible combinations
  ** are:
  **
  **  1:  SQLITE_OPEN_READONLY
  **  2:  SQLITE_OPEN_READWRITE
  **  6:  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE
  */
  assert( SQLITE_OPEN_READONLY  == 0x01 );
  assert( SQLITE_OPEN_READWRITE == 0x02 );
  assert( SQLITE_OPEN_CREATE    == 0x04 );
  testcase( (1<<(flags&7))==0x02 ); /* READONLY */
  testcase( (1<<(flags&7))==0x04 ); /* READWRITE */
  testcase( (1<<(flags&7))==0x40 ); /* READWRITE | CREATE */
  if( ((1<<(flags&7)) & 0x46)==0 ){
    return SQLITE_MISUSE_BKPT;  /* IMP: R-65497-44594 */
  }

  if( sqlite3GlobalConfig.bCoreMutex==0 ){
    isThreadsafe = 0;
  }else if( flags & SQLITE_OPEN_NOMUTEX ){
    isThreadsafe = 0;
  }else if( flags & SQLITE_OPEN_FULLMUTEX ){
    isThreadsafe = 1;
  }else{
    isThreadsafe = sqlite3GlobalConfig.bFullMutex;
  }
  if( flags & SQLITE_OPEN_PRIVATECACHE ){
    flags &= ~SQLITE_OPEN_SHAREDCACHE;
  }else if( sqlite3GlobalConfig.sharedCacheEnabled ){
    flags |= SQLITE_OPEN_SHAREDCACHE;
  }

  /* Remove harmful bits from the flags parameter
  **
  ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were
  ** dealt with in the previous code block.  Besides these, the only
  ** valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY,
  ** SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE, SQLITE_OPEN_SHAREDCACHE,
  ** SQLITE_OPEN_PRIVATECACHE, and some reserved bits.  Silently mask
  ** off all other flags.
  */
  flags &=  ~( SQLITE_OPEN_DELETEONCLOSE |
               SQLITE_OPEN_EXCLUSIVE |
               SQLITE_OPEN_MAIN_DB |
               SQLITE_OPEN_TEMP_DB | 
               SQLITE_OPEN_TRANSIENT_DB | 
               SQLITE_OPEN_MAIN_JOURNAL | 
               SQLITE_OPEN_TEMP_JOURNAL | 
               SQLITE_OPEN_SUBJOURNAL | 
               SQLITE_OPEN_MASTER_JOURNAL |
               SQLITE_OPEN_NOMUTEX |
               SQLITE_OPEN_FULLMUTEX |
               SQLITE_OPEN_WAL
             );

  /* Allocate the sqlite data structure */
  db = sqlite3MallocZero( sizeof(sqlite3) );
  if( db==0 ) goto opendb_out;
  if( isThreadsafe ){
    db->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
    if( db->mutex==0 ){
      sqlite3_free(db);
      db = 0;
      goto opendb_out;
    }
  }
  sqlite3_mutex_enter(db->mutex);
  db->errMask = 0xff;
  db->nDb = 2;
  db->magic = SQLITE_MAGIC_BUSY;
  db->aDb = db->aDbStatic;

  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );
  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
  db->aLimit[SQLITE_LIMIT_WORKER_THREADS] = SQLITE_DEFAULT_WORKER_THREADS;
  db->autoCommit = 1;
  db->nextAutovac = -1;
  db->szMmap = sqlite3GlobalConfig.szMmap;
  db->nextPagesize = 0;
  db->nMaxSorterMmap = 0x7FFFFFFF;
  db->flags |= SQLITE_ShortColNames | SQLITE_EnableTrigger | SQLITE_CacheSpill
#if !defined(SQLITE_DEFAULT_AUTOMATIC_INDEX) || SQLITE_DEFAULT_AUTOMATIC_INDEX
                 | SQLITE_AutoIndex
#endif
#if SQLITE_DEFAULT_CKPTFULLFSYNC
                 | SQLITE_CkptFullFSync
#endif
#if SQLITE_DEFAULT_FILE_FORMAT<4
                 | SQLITE_LegacyFileFmt
#endif
#ifdef SQLITE_ENABLE_LOAD_EXTENSION
                 | SQLITE_LoadExtension
#endif
#if SQLITE_DEFAULT_RECURSIVE_TRIGGERS
                 | SQLITE_RecTriggers
#endif
#if defined(SQLITE_DEFAULT_FOREIGN_KEYS) && SQLITE_DEFAULT_FOREIGN_KEYS
                 | SQLITE_ForeignKeys
#endif
#if defined(SQLITE_REVERSE_UNORDERED_SELECTS)
                 | SQLITE_ReverseOrder
#endif
#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
                 | SQLITE_CellSizeCk
#endif
      ;
  sqlite3HashInit(&db->aCollSeq);
#ifndef SQLITE_OMIT_VIRTUALTABLE
  sqlite3HashInit(&db->aModule);
#endif

  /* Add the default collation sequence BINARY. BINARY works for both UTF-8
  ** and UTF-16, so add a version for each to avoid any unnecessary
  ** conversions. The only error that can occur here is a malloc() failure.
  **
  ** EVIDENCE-OF: R-52786-44878 SQLite defines three built-in collating
  ** functions:
  */
  createCollation(db, sqlite3StrBINARY, SQLITE_UTF8, 0, binCollFunc, 0);
  createCollation(db, sqlite3StrBINARY, SQLITE_UTF16BE, 0, binCollFunc, 0);
  createCollation(db, sqlite3StrBINARY, SQLITE_UTF16LE, 0, binCollFunc, 0);
  createCollation(db, "NOCASE", SQLITE_UTF8, 0, nocaseCollatingFunc, 0);
  createCollation(db, "RTRIM", SQLITE_UTF8, (void*)1, binCollFunc, 0);
  if( db->mallocFailed ){
    goto opendb_out;
  }
  /* EVIDENCE-OF: R-08308-17224 The default collating function for all
  ** strings is BINARY. 
  */
  db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, sqlite3StrBINARY, 0);
  assert( db->pDfltColl!=0 );

  /* Parse the filename/URI argument. */
  db->openFlags = flags;
  rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg);
  if( rc!=SQLITE_OK ){
    if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
    sqlite3ErrorWithMsg(db, rc, zErrMsg ? "%s" : 0, zErrMsg);
    sqlite3_free(zErrMsg);
    goto opendb_out;
  }

  /* Open the backend database driver */
  rc = sqlite3BtreeOpen(db->pVfs, zOpen, db, &db->aDb[0].pBt, 0,
                        flags | SQLITE_OPEN_MAIN_DB);
  if( rc!=SQLITE_OK ){
    if( rc==SQLITE_IOERR_NOMEM ){
      rc = SQLITE_NOMEM;
    }
    sqlite3Error(db, rc);
    goto opendb_out;
  }
  sqlite3BtreeEnter(db->aDb[0].pBt);
  db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt);
  if( !db->mallocFailed ) ENC(db) = SCHEMA_ENC(db);
  sqlite3BtreeLeave(db->aDb[0].pBt);
  db->aDb[1].pSchema = sqlite3SchemaGet(db, 0);

  /* The default safety_level for the main database is 'full'; for the temp
  ** database it is 'NONE'. This matches the pager layer defaults.  
  */
  db->aDb[0].zName = "main";
  db->aDb[0].safety_level = 3;
  db->aDb[1].zName = "temp";
  db->aDb[1].safety_level = 1;

  db->magic = SQLITE_MAGIC_OPEN;
  if( db->mallocFailed ){
    goto opendb_out;
  }

  /* Register all built-in functions, but do not attempt to read the
  ** database schema yet. This is delayed until the first time the database
  ** is accessed.
  */
  sqlite3Error(db, SQLITE_OK);
  sqlite3RegisterBuiltinFunctions(db);

  /* Load automatic extensions - extensions that have been registered
  ** using the sqlite3_automatic_extension() API.
  */
  rc = sqlite3_errcode(db);
  if( rc==SQLITE_OK ){
    sqlite3AutoLoadExtensions(db);
    rc = sqlite3_errcode(db);
    if( rc!=SQLITE_OK ){
      goto opendb_out;
    }
  }

#ifdef SQLITE_ENABLE_FTS1
  if( !db->mallocFailed ){
    extern int sqlite3Fts1Init(sqlite3*);
    rc = sqlite3Fts1Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_FTS2
  if( !db->mallocFailed && rc==SQLITE_OK ){
    extern int sqlite3Fts2Init(sqlite3*);
    rc = sqlite3Fts2Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_FTS3 /* automatically defined by SQLITE_ENABLE_FTS4 */
  if( !db->mallocFailed && rc==SQLITE_OK ){
    rc = sqlite3Fts3Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_FTS5
  if( !db->mallocFailed && rc==SQLITE_OK ){
    rc = sqlite3Fts5Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_ICU
  if( !db->mallocFailed && rc==SQLITE_OK ){
    rc = sqlite3IcuInit(db);
  }
#endif

#ifdef SQLITE_ENABLE_RTREE
  if( !db->mallocFailed && rc==SQLITE_OK){
    rc = sqlite3RtreeInit(db);
  }
#endif

#ifdef SQLITE_ENABLE_DBSTAT_VTAB
  if( !db->mallocFailed && rc==SQLITE_OK){
    rc = sqlite3DbstatRegister(db);
  }
#endif

#ifdef SQLITE_ENABLE_JSON1
  if( !db->mallocFailed && rc==SQLITE_OK){
    rc = sqlite3Json1Init(db);
  }
#endif

  /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
  ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
  ** mode.  Doing nothing at all also makes NORMAL the default.
  */
#ifdef SQLITE_DEFAULT_LOCKING_MODE
  db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;
  sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),
                          SQLITE_DEFAULT_LOCKING_MODE);
#endif

  if( rc ) sqlite3Error(db, rc);

  /* Enable the lookaside-malloc subsystem */
  setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
                        sqlite3GlobalConfig.nLookaside);

  sqlite3_wal_autocheckpoint(db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT);

opendb_out:
  if( db ){
    assert( db->mutex!=0 || isThreadsafe==0
           || sqlite3GlobalConfig.bFullMutex==0 );
    sqlite3_mutex_leave(db->mutex);
  }
  rc = sqlite3_errcode(db);
  assert( db!=0 || rc==SQLITE_NOMEM );
  if( rc==SQLITE_NOMEM ){
    sqlite3_close(db);
    db = 0;
  }else if( rc!=SQLITE_OK ){
    db->magic = SQLITE_MAGIC_SICK;
  }
  *ppDb = db;
#ifdef SQLITE_ENABLE_SQLLOG
  if( sqlite3GlobalConfig.xSqllog ){
    /* Opening a db handle. Fourth parameter is passed 0. */
    void *pArg = sqlite3GlobalConfig.pSqllogArg;
    sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);
  }
#endif
#if defined(SQLITE_HAS_CODEC)
  if( rc==SQLITE_OK ){
    const char *zHexKey = sqlite3_uri_parameter(zOpen, "hexkey");
    if( zHexKey && zHexKey[0] ){
      u8 iByte;
      int i;
      char zKey[40];
      for(i=0, iByte=0; i<sizeof(zKey)*2 && sqlite3Isxdigit(zHexKey[i]); i++){
        iByte = (iByte<<4) + sqlite3HexToInt(zHexKey[i]);
        if( (i&1)!=0 ) zKey[i/2] = iByte;
      }
      sqlite3_key_v2(db, 0, zKey, i/2);
    }
  }
#endif
  sqlite3_free(zOpen);
  return rc & 0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r13
xorl %eax, %eax
movq %rax, -0x40(%rbp)
movq %rax, -0x38(%rbp)
movq %rax, (%rsi)
callq 0xa080
movl %eax, %ebx
testl %eax, %eax
jne 0x1a15b
movl %r15d, %eax
andl $0x7, %eax
movl $0x46, %ecx
btl %eax, %ecx
jae 0x19e01
movb $0x1, %bl
testw %r15w, %r15w
js 0x19e2c
cmpl $0x0, 0x77548(%rip)     # 0x91334
je 0x19e2c
btl $0x10, %r15d
jb 0x19e2a
cmpl $0x0, 0x7753c(%rip)     # 0x91338
sete %bl
jmp 0x19e2c
leaq 0x6569a(%rip), %rsi     # 0x7f4a2
leaq 0x6137e(%rip), %rcx     # 0x7b18d
movl $0x15, %ebx
movl $0x15, %edi
movl $0x20e84, %edx          # imm = 0x20E84
xorl %eax, %eax
callq 0xa4c0
jmp 0x1a15b
xorl %ebx, %ebx
btl $0x12, %r15d
jb 0x19e48
movl %r15d, %eax
orl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, 0x77652(%rip)     # 0x91494
cmovnel %eax, %r15d
jmp 0x19e4f
andl $0xfffdffff, %r15d      # imm = 0xFFFDFFFF
movq %r14, -0x58(%rbp)
andl $0xfff600e7, %r15d      # imm = 0xFFF600E7
movl %r15d, -0x2c(%rbp)
movl $0x330, %edi            # imm = 0x330
callq 0xc0e2
testq %rax, %rax
je 0x1a033
movq %r13, -0x48(%rbp)
movq %r12, -0x50(%rbp)
movq %rax, %r12
movq %rax, %r14
xorl %r13d, %r13d
movl $0x330, %edx            # imm = 0x330
movq %rax, %rdi
xorl %esi, %esi
callq 0xa220
testb %bl, %bl
jne 0x19ec6
cmpl $0x0, 0x77498(%rip)     # 0x91334
je 0x1a02b
movl $0x1, %edi
callq *0x774fb(%rip)          # 0x913a8
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x1a02b
movq %rax, %rdi
callq *0x774f5(%rip)          # 0x913b8
xorl %r13d, %r13d
movl $0xff, 0x48(%r14)
movl $0x2, 0x28(%r14)
movl $0xf03b7906, 0x5c(%r14) # imm = 0xF03B7906
leaq 0x2c0(%r12), %rax
movq %rax, 0x20(%r14)
movaps 0x5e77f(%rip), %xmm0    # 0x78670
movups %xmm0, 0x88(%r14)
movaps 0x5e750(%rip), %xmm0    # 0x78650
movups %xmm0, 0x68(%r14)
movaps 0x5e754(%rip), %xmm0    # 0x78660
movups %xmm0, 0x78(%r14)
movl %r13d, 0x94(%r14)
movb $0x1, 0x4f(%r14)
movb $-0x1, 0x53(%r14)
movq 0x77537(%rip), %rax     # 0x91460
movq %rax, 0x38(%r14)
movl %r13d, 0x58(%r14)
movl $0x7fffffff, 0x98(%r14) # imm = 0x7FFFFFFF
orl $0x900050, 0x2c(%r14)   # imm = 0x900050
movq %r13, 0x2a0(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x290(%r14)
movq %r13, 0x1b8(%r14)
movups %xmm0, 0x1a8(%r14)
leaq 0x5e844(%rip), %rbx     # 0x787b0
leaq 0x5c5b9(%rip), %r13     # 0x7652c
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1a4d0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1a4d0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1a4d0
leaq 0x63a59(%rip), %rsi     # 0x7da1b
leaq 0x5c614(%rip), %r8      # 0x765dd
movq %r14, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x1a4d0
leaq 0x65444(%rip), %rsi     # 0x7f426
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %edx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x1a4d0
cmpb $0x0, 0x51(%r14)
jne 0x1a117
movq %r12, %rbx
leaq 0x290(%r12), %rdi
leaq 0x5e799(%rip), %rsi     # 0x787b0
leaq -0x5c(%rbp), %rdx
callq 0x3c196
testq %rax, %rax
je 0x1a03b
movq 0x10(%rax), %rax
jmp 0x1a03d
movq %r14, %rdi
callq 0xa630
xorl %r14d, %r14d
jmp 0x1a139
xorl %eax, %eax
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, 0x10(%r14)
movl %r15d, 0x40(%r14)
leaq -0x2c(%rbp), %rdx
leaq -0x40(%rbp), %r8
leaq -0x38(%rbp), %r9
movq %r14, %rcx
callq 0x6fe48
testl %eax, %eax
je 0x1a08f
cmpl $0x7, %eax
jne 0x1a0ee
movb $0x1, 0x51(%r14)
movq -0x38(%rbp), %rbx
testq %rbx, %rbx
leaq 0x61312(%rip), %rdx     # 0x7b393
cmoveq %rbx, %rdx
movq %r14, %rdi
movl $0x7, %esi
jmp 0x1a105
movq -0x40(%rbp), %rsi
movq (%r14), %rdi
movq 0x20(%r14), %rcx
addq $0x8, %rcx
movl $0x100, %r9d            # imm = 0x100
orl -0x2c(%rbp), %r9d
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x1e44f
testl %eax, %eax
je 0x1a179
cmpl $0xc0a, %eax            # imm = 0xC0A
movl $0x7, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x44(%r14)
movq 0x140(%r14), %rdi
testq %rdi, %rdi
je 0x1a117
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x1a267
callq 0x2a210
jmp 0x1a117
movq -0x38(%rbp), %rbx
testq %rbx, %rbx
leaq 0x61297(%rip), %rdx     # 0x7b393
cmoveq %rbx, %rdx
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xf060
movq %rbx, %rdi
callq 0xa630
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1a126
callq *0x772a2(%rip)          # 0x913c8
movq %r14, %rdi
callq 0xa260
movl %eax, %ebx
testl %eax, %eax
je 0x1a14b
cmpl $0x7, %ebx
jne 0x1a16c
movq %r14, %rdi
xorl %esi, %esi
callq 0x18929
movl $0x7, %ebx
xorl %r14d, %r14d
movq -0x58(%rbp), %rax
movq %r14, (%rax)
movq -0x40(%rbp), %rdi
callq 0xa630
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4b771290, 0x5c(%r14) # imm = 0x4B771290
movzbl %bl, %ebx
jmp 0x1a14b
movq 0x20(%r14), %rax
movq 0x8(%rax), %rdi
callq 0xf901
movq 0x20(%r14), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x703d0
movq 0x20(%r14), %rcx
movq %rax, 0x18(%rcx)
cmpb $0x0, 0x51(%r14)
jne 0x1a1ac
movb 0x71(%rax), %al
movb %al, 0x4e(%r14)
movq 0x8(%rcx), %rdi
cmpb $0x0, 0x11(%rdi)
je 0x1a1c0
decl 0x14(%rdi)
jne 0x1a1c0
callq 0x25292
addq $0x51, %rbx
movl $0x78, %edi
callq 0xc0e2
movq %rbx, %r15
movq %rbx, %rcx
testq %rax, %rax
je 0x1a206
movq %rax, %rcx
addq $0x71, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x70(%rax)
movb $0x1, %dl
movb %dl, (%rcx)
movq 0x20(%r14), %rcx
movq %rax, 0x38(%rcx)
leaq 0x65213(%rip), %rax     # 0x7f42c
movq %rax, (%rcx)
movb $0x3, 0x10(%rcx)
leaq 0x60f37(%rip), %rax     # 0x7b15e
movq %rax, 0x20(%rcx)
movb %dl, 0x30(%rcx)
movl $0xa029a697, 0x5c(%r14) # imm = 0xA029A697
cmpb $0x0, 0x51(%r14)
jne 0x1a117
movl $0x0, 0x44(%r14)
movq 0x140(%r14), %rdi
testq %rdi, %rdi
je 0x1a278
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x1a272
callq 0x2a210
jmp 0x1a278
movw $0x1, 0x8(%rdi)
jmp 0x1a117
movw $0x1, 0x8(%rdi)
leaq 0x651b2(%rip), %rsi     # 0x7f431
movq %r14, %rdi
movl $0x2, %edx
callq 0xa330
cmpl $0x7, %eax
jne 0x1a295
movb $0x1, (%r15)
movq %r14, %rdi
callq 0xa260
testl %eax, %eax
je 0x1a2c3
movl %eax, 0x44(%r14)
movq 0x140(%r14), %rdi
testq %rdi, %rdi
je 0x1a2e3
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x1a2dd
callq 0x2a210
jmp 0x1a2e3
movq %r14, %rdi
callq 0x76603
movq %r14, %rdi
callq 0xa260
testl %eax, %eax
jne 0x1a117
jmp 0x1a2e3
movw $0x1, 0x8(%rdi)
movl 0x77063(%rip), %edx     # 0x9134c
movl 0x77061(%rip), %ecx     # 0x91350
movq %r14, %rdi
xorl %esi, %esi
callq 0x187ae
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1a339
callq *0x770b0(%rip)          # 0x913b8
movq 0x18(%r14), %rdi
leaq -0xbea(%rip), %rax      # 0x19729
movq %rax, 0x118(%r14)
movq $0x3e8, 0x120(%r14) # imm = 0x3E8
testq %rdi, %rdi
je 0x1a117
callq *0x77094(%rip)          # 0x913c8
jmp 0x1a117
leaq -0xc17(%rip), %rax      # 0x19729
movq %rax, 0x118(%r14)
movq $0x3e8, 0x120(%r14) # imm = 0x3E8
jmp 0x1a117