// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: unixOpen
static int unixOpen(
  sqlite3_vfs *pVfs,           /* The VFS for which this is the xOpen method */
  const char *zPath,           /* Pathname of file to be opened */
  sqlite3_file *pFile,         /* The file descriptor to be filled in */
  int flags,                   /* Input flags to control the opening */
  int *pOutFlags               /* Output flags returned to SQLite core */
){
  unixFile *p = (unixFile *)pFile;
  int fd = -1;                   /* File descriptor returned by open() */
  int openFlags = 0;             /* Flags to pass to open() */
  int eType = flags&0xFFFFFF00;  /* Type of file to open */
  int noLock;                    /* True to omit locking primitives */
  int rc = SQLITE_OK;            /* Function Return Code */
  int ctrlFlags = 0;             /* UNIXFILE_* flags */

  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);
  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);
  int isCreate     = (flags & SQLITE_OPEN_CREATE);
  int isReadonly   = (flags & SQLITE_OPEN_READONLY);
  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);
#if SQLITE_ENABLE_LOCKING_STYLE
  int isAutoProxy  = (flags & SQLITE_OPEN_AUTOPROXY);
#endif
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
  struct statfs fsInfo;
#endif

  /* If creating a master or main-file journal, this function will open
  ** a file-descriptor on the directory too. The first time unixSync()
  ** is called the directory file descriptor will be fsync()ed and close()d.
  */
  int syncDir = (isCreate && (
        eType==SQLITE_OPEN_MASTER_JOURNAL 
     || eType==SQLITE_OPEN_MAIN_JOURNAL 
     || eType==SQLITE_OPEN_WAL
  ));

  /* If argument zPath is a NULL pointer, this function is required to open
  ** a temporary file. Use this buffer to store the file name in.
  */
  char zTmpname[MAX_PATHNAME+2];
  const char *zName = zPath;

  /* Check the following statements are true: 
  **
  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and 
  **   (b) if CREATE is set, then READWRITE must also be set, and
  **   (c) if EXCLUSIVE is set, then CREATE must also be set.
  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.
  */
  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));
  assert(isCreate==0 || isReadWrite);
  assert(isExclusive==0 || isCreate);
  assert(isDelete==0 || isCreate);

  /* The main DB, main journal, WAL file and master journal are never 
  ** automatically deleted. Nor are they ever temporary files.  */
  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );

  /* Assert that the upper layer has set one of the "file-type" flags. */
  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB 
       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL 
       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_MASTER_JOURNAL 
       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
  );

  /* Detect a pid change and reset the PRNG.  There is a race condition
  ** here such that two or more threads all trying to open databases at
  ** the same instant might all reset the PRNG.  But multiple resets
  ** are harmless.
  */
  if( randomnessPid!=osGetpid(0) ){
    randomnessPid = osGetpid(0);
    sqlite3_randomness(0,0);
  }

  memset(p, 0, sizeof(unixFile));

  if( eType==SQLITE_OPEN_MAIN_DB ){
    UnixUnusedFd *pUnused;
    pUnused = findReusableFd(zName, flags);
    if( pUnused ){
      fd = pUnused->fd;
    }else{
      pUnused = sqlite3_malloc64(sizeof(*pUnused));
      if( !pUnused ){
        return SQLITE_NOMEM;
      }
    }
    p->pUnused = pUnused;

    /* Database filenames are double-zero terminated if they are not
    ** URIs with parameters.  Hence, they can always be passed into
    ** sqlite3_uri_parameter(). */
    assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );

  }else if( !zName ){
    /* If zName is NULL, the upper layer is requesting a temp file. */
    assert(isDelete && !syncDir);
    rc = unixGetTempname(pVfs->mxPathname, zTmpname);
    if( rc!=SQLITE_OK ){
      return rc;
    }
    zName = zTmpname;

    /* Generated temporary filenames are always double-zero terminated
    ** for use by sqlite3_uri_parameter(). */
    assert( zName[strlen(zName)+1]==0 );
  }

  /* Determine the value of the flags parameter passed to POSIX function
  ** open(). These must be calculated even if open() is not called, as
  ** they may be stored as part of the file handle and used by the 
  ** 'conch file' locking functions later on.  */
  if( isReadonly )  openFlags |= O_RDONLY;
  if( isReadWrite ) openFlags |= O_RDWR;
  if( isCreate )    openFlags |= O_CREAT;
  if( isExclusive ) openFlags |= (O_EXCL|O_NOFOLLOW);
  openFlags |= (O_LARGEFILE|O_BINARY);

  if( fd<0 ){
    mode_t openMode;              /* Permissions to create file with */
    uid_t uid;                    /* Userid for the file */
    gid_t gid;                    /* Groupid for the file */
    rc = findCreateFileMode(zName, flags, &openMode, &uid, &gid);
    if( rc!=SQLITE_OK ){
      assert( !p->pUnused );
      assert( eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL );
      return rc;
    }
    fd = robust_open(zName, openFlags, openMode);
    OSTRACE(("OPENX   %-3d %s 0%o\n", fd, zName, openFlags));
    assert( !isExclusive || (openFlags & O_CREAT)!=0 );
    if( fd<0 && errno!=EISDIR && isReadWrite ){
      /* Failed to open the file for read/write access. Try read-only. */
      flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
      openFlags &= ~(O_RDWR|O_CREAT);
      flags |= SQLITE_OPEN_READONLY;
      openFlags |= O_RDONLY;
      isReadonly = 1;
      fd = robust_open(zName, openFlags, openMode);
    }
    if( fd<0 ){
      rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
      goto open_finished;
    }

    /* If this process is running as root and if creating a new rollback
    ** journal or WAL file, set the ownership of the journal or WAL to be
    ** the same as the original database.
    */
    if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){
      robustFchown(fd, uid, gid);
    }
  }
  assert( fd>=0 );
  if( pOutFlags ){
    *pOutFlags = flags;
  }

  if( p->pUnused ){
    p->pUnused->fd = fd;
    p->pUnused->flags = flags;
  }

  if( isDelete ){
#if OS_VXWORKS
    zPath = zName;
#elif defined(SQLITE_UNLINK_AFTER_CLOSE)
    zPath = sqlite3_mprintf("%s", zName);
    if( zPath==0 ){
      robust_close(p, fd, __LINE__);
      return SQLITE_NOMEM;
    }
#else
    osUnlink(zName);
#endif
  }
