LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: getopt
int getopt(int argc,char *argv[],char *optstring)
{
char *ptr;

/* check for end of arg list */
if(optind==argc || *(argv[optind])!='-' || strlen(argv[optind])<=1)
  return(-1);

if((ptr=strchr(optstring,argv[optind][optpos]))==NULL)
  return('?');		/* error: unknown option */
else
  {
  optopt=*ptr;
  if(ptr[1]==':')
    {
    if(optind==argc-1) return(':');	/* error: missing option */
    optarg=argv[optind+1];
    optpos=1;
    optind+=2;
    return(optopt);	/* return early, avoiding the normal increment */
    }
  }

/* now increment position ready for next time.
 * no checking is done for the end of args yet - this is done on
 * the next call.
 */
optpos++;
if(optpos>=strlen(argv[optind]))
  {
  optpos=1;
  optind++;
  }

return(optopt);		/* return the found option */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl 0x53ff(%rip), %eax      # 0x86d8
cmpl -0x8(%rbp), %eax
je 0x330f
movq -0x10(%rbp), %rax
movslq 0x53ef(%rip), %rcx      # 0x86d8
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x330f
movq -0x10(%rbp), %rax
movslq 0x53d8(%rip), %rcx      # 0x86d8
movq (%rax,%rcx,8), %rdi
callq 0x3070
cmpq $0x1, %rax
ja 0x331b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3427
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x53ae(%rip), %rcx      # 0x86d8
movq (%rax,%rcx,8), %rax
movslq 0x53a7(%rip), %rcx      # 0x86dc
movsbl (%rax,%rcx), %esi
callq 0x3060
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x3354
movl $0x3f, -0x4(%rbp)
jmp 0x3427
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, 0x5437(%rip)      # 0x8798
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3a, %eax
jne 0x33c9
movl 0x5364(%rip), %eax      # 0x86d8
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x338a
movl $0x3a, -0x4(%rbp)
jmp 0x3427
movq -0x10(%rbp), %rax
movl 0x5344(%rip), %ecx      # 0x86d8
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x53fb(%rip)      # 0x87a0
movl $0x1, 0x532d(%rip)      # 0x86dc
movl 0x5323(%rip), %eax      # 0x86d8
addl $0x2, %eax
movl %eax, 0x531a(%rip)      # 0x86d8
movl 0x53d4(%rip), %eax      # 0x8798
movl %eax, -0x4(%rbp)
jmp 0x3427
jmp 0x33cb
movl 0x530b(%rip), %eax      # 0x86dc
addl $0x1, %eax
movl %eax, 0x5302(%rip)      # 0x86dc
movslq 0x52fb(%rip), %rax      # 0x86dc
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq 0x52e8(%rip), %rcx      # 0x86d8
movq (%rax,%rcx,8), %rdi
callq 0x3070
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jb 0x341e
movl $0x1, 0x52cd(%rip)      # 0x86dc
movl 0x52c3(%rip), %eax      # 0x86d8
addl $0x1, %eax
movl %eax, 0x52ba(%rip)      # 0x86d8
movl 0x5374(%rip), %eax      # 0x8798
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: grok_hex
unsigned long grok_hex(unsigned char **ptrp,int textlinenum)
{
static char *hexits="0123456789abcdefABCDEF",*lookup;
unsigned char *ptr=*ptrp;
unsigned long v=0,n;

/* we know the number starts with "0x" and we're pointing to it */

ptr+=2;
if(strchr(hexits,*ptr)==NULL)
  {
  fprintf(stderr,"line %d: bad BIN 0x... number\n",textlinenum);
  exit(1);
  }

while(*ptr && (lookup=strchr(hexits,*ptr))!=NULL)
  {
  n=lookup-hexits;
  if(n>15) n-=6;
  v=v*16+n;
  ptr++;
  }

*ptrp=ptr;
return(v);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq 0x507b(%rip), %rdi      # 0x86e0
movq -0x18(%rbp), %rax
movzbl (%rax), %esi
callq 0x3060
cmpq $0x0, %rax
jne 0x369c
movq 0x4962(%rip), %rax      # 0x7fe0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x2d0e(%rip), %rsi      # 0x6399
movb $0x0, %al
callq 0x3160
movl $0x1, %edi
callq 0x3120
jmp 0x369e
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x36d3
movq 0x502a(%rip), %rdi      # 0x86e0
movq -0x18(%rbp), %rax
movzbl (%rax), %esi
callq 0x3060
movq %rax, 0x50df(%rip)      # 0x87a8
cmpq $0x0, %rax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x36dc
jmp 0x3725
movq 0x50c5(%rip), %rax      # 0x87a8
movq 0x4ff6(%rip), %rcx      # 0x86e0
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0xf, -0x28(%rbp)
jbe 0x3704
movq -0x28(%rbp), %rax
subq $0x6, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
shlq $0x4, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x369e
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: grok_binary
unsigned long grok_binary(unsigned char **ptrp,int textlinenum)
{
unsigned long v=0;
unsigned char *ptr=*ptrp;

while(isspace(*ptr)) ptr++;

if(*ptr!='0' && *ptr!='1')
  {
  fprintf(stderr,"line %d: bad BIN number\n",textlinenum);
  exit(1);
  }

if(ptr[1]=='x' || ptr[1]=='X')
  {
  *ptrp=ptr;
  return(grok_hex(ptrp,textlinenum));
  }

while(*ptr=='0' || *ptr=='1')
  {
  v*=2;
  v+=*ptr-'0';
  ptr++;
  }

*ptrp=ptr;
return(v);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
callq 0x30f0
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3790
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3762
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x30, %eax
je 0x37cd
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x31, %eax
je 0x37cd
movq 0x4831(%rip), %rax      # 0x7fe0
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0x2bfc(%rip), %rsi      # 0x63b8
movb $0x0, %al
callq 0x3160
movl $0x1, %edi
callq 0x3120
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0x37e7
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0x3804
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3630
movq %rax, -0x8(%rbp)
jmp 0x3870
jmp 0x3806
movq -0x28(%rbp), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x30, %ecx
movb %al, -0x29(%rbp)
je 0x3827
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x31, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x3830
jmp 0x385d
movq -0x20(%rbp), %rax
shlq %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
subl $0x30, %eax
cltq
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3806
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: usage_help
void usage_help()
{
printf("zmakebas - public domain by Russell Marks.\n\n");

printf("usage: zmakebas [-hlr] [-a line] [-i incr] [-n speccy_filename]\n");
printf("                [-o output_file] [-s line] [input_file]\n\n");

printf("        -a      set auto-start line of basic file (default none).\n");
printf("        -h      give this usage help.\n");
printf("        -i      in labels mode, set line number incr. (default 2).\n");
printf("        -l      use labels rather than line numbers.\n");
printf("        -n      set Spectrum filename (to be given in tape header).");
printf("\n        -o      specify output file (default `%s').\n",
						DEFAULT_OUTPUT);
printf("        -r      output raw headerless file (default is .tap file).\n");
printf("        -s      in labels mode, set starting line number ");
printf("(default 10).\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b46(%rip), %rdi      # 0x63d1
movb $0x0, %al
callq 0x3030
leaq 0x2b65(%rip), %rdi      # 0x63fe
movb $0x0, %al
callq 0x3030
leaq 0x2b98(%rip), %rdi      # 0x643f
movb $0x0, %al
callq 0x3030
leaq 0x2bc4(%rip), %rdi      # 0x6479
movb $0x0, %al
callq 0x3030
leaq 0x2bf9(%rip), %rdi      # 0x64bc
movb $0x0, %al
callq 0x3030
leaq 0x2c12(%rip), %rdi      # 0x64e3
movb $0x0, %al
callq 0x3030
leaq 0x2c48(%rip), %rdi      # 0x6527
movb $0x0, %al
callq 0x3030
leaq 0x2c70(%rip), %rdi      # 0x655d
movb $0x0, %al
callq 0x3030
leaq 0x2ca6(%rip), %rdi      # 0x65a1
leaq 0x2cd5(%rip), %rsi      # 0x65d7
movb $0x0, %al
callq 0x3030
leaq 0x2ccf(%rip), %rdi      # 0x65df
movb $0x0, %al
callq 0x3030
leaq 0x2d05(%rip), %rdi      # 0x6623
movb $0x0, %al
callq 0x3030
leaq 0x2d31(%rip), %rdi      # 0x665d
movb $0x0, %al
callq 0x3030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: grok_block
int grok_block(unsigned char *ptr,int textlinenum)
{
static char *lookup[]=
  {
  "  ", " '", "' ", "''", " .", " :", "'.", "':",
  ". ", ".'", ": ", ":'", "..", ".:", ":.", "::",
  NULL
  };
char **lptr;
int f=128,v=-1;
            
for(lptr=lookup;*lptr!=NULL;lptr++,f++)
  {
  if(strncmp(ptr+1,*lptr,2)==0)
    {
    v=f;
    break;
    }
  }

if(v==-1)
  {
  fprintf(stderr,"line %d: invalid block graphics escape\n",textlinenum);
  exit(1);
  }

return(v);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x80, -0x1c(%rbp)
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
leaq 0x49cc(%rip), %rax      # 0x86f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3d71
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl $0x2, %edx
callq 0x3090
cmpl $0x0, %eax
jne 0x3d58
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x3d71
jmp 0x3d5a
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3d28
cmpl $-0x1, -0x20(%rbp)
jne 0x3d9c
movq 0x4262(%rip), %rax      # 0x7fe0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x2abb(%rip), %rsi      # 0x6846
movb $0x0, %al
callq 0x3160
movl $0x1, %edi
callq 0x3120
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/batman.c
// Function: is_batman_if
int is_batman_if(char *dev, struct batman_if **batman_if)
{
	struct list_head *if_pos;


	list_for_each( if_pos, &if_list ) {

		(*batman_if) = list_entry( if_pos, struct batman_if, list );

		if ( strcmp( (*batman_if)->dev, dev ) == 0 )
			return 1;

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x187a9(%rip), %rax     # 0x1b3b0
movq %rax, -0x20(%rbp)
leaq 0x1879e(%rip), %rax     # 0x1b3b0
cmpq %rax, -0x20(%rbp)
je 0x2c54
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2280
cmpl $0x0, %eax
jne 0x2c45
movl $0x1, -0x4(%rbp)
jmp 0x2c5b
jmp 0x2c47
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2c0b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/batman.c
// Function: get_gw_speeds
void get_gw_speeds(unsigned char gw_class, int *down, int *up)
{
	char sbit = (gw_class & 0x80) >> 7;
	char dpart = (gw_class & 0x78) >> 3;
	char upart = (gw_class & 0x07);

	*down = 32 * (sbit + 2) * (1 << dpart);
	*up = ((upart + 1) * (*down)) / 8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x80, %eax
sarl $0x7, %eax
movb %al, -0x19(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x78, %eax
sarl $0x3, %eax
movb %al, -0x1a(%rbp)
movzbl -0x1(%rbp), %eax
andl $0x7, %eax
movb %al, -0x1b(%rbp)
movsbl -0x19(%rbp), %eax
addl $0x2, %eax
shll $0x5, %eax
movl %eax, -0x20(%rbp)
movsbl -0x1a(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x20(%rbp), %ecx
imull %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movsbl -0x1b(%rbp), %eax
addl $0x1, %eax
movq -0x10(%rbp), %rcx
imull (%rcx), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/batman.c
// Function: get_gw_class
unsigned char get_gw_class(int down, int up)
{
	int mdown = 0, tdown, tup, difference = 0x0FFFFFFF;
	unsigned char gw_class = 0, sbit, part;


	/* test all downspeeds */
	for (sbit = 0; sbit < 2; sbit++) {

		for (part = 0; part < 16; part++) {

			tdown = 32 * (sbit + 2) * (1 << part);

			if ( abs(tdown - down) < difference) {

				gw_class = (sbit << 7) + (part << 3);
				difference = abs(tdown - down);
				mdown = tdown;

			}

		}

	}

	/* test all upspeeds */
	difference = 0x0FFFFFFF;

	for (part = 0; part < 8; part++) {

		tup = ((part + 1) * (mdown)) / 8;

		if (abs(tup - up) < difference) {

			gw_class = (gw_class & 0xF8) | part;
			difference = abs(tup - up);

		}

	}

	return gw_class;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0xfffffff, -0x18(%rbp) # imm = 0xFFFFFFF
movb $0x0, -0x19(%rbp)
movb $0x0, -0x1a(%rbp)
movzbl -0x1a(%rbp), %eax
cmpl $0x2, %eax
jge 0x370d
movb $0x0, -0x1b(%rbp)
movzbl -0x1b(%rbp), %eax
cmpl $0x10, %eax
jge 0x36fe
movzbl -0x1a(%rbp), %eax
addl $0x2, %eax
shll $0x5, %eax
movzbl -0x1b(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
subl -0x4(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x18(%rbp), %eax
jge 0x36f2
movzbl -0x1a(%rbp), %eax
shll $0x7, %eax
movzbl -0x1b(%rbp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
movb %al, -0x19(%rbp)
movl -0x10(%rbp), %eax
subl -0x4(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x36f4
movb -0x1b(%rbp), %al
addb $0x1, %al
movb %al, -0x1b(%rbp)
jmp 0x3691
jmp 0x3700
movb -0x1a(%rbp), %al
addb $0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x3680
movl $0xfffffff, -0x18(%rbp) # imm = 0xFFFFFFF
movb $0x0, -0x1b(%rbp)
movzbl -0x1b(%rbp), %eax
cmpl $0x8, %eax
jge 0x3777
movzbl -0x1b(%rbp), %eax
addl $0x1, %eax
imull -0xc(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl -0x18(%rbp), %eax
jge 0x376b
movzbl -0x19(%rbp), %eax
andl $0xf8, %eax
movzbl -0x1b(%rbp), %ecx
orl %ecx, %eax
movb %al, -0x19(%rbp)
movl -0x14(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x18(%rbp)
jmp 0x376d
movb -0x1b(%rbp), %al
addb $0x1, %al
movb %al, -0x1b(%rbp)
jmp 0x3718
movb -0x19(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/originator.c
// Function: create_neighbor
struct neigh_node * create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, uint32_t neigh, struct batman_if *if_incoming) {

	struct neigh_node *neigh_node;

	debug_output( 4, "Creating new last-hop neighbour of originator\n" );

	neigh_node = debugMalloc( sizeof(struct neigh_node), 403 );
	memset( neigh_node, 0, sizeof(struct neigh_node) );
	INIT_LIST_HEAD(&neigh_node->list);

	neigh_node->addr = neigh;
	neigh_node->orig_node = orig_neigh_node;
	neigh_node->if_incoming = if_incoming;

	neigh_node->tq_recv = debugMalloc(sizeof(uint16_t) * global_win_size, 406);
	memset(neigh_node->tq_recv, 0, sizeof(uint16_t) * global_win_size);

	neigh_node->real_bits = debugMalloc(sizeof(TYPE_OF_WORD) * num_words, 407);
	memset(neigh_node->real_bits, 0, sizeof(TYPE_OF_WORD) * num_words);

	list_add_tail(&neigh_node->list, &orig_node->neigh_list);

	return neigh_node;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x4, %edi
leaq 0x10577(%rip), %rsi     # 0x14ffa
movb $0x0, %al
callq 0x123f0
movl $0x38, %edi
movl $0x193, %esi            # imm = 0x193
callq 0x7220
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x21e0
movq -0x28(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x30(%rax)
leaq 0x167cd(%rip), %rax     # 0x1b2ae
movzbl (%rax), %eax
shlq %rax
movl %eax, %edi
movl $0x196, %esi            # imm = 0x196
callq 0x7220
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x167a1(%rip), %rax     # 0x1b2ae
movzbl (%rax), %eax
movl %eax, %edx
shlq %rdx
xorl %esi, %esi
callq 0x21e0
leaq 0x1678d(%rip), %rax     # 0x1b2b0
movzbl (%rax), %eax
shlq $0x3, %rax
movl %eax, %edi
movl $0x197, %esi            # imm = 0x197
callq 0x7220
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
leaq 0x16760(%rip), %rax     # 0x1b2b0
movzbl (%rax), %eax
movl %eax, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x21e0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x48, %rsi
callq 0x6e60
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/originator.c
// Function: choose_orig
int choose_orig( void *data, int32_t size ) {

	unsigned char *key= data;
	uint32_t hash = 0;
	size_t i;

	for (i = 0; i < 4; i++) {
		hash += key[i];
		hash += (hash << 10);
		hash ^= (hash >> 6);
	}

	hash += (hash << 3);
	hash ^= (hash >> 11);
	hash += (hash << 15);

	return (hash%size);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x4, -0x28(%rbp)
jae 0x4c11
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0xa, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4bd2
movl -0x1c(%rbp), %eax
shll $0x3, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xb, %eax
xorl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0xf, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
xorl %edx, %edx
divl -0xc(%rbp)
movl %edx, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/list-batman.c
// Function: list_del
void list_del( struct list_head *prev_entry, struct list_head *entry, struct list_head_first *head ) {

	if ( head->prev == entry )
		head->prev = prev_entry;

	__list_del( prev_entry, entry->next );

	entry->next = (void *) 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x6efe
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x6f20
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: getHeaderPad
static size_t getHeaderPad(void) {
	size_t alignwith, pad;

	if (sizeof(TYPE_OF_WORD) > sizeof(void*))
		alignwith = sizeof(TYPE_OF_WORD);
	else
		alignwith = sizeof(void*);

	pad = alignwith - (sizeof(struct chunkHeader) % alignwith);

	if (pad == alignwith)
		return 0;
	else
		return pad;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x8, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x18, %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x10(%rbp)
movq -0x20(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x7150
movq $0x0, -0x8(%rbp)
jmp 0x7158
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: getTrailerPad
static size_t getTrailerPad(size_t length) {
	size_t alignwith, pad;

	if (sizeof(TYPE_OF_WORD) > sizeof(void*))
		alignwith = sizeof(TYPE_OF_WORD);
	else
		alignwith = sizeof(void*);

	pad = alignwith - (length % alignwith);

	if (pad == alignwith)
		return 0;
	else
		return pad;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq $0x8, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq -0x28(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x71a3
movq $0x0, -0x8(%rbp)
jmp 0x71ab
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: checkLeak
void checkLeak(void)
{
	struct chunkHeader *walker;

	pthread_mutex_lock(&chunk_mutex);
	for (walker = chunkList; walker != NULL; walker = walker->next)
		debug_output( 0, "Memory leak detected, malloc tag = %d\n", walker->tag );

	pthread_mutex_unlock(&chunk_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x143a1(%rip), %rdi     # 0x1b570
callq 0x24e0
movq 0x1435d(%rip), %rax     # 0x1b538
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x720a
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
xorl %edi, %edi
leaq 0xe55d(%rip), %rsi      # 0x15753
movb $0x0, %al
callq 0x123f0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x71df
leaq 0x1435f(%rip), %rdi     # 0x1b570
callq 0x2300
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: fillPadding
static void fillPadding(unsigned char* padding, size_t length) {
	unsigned char c = 0x00;
	size_t i;

	for (i = 0; i < length; i++) {
		c += 0xA7;
		padding[i] = c;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x73fa
movzbl -0x11(%rbp), %eax
addl $0xa7, %eax
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x73c8
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: addMemory
static void addMemory( uint32_t length, int32_t tag ) {

	struct memoryUsage *walker;

	pthread_mutex_lock(&memory_mutex);
	for ( walker = memoryList; walker != NULL; walker = walker->next ) {

		if ( walker->tag == tag ) {

			walker->counter++;
			break;

		}

	}

	if ( walker == NULL ) {

		walker = malloc( sizeof(struct memoryUsage) );

		walker->length = length;
		walker->tag = tag;
		walker->counter = 1;

		walker->next = memoryList;
		memoryList = walker;

	}

	pthread_mutex_unlock(&memory_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x14133(%rip), %rdi     # 0x1b548
callq 0x24e0
movq 0x1411f(%rip), %rax     # 0x1b540
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7456
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x7447
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x7456
jmp 0x7449
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7425
cmpq $0x0, -0x10(%rbp)
jne 0x74a3
movl $0x18, %edi
callq 0x2310
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xc(%rax)
movq 0x140af(%rip), %rcx     # 0x1b540
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, 0x1409d(%rip)     # 0x1b540
leaq 0x1409e(%rip), %rdi     # 0x1b548
callq 0x2300
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: checkPadding
static int checkPadding(unsigned char* padding, size_t length) {
	unsigned char c = 0x00;
	size_t i;

	for (i = 0; i < length; i++) {
		c += 0xA7;
		if (padding[i] != c)
			return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x770b
movzbl -0x19(%rbp), %eax
addl $0xa7, %eax
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
je 0x76fb
movl $0x0, -0x4(%rbp)
jmp 0x7712
jmp 0x76fd
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x76c8
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/allocate.c
// Function: removeMemory
static void removeMemory( int32_t tag, int32_t freetag ) {

	struct memoryUsage *walker;

	pthread_mutex_lock(&memory_mutex);
	for ( walker = memoryList; walker != NULL; walker = walker->next ) {

		if ( walker->tag == tag ) {

			if ( walker->counter == 0 ) {

				debug_output( 0, "Freeing more memory than was allocated: malloc tag = %d, free tag = %d\n", tag, freetag );
				pthread_mutex_unlock(&memory_mutex);
				restore_and_exit(0);

			}

			walker->counter--;
			break;

		}

	}

	if ( walker == NULL ) {

		debug_output( 0, "Freeing memory that was never allocated: malloc tag = %d, free tag = %d\n", tag, freetag );
		pthread_mutex_unlock(&memory_mutex);
		restore_and_exit(0);

	}

	pthread_mutex_unlock(&memory_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x13bd3(%rip), %rdi     # 0x1b548
callq 0x24e0
movq 0x13bbf(%rip), %rax     # 0x1b540
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x79e9
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x79da
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x79cb
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
xorl %edi, %edi
leaq 0xe05c(%rip), %rsi      # 0x15a0d
movb $0x0, %al
callq 0x123f0
leaq 0x13b89(%rip), %rdi     # 0x1b548
callq 0x2300
xorl %edi, %edi
callq 0x10180
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x79e9
jmp 0x79dc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7985
cmpq $0x0, -0x10(%rbp)
jne 0x7a19
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
xorl %edi, %edi
leaq 0xe056(%rip), %rsi      # 0x15a55
movb $0x0, %al
callq 0x123f0
leaq 0x13b3b(%rip), %rdi     # 0x1b548
callq 0x2300
xorl %edi, %edi
callq 0x10180
leaq 0x13b28(%rip), %rdi     # 0x1b548
callq 0x2300
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: get_bit_status
uint8_t get_bit_status( TYPE_OF_WORD *seq_bits, uint16_t last_seqno, uint16_t curr_seqno ) {

	int16_t diff, word_offset, word_num;

	diff= last_seqno- curr_seqno;
	if (diff < 0 || diff >= local_win_size) {
		return 0;

	} else {

		word_offset= ( last_seqno - curr_seqno ) % WORD_BIT_SIZE;	/* which position in the selected word */
		word_num   = ( last_seqno - curr_seqno ) / WORD_BIT_SIZE;	/* which word */

		if ( seq_bits[word_num] & (1ULL << word_offset))   /* get position status */
			return 1;
		else
			return 0;

	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
subl %ecx, %eax
movw %ax, -0x16(%rbp)
movswl -0x16(%rbp), %eax
cmpl $0x0, %eax
jl 0x7aaf
movswl -0x16(%rbp), %eax
leaq 0x13807(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x7ab5
movb $0x0, -0x1(%rbp)
jmp 0x7b0e
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
subl %ecx, %eax
cltq
andq $0x3f, %rax
movw %ax, -0x18(%rbp)
movzwl -0x12(%rbp), %eax
movzwl -0x14(%rbp), %ecx
subl %ecx, %eax
cltq
shrq $0x6, %rax
movw %ax, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movswq -0x1a(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movswl -0x18(%rbp), %ecx
movl %ecx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x7b0a
movb $0x1, -0x1(%rbp)
jmp 0x7b0e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: bit_mark
void bit_mark( TYPE_OF_WORD *seq_bits, int32_t n ) {
	int32_t word_offset,word_num;

	if (n<0 || n >= local_win_size) {			/* if too old, just drop it */
/* 		printf("got old packet, dropping\n");*/
		return;
	}

/* 	printf("mark bit %d\n", n); */

	word_offset= n%WORD_BIT_SIZE;	/* which position in the selected word */
	word_num   = n/WORD_BIT_SIZE;	/* which word */

	seq_bits[word_num] |= 1ULL << word_offset;	/* turn the position on */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x7b42
movl -0xc(%rbp), %eax
leaq 0x13774(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x7b44
jmp 0x7b77
movslq -0xc(%rbp), %rax
andq $0x3f, %rax
movl %eax, -0x10(%rbp)
movslq -0xc(%rbp), %rax
shrq $0x6, %rax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: bit_shift
void bit_shift( TYPE_OF_WORD *seq_bits, int32_t n ) {
	int32_t word_offset, word_num;
	int32_t i;

/*	bit_print( seq_bits );*/
	if( n<=0 ) return;

	word_offset= n%WORD_BIT_SIZE;	/* shift how much inside each word */
	word_num   = n/WORD_BIT_SIZE;	/* shift over how much (full) words */

	for ( i=num_words-1; i>word_num; i-- ) {
		/* going from old to new, so we can't overwrite the data we copy from. *
 		 * left is high, right is low: FEDC BA98 7654 3210
		 *	                                  ^^ ^^
		 *                             vvvv
		 * ^^^^ = from, vvvvv =to, we'd have word_num==1 and
		 * word_offset==WORD_BIT_SIZE/2 ????? in this example. (=24 bits)
		 *
		 * our desired output would be: 9876 5432 1000 0000
		 * */

		seq_bits[i]=
			(seq_bits[i - word_num] << word_offset) +
					/* take the lower port from the left half, shift it left to its final position */
			(seq_bits[i - word_num - 1] >>	(WORD_BIT_SIZE-word_offset));
					/* and the upper part of the right half and shift it left to it's position */
		/* for our example that would be: word[0] = 9800 + 0076 = 9876 */
	}
	/* now for our last word, i==word_num, we only have the it's "left" half. that's the 1000 word in
	 * our example.*/

	seq_bits[i]= (seq_bits[i - word_num] << word_offset);

	/* pad the rest with 0, if there is anything */
	i--;

	for (; i>=0; i--) {
		seq_bits[i]= 0;
	}
/*	bit_print( seq_bits ); */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jg 0x7b96
jmp 0x7c69
movslq -0xc(%rbp), %rax
andq $0x3f, %rax
movl %eax, -0x10(%rbp)
movslq -0xc(%rbp), %rax
shrq $0x6, %rax
movl %eax, -0x14(%rbp)
leaq 0x136fd(%rip), %rax     # 0x1b2b0
movzbl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x7c1a
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movl -0x10(%rbp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rsi
movl $0x40, %ecx
subq %rsi, %rcx
shrq %cl, %rax
addq %rax, %rdx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7bbc
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movl -0x10(%rbp), %eax
movl %eax, %ecx
shlq %cl, %rdx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x7c69
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7c48
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: bit_get_packet
char bit_get_packet( TYPE_OF_WORD *seq_bits, int16_t seq_num_diff, int8_t set_mark ) {

	int i;

	/* we already got a sequence number higher than this one, so we just mark it. this should wrap around the integer just fine */
	if ((seq_num_diff < 0) && (seq_num_diff >= -local_win_size)) {

		if ( set_mark )
			bit_mark( seq_bits, -seq_num_diff );

		return 0;

	}

	if ((seq_num_diff > local_win_size) || (seq_num_diff < -local_win_size)) {        /* it seems we missed a lot of packets or the other host restarted */

		if (seq_num_diff > local_win_size)
			debug_output(4, "It seems we missed a lot of packets (%i) !\n",  seq_num_diff-1);

		if (-seq_num_diff > local_win_size)
			debug_output(4, "Other host probably restarted !\n");

		for (i=0; i<num_words; i++)
			seq_bits[i]= 0;

		if ( set_mark )
			seq_bits[0] = 1;  /* we only have the latest packet */

	} else {

		bit_shift(seq_bits, seq_num_diff);

		if ( set_mark )
			bit_mark(seq_bits, 0);

	}

	return 1;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movw %si, %cx
movq %rdi, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movb %al, -0x13(%rbp)
movswl -0x12(%rbp), %eax
cmpl $0x0, %eax
jge 0x7cc7
movswl -0x12(%rbp), %eax
leaq 0x13613(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jl 0x7cc7
cmpb $0x0, -0x13(%rbp)
je 0x7cbe
movq -0x10(%rbp), %rdi
movswl -0x12(%rbp), %eax
xorl %esi, %esi
subl %eax, %esi
callq 0x7b20
movb $0x0, -0x1(%rbp)
jmp 0x7db2
movswl -0x12(%rbp), %eax
leaq 0x135dd(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jg 0x7cf3
movswl -0x12(%rbp), %eax
leaq 0x135cb(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %edx
xorl %ecx, %ecx
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x7d8e
movswl -0x12(%rbp), %eax
leaq 0x135b1(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jle 0x7d1f
movswl -0x12(%rbp), %edx
subl $0x1, %edx
movl $0x4, %edi
leaq 0xdd86(%rip), %rsi      # 0x15a9e
movb $0x0, %al
callq 0x123f0
movswl -0x12(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
leaq 0x13581(%rip), %rcx     # 0x1b2af
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jle 0x7d48
movl $0x4, %edi
leaq 0xdd89(%rip), %rsi      # 0x15aca
movb $0x0, %al
callq 0x123f0
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
leaq 0x13557(%rip), %rcx     # 0x1b2b0
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x7d7b
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7d4f
cmpb $0x0, -0x13(%rbp)
je 0x7d8c
movq -0x10(%rbp), %rax
movq $0x1, (%rax)
jmp 0x7dae
movq -0x10(%rbp), %rdi
movswl -0x12(%rbp), %esi
callq 0x7b80
cmpb $0x0, -0x13(%rbp)
je 0x7dac
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x7b20
jmp 0x7dae
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: bit_packet_count
int bit_packet_count( TYPE_OF_WORD *seq_bits ) {

	int i, hamming = 0;
	TYPE_OF_WORD word;

	for (i=0; i<num_words; i++) {

		word = seq_bits[i];

		while (word) {

			word &= word-1;   /* see https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan */
			hamming++;

		}

	}

	return(hamming);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x134d0(%rip), %rcx     # 0x1b2b0
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x7e26
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7e19
movq -0x18(%rbp), %rax
subq $0x1, %rax
andq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7df7
jmp 0x7e1b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7dd6
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/bitarray.c
// Function: bit_count
uint8_t bit_count( int32_t to_count ) {

	uint8_t hamming = 0;

	while ( to_count ) {

		to_count &= to_count-1;   /* see https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan */
		hamming++;

	}

	return(hamming);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movb $0x0, -0x5(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x7e57
movl -0x4(%rbp), %eax
subl $0x1, %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movb -0x5(%rbp), %al
addb $0x1, %al
movb %al, -0x5(%rbp)
jmp 0x7e3b
movb -0x5(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_init
void hash_init(struct hashtable_t *hash)
{
	int i;

	hash->elements = 0;

	for (i = 0; i < hash->size; i++)
		hash->table[i] = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x7ea4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7e7a
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_delete
void hash_delete(struct hashtable_t *hash, hashdata_free_cb free_cb)
{
	struct element_t *bucket, *last_bucket;
	int i;

	for (i = 0; i < hash->size; i++) {

		bucket = hash->table[i];
		while (bucket != NULL) {

			if (free_cb != NULL)
				free_cb(bucket->data);

			last_bucket = bucket;
			bucket = bucket->next;
			debugFree(last_bucket, 1301);

		}

	}

	hash_destroy(hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x7f32
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7f25
cmpq $0x0, -0x10(%rbp)
je 0x7f01
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movl $0x515, %esi            # imm = 0x515
callq 0x7720
jmp 0x7ee6
jmp 0x7f27
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7ec7
movq -0x8(%rbp), %rdi
callq 0x7f50
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_new
struct hashtable_t *hash_new(int size, hashdata_compare_cb compare,
			     hashdata_choose_cb choose)
{
	struct hashtable_t *hash;

	hash = debugMalloc(sizeof(struct hashtable_t), 302);
	if (!hash)
		return NULL;

	hash->size = size;
	hash->table = debugMalloc(sizeof(struct element_t *)*size, 303);

	if (!hash->table) {
		debugFree(hash, 1305);
		return NULL;
	}

	hash_init(hash);
	hash->compare = compare;
	hash->choose = choose;
	return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x20, %edi
movl $0x12e, %esi            # imm = 0x12E
callq 0x7220
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x8207
movq $0x0, -0x8(%rbp)
jmp 0x827a
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
movl %eax, %edi
movl $0x12f, %esi            # imm = 0x12F
callq 0x7220
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x8251
movq -0x28(%rbp), %rdi
movl $0x519, %esi            # imm = 0x519
callq 0x7720
movq $0x0, -0x8(%rbp)
jmp 0x827a
movq -0x28(%rbp), %rdi
callq 0x7e60
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_add
int hash_add(struct hashtable_t *hash, void *data)
{
	int ret;
	struct element_t *bucket;

	/* found the tail of the list, add new element */
	bucket = debugMalloc(sizeof(struct element_t), 304);

	if (!bucket)
		return -1;

	ret = hash_add_bucket(hash, data, bucket, 1);
	if (ret < 0)
		debugFree(bucket, 1307);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x10, %edi
movl $0x130, %esi            # imm = 0x130
callq 0x7220
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x82c3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x82f6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl $0x1, %ecx
callq 0x8300
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x82f0
movq -0x28(%rbp), %rdi
movl $0x51b, %esi            # imm = 0x51B
callq 0x7720
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_add_bucket
static int hash_add_bucket(struct hashtable_t *hash, void *data,
			   struct element_t *bucket, int check_duplicate)
{
	int index;
	struct element_t *bucket_it, *prev_bucket = NULL;

	index = hash->choose(data, hash->size);
	bucket_it = hash->table[index];

	while (bucket_it != NULL) {
		if (check_duplicate &&
		    hash->compare(bucket_it->data, data))
			return -1;

		prev_bucket = bucket_it;
		bucket_it = bucket_it->next;
	}

	/* init the new bucket */
	bucket->data = data;
	bucket->next = NULL;

	/* and link it */
	if (prev_bucket == NULL)
		hash->table[index] = bucket;
	else
		prev_bucket->next = bucket;

	hash->elements++;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %esi
callq *%rax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8390
cmpl $0x0, -0x24(%rbp)
je 0x837a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x837a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x83e3
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x834a
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, -0x38(%rbp)
jne 0x83c3
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x83cf
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_find
void *hash_find(struct hashtable_t *hash, void *keydata)
{
	int index;
	struct element_t *bucket;

	index = hash->choose(keydata , hash->size);
	bucket = hash->table[index];

	while (bucket != NULL) {
		if (hash->compare(bucket->data, keydata))
			return bucket->data;

		bucket = bucket->next;
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %esi
callq *%rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x8467
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x8459
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x846f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x842b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/open-mesh-mirror[P]batmand/hash.c
// Function: hash_remove_bucket
void *hash_remove_bucket(struct hashtable_t *hash, struct hash_it_t *hash_it_t)
{
	void *data_save;

	/* save the pointer to the data */
	data_save = hash_it_t->bucket->data;

	if (hash_it_t->prev_bucket != NULL)
		hash_it_t->prev_bucket->next = hash_it_t->bucket->next;
	else if (hash_it_t->first_bucket != NULL)
		(*hash_it_t->first_bucket) = hash_it_t->bucket->next;

	debugFree(hash_it_t->bucket, 1306);

	hash->elements--;
	return data_save;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x84c4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x84e8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x84e6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, (%rax)
jmp 0x84e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x51a, %esi            # imm = 0x51A
callq 0x7720
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)