// File: /workspace/github_c_makefile_star2_O0/vasusharma7[P]Text-Editor/stdedit.c
// Function: find_replace
void find_replace(int ctrl){
    WINDOW *getwrd = create_newwin(16,40,by/3,bx/3);
    char *querry = (char *)calloc(2,1);
    char *rplmt = (char *)calloc(2,1);
    char ch[2] = {'\0'};
    int i,j,x,y,k,u,v,r,t,rpt = 0;
    char *str = (char *)calloc(1,2);
    point *temp = data.front;
    node *trace = NULL;
    if(ctrl == 0){   
        mvwprintw(getwrd,2  ,1,  "HEY ! YOU ARE IN SEARCH MODE : -  \n");
        mvwprintw(getwrd,4,1,  "ENTER WORD YOU WANT TO SEARCH : -  \n");
        wmove(getwrd,6,1);
        wrefresh(getwrd);
        int mg2 = 0,mg1;
        while(mg2 != -1){
            getyx(getwrd,u,v);
            mg1 = wgetch(getwrd);
            switch(mg1){
                case KEY_BACKSPACE:
                    break;
                case '\n':case ' ':
                    mg2 = -1;
                    break;
                case '\t':
                    break;
                default:
                    mvwprintw(getwrd,u,v++,"%c",mg1);
                    wrefresh(getwrd);
                    querry[mg2++] = mg1;
                    querry = realloc(querry,strlen(querry) + 2);
                    break;
            }
        }
        wclear(getwrd);
        box(getwrd, 0 , 0);
        mvwprintw(getwrd,6,1, "DURING SEARCH : \n");
        mvwprintw(getwrd,8,1, "PRESS TAB TO SEARCH NEXT");
        mvwprintw(getwrd,10,1, "PRESS ANY KEY TO EXIT");
        mvwprintw(getwrd,12,1, "PRESS ANY KEY NOW TO SEE RESULTS");
        wrefresh(getwrd);
        getchar();
    }
    else{
        mvwprintw(getwrd,2  ,1,  "HEY ! YOU ARE IN REPLACE MODE : -  \n");
        mvwprintw(getwrd,4,1,  "ENTER WORD YOU WANT TO REPLACE  : -  \n");
        wmove(getwrd,6,1);
        wrefresh(getwrd);
        int mg2 = 0,mg1;
        while(mg2 != -1){
            mg1 = wgetch(getwrd);
            switch(mg1){
                case KEY_BACKSPACE:
                    break;
                case '\n':case ' ':
                    mg2 = -1;
                    break;
                case '\t':
                    break;
                default:
                    getyx(getwrd,u,v);
                    mvwprintw(getwrd,u,v++,"%c",mg1);
                    wrefresh(getwrd);
                    querry[mg2++] = mg1;
                    querry = realloc(querry,strlen(querry) + 2);
                    break;
                }
        }
        wclear(getwrd);
        box(getwrd, 0 , 0);
        mvwprintw(getwrd,2,1, "ENTER THE WORD YOU WANT TO REPLACE WITH :- \n");
        wrefresh(getwrd);
        wmove(getwrd,4,1);
        mg2 = 0,mg1;
        while(mg2 != -1){
            mg1 = wgetch(getwrd);
            switch(mg1){
                case KEY_BACKSPACE:
                    break;
                case '\n':case ' ':
                    mg2 = -1;
                    break;
                case '\t':
                    break;
                default:
                    getyx(getwrd,u,v);
                    mvwprintw(getwrd,u,v++,"%c",mg1);
                    wrefresh(getwrd);
                    rplmt[mg2++] = mg1;
                    rplmt = realloc(rplmt,strlen(rplmt) + 2);
                    break;
                }
        }
        //strcat(rplmt," ");

    }
    wrefresh(getwrd);
    destroy_win(getwrd);
    clear();
    getyx(stdscr,y,x);
    display(stline);
    move(y,x);
    for(i = 0; i <= lines; i++){
        rpt = 0;
        j = 0;
        k = 0;
        if((fdr != -1) && (i >= (ftrack  - 2)))
                read_chunck();
        trace = temp->element.store;
        while(rpt == 1 || (trace->next != NULL)){
            getyx(stdscr,y,x);
            if((rpt == 1) || (trace->val == ' ') || (trace->val == '\n') ){
                k = 0;
                getyx(stdscr,y,x);
                if(!strcmp(str,querry)){
                    if(i >= (by - 5))
                            stline = i - (by - 5) + 1;
                        else
                            stline = 0;
                    if(ctrl == 1){
                            t = j;
                            r = strlen(querry);
                            while(r--){
                                if(!isEmptys(&(temp->element)) && t > 0){
                                    ipoploc(&(temp->element),t - 1);
                                    t--;
                                    j--;
                                }
                            }
                            for(r = 0; r < strlen(rplmt); r++) {
                                getyx(stdscr,y,x);
                                int mk = add_char(rplmt[r],i,t);
                                if( (t >= (bx - 3)) || (getwidth(i) >= (bx-3)) && mk != 0){
                                    t = mk;
                                    j = mk;
                                }
                                else{
                                    t++;
                                    j++;
                                }
                            }
                    }

                    else{
                        display_high(stline, j - strlen(str), i, strlen(querry) + 1);
                        ch[0] = getch();
                        if(ch[0] == '\t'){
                            trace = trace->next;
                            j++;
                            free(str);
                            str = (char *)calloc(2,1);
                            continue;            
                        }
                        else 
                            return;
                    }
                }
                trace = trace->next;
                j++;
                free(str);
                str = (char *)calloc(1,2);
                continue;            
            }
            str[k++] = trace->val;
            str = realloc(str,j+2);
            j++;
            trace = trace->next;

        }
        temp = temp->tail;
    }
    getwrd = create_newwin(10,40,by/3,bx/3);
    if(ctrl == 0){
        mvwprintw(getwrd, 3,2,"SEARCH FINISHED :\n No More Entries for the word '%s'",querry);
        mvwprintw(getwrd, 6,2,"press any key to exit search mode  :)");
    }
    else{
        mvwprintw(getwrd, 3,2,"REPLACE FINISHED :\n All %s replaced with '%s'",querry,rplmt);
        mvwprintw(getwrd, 6,2,"press any key to see the effect and exit  :)");
        add_event(&states,"replace",0,0,querry,rplmt);
        wrefresh(getwrd);
        return;
    }
    wrefresh(getwrd);
    getchar();
    getyx(stdscr,y,x);
    destroy_win(getwrd);
    clear();
    display(stline);
    refresh();
   // add_event(&states,"replace",0,0,querry,rplmt);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %edi, -0x4(%rbp)
leaq 0x78ef(%rip), %rax      # 0xd194
movl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x80(%rbp)
leaq 0x78e3(%rip), %rax      # 0xd19c
movl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl -0x80(%rbp), %edx
movl %eax, %ecx
movl $0x10, %edi
movl $0x28, %esi
callq 0x2b30
movq %rax, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, -0x18(%rbp)
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, -0x20(%rbp)
leaq -0x22(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2110
movl $0x0, -0x4c(%rbp)
movl $0x1, %edi
movl $0x2, %esi
callq 0x2180
movq %rax, -0x58(%rbp)
leaq 0x78ae(%rip), %rax      # 0xd1e0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x5b8f
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
leaq 0x48ad(%rip), %rcx      # 0xa20d
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
leaq 0x48b5(%rip), %rcx      # 0xa231
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x1, %edx
callq 0x2240
movq -0x10(%rbp), %rdi
callq 0x20f0
movl $0x0, -0x6c(%rbp)
cmpl $-0x1, -0x6c(%rbp)
je 0x5ad4
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x59c7
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x84(%rbp)
jmp 0x59d4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x84(%rbp)
jmp 0x59d4
movl -0x84(%rbp), %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x59f5
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x5a02
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x88(%rbp)
jmp 0x5a02
movl -0x88(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2080
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x8c(%rbp)
subl $0x9, %eax
je 0x5a5b
jmp 0x5a27
movl -0x8c(%rbp), %eax
subl $0xa, %eax
je 0x5a52
jmp 0x5a34
movl -0x8c(%rbp), %eax
subl $0x20, %eax
je 0x5a52
jmp 0x5a41
movl -0x8c(%rbp), %eax
subl $0x107, %eax            # imm = 0x107
jne 0x5a5d
jmp 0x5a50
jmp 0x5acf
movl $0xffffffff, -0x6c(%rbp) # imm = 0xFFFFFFFF
jmp 0x5acf
jmp 0x5acf
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x70(%rbp), %r8d
leaq 0x458a(%rip), %rcx      # 0xa004
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
callq 0x20f0
movl -0x70(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x6c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x6c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
addq $0x2, %rsi
callq 0x2210
movq %rax, -0x18(%rbp)
jmp 0x59a6
movq -0x10(%rbp), %rdi
callq 0x2090
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2060
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x1, %edx
leaq 0x4735(%rip), %rcx      # 0xa256
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
leaq 0x472b(%rip), %rcx      # 0xa268
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0xa, %esi
movl $0x1, %edx
leaq 0x4728(%rip), %rcx      # 0xa281
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0xc, %esi
movl $0x1, %edx
leaq 0x4722(%rip), %rcx      # 0xa297
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
callq 0x20f0
callq 0x21a0
jmp 0x5ed1
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
leaq 0x4714(%rip), %rcx      # 0xa2b8
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
leaq 0x471d(%rip), %rcx      # 0xa2dd
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x1, %edx
callq 0x2240
movq -0x10(%rbp), %rdi
callq 0x20f0
movl $0x0, -0x74(%rbp)
cmpl $-0x1, -0x74(%rbp)
je 0x5d21
movq -0x10(%rbp), %rdi
callq 0x2080
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x9c(%rbp)
subl $0x9, %eax
je 0x5c4a
jmp 0x5c10
movl -0x9c(%rbp), %eax
subl $0xa, %eax
je 0x5c3e
jmp 0x5c1d
movl -0x9c(%rbp), %eax
subl $0x20, %eax
je 0x5c3e
jmp 0x5c2a
movl -0x9c(%rbp), %eax
subl $0x107, %eax            # imm = 0x107
jne 0x5c4f
jmp 0x5c39
jmp 0x5d1c
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
jmp 0x5d1c
jmp 0x5d1c
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x5c66
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0xa0(%rbp)
jmp 0x5c73
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xa0(%rbp)
jmp 0x5c73
movl -0xa0(%rbp), %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x5c94
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xa4(%rbp)
jmp 0x5ca1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xa4(%rbp)
jmp 0x5ca1
movl -0xa4(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x78(%rbp), %r8d
leaq 0x433d(%rip), %rcx      # 0xa004
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
callq 0x20f0
movl -0x78(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x74(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x74(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b0
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
addq $0x2, %rsi
callq 0x2210
movq %rax, -0x18(%rbp)
jmp 0x5bea
movq -0x10(%rbp), %rdi
callq 0x2090
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl %r9d, %esi
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
callq 0x2060
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
leaq 0x4596(%rip), %rcx      # 0xa304
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
callq 0x20f0
movq -0x10(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2240
movl $0x0, -0x74(%rbp)
cmpl $-0x1, -0x74(%rbp)
je 0x5ecf
movq -0x10(%rbp), %rdi
callq 0x2080
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0xb4(%rbp)
subl $0x9, %eax
je 0x5df8
jmp 0x5dbe
movl -0xb4(%rbp), %eax
subl $0xa, %eax
je 0x5dec
jmp 0x5dcb
movl -0xb4(%rbp), %eax
subl $0x20, %eax
je 0x5dec
jmp 0x5dd8
movl -0xb4(%rbp), %eax
subl $0x107, %eax            # imm = 0x107
jne 0x5dfd
jmp 0x5de7
jmp 0x5eca
movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF
jmp 0x5eca
jmp 0x5eca
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x5e14
movq -0x10(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0xb8(%rbp)
jmp 0x5e21
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xb8(%rbp)
jmp 0x5e21
movl -0xb8(%rbp), %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpq -0x10(%rbp), %rax
je 0x5e42
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xbc(%rbp)
jmp 0x5e4f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xbc(%rbp)
jmp 0x5e4f
movl -0xbc(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
movl -0x40(%rbp), %edx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x78(%rbp), %r8d
leaq 0x418f(%rip), %rcx      # 0xa004
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
callq 0x20f0
movl -0x78(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x74(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x74(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20b0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
addq $0x2, %rsi
callq 0x2210
movq %rax, -0x20(%rbp)
jmp 0x5d98
jmp 0x5ed1
movq -0x10(%rbp), %rdi
callq 0x20f0
movq -0x10(%rbp), %rdi
callq 0x2bb0
movq 0x70f6(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x2090
xorl %eax, %eax
movq 0x70e5(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x5f15
movq 0x70d9(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl (%rax), %eax
movl %eax, -0xcc(%rbp)
jmp 0x5f22
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xcc(%rbp)
jmp 0x5f22
movl -0xcc(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
movq 0x70ac(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x5f4f
movq 0x70a0(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xd0(%rbp)
jmp 0x5f5c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xd0(%rbp)
jmp 0x5f5c
movl -0xd0(%rbp), %eax
movl %eax, -0x30(%rbp)
leaq 0x7238(%rip), %rax      # 0xd1a4
movl (%rax), %edi
callq 0x2cb0
movq 0x7066(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
movl -0x34(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x2240
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0x71f7(%rip), %rcx      # 0xd190
cmpl (%rcx), %eax
jg 0x6461
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x38(%rbp)
leaq 0x71e3(%rip), %rax      # 0xd1a0
cmpl $-0x1, (%rax)
je 0x5fda
movl -0x28(%rbp), %eax
leaq 0x71e0(%rip), %rcx      # 0xd1ac
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jl 0x5fda
callq 0x42d0
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movb $0x1, %al
cmpl $0x1, -0x4c(%rbp)
movb %al, -0xd1(%rbp)
je 0x6006
movq -0x68(%rbp), %rax
cmpq $0x0, 0x10(%rax)
setne %al
movb %al, -0xd1(%rbp)
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x6015
jmp 0x6448
xorl %eax, %eax
movq 0x6fc2(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6038
movq 0x6fb6(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl (%rax), %eax
movl %eax, -0xd8(%rbp)
jmp 0x6045
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xd8(%rbp)
jmp 0x6045
movl -0xd8(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
movq 0x6f89(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6072
movq 0x6f7d(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xdc(%rbp)
jmp 0x607f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xdc(%rbp)
jmp 0x607f
movl -0xdc(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x4c(%rbp)
je 0x60ac
movq -0x68(%rbp), %rax
movsbl 0x8(%rax), %eax
cmpl $0x20, %eax
je 0x60ac
movq -0x68(%rbp), %rax
movsbl 0x8(%rax), %eax
cmpl $0xa, %eax
jne 0x63fc
movl $0x0, -0x38(%rbp)
xorl %eax, %eax
movq 0x6f24(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x60d6
movq 0x6f18(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl (%rax), %eax
movl %eax, -0xe0(%rbp)
jmp 0x60e3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xe0(%rbp)
jmp 0x60e3
movl -0xe0(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
movq 0x6eeb(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6110
movq 0x6edf(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xe4(%rbp)
jmp 0x611d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xe4(%rbp)
jmp 0x611d
movl -0xe4(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2190
cmpl $0x0, %eax
jne 0x63c6
movl -0x28(%rbp), %eax
leaq 0x704e(%rip), %rcx      # 0xd194
movl (%rcx), %ecx
subl $0x5, %ecx
cmpl %ecx, %eax
jl 0x616e
movl -0x28(%rbp), %ecx
leaq 0x703b(%rip), %rax      # 0xd194
movl (%rax), %eax
subl $0x5, %eax
subl %eax, %ecx
addl $0x1, %ecx
leaq 0x703a(%rip), %rax      # 0xd1a4
movl %ecx, (%rax)
jmp 0x617b
leaq 0x702f(%rip), %rax      # 0xd1a4
movl $0x0, (%rax)
cmpl $0x1, -0x4(%rbp)
jne 0x6309
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b0
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
je 0x61e6
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
callq 0x27c0
cmpl $0x0, %eax
jne 0x61e4
cmpl $0x0, -0x48(%rbp)
jle 0x61e4
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
movl -0x48(%rbp), %esi
subl $0x1, %esi
callq 0x26d0
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6197
movl $0x0, -0x44(%rbp)
movslq -0x44(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20b0
movq %rax, %rcx
movq -0xf0(%rbp), %rax
cmpq %rcx, %rax
jae 0x6304
xorl %eax, %eax
movq 0x6dc3(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6237
movq 0x6db7(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl (%rax), %eax
movl %eax, -0xf4(%rbp)
jmp 0x6244
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xf4(%rbp)
jmp 0x6244
movl -0xf4(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
movq 0x6d8a(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6271
movq 0x6d7e(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl 0x2(%rax), %eax
movl %eax, -0xf8(%rbp)
jmp 0x627e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xf8(%rbp)
jmp 0x627e
movl -0xf8(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movslq -0x44(%rbp), %rcx
movb (%rax,%rcx), %al
movl -0x28(%rbp), %esi
movl -0x48(%rbp), %edx
movsbl %al, %edi
callq 0x31f0
movl %eax, -0x7c(%rbp)
movl -0x48(%rbp), %eax
leaq 0x6eef(%rip), %rcx      # 0xd19c
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jge 0x62d4
movl -0x28(%rbp), %edi
callq 0x3ad0
leaq 0x6ed7(%rip), %rcx      # 0xd19c
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jl 0x62e2
cmpl $0x0, -0x7c(%rbp)
je 0x62e2
movl -0x7c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x62f4
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x62f6
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x61ed
jmp 0x63c4
leaq 0x6e94(%rip), %rax      # 0xd1a4
movl (%rax), %eax
movl %eax, -0x104(%rbp)
movslq -0x2c(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20b0
movq %rax, %rcx
movq -0x110(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x100(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b0
movl -0x104(%rbp), %edi
movl -0x100(%rbp), %esi
movl -0xfc(%rbp), %edx
addq $0x1, %rax
movl %eax, %ecx
callq 0x5610
movq 0x6c6b(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x2080
movb %al, -0x22(%rbp)
movsbl -0x22(%rbp), %eax
cmpl $0x9, %eax
jne 0x63bf
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2030
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, -0x58(%rbp)
jmp 0x5fe6
jmp 0x660b
jmp 0x63c6
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2030
movl $0x1, %edi
movl $0x2, %esi
callq 0x2180
movq %rax, -0x58(%rbp)
jmp 0x5fe6
movq -0x68(%rbp), %rax
movb 0x8(%rax), %dl
movq -0x58(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x58(%rbp), %rdi
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x2210
movq %rax, -0x58(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x5fe6
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5f8f
leaq 0x6d2c(%rip), %rax      # 0xd194
movl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x114(%rbp)
leaq 0x6d1d(%rip), %rax      # 0xd19c
movl (%rax), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl -0x114(%rbp), %edx
movl %eax, %ecx
movl $0xa, %edi
movl $0x28, %esi
callq 0x2b30
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x64e8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %r8
movl $0x3, %esi
movl $0x2, %edx
leaq 0x3e6e(%rip), %rcx      # 0xa331
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x2, %edx
leaq 0x3e87(%rip), %rcx      # 0xa366
movb $0x0, %al
callq 0x2100
jmp 0x6555
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
movl $0x3, %esi
movl $0x2, %edx
leaq 0x3e87(%rip), %rcx      # 0xa38c
movb $0x0, %al
callq 0x2100
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x2, %edx
leaq 0x3e99(%rip), %rcx      # 0xa3ba
movb $0x0, %al
callq 0x2100
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x6c89(%rip), %rdi      # 0xd1c0
leaq 0x3ea9(%rip), %rsi      # 0xa3e7
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x6b60
movq -0x10(%rbp), %rdi
callq 0x20f0
jmp 0x660b
movq -0x10(%rbp), %rdi
callq 0x20f0
callq 0x21a0
xorl %eax, %eax
movq 0x6a74(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x6586
movq 0x6a68(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl (%rax), %eax
movl %eax, -0x118(%rbp)
jmp 0x6593
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x118(%rbp)
jmp 0x6593
movl -0x118(%rbp), %eax
movl %eax, -0x34(%rbp)
xorl %eax, %eax
movq 0x6a3b(%rip), %rcx      # 0xcfe0
cmpq (%rcx), %rax
je 0x65c0
movq 0x6a2f(%rip), %rax      # 0xcfe0
movq (%rax), %rax
movswl 0x2(%rax), %eax
movl %eax, -0x11c(%rbp)
jmp 0x65cd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x11c(%rbp)
jmp 0x65cd
movl -0x11c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2bb0
movq 0x69fa(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x2090
leaq 0x6baf(%rip), %rax      # 0xd1a4
movl (%rax), %edi
callq 0x2cb0
movq 0x69dd(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x20f0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)