#if SQLITE_ENABLE_LOCKING_STYLE
  else{
    p->openFlags = openFlags;
  }
#endif

  noLock = eType!=SQLITE_OPEN_MAIN_DB;

  
#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
  if( fstatfs(fd, &fsInfo) == -1 ){
    storeLastErrno(p, errno);
    robust_close(p, fd, __LINE__);
    return SQLITE_IOERR_ACCESS;
  }
  if (0 == strncmp("msdos", fsInfo.f_fstypename, 5)) {
    ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;
  }
  if (0 == strncmp("exfat", fsInfo.f_fstypename, 5)) {
    ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;
  }
#endif

  /* Set up appropriate ctrlFlags */
  if( isDelete )                ctrlFlags |= UNIXFILE_DELETE;
  if( isReadonly )              ctrlFlags |= UNIXFILE_RDONLY;
  if( noLock )                  ctrlFlags |= UNIXFILE_NOLOCK;
  if( syncDir )                 ctrlFlags |= UNIXFILE_DIRSYNC;
  if( flags & SQLITE_OPEN_URI ) ctrlFlags |= UNIXFILE_URI;

#if SQLITE_ENABLE_LOCKING_STYLE
#if SQLITE_PREFER_PROXY_LOCKING
  isAutoProxy = 1;
#endif
  if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){
    char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
    int useProxy = 0;

    /* SQLITE_FORCE_PROXY_LOCKING==1 means force always use proxy, 0 means 
    ** never use proxy, NULL means use proxy for non-local files only.  */
    if( envforce!=NULL ){
      useProxy = atoi(envforce)>0;
    }else{
      useProxy = !(fsInfo.f_flags&MNT_LOCAL);
    }
    if( useProxy ){
      rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);
      if( rc==SQLITE_OK ){
        rc = proxyTransformUnixFile((unixFile*)pFile, ":auto:");
        if( rc!=SQLITE_OK ){
          /* Use unixClose to clean up the resources added in fillInUnixFile 
          ** and clear all the structure's references.  Specifically, 
          ** pFile->pMethods will be NULL so sqlite3OsClose will be a no-op 
          */
          unixClose(pFile);
          return rc;
        }
      }
      goto open_finished;
    }
  }
