// File: /workspace/github_c_makefile_star2_O1/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)
xorl %r14d, %r14d
cmpl $0x3, 0x1f0(%rdi)
jl 0x33121
cmpl $0x0, 0x1fc(%rbx)
jne 0x33121
cmpl $0x0, 0x200(%rbx)
je 0x32f90
movq 0x8(%rbx), %rdi
leaq 0x46db3(%rip), %rsi     # 0x79d33
callq 0x31af5
movl $0xffffffb5, %r14d      # imm = 0xFFFFFFB5
jmp 0x33121
leaq -0x1c(%rbp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3c54f
movl %eax, %r14d
testl %eax, %eax
jne 0x33121
movq 0x218(%rbx), %r14
testq %r14, %r14
je 0x3306a
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 0x3300f
movq %rax, %rsi
callq 0x67e35
movq $0x0, -0x120(%rbp,%r15,8)
incq %r15
cmpq $0x1f, %r15
jne 0x32fe1
movb $0x1, %cl
jmp 0x3301e
movq %rax, -0x120(%rbp,%r15,8)
cmpq $0x1f, %r15
sete %cl
testb %cl, %cl
je 0x33032
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x67e35
movq %rax, -0x28(%rbp)
testq %r14, %r14
jne 0x32fcf
movl $0x1, %r14d
movq -0x120(%rbp), %r15
movq -0x120(%rbp,%r14,8), %rsi
movq %r15, %rdi
callq 0x67e35
movq %rax, %r15
incq %r14
cmpq $0x20, %r14
jne 0x33044
movq $0x0, 0x38(%r15)
jmp 0x3306d
xorl %r15d, %r15d
cmpl $0x0, -0x1c(%rbp)
je 0x33094
movq %rbx, %rdi
movl $0x4, %esi
callq 0x3bdf4
testl %eax, %eax
je 0x33094
movl %eax, %r14d
movq 0x8(%rbx), %rdi
leaq 0x46cb4(%rip), %rsi     # 0x79d46
jmp 0x330d7
testb $0x2, 0x1f8(%rbx)
je 0x330ac
movq 0x30(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x28(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67d9b
testl %eax, %eax
je 0x330de
movl %eax, %r14d
orb $0x1, 0x1f8(%rbx)
movq %r15, 0x218(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x46ca6(%rip), %rsi     # 0x79d7d
callq 0x31af5
jmp 0x33121
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x330fd
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)
xorl %r14d, %r14d
testl %r14d, %r14d
je 0x33133
movq 0x8(%rbx), %rax
orl $0x1, 0x10c(%rax)
jmp 0x331b0
cmpl $0x0, 0x1fc(%rbx)
jne 0x331a6
cmpl $0x2, 0x1f0(%rbx)
jb 0x331a6
cmpl $0x0, 0x204(%rbx)
jne 0x3315e
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movl $0x1, %edx
callq *0x20(%rdi)
cmpl $0x0, 0x1f4(%rbx)
je 0x33180
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 0x331a6
callq 0x3c994
movq $0x0, 0x198(%rbx)
andb $-0x2, 0x1f8(%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq