// File: /workspace/github_c_makefile_star2_O1/jkbenaim[P]psfrag/psfrag.c
// Function: dump_frags
int dump_frags()
{
	__label__ out_return, out_finalize;
	int rc = SQLITE_OK;
	char *zErr = NULL;

	sqlite3_stmt *stmt;
	rc = sqlite3_prepare_v2(
		db,
		"select pcode,addr,num,entrypoint,offset_code,offset_relocs,romsize,ramsize,vma from frags order by num;",
		-1,
		&stmt,
		NULL
	);
	if (rc != SQLITE_OK) {
		zErr = "prepare";
		goto out_return;
	}

	printf("pcode,addr,num,entrypoint,offset_code,offset_relocs,romsize,ramsize,vma\n");

	while (SQLITE_DONE != (rc=sqlite3_step(stmt))) switch (rc) {
	case SQLITE_BUSY:
		break;
	case SQLITE_ERROR:
		zErr = "sqlite3_step returned SQLITE_ERROR";
		goto out_finalize;
		break;
	case SQLITE_MISUSE:
		zErr = "sqlite3_step returned SQLITE_MISUSE";
		goto out_finalize;
		break;
	default:
		zErr = "sqlite3_step returned some other error";
		goto out_finalize;
		break;
	case SQLITE_ROW:
		printf("%s,%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 ",%" PRIuLEAST32 "\n",
			sqlite3_column_text(stmt, 0),
			(uint_least32_t)sqlite3_column_int64(stmt, 1),
			(uint_least32_t)sqlite3_column_int64(stmt, 2),
			(uint_least32_t)sqlite3_column_int64(stmt, 3),
			(uint_least32_t)sqlite3_column_int64(stmt, 4),
			(uint_least32_t)sqlite3_column_int64(stmt, 5),
			(uint_least32_t)sqlite3_column_int64(stmt, 6),
			(uint_least32_t)sqlite3_column_int64(stmt, 7),
			(uint_least32_t)sqlite3_column_int64(stmt, 8)
		);
		break;
	}

out_finalize:
	sqlite3_finalize(stmt);
out_return:
	if (zErr) {
		fprintf(stderr, "dump_frags: error: %s\n", zErr);
		return -1;
	} else
		return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0xa3385(%rip), %rdi     # 0xac208
leaq 0x7e3e9(%rip), %rsi     # 0x87273
movq %rsp, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x14ef3
testl %eax, %eax
je 0x8eaa
leaq 0x7ebdf(%rip), %rbx     # 0x87a84
jmp 0x8fda
leaq 0x7e9ac(%rip), %rdi     # 0x8785d
callq 0x8090
movq (%rsp), %rdi
callq 0x10e17
cmpl $0x14, %eax
jle 0x8f9c
cmpl $0x64, %eax
jne 0x8fb3
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x11ffe
movq %rax, 0x10(%rsp)
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x11fd4
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
movl $0x2, %esi
callq 0x11fd4
movq %rax, %r13
movq (%rsp), %rdi
movl $0x3, %esi
callq 0x11fd4
movq %rax, %rbp
movq (%rsp), %rdi
movl $0x4, %esi
callq 0x11fd4
movq %rax, %r14
movq (%rsp), %rdi
movl $0x5, %esi
callq 0x11fd4
movq %rax, %rbx
movq (%rsp), %rdi
movl $0x6, %esi
callq 0x11fd4
movq %rax, %r15
movq (%rsp), %rdi
movl $0x7, %esi
callq 0x11fd4
movq %rax, %r12
movq (%rsp), %rdi
movl $0x8, %esi
callq 0x11fd4
movq %rax, %r10
leaq 0x7e3d7(%rip), %rdi     # 0x87349
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r14d, %r9d
xorl %eax, %eax
pushq %r10
pushq %r12
pushq %r15
pushq %rbx
callq 0x80e0
addq $0x20, %rsp
jmp 0x8eb6
cmpl $0x5, %eax
je 0x8eb6
cmpl $0x1, %eax
jne 0x8fca
leaq 0x7e32a(%rip), %rbx     # 0x872db
jmp 0x8fd1
cmpl $0x15, %eax
je 0x8fc1
cmpl $0x65, %eax
jne 0x8fca
xorl %ebx, %ebx
jmp 0x8fd1
leaq 0x7e336(%rip), %rbx     # 0x872fe
jmp 0x8fd1
leaq 0x7e351(%rip), %rbx     # 0x87322
movq (%rsp), %rdi
callq 0x100e6
testq %rbx, %rbx
movl $0x0, %eax
jne 0x8ff3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa0ff6(%rip), %rax     # 0xa9ff0
movq (%rax), %rdi
leaq 0x7e361(%rip), %rsi     # 0x87365
movq %rbx, %rdx
xorl %eax, %eax
callq 0x81b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x8fe4