// File: /workspace/github_c_makefile_star2_O0/antirez[P]stonky/stonky.c
// Function: sqlNextRow
int sqlNextRow(sqlRow *row) {
    if (row->stmt == NULL) return 0;

    if (row->col != NULL) {
        if (sqlite3_step(row->stmt) != SQLITE_ROW) {
            sqlEnd(row);
            return 0;
        }
    }

    xfree(row->col);
    row->cols = sqlite3_data_count(row->stmt);
    row->col = xmalloc(row->cols*sizeof(sqlCol));
    for (int j = 0; j < row->cols; j++) {
        row->col[j].type = sqlite3_column_type(row->stmt,j);
        if (row->col[j].type == SQLITE_INTEGER) {
            row->col[j].i = sqlite3_column_int64(row->stmt,j);
        } else if (row->col[j].type == SQLITE_FLOAT) {
            row->col[j].d = sqlite3_column_double(row->stmt,j);
        } else if (row->col[j].type == SQLITE_TEXT) {
            row->col[j].s = (char*)sqlite3_column_text(row->stmt,j);
            row->col[j].i = sqlite3_column_bytes(row->stmt,j);
        } else if (row->col[j].type == SQLITE_BLOB) {
            row->col[j].s = sqlite3_column_blob(row->stmt,j);
            row->col[j].i = sqlite3_column_bytes(row->stmt,j);
        } else {
            /* SQLITE_NULL. */
            row->col[j].s = NULL;
            row->col[j].i = 0;
            row->col[j].d = 0;
        }
    }
    return 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xc5d1
movl $0x0, 0x14(%rsp)
jmp 0xc88b
movq 0x8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0xc608
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2310
cmpl $0x64, %eax
je 0xc606
movq 0x8(%rsp), %rdi
callq 0xc560
movl $0x0, 0x14(%rsp)
jmp 0xc88b
jmp 0xc608
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb3f0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2180
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x8(%rsp), %rax
movslq 0x8(%rax), %rdi
shlq $0x5, %rdi
callq 0xb350
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xc883
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x20c0
movl %eax, %ecx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0xc6db
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x2070
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0xc871
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0xc725
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x21a0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
jmp 0xc86f
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0xc79e
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x21c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x22a0
movslq %eax, %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0xc86d
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x4, (%rax)
jne 0xc814
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x2040
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x4(%rsp), %esi
callq 0x22a0
movslq %eax, %rcx
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0xc86b
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0xc86d
jmp 0xc86f
jmp 0xc871
jmp 0xc873
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xc653
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)