// File: chhylp123[P]hifiasm/Hash_Table.cpp
// Function: append_inexact_overlap_region_alloc(overlap_region_alloc*, overlap_region*, long long, long long, int, void*)
int append_inexact_overlap_region_alloc(overlap_region_alloc* list, overlap_region* tmp, 
                                        long long xLen, long long yLen, 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 = xLen - tmp->x_pos_e - 1;
    long long y_right_length = yLen - tmp->y_pos_e - 1;

    if(x_right_length <= y_right_length)
    {
        tmp->x_pos_e = xLen - 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 = yLen - 1;
    }
    
    if (tmp->x_pos_strand == 1)
    {
        list->list[list->length].x_id = tmp->x_id;
        list->list[list->length].x_pos_e = xLen - tmp->x_pos_s - 1;
        list->list[list->length].x_pos_s = xLen - 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 = yLen - tmp->y_pos_s - 1;
        list->list[list->length].y_pos_s = yLen - 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), xLen - 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 $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x1, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1fa39
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%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, -0x38(%rbp)
jne 0x1f9e7
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 0x1fa0d
movq -0x38(%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, -0x40(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x40(%rbp), %rax
imulq $0xa8, %rax, %rdx
xorl %esi, %esi
callq 0x2100
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1fb0e
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 0x1fb0e
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 0x1faf0
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 0x1fafc
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 0x1fafc
movl $0x0, -0x4(%rbp)
jmp 0x2039f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x1fb0e
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
ja 0x1fb40
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 0x1fb60
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 -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jg 0x1fbbd
movq -0x20(%rbp), %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
addq -0x48(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x1fbe2
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x1ff6c
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 -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %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 -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %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 -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x14(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %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 -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %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 -0x38(%rbp), %rdx
callq 0x1f810
cmpl $0x1, -0x2c(%rbp)
jne 0x1fd91
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 -0x38(%rbp), %rcx
xorl %edx, %edx
callq 0x1e500
movabsq $0xfffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFFF
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x40(%rcx), %ecx
cmpq %rcx, %rax
jge 0x1fe6b
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x68(%rbp), %rax
movl %eax, %esi
callq 0x1e340
cltq
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x1fe58
movq -0x58(%rbp), %rax
movq %rax, -0x60(%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, -0xa8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x68(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movq -0xa8(%rbp), %rdi
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movslq %ecx, %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %esi
movq -0x60(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rcx
callq 0x1e500
jmp 0x1fe5a
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x1fdaf
cmpl $0x1, -0x2c(%rbp)
jne 0x1ff67
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 0x1ff67
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0xb8(%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, -0xac(%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 -0xb8(%rbp), %rdi
movl -0xac(%rbp), %esi
movl %eax, %edx
movq -0x38(%rbp), %rcx
callq 0x1e500
jmp 0x202fa
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 -0x38(%rbp), %rdx
callq 0x1f810
cmpl $0x1, -0x2c(%rbp)
jne 0x200df
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 -0x38(%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, -0x70(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
subq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movabsq $0xfffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFFF
movq %rax, -0x88(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jl 0x201fc
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x98(%rbp), %rax
movl %eax, %esi
callq 0x1e340
cltq
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
cmpq -0x88(%rbp), %rax
je 0x201e3
movq -0x90(%rbp), %rax
movq %rax, -0x88(%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, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
movq -0x98(%rbp), %rax
movl %eax, %esi
callq 0x1e320
movq -0xc0(%rbp), %rdi
movl %eax, %esi
movq -0x80(%rbp), %rax
subq -0x88(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rcx
callq 0x1e500
jmp 0x201e5
movq -0x98(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x20142
cmpl $0x1, -0x2c(%rbp)
jne 0x202f8
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 0x202f8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
imulq $0xa8, 0x10(%rcx), %rcx
addq %rcx, %rax
addq $0x38, %rax
movq %rax, -0xd0(%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, -0xc4(%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 -0xd0(%rbp), %rdi
movl -0xc4(%rbp), %esi
movl %eax, %edx
movq -0x38(%rbp), %rcx
callq 0x1e500
jmp 0x202fa
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 $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)