// File: chhylp123[P]hifiasm/gfa_ut.cpp
// Function: ma_integer_ug_print0(ma_ug_t const*, ul_resolve_t*, int, char const*, _IO_FILE*, unsigned int)
void ma_integer_ug_print0(const ma_ug_t *ug, ul_resolve_t *uidx, int print_seq, const char* prefix, FILE *fp, uint32_t is_seq)
{
    uint32_t i, j, l, x; ma_utg_t *p, *s; ul2ul_idx_t *idx = &(uidx->uovl);
    char name[32]; uinfo_srt_warp_t *seq; asgc8_v t; kv_init(t); //uint64_t tot = 0;
    for (i = 0; i < ug->u.n; ++i) { // the Segment lines in GFA
        p = &ug->u.a[i];
        if(p->m == 0) continue;
        if(ug->g && ug->g->seq[i].del) continue;
        sprintf(name, "%s%.6d%c", prefix, i + 1, "lc"[p->circ]);
        if(is_seq) {
            gen_ul_seq(uidx, i, &t);
            fprintf(fp, "S\t%s\t%s\tLN:i:%d\trd:i:%lu\n", name, t.a, p->len, get_ul_occ(uidx, i));
        } else {
            fprintf(fp, "S\t%s\t*\tLN:i:%d\trd:i:%lu\n", name, p->len, get_ul_occ(uidx, i));
        }
        // tot += p->len;
        
        for (j = l = 0; j < p->n; j++) {
            if(p->a[j] != (uint64_t)-1) {
                x = p->a[j]>>33;
                if(ulg_type(uidx->uovl, x)) {//read
                    x = ulg_id(uidx->uovl, x);
                    fprintf(fp, "A\t%s\t%d\t%c\t%.*s\t%d\t%d\tid:i:%d\tHG:A:*\n", name, l, "+-"[p->a[j]>>32&1],
                    (int32_t)uidx->idx->nid.a[x].n, uidx->idx->nid.a[x].a, 0, uidx->idx->a[x].rlen, x);
                } else { ///node
                    x = ulg_id(uidx->uovl, x); s = &(uidx->init_ug->u.a[x]);
                    fprintf(fp, "A\t%s\t%d\t%c\tutg%.6d%c\t%d\t%d\tid:i:%d\tHG:A:*\n", name, l, "+-"[p->a[j]>>32&1],
                    x + 1, "lc"[s->circ], 0, s->len, x);
                }
            }
            else
            {
                fprintf(fp, "A\t%s\t%d\t*\t*\t*\t*\tid:i:*\tHG:A:*\n", name, l);
            }
            l += (uint32_t)p->a[j];
        }

        seq = &(idx->cc.iug_a[i]);
        for (j = 0; j < seq->n; j++) {
            x = seq->a[j].v>>1; s = &(uidx->init_ug->u.a[x]);
            fprintf(fp, "U\t%s\t%c\tutg%.6d%c\t%d\t%d\tHG:A:*\n", 
            name, "+-"[seq->a[j].v&1], x + 1, "lc"[s->circ], seq->a[j].s, seq->a[j].e);
        }
        
    }

    if(ug->g)
    {
        asg_arc_t* au = NULL;
        uint32_t nu, u, v;
        for (i = 0; i < ug->u.n; ++i) {
            if(ug->u.a[i].m == 0) continue;
            if(ug->u.a[i].circ)
            {
                fprintf(fp, "L\t%s%.6dc\t+\t%s%.6dc\t+\t%dM\tL1:i:%d\n", 
                prefix, i+1, prefix, i+1, 0, ug->u.a[i].len);
                fprintf(fp, "L\t%s%.6dc\t-\t%s%.6dc\t-\t%dM\tL1:i:%d\n", 
                prefix, i+1, prefix, i+1, 0, ug->u.a[i].len);
            } 
            u = i<<1;
            au = asg_arc_a(ug->g, u);
            nu = asg_arc_n(ug->g, u);
            for (j = 0; j < nu; j++)
            {
                if(au[j].del) continue;
                v = au[j].v;
                fprintf(fp, "L\t%s%.6d%c\t%c\t%s%.6d%c\t%c\t%dM\tL1:i:%d\tL2:i:%u\n", 
                prefix, (u>>1)+1, "lc"[ug->u.a[u>>1].circ], "+-"[u&1],
                prefix, (v>>1)+1, "lc"[ug->u.a[v>>1].circ], "+-"[v&1], au[j].ol, asg_arc_len(au[j]), au[j].ou);
            }


            u = (i<<1) + 1;
            au = asg_arc_a(ug->g, u);
            nu = asg_arc_n(ug->g, u);
            for (j = 0; j < nu; j++)
            {
                if(au[j].del) continue;
                v = au[j].v;
                fprintf(fp, "L\t%s%.6d%c\t%c\t%s%.6d%c\t%c\t%dM\tL1:i:%d\tL2:i:%u\n", 
                prefix, (u>>1)+1, "lc"[ug->u.a[u>>1].circ], "+-"[u&1],
                prefix, (v>>1)+1, "lc"[ug->u.a[v>>1].circ], "+-"[v&1], au[j].ol, asg_arc_len(au[j]), au[j].ou);
            }
        }
    }
    kv_destroy(t);
    // fprintf(stderr, "[M::%s::] tot::%lu\n", __func__, tot);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movq -0x30(%rbp), %rax
addq $0x1f0, %rax            # imm = 0x1F0
movq %rax, -0x78(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xb0(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x340a4e
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x340564
jmp 0x340a40
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x34058e
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rax
movl -0x50(%rbp), %ecx
movl (%rax,%rcx,8), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x34058e
jmp 0x340a40
leaq -0xa0(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0x50(%rbp), %ecx
addl $0x1, %ecx
movq -0x68(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x44d50(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r8d
leaq 0x46847(%rip), %rsi     # 0x386e06
movb $0x0, %al
callq 0x2050
cmpl $0x0, -0x4c(%rbp)
je 0x34065a
movq -0x30(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
leaq -0xc0(%rbp), %rdx
callq 0x33ff90
movq -0x48(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xd8(%rbp)
movq -0x30(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x37be90
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
movl -0xd8(%rbp), %r8d
movq %rax, %r9
leaq 0x582d0(%rip), %rsi     # 0x398921
movb $0x0, %al
callq 0x22a0
jmp 0x3406b7
movq -0x48(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0xf4(%rbp)
movq -0x30(%rbp), %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x37be90
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rdx
movl -0xf4(%rbp), %ecx
movq %rax, %r8
leaq 0x5828b(%rip), %rsi     # 0x39893b
movb $0x0, %al
callq 0x22a0
movl $0x0, -0x58(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x68(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x34092b
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x54(%rbp), %ecx
cmpq $-0x1, (%rax,%rcx,8)
je 0x3408ec
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x54(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x21, %rax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, %edx
movq -0x30(%rbp), %rax
movq 0x208(%rax), %rsi
movl $0x1, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovael %ecx, %eax
cmpl $0x0, %eax
je 0x34080d
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jb 0x34074e
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
subq 0x208(%rcx), %rax
movq %rax, -0x110(%rbp)
jmp 0x340758
movl -0x5c(%rbp), %eax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movl %eax, -0x5c(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
movl -0x58(%rbp), %ecx
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x54(%rbp), %esi
movq (%rax,%rsi,8), %rsi
shrq $0x20, %rsi
andq $0x1, %rsi
leaq 0x4270d(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r8d
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movl 0x8(%rax), %r9d
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movq (%rax), %r11
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x48(%rax), %rax
movl -0x5c(%rbp), %esi
imulq $0x58, %rsi, %rsi
addq %rsi, %rax
movl 0x18(%rax), %r10d
movl -0x5c(%rbp), %eax
leaq 0x5816a(%rip), %rsi     # 0x398954
xorl %ebx, %ebx
movq %r11, (%rsp)
movl $0x0, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x3408ea
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jb 0x340834
movl -0x5c(%rbp), %eax
movq -0x30(%rbp), %rcx
subq 0x208(%rcx), %rax
movq %rax, -0x118(%rbp)
jmp 0x34083e
movl -0x5c(%rbp), %eax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movl %eax, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
movl -0x58(%rbp), %ecx
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x54(%rbp), %esi
movq (%rax,%rsi,8), %rsi
shrq $0x20, %rsi
andq $0x1, %rsi
leaq 0x4260d(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r8d
movl -0x5c(%rbp), %r9d
addl $0x1, %r9d
movq -0x70(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x44a54(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r11d
movq -0x70(%rbp), %rax
movl (%rax), %r10d
andl $0x7fffffff, %r10d      # imm = 0x7FFFFFFF
movl -0x5c(%rbp), %eax
leaq 0x580ae(%rip), %rsi     # 0x39897a
xorl %ebx, %ebx
movl %r11d, (%rsp)
movl $0x0, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0x22a0
jmp 0x340908
movq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
movl -0x58(%rbp), %ecx
leaq 0x46599(%rip), %rsi     # 0x386e9a
movb $0x0, %al
callq 0x22a0
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x54(%rbp), %ecx
movq (%rax,%rcx,8), %rax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x3406c5
movq -0x78(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0xa8(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x340a3e
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl %eax
movl %eax, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movl -0x5c(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x424d7(%rip), %rax     # 0x382e9b
movsbl (%rax,%rcx), %ecx
movl -0x5c(%rbp), %r8d
addl $0x1, %r8d
movq -0x70(%rbp), %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x4491f(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r9d
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movl 0x4(%rax), %r10d
movq -0xa8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %esi
shlq $0x4, %rsi
addq %rsi, %rax
movl 0x8(%rax), %eax
leaq 0x57f84(%rip), %rsi     # 0x3989a5
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x34094b
jmp 0x340a40
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x34052f
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x340f41
movq $0x0, -0xc8(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x340f3f
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jne 0x340a9c
jmp 0x340f31
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x340b5a
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0x50(%rbp), %ecx
addl $0x1, %ecx
movq -0x40(%rbp), %r8
movl -0x50(%rbp), %r9d
addl $0x1, %r9d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x4c541(%rip), %rsi     # 0x38d037
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0x50(%rbp), %ecx
addl $0x1, %ecx
movq -0x40(%rbp), %r8
movl -0x50(%rbp), %r9d
addl $0x1, %r9d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x50(%rbp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq 0x4c515(%rip), %rsi     # 0x38d05a
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x50(%rbp), %eax
shll %eax
movl %eax, -0xd0(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0xd0(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0xd0(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0xcc(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0xcc(%rbp), %eax
jae 0x340d43
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x340bec
jmp 0x340d35
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xd4(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0xd0(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xd0(%rbp), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x446c1(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r8d
movl -0xd0(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x42240(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r9d
movq -0x40(%rbp), %r12
movl -0xd4(%rbp), %r15d
shrl %r15d
addl $0x1, %r15d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xd4(%rbp), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x44668(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r14d
movl -0xd4(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x421e7(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %ebx
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %rax
movl %eax, %r10d
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
leaq 0x46201(%rip), %rsi     # 0x386f0f
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x340bbc
movl -0x50(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x28(%rcx), %rcx
movl -0xd0(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
shrq $0x20, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x28(%rax), %rax
movl -0xd0(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, -0xcc(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0xcc(%rbp), %eax
jae 0x340f2f
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shrl $0x1f, %eax
cmpl $0x0, %eax
je 0x340dd8
jmp 0x340f21
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xd4(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0xd0(%rbp), %ecx
shrl %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xd0(%rbp), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x444d5(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r8d
movl -0xd0(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x42054(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %r9d
movq -0x40(%rbp), %r12
movl -0xd4(%rbp), %r15d
shrl %r15d
addl $0x1, %r15d
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xd4(%rbp), %esi
shrl %esi
movl %esi, %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rax
movl (%rax), %eax
shrl $0x1f, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x4447c(%rip), %rax     # 0x385303
movsbl (%rax,%rsi), %r14d
movl -0xd4(%rbp), %eax
andl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x41ffb(%rip), %rax     # 0x382e9b
movsbl (%rax,%rsi), %ebx
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movl 0xc(%rax), %r11d
andl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movq (%rax), %rax
movl %eax, %r10d
movq -0xc8(%rbp), %rax
movl -0x54(%rbp), %esi
imulq $0x18, %rsi, %rsi
addq %rsi, %rax
movw 0x10(%rax), %ax
andw $0x3fff, %ax            # imm = 0x3FFF
movzwl %ax, %eax
leaq 0x46015(%rip), %rsi     # 0x386f0f
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x22a0
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x340da8
jmp 0x340f31
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x340a6f
jmp 0x340f41
movq -0xb0(%rbp), %rdi
callq 0x2210
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)