#endif
  
  rc = fillInUnixFile(pVfs, fd, pFile, zPath, ctrlFlags);

open_finished:
  if( rc!=SQLITE_OK ){
    sqlite3_free(p->pUnused);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
movq %r8, -0x70(%rbp)
movl %ecx, %r13d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, -0x68(%rbp)
movl %ecx, %eax
andl $0xffffff00, %eax       # imm = 0xFFFFFF00
movl %ecx, %r12d
andl $0x4, %r12d
movl %eax, -0x44(%rbp)
jne 0xe02b
xorl %ecx, %ecx
movl %ecx, -0x5c(%rbp)
movl 0x8747a(%rip), %r14d    # 0x95438
callq 0xa170
cmpl %eax, %r14d
je 0xdfdc
callq 0xa170
movl %eax, 0x87465(%rip)     # 0x95438
xorl %edi, %edi
xorl %esi, %esi
callq 0xa360
pxor %xmm0, %xmm0
movdqu %xmm0, 0x60(%rbx)
movdqu %xmm0, 0x50(%rbx)
movdqu %xmm0, 0x40(%rbx)
movdqu %xmm0, 0x30(%rbx)
movdqu %xmm0, 0x20(%rbx)
movdqu %xmm0, 0x10(%rbx)
movdqu %xmm0, (%rbx)
cmpl $0x100, -0x44(%rbp)     # imm = 0x100
movq %r15, -0x50(%rbp)
jne 0xe04f
leaq -0x520(%rbp), %rsi
movq %r15, %rdi
callq *0x857c9(%rip)          # 0x937e8
testl %eax, %eax
je 0xe062
xorl %r14d, %r14d
jmp 0xe114
movb $0x1, %cl
cmpl $0x800, %eax            # imm = 0x800
je 0xdfb4
cmpl $0x4000, %eax           # imm = 0x4000
je 0xdfb4
cmpl $0x80000, %eax          # imm = 0x80000
jne 0xdfb2
jmp 0xdfb4
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0xe078
movq %r15, %r14
jmp 0xe160
cmpl $0x0, 0x852bb(%rip)     # 0x93324
je 0xe0a4
movl $0xb, %edi
callq *0x85322(%rip)          # 0x93398
jmp 0xe0a6
movq -0x68(%rbp), %rax
movl 0x8(%rax), %edi
leaq -0x520(%rbp), %r14
movq %r14, %rsi
callq 0x1debd
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %eax, %r15d
testl %eax, %eax
jne 0xe639
jmp 0xe160
xorl %eax, %eax
testq %rax, %rax
je 0xe0b4
movq %rax, %rdi
callq *0x852f4(%rip)          # 0x933a8
movq 0x87375(%rip), %rax     # 0x95430
testq %rax, %rax
je 0xe0eb
movq -0x520(%rbp), %rcx
movq -0x518(%rbp), %rdx
xorl %r14d, %r14d
cmpq %rcx, (%rax)
jne 0xe0e0
cmpq %rdx, 0x8(%rax)
je 0xe500
movq 0x38(%rax), %rax
testq %rax, %rax
jne 0xe0d1
jmp 0xe0ee
xorl %r14d, %r14d
cmpl $0x0, 0x8522f(%rip)     # 0x93324
je 0xe104
movl $0xb, %edi
callq *0x85296(%rip)          # 0x93398
jmp 0xe106
xorl %eax, %eax
testq %rax, %rax
je 0xe114
movq %rax, %rdi
callq *0x852a4(%rip)          # 0x933b8
testq %r14, %r14
je 0xe11e
movl (%r14), %r8d
jmp 0xe148
callq 0xa080
testl %eax, %eax
je 0xe12c
xorl %r14d, %r14d
jmp 0xe139
movl $0x10, %edi
callq 0xbf9b
movq %rax, %r14
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
testq %r14, %r14
je 0xe32d
movq %r14, 0x30(%rbx)
movb $0x1, %al
movl $0x7, %r15d
movq -0x50(%rbp), %r14
testb %al, %al
je 0xe639
movl %r13d, %ecx
andl $0x8, %ecx
movl %r13d, %eax
andl $0x1, %eax
movl %eax, -0x40(%rbp)
movl %r13d, %r15d
andl $0x2, %r15d
shll $0x4, %r12d
leal (%r12,%r15), %eax
testb $0x10, %r13b
leal 0x20080(%r12,%r15), %esi
cmovel %eax, %esi
testl %r8d, %r8d
js 0xe2cd
movq -0x70(%rbp), %rax
testq %rax, %rax
je 0xe1a2
movl %r13d, (%rax)
movq 0x30(%rbx), %rax
testq %rax, %rax
movq -0x50(%rbp), %r15
movq -0x68(%rbp), %r12
je 0xe1ba
movl %r8d, (%rax)
movl %r13d, 0x4(%rax)
testl %ecx, %ecx
movl %r8d, -0x2c(%rbp)
je 0xe1d5
movq %r14, %rdi
movq %rcx, %r14
callq *0x8573a(%rip)          # 0x93908
movq %r14, %rcx
movl -0x2c(%rbp), %r8d
leal (,%rcx,4), %eax
cmpl $0x0, -0x40(%rbp)
leal 0x2(,%rcx,4), %ecx
cmovel %eax, %ecx
leal 0x80(%rcx), %eax
cmpl $0x100, -0x44(%rbp)     # imm = 0x100
cmovel %ecx, %eax
movl %eax, %r14d
orl $0x8, %r14d
cmpb $0x0, -0x5c(%rbp)
cmovel %eax, %r14d
andl $0x40, %r13d
orl %r14d, %r13d
movl %r8d, 0x18(%rbx)
movq %r12, 0x8(%rbx)
movq %r15, 0x38(%rbx)
movzbl %r13b, %eax
movw %ax, 0x1e(%rbx)
movq 0x85225(%rip), %rcx     # 0x93450
movq %rcx, 0x60(%rbx)
xorl %edi, %edi
testb $0x40, %al
cmovneq %r15, %rdi
leaq 0x6f1bf(%rip), %rsi     # 0x7d3fd
movl $0x1, %edx
callq 0xa0f0
testl %eax, %eax
je 0xe250
orb $0x10, 0x1e(%rbx)
movq 0x18(%r12), %rdi
leaq 0x6ee08(%rip), %rsi     # 0x7d064
callq 0xa2b0
testl %eax, %eax
jne 0xe269
orb $0x1, 0x1e(%rbx)
testb %r14b, %r14b
js 0xe280
movq 0x20(%r12), %rax
movq %r15, %rdi
movq %rbx, %rsi
callq *(%rax)
movq %rax, %r14
jmp 0xe287
leaq 0x834d9(%rip), %r14     # 0x91760
movl -0x2c(%rbp), %esi
leaq 0x83437(%rip), %rax     # 0x916c8
cmpq %rax, %r14
je 0xe301
xorl %r12d, %r12d
leaq 0x83558(%rip), %rax     # 0x917f8
cmpq %rax, %r14
jne 0xe5fe
movq %r15, %rdi
callq 0xa190
movq %rax, %r15
addl $0x6, %r15d
callq 0xa080
testl %eax, %eax
je 0xe4c1
xorl %r13d, %r13d
jmp 0xe4cc
testl $0x80800, %r13d         # imm = 0x80800
movl %esi, -0x3c(%rbp)
movl %r8d, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
je 0xe317
testq %r14, %r14
je 0xe3ca
movq %r14, %rdi
callq 0xa190
movq %rax, %r12
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
jmp 0xe3cd
cmpl $0x0, 0x8501c(%rip)     # 0x93324
je 0xe334
movl $0xb, %edi
callq *0x85083(%rip)          # 0x93398
jmp 0xe336
testl %ecx, %ecx
movl $0x180, %edx            # imm = 0x180
cmovel %ecx, %edx
xorl %esi, %esi
xorl %edi, %edi
xorl %r12d, %r12d
jmp 0xe439
xorl %eax, %eax
jmp 0xe14e
xorl %eax, %eax
testq %rax, %rax
je 0xe344
movq %rax, %rdi
callq *0x85064(%rip)          # 0x933a8
movl 0x18(%rbx), %edi
leaq -0x310(%rbp), %rsi
callq *0x854ac(%rip)          # 0x93800
testl %eax, %eax
je 0xe372
callq 0xa0b0
movl (%rax), %eax
movl %eax, 0x20(%rbx)
movl $0xa, %r12d
xorl %eax, %eax
movl -0x2c(%rbp), %esi
jmp 0xe5bc
movdqu -0x310(%rbp), %xmm0
movdqa %xmm0, -0x100(%rbp)
movq 0x870a7(%rip), %rax     # 0x95430
testq %rax, %rax
movl -0x2c(%rbp), %esi
je 0xe3b6
movdqu (%rax), %xmm0
pcmpeqb -0x100(%rbp), %xmm0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0xe54d
movq 0x38(%rax), %rax
testq %rax, %rax
jne 0xe391
callq 0xa080
testl %eax, %eax
je 0xe552
xorl %eax, %eax
jmp 0xe55c
xorl %r12d, %r12d
cmpb $0x2d, -0x1(%r14,%r12)
leaq -0x1(%r12), %r12
jne 0xe3cd
leaq -0x310(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xa310
movb $0x0, -0x310(%rbp,%r12)
leaq -0x100(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq *0x853df(%rip)          # 0x937e8
testl %eax, %eax
je 0xe41b
movl $0x70a, %r12d           # imm = 0x70A
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
jmp 0xe435
movl $0x1ff, %edx            # imm = 0x1FF
andl -0xe8(%rbp), %edx
movl -0xe4(%rbp), %esi
movl -0xe0(%rbp), %edi
xorl %r12d, %r12d
movq -0x38(%rbp), %rcx
movl $0x1, %eax
testl %r12d, %r12d
je 0xe460
movl %r12d, %r15d
cmpl $0x2, %eax
je 0xe628
testl %eax, %eax
movl -0x2c(%rbp), %r8d
je 0xe196
jmp 0xe639
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
movl -0x3c(%rbp), %esi
movl %edx, %r12d
callq 0x1db69
testl %eax, %eax
jns 0xe65c
movl %r12d, -0x2c(%rbp)
movl %eax, %r12d
callq 0xa0b0
testl %r15d, %r15d
je 0xe659
cmpl $0x15, (%rax)
je 0xe659
andl $-0x8, %r13d
movl -0x3c(%rbp), %esi
andl $0x20080, %esi          # imm = 0x20080
incl %r13d
movq %r14, %rdi
movl -0x2c(%rbp), %edx
callq 0x1db69
movl $0x1, -0x40(%rbp)
jmp 0xe65c
movslq %r15d, %rdi
callq 0xbf9b
movq %rax, %r13
testq %r13, %r13
je 0xe4ee
leaq 0x6ef2a(%rip), %rdx     # 0x7d402
xorl %r12d, %r12d
movl %r15d, %edi
movq %r13, %rsi
movq -0x50(%rbp), %rcx
xorl %eax, %eax
callq 0xa340
jmp 0xe4f4
movl $0x7, %r12d
movl -0x2c(%rbp), %esi
movq %r13, 0x28(%rbx)
jmp 0xe5fe
movq 0x30(%rax), %r14
testq %r14, %r14
sete %cl
je 0xe0ee
cmpl %r13d, 0x4(%r14)
jne 0xe51c
addq $0x30, %rax
jmp 0xe539
movq %r14, %rax
movq 0x8(%r14), %r14
testq %r14, %r14
sete %cl
je 0xe0ee
cmpl %r13d, 0x4(%r14)
jne 0xe51c
addq $0x8, %rax
testb %cl, %cl
jne 0xe0ee
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
jmp 0xe0ee
incl 0x18(%rax)
jmp 0xe5b3
movl $0x48, %edi
callq 0xbf9b
testq %rax, %rax
je 0xe64e
pxor %xmm0, %xmm0
movdqu %xmm0, 0x30(%rax)
movdqu %xmm0, 0x20(%rax)
movdqu %xmm0, 0x10(%rax)
xorl %edx, %edx
movq %rdx, 0x40(%rax)
movdqa -0x100(%rbp), %xmm0
movdqu %xmm0, (%rax)
movl $0x1, 0x18(%rax)
movq 0x86e98(%rip), %rcx     # 0x95430
movq %rcx, 0x38(%rax)
movq %rdx, 0x40(%rax)
testq %rcx, %rcx
je 0xe5a9
movq %rax, 0x40(%rcx)
movq %rax, 0x86e80(%rip)     # 0x95430
movl -0x2c(%rbp), %esi
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
movb $0x1, %al
testb %al, %al
jne 0xe5d2
movq %rbx, %rdi
movl $0x7e3d, %edx           # imm = 0x7E3D
callq 0x1dd0f
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %esi, %r15d
cmpl $0x0, 0x84d48(%rip)     # 0x93324
je 0xe5eb
movl $0xb, %edi
callq *0x84daf(%rip)          # 0x93398
jmp 0xe5ed
xorl %eax, %eax
testq %rax, %rax
je 0xe5fb
movq %rax, %rdi
callq *0x84dbd(%rip)          # 0x933b8
movl %r15d, %esi
movl $0x0, 0x20(%rbx)
testl %r12d, %r12d
je 0xe61d
testl %esi, %esi
js 0xe628
movq %rbx, %rdi
movl $0x7e92, %edx           # imm = 0x7E92
callq 0x1dd0f
jmp 0xe628
movq %r14, (%rbx)
movq %rbx, %rdi
callq 0x1d92b
testl %r12d, %r12d
je 0xe636
movq 0x30(%rbx), %rdi
callq 0xa620
movl %r12d, %r15d
movl %r15d, %eax
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7, %r12d
jmp 0xe368
movl %r12d, %eax
testl %eax, %eax
movq -0x38(%rbp), %rcx
movl %eax, -0x2c(%rbp)
js 0xe6a1
movl $0x7, %r15d
xorl %r12d, %r12d
testl $0x80800, %r13d         # imm = 0x80800
je 0xe715
callq *0x852fd(%rip)          # 0x93980
testl %eax, %eax
jne 0xe696
movl -0x2c(%rbp), %edi
movl -0x58(%rbp), %esi
movl -0x54(%rbp), %edx
callq *0x852d2(%rip)          # 0x93968
xorl %eax, %eax
movq -0x38(%rbp), %rcx
jmp 0xe446
leaq 0x6ecde(%rip), %rsi     # 0x7d386
leaq 0x6eace(%rip), %rcx     # 0x7d17d
movl $0xe, %r12d
movl $0xe, %edi
movl $0x800e, %edx           # imm = 0x800E
xorl %eax, %eax
callq 0xa4b0
callq 0xa0b0
movl (%rax), %ecx
testq %r14, %r14
leaq 0x719ba(%rip), %rax     # 0x80091
movq %r14, %r9
cmoveq %rax, %r9
movq %rax, (%rsp)
leaq 0x6ec7e(%rip), %rsi     # 0x7d367
leaq 0x6eb8c(%rip), %r8      # 0x7d27c
movl $0xe, %edi
movl $0x800e, %edx           # imm = 0x800E
xorl %eax, %eax
callq 0xa4b0
movq -0x38(%rbp), %rcx
movl $0x2, %eax
movl $0x7, %r15d
jmp 0xe446
xorl %eax, %eax
jmp 0xe446