// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: goto_line
void goto_line(){
    int q,v,u;
    WINDOW *lgoto = create_newwin(10,40,by/3,bx/3);
    mvwprintw(lgoto,2  ,1,  "HEY ! ENTER LINE NUMBER : -  \n");
    char ch[2] = {'\0'};
    char *querry = (char *)calloc(2,1);
    wmove(lgoto,4,1);
    ch[0] = wgetch(lgoto);
    while((ch[0] != '\n')  &&  (ch[0] != ' ')){
            if(ch[0] == KEY_BACKSPACE){
                ch[0] = wgetch(lgoto);
                continue;
            }
            getyx(lgoto,u,v);
            mvwprintw(lgoto,u,v++,ch);
            wrefresh(lgoto);
            strcat(querry,ch);
            querry = realloc(querry,strlen(querry) + 2);
            ch[0] = wgetch(lgoto);
    }
    q = atoi(querry);
    wclear(lgoto);
    box(lgoto,0,0);
    mvwprintw(lgoto,4,1,"LINE NUMBER  - %d",q);
    mvwprintw(lgoto,6,1,  "PRESS ANY KEY TO GO....GOING->\n");
    wrefresh(lgoto);
    getchar();
    clear();
    wclear(lgoto);
    int st = 1;
    if(fdr != -1){
        while((q > lines)){
            st = read_chunck();
            if(st == 0)
                    break;
        }
        //missing
    }
    if((st == 0) || q > lines){
            wclear(lgoto);
            box(lgoto,0,0);
            getyx(stdscr,u,v); 
            box(lgoto,0,0);
            mvwprintw(lgoto,2  ,1, "NO SUCH LINE EXITING \n");
            mvwprintw(lgoto,4,1,"Press any key to exit");
            wrefresh(lgoto);
            getchar();
            destroy_win(lgoto);
            clear();
            display(stline);
            move(u,v);
            return;
        }
        else{
            destroy_win(lgoto);
        }
    stline = q - (by - 5);
    if( stline <= 0){
        stline = 0;
        display_high(stline,0,q-1,getwidth(q-1) );
        move(q - 1,0);
    }
    else{
        display_high(stline,0,q-1,getwidth(q-1) );
        move(q - stline - 1,0);
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x550d(%rip), %r12      # 0xa18c
movslq (%r12), %rax
imulq $0x55555556, %rax, %rdx # imm = 0x55555556
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x20, %rdx
addl %eax, %edx
leaq 0x54f6(%rip), %rax      # 0xa194
movslq (%rax), %rax
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
addl %eax, %ecx
movl $0xa, %edi
movl $0x28, %esi
callq 0x2708
movq %rax, %rbx
leaq 0x2731(%rip), %rcx      # 0x73ff
movq %rax, %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2110
leaq -0x2a(%rbp), %r14
movw $0x0, (%r14)
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %r15
movq %rbx, %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x2230
movq %rbx, %rdi
callq 0x2090
movb %al, -0x2a(%rbp)
cmpb $0xa, %al
je 0x4d78
movzbl %al, %eax
cmpl $0x20, %eax
je 0x4d78
testq %rbx, %rbx
je 0x4d35
movswl (%rbx), %esi
movswl 0x2(%rbx), %edx
jmp 0x4d3f
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x2100
movq %r15, %rdi
movq %r14, %rsi
callq 0x2260
movq %r15, %rdi
callq 0x20c0
leaq 0x2(%rax), %rsi
movq %r15, %rdi
callq 0x2200
movq %rax, %r15
jmp 0x4d10
movq %r15, %rdi
callq 0x2250
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
subq $0x8, %rsp
xorl %eax, %eax
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %rax
callq 0x2070
addq $0x20, %rsp
leaq 0x266b(%rip), %rcx      # 0x741e
movq %rbx, %rdi
movl $0x4, %esi
movl $0x1, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2110
leaq 0x265f(%rip), %rcx      # 0x7430
movq %rbx, %rdi
movl $0x6, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x2100
callq 0x21a0
movq 0x51e7(%rip), %r13      # 0x9fe0
movq (%r13), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20a0
leaq 0x5387(%rip), %rax      # 0xa198
cmpl $-0x1, (%rax)
leaq 0x536d(%rip), %r15      # 0xa188
movl (%r15), %eax
jne 0x4e2a
jmp 0x4e2f
callq 0x3550
movl (%r15), %eax
cmpl %eax, %r14d
jg 0x4e22
cmpl %eax, %r14d
jle 0x4e75
movq %rbx, %rdi
callq 0x20a0
subq $0x8, %rsp
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
pushq %r12
callq 0x2070
addq $0x20, %rsp
movq (%r13), %rax
testq %rax, %rax
je 0x4ec8
movswl (%rax), %r14d
movswl 0x2(%rax), %r15d
jmp 0x4ed4
movq %rbx, %rdi
callq 0x2756
movl (%r12), %eax
movl %r14d, %ebx
subl %eax, %ebx
addl $0x5, %ebx
leaq 0x530c(%rip), %r12      # 0xa19c
movl %ebx, (%r12)
testl %ebx, %ebx
jle 0x4f64
leal -0x1(%r14), %r15d
movl %r15d, %edi
callq 0x305b
movl %ebx, %edi
xorl %esi, %esi
movl %r15d, %edx
movl %eax, %ecx
callq 0x4242
movq (%r13), %rdi
movl (%r12), %esi
notl %esi
addl %r14d, %esi
jmp 0x4f8c
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
pushq %r12
callq 0x2070
addq $0x20, %rsp
leaq 0x2553(%rip), %rcx      # 0x7450
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2110
leaq 0x254f(%rip), %rcx      # 0x7467
movq %rbx, %rdi
movl $0x4, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x2100
callq 0x21a0
movq %rbx, %rdi
callq 0x2756
movq (%r13), %rdi
callq 0x20a0
leaq 0x524b(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x284e
movq (%r13), %rdi
movl %r14d, %esi
movl %r15d, %edx
jmp 0x4f8e
movl $0x0, (%r12)
decl %r14d
movl %r14d, %edi
callq 0x305b
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x4242
movq (%r13), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x2230
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq