// File: /workspace/github_c_makefile_star2_O3/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 $0x178, %rsp            # imm = 0x178
movl $0x0, -0x9c(%rbp)
movl $0x8, %eax
cmpb $0x0, 0x42(%rdi)
jne 0x23161
movl %r9d, %ebx
movl %r8d, %r13d
movq %rcx, %r15
movl %esi, %r12d
movq %rdi, %r14
cmpb $0x0, 0x3f(%rdi)
movq %rdx, -0x80(%rbp)
je 0x229f7
movb $0x1, 0x41(%r14)
testl %r12d, %r12d
movq %r15, -0x78(%rbp)
movl %r13d, -0x88(%rbp)
je 0x22a3c
cmpb $0x0, 0x3f(%r14)
jne 0x22a29
movq 0x8(%r14), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %r13d
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x22a1a
cmpl $0x5, %r13d
jne 0x22a1a
movq %r15, %rdi
callq *%rax
testl %eax, %eax
jne 0x229bd
jmp 0x22a34
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x1, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
testl %eax, %eax
jne 0x23161
jmp 0x229a8
cmpl $0x5, %r13d
je 0x22a34
testl %r13d, %r13d
jne 0x22c25
movb $0x1, 0x40(%r14)
movl %r12d, -0x2c(%rbp)
jmp 0x22a43
movq $0x0, -0x80(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x9c(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x20ead
movl %eax, %r13d
cmpl $0x0, (%r15)
je 0x22a74
movq 0x8(%r14), %rdi
movq (%rdi), %rax
cmpl $0x3, (%rax)
jl 0x22a74
xorl %esi, %esi
xorl %edx, %edx
callq *0x90(%rax)
testl %r13d, %r13d
jne 0x230dd
movl 0x58(%r14), %edx
movzwl 0x56(%r14), %eax
movl %eax, %r15d
shll $0x10, %r15d
orl %eax, %r15d
andl $0x1fe00, %r15d         # imm = 0x1FE00
testl %edx, %edx
je 0x22aca
cmpl %ebx, %r15d
je 0x22aca
leaq 0x58a41(%rip), %rsi     # 0x7b4e8
leaq 0x586df(%rip), %rcx     # 0x7b18d
movl $0xb, %r13d
movl $0xb, %edi
movl $0xd2b4, %edx           # imm = 0xD2B4
xorl %eax, %eax
callq 0xa4c0
jmp 0x230dd
movq 0x30(%r14), %rax
movq (%rax), %rcx
movl 0x60(%rcx), %eax
cmpl %edx, %eax
jae 0x22b85
movq %rdx, -0x90(%rbp)
movq %rcx, -0x50(%rbp)
callq 0xa080
movl $0x7, %r13d
testl %eax, %eax
jne 0x230dd
movl %r15d, -0x84(%rbp)
movq -0x90(%rbp), %rcx
leal 0x1000(%rcx), %eax
movabsq $0xffffffff021, %rbx    # imm = 0xFFFFFFFF021
addq %rax, %rbx
shrq $0xc, %rbx
movl %ebx, %eax
shll $0x5, %eax
leal (%rax,%rcx,2), %eax
addl $0x28, %eax
movslq %eax, %rdi
movq %rdi, -0x38(%rbp)
callq 0xc0e2
testq %rax, %rax
je 0x230dd
movq %rax, %r15
movq %r14, -0x40(%rbp)
leal 0x1(%rbx), %r14d
movq %rbx, %r13
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
movq -0x38(%rbp), %rdx
callq 0xa220
movl %r14d, 0x4(%r15)
callq 0xa080
testl %eax, %eax
je 0x22c2e
movl $0x7, %r13d
movq -0x40(%rbp), %r14
movq %rbx, %rdi
callq 0xa630
jmp 0x230a6
xorl %r15d, %r15d
xorl %r13d, %r13d
movq -0x78(%rbp), %rbx
cmpl $0x0, -0x2c(%rbp)
je 0x230a6
testl %r13d, %r13d
jne 0x230a6
movl 0x60(%rcx), %eax
movl $0x5, %r13d
cmpl 0x58(%r14), %eax
jb 0x230a6
xorl %r13d, %r13d
cmpl $0x2, -0x2c(%rbp)
jl 0x230a6
leaq -0x1a0(%rbp), %rsi
movl $0x4, %edi
callq 0xa370
cmpb $0x0, 0x3f(%r14)
jne 0x23044
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %r13d
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x2303f
cmpl $0x5, %r13d
jne 0x2303f
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0x22bd3
movl $0x5, %r13d
jmp 0x230a6
movl %r12d, -0x2c(%rbp)
jmp 0x22a74
movq %r13, -0x70(%rbp)
movl %r12d, -0x44(%rbp)
movl $0x1000, %edi           # imm = 0x1000
movq -0x90(%rbp), %rax
cmpl %edi, %eax
cmovbl %eax, %edi
addl %edi, %edi
callq 0xc0e2
movq %rax, %rbx
testq %rax, %rax
movq %r15, -0x58(%rbp)
je 0x22ed6
cmpl $0x0, -0x70(%rbp)
js 0x22ed6
movq %rbx, -0x38(%rbp)
leaq 0x8(%r15), %rax
movq %rax, -0xb8(%rbp)
movq -0x70(%rbp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, -0x70(%rbp)
leaq -0x64(%rbp), %rdi
xorl %esi, %esi
movq -0x40(%rbp), %r14
movq %rdi, %rbx
movq %r14, %rdi
leaq -0x1a0(%rbp), %rdx
movq %rsi, %r12
callq 0x2103b
testl %eax, %eax
jne 0x2308c
movl %r12d, %edx
shll $0xc, %edx
addl $-0x22, %edx
testq %r12, %r12
movl $0x0, %eax
movl $0x88, %ecx
cmoveq %rcx, %rax
movl $0x0, %ecx
cmovel %ecx, %edx
movq -0x1a0(%rbp), %r13
addq %rax, %r13
movl $0x4000, %ecx           # imm = 0x4000
subl %eax, %ecx
shrl $0x2, %ecx
movq -0x90(%rbp), %rax
movl %eax, %esi
subl %edx, %esi
movq %r12, -0xc8(%rbp)
cmpq -0x70(%rbp), %r12
cmovnel %ecx, %esi
movslq 0x4(%r15), %rax
shlq $0x5, %rax
addq -0xb8(%rbp), %rax
movq %rdx, -0xc0(%rbp)
leaq (%rax,%rdx,2), %r12
testl %esi, %esi
movl %esi, -0x98(%rbp)
jle 0x22e01
movl %esi, %ecx
xorl %eax, %eax
movw %ax, (%r12,%rax,2)
incq %rax
cmpq %rax, %rcx
jne 0x22d26
movl $0xd0, %edx
leaq -0x1a0(%rbp), %rdi
xorl %esi, %esi
movq %rcx, -0xa8(%rbp)
callq 0xa220
movq -0xa8(%rbp), %r8
xorl %r14d, %r14d
leaq -0x60(%rbp), %rcx
movq %rbx, %rdi
movq %r12, -0xb0(%rbp)
movl $0x1, -0x64(%rbp)
leaq (%r12,%r14,2), %rsi
movq %rsi, -0x60(%rbp)
xorl %r15d, %r15d
testb $0x1, %r14b
jne 0x22d84
movl $0x1, %eax
jmp 0x22dd1
movq -0x38(%rbp), %r12
movl %r15d, %eax
shlq $0x4, %rax
movq -0x198(%rbp,%rax), %rsi
movl -0x1a0(%rbp,%rax), %edx
movq %r13, %rdi
movq %rbx, %r8
movq %r12, %r9
callq 0x23472
leaq -0x60(%rbp), %rcx
incl %r15d
btl %r15d, %r14d
jb 0x22d88
movq %rbx, %rdi
movq -0x60(%rbp), %rsi
movl -0x64(%rbp), %eax
movq -0xb0(%rbp), %r12
movq -0xa8(%rbp), %r8
movl %r15d, %edx
shlq $0x4, %rdx
movq %rsi, -0x198(%rbp,%rdx)
movl %eax, -0x1a0(%rbp,%rdx)
incq %r14
cmpq %r8, %r14
jne 0x22d65
incl %r15d
cmpl $0xc, %r15d
jbe 0x22e30
jmp 0x22e83
movl $0x0, -0x64(%rbp)
movq $0x0, -0x60(%rbp)
movl $0xd0, %edx
leaq -0x1a0(%rbp), %rdi
xorl %esi, %esi
callq 0xa220
movl $0x1, %r15d
leaq -0x60(%rbp), %rcx
movq %rbx, %rdi
movl %r15d, %r14d
movq %r14, %r15
shlq $0x4, %r15
leaq -0x198(%rbp), %rax
addq %rax, %r15
movl -0x98(%rbp), %eax
btl %r14d, %eax
jae 0x22e73
movq (%r15), %rsi
movl -0x8(%r15), %edx
movq %r13, %rdi
movq %rbx, %r8
movq -0x38(%rbp), %r9
callq 0x23472
movl -0x98(%rbp), %eax
movq %rbx, %rdi
leaq -0x60(%rbp), %rcx
incq %r14
addq $0x10, %r15
cmpl $0xd, %r14d
jne 0x22e4a
movl -0x64(%rbp), %eax
movq -0xc0(%rbp), %r8
incl %r8d
movq -0xc8(%rbp), %rcx
movq %rcx, %rsi
shlq $0x5, %rsi
movq -0xb8(%rbp), %rdx
movl %r8d, 0x1c(%rdx,%rsi)
movl %eax, 0x18(%rdx,%rsi)
movq %r12, 0x8(%rdx,%rsi)
movq %r13, 0x10(%rdx,%rsi)
leaq 0x1(%rcx), %rsi
cmpq -0x70(%rbp), %rcx
movq -0x40(%rbp), %r14
movq -0x58(%rbp), %r15
jne 0x22c8e
movq -0x38(%rbp), %rdi
callq 0xa630
jmp 0x22eeb
movq %rbx, %rdi
callq 0xa630
testq %rbx, %rbx
movq -0x40(%rbp), %r14
je 0x2309c
movl 0x58(%r14), %edx
movl 0x5c(%r14), %eax
movq %rax, -0x98(%rbp)
xorl %r13d, %r13d
movl $0x1, %r15d
movq -0x80(%rbp), %r12
movq -0x50(%rbp), %rcx
movl 0x64(%rcx,%r15,4), %r14d
cmpl %r14d, %edx
jbe 0x22f5d
movl %edx, -0x38(%rbp)
leal 0x3(%r15), %ebx
movq -0x40(%rbp), %rcx
cmpb $0x0, 0x3f(%rcx)
jne 0x22f76
movq 0x8(%rcx), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %r13d
testq %r12, %r12
je 0x22f63
cmpl $0x5, %r13d
jne 0x22f63
movq -0x78(%rbp), %rdi
callq *%r12
testl %eax, %eax
jne 0x22f1c
movl $0x5, %r13d
jmp 0x22fb7
movq -0x40(%rbp), %r14
jmp 0x22fc5
cmpl $0x5, %r13d
je 0x22fb7
testl %r13d, %r13d
movq -0x40(%rbp), %rcx
jne 0x2321a
cmpq $0x1, %r15
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel -0x38(%rbp), %eax
movq -0x50(%rbp), %rdx
movl %eax, 0x64(%rdx,%r15,4)
xorl %r13d, %r13d
cmpb $0x0, 0x3f(%rcx)
movq %rcx, %r14
jne 0x22fae
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
movq -0x50(%rbp), %rcx
movl -0x38(%rbp), %edx
jmp 0x22fc5
movl %r14d, %edx
xorl %r12d, %r12d
movq -0x40(%rbp), %r14
movq -0x50(%rbp), %rcx
incq %r15
cmpq $0x5, %r15
jne 0x22f0b
movq %r12, -0x80(%rbp)
movl 0x60(%rcx), %eax
movl %edx, -0x38(%rbp)
cmpl %edx, %eax
movq -0x78(%rbp), %rbx
movq -0x58(%rbp), %r15
jae 0x23207
cmpb $0x0, 0x3f(%r14)
jne 0x23180
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movl $0xa, %ecx
callq *0x70(%rax)
movl %eax, %r13d
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x23173
cmpl $0x5, %r13d
jne 0x23173
movq %rbx, %rdi
callq *%rax
xorl %r13d, %r13d
testl %eax, %eax
movq -0x50(%rbp), %rcx
jne 0x22fec
jmp 0x23211
testl %r13d, %r13d
jne 0x230a6
xorl %r13d, %r13d
cmpl $0x3, -0x2c(%rbp)
jne 0x2306a
movl -0x1a0(%rbp), %esi
movq %r14, %rdi
callq 0x20ab8
movq 0x10(%r14), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x20(%rax)
movl %eax, %r13d
cmpb $0x0, 0x3f(%r14)
jne 0x230a6
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movl $0x4, %edx
movl $0x9, %ecx
callq *0x70(%rax)
jmp 0x230a6
movl %eax, %r13d
movl -0x44(%rbp), %r12d
movq -0x38(%rbp), %rbx
jmp 0x22b78
movl $0x7, %r13d
movl -0x44(%rbp), %r12d
movq %r15, %rdi
callq 0xa630
cmpl $0x5, %r13d
je 0x230b9
testl %r13d, %r13d
jne 0x230dd
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rcx
testq %rcx, %rcx
je 0x230cc
movl 0x58(%r14), %edx
movl %edx, (%rcx)
testq %rax, %rax
je 0x230dd
movq 0x30(%r14), %rcx
movq (%rcx), %rcx
movl 0x60(%rcx), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x9c(%rbp)
je 0x230f8
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%r14)
movups %xmm0, 0x58(%r14)
movups %xmm0, 0x48(%r14)
cmpb $0x0, 0x40(%r14)
movb 0x3f(%r14), %al
je 0x2312b
testb %al, %al
jne 0x23121
movq 0x8(%r14), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
movb 0x3f(%r14), %al
xorl %ecx, %ecx
movb %cl, 0x40(%r14)
movb %cl, 0x43(%r14)
testb %al, %al
jne 0x23148
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x1, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
testl %r13d, %r13d
movl $0x5, %eax
cmovnel %r13d, %eax
movb $0x0, 0x41(%r14)
cmpl %r12d, -0x2c(%rbp)
cmovel %r13d, %eax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
movq -0x50(%rbp), %rcx
jne 0x23207
movl 0x60(%rcx), %eax
movl %eax, -0xa8(%rbp)
movl -0x38(%rbp), %eax
movl %eax, 0x80(%rcx)
movl -0x88(%rbp), %r12d
testl %r12d, %r12d
je 0x231af
movq 0x10(%r14), %rdi
movq (%rdi), %rax
movl %r12d, %esi
callq *0x28(%rax)
testl %eax, %eax
jne 0x231e0
movl -0x84(%rbp), %ecx
movq -0x98(%rbp), %rax
movq %rcx, -0x90(%rbp)
imulq %rcx, %rax
movq %rax, -0x60(%rbp)
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq -0x1a0(%rbp), %rsi
callq *0x30(%rax)
testl %eax, %eax
je 0x2322a
movl %eax, %r13d
cmpb $0x0, 0x3f(%r14)
jne 0x23203
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movl $0x3, %esi
movl $0x1, %edx
movl $0x9, %ecx
callq *0x70(%rax)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpl $0x5, %r13d
cmovel %eax, %r13d
movl -0x44(%rbp), %r12d
jmp 0x22b8f
movl -0x44(%rbp), %r12d
movq %rcx, %r14
movq -0x58(%rbp), %r15
jmp 0x230a6
movq -0x1a0(%rbp), %rax
cmpq -0x60(%rbp), %rax
jge 0x2324a
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq -0x60(%rbp), %rdx
movl $0x5, %esi
callq *0x50(%rax)
movl 0x4(%r15), %ecx
testl %ecx, %ecx
jle 0x23381
movq %r15, %rbx
addq $0x8, %rbx
movl -0x84(%rbp), %eax
orl $0x18, %eax
movq %rax, -0x70(%rbp)
xorl %r12d, %r12d
movl (%r15), %eax
movl %ecx, %ecx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %rcx, %rdx
decq %rcx
movq %rcx, %rsi
shlq $0x5, %rsi
movl 0x18(%rbx,%rsi), %edi
movslq (%rbx,%rsi), %r8
cmpl %edi, %r8d
jge 0x232db
addq %rbx, %rsi
movq 0x10(%rsi), %r9
negl %edi
leal 0x1(%r8), %r10d
addq %r8, %r8
addq 0x8(%rsi), %r8
movzwl (%r8), %r11d
movl (%r9,%r11,4), %r14d
cmpl %eax, %r14d
ja 0x232cc
movl %r10d, (%rsi)
leal (%rdi,%r10), %r11d
incl %r11d
incl %r10d
addq $0x2, %r8
cmpl $0x1, %r11d
jne 0x232a6
jmp 0x232db
cmpl %r15d, %r14d
jae 0x232db
addl 0x1c(%rsi), %r11d
movl %r11d, %r12d
movl %r14d, %r15d
cmpq $0x1, %rdx
jg 0x23278
movq -0x58(%rbp), %rax
movl %r15d, (%rax)
cmpl $-0x1, %r15d
je 0x23388
cmpl -0xa8(%rbp), %r12d
movq -0x40(%rbp), %r14
jbe 0x23371
cmpl -0x38(%rbp), %r12d
ja 0x23371
cmpl -0x98(%rbp), %r15d
ja 0x23371
movq %r12, -0xb0(%rbp)
leal -0x1(%r12), %ecx
imulq -0x70(%rbp), %rcx
addq $0x38, %rcx
movq 0x10(%r14), %rdi
movq (%rdi), %rax
movq 0x10(%rbp), %rsi
movl -0x84(%rbp), %r12d
movl %r12d, %edx
callq *0x10(%rax)
testl %eax, %eax
jne 0x2340b
decl %r15d
imulq -0x90(%rbp), %r15
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x10(%rbp), %rsi
movl %r12d, %edx
movq %r15, %rcx
callq *0x18(%rax)
testl %eax, %eax
movq -0xb0(%rbp), %r12
jne 0x2340b
movq -0x58(%rbp), %r15
movl 0x4(%r15), %ecx
testl %ecx, %ecx
jg 0x2326d
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movq -0x40(%rbp), %r14
movq 0x30(%r14), %rax
movq (%rax), %rax
movl -0x38(%rbp), %ecx
cmpl 0x10(%rax), %ecx
movq -0x78(%rbp), %rbx
movq -0x58(%rbp), %r15
jne 0x233f9
movl 0x5c(%r14), %eax
movq -0x90(%rbp), %rsi
imulq %rax, %rsi
movq 0x8(%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %r13d
cmpl $0x0, -0x88(%rbp)
je 0x233e4
testl %r13d, %r13d
jne 0x233e4
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
movl -0x88(%rbp), %esi
callq *0x28(%rax)
movl %eax, %r13d
testl %r13d, %r13d
movq -0x40(%rbp), %r14
movq -0x78(%rbp), %rbx
movq -0x58(%rbp), %r15
jne 0x231e3
movq -0x50(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, 0x60(%rax)
xorl %r13d, %r13d
jmp 0x231e3
movl %eax, %r13d
movq -0x78(%rbp), %rbx
movq -0x58(%rbp), %r15
jmp 0x231e3