// File: /workspace/github_c_makefile_star2_O3/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 0xa232c(%rip), %rdi     # 0xab208
leaq 0x7d390(%rip), %rsi     # 0x86273
movq %rsp, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x14dad
testl %eax, %eax
jne 0x901b
leaq 0x7d95b(%rip), %rdi     # 0x8685d
callq 0x8090
movq (%rsp), %rdi
callq 0x10dca
cmpl $0x63, %eax
jle 0x8fed
cmpl $0x64, %eax
jne 0x9009
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x11f3d
movq %rax, 0x10(%rsp)
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x11f13
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
movl $0x2, %esi
callq 0x11f13
movq %rax, %r13
movq (%rsp), %rdi
movl $0x3, %esi
callq 0x11f13
movq %rax, %rbp
movq (%rsp), %rdi
movl $0x4, %esi
callq 0x11f13
movq %rax, %r14
movq (%rsp), %rdi
movl $0x5, %esi
callq 0x11f13
movq %rax, %rbx
movq (%rsp), %rdi
movl $0x6, %esi
callq 0x11f13
movq %rax, %r15
movq (%rsp), %rdi
movl $0x7, %esi
callq 0x11f13
movq %rax, %r12
movq (%rsp), %rdi
movl $0x8, %esi
callq 0x11f13
movq %rax, %r10
leaq 0x7d386(%rip), %rdi     # 0x86349
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 0x8f07
cmpl $0x5, %eax
je 0x8f07
cmpl $0x1, %eax
je 0x9024
cmpl $0x15, %eax
jne 0x902d
leaq 0x7d2f7(%rip), %rbx     # 0x862fe
jmp 0x9034
cmpl $0x65, %eax
jne 0x902d
movq (%rsp), %rdi
callq 0x100a7
xorl %eax, %eax
jmp 0x905d
leaq 0x7da62(%rip), %rbx     # 0x86a84
jmp 0x903d
leaq 0x7d2b0(%rip), %rbx     # 0x862db
jmp 0x9034
leaq 0x7d2ee(%rip), %rbx     # 0x86322
movq (%rsp), %rdi
callq 0x100a7
movq 0x9ffac(%rip), %rax     # 0xa8ff0
movq (%rax), %rdi
leaq 0x7d317(%rip), %rsi     # 0x86365
movq %rbx, %rdx
xorl %eax, %eax
callq 0x81b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq