// File: /workspace/github_c_makefile_star2_O1/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 0x5471(%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 0x545a(%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 0x2720
movq %rax, %rbx
leaq 0x2695(%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 0x4e17
movzbl %al, %eax
cmpl $0x20, %eax
je 0x4e17
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4dd5
movswl (%rbx), %esi
testq %rbx, %rbx
je 0x4dde
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
jmp 0x4dac
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 0x25cc(%rip), %rcx      # 0x741e
movq %rbx, %rdi
movl $0x4, %esi
movl $0x1, %edx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2110
leaq 0x25c0(%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 0x5148(%rip), %r13      # 0x9fe0
movq (%r13), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20a0
leaq 0x52e8(%rip), %rax      # 0xa198
cmpl $-0x1, (%rax)
leaq 0x52ce(%rip), %r15      # 0xa188
jne 0x4ec3
jmp 0x4ec8
callq 0x35c0
cmpl (%r15), %r14d
jg 0x4ebe
cmpl (%r15), %r14d
jle 0x4fac
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
movq (%r13), %rax
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x4f13
movswl (%rax), %r15d
testq %rax, %rax
je 0x4f1d
movswl 0x2(%rax), %r14d
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 0x250b(%rip), %rcx      # 0x7450
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2110
leaq 0x2507(%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 0x276e
movq (%r13), %rdi
callq 0x20a0
leaq 0x5203(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x2866
movq (%r13), %rdi
movl %r15d, %esi
movl %r14d, %edx
jmp 0x5022
movq %rbx, %rdi
callq 0x276e
movl (%r12), %eax
movl %r14d, %ebx
subl %eax, %ebx
addl $0x5, %ebx
leaq 0x51d5(%rip), %r12      # 0xa19c
movl %ebx, (%r12)
testl %ebx, %ebx
jle 0x4ff8
leal -0x1(%r14), %r15d
movl %r15d, %edi
callq 0x30b2
movl %ebx, %edi
xorl %esi, %esi
movl %r15d, %edx
movl %eax, %ecx
callq 0x42c9
movq (%r13), %rdi
movl (%r12), %esi
notl %esi
addl %r14d, %esi
jmp 0x5020
movl $0x0, (%r12)
decl %r14d
movl %r14d, %edi
callq 0x30b2
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x42c9
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