LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: openicn
struct icn *openicn(char *filename)
{
	struct icn *newicn = NULL;
	FILE *fin = NULL;

	if (!filename)
		return NULL;

	if (!(fin = fopen(filename, "rb")))
	{
		perror("fopen()");
		return NULL;
	}
	if (!(newicn = malloc(sizeof (struct icn))))
	{
		perror("malloc()");
		fclose(fin);
		return NULL;
	}
	fseek(fin, 0, SEEK_END);
        newicn->filesize = ftell(fin);
        fseek(fin, 0, SEEK_SET);
	if (!(newicn->data = malloc(sizeof (char) * newicn->filesize)))
	{
		perror("malloc()");
		fclose(fin);
		free(newicn);
		return NULL;
	}
	if (fread(newicn->data, 1, newicn->filesize, fin) != newicn->filesize)
	{
		perror("fread()");
		fclose(fin);
		free(newicn);
		free(newicn->data);
		return NULL;
	}
	if (((*(unsigned int*)newicn->data + 2) != newicn->filesize) && !icnfillentry(newicn))
	{
		fclose(fin);
		free(newicn);
		free(newicn->data);
		return NULL;
	}
	fclose(fin);
	return newicn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x17af
leaq 0xa25(%rip), %rsi       # 0x20d6
callq 0x1160
testq %rax, %rax
je 0x174d
movq %rax, %r14
pushq $0x20
popq %rdi
callq 0x1130
testq %rax, %rax
je 0x175b
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1140
movq %r14, %rdi
callq 0x10f0
movq %rax, %r15
movl %r15d, 0x18(%rbx)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1140
movl %r15d, %r12d
movq %r12, %rdi
callq 0x1130
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1771
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1050
cmpq %r12, %rax
jne 0x178a
movl (%r13), %eax
addl $0x2, %eax
cmpl %r15d, %eax
je 0x1743
movq %rbx, %rdi
callq 0x17be
testl %eax, %eax
je 0x1796
movq %r14, %rdi
callq 0x1070
jmp 0x17b1
leaq 0x8b3(%rip), %rdi       # 0x2007
callq 0x1170
jmp 0x17af
leaq 0x977(%rip), %rdi       # 0x20d9
callq 0x1170
movq %r14, %rdi
callq 0x1070
jmp 0x17af
leaq 0x961(%rip), %rdi       # 0x20d9
callq 0x1170
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
jmp 0x17aa
leaq 0x951(%rip), %rdi       # 0x20e2
callq 0x1170
movq %r14, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x1040
movq 0x10(%rbx), %rdi
callq 0x1040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: icnfillentry
int icnfillentry(struct icn *icn)
{
	unsigned int i;

	if (!icn)
		return 0;

	icn->numentry = *(unsigned short*)icn->data;
	if (!(icn->entry = malloc(sizeof (struct icn) * icn->numentry)))
	{
		perror("malloc()");
		return 0;
	}
	for (i = 0; i < icn->numentry; i++)
	{
		memcpy(&icn->entry[i], icn->data + 2 + 4 + i * sizeof (struct icnentry), sizeof (struct icnentry));
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x182a
movq %rdi, %r14
movq 0x10(%rdi), %rax
movzwl (%rax), %ebp
movw %bp, (%rdi)
movl %ebp, %edi
shll $0x5, %edi
callq 0x1130
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x181e
xorl %eax, %eax
pushq $0x1
popq %rbx
xorl %ecx, %ecx
movzwl %bp, %edx
cmpq %rdx, %rcx
jae 0x182a
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rsi
movl 0xe(%rsi,%rax), %edi
movl %edi, 0x8(%rdx,%rax)
movq 0x6(%rsi,%rax), %rsi
movq %rsi, (%rdx,%rax)
incq %rcx
movzwl (%r14), %ebp
addq $0xc, %rax
jmp 0x17f0
leaq 0x8b4(%rip), %rdi       # 0x20d9
callq 0x1170
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: closeicn
void closeicn(struct icn *icn)
{
	if (icn)
	{
		if (icn->entry)
			free(icn->entry);
		if (icn->data)
			free(icn->data);
		free(icn);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1855
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1040
movq 0x10(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
popq %rbx
jmp 0x1040
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: printicninfo
void printicninfo(struct icn *icn)
{
	unsigned int i;

	if (!icn)
		return;

	printf("NumEntry = %X\n", icn->numentry);
	for (i = 0; i < icn->numentry; i++)
	{
		printf("Width = %X\n", icn->entry[i].width);
		printf("Height = %X\n", icn->entry[i].height);
		printf("Offset = %X\n", icn->entry[i].offset);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x18f2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl (%rdi), %esi
leaq 0x873(%rip), %rdi       # 0x20ea
xorl %eax, %eax
callq 0x1090
leaq 0x874(%rip), %r14       # 0x20f9
leaq 0x879(%rip), %r15       # 0x2105
leaq 0x87f(%rip), %r12       # 0x2112
xorl %r13d, %r13d
xorl %ebp, %ebp
movzwl (%rbx), %eax
cmpq %rax, %rbp
jae 0x18e4
movq 0x8(%rbx), %rax
movzwl 0x4(%rax,%r13), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rax
movzwl 0x6(%rax,%r13), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rax
movl 0x8(%rax,%r13), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1090
incq %rbp
addq $0xc, %r13
jmp 0x1898
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: icngetmaxwidth
int icngetmaxwidth(struct icn *icn)
{
	unsigned int width = 0;
	unsigned int i;

	if (!icn)
		return width;

	for (i = 0; i < icn->numentry; i++)
	{
		if (icn->entry[i].width > width)
			width = icn->entry[i].width;
	}
	return width;
}

// Assembly:
testq %rdi, %rdi
je 0x191c
movzwl (%rdi), %eax
imulq $0xc, %rax, %rcx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x191e
movq 0x8(%rdi), %rsi
movzwl 0x4(%rsi,%rdx), %esi
cmpl %esi, %eax
cmovbel %esi, %eax
addq $0xc, %rdx
jmp 0x1903
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/w4kfu[P]HommI/Icn/icn.c
// Function: icngetmaxheight
int icngetmaxheight(struct icn *icn)
{
	unsigned int height = 0;
	unsigned int i;

	if (!icn)
		return height;

	for (i = 0; i < icn->numentry; i++)
	{
		if (icn->entry[i].height > height)
			height = icn->entry[i].height;
	}
	return height;
}

// Assembly:
testq %rdi, %rdi
je 0x1948
movzwl (%rdi), %eax
imulq $0xc, %rax, %rcx
xorl %edx, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x194a
movq 0x8(%rdi), %rsi
movzwl 0x6(%rsi,%rdx), %esi
cmpl %esi, %eax
cmovbel %esi, %eax
addq $0xc, %rdx
jmp 0x192f
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/cirocosta[P]stress/src/epoll-tcp-server.c
// Function: make_socket_non_blocking
static void
make_socket_non_blocking(int sfd)
{
	int flags;
	int s;

	_STRESS_MUST_P((flags = fcntl(sfd, F_GETFL, 0)) != -1,
	               "fcntl",
	               "Couldn't retrieve flags from socket file descriptor");

	flags |= O_NONBLOCK;
	_STRESS_MUST_P(
	  (s = fcntl(sfd, F_SETFL, flags)) != -1,
	  "fcntl",
	  "Couldn't set nonblocking flags on socket file descriptor");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
je 0x2029
orl $0x800, %eax            # imm = 0x800
pushq $0x4
popq %rsi
movl %ebx, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
je 0x20bd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x2fc8(%rip), %r12      # 0x4ff8
movq (%r12), %rcx
leaq 0x1166(%rip), %rdi      # 0x31a1
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0x1153(%rip), %r14      # 0x31a7
pushq $0x3
popq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0x1292(%rip), %rdi      # 0x3303
pushq $0x33
popq %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0xfbc(%rip), %rdi       # 0x3043
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rdi
leaq 0xfa9(%rip), %rsi       # 0x3046
leaq 0x10df(%rip), %rdx      # 0x3183
xorl %eax, %eax
callq 0x1140
movq (%r12), %rdi
leaq 0xfac(%rip), %rsi       # 0x3062
pushq $0x23
jmp 0x214c
movq 0x2f34(%rip), %r12      # 0x4ff8
movq (%r12), %rcx
leaq 0x10d2(%rip), %rdi      # 0x31a1
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0x10bf(%rip), %r14      # 0x31a7
pushq $0x3
popq %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0x1238(%rip), %rdi      # 0x333d
pushq $0x38
popq %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0xf28(%rip), %rdi       # 0x3043
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rdi
leaq 0xf15(%rip), %rsi       # 0x3046
leaq 0x104b(%rip), %rdx      # 0x3183
xorl %eax, %eax
callq 0x1140
movq (%r12), %rdi
leaq 0xf18(%rip), %rsi       # 0x3062
pushq $0x29
popq %rdx
xorl %eax, %eax
callq 0x1140
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x10f0
movq (%r12), %rcx
leaq 0x102f(%rip), %rdi      # 0x319a
pushq $0x10
popq %rsi
movq %rbx, %rdx
callq 0x11d0
leaq 0x11ba(%rip), %rdi      # 0x3337
callq 0x1180
movq (%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x11d0
movq (%r12), %rcx
leaq 0xed0(%rip), %rdi       # 0x306f
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x11d0
pushq $0x1
popq %rdi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_OutputHeader
void fTCPStream_OutputHeader(TCPStream_t* S, TCPOutputHeader_t* Header) 
{
	// ensure file is open
	fTCPStream_Open(S);	

	fProfile_Start(13, "TCP PktAdd OutputHeader");

	//int wlen = write(S->fd, &Header, sizeof(Header));
	//int wlen = fwrite(&Header, sizeof(Header), 1, S->File);
	fFile_Write(S->File, Header, sizeof(TCPOutputHeader_t), false);

	S->WritePos += sizeof(TCPOutputHeader_t);

	S->LastTSC = rdtsc();

	fProfile_Stop(13);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x15ba
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xc846(%rip), %rcx      # 0xddb0
movq %rax, 0x68(%rcx)
leaq 0x6b81(%rip), %rax      # 0x80f6
leaq 0xcb34(%rip), %rcx      # 0xe0b0
movq %rax, 0x68(%rcx)
movq 0x8(%rbx), %rdi
pushq $0x20
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x6ec0
addq $0x20, 0x2440(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x2428(%rbx)
pushq $0xd
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1670
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_Open
static void fTCPStream_Open(TCPStream_t* S)
{
	fProfile_Start(10, "TCP PktAdd Open");

	if (S->File == NULL)
	{
		fProfile_Start(15, "TCP IO Open");

		//S->File = fopen64(S->Path, "w+"); 
		S->File = fFile_Open(S->Path, NULL); 
		fProfile_Stop(15);

		if (S->File == NULL) 
		{
			fprintf(stderr, "failed to create output file [%s] errno:%i (%s)\n", S->Path, errno, strerror(errno));
			exit(-1);
		}
	}
	fProfile_Stop(10);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xc7e0(%rip), %rcx      # 0xddb0
movq %rax, 0x50(%rcx)
leaq 0x6f1f(%rip), %rax      # 0x84fa
leaq 0xcace(%rip), %rsi      # 0xe0b0
movq %rax, 0x50(%rsi)
cmpq $0x0, 0x8(%rdi)
jne 0x162e
movq %rdi, %rbx
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x78(%rcx)
leaq 0x6f04(%rip), %rax      # 0x850a
movq %rax, 0x78(%rsi)
leaq 0x2028(%rdi), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x6e34
movq %rax, 0x8(%rbx)
pushq $0xf
popq %rdi
callq 0x1670
cmpq $0x0, 0x8(%rbx)
je 0x1637
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1670
movq 0xa9ba(%rip), %rax      # 0xbff8
movq (%rax), %rbx
callq 0x1040
movl (%rax), %ebp
movl %ebp, %edi
callq 0x1260
leaq 0x6ec0(%rip), %rsi      # 0x8516
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x1170
pushq $-0x1
popq %rdi
callq 0x1240
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_OutputPayload
void fTCPStream_OutputPayload(TCPStream_t* S, u64 TS, u32 Length, u8* Payload, u32 Flag, u32 SeqNo, u32 AckNo, u32 WindowSize)
{

	// ensure file is open 
	fTCPStream_Open(S);	

	fProfile_Start(12, "TCP PktAdd OutputPayload");
	S->SeqNo += Length;

	int rlen;
	if (g_EnableTCPHeader)
	{
		TCPOutputHeader_t Header;
		Header.TS 		= TS;
		Header.Length 	= Length;
		Header.StreamID	= S->FlowID;
		Header.SeqNo	= SeqNo; 
		Header.AckNo	= AckNo; 
		Header.Window	= WindowSize; 
		Header.Flag		= Flag; 
		Header.CRC		= 0;
		Header.CRC		+= Header.TS;
		Header.CRC		+= Header.Length;
		Header.CRC		+= Header.StreamID;
		Header.CRC		+= Header.SeqNo;
		Header.CRC		+= Header.AckNo;
		Header.CRC		+= Header.Window;
		Header.CRC		+= Header.Flag;

		//rlen = write(S->fd, &Header, sizeof(Header));
		//rlen = fwrite(&Header, sizeof(Header), 1, S->File);
		fFile_Write(S->File, &Header, sizeof(TCPOutputHeader_t), false);

		S->WritePos += sizeof(TCPOutputHeader_t);
	}

	/*
	if (S->IsTrace)
	{
		for (int i=0; i < Length; i++)
		{
			if (i % 16 == 0) printf("\n");
			printf("%02x ", Payload[i]);
		}
		printf("\n");
	}
	*/


	//rlen = write(S->fd, Payload, Length);
	//rlen = fwrite(Payload, Length, 1, S->File);
	fFile_Write(S->File, Payload, Length, true);

	S->WritePos += Length; 

	S->LastTSC = rdtsc();

	// total TCP bytes output
	s_TotalByte += Length;
	s_TotalPkt	+= 1;

	fProfile_Stop(12);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r12d
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
callq 0x15ba
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
leaq 0xc6e2(%rip), %rcx      # 0xddb0
movq %rax, 0x60(%rcx)
leaq 0x6a35(%rip), %rax      # 0x810e
leaq 0xc9d0(%rip), %rcx      # 0xe0b0
movq %rax, 0x60(%rcx)
addl %ebp, 0x18(%rbx)
leaq 0xbb0e(%rip), %rax      # 0xd1fc
cmpl $0x0, (%rax)
je 0x1748
movl 0x68(%rsp), %eax
movl 0x60(%rsp), %ecx
leaq 0x8(%rsp), %rsi
movq %r13, (%rsi)
movw %bp, 0x8(%rsi)
movl 0x10(%rbx), %edx
movw %dx, 0xa(%rsi)
movl %r12d, 0xc(%rsi)
movl %ecx, 0x10(%rsi)
movl %eax, 0x14(%rsi)
movw %r15w, 0x18(%rsi)
addl %ebp, %r13d
addl %r12d, %r15d
addl %r13d, %r15d
addl %ecx, %r15d
addl %edx, %eax
addl %r15d, %eax
movw %ax, 0x1a(%rsi)
movq 0x8(%rbx), %rdi
pushq $0x20
popq %rdx
xorl %ecx, %ecx
callq 0x6ec0
addq $0x20, 0x2440(%rbx)
movq 0x8(%rbx), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
movl %ebp, %edx
callq 0x6ec0
movl %ebp, %ecx
addq %rcx, 0x2440(%rbx)
rdtsc
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0x2428(%rbx)
addq %rcx, 0xaa15(%rip)      # 0xc190
incq 0xaa16(%rip)            # 0xc198
pushq $0xc
popq %rdi
callq 0x1670
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/./fTypes.h
// Function: FormatTS
static inline char* FormatTS(u64 ts)
{
	u64 usec = ts / 1000ULL;
	u64 msec = usec / 1000ULL;
	u64 sec = msec / 1000ULL;
	u64 min = sec / 60ULL;
	u64 hour = min / 60ULL;

	u64 nsec = ts - usec*1000ULL;
	usec = usec - msec*1000ULL;
	msec = msec - sec*1000ULL;
	sec = sec - min*60ULL;
	min = min - hour*60ULL;

	static char List[16][128];
	static int Pos = 0;

	char* S = List[Pos];
	Pos = (Pos + 1) & 0xf;

	sprintf(S, "%02lli:%02lli:%02lli.%03lli.%03lli.%03lli", hour % 24, min, sec, msec,usec, nsec);

	return S;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rdi, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movl $0xf4240, %esi          # imm = 0xF4240
movq %rdi, %rax
xorl %edx, %edx
divq %rsi
movq %rax, %rsi
movl $0x3b9aca00, %r8d       # imm = 0x3B9ACA00
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movq %rax, %r10
movabsq $0xdf8475800, %r8       # imm = 0xDF8475800
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movq %rax, %r11
movabsq $0x34630b8a000, %r8     # imm = 0x34630B8A000
movq %rdi, %rax
xorl %edx, %edx
divq %r8
imulq $-0x3e8, %rcx, %r14     # imm = 0xFC18
addq %rdi, %r14
imulq $-0x3e8, %rsi, %r15     # imm = 0xFC18
addq %rcx, %r15
imulq $-0x3e8, %r10, %r9      # imm = 0xFC18
addq %rsi, %r9
imulq $-0x3c, %r11, %r8
addq %r10, %r8
imulq $-0x3c, %rax, %rcx
addq %r11, %rcx
movslq 0xa9d3(%rip), %rdx      # 0xc9c0
leal 0x1(%rdx), %esi
shlq $0x7, %rdx
leaq 0xa1c5(%rip), %rbx      # 0xc1c0
addq %rdx, %rbx
andl $0xf, %esi
movl %esi, 0xa9b9(%rip)      # 0xc9c0
pushq $0x18
popq %rsi
xorl %edx, %edx
divl %esi
leaq 0x6532(%rip), %rsi      # 0x8547
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r15
callq 0x1230
popq %rcx
popq %rdx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/tcpstream.c
// Function: fTCPStream_FlowStats
void fTCPStream_FlowStats(TCPStream_t* S, FILE* Out)
{
	if (!S) return;

	fprintf(Out, " BufPos: %8i WritePos:%8i PktTotal:%8i PktOOO:%8i PktDrop:%8i", 
					S->BufferListPos, 
					S->WritePos,
					S->PktTotal,
					S->PktOOO,
					S->PktDrop

	);
}

// Assembly:
testq %rdi, %rdi
je 0x24a3
pushq %rax
movl 0x1c(%rdi), %edx
movq 0x2440(%rdi), %rcx
movl 0x2458(%rdi), %r8d
movl 0x2454(%rdi), %r9d
movl 0x2450(%rdi), %eax
movl %eax, (%rsp)
leaq 0x6027(%rip), %rax      # 0x84bc
movq %rsi, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x1170
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/udpstream.c
// Function: fUDPStream_Add
void fUDPStream_Add(UDPStream_t* Stream, u64 TS, PCAPPacket_t* Pkt, UDPHeader_t* UDPHeader)
{
	// output in PCAP format
	if (g_OutputPCAP)
	{
		fFile_Write(Stream->F, Pkt, sizeof(PCAPPacket_t) + Pkt->LengthCapture, true);
		return;
	}

	// write only the UDP payload
	u32 Length = swap16(UDPHeader->Length);	
	if (Length >= 16*1024)
	{
		fprintf(stderr, "udp packet length invalid UDP Length:%i PacketLength:%i\n", Length, Pkt->Length);
		return;
	}

	// ensure its caped at the packet length
	if (Length > Pkt->Length)
	{
		fprintf(stderr, "udp packet length truncated: Header %i Capture %i\n", Length, Pkt->Length);
		Length = Pkt->Length;
	}	

	if (g_EnableUDPHeader)
	{
		OutputHeader_t Header;
		Header.TS 		= TS;
		Header.Length 	= sizeof(UDPHeader_t) + Length; 
		Header.StreamID	= Stream->FlowID;
		fFile_Write(Stream->F, &Header, sizeof(Header), false );
	}

	// write the UDP header + payload 
	fFile_Write(Stream->F, UDPHeader, sizeof(UDPHeader_t) + Length, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r13
movq %rdi, %r15
leaq 0xab9a(%rip), %rax      # 0xd214
cmpl $0x0, (%rax)
je 0x26a1
movq (%r15), %rdi
movl 0x8(%r13), %edx
addl $0x10, %edx
pushq $0x1
popq %rcx
movq %r13, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6ec0
movq %rcx, %rbx
movzwl 0x4(%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
cmpw $0x4000, %r14w          # imm = 0x4000
jae 0x271e
movq %rsi, %r12
movl 0xc(%r13), %ecx
cmpl %r14d, %ecx
jb 0x274a
leaq 0xab31(%rip), %rax      # 0xd200
cmpl $0x0, (%rax)
je 0x26fb
movq %rsp, %rsi
movq %r12, (%rsi)
leal 0x8(%r14), %eax
movw %ax, 0x8(%rsi)
movzwl 0x408(%r15), %eax
movw %ax, 0xa(%rsi)
movq (%r15), %rdi
pushq $0x10
popq %rdx
xorl %ecx, %ecx
callq 0x6ec0
movq (%r15), %rdi
addl $0x8, %r14d
pushq $0x1
popq %rcx
movq %rbx, %rsi
movl %r14d, %edx
callq 0x6ec0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x98d3(%rip), %rax      # 0xbff8
movq (%rax), %rdi
movl 0xc(%r13), %ecx
leaq 0x5f21(%rip), %rsi      # 0x8654
movl %r14d, %edx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1170
movq 0x98a7(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x5f32(%rip), %rsi      # 0x868d
movl %r14d, %edx
xorl %eax, %eax
callq 0x1170
movl 0xc(%r13), %r14d
jmp 0x26c8
nop
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/main.c
// Function: FlowAlloc
static void FlowAlloc(u32 FlowMax)
{
	s_FlowListMax 		= FlowMax;

	if (s_FlowExtract)		free(s_FlowExtract);
	if (s_ExtractTCPFlow)	free(s_ExtractTCPFlow);
	if (s_ExtractTCP) 		free(s_ExtractTCP);
	if (s_ExtractUDP) 		free(s_ExtractUDP);

	s_FlowExtract 		= (u8*)malloc( s_FlowListMax * sizeof(u8) );
	s_ExtractTCPFlow 	= (u8*)malloc( s_FlowListMax * sizeof(u8) );
	s_ExtractTCP	 	= (struct TCPStream_t**)malloc( s_FlowListMax * sizeof(void*) );
	s_ExtractUDP	 	= (struct UDPStream_t**)malloc( s_FlowListMax * sizeof(void*) );

	memset(s_FlowExtract,		0, s_FlowListMax * sizeof(u8) );
	memset(s_ExtractTCPFlow,	0, s_FlowListMax * sizeof(u8) );
	memset(s_ExtractTCP, 		0, s_FlowListMax * sizeof(void*) );
	memset(s_ExtractUDP, 		0, s_FlowListMax * sizeof(void*) );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, 0x7f7f(%rip)      # 0xd550
movq 0x7c40(%rip), %rdi      # 0xd218
callq 0x1030
movq 0x7c5c(%rip), %rdi      # 0xd240
callq 0x1030
movq 0x7f70(%rip), %rdi      # 0xd560
callq 0x1030
movq 0x7f6c(%rip), %rdi      # 0xd568
callq 0x1030
movl %ebx, %ebx
pushq $0x1
popq %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1140
movq %rax, 0x7bff(%rip)      # 0xd218
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1140
movq %rax, 0x7c15(%rip)      # 0xd240
shlq $0x3, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1140
movq %rax, 0x7f1f(%rip)      # 0xd560
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1140
movq %rax, 0x7f15(%rip)      # 0xd568
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/main.c
// Function: PrintFlowTCP
static void PrintFlowTCP(FILE* Out, FlowHash_t* F, u32 FlowID, u32 FlowCnt)
{
	TCPHash_t* TCP = (TCPHash_t*)F->Data;
	fprintf(Out, "%5i FlowID: %8i | TCP  ", FlowCnt, FlowID); 	
	PrintMAC(Out, TCP->MACSrc);
	fprintf(Out, " -> ");
	PrintMAC(Out, TCP->MACDst);

	fprintf(Out, " | ");
	PrintIP4(Out, TCP->IPSrc);
	fprintf(Out, " -> ");
	PrintIP4(Out, TCP->IPDst);

	fprintf(Out, " | %6i -> %6i ", TCP->PortSrc, TCP->PortDst);

	fprintf(Out, " | ");
	fprintf(Out, " %'16lld Pkts ", F->PktCnt);
	fprintf(Out, " %'16lli Bytes ", F->Bytes);

	fprintf(Out, " | ");
	fprintf(Out, " %s -> %s", FormatTS(F->TSFirst), FormatTS(F->TSLast) ); 
	fprintf(Out, " : %s", FormatTS(F->TSLast - F->TSFirst));

	fprintf(Out, " | ");
	fprintf(Out, " Seq:%08x", F->TCPSeqNo);

	// generate TCP specific stats
	struct TCPStream_t* Stream = s_ExtractTCP[FlowID];
	fTCPStream_FlowStats(Stream, Out);

	fprintf(Out, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %eax
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x42bd(%rip), %rsi      # 0x9a59
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a98
leaq 0x42b8(%rip), %r15      # 0x9a71
pushq $0x4
popq %r12
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
leaq 0x6(%r14), %rsi
movq %rbx, %rdi
callq 0x5a98
leaq 0x4292(%rip), %r13      # 0x9a76
pushq $0x3
popq %rsi
movq %r13, %rdi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x5aca
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x5aca
movzwl 0x14(%r14), %edx
movzwl 0x16(%r14), %ecx
leaq 0x424b(%rip), %rsi      # 0x9a7a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %r13, %rdi
movq %r13, %r15
pushq $0x3
popq %rsi
movq %rsi, %r13
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
movq 0x48(%r14), %rdx
leaq 0x422e(%rip), %rsi      # 0x9a89
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq 0x50(%r14), %rdx
leaq 0x4228(%rip), %rsi      # 0x9a98
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
movq 0x58(%r14), %rdi
callq 0x5683
movq %rax, %r12
movq 0x60(%r14), %rdi
callq 0x5683
leaq 0x4201(%rip), %rsi      # 0x9aa8
movq %rbx, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1170
movq 0x60(%r14), %rdi
subq 0x58(%r14), %rdi
callq 0x5683
leaq 0x41e7(%rip), %rsi      # 0x9ab2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1170
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1250
movl 0x68(%r14), %edx
leaq 0x41c4(%rip), %rsi      # 0x9ab8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq 0x7c5b(%rip), %rax      # 0xd560
movl 0x4(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x2467
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/main.c
// Function: PrintFlowUDP
static void PrintFlowUDP(FILE* Out, FlowHash_t* F, u32 FlowID, u32 FlowCnt)
{

	UDPHash_t* UDP = (UDPHash_t*)F->Data;
	fprintf(Out, "%5i FlowID: %8i | UDP  ", FlowCnt, FlowID); 	
	PrintMAC(Out, UDP->MACSrc);
	fprintf(Out, " -> ");
	PrintMAC(Out, UDP->MACDst);

	fprintf(Out, " | ");
	PrintIP4(Out, UDP->IPSrc);
	fprintf(Out, " -> ");
	PrintIP4(Out, UDP->IPDst);

	fprintf(Out, " | %6i -> %6i ", UDP->PortSrc, UDP->PortDst);

	fprintf(Out, " | ");
	fprintf(Out, " %'16lld Pkts ", F->PktCnt);
	fprintf(Out, " %'16lli Bytes ", F->Bytes);

	fprintf(Out, " | ");
	fprintf(Out, " %s -> %s", FormatTS(F->TSFirst), FormatTS(F->TSLast) ); 
	fprintf(Out, " : %s", FormatTS(F->TSLast - F->TSFirst));

	fprintf(Out, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %eax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x41a8(%rip), %rsi      # 0x9af0
movl %ecx, %edx
movl %eax, %ecx
xorl %eax, %eax
callq 0x1170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a98
leaq 0x410c(%rip), %rbp      # 0x9a71
pushq $0x4
popq %r12
pushq $0x1
popq %r15
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1250
leaq 0x6(%r14), %rsi
movq %rbx, %rdi
callq 0x5a98
leaq 0x40e5(%rip), %r13      # 0x9a76
pushq $0x3
popq %rsi
movq %r13, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1250
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x5aca
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1250
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x5aca
movzwl 0x14(%r14), %edx
movzwl 0x16(%r14), %ecx
leaq 0x409e(%rip), %rsi      # 0x9a7a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %r13, %rdi
pushq $0x3
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1250
movq 0x48(%r14), %rdx
leaq 0x4087(%rip), %rsi      # 0x9a89
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq 0x50(%r14), %rdx
leaq 0x4081(%rip), %rsi      # 0x9a98
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1170
movq %r13, %rdi
pushq $0x3
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1250
movq 0x58(%r14), %rdi
callq 0x5683
movq %rax, %r15
movq 0x60(%r14), %rdi
callq 0x5683
leaq 0x405a(%rip), %rsi      # 0x9aa8
movq %rbx, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1170
movq 0x60(%r14), %rdi
subq 0x58(%r14), %rdi
callq 0x5683
leaq 0x4040(%rip), %rsi      # 0x9ab2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1170
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/main.c
// Function: PrintMAC
static void PrintMAC(FILE* Out, u8* MAC)
{
	fprintf(Out, "%02x:%02x:%02x:%02x:%02x:%02x",
			MAC[0],
			MAC[1],
			MAC[2],
			MAC[3],
			MAC[4],
			MAC[5]
		  );
}

// Assembly:
pushq %rax
movzbl (%rsi), %edx
movzbl 0x1(%rsi), %ecx
movzbl 0x2(%rsi), %r8d
movzbl 0x3(%rsi), %r9d
movzbl 0x4(%rsi), %r10d
movzbl 0x5(%rsi), %r11d
leaq 0x4007(%rip), %rsi      # 0x9ac2
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1170
popq %rcx
popq %rdx
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/fProfile.c
// Function: fProfile_Reset
void fProfile_Reset(void)
{
	for (int i=0; i < 16; i++)
	{
		g_ProfileStart	[i] = 0;
		g_ProfileStop	[i] = 0;
		g_ProfileTotal	[i] = 0;
	}
}

// Assembly:
xorl %eax, %eax
leaq 0x706f(%rip), %rcx      # 0xddb0
leaq 0x7168(%rip), %rdx      # 0xdeb0
leaq 0x7261(%rip), %rsi      # 0xdfb0
cmpq $0x80, %rax
je 0x6d6c
andq $0x0, (%rax,%rcx)
andq $0x0, (%rax,%rdx)
andq $0x0, (%rax,%rsi)
addq $0x8, %rax
jmp 0x6d4f
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/fProfile.c
// Function: fProfile_Dump
void fProfile_Dump(u32 Index)
{
	double oot = 1.0 / g_ProfileTotal[Index];
	for (int i=0; i < 16; i++)
	{
		fprintf(stderr, "    [%2i] %016llx %20lli : (%.4f) : %s\n", 
				i,
				g_ProfileTotal[i],
				g_ProfileTotal[i],
				g_ProfileTotal[i] * oot,
				g_ProfileDesc[i]);
	}
	fProfile_Reset();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %eax
leaq 0x722f(%rip), %r15      # 0xdfb0
movsd (%r15,%rax,8), %xmm0
unpcklps 0x1292(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x129a(%rip), %xmm0     # 0x8030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x195e(%rip), %xmm0     # 0x8708
divsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
movq 0x523b(%rip), %r13      # 0xbff8
leaq 0x72ec(%rip), %rbp      # 0xe0b0
leaq 0x2d64(%rip), %rbx      # 0x9b2f
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x6e1f
movq (%r13), %rdi
movq (%r12,%r15), %rcx
movq %rcx, %xmm1
punpckldq 0x1237(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x123f(%rip), %xmm1     # 0x8030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
movq (%r12,%rbp), %r9
movq %rbx, %rsi
movl %r14d, %edx
movq %rcx, %r8
movb $0x1, %al
callq 0x1170
incq %r14
addq $0x8, %r12
jmp 0x6dce
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6d38
nop
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/fFile.c
// Function: fFile_Open
struct fFile_t* fFile_Open(u8* Path, u8* Mode)
{
	fFile_t* F = (fFile_t*)malloc( sizeof(fFile_t) );
	memset(F, 0, sizeof(fFile_t));

	strncpy(F->Path, Path, sizeof(F->Path));

	// initial output buffer 
	F->IsBuffer		= true;
	F->BufferMax	= s_FileSizeMin;
	F->BufferPos	= 0;
	F->Buffer		= malloc( F->BufferMax );		
	memset(F->Buffer, 0, F->BufferMax );

	F->TotalByte	= 0;

	// if file existed before get total length
	struct stat fstat;	
	if (stat(F->Path, &fstat) >= 0) 
	{
		F->TotalByte = fstat.st_size;
	}

	// new file allocated 
	s_TotalFile++;

	return F;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %r14
pushq $0x1
popq %r15
movl $0x438, %esi            # imm = 0x438
movq %r15, %rdi
callq 0x1140
movq %rax, %rbx
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
movl $0x1, 0x408(%rbx)
movq 0x52f0(%rip), %rsi      # 0xc168
movq %rsi, 0x420(%rbx)
movq %r15, %rdi
callq 0x1140
movq %rax, 0x410(%rbx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1180
testl %eax, %eax
js 0x6ea9
movq 0x30(%rsp), %rax
movq %rax, 0x428(%rbx)
incq 0x7300(%rip)            # 0xe1b0
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/fFile.c
// Function: fFile_Write
void fFile_Write(struct fFile_t* F, void* Buffer, u32 Length, bool IsPayload)
{
	// should never write with a null file handle
	assert(F != NULL);

	// need to create a file 
	if (F->IsBuffer)
	{
		if (F->BufferPos + Length > F->BufferMax)
		{
			F->File = fopen(F->Path, "a");
			assert(F->File != NULL);

			fwrite(F->Buffer, 1, F->BufferPos, F->File);
			F->TotalByte	+= F->BufferPos;

			F->IsBuffer 	= false;
			F->BufferPos	= 0;

			s_TotalFileActive++;
		}
	}

	// buffer it
	if (F->IsBuffer)
	{
		memcpy(F->Buffer + F->BufferPos, Buffer, Length);
		F->BufferPos += Length;
	}
	else
	{
		assert(F->File != NULL);

		fwrite(Buffer, 1, Length, F->File);
		if (s_ForceFlush) fflush(F->File);
		F->TotalByte	+= Length; 
	}

	// if this is payload
	if (IsPayload) F->TotalPayload += Length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x6fc2
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x408(%rdi)
movl %edx, %r14d
je 0x6f59
movq 0x418(%rbx), %rdi
leaq (%rdi,%r14), %rax
cmpq 0x420(%rbx), %rax
jbe 0x6f91
leaq 0x2c91(%rip), %rsi      # 0x9b95
movq %rbx, %rdi
callq 0x1210
movq %rax, 0x400(%rbx)
testq %rax, %rax
je 0x6ff4
movq 0x410(%rbx), %rdi
movq 0x418(%rbx), %rdx
pushq $0x1
popq %rsi
movq %rax, %rcx
callq 0x1250
movq 0x418(%rbx), %rax
addq %rax, 0x428(%rbx)
andl $0x0, 0x408(%rbx)
andq $0x0, 0x418(%rbx)
incq 0x725f(%rip)            # 0xe1b8
movq 0x400(%rbx), %rcx
testq %rcx, %rcx
je 0x6fdb
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x1250
cmpb $0x1, 0x7246(%rip)      # 0xe1c0
jne 0x6f88
movq 0x400(%rbx), %rdi
callq 0x11c0
leaq 0x428(%rbx), %r12
jmp 0x6faa
leaq 0x418(%rbx), %r12
addq 0x410(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1190
addq %r14, (%r12)
testl %ebp, %ebp
je 0x6fb9
addq %r14, 0x430(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2871(%rip), %rdi      # 0x983a
leaq 0x2b87(%rip), %rsi      # 0x9b57
leaq 0x2b88(%rip), %rcx      # 0x9b5f
pushq $0x5d
jmp 0x700b
leaq 0x2bb5(%rip), %rdi      # 0x9b97
leaq 0x2b6e(%rip), %rsi      # 0x9b57
leaq 0x2b6f(%rip), %rcx      # 0x9b5f
pushq $0x79
jmp 0x700b
leaq 0x2b9c(%rip), %rdi      # 0x9b97
leaq 0x2b55(%rip), %rsi      # 0x9b57
leaq 0x2b56(%rip), %rcx      # 0x9b5f
pushq $0x65
popq %rdx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O2/fmadio[P]pcap_flow/fFile.c
// Function: fFile_Close
void fFile_Close(struct fFile_t* F)
{
	if (!F) return;

	// flush buffer contents if not written to disk
	if (F->IsBuffer && (F->BufferPos > 0))
	{
		// if theres real substational data the flush it
		if (F->TotalPayload > s_FileSizeMin)
		{
			F->File = fopen(F->Path, "a");
			assert(F->File != NULL);

			fwrite(F->Buffer, 1, F->BufferPos, F->File);
			F->BufferPos = 0;
		}
	}

	// close
	if (F->File)
	{
		fclose(F->File);
		s_TotalFileActive--;
	}

	if (F->Buffer)
	{
		free(F->Buffer);
		F->Buffer = NULL;
	}
	memset(F, 0, sizeof(fFile_t));
	free(F);

	s_TotalFileClose++;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x70b0
movq %rdi, %rbx
cmpl $0x0, 0x408(%rdi)
je 0x707d
cmpq $0x0, 0x418(%rbx)
je 0x707d
movq 0x430(%rbx), %rax
cmpq 0x5129(%rip), %rax      # 0xc168
jbe 0x707d
leaq 0x2b4d(%rip), %rsi      # 0x9b95
movq %rbx, %rdi
callq 0x1210
movq %rax, 0x400(%rbx)
testq %rax, %rax
je 0x70b2
movq 0x410(%rbx), %rdi
movq 0x418(%rbx), %rdx
pushq $0x1
popq %rsi
movq %rax, %rcx
callq 0x1250
andq $0x0, 0x418(%rbx)
movq 0x400(%rbx), %rdi
testq %rdi, %rdi
je 0x7095
callq 0x10d0
decq 0x7123(%rip)            # 0xe1b8
movq 0x410(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
incq 0x7118(%rip)            # 0xe1c8
popq %rbx
retq
leaq 0x2ade(%rip), %rdi      # 0x9b97
leaq 0x2a97(%rip), %rsi      # 0x9b57
leaq 0x2ae0(%rip), %rcx      # 0x9ba7
movl $0x91, %edx
callq 0x1110
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: main
int main(int argc, char *argv[])
{
  if (!parse_arg_list(argc, argv))
  {
    puts("Error: invalid arguments.");
    return EXIT_FAILURE;
  }

  int n;
  struct list_node *list_root = NULL;
  char word[MAX_WORD_LEN];

  while (get_word(word, MAX_WORD_LEN) != EOF)
  {
    if ((n = bin_search(word, data_types, NR_OF_TYPES)) >= 0)
    {
      do
      {
        // NOTE: This approach takes into consideration both variable and function names.
        if (get_word(word, MAX_WORD_LEN) != EOF && (isalpha(word[0]) || word[0] == '_'))
        {
          list_root = add_to_list(list_root, word);
        }
      } while (get_word(word, MAX_WORD_LEN) == ',');
    }
  }

  print_list(list_root);

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
callq 0x129d
testl %eax, %eax
je 0x1281
xorl %ebx, %ebx
movq %rsp, %r14
pushq $0x64
popq %rbp
leaq 0x2e7c(%rip), %r15      # 0x4080
pushq $0x7
popq %r12
movq %r14, %rdi
movl %ebp, %esi
callq 0x12e0
cmpl $-0x1, %eax
je 0x1275
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x13ab
testl %eax, %eax
js 0x1208
movq %r14, %rdi
movl %ebp, %esi
callq 0x12e0
cmpl $-0x1, %eax
je 0x1264
callq 0x10d0
movsbq (%rsp), %rcx
cmpq $0x5f, %rcx
je 0x1256
movq (%rax), %rax
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
je 0x1264
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1407
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0x12e0
cmpl $0x2c, %eax
je 0x1229
jmp 0x1208
movq %rbx, %rdi
callq 0x1466
xorl %eax, %eax
jmp 0x1290
leaq 0xda2(%rip), %rdi       # 0x202a
callq 0x1060
pushq $0x1
popq %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: parse_arg_list
int parse_arg_list(int argc, char *argv[])
{
  if (argc > 2)
  {
    return 0;
  }

  if (argc == 2)
  {
    if (!isdigit(argv[1][0]))
    {
      return 0;
    }

    var_name_str_cmp_len = atoi(argv[1]);

    if (var_name_str_cmp_len < 0)
    {
      return 0;
    }
  }

  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x2, %edi
jg 0x12d6
jne 0x12d3
movq %rsi, %r14
callq 0x10d0
movq (%rax), %rax
movq 0x8(%r14), %rdi
movsbq (%rdi), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x12d6
callq 0x10b0
movl %eax, 0x2de9(%rip)      # 0x40b8
testl %eax, %eax
js 0x12d6
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: get_word
int get_word(char *word, int max_word_len)
{
  skip_blanks();
  skip_comments();
  skip_char_literal();
  skip_string_literal();

  int c = getc(stdin);
  size_t i = 0;

  if (c != EOF)
  {
    word[i++] = c;
  }

  if (!isalpha(c) && c != '_')
  {
    word[i] = '\0';
    return c;
  }

  while ((isalnum(c = getc(stdin)) || c == '_') && i < max_word_len)
  {
    word[i++] = c;
  }
  ungetc(c, stdin);
  word[i] = '\0';

  return word[0];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
callq 0x14b5
callq 0x14ed
callq 0x15c7
callq 0x15d1
movq 0x2cd3(%rip), %r12      # 0x3fe0
movq (%r12), %rdi
callq 0x10c0
movl %eax, %r15d
cmpl $-0x1, %eax
je 0x1327
movb %r15b, (%rbx)
pushq $0x1
popq %r13
jmp 0x132a
xorl %r13d, %r13d
callq 0x10d0
movq %rax, %r14
movq (%rax), %rbp
cmpl $0x5f, %r15d
je 0x1351
movslq %r15d, %rax
movzwl (%rbp,%rax,2), %eax
andl $0x400, %eax            # imm = 0x400
jne 0x1351
movb $0x0, (%rbx,%r13)
jmp 0x1399
movslq 0x4(%rsp), %r15
movq (%r12), %rdi
callq 0x10c0
movslq %eax, %rcx
testb $0x8, (%rbp,%rcx,2)
sete %dl
cmpl $0x5f, %ecx
setne %cl
testb %dl, %cl
jne 0x1385
cmpq %r15, %r13
jae 0x1385
movb %al, (%rbx,%r13)
incq %r13
movq (%r14), %rbp
jmp 0x1356
movq (%r12), %rsi
movl %eax, %edi
callq 0x10a0
movb $0x0, (%rbx,%r13)
movsbl (%rbx), %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: bin_search
int bin_search(char *word, char *arr[], int arr_len)
{
  int low = 0;
  int high = arr_len - 1;
  int mid;

  while (low <= high)
  {
    mid = (low + high) / 2;

    int cond = strcmp(word, arr[mid]);
    if (cond < 0)
    {
      high = mid - 1;
    }
    else if (cond > 0)
    {
      low = mid + 1;
    }
    else
    {
      return mid;
    }
  }

  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
xorl %ebx, %ebx
leal -0x1(%r15), %ebp
cmpl %r15d, %ebx
jge 0x13f0
leal (%rbx,%rbp), %r13d
shrl %r13d
movq (%r14,%r13,8), %rsi
movq %r12, %rdi
callq 0x1080
testl %eax, %eax
js 0x13eb
je 0x13f5
incl %r13d
movl %r13d, %ebx
jmp 0x13c5
movl %r13d, %r15d
jmp 0x13c1
pushq $-0x1
popq %rax
jmp 0x13f8
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: add_to_list
struct list_node *add_to_list(struct list_node *list_node_p, char *word)
{
  if (list_node_p == NULL)
  {
    list_node_p = (struct list_node *)malloc(sizeof(struct list_node));
    list_node_p->var_group = add_to_tree(list_node_p->var_group, word);
  }
  else if (strncmp(list_node_p->var_group->word, word, var_name_str_cmp_len) == 0)
  {
    list_node_p->var_group = add_to_tree(list_node_p->var_group, word);
  }
  else
  {
    list_node_p->next = add_to_list(list_node_p->next, word);
  }

  return list_node_p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x1442
movq %rdi, %rbx
movq (%rdi), %r15
movq (%r15), %rdi
movslq 0x2c94(%rip), %rdx      # 0x40b8
movq %r14, %rsi
callq 0x1040
testl %eax, %eax
je 0x144f
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x1407
movq %rax, 0x8(%rbx)
jmp 0x145d
pushq $0x10
popq %rdi
callq 0x1090
movq %rax, %rbx
jmp 0x1452
movq %r15, %rdi
movq %r14, %rsi
callq 0x15db
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: print_list
void print_list(struct list_node *node_p)
{
  if (node_p != NULL)
  {
    print_tree(node_p->var_group);
    putchar('\n');
    print_list(node_p->next);
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0xa
popq %rbp
testq %rbx, %rbx
je 0x1489
movq (%rbx), %rdi
callq 0x1647
movl %ebp, %edi
callq 0x1030
movq 0x8(%rbx), %rbx
jmp 0x146f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: skip_chars_between
void skip_chars_between(char start, char end)
{
  int c = getc(stdin);
  if (c == start)
  {
    while ((c = getc(stdin)) != EOF)
    {
      if (c == '\\')
      {
        if ((c = getc(stdin)) == EOF)
        {
          break;
        }
      }
      else if (c == end)
      {
        return;
      }
    }
  }
  ungetc(c, stdin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movq 0x2a75(%rip), %r15      # 0x3fe0
movq (%r15), %rdi
callq 0x10c0
cmpl %r14d, %eax
jne 0x15a6
movsbl %bpl, %ebp
pushq $-0x1
popq %rbx
movq (%r15), %rdi
callq 0x10c0
cmpl $0x5c, %eax
je 0x1597
cmpl $-0x1, %eax
je 0x15a6
cmpl %ebp, %eax
jne 0x157f
jmp 0x15bc
movq (%r15), %rdi
callq 0x10c0
cmpl $-0x1, %eax
jne 0x157f
jmp 0x15a8
movl %eax, %ebx
movq (%r15), %rsi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10a0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_02/var_group.c
// Function: print_tree
void print_tree(struct tree_node *node_p)
{
  if (node_p != NULL)
  {
    print_tree(node_p->left);
    puts(node_p->word);
    print_tree(node_p->right);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x1667
movq 0x8(%rbx), %rdi
callq 0x1647
movq (%rbx), %rdi
callq 0x1060
movq 0x10(%rbx), %rbx
jmp 0x164b
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/panux[P]linit/src/linitd.c
// Function: setNotify
bool setNotify(struct service* s, struct conn *c) {
    struct conn **onot = s->notify;
    size_t onot_n = s->notify_n;
    size_t nnot_n = onot_n + 1;
    struct conn **nnot = arralloc(struct conn*, nnot_n);
    if(nnot == NULL) {
        return false;
    }
    memcpy(nnot, onot, sizeof(struct notify*) * onot_n);
    nnot[onot_n] = c;
    ref(c);
    free(onot);
    s->notify = nnot;
    s->notify_n++;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %r13
leaq 0x8(,%r13,8), %rdi
callq 0x134c
movq %rax, %r12
testq %rax, %rax
je 0x13cc
leaq (,%r13,8), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1140
movq %r15, (%r12,%r13,8)
incl 0x10(%r15)
movq %r14, %rdi
callq 0x1030
movq %r12, 0x10(%rbx)
incq 0x18(%rbx)
testq %r12, %r12
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/panux[P]linit/src/linitd.c
// Function: notify
enum{ notify_fail, notify_success, notify_gone } notify(struct conn *c, struct service* s, struct buf msg) {
    if(c->closed == true) {
        deref(c);   //get rid of reference so the conn can be freed
        return notify_gone;
    }
    byte* ndat = realloc(c->tx.dat, c->tx.len + msg.len);
    if(ndat == NULL) {
        return notify_fail;
    }
    memcpy(ndat + c->tx.len, msg.dat, msg.len);
    c->tx.dat = ndat;
    c->tx.len += msg.len;
    if(c->txoff && (c->tx.len > 0)) {  //tx buffer was just populated
        //enable write in epoll
        struct epoll_event ev = {.events = EPOLLIN | EPOLLOUT, .data = {.ptr = &c->e}};
        if(epoll_ctl(epollfd, EPOLL_CTL_MOD, c->fd, &ev) == -1) {   //failed to enable - close and forget
            fprintf(stderr, "[ERROR] Failed to enable writing on conn %d\n", c->fd);
            close_conn(c);
        } else {
            c->txoff = false;
        }
    }
    return notify_success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x140a
pushq $0x2
popq %rbp
subl $0x1, 0x10(%rbx)
jae 0x1482
movq %rbx, %rdi
callq 0x1030
jmp 0x1482
movq %rcx, %r14
movq %rdx, %r15
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
addq %rcx, %rsi
callq 0x1160
testq %rax, %rax
je 0x1480
movq %rax, %r12
movq 0x38(%rbx), %r13
movq %rax, %rdi
addq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1140
movq %r12, 0x30(%rbx)
addq %r14, %r13
movq %r13, 0x38(%rbx)
setne %al
andb 0x19(%rbx), %al
pushq $0x1
popq %rbp
cmpb $0x1, %al
jne 0x1482
leaq 0xc(%rsp), %rcx
movl $0x5, (%rcx)
movq %rbx, 0x4(%rcx)
movl 0x4cde(%rip), %edi      # 0x6148
movl 0x14(%rbx), %edx
pushq $0x3
popq %rsi
callq 0x10e0
cmpl $-0x1, %eax
je 0x1493
movb $0x0, 0x19(%rbx)
jmp 0x1482
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4b5e(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movl 0x14(%rbx), %edx
leaq 0x1b83(%rip), %rsi      # 0x302a
xorl %eax, %eax
callq 0x1130
movq %rbx, %rdi
callq 0x14b8
jmp 0x1482
// File: /workspace/github_c_makefile_star2_O2/panux[P]linit/src/linitd.c
// Function: close_conn
void close_conn(struct conn *c) {   //close a connection
    printf("[INFO] Disconnecting connection %d\n", c->fd);
    if(epoll_ctl(epollfd, EPOLL_CTL_DEL, c->fd, NULL) == -1) {  //not compat before Linux 2.6.9
        fprintf(stderr, "[FATAL] Failed to deregister conn with epoll\n");
        exit(65);
    }
    if(close(c->fd) == -1) {
        fprintf(stderr, "[FATAL] Failed to close fd %d: %s\n", c->fd, strerror(errno));
        exit(65);
    }
    c->closed = true;
    c->fd = -1;
    //wipe rx/tx buffers
    free(c->rx.dat);
    free(c->tx.dat);
    bzero(&c->rx, sizeof(c->rx));
    bzero(&c->tx, sizeof(c->tx));
    deref(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %esi
leaq 0x1db7(%rip), %rdi      # 0x3280
xorl %eax, %eax
callq 0x10c0
movl 0x4c72(%rip), %edi      # 0x6148
movl 0x14(%rbx), %edx
pushq $0x2
popq %rsi
xorl %ecx, %ecx
callq 0x10e0
cmpl $-0x1, %eax
je 0x1537
movl 0x14(%rbx), %edi
callq 0x10d0
cmpl $-0x1, %eax
je 0x1555
movb $0x1, 0x18(%rbx)
orl $-0x1, 0x14(%rbx)
movq 0x20(%rbx), %rdi
callq 0x1030
movq 0x30(%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
subl $0x1, 0x10(%rbx)
jae 0x152f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x4aba(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1d5c(%rip), %rdi      # 0x32a4
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x1200
jmp 0x1584
movq 0x4a9c(%rip), %rax      # 0x5ff8
movq (%rax), %r14
movl 0x14(%rbx), %ebx
callq 0x1040
movl (%rax), %edi
callq 0x1220
leaq 0x1d5d(%rip), %rsi      # 0x32d2
movq %r14, %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1130
pushq $0x41
popq %rdi
callq 0x11f0