// File: Infinidat[P]slimfastq/usrs.cpp
// Function: UsrLoad::decode()
int UsrLoad::decode() {

    size_t n_recs = conf.get_long("num_records");

    rarely_if( ! n_recs and not m_last.i_long)
        croak("Zero records, what's going on?");

    comp_version = conf.decoder_version;

    RecLoad rec;
    GenLoad gen;
    QltLoad qlt;

    UCHAR* b_qlt = m_qlt+1 ;
    UCHAR* b_gen = m_gen+1 ;

    while (1) {
        g_record_count++;
        update();
        if (g_record_count > n_recs)
            break;

        UCHAR* b_rec = (flip ? m_rep : m_rec)+1 ;
        UCHAR* p_rec = (flip ? m_rec : m_rep)+1 ;

        m_rec_size = rec.load(b_rec, p_rec);
        rarely_if (not m_rec_size)
            croak("premature EOF - %llu records left", n_recs+1);

        qlt.load(b_qlt, m_qlen);
        gen.load(b_gen, b_qlt, m_llen, m_qlen);
        save();
    }
    // sanity: verify all objects are done (by croak?)
    return 0;
}

// Assembly:
subq $0xc8a98, %rsp          # imm = 0xC8A98
movq %rdi, 0xc8a90(%rsp)
movq 0xc8a90(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x953d(%rip), %rdi      # 0x183e0
leaq 0x2659(%rip), %rsi      # 0x11503
xorl %eax, %eax
movl %eax, %edx
callq 0x3b40
movq %rax, 0xc8a88(%rsp)
xorl %eax, %eax
cmpq $0x0, 0xc8a88(%rsp)
movb %al, 0x2f(%rsp)
jne 0xeedf
movq 0x20(%rsp), %rax
cmpq $0x0, 0x20(%rax)
setne %al
xorb $-0x1, %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0xeee9
jmp 0xeef7
leaq 0x2639(%rip), %rdi      # 0x11529
movb $0x0, %al
callq 0x3450
movq 0x20(%rsp), %rax
leaq 0x94dd(%rip), %rcx      # 0x183e0
movslq 0x8(%rcx), %rcx
movq %rcx, 0x58(%rax)
leaq 0x410(%rsp), %rdi
callq 0xa820
leaq 0x3a8(%rsp), %rdi
callq 0x82a0
jmp 0xef27
leaq 0x50(%rsp), %rdi
callq 0x96c0
jmp 0xef33
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x4063, %rcx           # imm = 0x4063
addq $0x1, %rcx
movq %rcx, 0x48(%rsp)
addq $0x14065, %rax          # imm = 0x14065
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0xef5c
movq 0x20(%rsp), %rdi
leaq 0x72f8(%rip), %rax      # 0x16260
movq (%rax), %rcx
incq %rcx
movq %rcx, (%rax)
callq 0xe9f0
jmp 0xef78
leaq 0x72e1(%rip), %rax      # 0x16260
movq (%rax), %rax
cmpq 0xc8a88(%rsp), %rax
jbe 0xefe6
jmp 0xf0fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3a0(%rsp)
movl %eax, 0x39c(%rsp)
jmp 0xf138
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3a0(%rsp)
movl %eax, 0x39c(%rsp)
jmp 0xf12b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3a0(%rsp)
movl %eax, 0x39c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x9830
jmp 0xf12b
movq 0x20(%rsp), %rax
testb $0x1, 0x60(%rax)
je 0xf001
movq 0x20(%rsp), %rax
addq $0x61, %rax
movq %rax, 0x18(%rsp)
jmp 0xf011
movq 0x20(%rsp), %rax
addq $0x2062, %rax           # imm = 0x2062
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rsp)
testb $0x1, 0x60(%rax)
je 0xf03c
movq 0x20(%rsp), %rax
addq $0x2062, %rax           # imm = 0x2062
movq %rax, 0x10(%rsp)
jmp 0xf04a
movq 0x20(%rsp), %rax
addq $0x61, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
incq %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x410(%rsp), %rdi
callq 0xb9b0
movq %rax, 0x8(%rsp)
jmp 0xf075
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movl %ecx, 0x54(%rax)
cmpl $0x0, 0x54(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xf091
jmp 0xf0ac
movq 0xc8a88(%rsp), %rsi
incq %rsi
leaq 0x24a5(%rip), %rdi      # 0x11548
xorl %eax, %eax
callq 0x3450
jmp 0xf0ac
movq 0x20(%rsp), %rax
movq 0x48(%rsp), %rsi
movq 0x48(%rax), %rdx
leaq 0x50(%rsp), %rdi
callq 0xf440
jmp 0xf0c6
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x38(%rax), %rcx
movq 0x48(%rax), %r8
leaq 0x3a8(%rsp), %rdi
callq 0xf4f0
jmp 0xf0ec
movq 0x20(%rsp), %rdi
callq 0xed10
jmp 0xf0f8
jmp 0xef5a
leaq 0x50(%rsp), %rdi
callq 0x9830
leaq 0x3a8(%rsp), %rdi
callq 0x8610
leaq 0x410(%rsp), %rdi
callq 0xa9a0
xorl %eax, %eax
addq $0xc8a98, %rsp          # imm = 0xC8A98
retq
leaq 0x3a8(%rsp), %rdi
callq 0x8610
leaq 0x410(%rsp), %rdi
callq 0xa9a0
movq 0x3a0(%rsp), %rdi
callq 0x23f0
nopw %cs:(%rax,%rax)
nopl (%rax)