// File: /workspace/github_c_makefile_star2_O2/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
subq $0x28, %rsp
leaq 0x57d9(%rip), %rax      # 0xa18c
movl (%rax), %eax
pushq $0x3
popq %rsi
cltd
idivl %esi
movl %eax, %ecx
leaq 0x57d0(%rip), %rax      # 0xa194
movl (%rax), %eax
cltd
idivl %esi
pushq $0xa
popq %rdi
pushq $0x28
popq %rsi
movl %ecx, %edx
movl %eax, %ecx
callq 0x26cc
movq %rax, %rbx
leaq 0x2a1d(%rip), %rcx      # 0x73ff
pushq $0x2
popq %rsi
pushq $0x1
popq %r12
movq %rax, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2110
leaq -0x2a(%rbp), %r14
andw $0x0, (%r14)
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
callq 0x2180
movq %rax, %r15
pushq $0x4
popq %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x2230
movq %rbx, %rdi
callq 0x2090
pushq $-0x1
popq %r12
movb %al, -0x2a(%rbp)
cmpb $0xa, %al
je 0x4a89
movzbl %al, %eax
cmpl $0x20, %eax
je 0x4a89
movl %r12d, %esi
movl %r12d, %edx
testq %rbx, %rbx
je 0x4a48
movswl (%rbx), %esi
movswl 0x2(%rbx), %edx
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
movq %rbx, %rdi
callq 0x2090
jmp 0x4a27
movq %r15, %rdi
callq 0x2250
movl %eax, %r14d
movq %rbx, %rdi
callq 0x20a0
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2070
leaq 0x2959(%rip), %rcx      # 0x741e
pushq $0x4
popq %rsi
pushq $0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2110
leaq 0x294d(%rip), %rcx      # 0x7430
pushq $0x6
popq %rsi
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x2100
callq 0x21a0
movq 0x54d9(%rip), %r13      # 0x9fe0
movq (%r13), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20a0
leaq 0x5679(%rip), %rax      # 0xa198
cmpl $-0x1, (%rax)
leaq 0x565f(%rip), %r15      # 0xa188
movl (%r15), %eax
jne 0x4b38
jmp 0x4b3d
callq 0x3465
movl (%r15), %eax
cmpl %eax, %r14d
jg 0x4b30
cmpl %eax, %r14d
jle 0x4b80
movq %rbx, %rdi
callq 0x20a0
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2070
movq (%r13), %rax
testq %rax, %rax
je 0x4bd8
movswl (%rax), %r14d
movswl 0x2(%rax), %r15d
jmp 0x4bdf
movq %rbx, %rdi
callq 0x271c
leaq 0x55fd(%rip), %rax      # 0xa18c
movl (%rax), %eax
movl %r14d, %ebx
subl %eax, %ebx
addl $0x5, %ebx
leaq 0x55fc(%rip), %r12      # 0xa19c
movl %ebx, (%r12)
testl %ebx, %ebx
jle 0x4c6b
leal -0x1(%r14), %r15d
movl %r15d, %edi
callq 0x2fb6
movl %ebx, %edi
xorl %esi, %esi
movl %r15d, %edx
movl %eax, %ecx
callq 0x406e
movq (%r13), %rdi
movl (%r12), %esi
notl %esi
addl %r14d, %esi
jmp 0x4c90
pushq $-0x1
popq %r14
movl %r14d, %r15d
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2070
leaq 0x2848(%rip), %rcx      # 0x7450
pushq $0x2
popq %rsi
pushq $0x1
popq %r12
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2110
leaq 0x2844(%rip), %rcx      # 0x7467
pushq $0x4
popq %rsi
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x2100
callq 0x21a0
movq %rbx, %rdi
callq 0x271c
movq (%r13), %rdi
callq 0x20a0
leaq 0x5544(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x27dc
movq (%r13), %rdi
movl %r14d, %esi
movl %r15d, %edx
jmp 0x4c92
andl $0x0, (%r12)
decl %r14d
movl %r14d, %edi
callq 0x2fb6
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x406e
movq (%r13), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x2230
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq