LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: recv_full_msg
int64_t recv_full_msg(int socket, void* buffer, int64_t length) {
    int64_t expected_length = 0;
    recv_all(socket, &expected_length, sizeof(int64_t));

	if(verbose_socklibc>=4){	
		INFO("Receiving a message of size %ld.", expected_length);
	}
	
    if (expected_length > length) {
        WARNING("Buffer of size %ld is too small to fit expected data.",
                expected_length);
    }

    recv_all(socket, buffer, expected_length);
    return expected_length;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movl $0x8, %edx
callq 0x1a34
cmpl $0x4, 0x476d(%rip)      # 0x6148
jge 0x1a02
movq 0x8(%rsp), %rcx
cmpq %r14, %rcx
jg 0x1a0e
movl %ebp, %edi
movq %rbx, %rsi
movq %rcx, %rdx
callq 0x1a34
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8(%rsp), %rdi
callq 0x12a6
jmp 0x19dd
movq 0x45e3(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1620(%rip), %rsi      # 0x303f
leaq 0x160b(%rip), %rdx      # 0x3031
xorl %eax, %eax
callq 0x1130
movq 0x8(%rsp), %rcx
jmp 0x19e7
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: recv_all
void recv_all(int socket, void* buffer, int64_t length) {
    char* ptr = (char*)buffer;
    int64_t i = 0;
    while (length > 0) {
        i = recv(socket, ptr, length, 0);
        if (i < 1) {
			if(verbose_socklibc>=1){
				WARNING("%s", "Could not receive all data. Trying again.");
			}
            sleep(1);
        }
        ptr += i;
        length -= i;
    }
    return;
}

// Assembly:
testq %rdx, %rdx
jle 0x1a8d
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x1050
movq %rax, %r15
testq %rax, %rax
jg 0x1a72
cmpl $0x0, 0x46e2(%rip)      # 0x6148
jg 0x1a7c
movl $0x1, %edi
callq 0x1240
addq %r15, %r14
subq %r15, %rbx
jg 0x1a48
jmp 0x1a83
callq 0x12d1
jmp 0x1a68
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: recv_full_msg_try
int64_t recv_full_msg_try(int socket, void* buffer, int64_t length, int times) {
    int64_t expected_length = 0;
    int64_t ret = recv_all_try(socket, &expected_length, sizeof(int64_t), times);
    if (ret < 0) {
        return ret;
    }

	if(verbose_socklibc>=4){
		INFO("Receiving a message of size %ld.", expected_length);
	}
	
    if (expected_length > length && verbose_socklibc>=1) {
        WARNING("Buffer of size %ld is too small to fit expected data.",
                expected_length);
    }

    ret = recv_all_try(socket, buffer, expected_length, times);
    if (ret < 0) {
        return ret;
    }
    return expected_length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
movq %rsp, %rsi
movq $0x0, (%rsi)
movl $0x8, %edx
callq 0x1b56
testl %eax, %eax
js 0x1af1
movl 0x468b(%rip), %eax      # 0x6148
cmpl $0x4, %eax
jge 0x1b28
movq (%rsp), %rcx
cmpq %r15, %rcx
jle 0x1acf
testl %eax, %eax
jg 0x1b03
movl %ebp, %edi
movq %r14, %rsi
movq %rcx, %rdx
movl %ebx, %ecx
callq 0x1b56
movl %eax, %ecx
movq $-0x1, %rax
testl %ecx, %ecx
js 0x1af8
movq (%rsp), %rax
jmp 0x1af8
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x44ee(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x152b(%rip), %rsi      # 0x303f
leaq 0x1574(%rip), %rdx      # 0x308f
xorl %eax, %eax
callq 0x1130
movq (%rsp), %rcx
jmp 0x1acf
movq 0x44c9(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq (%rsp), %rcx
leaq 0x14c7(%rip), %rsi      # 0x3004
leaq 0x154b(%rip), %rdx      # 0x308f
xorl %eax, %eax
callq 0x1130
movl 0x45f7(%rip), %eax      # 0x6148
jmp 0x1ac2
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: recv_all_try
int recv_all_try(int socket, void* buffer, int64_t length, int times) {
    char* ptr = (char*)buffer;
    int64_t i = 0;
    int counter = 0;
    while (length > 0) {
        i = recv(socket, ptr, length, 0);
        if (i < 1) {
			if(verbose_socklibc>=3){
				WARNING("%s", "Could not receive all data. Trying again.");
			}
            sleep(1);
            counter++;
            if (counter >= times) {
				if(verbose_socklibc>=2){
					ERROR("%s", "Socket is probably broken. Giving up.");
				}
                return -1;
            }
        }
        ptr += i;
        length -= i;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
jle 0x1bb6
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
xorl %r13d, %r13d
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1050
movq %rax, %r12
testq %rax, %rax
jg 0x1ba5
cmpl $0x3, 0x45b7(%rip)      # 0x6148
jge 0x1baf
movl $0x1, %edi
callq 0x1240
incl %r13d
cmpl %ebx, %r13d
jge 0x1bc9
addq %r12, %r15
subq %r12, %r14
jg 0x1b73
jmp 0x1bb6
callq 0x12f7
jmp 0x1b93
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2, 0x4573(%rip)      # 0x6148
jl 0x1bb8
callq 0x131d
jmp 0x1bb8
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: errorCheck
void errorCheck(int ret, char* msg) {
    if (ret == -1) {
        if(verbose_socklibc>=1){
			perror(msg);
		}
        exit(EXIT_FAILURE);
    }
}

// Assembly:
cmpl $-0x1, %edi
je 0x1d42
retq
pushq %rax
cmpl $0x0, 0x43fe(%rip)      # 0x6148
jle 0x1d54
movq %rsi, %rdi
callq 0x11b0
movl $0x1, %edi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: TCP_server_accept_client
int TCP_server_accept_client(int listenfd) {
    int connectfd;

    struct sockaddr_in client;
    socklen_t clientlen = sizeof(client);

    //accept connections
    connectfd = accept(listenfd, (struct sockaddr*)&client, &clientlen);
    errorCheck(connectfd, "Cannot accept");

    //get ip to string
    char ip[16];
    inet_ntop(AF_INET, &client.sin_addr, ip, clientlen);
	if(verbose_socklibc>=4){
		INFO("Client %s:%d connected.", ip, client.sin_port);
	}

    return connectfd;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0xc(%rsp), %r14
movl $0x10, (%r14)
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x11c0
movl %eax, %ebx
leaq 0x1420(%rip), %rsi      # 0x31a7
movl %eax, %edi
callq 0x1d3c
leaq 0x14(%rsp), %rsi
movl (%r14), %ecx
leaq 0x20(%rsp), %rdx
movl $0x2, %edi
callq 0x1030
cmpl $0x4, 0x439c(%rip)      # 0x6148
jge 0x1db8
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0x4239(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movzwl 0x12(%rsp), %r8d
leaq 0x13e6(%rip), %rsi      # 0x31b5
leaq 0x1403(%rip), %rdx      # 0x31d9
leaq 0x20(%rsp), %rcx
xorl %eax, %eax
callq 0x1130
jmp 0x1dae
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: TCP_server_disconnect_client
void TCP_server_disconnect_client(int connectfd) {
    //close sockets
    int ret = close(connectfd);
    errorCheck(ret, "Cannot close socket.");
    if(verbose_socklibc>=4){
		INFO("%s", "Client disconnected.");
	}
}

// Assembly:
pushq %rax
callq 0x1100
leaq 0x1401(%rip), %rsi      # 0x31f2
movl %eax, %edi
callq 0x1d3c
cmpl $0x4, 0x4349(%rip)      # 0x6148
jge 0x1e03
popq %rax
retq
callq 0x139b
jmp 0x1e01
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/socket.c
// Function: TCP_client_disconnect
void TCP_client_disconnect(int socketfd) {
    //closing sockets
    int ret = shutdown(socketfd, SHUT_RDWR);
    errorCheck(ret, "Cannot disconnect.");
    ret = close(socketfd);
    errorCheck(ret, "Cannot close socket.");
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0x2, %esi
callq 0x10a0
leaq 0x11d0(%rip), %rsi      # 0x3384
movl %eax, %edi
callq 0x1d3c
movl %ebx, %edi
callq 0x1100
leaq 0x1029(%rip), %rsi      # 0x31f2
movl %eax, %edi
popq %rbx
jmp 0x1d3c
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/hasindu2008[P]f5p/f5pl.c
// Function: sig_handler
void sig_handler(int sig) {
    void* array[100];
    size_t size = backtrace(array, 100);
    ERROR("I regret to inform that a segmentation fault occurred. But at least "
          "it is better than a wrong answer%s",
          ".");
    fprintf(stderr,
            "[%s::DEBUG]\033[1;35m Here is the backtrace in case it is of any "
            "use:\n",
            __func__);
    backtrace_symbols_fd(&array[2], size - 1, STDERR_FILENO);
    fprintf(stderr, "\033[0m\n");
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
movq %rsp, %rdi
movl $0x64, %esi
callq 0x10c0
movl %eax, %ebx
movq 0x388b(%rip), %r15      # 0x5ff8
movq (%r15), %rdi
leaq 0xfe5(%rip), %rsi       # 0x375c
leaq 0x105d(%rip), %r14      # 0x37db
leaq 0xf16(%rip), %rcx       # 0x369b
movq %r14, %rdx
xorl %eax, %eax
callq 0x1130
movq (%r15), %rdi
leaq 0x104e(%rip), %rsi      # 0x37e7
movq %r14, %rdx
xorl %eax, %eax
callq 0x1130
leaq 0x10(%rsp), %rdi
decl %ebx
movl %ebx, %esi
movl $0x2, %edx
callq 0x1060
movq (%r15), %rcx
leaq 0x10b3(%rip), %rdi      # 0x3873
movl $0x5, %esi
movl $0x1, %edx
callq 0x1210
movl $0x1, %edi
callq 0x11f0
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stack.c
// Function: inits
void inits(istack *s){
    
    s->p = calloc(1,sizeof(node));
    s->p->next = NULL;
    s->p->prev = NULL;
    s->width = 0;
    s->store = s->p;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x2180
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stack.c
// Function: inserts
void inserts(istack *s, int a,int loc){
	node* newnode = (node *)malloc(sizeof(node));
	newnode->val = a;
	node *temp = s->store;
	if( loc > s->width + 1)
		return;
	else if(loc == 0){

		newnode->next = s->store;
        s->store->prev = newnode;
        newnode->prev = NULL;
		s->store = newnode;
		s->width++;
		return;
	}
	else if(loc == s->width + 1){
        newnode->next = NULL;
        s->p->next = newnode;
        newnode->prev = s->p;
		s->p = newnode;
		s->width++;
		return;
	}
	else if(loc > 0){
		while(loc > 1){
			temp = temp->next;
			loc--;
		}
		newnode->next = temp->next;
        newnode->next->prev = newnode;
        newnode->prev = temp;
		temp->next = newnode;
		s->width++;
		return;
	}
   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl $0x18, %edi
callq 0x21f0
movb %r15b, 0x8(%rax)
movl 0x8(%rbx), %ecx
incl %ecx
cmpl %r14d, %ecx
jl 0x24cf
movq (%rbx), %rdx
testl %r14d, %r14d
je 0x248e
cmpl %r14d, %ecx
jne 0x2499
movq $0x0, 0x10(%rax)
leaq 0x10(%rbx), %rdi
movq 0x10(%rbx), %rsi
leaq 0x10(%rsi), %rdx
movl %r14d, %ecx
jmp 0x24c3
movq %rdx, 0x10(%rax)
xorl %esi, %esi
movq %rbx, %rdi
jmp 0x24c3
testl %r14d, %r14d
jle 0x24cf
cmpl $0x1, %r14d
je 0x24b4
incl %r14d
movq 0x10(%rdx), %rdx
decl %r14d
cmpl $0x2, %r14d
ja 0x24a7
movq %rdx, %rsi
leaq 0x10(%rdx), %rdi
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rax)
movq %rax, (%rdx)
movq %rsi, (%rax)
movq %rax, (%rdi)
movl %ecx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stack.c
// Function: ipoploc
int ipoploc(istack *s,int x){
      //head pointer is ahead of the last element in the stack
    //printw("%d\t",s->width);
    pntr temp = s->store;
    int num;
    int i;
    if(x == 0){
        s->store = s->store->next;
        s->store->prev = NULL;
        num = temp->val;
        free(temp);
        s->width--;
        return num;
    }
    for(i = 0; i < x; i++)
        temp = temp->next;
    
    temp->prev->next = temp->next;
    temp->next->prev = temp->prev;
    s->width--;
    num = temp->val;
    free(temp);
    return num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testl %esi, %esi
je 0x2542
jle 0x2526
movq 0x10(%rdi), %rdi
decl %esi
jne 0x251e
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rcx)
decl 0x8(%rbx)
movb 0x8(%rdi), %r14b
callq 0x2030
jmp 0x255c
movq 0x10(%rdi), %rax
movq %rax, (%rbx)
movq $0x0, (%rax)
movb 0x8(%rdi), %r14b
callq 0x2030
decl 0x8(%rbx)
movsbl %r14b, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/line.c
// Function: enqueue_pos
void enqueue_pos(line *l, int a){
    point *newnode =  (point *)calloc(1,sizeof(point));
    inits(&(newnode->element));
    point* temp = l->front;
    int i = 0;
    for(; i < a; i++)
        temp = temp->tail;
    temp->head->tail = newnode;
    newnode->tail = temp;
    newnode->head = temp->head;
    temp->head = newnode;
    l->lines++;
    return;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x28, %esi
callq 0x2180
movq %rax, %r14
leaq 0x8(%rax), %rdi
callq 0x23dc
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %r15d, %eax
incl %eax
movq %rbx, %rcx
movq (%rcx), %rcx
decl %eax
jne 0x2654
movq 0x20(%rcx), %rax
movq %r14, (%rax)
movq %rcx, (%r14)
movq %rax, 0x20(%r14)
movq %r14, 0x20(%rcx)
incl 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/line.c
// Function: dequeueloc
void dequeueloc(line *s,int x){
    point* temp = s->front;
    int num;
    int i;
    for(i = 0; i < x; i++)
        temp = temp->tail;
    
    if(temp->tail == NULL){
        dequeue(s);
        return;
    }
    temp->head->tail = temp->tail;
    temp->tail->head = temp->head;

    s->lines--;
    free(temp);
    return;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
testl %esi, %esi
cmovgl %esi, %ecx
incl %ecx
movq %rdi, %rax
movq (%rax), %rax
decl %ecx
jne 0x26ab
movq (%rax), %rcx
testq %rcx, %rcx
je 0x26cd
movq 0x20(%rax), %rdx
movq %rcx, (%rdx)
movq (%rax), %rcx
movq %rdx, 0x20(%rcx)
decl 0x8(%rdi)
jmp 0x26e0
movq 0x10(%rdi), %rax
movq 0x20(%rax), %rcx
movq $0x0, (%rcx)
movq %rcx, 0x10(%rdi)
movq %rax, %rdi
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: line_num
void line_num(){
    int i,j;
    for(i = stline,j = 0; j < (by - 4) ;i++,j++){
        move(j,bx-1);
        printw("%d",(i+1)%10);
    }
    refresh();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x79d2(%rip), %r13      # 0xa18c
cmpl $0x5, (%r13)
jl 0x2831
leaq 0x79d4(%rip), %rax      # 0xa19c
movl (%rax), %r12d
incl %r12d
leaq 0x79bf(%rip), %r15      # 0xa194
leaq 0x4c51(%rip), %rbx      # 0x742d
xorl %r14d, %r14d
movq 0x77fa(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movl (%r15), %edx
decl %edx
movl %r14d, %esi
callq 0x2230
leal (%r12,%r14), %eax
movslq %eax, %rsi
imulq $0x66666667, %rsi, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
subl %eax, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2270
incl %r14d
movl (%r13), %eax
addl $-0x4, %eax
cmpl %eax, %r14d
jl 0x27df
movq 0x77a8(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: display
void display(int stline){
    //clear();
    move(0,0);
    int a,y,x;
    point *temp = data.front;
    for(a = 0; (a < stline) && (stline >=0); a++){
        temp = temp->tail;
    }
    int count = 1;
    while(temp){
        if(count >= (by - 3))
            break;
        clrtoeol();
        node *row = temp->element.store;
        while(row->next){
                printw("%c",row->val);
            row = row->next;    
        }
        count++;
        temp = temp->tail;
    }
    getyx(stdscr,y,x);
    refresh();
    line_num();
    move(y,x);
    refresh();
    return;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x777b(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2230
testl %ebx, %ebx
cmovgl %ebx, %r12d
incl %r12d
leaq 0x7954(%rip), %r14      # 0xa1d8
movq (%r14), %r14
decl %r12d
jne 0x2884
testq %r14, %r14
je 0x28eb
movl $0x1, %r12d
leaq 0x78ee(%rip), %r13      # 0xa18c
leaq 0x476f(%rip), %rbx      # 0x7014
movl (%r13), %eax
addl $-0x3, %eax
cmpl %eax, %r12d
jge 0x28eb
movq 0x7728(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
callq 0x2240
movq 0x8(%r14), %r15
cmpq $0x0, 0x10(%r15)
je 0x28e0
movsbl 0x8(%r15), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2270
movq 0x10(%r15), %r15
jmp 0x28c4
incl %r12d
movq (%r14), %r14
testq %r14, %r14
jne 0x28a5
movq 0x76ee(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2904
movswl (%rdi), %ebx
movswl 0x2(%rdi), %r14d
jmp 0x290f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
callq 0x2100
callq 0x27a5
movq 0x76c0(%rip), %r15      # 0x9fe0
movq (%r15), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x2230
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: initialise
void initialise(int line){
        initq(&data);
        inite(&states);
        inite(&redo);
        getmaxyx(stdscr,by,bx);
        return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x788a(%rip), %rdi      # 0xa1d8
callq 0x2598
leaq 0x785e(%rip), %rdi      # 0xa1b8
callq 0x5758
leaq 0x7862(%rip), %rdi      # 0xa1c8
callq 0x5758
movq 0x766e(%rip), %rax      # 0x9fe0
movq (%rax), %rcx
testq %rcx, %rcx
je 0x2988
movswl 0x4(%rcx), %eax
incl %eax
movswl 0x6(%rcx), %ecx
incl %ecx
jmp 0x2992
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0x77f3(%rip), %rdx      # 0xa18c
movl %eax, (%rdx)
leaq 0x77f2(%rip), %rax      # 0xa194
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: add_line
int add_line(int line){
    int i = 0;
    point *temp = data.front;
    if(line < lines){
        enqueue_pos(&data,line);
    }
    else if( lines == line){
        enqueue(&data);
    }
    for(i = 0; i < line - 1; i++){
        temp = temp->tail;
    }
    char *str = (char *)calloc(2,1);
    str[0] = '\0';
    int x,y;
    char ch[2] = {'\0'};
    i = 0;
    ch[0] = ipops(&(temp->element));

    getyx(stdscr,y,x);
    
    while(ch[0] != '\n'){
       
        i++;
        strcat(str,ch);
         str = realloc(str,strlen(str) +2);
        ch[0] = ipops(&(temp->element));
    }
    ipushs(&(temp->element),'\n');
    if(strlen(str)){
        while(i--){
            ipushs(&(temp->tail->element),str[i]);
        }
    }
    if(line < lines)
        ipushs(&(temp->tail->element),'\n');
    return temp->tail->element.width;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq 0x7818(%rip), %rax      # 0xa1d8
movq (%rax), %r13
leaq 0x77be(%rip), %rax      # 0xa188
cmpl %edi, (%rax)
jle 0x29de
leaq 0x7803(%rip), %rdi      # 0xa1d8
movl %ebx, %esi
callq 0x261b
jmp 0x29ec
jne 0x29ec
leaq 0x77f1(%rip), %rdi      # 0xa1d8
callq 0x25db
cmpl $0x2, %ebx
movq %rbx, -0x38(%rbp)
jl 0x2a00
leal -0x1(%rbx), %eax
movq (%r13), %r13
decl %eax
jne 0x29f8
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %r14
movw $0x0, -0x2a(%rbp)
leaq 0x8(%r13), %r15
movq %r15, %rdi
callq 0x24da
movb %al, -0x2a(%rbp)
xorl %ebx, %ebx
cmpb $0xa, %al
je 0x2a66
xorl %ebx, %ebx
leaq -0x2a(%rbp), %r12
incl %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2260
movq %r14, %rdi
callq 0x20c0
leaq 0x2(%rax), %rsi
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
movq %r15, %rdi
callq 0x24da
movb %al, -0x2a(%rbp)
cmpb $0xa, %al
jne 0x2a33
movq %r15, %rdi
movl $0xa, %esi
callq 0x2409
cmpb $0x0, (%r14)
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x2a9e
movslq %ebx, %rbx
movq (%r13), %rdi
addq $0x8, %rdi
movsbl -0x1(%r14,%rbx), %esi
callq 0x2409
decq %rbx
jne 0x2a86
movq -0x38(%rbp), %rax
leaq 0x76df(%rip), %rcx      # 0xa188
cmpl %eax, (%rcx)
jle 0x2abf
movq (%r13), %rdi
addq $0x8, %rdi
movl $0xa, %esi
callq 0x2409
movq (%r13), %rax
movl 0x10(%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: search_char
int search_char(char ch,int param,istack t){
    if(param == 0){
        node *temp = t.store;
        while(temp->next){
            if(ch == temp->val)
                return 1;
            temp = temp->next;
        }
        return 0;
    }
    else{
        point *temp = data.front;
        int i = 0;
        for(; i < param; i++)
            temp = temp->tail;
        node *trav = temp->element.store;
        while(trav->next){
            if(ch == trav->val)
                return 1;
            trav = trav->next;
        }
    }

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
je 0x2b14
xorl %eax, %eax
testl %esi, %esi
cmovgl %esi, %eax
incl %eax
leaq 0x76eb(%rip), %rcx      # 0xa1d8
movq (%rcx), %rcx
decl %eax
jne 0x2aed
movq 0x8(%rcx), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x2b0a
cmpb %dil, 0x8(%rax)
movq %rcx, %rax
jne 0x2af8
xorl %eax, %eax
testq %rcx, %rcx
setne %al
jmp 0x2b36
leaq 0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x2b34
cmpb %dil, 0x8(%rax)
movq %rcx, %rax
jne 0x2b1b
movl $0x1, %eax
jmp 0x2b36
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: getwidth
int getwidth(int y){
    point *temp = data.front;
    int i = 0;
    for(; i < y; i++){
        if(temp->tail == NULL)
            break;
        else
            temp = temp->tail;
    }
    if(ipeeps(&temp->element) == '\n')
        return (temp->element.width - 1);    
    else
        return (temp->element.width);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x7170(%rip), %rax      # 0xa1d8
movq (%rax), %rax
testl %edi, %edi
jle 0x3083
movq %rax, %rbx
movq (%rax), %rax
testq %rax, %rax
je 0x3086
movq %rax, %rbx
decl %edi
jne 0x306f
jmp 0x3086
movq %rax, %rbx
leaq 0x8(%rbx), %rdi
callq 0x2580
xorl %ecx, %ecx
cmpl $0xa, %eax
sete %cl
movl 0x10(%rbx), %eax
subl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: save
void save(char *fname){
    int fd = open(fname,O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR);
    //int i = 0, fd = open("random.txt", O_WRONLY | O_CREAT ,S_IRUSR | S_IWUSR);
    point *temp = data.front;
    while(temp){
        char *str = (char *)calloc(1,1);
        node *row = temp->element.store;
        char ch[2] = {'\0'};
        str = realloc(str,strlen(str)+1);
        while(row->next){
            write(fd,&row->val,1);
            row = row->next;
        }
        temp = temp->tail;
    }

    close(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x241, %esi            # imm = 0x241
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2210
movl %eax, %ebx
leaq 0x6ed8(%rip), %rax      # 0xa1d8
movq (%rax), %r15
testq %r15, %r15
je 0x3357
movl $0x1, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %r14
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x20c0
leaq 0x1(%rax), %rsi
movq %r14, %rdi
callq 0x2200
cmpq $0x0, 0x10(%r12)
je 0x3352
leaq 0x8(%r12), %rsi
movl $0x1, %edx
movl %ebx, %edi
callq 0x2080
movq 0x10(%r12), %r12
jmp 0x3332
movq (%r15), %r15
jmp 0x3303
movl %ebx, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2140
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq -0x32(%rbp), %rbx
movw $0x0, (%rbx)
leaq 0x6c33(%rip), %r15      # 0xa1a4
movl (%r15), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
leaq 0x6c13(%rip), %r12      # 0xa198
movl (%r12), %edi
movl $0x1, %edx
movq %rbx, %rsi
callq 0x2170
testl %eax, %eax
je 0x3668
movb -0x32(%rbp), %r13b
movl %r13d, %eax
andb $-0x5, %al
cmpb $0x9, %al
je 0x3585
movl -0x30(%rbp), %r14d
movl %r14d, %edi
callq 0x305b
movl %eax, %r15d
cmpb $0xa, %r13b
jne 0x35ed
movl $0xa, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0x2b38
incl %r14d
leaq 0x6bae(%rip), %rax      # 0xa188
incl (%rax)
movl %r14d, %edi
callq 0x29a6
movl -0x2c(%rbp), %r15d
incl %r15d
jmp 0x3635
movsbl %r13b, %edi
movl %r14d, %esi
movl %r15d, %edx
callq 0x2b38
leaq 0x6b91(%rip), %rax      # 0xa194
movl (%rax), %eax
addl $-0x3, %eax
cmpl %eax, %r15d
jge 0x362b
movq 0x69cc(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
incl %r15d
movl %r14d, %esi
movl %r15d, %edx
callq 0x2230
movl -0x2c(%rbp), %r15d
jmp 0x364d
movl -0x2c(%rbp), %r15d
incl %r15d
incl %r14d
movq 0x69a4(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
movl %r14d, -0x30(%rbp)
movl %r14d, %esi
xorl %edx, %edx
callq 0x2230
leaq 0x6b3c(%rip), %rax      # 0xa190
movl %r15d, -0x2c(%rbp)
cmpl (%rax), %r15d
leaq 0x6b42(%rip), %r15      # 0xa1a4
jl 0x3585
movq 0x6971(%rip), %rbx      # 0x9fe0
movq (%rbx), %rdi
callq 0x20a0
leaq 0x6b1e(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x284e
movq (%rbx), %rdi
callq 0x2100
leaq 0x6afc(%rip), %rax      # 0xa190
movl (%rax), %eax
addl %eax, (%r15)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: get_word
char* get_word(FILE *fp){
    char ch='\0';
    int i = 0;
    char *temp  = (char *)calloc(50,sizeof(char));
    ch = '\0';
    while(ch != EOF){
        ch= fgetc(fp);
        if(ch == 10 || ch == 13 || ch == ' ' || ch == EOF){
            temp[i] = '\0';
            if(ch == EOF)
                return NULL;
            i=0;
            return temp;
        }
        else{
        temp[i] = ch;
        i++;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x32, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %rbx
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2130
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xcffffff, %ecx        # imm = 0xCFFFFFF
jg 0x36f6
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0x3713
cmpl $0xa000000, %ecx        # imm = 0xA000000
jne 0x3706
jmp 0x3713
cmpl $0x20000000, %ecx       # imm = 0x20000000
je 0x3713
cmpl $0xd000000, %ecx        # imm = 0xD000000
je 0x3713
movb %al, (%rbx,%r15)
incq %r15
cmpb $-0x1, %al
jne 0x36cf
jmp 0x3726
xorl %eax, %eax
cmpl $0xff000000, %ecx       # imm = 0xFF000000
movl %r15d, %ecx
movb $0x0, (%rbx,%rcx)
cmoveq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: printopt
void printopt(WINDOW *win, char** dict,int mark,int count){
    int x,y,i;
    x = 1; 
    y = 1;
    box(win,0,0);
    for(i = 0; i < 4 && i < count; i++ ){                        //show 4 or less most relevant words;
        if(mark == i+1){
            wattron(win,A_REVERSE);
            mvwprintw(win,y,x,"%s",dict[i]);
            wattroff(win,A_REVERSE);
        }
        else{
            mvwprintw(win, y, x, "%s", dict[i]);
        }
        y++;
    }
    wrefresh(win);
    return; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
subq $0x8, %rsp
xorl %eax, %eax
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
testl %r12d, %r12d
jle 0x3803
decl %r12d
cmpq $0x3, %r12
movl $0x3, %r13d
cmovbq %r12, %r13
movl %r15d, %r12d
negq %r13
movl $0x1, %r15d
cmpq %r15, %r12
jne 0x37d5
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x2160
movq -0x8(%r14,%r15,8), %r8
movq %rbx, %rdi
movl %r15d, %esi
movl $0x1, %edx
leaq 0x3951(%rip), %rcx      # 0x710e
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x22c0
jmp 0x37f3
movq -0x8(%r14,%r15,8), %r8
movq %rbx, %rdi
movl %r15d, %esi
movl $0x1, %edx
leaq 0x3922(%rip), %rcx      # 0x710e
xorl %eax, %eax
callq 0x2110
leaq (%r15,%r13), %rax
incq %rax
incq %r15
cmpq $0x2, %rax
jne 0x3792
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: master_menu
void master_menu(){
    int y,x;
    getyx(stdscr,y,x);
    WINDOW *menu = create_newwin(3,bx,by-3,0);
    //wborder(menu, ' ', ' ', ' ',' ',' ',' ',' ',' ');
    wattron(menu,A_REVERSE);
    mvwprintw(menu,1,1," OPTIONS:F1 | SAVE:F5 | EXIT:F2 | ^X:CUT | ^C:COPY | SUGGESTIONS:TAB | VASU'S TEXT EDITOR | LINE NO.: %d | COORDINATES:(%d,%d)| #LINE:%d",y+stline+1,x,y,(y+stline)/10);
    wattroff(menu,A_REVERSE);
    wrefresh(menu);
    move(y,x);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x6315(%rip), %r12      # 0x9fe0
movq (%r12), %rax
testq %rax, %rax
je 0x3cde
movswl (%rax), %ebx
movswl 0x2(%rax), %r14d
jmp 0x3ce9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
leaq 0x64a4(%rip), %rax      # 0xa194
movl (%rax), %esi
leaq 0x6493(%rip), %rax      # 0xa18c
movl (%rax), %edx
addl $-0x3, %edx
movl $0x3, %edi
xorl %ecx, %ecx
callq 0x2708
movq %rax, %r15
movq %rax, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x2160
leaq 0x6479(%rip), %rax      # 0xa19c
movl (%rax), %eax
leal (%rax,%rbx), %r8d
incl %r8d
addl %ebx, %eax
cltq
imulq $0x66666667, %rax, %r10 # imm = 0x66666667
movq %r10, %rax
shrq $0x3f, %rax
sarq $0x22, %r10
addl %eax, %r10d
leaq 0x32e8(%rip), %rcx      # 0x7034
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
movl %r14d, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbx
callq 0x2110
addq $0x10, %rsp
movq %r15, %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x22c0
movq %r15, %rdi
callq 0x2100
movq (%r12), %rdi
movl %ebx, %esi
movl %r14d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2230
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: line_copy
char* line_copy(int y){
    point *temp = data.front;
    while(y--){
        temp = temp->tail;
    }
    int i;
    node * traverse = temp->element.store;
    char *str = (char *)calloc(temp->element.width  + 1,1);
    for(i = 0; i < temp->element.width; i++){
        if(traverse->val == '\n')
            break;
        str[i] = traverse->val;
        traverse = traverse->next;
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
incl %edi
leaq 0x6431(%rip), %rbx      # 0xa1d8
movq (%rbx), %rbx
decl %edi
jne 0x3da7
movslq 0x10(%rbx), %r14
leaq 0x1(%r14), %rdi
movl $0x1, %esi
callq 0x2180
testq %r14, %r14
jle 0x3de5
addq $0x8, %rbx
xorl %ecx, %ecx
movq (%rbx), %rbx
movb 0x8(%rbx), %dl
cmpb $0xa, %dl
je 0x3de5
movb %dl, (%rax,%rcx)
addq $0x10, %rbx
incq %rcx
cmpq %rcx, %r14
jne 0x3dcb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: line_cut
char* line_cut(int y){
    point *temp = data.front;
    while(y--){
        temp = temp->tail;
    }
    int i = 0;
    char ch;
    char *str = (char *)calloc(temp->element.width  + 2,1);
    while(1){
        if(!isEmptys(&(temp->element))){
            ch = ipoploc(&(temp->element),0);
        }
        else
            break;
        if(ch == '\n'){
            inserts(&(temp->element),ch,0);
            break;
        }
        str[i++] = ch;
        str = realloc(str,strlen(str) + 2);
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
incl %edi
leaq 0x63db(%rip), %rbx      # 0xa1d8
movq (%rbx), %rbx
decl %edi
jne 0x3dfd
movslq 0x10(%rbx), %rdi
addq $0x8, %rbx
addq $0x2, %rdi
movl $0x1, %esi
callq 0x2180
movq %rax, %r14
movq %rbx, %rdi
callq 0x2565
testl %eax, %eax
jne 0x3e75
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x250b
cmpb $0xa, %al
je 0x3e66
movb %al, (%r14,%r15)
incq %r15
movq %r14, %rdi
callq 0x20c0
leaq 0x2(%rax), %rsi
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
movq %rbx, %rdi
callq 0x2565
testl %eax, %eax
je 0x3e2c
jmp 0x3e75
movq %rbx, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x243d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: word_cut
char* word_cut(int p,int q){
    point *temp = data.front;
    while(q--){
        temp = temp->tail;
    }
    int i = 0;
    char ch;
    char *str = (char *)calloc(2,1); 
    while(1){
        if(!isEmptys(&(temp->element)))
            ch = ipoploc(&(temp->element),p);
        else
            break;
        
        if(ch == '\n' || ch == ' '){
            inserts(&(temp->element),ch,p);
            break;
        }
        str[i++] = ch;    
        str = realloc(str,strlen(str) + 2);
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
incl %esi
leaq 0x633f(%rip), %r14      # 0xa1d8
movq (%r14), %r14
decl %esi
jne 0x3e99
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %r15
addq $0x8, %r14
movq %r14, %rdi
callq 0x2565
testl %eax, %eax
jne 0x3f14
xorl %r12d, %r12d
movq %r14, %rdi
movl %ebx, %esi
callq 0x250b
cmpb $0x20, %al
je 0x3f07
movzbl %al, %ecx
cmpl $0xa, %ecx
je 0x3f07
movb %al, (%r15,%r12)
incq %r12
movq %r15, %rdi
callq 0x20c0
leaq 0x2(%rax), %rsi
movq %r15, %rdi
callq 0x2200
movq %rax, %r15
movq %r14, %rdi
callq 0x2565
testl %eax, %eax
je 0x3ec5
jmp 0x3f14
movzbl %al, %esi
movq %r14, %rdi
movl %ebx, %edx
callq 0x243d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: word_copy
char* word_copy(int p,int q){
    point *temp = data.front;
    while(q--){
        temp = temp->tail;
    }
    int i = 0;
    node * traverse = temp->element.store;
    while(p--){
        traverse = traverse->next;
    }
    char *str = (char *)calloc(2,1);
    while(1){
        if(!traverse->next || traverse->val == '\n' || traverse->val == ' ')
            break;
        str[i++] = traverse->val;
        str = realloc(str,strlen(str) + 2);
        traverse = traverse->next;
    }
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
incl %esi
leaq 0x62a4(%rip), %rax      # 0xa1d8
movq (%rax), %rax
decl %esi
jne 0x3f34
movq 0x8(%rax), %r14
testl %edi, %edi
je 0x3f4b
movq 0x10(%r14), %r14
decl %edi
jne 0x3f43
movl $0x2, %edi
movl $0x1, %esi
callq 0x2180
movq %rax, %rbx
cmpq $0x0, 0x10(%r14)
je 0x3fa7
leaq 0x10(%r14), %r12
xorl %r15d, %r15d
movzbl 0x8(%r14), %eax
cmpl $0xa, %eax
je 0x3fa7
cmpl $0x20, %eax
je 0x3fa7
movb %al, (%rbx,%r15)
incq %r15
movq %rbx, %rdi
callq 0x20c0
leaq 0x2(%rax), %rsi
movq %rbx, %rdi
callq 0x2200
movq %rax, %rbx
movq (%r12), %r14
leaq 0x10(%r14), %r12
cmpq $0x0, 0x10(%r14)
jne 0x3f6b
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/stdedit.c
// Function: self_destruct
void self_destruct(){
    while(!isEmptyq(&data)){
        while(!isEmptys(&(data.front->element)))
                ipops(&(data.front->element));
        dequeue(&data);
    }
    printf("\nThe Program terminated Successfully :)\nThanks For Using Vasu's Text Editor\n\n");
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x5229(%rip), %rbx      # 0xa1d8
movq %rbx, %rdi
callq 0x26e9
testl %eax, %eax
je 0x4fc9
jmp 0x4fe3
movq (%rbx), %rdi
addq $0x8, %rdi
callq 0x24da
movq (%rbx), %rdi
addq $0x8, %rdi
callq 0x2565
testl %eax, %eax
je 0x4fbd
movq %rbx, %rdi
callq 0x267b
jmp 0x4faf
leaq 0x2493(%rip), %rdi      # 0x747d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2060
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/undo.c
// Function: backtrack
void backtrack(undo *s){
    if(isEmptye(s) || (s->num == 0)){
       return; 
    }
    event e = epop(s);
    
    if(strstr(e.state,"replace")){
        undo_replace(e);        
        char *temp = e.p3;
        e.p3 = e.p4;
        e.p4 = temp;
        epush(&redo,e);
    }
    else if(strstr(e.state,"add")){
        undo_insert(e);
        
    }
    else if(strstr(e.state,"back")){
        undo_back(e);
    }
    else if(strstr(e.state,"next")){
        undo_next(e);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
callq 0x5806
testl %eax, %eax
je 0x50a1
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x0, 0x8(%rbx)
je 0x5098
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x57b4
movq (%r14), %rbx
leaq 0x2337(%rip), %rsi      # 0x73f7
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
je 0x5127
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x51d3
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x50ab(%rip), %rdi      # 0xa1c8
callq 0x576c
jmp 0x5098
leaq 0x1eee(%rip), %rsi      # 0x701c
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
je 0x515f
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x544a
jmp 0x5098
leaq 0x1eba(%rip), %rsi      # 0x7020
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
je 0x5197
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x5535
jmp 0x5098
leaq 0x1e79(%rip), %rsi      # 0x7017
movq %rbx, %rdi
callq 0x22d0
testq %rax, %rax
je 0x5098
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x55fd
jmp 0x5098
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/undo.c
// Function: undo_insert
void undo_insert(event e){
    int x,y;
    getyx(stdscr,y,x);
    if(strstr(e.p3,"\n")){
        backspace(e.p2,1);
        epop(&states);
        display(stline);
        refresh();
        move(y,x);
    }
    else{
        backspace(e.p2,e.p1+1);
        epop(&states);
        display(stline);
        refresh();
    }
    if(x == e.p1)
        move(y,++x);

    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x10(%rbp), %r12
movq 0x4b7c(%rip), %r15      # 0x9fe0
movq (%r15), %rax
testq %rax, %rax
je 0x5476
movswl (%rax), %ebx
movswl 0x2(%rax), %r14d
jmp 0x5481
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x10(%r12), %rdi
movl $0xa, %esi
callq 0x20e0
movl 0xc(%r12), %edi
testq %rax, %rax
je 0x54de
movl $0x1, %esi
callq 0x30a3
leaq 0x4d0d(%rip), %rsi      # 0xa1b8
leaq -0x48(%rbp), %rdi
callq 0x57b4
leaq 0x4ce1(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x284e
movq (%r15), %rdi
callq 0x2100
movq (%r15), %rdi
movl %ebx, %esi
movl %r14d, %edx
callq 0x2230
movl 0x8(%r12), %r12d
jmp 0x5513
movl 0x8(%r12), %r12d
leal 0x1(%r12), %esi
callq 0x30a3
leaq 0x4cc4(%rip), %rsi      # 0xa1b8
leaq -0x48(%rbp), %rdi
callq 0x57b4
leaq 0x4c98(%rip), %rax      # 0xa19c
movl (%rax), %edi
callq 0x284e
movq (%r15), %rdi
callq 0x2100
cmpl %r12d, %r14d
jne 0x5528
movq (%r15), %rdi
incl %r14d
movl %ebx, %esi
movl %r14d, %edx
callq 0x2230
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/undo.c
// Function: undo_back
void undo_back(event e){
    int y,x;
    getyx(stdscr,y,x);
    if(strstr(e.p3,"\n")){
        add_char('\n',e.p2,e.p1);
        add_line(e.p2);
        display(stline);
        move(y,x+1);
    }
    else{
        add_char(e.p3[0],e.p2,e.p1-1);
        display(stline);
        move(y,x+1);
    }   
    display(stline);
    move(y,x+1);
    refresh();
    return;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x10(%rbp), %r13
movq 0x4a92(%rip), %r12      # 0x9fe0
movq (%r12), %rax
testq %rax, %rax
je 0x5563
movswl (%rax), %r14d
movswl 0x2(%rax), %ebx
incl %ebx
jmp 0x556b
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movq 0x10(%r13), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x20e0
testq %rax, %rax
je 0x55a0
movl 0x8(%r13), %edx
movl 0xc(%r13), %r15d
movl $0xa, %edi
movl %r15d, %esi
callq 0x2b38
movl %r15d, %edi
callq 0x29a6
jmp 0x55b3
movsbl (%r15), %edi
movl 0x8(%r13), %edx
movl 0xc(%r13), %esi
decl %edx
callq 0x2b38
leaq 0x4be2(%rip), %r15      # 0xa19c
movl (%r15), %edi
callq 0x284e
movq (%r12), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x2230
movl (%r15), %edi
callq 0x284e
movq (%r12), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x2230
movq (%r12), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/undo.c
// Function: undo_next
void undo_next(event e){
    int x = 0,y = 0;
    getyx(stdscr,y,x);
    backspace(e.p2,0);
    epop(&states);
    clear();
    if((y == 0 ) && (stline != 0)){
        stline--;
    }
    display(stline);
    if(stline >  0){
        move(e.p2 - stline,getwidth(e.p2));
    }
    else{
        x += 2;
        move(e.p2,getwidth(e.p2 -stline));
    }
    refresh();
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x10(%rbp), %rax
movq 0x49c9(%rip), %r12      # 0x9fe0
movq (%r12), %rcx
testq %rcx, %rcx
je 0x562a
cmpw $0x0, (%rcx)
sete %r14b
jmp 0x562d
xorl %r14d, %r14d
movl 0xc(%rax), %ebx
movl %ebx, %edi
xorl %esi, %esi
callq 0x30a3
leaq 0x4b78(%rip), %rsi      # 0xa1b8
leaq -0x48(%rbp), %rdi
callq 0x57b4
movq (%r12), %rdi
callq 0x20a0
leaq 0x4b43(%rip), %r15      # 0xa19c
movl (%r15), %edi
testl %edi, %edi
setne %al
andb %r14b, %al
cmpb $0x1, %al
jne 0x566d
decl %edi
movl %edi, (%r15)
callq 0x284e
movl (%r15), %eax
movl %ebx, %r14d
subl %eax, %r14d
testl %eax, %eax
movq (%r12), %r15
movl %r14d, %edi
cmovgl %ebx, %edi
cmovlel %ebx, %r14d
callq 0x305b
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x2230
movq (%r12), %rdi
callq 0x2100
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vasusharma7[P]Text-Editor/undo.c
// Function: retrack
void retrack(undo *s){
     if(isEmptye(s) || s->num == 0){
       return; 
    }
    event e = epop(s);
    if(strstr(e.state,"replace")){
        undo_replace(e);        
        char *temp = e.p3;
        e.p3 = e.p4;
        e.p4 = temp;
        epush(&states,e);       
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
callq 0x5806
testl %eax, %eax
je 0x56d3
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x0, 0x8(%rbx)
je 0x56ca
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x57b4
movq (%r14), %rdi
leaq 0x1d05(%rip), %rsi      # 0x73f7
callq 0x22d0
testq %rax, %rax
je 0x56ca
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x51d3
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, 0x20(%rsp)
movups -0x38(%rbp), %xmm0
movups -0x28(%rbp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x4a6c(%rip), %rdi      # 0xa1b8
callq 0x576c
jmp 0x56ca
nop