// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: pager_play_back_one_page
static int pager_play_back_one_page(Pager *pPager,sxi64 *pOfft,unsigned char *zTmp)
{
	unsigned char *zData = zTmp;
	sxi64 iOfft; /* Offset to read from */
	pgno iNum;   /* Pager number */
	sxu32 ckSum; /* Sanity check */
	int rc;
	/* Offset to start reading from */
	iOfft = *pOfft;
	/* Database page number */
	rc = ReadInt64(pPager->pjfd,&iNum,iOfft);
	if( rc != UNQLITE_OK ){ return rc; }
	iOfft += 8;
	/* Page data */
	rc = unqliteOsRead(pPager->pjfd,zData,pPager->iPageSize,iOfft);
	if( rc != UNQLITE_OK ){ return rc; }
	iOfft += pPager->iPageSize;
	/* Page cksum */
	rc = ReadInt32(pPager->pjfd,&ckSum,iOfft);
	if( rc != UNQLITE_OK ){ return rc; }
	iOfft += 4;
	/* Synchronize pointers */
	*pOfft = iOfft;
	/* Make sure we are dealing with a valid page */
	if( ckSum != pager_cksum(pPager,zData) ){
		/* Ignore that page */
		return SXERR_IGNORE;
	}
	if( iNum >= pPager->dbSize ){
		/* Ignore that page */
		return UNQLITE_OK;
	}
	/* playback */
	rc = unqliteOsWrite(pPager->pfd,zData,pPager->iPageSize,iNum * pPager->iPageSize);
	if( rc == UNQLITE_OK ){
		/* Flush the cache */
		pager_fill_page(pPager,iNum,zData);
	}
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x69d70
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x69ba0
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x69cbe
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rdx
movq -0x30(%rbp), %rcx
callq 0x69cd0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x69be0
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x69cbe
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq -0x3c(%rbp), %rsi
callq 0x69d10
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
je 0x69c1c
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x69cbe
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x69dd0
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
je 0x69c58
movl $0xffffffc1, -0x4(%rbp) # imm = 0xFFFFFFC1
jmp 0x69cbe
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x69c6f
movl $0x0, -0x4(%rbp)
jmp 0x69cbe
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rdx
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movslq 0x208(%rax), %rax
imulq %rax, %rcx
callq 0x69e30
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jne 0x69cb8
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x69e70
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)