// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movl $0x0, -0x1c(%rbp)
cmpl $0x3, 0x1f0(%rdi)
jl 0x3292d
cmpl $0x0, 0x1fc(%rbx)
je 0x329bb
cmpl $0x0, 0x1fc(%rbx)
jne 0x329a0
cmpl $0x2, 0x1f0(%rbx)
jb 0x329a0
cmpl $0x0, 0x204(%rbx)
jne 0x32958
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movl $0x1, %edx
callq *0x20(%rdi)
cmpl $0x0, 0x1f4(%rbx)
je 0x3297a
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *0x40(%rax)
movl $0x1, 0x1f4(%rbx)
movl $0x1, 0x1f0(%rbx)
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x329a0
callq 0x3c009
movq $0x0, 0x198(%rbx)
andb $-0x2, 0x1f8(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x200(%rbx)
je 0x329dc
movl $0xffffffb5, %r15d      # imm = 0xFFFFFFB5
leaq 0x4536d(%rip), %rsi     # 0x77d3e
movq 0x8(%rbx), %rdi
callq 0x31537
jmp 0x329f4
leaq -0x1c(%rbp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3bbd4
movl %eax, %r15d
testl %eax, %eax
je 0x32a01
movq 0x8(%rbx), %rax
orl $0x1, 0x10c(%rax)
jmp 0x329aa
movq 0x218(%rbx), %r14
testq %r14, %r14
je 0x32ab2
leaq -0x120(%rbp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0xc360
movq %r14, %rax
movq 0x40(%r14), %r14
movq $0x0, 0x40(%rax)
xorl %r15d, %r15d
movq -0x120(%rbp,%r15,8), %rdi
testq %rdi, %rdi
je 0x32a72
movq %rax, %rsi
callq 0x66284
movq $0x0, -0x120(%rbp,%r15,8)
incq %r15
cmpq $0x1f, %r15
jne 0x32a36
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x66284
movq %rax, -0x28(%rbp)
jmp 0x32a7a
movq %rax, -0x120(%rbp,%r15,8)
testq %r14, %r14
jne 0x32a24
movl $0x1, %r15d
movq -0x120(%rbp), %r14
movq -0x120(%rbp,%r15,8), %rsi
movq %r14, %rdi
callq 0x66284
movq %rax, %r14
incq %r15
cmpq $0x20, %r15
jne 0x32a8c
movq $0x0, 0x38(%r14)
jmp 0x32ab5
xorl %r14d, %r14d
cmpl $0x0, -0x1c(%rbp)
je 0x32adb
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3b475
testl %eax, %eax
je 0x32adb
movl %eax, %r15d
leaq 0x4527b(%rip), %rsi     # 0x77d51
jmp 0x329d1
testb $0x2, 0x1f8(%rbx)
je 0x32af3
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x28(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x661e3
testl %eax, %eax
je 0x32b1f
movl %eax, %r15d
orb $0x1, 0x1f8(%rbx)
movq %r14, 0x218(%rbx)
leaq 0x4526e(%rip), %rsi     # 0x77d88
jmp 0x329d1
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x32b3e
movq 0x30(%rbx), %rdi
movslq 0x208(%rbx), %rax
imulq %rax, %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movl $0x3, %esi
callq *0x28(%rax)
movq $0x0, 0x170(%rbx)
movl $0x0, 0x60(%rbx)
jmp 0x3292d