// File: chhylp123[P]hifiasm/Hash_Table.cpp
// Function: append_utg_inexact_overlap_region_alloc(overlap_region_alloc*, overlap_region*, ma_utg_v*, int, void*)
int append_utg_inexact_overlap_region_alloc(overlap_region_alloc* list, overlap_region* tmp, 
                                        ma_utg_v *ua, int add_beg_end, void *km)
{
    if (list->length + 1 > list->size)
    {
        uint64_t sl = list->size;
        list->size = list->length + 1;
        kroundup64(list->size);
        if(!km) {
            REALLOC(list->list, list->size);
        } else {
            KREALLOC(km, list->list, list->size);
        }
        /// need to set new space to be 0
        memset(list->list + sl, 0, sizeof(overlap_region)*(list->size - sl));
    }

    if (list->length!=0 && list->list[list->length - 1].y_id==tmp->y_id)
    {    
        ///if(list->list[list->length - 1].shared_seed >= tmp->shared_seed)
        if((list->list[list->length - 1].shared_seed > tmp->shared_seed)
           ||
           ((list->list[list->length - 1].shared_seed == tmp->shared_seed) && 
           (list->list[list->length - 1].overlapLen <= tmp->overlapLen)))
        {
            return 0;
        }
        else
        {
            list->length--;
        }
    }

    if(tmp->x_pos_s <= tmp->y_pos_s)
    {
        tmp->y_pos_s = tmp->y_pos_s - tmp->x_pos_s;
        tmp->x_pos_s = 0;
    }
    else
    {
        tmp->x_pos_s = tmp->x_pos_s - tmp->y_pos_s;
        tmp->y_pos_s = 0;
    }


    long long x_right_length = ua->a[tmp->x_id].len - tmp->x_pos_e - 1;
    long long y_right_length = ua->a[tmp->y_id].len - tmp->y_pos_e - 1;

    if(x_right_length <= y_right_length)
    {
        tmp->x_pos_e = ua->a[tmp->x_id].len - 1;
        tmp->y_pos_e = tmp->y_pos_e + x_right_length;        
    }
    else
    {
        tmp->x_pos_e = tmp->x_pos_e + y_right_length;
        tmp->y_pos_e = ua->a[tmp->y_id].len - 1;
    }
    
    if (tmp->x_pos_strand == 1)
    {
        list->list[list->length].x_id = tmp->x_id;
        list->list[list->length].x_pos_e = ua->a[tmp->x_id].len - tmp->x_pos_s - 1;
        list->list[list->length].x_pos_s = ua->a[tmp->x_id].len - tmp->x_pos_e - 1;
        list->list[list->length].x_pos_strand = 0;

        list->list[list->length].y_id = tmp->y_id;
        list->list[list->length].y_pos_e = ua->a[tmp->y_id].len - tmp->y_pos_s - 1;
        list->list[list->length].y_pos_s = ua->a[tmp->y_id].len - tmp->y_pos_e - 1;
        list->list[list->length].y_pos_strand = 1;

        resize_fake_cigar(&(list->list[list->length].f_cigar), (tmp->f_cigar.length + 2), km);
        if(add_beg_end == 1)
        {
            add_fake_cigar(&(list->list[list->length].f_cigar), list->list[list->length].x_pos_s, 0, km);
        }
        
        long long distance_gap;
        /****************************may have bugs********************************/
        ///long long pre_distance_gap = 0;
        long long pre_distance_gap = 0xfffffffffffffff;
        /****************************may have bugs********************************/
        long long i = 0;
        for (i = 0; i < (long long)tmp->f_cigar.length; i++)
        {
            distance_gap = get_fake_gap_shift(&(tmp->f_cigar), i);
            if(distance_gap != pre_distance_gap)
            {
                pre_distance_gap = distance_gap;
                add_fake_cigar(&(list->list[list->length].f_cigar), 
                ua->a[tmp->x_id].len - get_fake_gap_pos(&(tmp->f_cigar), i) - 1, 
                pre_distance_gap, km);
            }
        }

        if(add_beg_end == 1 && get_fake_gap_pos(&(list->list[list->length].f_cigar), 
            list->list[list->length].f_cigar.length - 1) != (long long)list->list[list->length].x_pos_e)
        {
            add_fake_cigar(&(list->list[list->length].f_cigar), 
            list->list[list->length].x_pos_e, 
            get_fake_gap_shift(&(list->list[list->length].f_cigar), 
            list->list[list->length].f_cigar.length - 1), km);
        }
    }
    else
    {
        list->list[list->length].x_id = tmp->x_id;
        list->list[list->length].x_pos_e = tmp->x_pos_e;
        list->list[list->length].x_pos_s = tmp->x_pos_s;
        list->list[list->length].x_pos_strand = tmp->x_pos_strand;

        list->list[list->length].y_id = tmp->y_id;
        list->list[list->length].y_pos_e = tmp->y_pos_e;
        list->list[list->length].y_pos_s = tmp->y_pos_s;
        list->list[list->length].y_pos_strand = tmp->y_pos_strand;



        resize_fake_cigar(&(list->list[list->length].f_cigar), (tmp->f_cigar.length + 2), km);
        if(add_beg_end == 1)
        {
            add_fake_cigar(&(list->list[list->length].f_cigar), list->list[list->length].x_pos_s, 0, km);
        }
        
        long long distance_self_pos = tmp->x_pos_e - tmp->x_pos_s;
        long long distance_pos = tmp->y_pos_e - tmp->y_pos_s;
        long long init_distance_gap = distance_pos - distance_self_pos;
        /****************************may have bugs********************************/
        ///long long pre_distance_gap = init_distance_gap;
        long long pre_distance_gap = 0xfffffffffffffff;
        /****************************may have bugs********************************/
        long long distance_gap;
        long long i = 0;
        for (i = tmp->f_cigar.length - 1; i >= 0; i--)
        {
            distance_gap = get_fake_gap_shift(&(tmp->f_cigar), i);
            if(distance_gap != pre_distance_gap)
            {
                pre_distance_gap = distance_gap;

                add_fake_cigar(&(list->list[list->length].f_cigar), 
                get_fake_gap_pos(&(tmp->f_cigar), i), init_distance_gap - pre_distance_gap, km);
            }
        }

        if(add_beg_end == 1 && get_fake_gap_pos(&(list->list[list->length].f_cigar), 
        list->list[list->length].f_cigar.length - 1) != (long long)list->list[list->length].x_pos_e)
        {
            add_fake_cigar(&(list->list[list->length].f_cigar), 
            list->list[list->length].x_pos_e, 
            get_fake_gap_shift(&(list->list[list->length].f_cigar), 
            list->list[list->length].f_cigar.length - 1), km);
        } 
    }

    list->list[list->length].shared_seed = tmp->shared_seed;
    list->list[list->length].align_length = 0;
    list->list[list->length].is_match = 0;
    list->list[list->length].non_homopolymer_errors = 0;
    list->list[list->length].strong = 0;

    list->length++;

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x1, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x20534
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x2, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x4, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x8, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x10, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
shrq $0x20, %rcx
movq -0x10(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x30(%rbp)
jne 0x204e2
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x8(%rax), %rsi
callq 0x2360
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x20508
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x8(%rax), %rdx
callq 0x30e740
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
imulq $0xa8, -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x38(%rbp), %rax
imulq $0xa8, %rax, %rdx
xorl %esi, %esi
callq 0x2100
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x20609
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jne 0x20609
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jg 0x205eb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jne 0x205f7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x20(%rcx), %eax
ja 0x205f7
movl $0x0, -0x4(%rbp)
jmp 0x20f43
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x20609
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
ja 0x2063b
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x2065b
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rcx
subl 0x8(%rcx), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rcx
subl 0x18(%rcx), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jg 0x206fb
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
addq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x20737
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addq -0x48(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
subl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x20b1c
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
subl 0x4(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
subl 0x8(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
subl 0x14(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
subl 0x18(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl $0x1, 0x1c(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %esi
movq -0x30(%rbp), %rdx
callq 0x1f810
cmpl $0x1, -0x24(%rbp)
jne 0x20934
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
movq -0x30(%rbp), %rcx
xorl %edx, %edx
callq 0x1e500
movabsq $0xfffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFFF
movq %rax, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x40(%rcx), %ecx
cmpq %rcx, %rax
jge 0x20a1b
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl %eax, %esi
callq 0x1e340
cltq
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x20a08
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, -0x9c(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x60(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movl -0x9c(%rbp), %esi
movq -0x98(%rbp), %rdi
subl %eax, %esi
subl $0x1, %esi
movq -0x58(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
callq 0x1e500
jmp 0x20a0a
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x20952
cmpl $0x1, -0x24(%rbp)
jne 0x20b17
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x40(%rax), %esi
subl $0x1, %esi
callq 0x1e320
cltq
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0x20b17
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x40(%rax), %esi
subl $0x1, %esi
callq 0x1e340
movq -0xa8(%rbp), %rdi
movl -0xa0(%rbp), %esi
movl %eax, %edx
movq -0x30(%rbp), %rcx
callq 0x1e500
jmp 0x20e9e
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %esi
movq -0x30(%rbp), %rdx
callq 0x1f810
cmpl $0x1, -0x24(%rbp)
jne 0x20c8f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
movq -0x30(%rbp), %rcx
xorl %edx, %edx
callq 0x1e500
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, %eax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, %eax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
subq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movabsq $0xfffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFFF
movq %rax, -0x80(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
jl 0x20da0
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x90(%rbp), %rax
movl %eax, %esi
callq 0x1e340
cltq
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x80(%rbp), %rax
je 0x20d87
movq -0x88(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x90(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movq -0xb0(%rbp), %rdi
movl %eax, %esi
movq -0x78(%rbp), %rax
subq -0x80(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
callq 0x1e500
jmp 0x20d89
movq -0x90(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x20cef
cmpl $0x1, -0x24(%rbp)
jne 0x20e9c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x40(%rax), %esi
subl $0x1, %esi
callq 0x1e320
cltq
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
je 0x20e9c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0xb4(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
imulq $0xa8, 0x10(%rax), %rax
addq %rax, %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl 0x40(%rax), %esi
subl $0x1, %esi
callq 0x1e340
movq -0xc0(%rbp), %rdi
movl -0xb4(%rbp), %esi
movl %eax, %edx
movq -0x30(%rbp), %rcx
callq 0x1e500
jmp 0x20e9e
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
imulq $0xa8, 0x10(%rdx), %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movb $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
movb $0x0, 0x2e(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop