// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/unqlite/unqlite.c
// Function: unqlitePagerCommit
UNQLITE_PRIVATE int unqlitePagerCommit(Pager *pPager)
{
	int rc;
	/* Commit: Phase One */
	rc = pager_commit_phase1(pPager);
	if( rc != UNQLITE_OK ){
		goto fail;
	}
	/* Commit: Phase Two */
	rc = pager_commit_phase2(pPager);
	if( rc != UNQLITE_OK ){
		goto fail;
	}
	/* Remove stale flags */
	pPager->iFlags &= ~PAGER_CTRL_COMMIT_ERR;
	/* All done */
	return UNQLITE_OK;
fail:
	/* Disable the auto-commit flag */
	pPager->pDb->iFlags |= UNQLITE_FL_DISABLE_AUTO_COMMIT;
	return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
andl $0x0, -0x2c(%rbp)
movq %rdi, %rbx
cmpl $0x3, 0x1f0(%rdi)
jl 0x2b710
cmpl $0x0, 0x1fc(%rbx)
je 0x2b786
cmpl $0x0, 0x1fc(%rbx)
jne 0x2b767
cmpl $0x2, 0x1f0(%rbx)
jb 0x2b767
cmpl $0x0, 0x204(%rbx)
jne 0x2b739
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
pushq $0x1
popq %rdx
callq *0x20(%rdi)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x33bcd
movl $0x1, 0x1f0(%rbx)
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x2b767
callq 0x3415d
andq $0x0, 0x198(%rbx)
andb $-0x2, 0x1f8(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x200(%rbx)
je 0x2b7a8
movq 0x8(%rbx), %rdi
leaq 0x3c584(%rip), %rsi     # 0x67d1e
callq 0x2a542
pushq $-0x4b
popq %r15
jmp 0x2b964
leaq -0x2c(%rbp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x33d76
movl %eax, %r15d
testl %eax, %eax
jne 0x2b964
leaq 0x218(%rbx), %r12
cmpq $0x0, 0x218(%rbx)
je 0x2b875
leaq -0x140(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x27aea
movq (%r12), %rsi
testq %rsi, %rsi
je 0x2b845
movq 0x40(%rsi), %r14
andq $0x0, 0x40(%rsi)
xorl %r15d, %r15d
cmpq $0x1f, %r15
je 0x2b826
movq -0x140(%rbp,%r15,8), %rdi
testq %rdi, %rdi
je 0x2b838
callq 0x575c0
movq %rax, %rsi
andq $0x0, -0x140(%rbp,%r15,8)
incq %r15
jmp 0x2b7fd
movq -0x48(%rbp), %rdi
callq 0x575c0
movq %rax, -0x48(%rbp)
movq %r14, %rsi
jmp 0x2b7ec
movq %rsi, -0x140(%rbp,%r15,8)
movq %r14, %rsi
jmp 0x2b7ec
pushq $0x1
popq %r14
movq -0x140(%rbp), %r13
cmpq $0x20, %r14
je 0x2b86e
movq -0x140(%rbp,%r14,8), %rsi
movq %r13, %rdi
callq 0x575c0
movq %rax, %r13
incq %r14
jmp 0x2b850
andq $0x0, 0x38(%r13)
jmp 0x2b878
xorl %r13d, %r13d
cmpl $0x0, -0x2c(%rbp)
je 0x2b8a0
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x336d2
testl %eax, %eax
je 0x2b8a0
movl %eax, %r15d
movq 0x8(%rbx), %rdi
leaq 0x3c496(%rip), %rsi     # 0x67d31
jmp 0x2b95f
movq %r12, -0x38(%rbp)
testb $0x2, 0x1f8(%rbx)
je 0x2b8ba
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x2
popq %rsi
callq *0x28(%rax)
movq %r13, %r14
testq %r14, %r14
je 0x2b921
movq %r14, %r12
movq 0x40(%r14), %r14
movl 0x20(%r12), %eax
testb $0x8, %al
jne 0x2b8f9
movq 0x30(%rbx), %rdi
movq (%r12), %rsi
movslq 0x208(%rbx), %rdx
movq 0x10(%r12), %rcx
imulq %rdx, %rcx
movq (%rdi), %rax
callq *0x18(%rax)
testl %eax, %eax
jne 0x2b926
movl 0x20(%r12), %eax
andl $-0x6f, %eax
movl %eax, 0x20(%r12)
cmpl $0x0, 0x24(%r12)
jg 0x2b8bd
movq %rbx, %rdi
movq %r12, %rsi
callq 0x33ed0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x33f42
jmp 0x2b8bd
xorl %r15d, %r15d
jmp 0x2b929
movl %eax, %r15d
xorps %xmm0, %xmm0
movq -0x38(%rbp), %rax
movups %xmm0, (%rax)
movups %xmm0, 0x230(%rbx)
andl $0x0, 0x240(%rbx)
testl %r15d, %r15d
je 0x2b974
orb $0x1, 0x1f8(%rbx)
movq %r13, 0x218(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x3c409(%rip), %rsi     # 0x67d68
callq 0x2a542
movq 0x8(%rbx), %rax
orl $0x1, 0x10c(%rax)
jmp 0x2b771
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x2b993
movq 0x30(%rbx), %rdi
movslq 0x208(%rbx), %rax
imulq %rax, %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
pushq $0x3
popq %rsi
callq *0x28(%rax)
andq $0x0, 0x170(%rbx)
andl $0x0, 0x60(%rbx)
jmp 0x2b710