// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3WalCheckpoint
SQLITE_PRIVATE int sqlite3WalCheckpoint(
  Wal *pWal,                      /* Wal connection */
  int eMode,                      /* PASSIVE, FULL, RESTART, or TRUNCATE */
  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() */
  int (*xBusy2)(void*) = xBusy;   /* Busy handler for eMode2 */

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

  /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked
  ** in the SQLITE_CHECKPOINT_PASSIVE mode. */
  assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 );

  if( pWal->readOnly ) return SQLITE_READONLY;
  WALTRACE(("WAL%p: checkpoint begins\n", pWal));

  /* IMPLEMENTATION-OF: R-62028-47212 All calls obtain an exclusive 
  ** "checkpoint" lock on the database file. */
  rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);
  if( rc ){
    /* EVIDENCE-OF: R-10421-19736 If any other process is running a
    ** checkpoint operation at the same time, the lock cannot be obtained and
    ** SQLITE_BUSY is returned.
    ** EVIDENCE-OF: R-53820-33897 Even if there is a busy-handler configured,
    ** it will not be invoked in this case.
    */
    testcase( rc==SQLITE_BUSY );
    testcase( xBusy!=0 );
    return rc;
  }
  pWal->ckptLock = 1;

  /* IMPLEMENTATION-OF: R-59782-36818 The SQLITE_CHECKPOINT_FULL, RESTART and
  ** TRUNCATE modes also obtain the exclusive "writer" lock on the database
  ** file.
  **
  ** EVIDENCE-OF: R-60642-04082 If the writer lock cannot be obtained
  ** immediately, and a busy-handler is configured, it is invoked and the
  ** writer lock retried until either the busy-handler returns 0 or the
  ** lock is successfully obtained.
  */
  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;
      xBusy2 = 0;
      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, xBusy2, 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, -0x80(%rbp)
