LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ALEhelpers.c
// Function: loadAssembly
assemblyT *loadAssembly(char *filename) {

    // attempt to open the input file
    gzFile assemblyFile = gzopen(filename, "r");
    kseq_t *Aseq;
    if(assemblyFile == NULL){
        printf("Error! Could not open assembly file: %s\n", filename);
        exit(1);
    }

    assemblyT *theAssembly = malloc(sizeof(assemblyT));
    if (theAssembly == NULL)
        exit(1);

    Aseq = kseq_init(assemblyFile);

    readAssembly(Aseq, theAssembly);

    kseq_destroy(Aseq);

    //printf("Done reading in assembly.\n");

    //printAssembly(theAssembly);
    assemblySanityCheck(theAssembly);
    gzclose(assemblyFile);

    return theAssembly;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x196ba(%rip), %rsi     # 0x259c7
callq 0x34f0
testq %rax, %rax
je 0xc3de
movq %rax, %rbx
movl $0xa8, %edi
callq 0x3420
testq %rax, %rax
je 0xc3ef
movq %rax, %r14
movl $0x1, %edi
movl $0x70, %esi
callq 0x3310
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x3310
movq %rax, %r12
movq %rbx, 0x18(%rax)
movl $0x4000, %edi           # imm = 0x4000
callq 0x3420
movq %rax, (%r12)
movq %r12, 0x68(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0xb661
movq 0x10(%r15), %rdi
callq 0x3070
movq 0x28(%r15), %rdi
callq 0x3070
movq 0x40(%r15), %rdi
callq 0x3070
movq 0x58(%r15), %rdi
callq 0x3070
movq 0x68(%r15), %r12
testq %r12, %r12
je 0xc3b7
movq (%r12), %rdi
callq 0x3070
movq %r12, %rdi
callq 0x3070
movq %r15, %rdi
callq 0x3070
movq %r14, %rdi
callq 0xc1f6
movq %rbx, %rdi
callq 0x3060
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x17cf0(%rip), %rdi     # 0x240d5
movq %r14, %rsi
xorl %eax, %eax
callq 0x3210
movl $0x1, %edi
callq 0x35c0
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ALEhelpers.c
// Function: freeAssembly
void freeAssembly(assemblyT *theAssembly) {
    if (theAssembly != NULL) {
        if (theAssembly->contigs != NULL) {
        	int i;
        	for (i = 0; i < theAssembly->numContigs; i++)
        		freeContig(theAssembly->contigs[i]);
        	free(theAssembly->contigs);
        }
        free(theAssembly);
    }
}

// Assembly:
testq %rdi, %rdi
je 0xc4b2
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
testq %rdi, %rdi
je 0xc4a3
cmpl $0x0, (%rbx)
jle 0xc49e
xorl %r14d, %r14d
movq 0xa0(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0xc3f9
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0xc47c
movq 0xa0(%rbx), %rdi
callq 0x3070
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3070
retq
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ALEhelpers.c
// Function: openSamOrBam
samfile_t *openSamOrBam(const char *fileName) {
    samfile_t *in = samopen(fileName, "rb", 0);
    if (in == NULL || in->header == NULL) {
        printf("Checking if %s is a SAM formatted file, instead of BAM\n", fileName);
        in = samopen(fileName, "r", 0);
        if (in == NULL || in->header == NULL) {
            printf("Error! Failed to open BAM/SAM file %s\n", fileName);
            exit(1);
        }
    }
    return in;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x17c40(%rip), %rsi     # 0x240fe
xorl %edx, %edx
callq 0x14196
testq %rax, %rax
je 0xc4d1
cmpq $0x0, 0x10(%rax)
jne 0xc4ff
leaq 0x17c29(%rip), %rdi     # 0x24101
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3210
leaq 0x194de(%rip), %rsi     # 0x259c7
movq %rbx, %rdi
xorl %edx, %edx
callq 0x14196
testq %rax, %rax
je 0xc501
cmpq $0x0, 0x10(%rax)
je 0xc501
popq %rbx
retq
leaq 0x17c31(%rip), %rdi     # 0x24139
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3210
movl $0x1, %edi
callq 0x35c0
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ssw.c
// Function: ssw_init
s_profile* ssw_init (const int8_t* read, const int32_t readLen, const int8_t* mat, const int32_t n, const int8_t score_size) {
	s_profile* p = (s_profile*)calloc(1, sizeof(struct _profile));
	p->profile_byte = 0;
	p->profile_word = 0;
	p->bias = 0;

	if (score_size == 0 || score_size == 2) {
		/* Find the bias to use in the substitution matrix */
		int32_t bias = 0, i;
		for (i = 0; i < n*n; i++) if (mat[i] < bias) bias = mat[i];
		bias = abs(bias);

		p->bias = bias;
		p->profile_byte = qP_byte (read, mat, readLen, n, bias);
	}
	if (score_size == 1 || score_size == 2) p->profile_word = qP_word (read, mat, readLen, n);
	p->read = read;
	p->mat = mat;
	p->readLen = readLen;
	p->n = n;
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl $0x1, %edi
movl $0x30, %esi
callq 0x3310
movq %rax, %r12
testb $-0x3, %r13b
je 0xd533
decb %r13b
cmpb $0x1, %r13b
jbe 0xd57f
movq %r15, 0x10(%r12)
movq %r14, 0x18(%r12)
movl %ebp, 0x20(%r12)
movl %ebx, 0x24(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
testl %ebx, %ebx
je 0xd55a
movl %ebx, %ecx
imull %ecx, %ecx
cmpl $0x1, %ecx
adcl $0x0, %ecx
xorl %edx, %edx
xorl %eax, %eax
movsbl (%r14,%rdx), %esi
cmpl %esi, %eax
cmovgel %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0xd548
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movb %cl, 0x28(%r12)
movzbl %cl, %r8d
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x38dd
movq %rax, (%r12)
jmp 0xd504
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x3990
movq %rax, 0x8(%r12)
jmp 0xd50d
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ssw.c
// Function: add_cigar
uint32_t* add_cigar (uint32_t* new_cigar, int32_t* p, int32_t* s, uint32_t length, char op) {
	if ((*p) >= (*s)) {
		++(*s);
		kroundup32(*s);
		new_cigar = (uint32_t*)realloc(new_cigar, (*s)*sizeof(uint32_t));
	}
	new_cigar[(*p) ++] = to_cigar_int(length, op);
	return new_cigar;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %r14d
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %rax
movl (%rsi), %ecx
movl (%rdx), %esi
cmpl %esi, %ecx
jl 0xe255
movl %esi, %ecx
sarl %ecx
orl %esi, %ecx
movl %ecx, %esi
sarl $0x2, %esi
orl %ecx, %esi
movl %esi, %ecx
sarl $0x4, %ecx
orl %esi, %ecx
movl %ecx, %esi
sarl $0x8, %esi
orl %ecx, %esi
movl %esi, %ecx
sarl $0x10, %ecx
orl %esi, %ecx
leal 0x1(%rcx), %esi
movl %esi, (%rdx)
movslq %ecx, %rcx
leaq 0x4(,%rcx,4), %rsi
movq %rax, %rdi
callq 0x3480
movl (%rbx), %ecx
shll $0x4, %ebp
movsbq %r14b, %rdx
leaq 0x1618d(%rip), %rsi     # 0x243f0
movzbl (%rdx,%rsi), %edx
orl %ebp, %edx
leal 0x1(%rcx), %esi
movl %esi, (%rbx)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/ssw.c
// Function: store_previous_m
uint32_t* store_previous_m (int8_t choice,	// 0: current not M, 1: current match, 2: current mismatch
					   uint32_t* length_m,
					   uint32_t* length_x,
					   int32_t* p,
					   int32_t* s,
					   uint32_t* new_cigar) {

	if ((*length_m) && (choice == 2 || !choice)) {
		new_cigar = add_cigar (new_cigar, p, s, (*length_m), '='); 
		(*length_m) = 0;
	} else if ((*length_x) && (choice == 1 || !choice)) { 
		new_cigar = add_cigar (new_cigar, p, s, (*length_x), 'X'); 
		(*length_x) = 0;
	}
	return new_cigar;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movq %rdx, %rbx
movq %rsi, %r14
movl (%rsi), %r9d
testl %r9d, %r9d
sete %dl
testb $-0x3, %dil
setne %sil
orb %dl, %sil
jne 0xe2b5
movq %rax, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl $0x3d, %r8d
callq 0xe202
jmp 0xe2e5
movl (%rbx), %r9d
testl %r9d, %r9d
sete %dl
cmpb $0x2, %dil
setae %sil
orb %dl, %sil
jne 0xe2ec
movq %rax, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl $0x58, %r8d
callq 0xe202
movq %rbx, %r14
movl $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/ryuichiueda[P]glueutils/src_con12/con12safe.cpp
// Function: thread_read(void*)
void *thread_read(void *arg)
{
	int *fd = (int *)arg;
	char buf[1024];
	string line;
	int ret = 1;
	while (ret > 0){
		ret = read(*fd, &buf, 1024);
		for(int i=0;i<ret;i++){
			line += buf[i];
			if(buf[i] == '\n'){
				mtx.lock();
				fputs(line.c_str(), stdout);
				fflush(stdout);
				mtx.unlock();
				line.clear();
			}
		}
	}
	mtx.lock();
	fputs(line.c_str(), stdout);
	fflush(stdout);
	mtx.unlock();

	if(ret == -1){
		fputs("Error: reading error\n", stderr);
		exit(1);
	}
	try_close(*fd);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rdi, 0x20(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %r12
leaq 0x2cdc(%rip), %r13      # 0x40e0
movq 0x2bbd(%rip), %rbp      # 0x3fc8
movq 0x20(%rsp), %rax
movl (%rax), %edi
movl $0x400, %edx            # imm = 0x400
leaq 0x30(%rsp), %rsi
callq 0x1130
movq %rax, %rbx
testl %ebx, %ebx
jle 0x14a3
movq %rbx, 0x28(%rsp)
movl %ebx, %r14d
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movb 0x30(%rsp,%rbx), %r15b
movsbl %r15b, %esi
movq %r12, %rdi
callq 0x10b0
cmpb $0xa, %r15b
jne 0x148e
movq %r13, %rdi
callq 0x1140
testl %eax, %eax
jne 0x1515
movq (%rsp), %rdi
movq (%rbp), %rsi
callq 0x10e0
movq (%rbp), %rdi
callq 0x10f0
movq %r13, %rdi
callq 0x1080
movq $0x0, 0x8(%rsp)
movq (%rsp), %rax
movb $0x0, (%rax)
incq %rbx
cmpq %rbx, %r14
jne 0x1439
movq 0x28(%rsp), %rbx
testl %ebx, %ebx
jg 0x140b
leaq 0x2c36(%rip), %rdi      # 0x40e0
callq 0x1140
testl %eax, %eax
jne 0x151c
movq (%rsp), %rdi
movq (%rbp), %rsi
callq 0x10e0
movq (%rbp), %rdi
callq 0x10f0
leaq 0x2c10(%rip), %rdi      # 0x40e0
callq 0x1080
cmpl $-0x1, %ebx
je 0x1528
movq 0x20(%rsp), %rax
movl (%rax), %edi
leaq 0x10(%rsp), %r14
callq 0x139c
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1501
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x10d0
xorl %eax, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1070
movl %eax, %edi
leaq 0x10(%rsp), %r14
callq 0x1070
callq 0x11e4
movq %rax, %rbx
jmp 0x153e
jmp 0x1536
jmp 0x1536
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1554
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x10d0
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/ryuichiueda[P]glueutils/src_con12/con12safe.cpp
// Function: main
int main(int argc, char * argv[])
{
	if(argc < 2){
		usage();
		exit(1);
	}

	int pips[2];
	if(pipe(pips) < 0){
		fputs("Error: pipe open error", stderr);
		exit(1);
	}

	int epips[2];
	if(pipe(epips) < 0){
		fputs("Error: pipe open error", stderr);
		exit(1);
	}

	int opips[2];
	if(pipe(opips) < 0){
		fputs("Error: pipe open error", stderr);
		exit(1);
	}

	int pid = fork();
	if(pid != 0){//parent proc
		try_close(0);
		try_close(pips[1]);
		if(dup2(pips[0], 0) == -1){
			fprintf(stderr, "Error: %s\n", strerror(errno));
			exit(1);
		}
		try_close(pips[0]);

	}else{//child proc
		close(2);
		dup2(epips[1], 2);
		close(epips[1]);
		try_close(pips[1]);

		close(1);
		dup2(opips[1], 1);
	//	close(opips[1]);
		try_close(opips[1]);

		return -execvp(argv[1], &argv[1]);
	}

	pthread_t pthread;
	pthread_create(&pthread, NULL, thread_read, &epips[0]);

	pthread_t pthread2;
	pthread_create(&pthread2, NULL, thread_read, &opips[0]);

	/*
	pthread_join(pthread2,NULL);
	*/

	int wstatus;
	int wpid;
	int lasterror = 0;
	if((wpid = waitpid(pid, &wstatus, 0)) > 0){
		if(WIFEXITED(wstatus) && WEXITSTATUS(wstatus)){
			lasterror = WEXITSTATUS(wstatus);
		}
	}


	exit(lasterror);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpl $0x1, %edi
jle 0x1611
movq %rsi, %rbx
leaq 0x4(%rsp), %rdi
callq 0x1110
testl %eax, %eax
js 0x1616
leaq 0x18(%rsp), %rdi
callq 0x1110
testl %eax, %eax
js 0x161b
leaq 0x10(%rsp), %rdi
callq 0x1110
testl %eax, %eax
js 0x1620
callq 0x1050
testl %eax, %eax
jne 0x1625
movl $0x2, %edi
callq 0x1170
movl 0x1c(%rsp), %edi
movl $0x2, %esi
callq 0x10c0
movl 0x1c(%rsp), %edi
callq 0x1170
movl 0x8(%rsp), %edi
callq 0x139c
movl $0x1, %edi
callq 0x1170
movl 0x14(%rsp), %edi
movl $0x1, %esi
callq 0x10c0
movl 0x14(%rsp), %edi
callq 0x139c
movq 0x8(%rbx), %rdi
addq $0x8, %rbx
movq %rbx, %rsi
callq 0x1090
negl %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x1293
callq 0x1274
callq 0x1255
callq 0x1236
movl %eax, %ebp
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x139c
movl 0x8(%rsp), %edi
callq 0x139c
movl 0x4(%rsp), %edi
xorl %esi, %esi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x164e
callq 0x1203
movl 0x4(%rsp), %edi
callq 0x139c
leaq -0x28e(%rip), %r14      # 0x13d0
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rcx
xorl %esi, %esi
movq %r14, %rdx
callq 0x1160
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rcx
xorl %esi, %esi
movq %r14, %rdx
callq 0x1160
leaq 0xc(%rsp), %rsi
movl %ebp, %edi
xorl %edx, %edx
callq 0x10a0
testl %eax, %eax
jle 0x16a3
movl 0xc(%rsp), %eax
testb $0x7f, %al
jne 0x16a3
movzbl %ah, %ebx
movl %ebx, %edi
callq 0x1100
// File: /workspace/github_c_makefile_star2_O3/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.10/socket-server.c
// Function: server
int server(int client_socket)
{
    while (1)
    {
        int length;
        char *text;
        /* First, read the length of the text message from the socket. If read returns zero, the client closed the connection. */
        if (read(client_socket, &length, sizeof(length)) == 0)
            return 0;
        /* Allocate a buffer to hold the text. */
        text = (char *)malloc(length);
        /* Read the text itself, and print it. */

        read(client_socket, text, length);
        printf("%s\n", text);

        /* If the client sent the message "quit," we’re all done. */
        if (!strcmp(text, "quit"))
        {
            free(text);
            return 1;
        }
        /* Free the buffer. */
        free(text);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
callq 0x1090
xorl %ecx, %ecx
testq %rax, %rax
je 0x1288
leaq 0xddc(%rip), %r15       # 0x2004
leaq -0x2c(%rbp), %r12
movslq -0x2c(%rbp), %r13
movq %r13, %rdi
callq 0x10b0
movq %rax, %r14
movl %ebx, %edi
movq %rax, %rsi
movq %r13, %rdx
callq 0x1090
movq %r14, %rdi
callq 0x1060
movq %r14, %rdi
movq %r15, %rsi
callq 0x10a0
movl %eax, %r13d
movq %r14, %rdi
callq 0x1030
testl %r13d, %r13d
je 0x1283
movl $0x4, %edx
movl %ebx, %edi
movq %r12, %rsi
callq 0x1090
testq %rax, %rax
jne 0x122c
xorl %ecx, %ecx
jmp 0x1288
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: xitoa
static char *xitoa(uint_t val)
{
	static char dst[32] = {'\0'};
	static const char digits[201] =
		"0001020304050607080910111213141516171819"
		"2021222324252627282930313233343536373839"
		"4041424344454647484950515253545556575859"
		"6061626364656667686970717273747576777879"
		"8081828384858687888990919293949596979899";
	uint_t next = 30, quo, i;

	while (val >= 100) {
		quo = val / 100;
		i = (val - (quo * 100)) * 2;
		val = quo;
		dst[next] = digits[i + 1];
		dst[--next] = digits[i];
		--next;
	}

	/* Handle last 1-2 digits */
	if (val < 10)
		dst[next] = '0' + val;
	else {
		i = val * 2;
		dst[next] = digits[i + 1];
		dst[--next] = digits[i];
	}

	return &dst[next];
}

// Assembly:
movl $0x1e, %eax
leaq 0x106d1(%rip), %rdx     # 0x16650
leaq 0x15afa(%rip), %rcx     # 0x1ba80
cmpl $0x64, %edi
jb 0x5fd1
movl $0x1e, %eax
movl %edi, %esi
imulq $0x51eb851f, %rsi, %rsi # imm = 0x51EB851F
shrq $0x25, %rsi
imull $0x7fffff9c, %esi, %r8d # imm = 0x7FFFFF9C
addl %edi, %r8d
addl %r8d, %r8d
movb (%r8,%rdx), %r9b
movb 0x1(%r8,%rdx), %r8b
movl %eax, %r10d
movb %r8b, (%r10,%rcx)
leal -0x1(%rax), %r8d
movb %r9b, (%r8,%rcx)
addl $-0x2, %eax
cmpl $0x270f, %edi           # imm = 0x270F
movl %esi, %edi
ja 0x5f90
jmp 0x5fd3
movl %edi, %esi
cmpl $0x9, %esi
ja 0x5fde
orb $0x30, %sil
jmp 0x5ff8
movl %esi, %esi
leaq (%rsi,%rsi), %rdi
movl %edi, %edi
movb 0x1(%rdi,%rdx), %dil
movl %eax, %r8d
movb %dil, (%r8,%rcx)
movb (%rdx,%rsi,2), %sil
decl %eax
movl %eax, %edx
leaq (%rcx,%rdx), %rax
movb %sil, (%rdx,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: cleanup
static void cleanup(void)
{
#ifndef NOX11
	if (cfg.x11 && !g_state.picker) {
		printf("\033[23;0t"); /* reset terminal window title */
		fflush(stdout);
	}
#endif
	free(selpath);
	free(plgpath);
	free(cfgpath);
	free(initpath);
	free(bmstr);
	free(pluginstr);
	free(listroot);
	free(ihashbmp);
	free(bookmark);
	free(plug);
	if (lastcmdpos != INVALID_POS)
		for (uchar_t pos = 0; pos <= lastcmdpos; ++pos)
			free(cmd_hist[pos]);
#ifndef NOFIFO
	if (g_state.autofifo)
		unlink(fifopath);
#endif
	if (g_state.pluginit)
		unlink(g_pipepath);
#ifdef DEBUG
	disabledbg();
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testb $0x4, 0x14234(%rip)     # 0x1a4cb
je 0x62bf
testb $0x10, 0x14285(%rip)    # 0x1a525
jne 0x62bf
leaq 0xfb3d(%rip), %rdi      # 0x15de6
xorl %eax, %eax
callq 0x4320
movq 0x13cb9(%rip), %rax     # 0x19f70
movq (%rax), %rdi
callq 0x45d0
movq 0x14262(%rip), %rdi     # 0x1a528
callq 0x4090
movq 0x157ce(%rip), %rdi     # 0x1baa0
callq 0x4090
movq 0x1568a(%rip), %rdi     # 0x1b968
callq 0x4090
movq 0x1434e(%rip), %rdi     # 0x1a638
callq 0x4090
movq 0x1436a(%rip), %rdi     # 0x1a660
callq 0x4090
movq 0x14376(%rip), %rdi     # 0x1a678
callq 0x4090
movq 0x1579a(%rip), %rdi     # 0x1baa8
callq 0x4090
movq 0x15796(%rip), %rdi     # 0x1bab0
callq 0x4090
movq 0x14332(%rip), %rdi     # 0x1a658
callq 0x4090
movq 0x1433e(%rip), %rdi     # 0x1a670
callq 0x4090
movb 0x1419b(%rip), %bl      # 0x1a4d8
cmpb $-0x1, %bl
je 0x6361
xorl %r14d, %r14d
leaq 0x15774(%rip), %r15     # 0x1bac0
movzbl %r14b, %r14d
movq (%r15,%r14,8), %rdi
callq 0x4090
incb %r14b
cmpb %bl, %r14b
jbe 0x634c
movl 0x141bd(%rip), %eax     # 0x1a524
testb $0x1, %al
je 0x637d
movq 0x155de(%rip), %rdi     # 0x1b950
callq 0x40d0
movl 0x141a7(%rip), %eax     # 0x1a524
btl $0xd, %eax
jb 0x6389
popq %rbx
popq %r14
popq %r15
retq
leaq 0x157b0(%rip), %rdi     # 0x1bb40
popq %rbx
popq %r14
popq %r15
jmp 0x40d0
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: parsekvpair
static bool parsekvpair(kv **arr, char **envcpy, const uchar_t id, uchar_t *items)
{
	bool new = TRUE;
	const uchar_t INCR = 8;
	uint_t i = 0;
	kv *kvarr = NULL;
	char *ptr = getenv(env_cfg[id]);

	if (!ptr || !*ptr)
		return TRUE;

	*envcpy = xstrdup(ptr);
	if (!*envcpy) {
		xerror();
		return FALSE;
	}

	ptr = *envcpy;

	while (*ptr && i < 100) {
		if (new) {
			if (!(i & (INCR - 1))) {
				kvarr = xrealloc(kvarr, sizeof(kv) * (i + INCR));
				*arr = kvarr;
				if (!kvarr) {
					xerror();
					return FALSE;
				}
				memset(kvarr + i, 0, sizeof(kv) * INCR);
			}
			kvarr[i].key = (uchar_t)*ptr;
			if (*++ptr != ':' || *++ptr == '\0' || *ptr == ';')
				return FALSE;
			kvarr[i].off = ptr - *envcpy;
			++i;

			new = FALSE;
		}

		if (*ptr == ';') {
			*ptr = '\0';
			new = TRUE;
		}

		++ptr;
	}

	*items = i;
	return (i != 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %eax
leaq 0x13065(%rip), %rcx     # 0x19aa0
movq (%rcx,%rax,8), %rdi
callq 0x4050
movq %rax, %rdi
movb $0x1, %al
testq %rdi, %rdi
je 0x6b37
cmpb $0x0, (%rdi)
je 0x6b37
callq 0x6bd7
movq %rax, (%r15)
testq %rax, %rax
je 0x6b30
movq %rax, %r12
movb (%rax), %cl
testb %cl, %cl
je 0x6b24
movb $0x1, %al
xorl %r13d, %r13d
xorl %ebp, %ebp
testb $0x1, %al
je 0x6b00
testb $0x7, %bpl
je 0x6a8e
movl %ebp, %edx
jmp 0x6ac8
leal 0x40(,%rbp,8), %esi
movq %r13, %rdi
callq 0x4640
testq %rax, %rax
je 0x6b46
movq %rax, (%r14)
movl %ebp, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax,%rdx,8)
movups %xmm0, 0x20(%rax,%rdx,8)
movups %xmm0, 0x10(%rax,%rdx,8)
movups %xmm0, (%rax,%rdx,8)
movb (%r12), %cl
movq %rax, %r13
movzbl %cl, %eax
movl %eax, (%r13,%rdx,8)
cmpb $0x3a, 0x1(%r12)
jne 0x6b35
movzbl 0x2(%r12), %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x6b37
cmpl $0x3b, %ecx
je 0x6b37
addq $0x2, %r12
movl (%r15), %eax
movl %r12d, %ecx
subl %eax, %ecx
movl %ecx, 0x4(%r13,%rdx,8)
incl %ebp
movb (%r12), %cl
cmpb $0x3b, %cl
sete %al
jne 0x6b0d
movb $0x0, (%r12)
movb 0x1(%r12), %cl
testb %cl, %cl
je 0x6b26
incq %r12
cmpl $0x64, %ebp
jb 0x6a80
jmp 0x6b26
xorl %ebp, %ebp
movb %bpl, (%rbx)
testl %ebp, %ebp
setne %al
jmp 0x6b37
callq 0x4b62
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %r14, %rsi
callq 0x4b42
jmp 0x6b35
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: get_kv_val
static char *get_kv_val(kv *kvarr, char *buf, int key, uchar_t max, uchar_t id)
{
	char *val;

	if (!kvarr)
		return NULL;

	for (int r = 0; r < max && kvarr[r].key; ++r) {
		if (kvarr[r].key == key) {
			/* Do not allocate new memory for plugin */
			if (id == NNN_PLUG)
				return pluginstr + kvarr[r].off;

			val = bmstr + kvarr[r].off;
			bool tilde = convert_tilde(val, g_buf);
			return abspath((tilde ? g_buf : val), NULL, buf);
		}
	}

	DPRINTF_S("Invalid key");
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
sete %al
testl %ecx, %ecx
sete %sil
orb %al, %sil
je 0x6b70
xorl %r14d, %r14d
jmp 0x6b9f
movzbl %cl, %eax
xorl %r14d, %r14d
xorl %ecx, %ecx
movl (%rdi,%rcx,8), %esi
testl %esi, %esi
je 0x6b9f
cmpl %edx, %esi
je 0x6b8d
incq %rcx
cmpq %rcx, %rax
jne 0x6b78
jmp 0x6b9f
movslq 0x4(%rdi,%rcx,8), %r14
cmpb $0x2, %r8b
jne 0x6baa
addq 0x13ad9(%rip), %r14     # 0x1a678
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq 0x13aaf(%rip), %r14     # 0x1a660
movq %r14, %rdi
callq 0xece1
leaq 0x13b90(%rip), %rdi     # 0x1a750
testb %al, %al
cmoveq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6003
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: xdiraccess
static bool xdiraccess(const char *path)
{
	DIR *dirp = opendir(path);

	if (!dirp) {
		printwarn(NULL);
		return FALSE;
	}

	closedir(dirp);
	return TRUE;
}

// Assembly:
pushq %rbx
callq 0x4270
movq %rax, %rbx
testq %rax, %rax
je 0x6c8f
movq %rbx, %rdi
callq 0x4400
jmp 0x6ca3
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
callq 0xec60
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: mkpath
static size_t mkpath(const char *dir, const char *name, char *out)
{
	size_t len = 0;

	/* same rational for being strict as abspath() */
	if (tilde_is_home_strict(name)) { //NOLINT
		len = xstrsncpy(out, home, PATH_MAX);
		--len;
		++name;
	} else if (name[0] != '/') { // NOLINT
		/* Handle root case */
		len = istopdir(dir) ? 1 : xstrsncpy(out, dir, PATH_MAX);
		out[len - 1] = '/'; // NOLINT
	}
	return (xstrsncpy(out + len, name, PATH_MAX - len) + len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movzbl (%rsi), %eax
cmpl $0x2f, %eax
je 0x6dfd
movq %rdi, %rsi
cmpl $0x7e, %eax
jne 0x6dbc
cmpb $0x2f, 0x1(%r14)
jne 0x6dbc
movq 0x138b4(%rip), %rsi     # 0x1a640
movl $0x1000, %ecx           # imm = 0x1000
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x6dae
leaq 0x1000(%rbx), %rax
movb $0x0, 0xfff(%rbx)
incq %r14
movq %rbx, %r15
notq %r15
addq %rax, %r15
jmp 0x6e00
cmpb $0x0, 0x1(%rsi)
jne 0x6dcd
movl $0x1, %r15d
cmpb $0x2f, (%rsi)
je 0x6df5
movl $0x1000, %ecx           # imm = 0x1000
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4860
movq %rax, %r15
testq %rax, %rax
jne 0x6df2
leaq 0x1000(%rbx), %r15
movb $0x0, 0xfff(%rbx)
subq %rbx, %r15
movb $0x2f, -0x1(%rbx,%r15)
jmp 0x6e00
xorl %r15d, %r15d
leaq (%rbx,%r15), %r12
movl $0x1000, %ecx           # imm = 0x1000
subq %r15, %rcx
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x6e38
cmpq $0x1000, %r15           # imm = 0x1000
je 0x6e2e
movb $0x0, 0xfff(%rbx)
addq $0x1000, %rbx           # imm = 0x1000
movq %rbx, %rax
subq %r12, %r15
addq %rax, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: seltofile
static size_t seltofile(int fd, uint_t *pcount, const char *separator)
{
	uint_t lastpos, count = 0;
	char *pbuf = pselbuf;
	size_t pos = 0;
	ssize_t len, prefixlen = 0, initlen = 0;

	if (pcount)
		*pcount = 0;

	if (!selbufpos)
		return 0;

	lastpos = selbufpos - 1;

	if (listpath) {
		prefixlen = (ssize_t)xstrlen(listroot);
		initlen = (ssize_t)xstrlen(listpath);
	}

	while (pos <= lastpos) {
		DPRINTF_S(pbuf);
		len = (ssize_t)xstrlen(pbuf);

		if (!listpath || !is_prefix(pbuf, listpath, initlen)) {
			if (write(fd, pbuf, len) != len)
				return pos;
		} else {
			if (write(fd, listroot, prefixlen) != prefixlen)
				return pos;
			if (write(fd, pbuf + initlen, len - initlen) != (len - initlen))
				return pos;
		}

		pos += len;
		if (pos <= lastpos) {
			if (write(fd, separator, 1) != 1)
				return pos;
			pbuf += len + 1;
		}
		++pos;
		++count;
	}

	if (pcount)
		*pcount = count;

	return pos;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x30(%rsp)
movq 0xd0f5(%rip), %r15      # 0x1ba78
testq %rsi, %rsi
je 0xe98e
movl $0x0, (%rsi)
movl 0xd0dc(%rip), %ebp      # 0x1ba70
testl %ebp, %ebp
je 0xe9de
movl %edi, 0xc(%rsp)
movq %rsi, 0x20(%rsp)
decl %ebp
movq 0xd1d6(%rip), %r14      # 0x1bb80
xorl %ebx, %ebx
testq %r14, %r14
je 0xe9e6
movq 0xd0f0(%rip), %r12      # 0x1baa8
movq %r12, %rdi
xorl %esi, %esi
callq 0x4490
subq %r12, %rax
movq %rax, 0x18(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x4490
subq %r14, %rax
movq %rax, 0x10(%rsp)
jmp 0xe9f8
xorl %r12d, %r12d
jmp 0xeac9
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movl %ebp, %r13d
xorl %r12d, %r12d
movq %r13, 0x28(%rsp)
movl 0xc(%rsp), %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x4490
movq %rax, %r14
subq %r15, %r14
movq 0xd162(%rip), %rsi      # 0x1bb80
testq %rsi, %rsi
je 0xea34
movq %r15, %rdi
movq 0x10(%rsp), %rdx
callq 0x40f0
testl %eax, %eax
je 0xea4a
movl 0xc(%rsp), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4210
cmpq %r14, %rax
je 0xea88
jmp 0xeac9
movq 0xd057(%rip), %rsi      # 0x1baa8
movl %ebp, %edi
movq 0x18(%rsp), %r13
movq %r13, %rdx
callq 0x4210
cmpq %r13, %rax
jne 0xeac9
movq 0x10(%rsp), %rax
leaq (%r15,%rax), %rsi
movq %r14, %r13
subq %rax, %r13
movl %ebp, %edi
movq %r13, %rdx
callq 0x4210
cmpq %r13, %rax
movq 0x28(%rsp), %r13
jne 0xeac9
addq %r14, %r12
cmpq %r13, %r12
ja 0xeaaf
movl $0x1, %edx
movl 0xc(%rsp), %edi
movq 0x30(%rsp), %rsi
callq 0x4210
cmpq $0x1, %rax
jne 0xeac9
addq %r14, %r15
incq %r15
incq %r12
incl %ebx
cmpq %r13, %r12
jbe 0xea07
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xeac9
movl %ebx, (%rax)
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: rmlistpath
static void rmlistpath(void)
{
	if (listpath) {
		DPRINTF_S(__func__);
		DPRINTF_S(listpath);
		spawn(utils[UTIL_RM_RF], listpath, NULL, NULL, F_NOTRACE | F_MULTI);
		/* Do not free if program was started in list mode */
		if (listpath != initpath)
			free(listpath);
		listpath = NULL;
	}
}

// Assembly:
movq 0xd09e(%rip), %rsi      # 0x1bb80
testq %rsi, %rsi
je 0xeb22
pushq %rax
leaq 0x73c9(%rip), %rdi      # 0x15eb8
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x5, %r8d
callq 0xf3d1
movq 0xd07b(%rip), %rdi      # 0x1bb80
cmpq 0xbb2c(%rip), %rdi      # 0x1a638
je 0xeb13
callq 0x4090
movq $0x0, 0xd062(%rip) # 0x1bb80
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: notify_fifo
static void notify_fifo(bool force)
{
	if (!fifopath)
		return;

	if (fifofd == -1) {
		fifofd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC);
		if (fifofd == -1) {
			if (errno != ENXIO)
				/* Unexpected error, the FIFO file might have been removed */
				/* We give up FIFO notification */
				fifopath = NULL;
			return;
		}
	}

	static struct entry lastentry;

	if (!force && !memcmp(&lastentry, &pdents[cur], sizeof(struct entry))) // NOLINT
		return;

	lastentry = pdents[cur];

	char path[PATH_MAX];
	size_t len = mkpath(g_ctx[cfg.curctx].c_path, ndents ? pdents[cur].name : "", path);

	path[len - 1] = '\n';

	ssize_t ret = write(fifofd, path, len);

	if (ret != (ssize_t)len && !(ret == -1 && (errno == EAGAIN || errno == EPIPE))) {
		DPRINTF_S(strerror(errno));
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %edi, %ebx
movq 0xce18(%rip), %rdi      # 0x1b950
testq %rdi, %rdi
je 0xec1f
cmpl $-0x1, 0xb97c(%rip)     # 0x1a4c4
jne 0xeb65
movl $0x80801, %esi          # imm = 0x80801
xorl %eax, %eax
callq 0x46b0
movl %eax, 0xb968(%rip)      # 0x1a4c4
cmpl $-0x1, %eax
je 0xec2c
movq 0x15504(%rip), %r14     # 0x24070
movslq 0x15505(%rip), %r15     # 0x24078
testb %bl, %bl
jne 0xeb9b
leaq (%r15,%r15,2), %rsi
shlq $0x4, %rsi
addq %r14, %rsi
leaq 0x1680f(%rip), %rdi     # 0x25398
movl $0x30, %edx
callq 0x4620
testl %eax, %eax
je 0xec1f
leaq (%r15,%r15,2), %rax
shlq $0x4, %rax
movups (%r14,%rax), %xmm0
movups 0x10(%r14,%rax), %xmm1
movups 0x20(%r14,%rax), %xmm2
movups %xmm2, 0x167fd(%rip)    # 0x253b8
movups %xmm1, 0x167e6(%rip)    # 0x253a8
movups %xmm0, 0x167cf(%rip)    # 0x25398
movl 0xb8f9(%rip), %ecx      # 0x1a4c8
shrl $0xd, %ecx
andl $0x7, %ecx
imulq $0x2138, %rcx, %rcx     # imm = 0x2138
leaq 0xcfad(%rip), %rdi      # 0x1bb90
addq %rcx, %rdi
cmpl $0x0, 0xcf9f(%rip)      # 0x1bb8c
je 0xebf7
addq %rax, %r14
movq (%r14), %rsi
jmp 0xebfe
leaq 0x7748(%rip), %rsi      # 0x16346
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x6d5c
movb $0xa, -0x1(%rax,%rbx)
movl 0xb8b0(%rip), %edi      # 0x1a4c4
movq %rbx, %rsi
movq %rax, %rdx
callq 0x4210
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
callq 0x40c0
cmpl $0x6, (%rax)
je 0xec1f
movq $0x0, 0xcd0f(%rip) # 0x1b950
jmp 0xec1f
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: convert_tilde
static bool convert_tilde(const char *path, char *buf)
{
	if (tilde_is_home(path)) {
		ssize_t len = xstrlen(home);
		ssize_t loclen = xstrlen(path);

		xstrsncpy(buf, home, len + 1);
		xstrsncpy(buf + len, path + 1, loclen);
		return true;
	}
	return false;
}

// Assembly:
cmpb $0x7e, (%rdi)
jne 0xeda6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzbl 0x1(%rdi), %eax
cmpl $0x2f, %eax
je 0xed0c
testl %eax, %eax
jne 0xeda9
leaq 0x1(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0xb924(%rip), %r13      # 0x1a640
movq %r13, %rdi
xorl %esi, %esi
callq 0x4490
movq %rax, %r14
subq %r13, %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4490
movq %rax, %r15
movq %rax, 0x8(%rsp)
subq %rbx, %r15
movq %r14, %rbp
incq %rbp
sete 0x7(%rsp)
leaq 0xb9fd(%rip), %r12      # 0x1a750
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x4860
testq %rax, %rax
setne %al
orb 0x7(%rsp), %al
jne 0xed75
movb $0x0, -0x1(%rbp,%r12)
addq %r14, %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x4860
testq %rax, %rax
setne %al
cmpq %rbx, 0x8(%rsp)
sete %cl
orb %al, %cl
movb $0x1, %al
jne 0xedab
movb $0x0, -0x1(%r12,%r15)
jmp 0xedab
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: printwait
static void printwait(const char *msg, int *presel)
{
	printmsg(msg);
	if (presel) {
		*presel = MSGWAIT;
		if (ndents)
			xstrsncpy(g_ctx[cfg.curctx].c_name, pdents[cur].name, NAME_MAX + 1);
	}
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0xec60
testq %rbx, %rbx
je 0xee31
movl $0x24, (%rbx)
cmpl $0x0, 0xcdb7(%rip)      # 0x1bb8c
je 0xee31
movl 0xb6eb(%rip), %eax      # 0x1a4c8
shrl $0xd, %eax
andl $0x7, %eax
imulq $0x2138, %rax, %rax     # imm = 0x2138
leaq 0xcd9f(%rip), %rcx      # 0x1bb90
leaq (%rax,%rcx), %rbx
addq $0x2000, %rbx           # imm = 0x2000
movq 0x1526d(%rip), %rax     # 0x24070
movslq 0x1526e(%rip), %rcx     # 0x24078
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rsi
movl $0x100, %ecx            # imm = 0x100
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0xee31
movb $0x0, 0xff(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: reventrycmp
static int reventrycmp(const void *va, const void *vb)
{
	if ((((pEntry)vb)->flags & DIR_OR_DIRLNK)
	    != (((pEntry)va)->flags & DIR_OR_DIRLNK)) {
		if (((pEntry)vb)->flags & DIR_OR_DIRLNK)
			return 1;
		return -1;
	}

	return -entrycmp(va, vb);
}

// Assembly:
movzbl 0x27(%rsi), %ecx
andl $0x1, %ecx
movzbl 0x27(%rdi), %eax
andl $0x1, %eax
cmpl %eax, %ecx
jne 0xee52
pushq %rax
callq 0xee5d
negl %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: entrycmp
static int entrycmp(const void *va, const void *vb)
{
	const struct entry *pa = (pEntry)va;
	const struct entry *pb = (pEntry)vb;

	if ((pb->flags & DIR_OR_DIRLNK) != (pa->flags & DIR_OR_DIRLNK)) {
		if (pb->flags & DIR_OR_DIRLNK)
			return 1;
		return -1;
	}

	/* Sort based on specified order */
	if (cfg.timeorder) {
		if (pb->sec > pa->sec)
			return 1;
		if (pb->sec < pa->sec)
			return -1;
		/* If sec matches, comare nsec */
		if (pb->nsec > pa->nsec)
			return 1;
		if (pb->nsec < pa->nsec)
			return -1;
	} else if (cfg.sizeorder) {
		if (pb->size > pa->size)
			return 1;
		if (pb->size < pa->size)
			return -1;
	} else if (cfg.blkorder) {
		if (pb->blocks > pa->blocks)
			return 1;
		if (pb->blocks < pa->blocks)
			return -1;
	} else if (cfg.extnorder && !(pb->flags & DIR_OR_DIRLNK)) {
		char *extna = xextension(pa->name, pa->nlen - 1);
		char *extnb = xextension(pb->name, pb->nlen - 1);

		if (extna || extnb) {
			if (!extna)
				return -1;

			if (!extnb)
				return 1;

			int ret = strcasecmp(extna, extnb);

			if (ret)
				return ret;
		}
	}

	return namecmpfn(pa->name, pb->name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x20(%rsi), %r15
movq %r15, %rcx
shrq $0x38, %rcx
andl $0x1, %ecx
movq 0x20(%rdi), %rdx
btq $0x38, %rdx
movl %ecx, %eax
sbbl $0x0, %eax
jne 0xef16
movq %rsi, %rbx
movq %rdi, %r14
movl 0xb634(%rip), %eax      # 0x1a4c8
testb $0x2, %al
jne 0xef2a
testb $0x4, %al
jne 0xef42
testb $0x10, %al
jne 0xef5a
testb $0x20, %al
sete %al
orb %al, %cl
jne 0xef86
movq (%r14), %rdi
shrq $0x28, %rdx
movl $0xffff, %r13d          # imm = 0xFFFF
andq %r13, %rdx
decq %rdx
movl $0x2e, %esi
callq 0x46f0
movq %rax, %r12
movq (%rbx), %rdi
shrq $0x28, %r15
andq %r13, %r15
decq %r15
movl $0x2e, %esi
movq %r15, %rdx
callq 0x46f0
movq %rax, %rsi
testq %r12, %r12
je 0xef9e
testq %rsi, %rsi
je 0xef9e
movq %r12, %rdi
callq 0x40b0
testl %eax, %eax
jne 0xef20
jmp 0xef86
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%r14), %rcx
movl $0x1, %eax
cmpq %rcx, 0x8(%rbx)
jg 0xef20
jge 0xef76
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xef20
movq 0x18(%r14), %rcx
movl $0x1, %eax
cmpq %rcx, 0x18(%rbx)
jg 0xef20
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0xef20
jmp 0xef86
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %r15
andq %rax, %rdx
movl $0x1, %eax
cmpq %rdx, %r15
ja 0xef20
jmp 0xef7f
movl 0x10(%r14), %ecx
cmpl %ecx, 0x10(%rbx)
ja 0xef20
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jb 0xef20
movq 0xb55b(%rip), %rax      # 0x1a4e8
movq (%r14), %rdi
movq (%rbx), %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rax
xorl %eax, %eax
cmpq $0x1, %r12
sbbl %eax, %eax
orq %r12, %rsi
jne 0xef1d
jmp 0xef86
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: xstricmp
static int xstricmp(const char * const s1, const char * const s2)
{
	char *p1, *p2;

	long long v1 = strtoll(s1, &p1, 10);
	long long v2 = strtoll(s2, &p2, 10);

	/* Check if at least 1 string is numeric */
	if (s1 != p1 || s2 != p2) {
		/* Handle both pure numeric */
		if (s1 != p1 && s2 != p2) {
			if (v2 > v1)
				return -1;

			if (v1 > v2)
				return 1;
		}

		/* Only first string non-numeric */
		if (s1 == p1)
			return 1;

		/* Only second string non-numeric */
		if (s2 == p2)
			return -1;
	}

	/* Handle 1. all non-numeric and 2. both same numeric value cases */
#ifndef NOLC
	return strcoll(s1, s2);
#else
	return strcasecmp(s1, s2);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movl $0xa, %edx
callq 0x44f0
movq %rax, %r15
movq %rsp, %r13
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x44f0
movq (%r12), %rcx
movq %rcx, %rsi
xorq %rbx, %rsi
movq (%r13), %rdx
movq %rdx, %rdi
xorq %r14, %rdi
orq %rsi, %rdi
jne 0xf15b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4630
cmpq %r14, %rdx
sete %dl
cmpq %rbx, %rcx
sete %sil
orb %dl, %sil
je 0xf17e
xorl %eax, %eax
cmpq %rbx, %rcx
sete %al
leal -0x1(,%rax,2), %ecx
jmp 0xf18f
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %r15, %rax
jg 0xf18f
movl $0x1, %ecx
jge 0xf143
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: create_tmp_file
static int create_tmp_file(void)
{
	xstrsncpy(g_tmpfpath + tmpfplen - 1, messages[STR_TMPFILE], TMP_LEN_MAX - tmpfplen);

	int fd = mkstemp(g_tmpfpath);

	if (fd == -1) {
		DPRINTF_S(strerror(errno));
	}

	return fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzbl 0xb3ba(%rip), %r15d     # 0x1a740
leaq -0x40(%r15), %rbx
negq %rbx
leaq 0xb36c(%rip), %rax      # 0x1a700
leaq (%r15,%rax), %r14
decq %r14
leaq 0x6b37(%rip), %rsi      # 0x15ed9
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4860
cmpq $0x40, %r15
je 0xf3c0
testq %rax, %rax
jne 0xf3c0
movb $0x0, -0x1(%r14,%rbx)
leaq 0xb339(%rip), %rdi      # 0x1a700
popq %rbx
popq %r14
popq %r15
jmp 0x4470
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: writesel
static void writesel(const char *buf, const size_t buflen)
{
	if (!selpath)
		return;

	int fd = open(selpath, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR);

	if (fd != -1) {
		if (write(fd, buf, buflen) != (ssize_t)buflen)
			printwarn(NULL);
		close(fd);
	} else
		printwarn(NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0xad1c(%rip), %rdi      # 0x1a528
testq %rdi, %rdi
je 0xf85e
movq %rsi, %r14
movl $0x241, %esi            # imm = 0x241
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x46b0
cmpl $-0x1, %eax
je 0xf864
movl %eax, %ebx
movl %eax, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4210
cmpq %r14, %rax
je 0xf852
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
callq 0xec60
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x43c0
popq %rbx
popq %r14
popq %r15
retq
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xec60
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: dentfree
static void dentfree(void)
{
	free(pnamebuf);
	free(pdents);
	free(mark);

	/* Thread data cleanup */
	free(core_blocks);
	free(core_data);
	free(core_files);
}

// Assembly:
pushq %rax
movq 0x149ab(%rip), %rdi     # 0x242a0
callq 0x4090
movq 0x1476f(%rip), %rdi     # 0x24070
callq 0x4090
movq 0x149a3(%rip), %rdi     # 0x242b0
callq 0x4090
movq 0x159b7(%rip), %rdi     # 0x252d0
callq 0x4090
movq 0x159b3(%rip), %rdi     # 0x252d8
callq 0x4090
movq 0x159af(%rip), %rdi     # 0x252e0
popq %rax
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: printerr
static void printerr(int linenum)
{
	exitcurses();
	perror(xitoa(linenum));
	if (!g_state.picker && selpath)
		unlink(selpath);
	free(pselbuf);
	exit(1);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x4890
movl %ebx, %edi
callq 0x5f73
movq %rax, %rdi
callq 0x4740
testb $0x10, 0xa809(%rip)     # 0x1a525
sete %al
movq 0xa802(%rip), %rdi      # 0x1a528
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xfd38
callq 0x40d0
movq 0xbd39(%rip), %rdi      # 0x1ba78
callq 0x4090
movl $0x1, %edi
callq 0x4800
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: visit_parent
static char *visit_parent(char *path, char *newpath, int *presel)
{
	char *dir;

	/* There is no going back */
	if (istopdir(path)) {
		/* Continue in type-to-nav mode, if enabled */
		if (cfg.filtermode && presel)
			*presel = FILTER;
		return NULL;
	}

	/* Use a copy as xdirname() may change the string passed */
	if (newpath)
		xstrsncpy(newpath, path, PATH_MAX);
	else
		newpath = path;

	dir = xdirname(newpath);
	if (chdir(dir) == -1) {
		printwarn(presel);
		return NULL;
	}

	return dir;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
cmpb $0x0, 0x1(%rdi)
jne 0x10d26
cmpb $0x2f, (%rsi)
jne 0x10d26
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x10d9e
movl 0x97b3(%rip), %eax      # 0x1a4c8
andl $0x1, %eax
je 0x10d9e
movl $0x2f, (%rbx)
jmp 0x10d9b
testq %r14, %r14
je 0x10d49
movl $0x1000, %ecx           # imm = 0x1000
movq %r14, %rdi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10d4c
movb $0x0, 0xfff(%r14)
jmp 0x10d4c
movq %rsi, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x4490
subq %r14, %rax
movq %r14, %rdi
movl $0x2f, %esi
movq %rax, %rdx
callq 0x46f0
leaq 0x1(%r14), %rcx
cmpq %r14, %rax
cmovneq %rax, %rcx
movb $0x0, (%rcx)
movq %r14, %rdi
callq 0x42d0
cmpl $-0x1, %eax
jne 0x10d9e
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
movq %rbx, %rsi
callq 0xedba
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: cdprep
static bool cdprep(char *lastdir, char *lastname, char *path, char *newpath)
{
	if (lastname)
		lastname[0] =  '\0';

	/* Save last working directory */
	xstrsncpy(lastdir, path, PATH_MAX);

	/* Save the newly opted dir in path */
	xstrsncpy(path, newpath, PATH_MAX);
	DPRINTF_S(path);

	clearfilter();
	return cfg.filtermode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
je 0x10dbf
movb $0x0, (%rsi)
movl $0x1000, %ecx           # imm = 0x1000
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10dde
movb $0x0, 0xfff(%r15)
movl $0x1000, %ecx           # imm = 0x1000
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4860
testq %rax, %rax
jne 0x10dfc
movb $0x0, 0xfff(%rbx)
movl 0x96c6(%rip), %eax      # 0x1a4c8
movl %eax, %ecx
shrl $0xd, %ecx
andl $0x7, %ecx
imulq $0x2138, %rcx, %rcx     # imm = 0x2138
leaq 0xad78(%rip), %rsi      # 0x1bb90
movb 0x2101(%rcx,%rsi), %dl
testb %dl, %dl
je 0x10e34
addq %rsi, %rcx
addq $0x2100, %rcx           # imm = 0x2100
movb %dl, 0x2f(%rcx)
movb $0x0, 0x1(%rcx)
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: move_cursor
static void move_cursor(int target, int ignore_scrolloff)
{
	target = MAX(0, MIN(ndents - 1, target));
	last_curscroll = curscroll;
	last = cur;
	cur = target;

	if (!ignore_scrolloff) {
		int delta = target - last;
		int scrolloff = MIN(SCROLLOFF, ONSCREEN >> 1);

		/*
		 * When ignore_scrolloff is 1, the cursor can jump into the scrolloff
		 * margin area, but when ignore_scrolloff is 0, act like a boa
		 * constrictor and squeeze the cursor towards the middle region of the
		 * screen by allowing it to move inward and disallowing it to move
		 * outward (deeper into the scrolloff margin area).
		 */
		if (((cur < (curscroll + scrolloff)) && delta < 0)
		    || ((cur > (curscroll + ONSCREEN - scrolloff - 1)) && delta > 0))
			curscroll += delta;
	}
	curscroll = MIN(curscroll, MIN(cur, ndents - ONSCREEN));
	curscroll = MAX(curscroll, MAX(cur - (ONSCREEN - 1), 0));

#ifndef NOFIFO
	if (!g_state.fifomode)
		notify_fifo(FALSE); /* Send hovered path to NNN_FIFO */
#endif
}

// Assembly:
movl 0xad4a(%rip), %eax      # 0x1bb8c
leal -0x1(%rax), %ecx
cmpl %edi, %ecx
cmovll %ecx, %edi
xorl %ecx, %ecx
testl %edi, %edi
cmovlel %ecx, %edi
movl 0x13451(%rip), %edx     # 0x242a8
movl %edx, 0x1448b(%rip)     # 0x252e8
movl 0x13214(%rip), %r10d    # 0x24078
movl %r10d, 0x144f5(%rip)    # 0x25360
movl %edi, 0x13207(%rip)     # 0x24078
movzwl 0xad0f(%rip), %r8d      # 0x1bb88
testl %esi, %esi
jne 0x10ecf
pushq %rbx
leal -0x4(%r8), %r9d
movl %r9d, %esi
sarl %esi
cmpl $0x3, %esi
movl $0x3, %r11d
cmovll %esi, %r11d
leal (%r11,%rdx), %esi
cmpl %esi, %edi
setl %bl
movl %edi, %esi
subl %r10d, %esi
sets %r10b
testb %r10b, %bl
popq %rbx
jne 0x10ecb
addl %edx, %r9d
notl %r11d
addl %r9d, %r11d
cmpl %r11d, %edi
setg %r9b
testl %esi, %esi
setg %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x10ecf
addl %edx, %esi
movl %esi, %edx
subl %r8d, %eax
addl $0x4, %eax
cmpl %eax, %edi
cmovll %edi, %eax
cmpl %eax, %edx
cmovll %edx, %eax
subl %r8d, %edi
addl $0x5, %edi
cmpl %eax, %edi
cmovlel %eax, %edi
testl %edi, %edi
cmovgl %edi, %ecx
movl %ecx, 0x133b3(%rip)     # 0x242a8
testb $0x20, 0x9628(%rip)     # 0x1a524
jne 0x10f05
xorl %edi, %edi
jmp 0xeb23
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: send_to_explorer
static void send_to_explorer(int *presel)
{
	if (nselected) {
		int fd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0600);
		if ((fd == -1) || (seltofile(fd, NULL, NEWLINE) != (size_t)(selbufpos)))
			printwarn(presel);
		else {
			resetselind();
			clearselection();
		}
		if (fd > 1)
			close(fd);
	} else
		notify_fifo(TRUE); /* Send opened path to NNN_FIFO */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x13018(%rip)     # 0x242ac
je 0x1135d
movq %rdi, %r14
movq 0xa6ac(%rip), %rdi      # 0x1b950
movl $0x80801, %esi          # imm = 0x80801
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x46b0
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x11333
leaq 0x522c(%rip), %rdx      # 0x164ef
movl %ebx, %edi
xorl %esi, %esi
callq 0xe969
movl 0xa79e(%rip), %ecx      # 0x1ba70
cmpq %rcx, %rax
jne 0x11333
movslq 0xa8ae(%rip), %rcx      # 0x1bb8c
testq %rcx, %rcx
jle 0x11313
movq 0x12d86(%rip), %rax     # 0x24070
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq 0x20(%rax,%rdx), %rsi
btq $0x3c, %rsi
jae 0x1130a
btrq $0x3c, %rsi
movq %rsi, 0x20(%rax,%rdx)
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x112f4
xorl %eax, %eax
movl %eax, 0x12f91(%rip)     # 0x242ac
movl %eax, 0xa74f(%rip)      # 0x1ba70
andb $-0x21, 0x91fe(%rip)    # 0x1a526
xorl %edi, %edi
xorl %esi, %esi
callq 0xf7fd
jmp 0x1134a
callq 0x40c0
movl (%rax), %edi
callq 0x4870
movq %rax, %rdi
movq %r14, %rsi
callq 0xedba
cmpl $0x2, %ebx
jl 0x1136e
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43c0
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xeb23
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/jarun[P]nnn/src/nnn.c
// Function: appendfpath
static void appendfpath(const char *path, const size_t len)
{
	if ((selbufpos >= selbuflen) || ((len + 3) > (selbuflen - selbufpos))) {
		selbuflen += PATH_MAX;
		pselbuf = xrealloc(pselbuf, selbuflen);
		if (!pselbuf)
			errexit();
	}

	selbufpos += xstrsncpy(pselbuf + selbufpos, path, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0xa6e4(%rip), %r13d     # 0x1ba70
movl 0x12d3a(%rip), %esi     # 0x240cc
cmpl %r13d, %esi
jbe 0x113a5
leaq 0x3(%rbx), %rax
movl %esi, %ecx
subl %r13d, %ecx
cmpq %rcx, %rax
jbe 0x113d1
addl $0x1000, %esi           # imm = 0x1000
movl %esi, 0x12d1b(%rip)     # 0x240cc
movq 0xa6c0(%rip), %r12      # 0x1ba78
movq %r12, %rdi
callq 0x4640
testq %rax, %rax
je 0x11417
movq %rax, %r15
movq %rax, 0xa6a9(%rip)      # 0x1ba78
jmp 0x113d8
movq 0xa6a0(%rip), %r15      # 0x1ba78
addq %r13, %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x4860
testq %rax, %rax
jne 0x11401
testq %rbx, %rbx
je 0x113fb
movb $0x0, -0x1(%r15,%rbx)
addq %r15, %rbx
movq %rbx, %rax
subl %r15d, %eax
addl %r13d, %eax
movl %eax, 0xa663(%rip)      # 0x1ba70
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x4090
movq $0x0, 0xa64e(%rip) # 0x1ba78
movl $0x668, %edi            # imm = 0x668
callq 0xfcfe