// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3WalCheckpoint
SQLITE_PRIVATE int sqlite3WalCheckpoint(
  Wal *pWal,                      /* Wal connection */
  int eMode,                      /* PASSIVE, FULL or RESTART */
  int (*xBusy)(void*),            /* Function to call when busy */
  void *pBusyArg,                 /* Context argument for xBusyHandler */
  int sync_flags,                 /* Flags to sync db file with (or 0) */
  int nBuf,                       /* Size of temporary buffer */
  u8 *zBuf,                       /* Temporary buffer to use */
  int *pnLog,                     /* OUT: Number of frames in WAL */
  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */
){
  int rc;                         /* Return code */
  int isChanged = 0;              /* True if a new wal-index header is loaded */
  int eMode2 = eMode;             /* Mode to pass to walCheckpoint() */

  assert( pWal->ckptLock==0 );
  assert( pWal->writeLock==0 );

  if( pWal->readOnly ) return SQLITE_READONLY;
  WALTRACE(("WAL%p: checkpoint begins\n", pWal));
  rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);
  if( rc ){
    /* Usually this is SQLITE_BUSY meaning that another thread or process
    ** is already running a checkpoint, or maybe a recovery.  But it might
    ** also be SQLITE_IOERR. */
    return rc;
  }
  pWal->ckptLock = 1;

  /* If this is a blocking-checkpoint, then obtain the write-lock as well
  ** to prevent any writers from running while the checkpoint is underway.
  ** This has to be done before the call to walIndexReadHdr() below.
  **
  ** If the writer lock cannot be obtained, then a passive checkpoint is
  ** run instead. Since the checkpointer is not holding the writer lock,
  ** there is no point in blocking waiting for any readers. Assuming no 
  ** other error occurs, this function will return SQLITE_BUSY to the caller.
  */
  if( eMode!=SQLITE_CHECKPOINT_PASSIVE ){
    rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_WRITE_LOCK, 1);
    if( rc==SQLITE_OK ){
      pWal->writeLock = 1;
    }else if( rc==SQLITE_BUSY ){
      eMode2 = SQLITE_CHECKPOINT_PASSIVE;
      rc = SQLITE_OK;
    }
  }

  /* Read the wal-index header. */
  if( rc==SQLITE_OK ){
    rc = walIndexReadHdr(pWal, &isChanged);
    if( isChanged && pWal->pDbFd->pMethods->iVersion>=3 ){
      sqlite3OsUnfetch(pWal->pDbFd, 0, 0);
    }
  }

  /* Copy data from the log to the database file. */
  if( rc==SQLITE_OK ){
    if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){
      rc = SQLITE_CORRUPT_BKPT;
    }else{
      rc = walCheckpoint(pWal, eMode2, xBusy, pBusyArg, sync_flags, zBuf);
    }

    /* If no error occurred, set the output variables. */
    if( rc==SQLITE_OK || rc==SQLITE_BUSY ){
      if( pnLog ) *pnLog = (int)pWal->hdr.mxFrame;
      if( pnCkpt ) *pnCkpt = (int)(walCkptInfo(pWal)->nBackfill);
    }
  }

  if( isChanged ){
    /* If a new wal-index header was loaded before the checkpoint was 
    ** performed, then the pager-cache associated with pWal is now
    ** out of date. So zero the cached wal-index header to ensure that
    ** next time the pager opens a snapshot on this database it knows that
    ** the cache needs to be reset.
    */
    memset(&pWal->hdr, 0, sizeof(WalIndexHdr));
  }

  /* Release the locks. */
  sqlite3WalEndWriteTransaction(pWal);
  walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);
  pWal->ckptLock = 0;
  WALTRACE(("WAL%p: checkpoint %s\n", pWal, rc ? "failed" : "ok"));
  return (rc==SQLITE_OK && eMode!=eMode2 ? SQLITE_BUSY : rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %r8d, -0x7c(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x8, %eax
cmpb $0x0, 0x42(%rdi)
jne 0x1db24
movl %r9d, %ebx
movq %rcx, %r14
movq %rdx, %r13
movl %esi, %ecx
movq %rdi, %r15
xorl %eax, %eax
cmpb $0x0, 0x3f(%rdi)
jne 0x1d387
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x1, %esi
movl $0x1, %edx
movl %ecx, %r12d
movl $0xa, %ecx
callq *0x70(%rax)
movl %r12d, %ecx
testl %eax, %eax
jne 0x1db24
movb $0x1, 0x41(%r15)
movl %ecx, -0x78(%rbp)
testl %ecx, %ecx
movq %r14, -0xb8(%rbp)
movq %r13, -0x58(%rbp)
je 0x1d3fe
cmpb $0x0, 0x3f(%r15)
movl $0x0, %ecx
jne 0x1d3ca
movq 0x8(%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
testq %r13, %r13
je 0x1d3e4
cmpl $0x5, %ecx
jne 0x1d3e4
movq %r14, %rdi
movq %rcx, %r12
callq *%r13
movq %r12, %rcx
testl %eax, %eax
jne 0x1d3a6
cmpl $0x5, %ecx
je 0x1d3fe
movl -0x78(%rbp), %r13d
testl %ecx, %ecx
jne 0x1d403
movb $0x1, 0x40(%r15)
xorl %ecx, %ecx
movl -0x78(%rbp), %r13d
jmp 0x1d403
xorl %ecx, %ecx
xorl %r13d, %r13d
testl %ecx, %ecx
je 0x1d7e3
testl %ecx, %ecx
jne 0x1da99
movl 0x58(%r15), %r12d
testl %r12d, %r12d
je 0x1d436
movzwl 0x56(%r15), %eax
movl %eax, %ecx
shll $0x10, %ecx
orl %eax, %ecx
andl $0x1fe00, %ecx          # imm = 0x1FE00
cmpl %ebx, %ecx
jne 0x1d826
movzwl 0x56(%r15), %edx
movq 0x30(%r15), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movl 0x60(%rax), %eax
xorl %ecx, %ecx
cmpl %r12d, %eax
jae 0x1da66
movl %edx, -0x74(%rbp)
leal 0x1000(%r12), %eax
movl %r13d, -0x2c(%rbp)
movabsq $0xffffffff021, %r13    # imm = 0xFFFFFFFF021
addq %rax, %r13
shrq $0xc, %r13
movl %r13d, %eax
shll $0x5, %eax
leal (%rax,%r12,2), %ebx
addl $0x28, %ebx
movl %ebx, %edi
callq 0x16cce
testq %rax, %rax
movq %r15, -0x68(%rbp)
je 0x1d84f
movq %rax, %r14
leal 0x1(%r13), %r15d
movslq %ebx, %rdx
movq %rax, %rdi
xorl %esi, %esi
xorl %ebx, %ebx
callq 0x8200
movq %r14, -0x48(%rbp)
movl %r15d, 0x4(%r14)
movl $0x1000, %edi           # imm = 0x1000
cmpl %edi, %r12d
cmovbl %r12d, %edi
addl %edi, %edi
callq 0x16cce
movq %rax, %rcx
testq %rax, %rax
setne %dl
movl $0x7, %eax
cmovnel %ebx, %eax
movq %r13, -0xa8(%rbp)
testl %r13d, %r13d
movq %rcx, -0x40(%rbp)
js 0x1d860
testq %rcx, %rcx
movq -0x48(%rbp), %r14
movl -0x2c(%rbp), %r13d
je 0x1d868
movq %r14, %rax
addq $0x8, %rax
movq %rax, -0xd0(%rbp)
movq -0xa8(%rbp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0xa8(%rbp)
xorl %esi, %esi
movq %r12, -0xd8(%rbp)
movq -0x68(%rbp), %rdi
movq %rsi, -0x60(%rbp)
leaq -0x1b0(%rbp), %rdx
callq 0x1c0bd
testl %eax, %eax
sete %dl
jne 0x1d588
movq -0x1b0(%rbp), %rbx
movq -0x60(%rbp), %rsi
testq %rsi, %rsi
je 0x1d561
movl %esi, %r15d
shll $0xc, %r15d
addl $-0x22, %r15d
jmp 0x1d572
leaq 0x88(%rbx), %rcx
movq %rcx, -0x1b0(%rbp)
xorl %r15d, %r15d
addq $0x4000, %rbx           # imm = 0x4000
movq -0x1b0(%rbp), %rsi
addq $-0x4, %rsi
movq %rsi, -0x70(%rbp)
testl %eax, %eax
je 0x1d595
movq -0x60(%rbp), %rsi
jmp 0x1d7c6
movq %rax, -0xa0(%rbp)
movq -0x70(%rbp), %rax
addq $0x4, %rax
movq %rbx, %rsi
movq %rax, -0x70(%rbp)
subq %rax, %rsi
shrq $0x2, %rsi
movl %r12d, %eax
subl %r15d, %eax
movq -0x60(%rbp), %rcx
cmpq -0xa8(%rbp), %rcx
cmovel %eax, %esi
movslq 0x4(%r14), %rax
shlq $0x5, %rax
addq -0xd0(%rbp), %rax
movl %r15d, %ecx
leaq (%rax,%rcx,2), %rcx
testl %esi, %esi
movq %rsi, -0xb0(%rbp)
movb %dl, -0x31(%rbp)
movq %rbx, -0xe0(%rbp)
movl %r15d, -0xc4(%rbp)
movq %rcx, -0x90(%rbp)
jle 0x1d6dd
movl %esi, %ebx
xorl %eax, %eax
movw %ax, (%rcx,%rax,2)
incq %rax
cmpq %rax, %rbx
jne 0x1d607
movl $0x0, -0x30(%rbp)
movq $0x0, -0x50(%rbp)
movl $0xd0, %edx
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0x8200
xorl %edx, %edx
leaq -0x50(%rbp), %r10
movq %rbx, -0xc0(%rbp)
movl $0x1, -0x30(%rbp)
movq -0x90(%rbp), %rax
leaq (%rax,%rdx,2), %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
testb $0x1, %dl
movq -0x40(%rbp), %r12
leaq -0x30(%rbp), %r8
movq -0x70(%rbp), %r15
je 0x1d6ab
xorl %r13d, %r13d
leaq -0x1a8(%rbp), %r14
movq (%r14), %rsi
movq %rdx, %rbx
movl -0x8(%r14), %edx
movq %r15, %rdi
movq %r10, %rcx
movq %r12, %r9
callq 0x1de45
movq %rbx, %rdx
leaq -0x50(%rbp), %r10
movl %edx, %eax
movl %r13d, %ecx
shrl %cl, %eax
incl %r13d
addq $0x10, %r14
testb $0x2, %al
leaq -0x30(%rbp), %r8
jne 0x1d676
movq -0x50(%rbp), %rax
movl %r13d, %ecx
shlq $0x4, %rcx
movq %rax, -0x1a8(%rbp,%rcx)
movl -0x30(%rbp), %eax
movl %eax, -0x1b0(%rbp,%rcx)
incq %rdx
movq -0xc0(%rbp), %rbx
cmpq %rbx, %rdx
jne 0x1d642
jmp 0x1d706
movl $0x0, -0x30(%rbp)
movq $0x0, -0x50(%rbp)
xorl %r13d, %r13d
movl $0xd0, %edx
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0x8200
leaq -0x50(%rbp), %r10
cmpl $0xb, %r13d
movq -0x48(%rbp), %r14
leaq -0x30(%rbp), %r15
movq -0x70(%rbp), %rbx
movq -0xb0(%rbp), %rdx
ja 0x1d771
movl %r13d, %r13d
movq %r13, %r12
shlq $0x4, %r12
leaq -0x198(%rbp), %rax
addq %rax, %r12
movl %edx, %eax
movl %r13d, %ecx
shrl %cl, %eax
testb $0x2, %al
je 0x1d764
movq (%r12), %rsi
movl -0x8(%r12), %edx
movq %rbx, %rdi
movq %r10, %rcx
movq %r15, %r8
movq -0x40(%rbp), %r9
callq 0x1de45
movq -0xb0(%rbp), %rdx
leaq -0x50(%rbp), %r10
incq %r13
addq $0x10, %r12
cmpq $0xc, %r13
jne 0x1d733
movl -0xc4(%rbp), %r15d
incl %r15d
movl -0x30(%rbp), %eax
movq -0x60(%rbp), %rsi
movq %rsi, %rcx
shlq $0x5, %rcx
movq -0xd0(%rbp), %rdx
movl %r15d, 0x1c(%rdx,%rcx)
movl %eax, 0x18(%rdx,%rcx)
movq -0x90(%rbp), %rax
movq %rax, 0x8(%rdx,%rcx)
movq %rbx, 0x10(%rdx,%rcx)
movl -0x2c(%rbp), %r13d
movq -0xa0(%rbp), %rax
movq -0xd8(%rbp), %r12
movb -0x31(%rbp), %dl
movq -0xe0(%rbp), %rbx
cmpq -0xa8(%rbp), %rsi
jae 0x1d868
incq %rsi
testl %eax, %eax
je 0x1d529
jmp 0x1d868
leaq -0x94(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1bf60
movl %eax, %ecx
cmpl $0x0, (%r14)
je 0x1d40b
movq 0x8(%r15), %rdi
movq (%rdi), %rax
cmpl $0x3, (%rax)
jl 0x1d40b
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, %r14
callq *0x90(%rax)
movq %r14, %rcx
jmp 0x1d40b
leaq 0x5bfe7(%rip), %rsi     # 0x79814
leaq 0x5bd05(%rip), %rcx     # 0x79539
movl $0xb, %edi
movl $0xbd6c, %edx           # imm = 0xBD6C
xorl %eax, %eax
callq 0xb8cc
movl $0xb, %ecx
jmp 0x1da66
movl $0x7, %ecx
xorl %r14d, %r14d
movl -0x74(%rbp), %edx
movl -0x2c(%rbp), %r13d
jmp 0x1d894
movq -0x48(%rbp), %r14
movl -0x2c(%rbp), %r13d
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
movl %edx, %ebx
callq 0x16d96
testb %bl, %bl
jne 0x1d886
movq %r14, %rdi
callq 0x16d96
movq -0x68(%rbp), %r15
movq -0xa0(%rbp), %rcx
movl -0x74(%rbp), %edx
testl %ecx, %ecx
jne 0x1da66
movq %r14, -0x48(%rbp)
movl %edx, %eax
shll $0x10, %eax
orl %edx, %eax
andl $0x1fe00, %eax          # imm = 0x1FE00
movl %eax, -0x90(%rbp)
xorl %ecx, %ecx
testl %r13d, %r13d
movq -0x58(%rbp), %rax
cmoveq %rcx, %rax
movq %rax, -0x58(%rbp)
movl 0x58(%r15), %eax
movl %eax, -0x40(%rbp)
movl 0x5c(%r15), %eax
movq %rax, -0x70(%rbp)
movl $0x1, %r12d
movq -0x88(%rbp), %rax
movl 0x64(%rax,%r12,4), %r13d
cmpl %r13d, -0x40(%rbp)
jbe 0x1d987
leaq 0x3(%r12), %rbx
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r15)
jne 0x1d914
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
cmpq $0x0, -0x58(%rbp)
je 0x1d934
cmpl $0x5, %ecx
jne 0x1d934
movq -0xb8(%rbp), %rdi
movq %rcx, %r14
callq *-0x58(%rbp)
movq %r14, %rcx
testl %eax, %eax
jne 0x1d8f3
cmpl $0x5, %ecx
je 0x1d98c
movl $0x5, %r15d
testl %ecx, %ecx
jne 0x1d99b
cmpq $0x1, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel -0x40(%rbp), %eax
movq -0x88(%rbp), %rcx
movl %eax, 0x64(%rcx,%r12,4)
xorl %r15d, %r15d
movq -0x68(%rbp), %rax
cmpb $0x0, 0x3f(%rax)
movl -0x2c(%rbp), %r13d
jne 0x1d983
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
xorl %ecx, %ecx
jmp 0x1d99f
xorl %r15d, %r15d
jmp 0x1d99b
movq $0x0, -0x58(%rbp)
xorl %r15d, %r15d
movl %r13d, -0x40(%rbp)
movl -0x2c(%rbp), %r13d
testl %r15d, %r15d
jne 0x1da44
incq %r12
cmpq $0x5, %r12
movq -0x68(%rbp), %r15
jne 0x1d8d8
movq -0x88(%rbp), %rax
movl 0x60(%rax), %eax
cmpl -0x40(%rbp), %eax
jae 0x1dd31
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r15)
jne 0x1d9f0
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
cmpq $0x0, -0x58(%rbp)
je 0x1da10
cmpl $0x5, %ecx
jne 0x1da10
movq -0xb8(%rbp), %rdi
movq %rcx, %rbx
callq *-0x58(%rbp)
movq %rbx, %rcx
testl %eax, %eax
jne 0x1d9cc
testl %ecx, %ecx
jne 0x1dd31
movq -0x88(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0xc0(%rbp)
movl -0x7c(%rbp), %esi
testl %esi, %esi
je 0x1db36
movq 0x10(%r15), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ecx
jmp 0x1db38
cmpl $0x5, %r15d
jne 0x1da62
movq -0x68(%rbp), %r15
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %rcx, %rbx
callq 0x16d96
movq %rbx, %rcx
jmp 0x1da66
movq -0x68(%rbp), %r15
cmpl $0x5, %ecx
je 0x1da6f
testl %ecx, %ecx
jne 0x1da99
movq %rcx, %rsi
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rcx
testq %rcx, %rcx
je 0x1da85
movl 0x58(%r15), %edx
movl %edx, (%rcx)
testq %rax, %rax
je 0x1da96
movq 0x30(%r15), %rcx
movq (%rcx), %rcx
movl 0x60(%rcx), %ecx
movl %ecx, (%rax)
movq %rsi, %rcx
cmpl $0x0, -0x94(%rbp)
je 0x1dab4
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r15)
movups %xmm0, 0x58(%r15)
movups %xmm0, 0x48(%r15)
cmpb $0x0, 0x40(%r15)
je 0x1dae8
cmpb $0x0, 0x3f(%r15)
jne 0x1dade
movq 0x8(%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movq %rcx, %rbx
movl $0x9, %ecx
callq *0x70(%rax)
movq %rbx, %rcx
xorl %eax, %eax
movb %al, 0x40(%r15)
movb %al, 0x43(%r15)
cmpb $0x0, 0x3f(%r15)
jne 0x1db0e
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x1, %esi
movl $0x1, %edx
movq %rcx, %rbx
movl $0x9, %ecx
callq *0x70(%rax)
movq %rbx, %rcx
testl %ecx, %ecx
movl $0x5, %eax
cmovnel %ecx, %eax
movb $0x0, 0x41(%r15)
cmpl -0x78(%rbp), %r13d
cmovel %ecx, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
movl -0x90(%rbp), %r14d
movl %r14d, %eax
movq %rax, -0x60(%rbp)
testl %ecx, %ecx
jne 0x1db94
movq -0x70(%rbp), %rax
imulq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x8(%r15), %rdi
movq (%rdi), %rax
leaq -0x1b0(%rbp), %rsi
callq *0x30(%rax)
movl %eax, %ecx
testl %eax, %eax
jne 0x1db94
movq -0x1b0(%rbp), %rax
cmpq -0x50(%rbp), %rax
jge 0x1db94
movq 0x8(%r15), %rdi
movq (%rdi), %rax
leaq -0x50(%rbp), %rdx
movl $0x5, %esi
movq %rcx, %rbx
callq *0x50(%rax)
movq %rbx, %rcx
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %r12
movl %r14d, %eax
orl $0x18, %eax
movq %rax, -0xb0(%rbp)
xorl %r13d, %r13d
movl -0x90(%rbp), %r14d
testl %ecx, %ecx
jne 0x1dcb1
movq -0x48(%rbp), %rcx
movslq 0x4(%rcx), %rax
testq %rax, %rax
jle 0x1dc29
movl (%rcx), %ecx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %rax, %rdx
decq %rax
movq %rax, %r8
shlq $0x5, %r8
leaq (%r12,%r8), %rsi
movl (%r12,%r8), %edi
movl 0x18(%r12,%r8), %r8d
cmpl %r8d, %edi
jge 0x1dc21
movq 0x8(%rsi), %r9
movq 0x10(%rsi), %r11
movslq %edi, %r10
movzwl (%r9,%r10,2), %r10d
movl (%r11,%r10,4), %r9d
cmpl %ecx, %r9d
jbe 0x1dc18
cmpl %ebx, %r9d
jae 0x1dc1c
addl 0x1c(%rsi), %r10d
movl %r10d, %r13d
movl %r9d, %ebx
jmp 0x1dc1c
incl %edi
movl %edi, (%rsi)
cmpl %ecx, %r9d
jbe 0x1dbe9
cmpq $0x1, %rdx
jg 0x1dbcf
jmp 0x1dc2e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rax
movl %ebx, (%rax)
cmpl $-0x1, %ebx
je 0x1dcaf
xorl %eax, %eax
cmpl -0xc0(%rbp), %r13d
jbe 0x1dc7f
cmpl -0x40(%rbp), %r13d
ja 0x1dc7f
movl $0x0, %ecx
cmpl -0x70(%rbp), %ebx
ja 0x1dca5
leal -0x1(%r13), %ecx
imulq -0xb0(%rbp), %rcx
addq $0x38, %rcx
movq 0x10(%r15), %rdi
movq (%rdi), %rax
movq 0x10(%rbp), %rsi
movl %r14d, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x1dc83
movl %eax, %ecx
movb $0x1, %al
jmp 0x1dca5
xorl %ecx, %ecx
jmp 0x1dca5
decl %ebx
imulq -0x60(%rbp), %rbx
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movq 0x10(%rbp), %rsi
movl %r14d, %edx
movq %rbx, %rcx
callq *0x18(%rax)
movl %eax, %ecx
testl %eax, %eax
setne %al
testb %al, %al
je 0x1dbb3
jmp 0x1dcb1
xorl %ecx, %ecx
testl %ecx, %ecx
movl -0x2c(%rbp), %r13d
jne 0x1dd0b
movq 0x30(%r15), %rax
movq (%rax), %rax
xorl %ecx, %ecx
movl -0x40(%rbp), %edx
cmpl 0x10(%rax), %edx
jne 0x1dcf8
movl 0x5c(%r15), %esi
imulq -0x60(%rbp), %rsi
movq 0x8(%r15), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ecx
cmpl $0x0, -0x7c(%rbp)
je 0x1dcf8
testl %ecx, %ecx
jne 0x1dcf8
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl -0x7c(%rbp), %esi
callq *0x28(%rax)
movl %eax, %ecx
testl %ecx, %ecx
jne 0x1dd0b
movq -0x88(%rbp), %rax
movl -0x40(%rbp), %ecx
movl %ecx, 0x60(%rax)
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r15)
jne 0x1dd31
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movq %rcx, %rbx
movl $0x9, %ecx
callq *0x70(%rax)
movq %rbx, %rcx
movl %ecx, %eax
xorl %ecx, %ecx
cmpl $0x5, %eax
cmovnel %eax, %ecx
testl %r13d, %r13d
je 0x1da4e
testl %ecx, %ecx
movq -0x48(%rbp), %rbx
jne 0x1da52
movq -0x88(%rbp), %rax
movl 0x60(%rax), %eax
movl $0x5, %ecx
cmpl 0x58(%r15), %eax
jb 0x1da52
xorl %ecx, %ecx
cmpl $0x2, %r13d
jne 0x1da52
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r15)
jne 0x1dd99
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
cmpq $0x0, -0x58(%rbp)
je 0x1ddb9
cmpl $0x5, %ecx
jne 0x1ddb9
movq -0xb8(%rbp), %rdi
movq %rcx, %r14
callq *-0x58(%rbp)
movq %r14, %rcx
testl %eax, %eax
jne 0x1dd75
testl %ecx, %ecx
jne 0x1da52
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r15)
jne 0x1da52
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movl $0x9, %ecx
callq *0x70(%rax)
xorl %ecx, %ecx
jmp 0x1da52