movl $0x0, -0xa8(%rbp)
movl $0x8, %eax
cmpb $0x0, 0x42(%rdi)
jne 0x23222
movl %r9d, %ebx
movq %rcx, %r14
movq %rdx, %r13
movl %esi, %ecx
movq %rdi, %r12
xorl %eax, %eax
cmpb $0x0, 0x3f(%rdi)
jne 0x22b25
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl $0x1, %esi
movl $0x1, %edx
movl %ecx, %r15d
movl $0xa, %ecx
callq *0x70(%rax)
movl %r15d, %ecx
testl %eax, %eax
jne 0x23222
movb $0x1, 0x41(%r12)
movl %ecx, -0x7c(%rbp)
testl %ecx, %ecx
movq %r14, -0xc0(%rbp)
je 0x22b98
cmpb $0x0, 0x3f(%r12)
movl $0x0, %ecx
jne 0x22b67
movq 0x8(%r12), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
testq %r13, %r13
je 0x22b81
cmpl $0x5, %ecx
jne 0x22b81
movq %r14, %rdi
movq %rcx, %r15
callq *%r13
movq %r15, %rcx
testl %eax, %eax
jne 0x22b41
cmpl $0x5, %ecx
je 0x22b9f
testl %ecx, %ecx
jne 0x22b92
movb $0x1, 0x40(%r12)
xorl %ecx, %ecx
movl -0x7c(%rbp), %r14d
jmp 0x22ba7
xorl %ecx, %ecx
xorl %r14d, %r14d
jmp 0x22ba7
xorl %ecx, %ecx
xorl %r14d, %r14d
xorl %r13d, %r13d
testl %ecx, %ecx
jne 0x22bf0
movq %r13, -0x68(%rbp)
movl %r14d, %r13d
leaq -0xa8(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x20fc3
movl %eax, %ecx
cmpl $0x0, (%r14)
je 0x22be9
movq 0x8(%r12), %rdi
movq (%rdi), %rax
cmpl $0x3, (%rax)
jl 0x22be9
xorl %esi, %esi
xorl %edx, %edx
movq %rcx, %r14
callq *0x90(%rax)
movq %r14, %rcx
movl %r13d, %r14d
movq -0x68(%rbp), %r13
testl %ecx, %ecx
jne 0x2318c
movl 0x58(%r12), %eax
movq %rax, -0xb8(%rbp)
testl %eax, %eax
je 0x22c23
movzwl 0x56(%r12), %eax
movl %eax, %ecx
shll $0x10, %ecx
orl %eax, %ecx
andl $0x1fe00, %ecx          # imm = 0x1FE00
cmpl %ebx, %ecx
jne 0x22cbb
movzwl 0x56(%r12), %r15d
movq 0x30(%r12), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movl 0x60(%rax), %eax
movq -0xb8(%rbp), %rcx
cmpl %ecx, %eax
jae 0x22c81
leal 0x1000(%rcx), %eax
movabsq $0xffffffff021, %rdx    # imm = 0xFFFFFFFF021
addq %rax, %rdx
shrq $0xc, %rdx
movq %rdx, %rax
movq %rdx, -0x50(%rbp)
shll $0x5, %eax
leal (%rax,%rcx,2), %eax
addl $0x28, %eax
movslq %eax, %rbx
callq 0xa080
testl %eax, %eax
movq %rbx, -0x30(%rbp)
je 0x22ce4
xorl %ebx, %ebx
jmp 0x22cef
movq $0x0, -0x48(%rbp)
xorl %ecx, %ecx
testl %r14d, %r14d
je 0x22dfa
testl %ecx, %ecx
jne 0x22dfa
movq -0x88(%rbp), %rax
movl 0x60(%rax), %eax
cmpl 0x58(%r12), %eax
jae 0x22d4a
movl $0x5, %ebx
jmp 0x22dfd
leaq 0x5a816(%rip), %rsi     # 0x7d4d8
leaq 0x5a4b4(%rip), %rcx     # 0x7d17d
movl $0xb, %edi
movl $0xd2b4, %edx           # imm = 0xD2B4
xorl %eax, %eax
callq 0xa4b0
movl $0xb, %ecx
jmp 0x23157
movq %rbx, %rdi
callq 0xbf9b
movq %rax, %rbx
testq %rbx, %rbx
movq %r12, -0x70(%rbp)
movl %r14d, -0x38(%rbp)
je 0x22d38
movl %r15d, -0xa4(%rbp)
movq -0x50(%rbp), %rax
leal 0x1(%rax), %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0xa210
movq %rbx, -0x48(%rbp)
movl %r15d, 0x4(%rbx)
callq 0xa080
testl %eax, %eax
je 0x22e0e
xorl %eax, %eax
jmp 0x22e26
movl $0x7, %ecx
movq $0x0, -0x48(%rbp)
jmp 0x2314f
cmpl $0x2, %r14d
jl 0x233dc
leaq -0x1b0(%rbp), %rsi
movl $0x4, %edi
callq 0xa360
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r12)
jne 0x22d8b
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
testq %r13, %r13
je 0x22da9
cmpl $0x5, %ecx
jne 0x22da9
movq -0xc0(%rbp), %rdi
movq %rcx, %rbx
callq *%r13
movq %rbx, %rcx
testl %eax, %eax
jne 0x22d65
testl %ecx, %ecx
jne 0x22dfa
xorl %ecx, %ecx
cmpl $0x3, %r14d
jne 0x22dd2
movl -0x1b0(%rbp), %esi
movq %r12, %rdi
callq 0x20bb2
movq 0x10(%r12), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x20(%rax)
movl %eax, %ecx
cmpb $0x0, 0x3f(%r12)
jne 0x22dfa
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movq %rcx, %rbx
movl $0x9, %ecx
callq *0x70(%rax)
movq %rbx, %rcx
movq %rcx, %rbx
movq -0x48(%rbp), %rdi
callq 0xa620
movq %rbx, %rcx
jmp 0x23157
movl $0x1000, %edi           # imm = 0x1000
movq -0xb8(%rbp), %rax
cmpl %edi, %eax
cmovbl %eax, %edi
addl %edi, %edi
callq 0xbf9b
movq %rax, -0x78(%rbp)
testq %rax, %rax
setne %dl
movl $0x7, %eax
cmovnel %r14d, %eax
je 0x2311e
cmpl $0x0, -0x50(%rbp)
js 0x2311e
movq -0x48(%rbp), %rax
addq $0x8, %rax
movq %rax, -0xc8(%rbp)
movq -0x50(%rbp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x50(%rbp)
xorl %esi, %esi
leaq -0x3c(%rbp), %r8
movq %r13, -0x68(%rbp)
movq %r8, %rbx
movq %r12, %rdi
movq %rsi, -0x90(%rbp)
leaq -0x1b0(%rbp), %rdx
callq 0x21120
testl %eax, %eax
sete %dl
jne 0x22ed8
movq -0x1b0(%rbp), %r14
movq -0x90(%rbp), %rcx
testq %rcx, %rcx
je 0x22ead
shll $0xc, %ecx
addl $-0x22, %ecx
movl %ecx, -0x5c(%rbp)
jmp 0x22ec2
leaq 0x88(%r14), %rcx
movq %rcx, -0x1b0(%rbp)
movl $0x0, -0x5c(%rbp)
addq $0x4000, %r14           # imm = 0x4000
movq -0x1b0(%rbp), %rcx
addq $-0x4, %rcx
movq %rcx, -0x30(%rbp)
testl %eax, %eax
je 0x22ee4
movq %rbx, %r8
jmp 0x23102
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq %r14, %r15
subq %rax, %r15
shrq $0x2, %r15
movq -0xb8(%rbp), %rax
movl -0x5c(%rbp), %esi
subl %esi, %eax
movq -0x90(%rbp), %rcx
cmpq -0x50(%rbp), %rcx
cmovel %eax, %r15d
movq -0x48(%rbp), %rax
movslq 0x4(%rax), %rax
shlq $0x5, %rax
addq -0xc8(%rbp), %rax
movl %esi, %ecx
leaq (%rax,%rcx,2), %rcx
testl %r15d, %r15d
movb %dl, -0x31(%rbp)
movq %rcx, -0xa0(%rbp)
jle 0x2303b
movq %r14, -0xd8(%rbp)
movq %r15, -0xd0(%rbp)
movl %r15d, %r14d
xorl %eax, %eax
movw %ax, (%rcx,%rax,2)
incq %rax
cmpq %rax, %r14
jne 0x22f5b
movl $0x0, -0x3c(%rbp)
movq $0x0, -0x58(%rbp)
movl $0xd0, %edx
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0xa210
xorl %r12d, %r12d
leaq -0x58(%rbp), %rcx
movq %rbx, %r8
movq %r14, -0x98(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0xa0(%rbp), %rax
leaq (%rax,%r12,2), %rax
movq %rax, -0x58(%rbp)
xorl %r13d, %r13d
testb $0x1, %r12b
movq -0x78(%rbp), %r14
movq -0x30(%rbp), %r15
je 0x22ff8
xorl %r13d, %r13d
movl %r13d, %eax
shlq $0x4, %rax
movq -0x1a8(%rbp,%rax), %rsi
movl -0x1b0(%rbp,%rax), %edx
movq %r15, %rdi
movq %rbx, %r8
movq %r14, %r9
callq 0x2366d
movq %rbx, %r8
leaq -0x58(%rbp), %rcx
incl %r13d
btl %r13d, %r12d
jb 0x22fc4
movq -0x58(%rbp), %rax
movl %r13d, %edx
shlq $0x4, %rdx
movq %rax, -0x1a8(%rbp,%rdx)
movl -0x3c(%rbp), %eax
movl %eax, -0x1b0(%rbp,%rdx)
incq %r12
movq -0x98(%rbp), %r14
cmpq %r14, %r12
jne 0x22f9a
incl %r13d
movq -0xd8(%rbp), %r14
movq -0xd0(%rbp), %r15
jmp 0x2306a
movl $0x0, -0x3c(%rbp)
movq $0x0, -0x58(%rbp)
movl $0xd0, %edx
leaq -0x1b0(%rbp), %rdi
xorl %esi, %esi
callq 0xa210
movl $0x1, %r13d
leaq -0x58(%rbp), %rcx
movq %rbx, %r8
cmpl $0xc, %r13d
ja 0x230b6
movl %r13d, %r12d
movq %r12, %r13
shlq $0x4, %r13
leaq -0x1a8(%rbp), %rax
addq %rax, %r13
btl %r12d, %r15d
jae 0x230a9
movq (%r13), %rsi
movl -0x8(%r13), %edx
movq -0x30(%rbp), %rdi
movq %rbx, %r8
movq -0x78(%rbp), %r9
callq 0x2366d
movq %rbx, %r8
leaq -0x58(%rbp), %rcx
incq %r12
addq $0x10, %r13
cmpl $0xd, %r12d
jne 0x23084
movl -0x5c(%rbp), %edi
incl %edi
movl -0x3c(%rbp), %eax
movq -0x90(%rbp), %rsi
shlq $0x5, %rsi
movq -0xc8(%rbp), %rdx
movl %edi, -0x5c(%rbp)
movl %edi, 0x1c(%rdx,%rsi)
movl %eax, 0x18(%rdx,%rsi)
movq -0xa0(%rbp), %rax
movq %rax, 0x8(%rdx,%rsi)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rdx,%rsi)
movq -0x70(%rbp), %r12
movq -0x68(%rbp), %r13
movq -0xb0(%rbp), %rax
movb -0x31(%rbp), %dl
testl %eax, %eax
jne 0x2311e
movq -0x90(%rbp), %rsi
leaq 0x1(%rsi), %rdi
cmpq -0x50(%rbp), %rsi
movq %rdi, %rsi
jb 0x22e6f
movq %rax, -0xb0(%rbp)
movq -0x78(%rbp), %rdi
movl %edx, %ebx
callq 0xa620
testb %bl, %bl
jne 0x2313d
movq -0x48(%rbp), %rdi
callq 0xa620
movl -0x38(%rbp), %r14d
movq -0xb0(%rbp), %rcx
movl -0xa4(%rbp), %r15d
testl %ecx, %ecx
je 0x23234
cmpl $0x5, %ecx
je 0x23160
testl %ecx, %ecx
jne 0x2318c
movq %rcx, %rsi
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rcx
testq %rcx, %rcx
je 0x23177
movl 0x58(%r12), %edx
movl %edx, (%rcx)
testq %rax, %rax
je 0x23189
movq 0x30(%r12), %rcx
movq (%rcx), %rcx
movl 0x60(%rcx), %ecx
movl %ecx, (%rax)
movq %rsi, %rcx
cmpl $0x0, -0xa8(%rbp)
je 0x231aa
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r12)
movups %xmm0, 0x58(%r12)
movups %xmm0, 0x48(%r12)
cmpb $0x0, 0x40(%r12)
je 0x231e3
cmpb $0x0, 0x3f(%r12)
jne 0x231d7
movq 0x8(%r12), %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(%r12)
movb %al, 0x43(%r12)
cmpb $0x0, 0x3f(%r12)
jne 0x2320b
movq 0x8(%r12), %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(%r12)
cmpl -0x7c(%rbp), %r14d
cmovel %ecx, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %eax
shll $0x10, %eax
orl %r15d, %eax
andl $0x1fe00, %eax          # imm = 0x1FE00
movl %eax, -0x98(%rbp)
movl 0x58(%r12), %eax
movl %eax, -0x30(%rbp)
movl 0x5c(%r12), %eax
movq %rax, -0xa0(%rbp)
xorl %ecx, %ecx
movl $0x1, %r15d
movq -0x88(%rbp), %rax
movl 0x64(%rax,%r15,4), %eax
cmpl %eax, -0x30(%rbp)
jbe 0x23310
movl %eax, -0x78(%rbp)
leaq 0x3(%r15), %rbx
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r12)
jne 0x232a3
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
testq %r13, %r13
je 0x232c1
cmpl $0x5, %ecx
jne 0x232c1
movq -0xc0(%rbp), %rdi
movq %rcx, %r14
callq *%r13
movq %r14, %rcx
testl %eax, %eax
jne 0x23280
cmpl $0x5, %ecx
je 0x23315
movl $0x5, %r12d
testl %ecx, %ecx
jne 0x23321
cmpq $0x1, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel -0x30(%rbp), %eax
movq -0x88(%rbp), %rcx
movl %eax, 0x64(%rcx,%r15,4)
xorl %r12d, %r12d
movq -0x70(%rbp), %rax
cmpb $0x0, 0x3f(%rax)
jne 0x2330c
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
xorl %ecx, %ecx
jmp 0x23321
xorl %r12d, %r12d
jmp 0x23321
xorl %r12d, %r12d
movl -0x78(%rbp), %eax
movl %eax, -0x30(%rbp)
xorl %r13d, %r13d
testl %r12d, %r12d
jne 0x233c6
incq %r15
cmpq $0x5, %r15
movq -0x70(%rbp), %r12
jne 0x23264
movq -0x88(%rbp), %rax
movl 0x60(%rax), %eax
cmpl -0x30(%rbp), %eax
jae 0x23605
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r12)
jne 0x23374
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %ecx
testq %r13, %r13
je 0x23392
cmpl $0x5, %ecx
jne 0x23392
movq -0xc0(%rbp), %rdi
movq %rcx, %rbx
callq *%r13
movq %rbx, %rcx
testl %eax, %eax
jne 0x2334e
testl %ecx, %ecx
jne 0x23605
movq -0x88(%rbp), %rax
movl 0x60(%rax), %ecx
movl %ecx, -0x78(%rbp)
movl -0x30(%rbp), %ecx
movl %ecx, 0x80(%rax)
movl -0x80(%rbp), %esi
testl %esi, %esi
je 0x233f0
movq 0x10(%r12), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ecx
jmp 0x233f2
cmpl $0x5, %r12d
jne 0x233e3
movq %rcx, %rbx
movq -0x70(%rbp), %r12
movl -0x38(%rbp), %r14d
jmp 0x22dfd
xorl %ebx, %ebx
jmp 0x22dfd
movq -0x70(%rbp), %r12
movl -0x38(%rbp), %r14d
jmp 0x23157
xorl %ecx, %ecx
movq -0x48(%rbp), %r14
movl -0x98(%rbp), %eax
movl %eax, %edx
movq %rdx, -0x50(%rbp)
testl %ecx, %ecx
jne 0x2345b
movq -0xa0(%rbp), %rax
imulq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x8(%r12), %rdi
movq (%rdi), %rax
leaq -0x1b0(%rbp), %rsi
callq *0x30(%rax)
movl %eax, %ecx
testl %eax, %eax
jne 0x23455
movq -0x1b0(%rbp), %rax
cmpq -0x58(%rbp), %rax
jge 0x23455
movq 0x8(%r12), %rdi
movq (%rdi), %rax
leaq -0x58(%rbp), %rdx
movl $0x5, %esi
movq %rcx, %rbx
callq *0x50(%rax)
movq %rbx, %rcx
movl -0x98(%rbp), %eax
leaq 0x8(%r14), %r12
orl $0x18, %eax
movq %rax, -0x90(%rbp)
xorl %r15d, %r15d
movq %r13, -0x68(%rbp)
testl %ecx, %ecx
jne 0x2357f
movslq 0x4(%r14), %rax
testq %rax, %rax
jle 0x234e3
movl (%r14), %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 0x234db
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 0x234d2
cmpl %ebx, %r9d
jae 0x234d6
addl 0x1c(%rsi), %r10d
movl %r10d, %r15d
movl %r9d, %ebx
jmp 0x234d6
incl %edi
movl %edi, (%rsi)
cmpl %ecx, %r9d
jbe 0x234a3
cmpq $0x1, %rdx
jg 0x23489
jmp 0x234e8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, (%r14)
cmpl $-0x1, %ebx
je 0x2357d
xorl %eax, %eax
cmpl -0x78(%rbp), %r15d
jbe 0x23545
cmpl -0x30(%rbp), %r15d
ja 0x23545
movl $0x0, %ecx
cmpl -0xa0(%rbp), %ebx
ja 0x23573
leal -0x1(%r15), %ecx
imulq -0x90(%rbp), %rcx
addq $0x38, %rcx
movq -0x70(%rbp), %r13
movq 0x10(%r13), %rdi
movq (%rdi), %rax
movq 0x10(%rbp), %rsi
movl -0x98(%rbp), %r14d
movl %r14d, %edx
callq *0x10(%rax)
testl %eax, %eax
je 0x23549
movl %eax, %ecx
movb $0x1, %al
jmp 0x2356b
xorl %ecx, %ecx
jmp 0x23573
decl %ebx
imulq -0x50(%rbp), %rbx
movq 0x8(%r13), %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
movq -0x68(%rbp), %r13
movq -0x48(%rbp), %r14
testb %al, %al
je 0x23470
jmp 0x2357f
xorl %ecx, %ecx
testl %ecx, %ecx
movq -0x70(%rbp), %r12
jne 0x235dd
movq 0x30(%r12), %rax
movq (%rax), %rax
xorl %ecx, %ecx
movl -0x30(%rbp), %edx
cmpl 0x10(%rax), %edx
jne 0x235ca
movl 0x5c(%r12), %esi
imulq -0x50(%rbp), %rsi
movq 0x8(%r12), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ecx
cmpl $0x0, -0x80(%rbp)
je 0x235ca
testl %ecx, %ecx
jne 0x235ca
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl -0x80(%rbp), %esi
callq *0x28(%rax)
movl %eax, %ecx
testl %ecx, %ecx
jne 0x235dd
movq -0x88(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, 0x60(%rax)
xorl %ecx, %ecx
cmpb $0x0, 0x3f(%r12)
jne 0x23605
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movq %rcx, %rbx
movl $0x9, %ecx
callq *0x70(%rax)
movq %rbx, %rcx
xorl %eax, %eax
cmpl $0x5, %ecx
cmovel %eax, %ecx
movl -0x38(%rbp), %r14d
jmp 0x22c8b