// File: /workspace/github_c_makefile_star2_O0/vasusharma7[P]Text-Editor/stdedit.c
// Function: read_chunck
int read_chunck(){
    char buffer[2] = {'\0'};
    int x,y,mk;
    point *temp = data.front;
    int count = 0;
    int t = ftrack;
    int k = 0;
    while(k = read(fdr,buffer,1)){
        if(k == 0)  
            return 0;
        if(buffer[0] == '\t' || buffer[0] == '\r')
            continue;
        if(buffer[0] == '\n'){
            x = getwidth(t);
            add_char(buffer[0],t,x);
            t++;
            lines++;
            add_line(t);
            count++;
            move(t,0);
        }
        else{
            x = getwidth(t);
            mk = add_char(buffer[0],t,x);
                if( (x >= (bx - 3))){
                    count++;
                    t++;
                    move(t,0);
                }
                else{
                    move(t,++x);
                }
        }
        if(count >= thresh){
                break;
        }
    }
    clear();
    display(stline);
    refresh();
    ftrack += thresh;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq -0x6(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2110
leaq 0x8ef1(%rip), %rax      # 0xd1e0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x8ea8(%rip), %rax      # 0xd1ac
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
leaq 0x8e89(%rip), %rax      # 0xd1a0
movl (%rax), %edi
leaq -0x6(%rbp), %rsi
movl $0x1, %edx
callq 0x2170
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x444f
cmpl $0x0, -0x2c(%rbp)
jne 0x4345
movl $0x0, -0x4(%rbp)
jmp 0x449d
movsbl -0x6(%rbp), %eax
cmpl $0x9, %eax
je 0x4357
movsbl -0x6(%rbp), %eax
cmpl $0xd, %eax
jne 0x4359
jmp 0x4310
movsbl -0x6(%rbp), %eax
cmpl $0xa, %eax
jne 0x43c3
movl -0x28(%rbp), %edi
callq 0x3ad0
movl %eax, -0xc(%rbp)
movb -0x6(%rbp), %al
movl -0x28(%rbp), %esi
movl -0xc(%rbp), %edx
movsbl %al, %edi
callq 0x31f0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
leaq 0x8e02(%rip), %rax      # 0xd190
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x8df6(%rip), %rax      # 0xd190
movl %ecx, (%rax)
movl -0x28(%rbp), %edi
callq 0x2ef0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq 0x8c2c(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
movl -0x28(%rbp), %esi
xorl %edx, %edx
callq 0x2240
jmp 0x443a
movl -0x28(%rbp), %edi
callq 0x3ad0
movl %eax, -0xc(%rbp)
movb -0x6(%rbp), %al
movl -0x28(%rbp), %esi
movl -0xc(%rbp), %edx
movsbl %al, %edi
callq 0x31f0
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
leaq 0x8db0(%rip), %rcx      # 0xd19c
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jl 0x441d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq 0x8bd2(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
movl -0x28(%rbp), %esi
xorl %edx, %edx
callq 0x2240
jmp 0x4438
movq 0x8bbc(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
movl -0x28(%rbp), %esi
movl -0xc(%rbp), %edx
addl $0x1, %edx
movl %edx, -0xc(%rbp)
callq 0x2240
jmp 0x443a
movl -0x24(%rbp), %eax
leaq 0x8d54(%rip), %rcx      # 0xd198
cmpl (%rcx), %eax
jl 0x444a
jmp 0x444f
jmp 0x4310
movq 0x8b8a(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x2090
leaq 0x8d3f(%rip), %rax      # 0xd1a4
movl (%rax), %edi
callq 0x2cb0
movq 0x8b6d(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x20f0
leaq 0x8d16(%rip), %rax      # 0xd198
movl (%rax), %ecx
leaq 0x8d21(%rip), %rax      # 0xd1ac
addl (%rax), %ecx
leaq 0x8d18(%rip), %rax      # 0xd1ac
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)