LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/lh3[P]partig/pdist.c
// Function: pt_match_print
void pt_match_print(FILE *fp, const gfa_t *g, const pt_match_t *ma)
{
	uint32_t i;
	for (i = 0; i < g->n_seg; ++i) {
		const gfa_seg_t *s = &g->seg[i];
		const pt_uinfo_t *u = &ma->info[i];
		fprintf(fp, "C\t%s\t%d\t%d\t%d\n", s->name, s->len, u->cnt2, u->cnt1);
	}
	for (i = 0; i < ma->n_ma; ++i) {
		const pt_match1_t *m = &ma->ma[i];
		fprintf(fp, "S\t%s\t%s\t%c\t%d\t%d\t%d\t%.6f\n", g->seg[m->sid[0]].name, g->seg[m->sid[1]].name,
				"+-"[!!m->rev], ma->info[m->sid[0]].cnt2, ma->info[m->sid[1]].cnt2, m->m, m->sim);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x4(%rsi)
je 0x860b
leaq 0x1179(%rip), %r12      # 0x9748
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x10(%r14), %rax
movq 0x10(%rbx), %rsi
movq 0x18(%rax,%r13), %rdx
movl (%rax,%r13), %ecx
movl (%rsi,%rbp,8), %r8d
movl 0x4(%rsi,%rbp,8), %r9d
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1160
incq %rbp
movl 0x4(%r14), %eax
addq $0x40, %r13
cmpq %rax, %rbp
jb 0x85d4
cmpl $0x0, 0x4(%rbx)
je 0x8698
movl $0x10, %r13d
xorl %ebp, %ebp
leaq 0x1133(%rip), %r12      # 0x9757
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rsi
movq 0x10(%r14), %rcx
movl -0x10(%rsi,%r13), %edx
movl -0xc(%rsi,%r13), %edi
movl (%rax,%rdx,8), %r9d
shlq $0x6, %rdx
movl (%rax,%rdi,8), %r10d
shlq $0x6, %rdi
cmpl $0x1, -0x4(%rsi,%r13)
movq 0x18(%rcx,%rdx), %rdx
leaq 0xc39(%rip), %rax       # 0x9295
sbbq $-0x1, %rax
movq 0x18(%rcx,%rdi), %rcx
movsbl (%rax), %r8d
movl -0x8(%rsi,%r13), %r11d
movsd (%rsi,%r13), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x1160
addq $0x10, %rsp
incq %rbp
movl 0x4(%rbx), %eax
addq $0x18, %r13
cmpq %rax, %rbp
jb 0x8624
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-mgs/face-extract.c
// Function: getNameFromDetails
char *getNameFromDetails(uint16_t hash) {
	char *retstring = malloc(32);
	unsigned int result;
	result = matchhash(hash, StrCode16("p"), commondic, numcommondic);
	if(result != 0xFFFFFFFF) sprintf(retstring, "%s", commondic[result].name);
	else {
		sprintf( retstring, "%04x.png", hash );
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x20, %edi
callq 0x1170
movq %rax, %rbx
leaq 0x1d5f(%rip), %rdi      # 0xeeab
callq 0x12ec
movslq 0x5fd0(%rip), %rcx      # 0x13128
testq %rcx, %rcx
jle 0xd17e
movq 0x5fb4(%rip), %rsi      # 0x13118
addq $0x8, %rsi
cmpl %ebp, -0x8(%rsi)
jne 0xd172
cmpl %eax, -0x4(%rsi)
je 0xd19b
addq $0x108, %rsi            # imm = 0x108
decq %rcx
jne 0xd168
leaq 0x2a1b(%rip), %rsi      # 0xfba0
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x11d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-mgs/face-extract.c
// Function: generatePalette
uint32_t *generatePalette(uint16_t *source) {
	unsigned int i;
	uint8_t red, green, blue;
	uint32_t *retpal = NULL;
	retpal = malloc(sizeof(uint32_t)*256);
	for(i = 0; i < 256; i++) {
		red = source[i] & 0x1F;
		green = (source[i] >> 5) & 0x1F;
		blue = (source[i] >> 10) & 0x1F;
		retpal[i] = 0xFF000000 | color5to8(red) | color5to8(green) << 8 | color5to8(blue) << 16;
	}
	return retpal;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x400, %edi            # imm = 0x400
callq 0x1170
xorl %ecx, %ecx
movdqa 0x299f(%rip), %xmm0     # 0xfb60
pxor %xmm1, %xmm1
movdqa 0x29a3(%rip), %xmm2     # 0xfb70
movdqa 0x29ab(%rip), %xmm3     # 0xfb80
movdqa 0x29b3(%rip), %xmm4     # 0xfb90
movq (%rbx,%rcx,2), %xmm5
movdqa %xmm5, %xmm7
pand %xmm0, %xmm7
punpcklwd %xmm1, %xmm7    # xmm7 = xmm7[0],xmm1[0],xmm7[1],xmm1[1],xmm7[2],xmm1[2],xmm7[3],xmm1[3]
movdqa %xmm5, %xmm6
psrlw $0x5, %xmm6
pand %xmm0, %xmm6
punpcklwd %xmm1, %xmm6    # xmm6 = xmm6[0],xmm1[0],xmm6[1],xmm1[1],xmm6[2],xmm1[2],xmm6[3],xmm1[3]
psrlw $0xa, %xmm5
pand %xmm0, %xmm5
punpcklwd %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1],xmm5[2],xmm1[2],xmm5[3],xmm1[3]
movdqa %xmm7, %xmm8
pslld $0x3, %xmm8
psrld $0x2, %xmm7
por %xmm8, %xmm7
movdqa %xmm6, %xmm8
pslld $0xb, %xmm8
por %xmm7, %xmm8
pslld $0x6, %xmm6
pand %xmm2, %xmm6
por %xmm8, %xmm6
movdqa %xmm5, %xmm7
pslld $0x13, %xmm7
pslld $0xe, %xmm5
pand %xmm3, %xmm5
por %xmm7, %xmm5
por %xmm6, %xmm5
por %xmm4, %xmm5
movdqu %xmm5, (%rax,%rcx,4)
addq $0x4, %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0xd1dd
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Joy-Division[P]tools-mgs/face-extract.c
// Function: pixelsToRGBA
unsigned char *pixelsToRGBA(unsigned char *source, uint16_t *paletteData, unsigned int pixelsWidth, unsigned int pixelsHeight) {
	unsigned int i, numPixels = pixelsWidth*pixelsHeight;
	uint8_t *idximage;
	uint32_t *palette = generatePalette(paletteData);
	idximage = source;
	uint32_t *retimage = malloc(sizeof(uint32_t)*numPixels);
	for( i = 0; i < numPixels; i++ ) retimage[i] = palette[idximage[i]];
	free(palette);
	return (unsigned char*)retimage;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
imull %ecx, %ebx
movq %rsi, %rdi
callq 0xd1a9
movq %rax, %r15
leaq (,%rbx,4), %rdi
callq 0x1170
movq %rax, %r12
testl %ebx, %ebx
je 0xd2bb
xorl %eax, %eax
movzbl (%r14,%rax), %ecx
movl (%r15,%rcx,4), %ecx
movl %ecx, (%r12,%rax,4)
incq %rax
cmpq %rax, %rbx
jne 0xd2a6
movq %r15, %rdi
callq 0x1030
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/vanhauser-thc[P]vulntest/confuse.cpp
// Function: main
int main(int argc, char *argv[]) {
  Base *b1 = new Greeter();
  Base *b2 = new Exec();
  Greeter *g;
  if (argc != 3) {
    printf("Syntax: %s 1|2 greeting\n", argv[0]);
    exit(-1);
  }
  if (argv[1][0] == '1')
    g = static_cast<Greeter *>(b1);
  else if (argv[1][0] == '2')
    g = static_cast<Greeter *>(b2);
  else {
    printf("wrong mode\n");
    exit(-1);
  }
  g->sayHi(argv[2]);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x8, %edi
callq 0x10a0
movq %rax, %r14
leaq 0x2b0c(%rip), %r15      # 0x3d58
movq %r15, (%rax)
movl $0x8, %edi
callq 0x10a0
leaq 0x2b38(%rip), %rcx      # 0x3d98
movq %rcx, (%rax)
cmpl $0x3, %ebp
jne 0x1296
movq 0x8(%rbx), %rdx
movzbl (%rdx), %edx
cmpl $0x31, %edx
je 0x127f
cmpl $0x32, %edx
jne 0x12a9
movq %rcx, %r15
movq %rax, %r14
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq *(%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
leaq 0xd64(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1040
jmp 0x12b5
leaq 0xd6d(%rip), %rdi       # 0x201d
callq 0x10e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10c0
nop
// File: /workspace/github_c_makefile_star2_O3/dxwc[P]sfeed/sfeed_gph.c
// Function: gphlink
void
gphlink(FILE *fp, const char *s, size_t len)
{
	size_t i;

	for (i = 0; *s && i < len; s++, i++) {
		switch (*s) {
		case '\r': /* ignore CR */
		case '\n': /* ignore LF */
			break;
		case '\t':
			fputs("        ", fp);
			break;
		case '|': /* escape separators */
			fputs("\\|", fp);
			break;
		default:
			fputc(*s, fp);
			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movb (%rsi), %al
testb %al, %al
sete %cl
testq %rdx, %rdx
sete %dl
orb %cl, %dl
jne 0x1363
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %ebp
leaq 0x1d13(%rip), %r12      # 0x3020
leaq 0x1d15(%rip), %r13      # 0x3029
movzbl %al, %ecx
cmpl $0xc, %ecx
jg 0x1328
cmpl $0x9, %ecx
je 0x1344
cmpl $0xa, %ecx
je 0x134f
jmp 0x1337
cmpl $0xd, %ecx
je 0x134f
cmpl $0x7c, %ecx
jne 0x1337
movq %r13, %rdi
jmp 0x1347
movsbl %al, %edi
movq %r15, %rsi
callq 0x10e0
jmp 0x134f
movq %r12, %rdi
movq %r15, %rsi
callq 0x10c0
movb (%r14,%rbp), %al
testb %al, %al
je 0x1363
leaq 0x1(%rbp), %rcx
cmpq %rbx, %rbp
movq %rcx, %rbp
jb 0x1314
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/bind_sfd.c
// Function: bind_sfd
int bind_sfd(char** arg,int sfd)
{
    struct sockaddr_in server_addr;
    server_addr.sin_addr.s_addr = inet_addr(arg[0]);
    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(atoi(arg[1]));
    int ret = bind(sfd,(struct sockaddr*)&server_addr,sizeof(server_addr));
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x21e0
leaq -0x28(%rbp), %r15
movl %eax, 0x4(%r15)
movw $0x2, (%r15)
movq 0x8(%r14), %rdi
callq 0x2300
rolw $0x8, %ax
movw %ax, 0x2(%r15)
movl %ebx, %edi
movq %r15, %rsi
movl $0x10, %edx
callq 0x2050
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/client_get.c
// Function: client_get
int client_get(int client_fd)
{
    MYSQL* connect;
    connect_mysql(&connect);
    int file_id;
    int ret = recv(client_fd,&file_id,sizeof(int),0);
    DISCON_CHECK(ret,0,client_fd);
    int file_name_len;
    ret = recv(client_fd,&file_name_len,sizeof(int),0);
    DISCON_CHECK(ret,0,client_fd);
    int path_len;
    ret = recv(client_fd,&path_len,sizeof(int),0);
    DISCON_CHECK(ret,0,client_fd);
    char file_name[128] = {0};
    ret = recv_client_all(client_fd,file_name,file_name_len);
    DISCON_CHECK(ret,-1,client_fd);
    char path[4096] = {0};
    ret = recv_client_all(client_fd,path,path_len);
    DISCON_CHECK(ret,-1,client_fd);
    printf("%s\n%s\n",file_name,path);
    send_file_to_client(client_fd,file_id,file_name,path,connect);
    close(client_fd);
    mysql_close(connect);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10a0, %rsp           # imm = 0x10A0
movl %edi, %ebx
leaq -0x38(%rbp), %rdi
callq 0x34e8
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20a0
testl %eax, %eax
je 0x27d2
leaq -0x28(%rbp), %rsi
movl $0x4, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20a0
testl %eax, %eax
je 0x27d2
leaq -0x24(%rbp), %rsi
movl $0x4, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20a0
testl %eax, %eax
je 0x27d2
xorps %xmm0, %xmm0
leaq -0xc0(%rbp), %rsi
movaps %xmm0, 0x70(%rsi)
movaps %xmm0, 0x60(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl -0x28(%rbp), %edx
movl %ebx, %edi
callq 0x47cc
cmpl $-0x1, %eax
je 0x27d2
leaq -0x10c0(%rbp), %r15
xorl %r14d, %r14d
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
movl -0x24(%rbp), %edx
movl %ebx, %edi
movq %r15, %rsi
callq 0x47cc
cmpl $-0x1, %eax
je 0x27d2
leaq 0x28f2(%rip), %rdi      # 0x5083
leaq -0xc0(%rbp), %r15
leaq -0x10c0(%rbp), %r12
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2040
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %r8
movl %ebx, %edi
movq %r15, %rdx
movq %r12, %rcx
callq 0x4b10
movl %ebx, %edi
callq 0x2380
movq -0x38(%rbp), %rdi
callq 0x2260
jmp 0x27df
movl %ebx, %edi
callq 0x2380
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x10a0, %rsp           # imm = 0x10A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/compute_file_md5_2.c
// Function: compute_file_md5_2
int compute_file_md5_2(int fd,char* md5_str,int size)
{
    int i;
	int ret;
	unsigned char data[READ_DATA_SIZE];
	unsigned char md5_value[MD5_SIZE];
	MD5_CTX md5;


	// init md5
	MD5Init(&md5);

    int total = 0;
    while(total < size)
	{
        if(size - total > 4096)
		    ret = read(fd, data, 4096);
        else
            ret = read(fd,data,size - total);
		if (-1 == ret)
		{
			perror("read");
			close(fd);
			return -1;
		}
		MD5Update(&md5, data, ret);
        total += ret;
	}


	MD5Final(&md5, md5_value);

	// convert md5 value to md5 string
	for(i = 0; i < MD5_SIZE; i++)
	{
		snprintf(md5_str + i*2, 2+1, "%02x", md5_value[i]);
	}

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1078, %rsp           # imm = 0x1078
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, -0x2c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3c48
testl %r15d, %r15d
jle 0x3475
xorl %r14d, %r14d
leaq -0x10a0(%rbp), %r12
movl %r15d, %eax
subl %r14d, %eax
movl $0x1000, %ecx           # imm = 0x1000
cmpl %ecx, %eax
cmovgel %ecx, %eax
movslq %eax, %rdx
movl -0x2c(%rbp), %edi
movq %r12, %rsi
callq 0x22a0
movq %rax, %r13
cmpl $-0x1, %r13d
je 0x34cc
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x3c66
addl %r13d, %r14d
cmpl %r15d, %r14d
jl 0x3434
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4574
xorl %r14d, %r14d
leaq 0x1f64(%rip), %r15      # 0x53f3
xorl %r12d, %r12d
movzbl -0x40(%rbp,%r12), %ecx
movl $0x3, %esi
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2310
incq %r12
addq $0x2, %rbx
cmpq $0x10, %r12
jne 0x3492
movl %r14d, %eax
addq $0x1078, %rsp           # imm = 0x1078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f1b(%rip), %rdi      # 0x53ee
callq 0x2190
movl -0x2c(%rbp), %edi
callq 0x2380
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x34b7
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/factory_init.c
// Function: factory_init
int factory_init(factory_t *p_fact,int pthread_num,int que_capacity,int epoll_fd)
{
    if(pthread_num < 1 || que_capacity < 1)
    {
        puts("pthread_num or que_capacity error!\n");
        return -1;
    }
    que_init(&p_fact->que,que_capacity);
    pthread_cond_init(&p_fact->cond,NULL);
    pthread_mutex_init(&p_fact->mutex,NULL);
    p_fact->epoll_fd = epoll_fd;
    p_fact->pthread_num = pthread_num;
    p_fact->pthId_arr = (pthread_t*)malloc(sizeof(pthread_t) * pthread_num);
    p_fact->pthread_func = thread_func;
    p_fact->start_flag = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r12d
testl %esi, %esi
setg %al
testl %edx, %edx
setg %cl
testb %cl, %al
jne 0x3590
leaq 0x1ed9(%rip), %rdi      # 0x545c
callq 0x22f0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x35e3
movl %esi, %r15d
movq %rdi, %rbx
addq $0x20, %rdi
movl %edx, %esi
callq 0x46dc
leaq 0x60(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x2230
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x22c0
movl %r12d, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl %r15d, %edi
shlq $0x3, %rdi
callq 0x2250
movq %rax, 0x10(%rbx)
leaq 0x16(%rip), %rax        # 0x35ef
movq %rax, 0x18(%rbx)
movl $0x0, (%rbx)
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/factory_start.c
// Function: factory_start
int factory_start(factory_t* p_fact)
{
    if(p_fact->start_flag == 0)
    {
        for(int i = 0; i < p_fact->pthread_num; ++i)
        {
            pthread_create(p_fact->pthId_arr + i,NULL,p_fact->pthread_func,p_fact);
        }
        p_fact->start_flag = 1;
    }
    return 0;
}

// Assembly:
cmpl $0x0, (%rdi)
jne 0x379f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x378f
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq 0x18(%rbx), %rdx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2330
incq %r15
movslq 0x4(%rbx), %rax
addq $0x8, %r14
cmpq %rax, %r15
jl 0x376a
movl $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/get_crypt_passwd.c
// Function: get_crypt_passwd
const char* get_crypt_passwd(const char* crybuf)
{
    int i; 
    int num = 0;
    for(i = 0; num != 3; ++i)
    {
        if(crybuf[i] == '$')
            ++num;
    }
    return crybuf + i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x24, (%rax,%rcx)
sete %sil
incq %rcx
addl %esi, %edx
cmpl $0x3, %edx
jne 0x37af
movl %ecx, %ecx
addq %rcx, %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/get_file_id.c
// Function: get_file_id
int get_file_id(char* mysql_oper,int user_id,MYSQL* connect)
{
    sprintf(mysql_oper,"select file_id from File where user_id=%d;",user_id);
    int queryResult = mysql_query(connect,mysql_oper);
    if(queryResult)
    {
        printf("%s\n",mysql_error(connect));
        return -1;
    }
    MYSQL_ROW row;
    MYSQL_RES* res;
    res = mysql_use_result(connect);
    row = mysql_fetch_row(res);
    int ret = atoi(row[0]);
    mysql_free_result(res);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %r14
leaq 0x1cc4(%rip), %rsi      # 0x54a6
xorl %eax, %eax
callq 0x2060
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
movq %rbx, %rdi
testl %eax, %eax
je 0x380f
callq 0x20b0
movq %rax, %rdi
callq 0x22f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3835
callq 0x2340
movq %rax, %rbx
movq %rax, %rdi
callq 0x2200
movq (%rax), %rdi
callq 0x2300
movl %eax, %r14d
movq %rbx, %rdi
callq 0x21f0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/get_user_id.c
// Function: get_user_id
int get_user_id(char* mysql_oper,const char* user_name,MYSQL* connect)
{
    sprintf(mysql_oper,"select user_id from User where user_name='%s'",user_name);
    int queryResult = mysql_query(connect,mysql_oper);
    if(queryResult)
    {
        printf("%s\n",mysql_error(connect));
        return -1;
    }
    MYSQL_ROW row;
    MYSQL_RES* res;
    res = mysql_use_result(connect);
    row = mysql_fetch_row(res);
    int ret = atoi(row[0]);
    mysql_free_result(res);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x1c05(%rip), %rsi      # 0x54e0
xorl %eax, %eax
callq 0x2060
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
movq %rbx, %rdi
testl %eax, %eax
je 0x3908
callq 0x20b0
movq %rax, %rdi
callq 0x22f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x392e
callq 0x2340
movq %rax, %rbx
movq %rax, %rdi
callq 0x2200
movq (%rax), %rdi
callq 0x2300
movl %eax, %r14d
movq %rbx, %rdi
callq 0x21f0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/is_match.c
// Function: is_match
int is_match(const char* user_name,const char* user_passwd,MYSQL* connect)
{
    char sha512[256] = {0};
    strcpy(sha512,"$6$");
    char mysql_oper[256];
    sprintf(mysql_oper,"select salt,cryptpasswd from User where user_name='%s'",user_name);
    int queryResult = mysql_query(connect,mysql_oper);
    if(queryResult)
    {
        printf("%s\n",mysql_error(connect));
        return -1;
    }
    MYSQL_ROW row;
    MYSQL_RES* res;
    res = mysql_use_result(connect);
    row = mysql_fetch_row(res);
    sprintf(sha512 + 3,"%s",row[0]);
    void* crypt_add = NULL;
    int crypt_size = 0;
    crypt_ra(user_passwd,sha512,&crypt_add,&crypt_size);
    int len = strlen(sha512) + 1;
    sha512[len - 1] = '$';
    sprintf(sha512 + len,"%s",row[1]);
    mysql_free_result(res);
    int ret = strcmp(sha512,(const char*)crypt_add);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x140(%rbp), %r12
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
xorl %esi, %esi
callq 0x2130
movl $0x243624, (%r12)       # imm = 0x243624
leaq 0x1b60(%rip), %rsi      # 0x550e
leaq -0x240(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2060
movq %r14, %rdi
movq %r12, %rsi
callq 0x2140
movq %r14, %rdi
testl %eax, %eax
je 0x39eb
callq 0x20b0
movq %rax, %rdi
callq 0x22f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3a75
callq 0x2340
movq %rax, %r14
movq %rax, %rdi
callq 0x2200
movq %rax, %r12
leaq -0x13d(%rbp), %rdi
movq (%rax), %rsi
callq 0x21c0
leaq -0x38(%rbp), %r15
movq $0x0, (%r15)
leaq -0x2c(%rbp), %rcx
movl $0x0, (%rcx)
leaq -0x140(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2240
movq %r13, %rdi
callq 0x20c0
cltq
movb $0x24, -0x140(%rbp,%rax)
incl %eax
cltq
leaq (%rax,%rbp), %rdi
addq $-0x140, %rdi           # imm = 0xFEC0
movq 0x8(%r12), %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x21f0
movq (%r15), %rsi
movq %r13, %rdi
callq 0x2290
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/queue.c
// Function: que_push
int que_push(que_t* p_queue,int client_fd,int ctl_no)
{
    if(p_queue->que_size == p_queue->que_capacity)
        return -1;
    struct Queue_node* new_node = (struct Queue_node*)malloc(sizeof(struct Queue_node));
    memset(new_node,0,sizeof(struct Queue_node));
    new_node->client_fd = client_fd;
    new_node->ctl_no = ctl_no;
    if(p_queue->que_size == 0)
    {
        p_queue->head = new_node;
        p_queue->tail = new_node;
    }
    else
    {
        p_queue->tail->next = new_node;
        p_queue->tail = new_node;
    }
    p_queue->que_size++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x4(%rdi), %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl (%rdi), %r12d
je 0x474a
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x2150
movl %r15d, (%rax)
movl %r14d, 0x4(%rax)
testl %r12d, %r12d
je 0x4739
movq 0x10(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0x473d
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
incl %r12d
movl %r12d, 0x4(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/queue.c
// Function: que_pop
int que_pop(que_t* p_queue,struct Queue_node** pop_node)
{
    if(p_queue->que_size == 0)
        return -1;
    *pop_node = p_queue->head;
    p_queue->head = p_queue->head->next;
    p_queue->que_size--;
    return 0;
}

// Assembly:
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0x4776
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
movq %rcx, (%rsi)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rdi)
decl %eax
movl %eax, 0x4(%rdi)
xorl %eax, %eax
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/queue.c
// Function: que_free
void que_free(que_t* p_queue)
{
    if(p_queue->que_size == 0)
        return;
    for(int i = 0;i < p_queue->que_size; ++i)
    {
        struct Queue_node* node = p_queue->head;
        p_queue->head = p_queue->head->next;
        free(node);
    }
    p_queue->head = p_queue->tail = NULL;
    p_queue->que_size = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rdi), %r14
cmpl $0x0, 0x4(%rdi)
je 0x47c1
jle 0x47b2
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rbx)
callq 0x2220
incl %r15d
cmpl 0x4(%rbx), %r15d
jl 0x4798
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl $0x0, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/recv_n_bytes.c
// Function: recv_n_bytes
int recv_n_bytes(int fd,void* buf,int len)
{
    int total = 0;
    int ret;
    while(total < len)
    {
        ret = recv(fd,(char*)buf + total,len - total,MSG_WAITALL);
        if(ret == 0)
        {
            printf("server disconnected!\n");
            return -1;
        }
        total += ret;
    }
    return 0;
}

// Assembly:
testl %edx, %edx
jle 0x4869
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
xorl %r12d, %r12d
movslq %r12d, %rax
leaq (%r14,%rax), %rsi
movl %ebx, %ecx
subl %eax, %ecx
movslq %ecx, %rdx
movl %r15d, %edi
movl $0x100, %ecx            # imm = 0x100
callq 0x20a0
testl %eax, %eax
je 0x486c
addl %eax, %r12d
cmpl %ebx, %r12d
jl 0x483e
xorl %eax, %eax
jmp 0x487d
xorl %eax, %eax
retq
leaq 0xd0d(%rip), %rdi       # 0x5580
callq 0x22f0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/recv_user_file.c
// Function: recv_user_file
int recv_user_file(int client_fd,int file_fd,off_t file_size)
{
    int total = 0;
    int pipefd[2];
    int ret = pipe(pipefd);
    ERROR_CHECK(ret,-1,"pipe");
    while(total < file_size)
    {
        ret = splice(client_fd,NULL,pipefd[1],NULL,4096,SPLICE_F_MOVE|SPLICE_F_MORE);
        ERROR_CHECK(ret,-1,"splice");
        ret = splice(pipefd[0],NULL,file_fd,NULL,ret,SPLICE_F_MOVE|SPLICE_F_MORE);
        ERROR_CHECK(ret,-1,"splice");
        total += ret;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r15d
leaq -0x30(%rbp), %rdi
callq 0x2270
cmpl $-0x1, %eax
je 0x4915
testq %rbx, %rbx
jle 0x4904
xorl %r13d, %r13d
leaq 0xcde(%rip), %r12       # 0x559a
movl -0x2c(%rbp), %edx
movl $0x1000, %r8d           # imm = 0x1000
movl %r15d, %edi
xorl %esi, %esi
xorl %ecx, %ecx
movl $0x5, %r9d
callq 0x20e0
cmpl $-0x1, %eax
je 0x491c
movl -0x30(%rbp), %edi
movslq %eax, %r8
xorl %esi, %esi
movl %r14d, %edx
xorl %ecx, %ecx
movl $0x5, %r9d
callq 0x20e0
cmpl $-0x1, %eax
je 0x491c
addl %eax, %r13d
movslq %r13d, %rax
cmpq %rbx, %rax
jl 0x48bc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc79(%rip), %r12       # 0x5595
movq %r12, %rdi
callq 0x2190
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4906
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/update_user_table.c
// Function: update_user_table
int update_user_table(char* mysql_oper,int user_id,int file_id,MYSQL* connect)
{
    sprintf(mysql_oper,"update User set dir_id=%d where user_id=%d;",file_id,user_id);
    int queryResult = mysql_query(connect,mysql_oper);
    if(queryResult)
    {
        printf("%s\n",mysql_error(connect));
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %ecx
movq %rdi, %r15
leaq 0x85f(%rip), %rsi       # 0x562c
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2060
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
testl %eax, %eax
je 0x4dfc
movq %rbx, %rdi
callq 0x20b0
movq %rax, %rdi
callq 0x22f0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/SourceFile/user_name_avaialbe.c
// Function: user_name_avaiable
int user_name_avaiable(const char* user_name,MYSQL* connect)
{
    char buf[128];
    sprintf(buf,"select * from User where user_name='%s'",user_name);
    unsigned int queryRet = mysql_query(connect,buf);
    if(queryRet)
    {
        printf("Mysql query error: %s\n",mysql_error(connect));
        return -1;
    }
    MYSQL_RES* res;
    res = mysql_store_result(connect);
    return (mysql_num_rows(res) == 0)? 1: 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %rdx
leaq 0x831(%rip), %rsi       # 0x5658
leaq -0x90(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2060
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
movq %rbx, %rdi
testl %eax, %eax
je 0x4e67
callq 0x20b0
leaq 0x2bf(%rip), %rdi       # 0x5115
movq %rax, %rsi
xorl %eax, %eax
callq 0x2040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4e7f
callq 0x2120
movq %rax, %rdi
callq 0x21a0
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
sete %al
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/USArmyResearchLab[P]ARL_OpenSHMEM/test/hello.c
// Function: main
int main(int argc, char* argv[])
{
	int err = 0;
	int major, minor;
	char name[SHMEM_MAX_NAME_LEN];

	// Starts/Initializes SHMEM/OpenSHMEM
	// Some implementations use the deprecated start_pes(0)
	shmem_init();

	// Fetch the number or processes
	// Some implementations use the deprecated num_pes()
	int n_pes = shmem_n_pes();

	// Assign my process ID to me
	int me = shmem_my_pe();

	// Query 
	shmem_info_get_name(name);
	shmem_info_get_version(&major, &minor);

	if (me == 0) {
		printf("# API   : %s (%d.%d)\n", name, major, minor);
		printf("# HEADER: %s (%d.%d)\n", SHMEM_VENDOR_STRING,
			SHMEM_MAJOR_VERSION, SHMEM_MINOR_VERSION);
	}

	// Global barrier
	shmem_barrier_all();

	// Comparing shmem.h header values and API values
	if (strncmp(name, SHMEM_VENDOR_STRING, SHMEM_MAX_NAME_LEN)) {
		printf("# %d: ERROR: vendor name mismatch\n", me);
		err++;
	}
	if (major != SHMEM_MAJOR_VERSION) {
		printf("# %d: ERROR: major version mismatch\n", me);
		err++;
	}
	if (minor != SHMEM_MINOR_VERSION) {
		printf("# %d: ERROR: minor version mismatch\n", me);
		err++;
	}

	printf("Hello, World from %d of %d\n", me, n_pes);

	return(err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
callq 0x1510
leaq 0x3d5f(%rip), %rax      # 0x5144
movl (%rax), %ebx
leaq 0x3d52(%rip), %rax      # 0x5140
movl (%rax), %r14d
leaq -0x60(%rbp), %rdi
callq 0x14e0
leaq -0x20(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x1500
testl %r14d, %r14d
jne 0x1443
movl -0x20(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x1beb(%rip), %rdi      # 0x3004
leaq -0x60(%rbp), %rsi
xorl %eax, %eax
callq 0x10e0
leaq 0x1bef(%rip), %rdi      # 0x301a
leaq 0x1bfe(%rip), %rsi      # 0x3030
movl $0x1, %edx
movl $0x4, %ecx
xorl %eax, %eax
callq 0x10e0
callq 0x14d4
leaq 0x1be1(%rip), %rsi      # 0x3030
leaq -0x60(%rbp), %rdi
movl $0x33, %edx
callq 0x11b0
testl %eax, %eax
je 0x147a
leaq 0x1bfb(%rip), %rdi      # 0x3063
movl %r14d, %esi
xorl %eax, %eax
callq 0x10e0
movl $0x1, %r15d
jmp 0x147d
xorl %r15d, %r15d
cmpl $0x1, -0x20(%rbp)
je 0x1497
leaq 0x1bfc(%rip), %rdi      # 0x3086
movl %r14d, %esi
xorl %eax, %eax
callq 0x10e0
incl %r15d
cmpl $0x4, -0x1c(%rbp)
je 0x14b1
leaq 0x1c07(%rip), %rdi      # 0x30ab
movl %r14d, %esi
xorl %eax, %eax
callq 0x10e0
incl %r15d
leaq 0x1c18(%rip), %rdi      # 0x30d0
movl %r14d, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x10e0
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/main.c
// Function: main
int				main(int argc, char **argv, char **envp)
{
	t_shell shell;
	char	*line;
	char	*tmp;
	char	curr_pwd[1024];

	line = NULL;
	shell.stat_loc = 0;
	shell.instructions = NULL;
	shell.env = ft_strdup_matrix(envp);
	getcwd(curr_pwd, 1024);
	tmp = ft_strjoin("PWD=", curr_pwd);
	ft_export(&shell, tmp);
	free(tmp);
	handle_shlvl(&shell);
	tmp = ft_strdup("_=/bin/bash");
	ft_export(&shell, tmp);
	free(tmp);
	if (argc == 3 && ft_strcmp(argv[1], "-c"))
		exec_argument(ft_strdup(argv[2]), &shell);
	else
		read_input(line, &shell);
	return (shell.stat_loc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movl $0x0, 0x28(%r14)
movq $0x0, (%r14)
movq %rdx, %rdi
callq 0x4996
movq %rax, 0x20(%r14)
leaq 0x40(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
callq 0x10a0
leaq 0x4dbb(%rip), %rdi      # 0x60c6
movq %r15, %rsi
callq 0x523c
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x26eb
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x4da4
leaq 0x4ccc(%rip), %rdi      # 0x6004
callq 0x51fc
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x26eb
movq %r15, %rdi
callq 0x1030
cmpl $0x3, %ebp
jne 0x13de
movq 0x8(%rbx), %rdi
leaq 0x4ca9(%rip), %rsi      # 0x6010
callq 0x5460
testq %rax, %rax
je 0x13de
movq 0x10(%rbx), %rdi
callq 0x51fc
movq %rax, %r14
movq %rax, %rdi
callq 0x34c8
movq %rax, %rbx
movq %r14, %rdi
callq 0x1030
testq %rbx, %rbx
je 0x13a4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x175e
jmp 0x13ac
movl $0x2, 0x30(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x484c
movq (%rbx), %rdi
callq 0x4824
movq (%rbx), %rdi
callq 0x1030
movl 0x28(%rbx), %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r14
movq $0x0, (%r14)
movl $0x1, %edi
callq 0x1080
movl %eax, %ebx
leaq 0x3379(%rip), %r15      # 0x4774
movl $0x3, %edi
movq %r15, %rsi
callq 0x1120
movl $0x2, %edi
movq %r15, %rsi
callq 0x1120
movl %ebx, %edi
movl $0x1, %esi
callq 0x1070
leaq 0x4eef(%rip), %rdi      # 0x6317
movl $0x1, %esi
callq 0x5090
movq %r14, %rdi
callq 0x46c6
testl %eax, %eax
je 0x14b9
leaq 0x332f(%rip), %r14      # 0x4774
leaq 0x4ecb(%rip), %r15      # 0x6317
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq (%rsp), %rdi
callq 0x34c8
movq %rax, %rbp
movq (%rsp), %rdi
callq 0x1030
testq %rbp, %rbp
je 0x147f
movq %rbp, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x175e
jmp 0x1487
movl $0x2, 0x30(%rsp)
movl $0x2, %edi
movq %r14, %rsi
callq 0x1120
movl %ebx, %edi
movl $0x1, %esi
callq 0x1070
movq %r15, %rdi
movl $0x1, %esi
callq 0x5090
movq %r12, %rdi
callq 0x46c6
testl %eax, %eax
jne 0x1454
leaq 0x4b53(%rip), %rdi      # 0x6013
movl $0x1, %esi
callq 0x5048
leaq 0x8(%rsp), %rdi
callq 0x484c
movq (%rsp), %rdi
callq 0x1030
xorl %edi, %edi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell.c
// Function: get_path
char			*get_path(t_shell *shell)
{
	char *value;
	char *tmp;
	char *path;
	char **paths;

	value = get_env(shell, "PATH");
	if (!value || ft_strlen(value) == 0)
	{
		free(value);
		path = search_binary_in_pwd(shell);
	}
	else
	{
		tmp = append_pwd(value);
		paths = ft_split(tmp, ':');
		path = search_binary(shell, paths);
		free(value);
		free(tmp);
		clean_matrix(paths);
		free(paths);
	}
	return (path);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4b22(%rip), %rsi      # 0x6018
callq 0x1db4
movq %rax, %r14
testq %rax, %rax
je 0x1568
movq %r14, %rdi
callq 0x5408
testq %rax, %rax
je 0x1568
movq %r14, %rdi
callq 0x18f1
movq %rax, %r15
movq %rax, %rdi
movl $0x3a, %esi
callq 0x50b8
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x4824
movq %r12, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x433c
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell.c
// Function: run_command
int				run_command(t_shell *shell)
{
	pid_t	pid;
	char	*path;
	char	*tmp;

	shell->is_binary = 0;
	path = get_path(shell);
	if (path)
	{
		if ((pid = fork()) == 0 && check_permissions(shell, path))
		{
			execve(path, shell->args, shell->env);
			exit(shell->stat_loc);
		}
		signal(SIGINT, signal_handler_waiting);
		waitpid(pid, &shell->stat_loc, 0);
		if (WIFEXITED(shell->stat_loc))
			shell->stat_loc = WEXITSTATUS(shell->stat_loc);
		if (shell->stat_loc == -1)
			ft_putstr_fd("\n", 1);
		tmp = update_last_arg(shell->args);
		ft_export(shell, tmp);
		free(tmp);
	}
	free(path);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x30(%rdi)
callq 0x14e4
movq %rax, %r14
testq %rax, %rax
je 0x1620
callq 0x11b0
movl %eax, %ebp
testl %eax, %eax
jne 0x15bb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4cfc
testl %eax, %eax
jne 0x1638
leaq 0x31ea(%rip), %rsi      # 0x47ac
movl $0x2, %edi
callq 0x1120
leaq 0x28(%rbx), %r15
movl %ebp, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1170
movl 0x28(%rbx), %eax
testb $0x7f, %al
je 0x15fb
cmpl $-0x1, %eax
jne 0x1601
leaq 0x4a2e(%rip), %rdi      # 0x601d
movl $0x1, %esi
callq 0x5090
jmp 0x1601
movzbl %ah, %eax
movl %eax, (%r15)
movq 0x18(%rbx), %rdi
callq 0x18de
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x26eb
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq %r14, %rdi
callq 0x1100
movl 0x28(%rbx), %edi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell.c
// Function: check_builtin
int				check_builtin(t_shell *shell)
{
	int		ret;
	char	*tmp;

	ret = 0;
	if (ft_strcmp(shell->args[0], "exit"))
		ft_exit(shell);
	else if (ft_strcmp(shell->args[0], "echo"))
		ret = ft_echo(shell->args + 1);
	else if (ft_strcmp(shell->args[0], "cd"))
		ret = ft_cd(shell);
	else if (ft_strcmp(*shell->args, "pwd"))
		ret = ft_pwd(shell);
	else if (ft_strcmp(*shell->args, "export"))
		ret = exec_export(shell);
	else if (ft_strcmp(*shell->args, "unset"))
		ret = ft_unset(shell);
	else
		return (exec_env(shell));
	tmp = update_last_arg(shell->args);
	ft_export(shell, tmp);
	free(tmp);
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq (%rax), %rdi
leaq 0x49ae(%rip), %rsi      # 0x6013
callq 0x5460
testq %rax, %rax
je 0x167e
movq %rbx, %rdi
callq 0x2b08
xorl %ebp, %ebp
jmp 0x172c
movq 0x18(%rbx), %rax
movq (%rax), %rdi
leaq 0x4993(%rip), %rsi      # 0x601f
callq 0x5460
movq 0x18(%rbx), %rdi
testq %rax, %rax
je 0x16a8
addq $0x8, %rdi
callq 0x235c
jmp 0x172a
movq (%rdi), %rdi
leaq 0x4972(%rip), %rsi      # 0x6024
callq 0x5460
testq %rax, %rax
je 0x16c6
movq %rbx, %rdi
callq 0x1ef0
jmp 0x172a
movq 0x18(%rbx), %rax
movq (%rax), %rdi
leaq 0x4953(%rip), %rsi      # 0x6027
callq 0x5460
testq %rax, %rax
je 0x16e8
movq %rbx, %rdi
callq 0x2424
jmp 0x172a
movq 0x18(%rbx), %rax
movq (%rax), %rdi
leaq 0x4935(%rip), %rsi      # 0x602b
callq 0x5460
testq %rax, %rax
je 0x170a
movq %rbx, %rdi
callq 0x19fc
jmp 0x172a
movq 0x18(%rbx), %rax
movq (%rax), %rdi
leaq 0x491a(%rip), %rsi      # 0x6032
callq 0x5460
testq %rax, %rax
je 0x1752
movq %rbx, %rdi
callq 0x2484
movl %eax, %ebp
movq 0x18(%rbx), %rdi
callq 0x18de
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x26eb
movq %r14, %rdi
callq 0x1030
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1a1b
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell.c
// Function: minishell
void			minishell(char *line, t_shell *shell)
{
	size_t	it;
	size_t	jt;

	it = 0;
	line = safe_allocate(line, inject_spaces);
	if (validate_input(shell, line))
	{
		shell->instructions = ft_split_non_escaped(line, ';');
		while (shell->instructions[it])
		{
			jt = 0;
			shell->stat_loc = 0;
			while (is_space(shell->instructions[it][jt]))
				jt++;
			shell->commands = ft_split_non_escaped(&shell->instructions[it][jt],
					'|');
			handle_commands(shell);
			shell->previous_stat = shell->stat_loc;
			free(shell->commands);
			it++;
		}
	}
	free(line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x510(%rip), %rsi       # 0x1c80
callq 0x19c7
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c7c
testl %eax, %eax
je 0x18a4
movq %r14, %rdi
movl $0x3b, %esi
callq 0x3a10
movq %rax, (%rbx)
cmpq $0x0, (%rax)
je 0x18a4
xorl %r12d, %r12d
movl $0x0, 0x28(%rbx)
movq $-0x1, %r15
movq (%rbx), %rax
movq (%rax,%r12,8), %rax
movsbl 0x1(%rax,%r15), %edi
callq 0x3746
incq %r15
testw %ax, %ax
jne 0x17b6
movq (%rbx), %rax
addq (%rax,%r12,8), %r15
movq %r15, %rdi
movl $0x7c, %esi
callq 0x3a10
movq %rax, 0x10(%rbx)
cmpq $0x0, 0x8(%rax)
je 0x17fc
movq %rbx, %rdi
callq 0x4b14
jmp 0x1881
movq (%rax), %rsi
testq %rsi, %rsi
je 0x1881
movq %rbx, %rdi
callq 0x31d8
movq %rax, %r15
movq %rax, %rdi
callq 0x3464
movq %rax, 0x18(%rbx)
movq (%rax), %rdi
callq 0x51fc
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3f84
cmpl $-0x1, %eax
je 0x1852
movq 0x18(%rbx), %rax
cmpq $0x0, (%rax)
je 0x1852
movq %rbx, %rdi
callq 0x1650
testl %eax, %eax
jne 0x1852
movq %rbx, %rdi
callq 0x1583
movq 0x18(%rbx), %rdi
callq 0x4824
movq 0x18(%rbx), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movl 0x28(%rbx), %eax
movl %eax, 0x2c(%rbx)
movq 0x10(%rbx), %rdi
callq 0x1030
movq (%rbx), %rax
cmpq $0x0, 0x8(%rax,%r12,8)
leaq 0x1(%r12), %r12
jne 0x17a8
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
nop
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils.c
// Function: append_pwd
char	*append_pwd(char *value)
{
	char	cwd[1024];
	char	*aux;

	aux = value;
	if (getcwd(cwd, sizeof(cwd)))
	{
		if (value[0] == ':')
			return (ft_strjoin(cwd, value));
		if (value[ft_strlen(value) - 1] == ':')
			return (ft_strjoin(value, cwd));
		while (*aux)
		{
			if (!(aux = ft_strchr(aux, ':')))
				break ;
			if (*(aux + 1) == ':')
				return (ft_strjoin(value, cwd));
			aux++;
		}
	}
	return (ft_strdup(value));
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x10a0
testq %rax, %rax
je 0x195c
cmpb $0x3a, (%rbx)
jne 0x191b
movq %rsp, %rdi
movq %rbx, %rsi
jmp 0x1955
movq %rbx, %rdi
callq 0x5408
cmpb $0x3a, -0x1(%rbx,%rax)
je 0x194f
movb (%rbx), %al
movq %rbx, %rdi
testb %al, %al
je 0x195c
movl $0x3a, %esi
callq 0x51dc
testq %rax, %rax
je 0x195c
movq %rax, %rdi
incq %rdi
movb 0x1(%rax), %al
cmpb $0x3a, %al
jne 0x192f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x523c
jmp 0x1964
movq %rbx, %rdi
callq 0x51fc
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils.c
// Function: to_lower
char	*to_lower(char *input)
{
	size_t	it;
	char	*output;
	char	*tmp;

	tmp = ft_strdup(input);
	output = calloc(1, ft_strlen(tmp));
	it = -1;
	while (tmp[++it])
	{
		output[it] = ft_tolower(tmp[it]);
	}
	free(tmp);
	output[it] = '\0';
	return (output);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x51fc
movq %rax, %rbx
movq %rax, %rdi
callq 0x5408
movl $0x1, %edi
movq %rax, %rsi
callq 0x1110
movq %rax, %r14
movb (%rbx), %al
xorl %r15d, %r15d
testb %al, %al
je 0x19b1
movsbl %al, %edi
callq 0x541c
movb %al, (%r14,%r15)
movb 0x1(%rbx,%r15), %al
incq %r15
jmp 0x1997
movq %rbx, %rdi
callq 0x1030
movb $0x0, (%r14,%r15)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils.c
// Function: safe_allocate
char	*safe_allocate(char *line, char *(*f)(char *))
{
	char	*tmp;
	char	*aux;

	tmp = f(line);
	free(line);
	aux = ft_strdup(tmp);
	free(tmp);
	return (aux);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq *%rsi
movq %rax, %r14
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x51fc
movq %rax, %rbx
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils_2.c
// Function: exec_env
int		exec_env(t_shell *shell)
{
	char	*lower;
	char	*path;
	char	*tmp;

	lower = to_lower(shell->args[0]);
	if (ft_strcmp(lower, "env"))
	{
		path = get_path(shell);
		tmp = ft_strjoin("_=", path);
		free(path);
		ft_export(shell, tmp);
		free(tmp);
		free(lower);
		return (ft_env(shell, shell->env));
	}
	free(lower);
	return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq (%rax), %rdi
callq 0x196d
movq %rax, %r14
leaq 0x461b(%rip), %rsi      # 0x6057
movq %rax, %rdi
callq 0x5460
testq %rax, %rax
je 0x1aa0
movq %rbx, %rdi
callq 0x14e4
movq %rax, %r15
leaq 0x45dd(%rip), %rdi      # 0x6038
movq %rax, %rsi
callq 0x523c
movq %rax, %r12
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
movq %r12, %rsi
callq 0x26eb
movq %r12, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq 0x20(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1e30
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils_2.c
// Function: get_var_key
char	*get_var_key(char *line, int it)
{
	int		i;
	int		k;
	char	*key;

	i = it;
	k = 0;
	while (i >= 0 && line[i] != '{')
		i--;
	if (!(key = malloc((it - i) * sizeof(char))))
		return (NULL);
	i++;
	while (i < it)
		key[k++] = line[i++];
	key[k] = '\0';
	return (key);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r12d
testl %esi, %esi
js 0x1ae9
movl %ebp, %r12d
movl %r12d, %eax
cmpb $0x7b, (%rbx,%rax)
je 0x1ae9
leal -0x1(%r12), %eax
testl %r12d, %r12d
movl %eax, %r12d
jg 0x1acd
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %ebp, %r15d
subl %r12d, %r15d
movslq %r15d, %rdi
callq 0x1160
movq %rax, %r14
testq %rax, %rax
je 0x1b2e
incl %r12d
cmpl %ebp, %r12d
jge 0x1b27
movslq %r12d, %rax
addq %rax, %rbx
addl $-0x2, %r15d
incq %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1140
movl %r15d, %eax
jmp 0x1b29
xorl %eax, %eax
movb $0x0, (%r14,%rax)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils_3.c
// Function: add_space
char	*add_space(char *line, char *output, size_t *it, char redir)
{
	if (line[*it] == redir)
	{
		ft_strlcat(output, line, ft_strlen(output) + *it + 1);
		if (line[*it - 1] != ' ' && line[*it - 1] != redir)
			ft_strlcat(output, " ", ft_strlen(output) + 2);
		ft_strlcat(output, line + *it, ft_strlen(output) + 2);
		if (line[*it + 1] != ' ' && line[*it + 1] != redir)
			ft_strlcat(output, " ", ft_strlen(output) + 2);
		line = line + *it + 1;
		*it = -1;
	}
	return (line);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdi, %rbx
movq (%rdx), %rax
cmpb %bpl, (%rdi,%rax)
jne 0x1c22
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
callq 0x5408
movq (%r14), %rcx
leaq (%rax,%rcx), %rdx
incq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5334
movq (%r14), %r12
movb -0x1(%rbx,%r12), %al
cmpb $0x20, %al
sete %cl
cmpb %bpl, %al
sete %al
orb %cl, %al
jne 0x1bc6
movq %r15, %rdi
callq 0x5408
leaq 0x2(%rax), %rdx
leaq 0x45b2(%rip), %rsi      # 0x616d
movq %r15, %rdi
callq 0x5334
movq (%r14), %r12
addq %rbx, %r12
movq %r15, %rdi
callq 0x5408
leaq 0x2(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5334
movq (%r14), %rax
movb 0x1(%rbx,%rax), %cl
cmpb $0x20, %cl
sete %dl
cmpb %bpl, %cl
sete %cl
orb %dl, %cl
jne 0x1c15
movq %r15, %rdi
callq 0x5408
leaq 0x2(%rax), %rdx
leaq 0x4563(%rip), %rsi      # 0x616d
movq %r15, %rdi
callq 0x5334
movq (%r14), %rax
addq %rax, %rbx
incq %rbx
movq $-0x1, (%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vdedios[P]minishell/srcs/shell/shell_utils_3.c
// Function: additional_spaces
size_t	additional_spaces(char *line)
{
	size_t	cont;
	size_t	it;

	it = -1;
	cont = 0;
	while (line[++it])
	{
		if (line[it] == '>' && line[it - 1] != ' ' && line[it - 1] != '>')
			cont++;
		if (line[it] == '>' && line[it + 1] != ' ')
			cont++;
		if (line[it] == '<' && line[it - 1] != ' ' && line[it - 1] != '<')
			cont++;
		if (line[it] == '<' && line[it + 1] != ' ')
			cont++;
	}
	return (cont);
}

// Assembly:
movq $-0x1, %rcx
xorl %eax, %eax
movzbl 0x1(%rdi,%rcx), %edx
testl %edx, %edx
je 0x1c7f
incq %rcx
cmpl $0x3c, %edx
je 0x1c5e
cmpl $0x3e, %edx
jne 0x1c37
movzbl -0x1(%rdi,%rcx), %edx
cmpl $0x20, %edx
je 0x1c70
cmpl $0x3e, %edx
je 0x1c70
jmp 0x1c6d
movzbl -0x1(%rdi,%rcx), %edx
cmpl $0x20, %edx
je 0x1c70
cmpl $0x3c, %edx
je 0x1c70
incq %rax
xorl %edx, %edx
cmpb $0x20, 0x1(%rdi,%rcx)
setne %dl
addq %rdx, %rax
jmp 0x1c37
retq