LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mortie[P]makeschem/makeschem.c
// Function: main
int main(int argc, char **argv) {
	if (argc != 3) {
		printf("Usage: %s <input|-> [output|-]\n", argv[0]);
		return EXIT_FAILURE;
	}

	FILE *in = stdin;
	if (strcmp(argv[1], "-") != 0) {
		in = fopen(argv[1], "r");
		if (in == NULL) {
			perror(argv[1]);
			return EXIT_FAILURE;
		}
	}

	FILE *out = stdout;
	if (strcmp(argv[2], "-") != 0) {
		out = fopen(argv[2], "w");
		if (out == NULL) {
			perror(argv[2]);
			return EXIT_FAILURE;
		}
	}

	struct blocks blocks;
	blocks_init(&blocks);
	scdef_read(&blocks, in);
	if (!schem_write(&blocks, out)) {
		if (ferror(out)) {
			perror("write");
		} else {
			fprintf(stderr, "Error: Write failed.\n");
		}
		free(blocks.chunks);
		return EXIT_FAILURE;
	}

	free(blocks.chunks);
	return EXIT_SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0xceda
movq 0x8(%rbx), %rdi
cmpb $0x2d, (%rdi)
jne 0xce53
cmpb $0x0, 0x1(%rdi)
je 0xcefc
leaq 0xa213(%rip), %rsi      # 0x1706d
callq 0xc0e0
movq %rax, %r14
testq %rax, %rax
je 0xcf2d
movq 0x10(%rbx), %rdi
cmpb $0x2d, (%rdi)
jne 0xce7e
cmpb $0x0, 0x1(%rdi)
je 0xcf0b
leaq 0xc5a2(%rip), %rsi      # 0x19427
callq 0xc0e0
movq %rax, %r15
testq %rax, %rax
je 0xcf33
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rbx
movups %xmm0, 0x18(%rbx)
movl $0x1, %eax
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcb11
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcb68
xorl %ebx, %ebx
testl %eax, %eax
je 0xcf1a
movq 0x20(%rsp), %rdi
callq 0xc030
jmp 0xcef0
movq (%rbx), %rsi
leaq 0x21f(%rip), %rdi       # 0xd103
xorl %eax, %eax
callq 0xc060
movl $0x1, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x110d5(%rip), %rax     # 0x1dfd8
movq (%rax), %r14
jmp 0xce6b
movq 0x110be(%rip), %rax     # 0x1dfd0
movq (%rax), %r15
jmp 0xce96
movq %r15, %rdi
callq 0xc040
testl %eax, %eax
jne 0xcf3e
callq 0xc1f6
jmp 0xcf4a
movq 0x8(%rbx), %rdi
jmp 0xcf37
movq 0x10(%rbx), %rdi
callq 0xc0f0
jmp 0xceeb
leaq 0x1de(%rip), %rdi       # 0xd123
callq 0xc0f0
movl $0x1, %ebx
jmp 0xcece
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: main
int main(int argc, char* argv[])
{
 lua_State* L;
 int i=doargs(argc,argv);
 argc-=i; argv+=i;
 if (argc<=0) usage("no input files given");
 L=luaL_newstate();
 if (L==NULL) fatal("cannot create state: not enough memory");
 lua_pushcfunction(L,&pmain);
 lua_pushinteger(L,argc);
 lua_pushlightuserdata(L,argv);
 if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1));
 lua_close(L);
 return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rax
testq %rax, %rax
je 0x44ec
cmpb $0x0, (%rax)
je 0x44ec
movq %rax, 0x1ac6c(%rip)     # 0x1f158
movl 0x1ac86(%rip), %eax     # 0x1f178
cmpl $0x2, %ebx
jl 0x45d1
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x11afa(%rip), %rcx     # 0x16004
movslq %ebp, %rdx
movq (%r14,%rdx,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x45d9
movzbl 0x1(%rdi), %esi
leal -0x6c(%rsi), %r8d
cmpl $0xa, %r8d
ja 0x4698
movslq (%rcx,%r8,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
incl %eax
movl %eax, 0x1ac31(%rip)     # 0x1f178
jmp 0x45c5
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
movq 0x8(%r14,%rdx,8), %rdx
movq %rdx, 0x1ac01(%rip)     # 0x1f160
testq %rdx, %rdx
je 0x46c5
incl %ebp
movzbl (%rdx), %esi
cmpl $0x2d, %esi
je 0x45b0
testl %esi, %esi
jne 0x45c5
jmp 0x46c5
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
movb $0x1, 0x1abf4(%rip)     # 0x1f180
jmp 0x45c5
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
incl %r15d
jmp 0x45c5
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
movb $0x1, 0x1abce(%rip)     # 0x1f17c
jmp 0x45c5
cmpb $0x0, 0x1(%rdx)
jne 0x46c5
movq $0x0, 0x1ab9b(%rip) # 0x1f160
incl %ebp
cmpl %ebx, %ebp
jl 0x450a
jmp 0x45d9
xorl %r15d, %r15d
movl $0x1, %ebp
cmpl %ebx, %ebp
jne 0x4605
testl %eax, %eax
jne 0x45ec
testb $0x1, 0x1ab94(%rip)     # 0x1f17c
movl %ebx, %ebp
je 0x4605
movb $0x1, 0x1ab89(%rip)     # 0x1f17c
leal -0x1(%rbx), %ebp
movslq %ebx, %rax
leaq 0x1ab68(%rip), %rcx     # 0x1f168
movq %rcx, -0x8(%r14,%rax,8)
testl %r15d, %r15d
je 0x4622
leaq 0x11b4b(%rip), %rdi     # 0x1615c
callq 0x4080
leal -0x1(%rbx), %eax
cmpl %eax, %r15d
je 0x46e7
subl %ebp, %ebx
jle 0x46d1
callq 0x81bf
testq %rax, %rax
je 0x46dd
movq %rax, %r15
movslq %ebp, %rax
leaq (%r14,%rax,8), %r14
leaq 0xff(%rip), %rsi        # 0x4748
movq %r15, %rdi
xorl %edx, %edx
callq 0x5d29
movl %ebx, %esi
movq %r15, %rdi
callq 0x5b5d
movq %r15, %rdi
movq %r14, %rsi
callq 0x5dc7
movq %r15, %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x643e
movq %r15, %rdi
testl %eax, %eax
jne 0x46e2
callq 0xf9ec
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %esi, %esi
je 0x45d9
cmpl $0x2d, %esi
jne 0x46c0
cmpb $0x0, 0x2(%rdi)
jne 0x46c0
incl %ebp
leal 0x1(%r15), %ecx
testl %r15d, %r15d
cmovel %r15d, %ecx
movl %ecx, %r15d
jmp 0x45d9
callq 0x46ee
leaq 0x11a7c(%rip), %rdi     # 0x16148
callq 0x46ee
leaq 0x11a34(%rip), %rdi     # 0x1610c
callq 0x46ee
callq 0x42d5
callq 0x42a0
xorl %edi, %edi
callq 0x4230
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: usage
static void usage(const char* message)
{
 if (*message=='-')
  fprintf(stderr,"%s: unrecognized option " LUA_QS "\n",progname,message);
 else
  fprintf(stderr,"%s: %s\n",progname,message);
 fprintf(stderr,
  "usage: %s [options] [filenames]\n"
  "Available options are:\n"
  "  -l       list (use -l -l for full listing)\n"
  "  -o name  output to file " LUA_QL("name") " (default is \"%s\")\n"
  "  -p       parse only\n"
  "  -s       strip debug information\n"
  "  -v       show version information\n"
  "  --       stop handling options\n"
  "  -        stop handling options and process stdin\n"
  ,progname,Output);
 exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
cmpb $0x2d, (%rdi)
movq 0x1a8f4(%rip), %rbx     # 0x1eff0
movq (%rbx), %rdi
movq 0x1aa52(%rip), %rdx     # 0x1f158
leaq 0x11a88(%rip), %rax     # 0x16195
leaq 0x11d96(%rip), %rsi     # 0x164aa
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x4160
movq (%rbx), %rdi
movq 0x1aa2f(%rip), %rdx     # 0x1f158
leaq 0x11a83(%rip), %rsi     # 0x161b3
leaq 0x1aa31(%rip), %rcx     # 0x1f168
xorl %eax, %eax
callq 0x4160
movl $0x1, %edi
callq 0x4230
// File: /workspace/github_c_makefile_star2_O3/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: PrintConstant
static void PrintConstant(const Proto* f, int i)
{
 const TValue* o=&f->k[i];
 switch (ttypenv(o))
 {
  case LUA_TNIL:
	printf("nil");
	break;
  case LUA_TBOOLEAN:
	printf(bvalue(o) ? "true" : "false");
	break;
  case LUA_TNUMBER:
	printf(LUA_NUMBER_FMT,nvalue(o));
	break;
  case LUA_TSTRING:
	PrintString(rawtsvalue(o));
	break;
  default:				/* cannot happen */
	printf("? type=%d",ttype(o));
	break;
 }
}

// Assembly:
movslq %esi, %rax
shlq $0x4, %rax
movl 0x8(%rdi,%rax), %esi
movl %esi, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x5206
addq %rax, %rdi
leaq 0x11013(%rip), %rax     # 0x160dc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x1221e(%rip), %rdi     # 0x172f7
jmp 0x5102
movsd (%rdi), %xmm0
leaq 0x11333(%rip), %rdi     # 0x16419
movb $0x1, %al
jmp 0x4110
cmpl $0x0, (%rdi)
leaq 0x1131c(%rip), %rax     # 0x16413
leaq 0x11310(%rip), %rdi     # 0x1640e
cmoveq %rax, %rdi
xorl %eax, %eax
jmp 0x4110
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbp
movq 0x10(%rbp), %r15
movl $0x22, %edi
callq 0x4040
testq %r15, %r15
je 0x51ee
leaq 0x10fbb(%rip), %rbx     # 0x160f0
leaq 0x112ff(%rip), %r12     # 0x1643b
xorl %r14d, %r14d
movzbl 0x18(%rbp,%r14), %r13d
leal -0x7(%r13), %eax
cmpl $0x6, %eax
ja 0x5160
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
leaq 0x112d1(%rip), %rdi     # 0x1642f
jmp 0x51ae
cmpl $0x5c, %r13d
je 0x5187
cmpl $0x22, %r13d
jne 0x51bf
leaq 0x112b6(%rip), %rdi     # 0x16429
jmp 0x51ae
leaq 0x112c5(%rip), %rdi     # 0x16441
jmp 0x51ae
leaq 0x112b9(%rip), %rdi     # 0x1643e
jmp 0x51ae
leaq 0x1129e(%rip), %rdi     # 0x1642c
jmp 0x51ae
leaq 0x112a1(%rip), %rdi     # 0x16438
jmp 0x51ae
leaq 0x11292(%rip), %rdi     # 0x16432
jmp 0x51ae
leaq 0x1128c(%rip), %rdi     # 0x16435
jmp 0x51ae
movq %r12, %rdi
xorl %eax, %eax
callq 0x4110
incq %r14
cmpq %r14, %r15
jne 0x513f
jmp 0x51ee
callq 0x4280
movq (%rax), %rax
movl %r13d, %ecx
testb $0x40, 0x1(%rax,%rcx,2)
jne 0x51e4
leaq 0x1126c(%rip), %rdi     # 0x16444
movl %r13d, %esi
xorl %eax, %eax
callq 0x4110
jmp 0x51b5
movl %r13d, %edi
callq 0x4040
jmp 0x51b5
movl $0x22, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4040
andl $0x3f, %esi
leaq 0x1120f(%rip), %rdi     # 0x1641f
xorl %eax, %eax
jmp 0x4110
nop
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: gcinit
void gcinit(int staticsz, int dynamicsz)
{
  /*
     allocate the memory areas 
   */
  staticBase = (struct object *) malloc(staticsz * sizeof(struct object));
  spaceOne = (struct object *) malloc(dynamicsz * sizeof(struct object));
  spaceTwo = (struct object *) malloc(dynamicsz * sizeof(struct object));
  if((staticBase == 0) || (spaceOne == 0) || (spaceTwo == 0))
    sysError("not enough memory for space allocations\n", 0);

  staticTop = staticBase + staticsz;
  staticPointer = staticTop;

  spaceOneSize = spaceTwoSize = dynamicsz;
  memoryBase = spaceOne;
  memoryPointer = memoryBase + spaceOneSize;
  if(lstDebugging)
  {
    printf("space one 0x%p, top 0x%p,"
           " space two 0x%p , top 0x%p\n",
           spaceOne, (spaceOne + spaceOneSize),
           spaceTwo, (spaceTwo + spaceTwoSize));
  }
  inSpaceOne = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movslq %edi, %r14
shlq $0x4, %r14
movq %r14, %rdi
callq 0x2220
movq %rax, %r12
movq %rax, 0x4109b(%rip)     # 0x459f8
movslq %ebx, %r13
movq %r13, %rbx
shlq $0x4, %rbx
movq %rbx, %rdi
callq 0x2220
movq %rax, %r15
movq %rax, 0x4105f(%rip)     # 0x459d8
movq %rbx, %rdi
callq 0x2220
movq %rax, 0x41060(%rip)     # 0x459e8
testq %r12, %r12
setne %cl
testq %r15, %r15
setne %dl
andb %cl, %dl
testq %rax, %rax
setne %al
testb %al, %dl
jne 0x49bc
leaq 0x29b9(%rip), %rdi      # 0x7360
xorl %esi, %esi
callq 0x4418
movq 0x41043(%rip), %r12     # 0x459f8
movq 0x4101c(%rip), %r15     # 0x459d8
addq %r14, %r12
movq %r12, 0x4103a(%rip)     # 0x45a00
movq %r12, 0x4103b(%rip)     # 0x45a08
movq %r13, 0x4101c(%rip)     # 0x459f0
movq %r13, 0x41005(%rip)     # 0x459e0
movq %r15, 0x4102e(%rip)     # 0x45a10
leaq (%r15,%rbx), %rdx
movq %rdx, 0x4102b(%rip)     # 0x45a18
leaq 0x42260(%rip), %rax     # 0x46c54
cmpl $0x0, (%rax)
je 0x4a17
movq 0x40fe8(%rip), %rcx     # 0x459e8
addq %rcx, %rbx
leaq 0x297f(%rip), %rdi      # 0x7389
movq %r15, %rsi
movq %rbx, %r8
xorl %eax, %eax
callq 0x2130
movb $0x1, 0x41002(%rip)     # 0x45a20
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: gcexpand
void gcexpand(int multiplier)
{
  struct object *space;
  size_t spaceSize;

  /* figure out where to expand */
  if (inSpaceOne)
  {
    space = spaceTwo;
  }
  else
  {
    space = spaceOne;
  }
  spaceSize = (spaceOneSize > spaceTwoSize) ? spaceOneSize : spaceTwoSize;
  spaceSize *= multiplier;

  /* expand it */
  space = realloc(space, spaceSize * sizeof(struct object));
  if (!space)
  {
    sysError("failed to expand memory", NULL);
  }

  if (inSpaceOne)
  {
    spaceTwo = space;
    spaceTwoSize = spaceSize;
  }
  else
  {
    spaceOne = space;
    spaceOneSize = spaceSize;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movb 0x40fe9(%rip), %bpl     # 0x45a20
leaq 0x40faa(%rip), %r12     # 0x459e8
leaq 0x40f93(%rip), %r14     # 0x459d8
testb %bpl, %bpl
movq %r14, %rax
cmovneq %r12, %rax
movq (%rax), %rax
movq 0x40f87(%rip), %rcx     # 0x459e0
movq 0x40f90(%rip), %rdx     # 0x459f0
cmpq %rdx, %rcx
cmovaq %rcx, %rdx
movslq %edi, %r15
imulq %rdx, %r15
movq %r15, %rsi
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
testq %rax, %rax
je 0x4a96
testb %bpl, %bpl
je 0x4aad
leaq 0x40f5f(%rip), %rax     # 0x459f0
movq %r12, %r14
jmp 0x4ab4
leaq 0x2921(%rip), %rdi      # 0x73be
xorl %esi, %esi
callq 0x4418
cmpb $0x0, 0x40f75(%rip)     # 0x45a20
jne 0x4a8a
leaq 0x40f2c(%rip), %rax     # 0x459e0
movq %rbx, (%r14)
movq %r15, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: staticAllocate
struct object  *staticAllocate(int sz)
{
  staticPointer = WORDSDOWN(staticPointer, sz + 2);
  if(staticPointer < staticBase)
  {
    sysError("insufficient static memory", 0);
  }
  SETSIZE(staticPointer, sz);
  return (staticPointer);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leal (,%rbx,8), %eax
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
subl %eax, %ecx
movslq %ecx, %rax
addq 0x40be8(%rip), %rax     # 0x45a08
movq %rax, 0x40be1(%rip)     # 0x45a08
cmpq 0x40bca(%rip), %rax     # 0x459f8
jae 0x4e45
leaq 0x259f(%rip), %rdi      # 0x73d6
xorl %esi, %esi
callq 0x4418
movq 0x40bc3(%rip), %rax     # 0x45a08
shll $0x2, %ebx
movl %ebx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: staticIAllocate
struct object  *staticIAllocate(int sz)
{
  int             trueSize;
  struct object  *result;

  trueSize = (sz + BytesPerWord - 1) / BytesPerWord;
  result = staticAllocate(trueSize);
  SETSIZE(result, sz);
  result->size |= FLAG_BIN;
  return result;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leal 0x7(%rbx), %eax
leal 0xe(%rbx), %edi
testl %eax, %eax
cmovnsl %eax, %edi
sarl $0x3, %edi
callq 0x4e05
leal 0x2(,%rbx,4), %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: gcialloc
struct object  *gcialloc(int sz)
{
  int             trueSize;
  struct object  *result;

  trueSize = (sz + BytesPerWord - 1) / BytesPerWord;
  result = gcalloc(trueSize);
  SETSIZE(result, sz);
  result->size |= FLAG_BIN;
  return result;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leal 0x7(%rbx), %eax
leal 0xe(%rbx), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movl %ecx, %edi
andl $-0x8, %ecx
movl $0xfffffff0, %eax       # imm = 0xFFFFFFF0
subl %ecx, %eax
cltq
addq 0x40b88(%rip), %rax     # 0x45a18
sarl $0x3, %edi
movq %rax, 0x40b7e(%rip)     # 0x45a18
cmpq 0x40b6f(%rip), %rax     # 0x45a10
jae 0x4eaa
callq 0x4ac3
jmp 0x4eaf
shll $0x2, %edi
movl %edi, (%rax)
leal 0x2(,%rbx,4), %ecx
movl %ecx, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: fileIn
int fileIn(FILE * fp)
{
  int             i;

  /*
     use the currently unused space for the indir pointers 
   */
  if(inSpaceOne)
  {
    indirArray = (struct object * *) spaceTwo;
    indirSize = spaceTwoSize;
  }
  else
  {
    indirArray = (struct object * *) spaceOne;
    indirSize = spaceOneSize;
  }
  indirtop = 0;

  /*
     read in the method from the image file 
   */
  nilObject     = objectRead(fp);
  trueObject    = objectRead(fp);
  falseObject   = objectRead(fp);
  globalsObject = objectRead(fp);
  SmallIntClass = objectRead(fp);
  IntegerClass  = objectRead(fp);
  ArrayClass    = objectRead(fp);
  BlockClass    = objectRead(fp);
  ContextClass  = objectRead(fp);
  StringClass   = objectRead(fp);
  initialMethod = objectRead(fp);
  for(i = 0; i < 3; i++)
  {
    binaryMessages[i] = objectRead(fp);
  }
  badMethodSym = objectRead(fp);

  /*
     clean up after ourselves 
   */
  memoryClear((char *) indirArray, indirSize * sizeof(struct object));
  return indirtop;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x40b1f(%rip), %rax     # 0x459e8
cmpb $0x0, 0x40b50(%rip)     # 0x45a20
leaq 0x40b01(%rip), %rcx     # 0x459d8
cmovneq %rax, %rcx
leaq 0x40b0e(%rip), %rax     # 0x459f0
leaq 0x40af7(%rip), %rdx     # 0x459e0
cmovneq %rax, %rdx
movq (%rcx), %rax
movq %rax, 0x41c89(%rip)     # 0x46b80
movq (%rdx), %rax
movq %rax, 0x41c87(%rip)     # 0x46b88
movl $0x0, 0x41c85(%rip)     # 0x46b90
callq 0x5024
leaq 0x40a21(%rip), %rcx     # 0x45938
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x40a17(%rip), %rcx     # 0x45940
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x40a0d(%rip), %rcx     # 0x45948
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x40a5b(%rip), %rcx     # 0x459a8
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x40a01(%rip), %rcx     # 0x45960
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x40a27(%rip), %rcx     # 0x45998
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x409cd(%rip), %rcx     # 0x45950
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x409c3(%rip), %rcx     # 0x45958
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x409c9(%rip), %rcx     # 0x45970
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x409e7(%rip), %rcx     # 0x459a0
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x5024
leaq 0x409e5(%rip), %rcx     # 0x459b0
movq %rax, (%rcx)
xorl %r14d, %r14d
leaq 0x409a8(%rip), %r15     # 0x45980
movq %rbx, %rdi
callq 0x5024
movq %rax, (%r15,%r14,8)
incq %r14
cmpq $0x3, %r14
jne 0x4fd8
movq %rbx, %rdi
callq 0x5024
leaq 0x4096c(%rip), %rcx     # 0x45968
movq %rax, (%rcx)
movq 0x41b7a(%rip), %rdi     # 0x46b80
movq 0x41b7b(%rip), %rdx     # 0x46b88
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x2140
movl 0x41b72(%rip), %eax     # 0x46b90
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: fileOut
int fileOut(FILE * fp)
{
  int             i;

  /*
     use the currently unused space for the indir pointers 
   */
  if(inSpaceOne)
  {
    indirArray = (struct object * *) spaceTwo;
    indirSize = spaceTwoSize;
  }
  else
  {
    indirArray = (struct object * *) spaceOne;
    indirSize = spaceOneSize;
  }
  indirtop = 0;

  /*
     write out the roots of the image file 
   */
  objectWrite(fp, nilObject);
  objectWrite(fp, trueObject);
  objectWrite(fp, falseObject);
  objectWrite(fp, globalsObject);
  objectWrite(fp, SmallIntClass);
  objectWrite(fp, IntegerClass);
  objectWrite(fp, ArrayClass);
  objectWrite(fp, BlockClass);
  objectWrite(fp, ContextClass);
  objectWrite(fp, StringClass);
  objectWrite(fp, initialMethod);
  for(i = 0; i < 3; i++)
  {
    objectWrite(fp, binaryMessages[i]);
  }
  objectWrite(fp, badMethodSym);
  printf("%d objects written in image\n", indirtop);

  /*
     clean up after ourselves 
   */
  memoryClear((char *) indirArray, indirSize * sizeof(struct object));
  return indirtop;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x4083e(%rip), %rax     # 0x459e8
leaq 0x40827(%rip), %rcx     # 0x459d8
cmpb $0x0, 0x40868(%rip)     # 0x45a20
cmovneq %rax, %rcx
movq %rdi, %rbx
movq (%rcx), %rax
movq %rax, 0x419b7(%rip)     # 0x46b80
leaq 0x40820(%rip), %rax     # 0x459f0
leaq 0x40809(%rip), %rcx     # 0x459e0
cmovneq %rax, %rcx
movq (%rcx), %rax
movq %rax, 0x419a3(%rip)     # 0x46b88
movl $0x0, 0x419a1(%rip)     # 0x46b90
leaq 0x40742(%rip), %rax     # 0x45938
movq (%rax), %rsi
callq 0x531c
leaq 0x4073b(%rip), %rax     # 0x45940
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x40731(%rip), %rax     # 0x45948
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x4077f(%rip), %rax     # 0x459a8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x40725(%rip), %rax     # 0x45960
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x4074b(%rip), %rax     # 0x45998
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x406f1(%rip), %rax     # 0x45950
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x406e7(%rip), %rax     # 0x45958
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x406ed(%rip), %rax     # 0x45970
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x4070b(%rip), %rax     # 0x459a0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
leaq 0x40709(%rip), %rax     # 0x459b0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
xorl %r14d, %r14d
leaq 0x406c4(%rip), %r15     # 0x45980
movq (%r15,%r14,8), %rsi
movq %rbx, %rdi
callq 0x531c
incq %r14
cmpq $0x3, %r14
jne 0x52bc
leaq 0x40690(%rip), %rax     # 0x45968
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x531c
movl 0x418a7(%rip), %esi     # 0x46b90
leaq 0x2101(%rip), %rdi      # 0x73f1
xorl %eax, %eax
callq 0x2130
movq 0x41882(%rip), %rdi     # 0x46b80
movq 0x41883(%rip), %rdx     # 0x46b88
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x2140
movl 0x4187a(%rip), %eax     # 0x46b90
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: objectWrite
static void objectWrite(FILE * fp, struct object *obj)
{
  int             i,
                  size;

  if(obj == 0)
  {
    sysError("writing out a null object", 0);
  }

  if(IS_SMALLINT(obj))
  {                             /* SmallInt */
    int             val;

    writeWord(fp, 2);
    val = HTONL(integerValue(obj));
    (void) fwrite(&val, sizeof(val), 1, fp);
    return;
  }

  /*
     see if already written 
   */
  for(i = 0; i < indirtop; i++)
  {
    if(obj == indirArray[i])
    {
      if(i == 0)
      {
        writeWord(fp, 5);
      }
      else
      {
        writeWord(fp, 4);
        writeWord(fp, i);
      }
      return;
    }
  }

  /*
     not written, do it now 
   */
  indirArray[indirtop++] = obj;

  /*
     byte objects 
   */
  if(obj->size & FLAG_BIN)
  {
    struct byteObject *bobj = (struct byteObject *) obj;

    size = SIZE(obj);
    writeWord(fp, 3);
    writeWord(fp, size);
    for(i = 0; i < size; i++)
      writeWord(fp, bobj->bytes[i]);
    objectWrite(fp, obj->class);
    return;
  }

  /*
     ordinary objects 
   */
  size = SIZE(obj);
  writeWord(fp, 1);
  writeWord(fp, size);
  objectWrite(fp, obj->class);
  for(i = 0; i < size; i++)
  {
    objectWrite(fp, obj->data[i]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2198(%rip), %r15      # 0x74cc
testq %r14, %r14
jne 0x5343
movq %r15, %rdi
xorl %esi, %esi
callq 0x4418
testb $0x1, %r14b
jne 0x5406
movslq 0x4183c(%rip), %rax     # 0x46b90
movq 0x41825(%rip), %rcx     # 0x46b80
testq %rax, %rax
jle 0x5371
xorl %r12d, %r12d
cmpq %r14, (%rcx,%r12,8)
je 0x53d1
incq %r12
cmpq %r12, %rax
jne 0x5363
leal 0x1(%rax), %edx
movl %edx, 0x41816(%rip)     # 0x46b90
movq %r14, (%rcx,%rax,8)
movl (%r14), %ebp
movl %ebp, %r12d
shrl $0x2, %r12d
movq %rbx, %rdi
testb $0x2, %bpl
je 0x5432
movl $0x3, %esi
callq 0x57b1
movq %rbx, %rdi
movl %r12d, %esi
callq 0x57b1
cmpl $0x4, %ebp
jb 0x53c8
xorl %r13d, %r13d
movzbl 0x10(%r14,%r13), %esi
movq %rbx, %rdi
callq 0x57b1
incq %r13
cmpq %r13, %r12
jne 0x53b2
movq 0x8(%r14), %r14
jmp 0x5334
testq %r12, %r12
je 0x53eb
movq %rbx, %rdi
movl $0x4, %esi
callq 0x57b1
movq %rbx, %rdi
movl %r12d, %esi
jmp 0x53f3
movq %rbx, %rdi
movl $0x5, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x57b1
movq %rbx, %rdi
movl $0x2, %esi
callq 0x57b1
shrq %r14
leaq 0x4(%rsp), %rdi
movl %r14d, (%rdi)
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2340
jmp 0x5473
movl $0x1, %esi
callq 0x57b1
movq %rbx, %rdi
movl %r12d, %esi
callq 0x57b1
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x531c
cmpl $0x4, %ebp
jb 0x5473
movl %r12d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14,%r12,8), %rsi
movq %rbx, %rdi
callq 0x531c
incq %r12
cmpq %r12, %r15
jne 0x545e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: addStaticRoot
void addStaticRoot(struct object **objp)
{
  LstUInt         i;

  for(i = 0; i < staticRootTop; ++i)
  {
    if(objp == staticRoots[i])
    {
      return;
    }
  }
  if(staticRootTop >= STATICROOTLIMIT)
  {
    sysError("addStaticRoot: too many static references",
             0);
  }
  staticRoots[staticRootTop++] = objp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x40744(%rip), %eax     # 0x45bd0
testq %rax, %rax
je 0x54cd
movq %rax, %rcx
shlq $0x3, %rcx
xorl %edx, %edx
leaq 0x4073f(%rip), %rsi     # 0x45be0
cmpq %rbx, (%rdx,%rsi)
je 0x54e5
addq $0x8, %rdx
cmpq %rdx, %rcx
jne 0x54a1
cmpl $0x1f4, %eax            # imm = 0x1F4
jb 0x54cf
leaq 0x1f50(%rip), %rdi      # 0x740e
xorl %esi, %esi
callq 0x4418
movl 0x40705(%rip), %eax     # 0x45bd0
jmp 0x54cf
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x406f8(%rip)     # 0x45bd0
movl %eax, %eax
leaq 0x406ff(%rip), %rcx     # 0x45be0
movq %rbx, (%rcx,%rax,8)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: exchangeObjects
void
exchangeObjects(struct object *array1, struct object *array2, LstUInt size)
{
  LstUInt         x;

  /*
   * Convert our memory spaces
   */
  walk(memoryPointer, memoryTop, array1, array2, size);
  walk(staticPointer, staticTop, array1, array2, size);

  /*
   * Fix up the root pointers, too
   */
  for(x = 0; x < rootTop; x++)
  {
    map(&rootStack[x], array1, array2, size);
  }
  for(x = 0; x < staticRootTop; x++)
  {
    map(staticRoots[x], array1, array2, size);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x4051d(%rip), %rdi     # 0x45a18
movq 0x4052e(%rip), %rsi     # 0x45a30
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x55ce
movq 0x404f1(%rip), %rdi     # 0x45a08
movq 0x404e2(%rip), %rsi     # 0x45a00
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x55ce
movl 0x4049e(%rip), %ecx     # 0x459d0
movl %ebx, %eax
testq %rcx, %rcx
je 0x557a
xorl %edx, %edx
leaq 0x404fe(%rip), %rsi     # 0x45a40
testl %ebx, %ebx
jle 0x5572
movq (%rsi,%rdx,8), %rdi
xorl %r8d, %r8d
movq 0x10(%r15,%r8,8), %r9
movq 0x10(%r14,%r8,8), %r10
cmpq %rdi, %r9
je 0x556b
cmpq %rdi, %r10
je 0x556e
incq %r8
cmpq %r8, %rax
jne 0x554d
jmp 0x5572
movq %r10, %r9
movq %r9, (%rsi,%rdx,8)
incq %rdx
cmpq %rcx, %rdx
jne 0x5542
movl 0x40650(%rip), %ecx     # 0x45bd0
testq %rcx, %rcx
je 0x55c8
xorl %edx, %edx
leaq 0x40652(%rip), %rsi     # 0x45be0
testl %ebx, %ebx
jle 0x55c0
movq (%rsi,%rdx,8), %rdi
movq (%rdi), %r8
xorl %r9d, %r9d
movq 0x10(%r15,%r9,8), %r10
movq 0x10(%r14,%r9,8), %r11
cmpq %r8, %r10
je 0x55ba
cmpq %r8, %r11
je 0x55bd
incq %r9
cmpq %r9, %rax
jne 0x559c
jmp 0x55c0
movq %r11, %r10
movq %r10, (%rdi)
incq %rdx
cmpq %rcx, %rdx
jne 0x558e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: walk
static void
walk(struct object *base, struct object *top,
     struct object *array1, struct object *array2, LstUInt size)
{
  struct object  *op,
                 *opnext;
  LstUInt         x,
                  sz;

  for(op = base; op < top; op = opnext)
  {
    /*
     * Re-map the class pointer, in case that's the
     * object which has been remapped.
     */
    map(&op->class, array1, array2, size);

    /*
     * Skip our argument arrays, since otherwise things
     * get rather circular.
     */
    sz = SIZE(op);
    if((op == array1) || (op == array2))
    {
      opnext = WORDSUP(op, sz + 2);
      continue;
    }

    /*
     * Don't have to worry about instance variables
     * if it's a binary format.
     */
    if(op->size & FLAG_BIN)
    {
      LstUInt         trueSize;

      /*
       * Skip size/class, and enough words to
       * contain the binary bytes.
       */
      trueSize = (sz + BytesPerWord - 1) / BytesPerWord;
      opnext = WORDSUP(op, trueSize + 2);
      continue;
    }

    /*
     * For each instance variable slot, fix up the pointer
     * if needed.
     */
    for(x = 0; x < sz; ++x)
    {
      map(&op->data[x], array1, array2, size);
    }

    /*
     * Walk past this object
     */
    opnext = WORDSUP(op, sz + 2);
  }
}

// Assembly:
cmpq %rsi, %rdi
jae 0x569a
pushq %r15
pushq %r14
pushq %rbx
movl %r8d, %eax
testl %r8d, %r8d
jle 0x5610
movq 0x8(%rdi), %r9
xorl %r10d, %r10d
movq 0x10(%rdx,%r10,8), %r11
movq 0x10(%rcx,%r10,8), %rbx
cmpq %r9, %r11
je 0x5609
cmpq %r9, %rbx
je 0x560c
incq %r10
cmpq %r10, %rax
jne 0x55eb
jmp 0x5610
movq %rbx, %r11
movq %r11, 0x8(%rdi)
movl (%rdi), %r10d
movl %r10d, %r9d
shrl $0x2, %r9d
cmpq %rdx, %rdi
setne %r11b
cmpq %rcx, %rdi
setne %bl
testb %bl, %r11b
jne 0x5632
shll $0x3, %r9d
jmp 0x5685
testb $0x2, %r10b
jne 0x567d
cmpl $0x4, %r10d
jb 0x562c
xorl %r10d, %r10d
testl %r8d, %r8d
jle 0x5673
movq 0x10(%rdi,%r10,8), %r11
xorl %ebx, %ebx
movq 0x10(%rdx,%rbx,8), %r14
movq 0x10(%rcx,%rbx,8), %r15
cmpq %r11, %r14
je 0x566b
cmpq %r11, %r15
je 0x566e
incq %rbx
cmpq %rbx, %rax
jne 0x564d
jmp 0x5673
movq %r15, %r14
movq %r14, 0x10(%rdi,%r10,8)
incq %r10
cmpq %r9, %r10
jne 0x5641
jmp 0x562c
addl $0x7, %r9d
andl $-0x8, %r9d
addl $0x10, %r9d
addq %r9, %rdi
cmpq %rsi, %rdi
jb 0x55df
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: lstNewString
struct object *lstNewString(const char *str)
{
  struct byteObject *stringObject;
  struct object *returnObject;
  LstUInt i;
  LstUInt l;

  l = strlen(str);

  stringObject = (struct byteObject *)gcialloc(l);
  returnObject = (struct object *)stringObject;
  returnObject->class = StringClass;

  for(i = 0; i < l; i++)
      stringObject->bytes[i] = str[i];

  return returnObject;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2100
movq %rax, %r14
movl %r14d, %edi
callq 0x4e6d
leaq 0x402e7(%rip), %rcx     # 0x459a0
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
testl %r14d, %r14d
je 0x56db
movl %r14d, %ecx
xorl %edx, %edx
movb (%rbx,%rdx), %sil
movb %sil, 0x10(%rax,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x56ca
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: lstGetString
void lstGetString(char *to, int size, struct object *from)
{
  int             i;
  int             fsize = SIZE(from);
  struct byteObject *bobj = (struct byteObject *) from;

  if(fsize > size)
  {
	  sysError("error converting text into unix string", (void *)(INT_PTR)fsize);
  }
  for(i = 0; i < fsize; i++)
  {
    to[i] = bobj->bytes[i];
  }
  to[i] = '\0';                 /* put null terminator at end */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movl (%rdx), %ebp
movl %ebp, %r15d
shrl $0x2, %r15d
cmpl %esi, %r15d
jle 0x570d
leaq 0x1d33(%rip), %rdi      # 0x7438
movq %r15, %rsi
callq 0x4418
cmpl $0x4, %ebp
jae 0x5716
xorl %eax, %eax
jmp 0x572b
movl %r15d, %eax
xorl %ecx, %ecx
movb 0x10(%r14,%rcx), %dl
movb %dl, (%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x571b
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: lstNewBinary
struct object *lstNewBinary(void *p, LstUInt l)
{
  struct byteObject *stringObject = (struct byteObject *) gcialloc(l);

  stringObject->class = StringClass; // TODO should use ByteArrayClass

  memcpy(stringObject->bytes, p, l);

  return (struct object *) stringObject;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
callq 0x4e6d
movq %rax, %r15
leaq 0x4024b(%rip), %rax     # 0x459a0
movq (%rax), %rax
movq %rax, 0x8(%r15)
leaq 0x10(%r15), %rdi
movl %ebx, %edx
movq %r14, %rsi
callq 0x21f0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: readWord
static unsigned int readWord(FILE * fp)
{
  int             i;
  unsigned int    value;

  i = fgetc(fp);
  if(i == EOF)
  {
    sysError("unexpected end of file reading image file", 0);
  }

  value = i == 255 ? 255 + readWord(fp) : i;
  return value;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x2160
cmpl $0xff, %eax
jne 0x5793
addl $0xff, %ebp
jmp 0x577c
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x57a8
leaq 0x1d01(%rip), %rdi      # 0x74a2
xorl %esi, %esi
callq 0x4418
addl %ebp, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/memory.c
// Function: writeWord
static void writeWord(FILE * fp, int i)
{
  if(i < 0)
  {
	  sysError("trying to write out negative value", (void *)(INT_PTR)i);
  }
  if(i >= 255)
  {
    fputc(255, fp);
    writeWord(fp, i - 255);
  }
  else
  {
    fputc(i, fp);
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
testl %esi, %esi
js 0x57e2
cmpl $0xff, %ebp
jb 0x57f1
movl $0xff, %edi
movq %rbx, %rsi
callq 0x2180
addl $0xffffff01, %ebp       # imm = 0xFFFFFF01
cmpl $0xfe, %ebp
ja 0x57c5
jmp 0x57f1
movslq %ebp, %rsi
leaq 0x1cfa(%rip), %rdi      # 0x74e6
callq 0x4418
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2180
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_dynload.c
// Function: rss_dlOpen
RSS_DL_Handle rss_dlOpen(const char *pathname, RSS_DL_Mode mode)
{
  int dlMode;
  RSS_DL_Handle h = (RSS_DL_Handle)malloc(sizeof(struct RSS_DL_Handle_Struct));
  if(!h)
    return 0;

  dlMode = mode == RSS_DL_LAZY ? RTLD_LAZY : RTLD_NOW;
  /*h->handle = dlopen(pathname, dlMode | RTLD_LOCAL);*/
  h->handle = dlopen(pathname, dlMode | RTLD_GLOBAL);

  if(!h->handle)
  {
    free(h);
    h = 0;
  }

  return h;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x8, %edi
callq 0x2220
testq %rax, %rax
je 0x5e12
movq %rax, %rbx
cmpl $0x1, %ebp
movl $0x102, %esi            # imm = 0x102
sbbl $0x0, %esi
movq %r14, %rdi
callq 0x21b0
movq %rax, (%rbx)
testq %rax, %rax
jne 0x5e14
movq %rbx, %rdi
callq 0x2060
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_dynload.c
// Function: rss_dlClose
int rss_dlClose(RSS_DL_Handle handle)
{
  int result = -1;

  if(!handle)
    return -1;

  if(handle->handle)
    result = dlclose(handle->handle);

  free(handle);
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5e38
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x5e3f
callq 0x2360
movl %eax, %ebp
jmp 0x5e44
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x5e4c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x2060
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_queue.c
// Function: rss_queueCreate
RSS_Queue rss_queueCreate(int initialSize)
{
  RSS_Queue q;

  q = (RSS_Queue)malloc(sizeof(struct RSS_Queue_Struct));
  if(!q)
    return 0;

  q->maxSize    = 0;
  q->size       = 0;
  q->firstIndex = 0;
  q->lastIndex  = 0;
  q->queue      = 0;

  if(!rss_queueResize(q, initialSize ? initialSize : 100))
  {
    free(q);
    q = 0;
  }

  return q;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x1, %edi
movl $0x18, %esi
callq 0x2190
testq %rax, %rax
je 0x5ebe
movq %rax, %rbx
testl %ebp, %ebp
movl $0x64, %esi
cmovnel %ebp, %esi
movq %rax, %rdi
callq 0x5eca
testl %eax, %eax
jne 0x5ec0
movq %rbx, %rdi
callq 0x2060
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_queue.c
// Function: rss_queueResize
static int rss_queueResize(RSS_Queue queue, int newSize)
{
  void **newQueue;
  int    i;

  if(!queue)
    return 0;

  newQueue = (void **)malloc(newSize * sizeof(void *));
  if(!newQueue)
    return 0;

  if(queue->queue)
  {
    for(i = 0; i < queue->size; i++)
      newQueue[i] = queue->queue[(queue->firstIndex + i) % queue->maxSize];

    free(queue->queue);
  }

  queue->queue      = newQueue;
  queue->firstIndex = 0;
  queue->lastIndex  = queue->size;
  queue->maxSize    = newSize;

  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %rdi
shlq $0x3, %rdi
callq 0x2220
testq %rax, %rax
je 0x5f41
movq %rax, %r15
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x5f23
movslq 0x4(%r14), %rcx
testq %rcx, %rcx
jle 0x5f1e
movl (%r14), %esi
movl 0x8(%r14), %r8d
xorl %r9d, %r9d
leal (%r8,%r9), %eax
cltd
idivl %esi
movslq %edx, %rax
movq (%rdi,%rax,8), %rax
movq %rax, (%r15,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x5f04
callq 0x2060
movq %r15, 0x10(%r14)
movl $0x0, 0x8(%r14)
movl 0x4(%r14), %eax
movl %eax, 0xc(%r14)
movl %ebx, (%r14)
movl $0x1, %eax
jmp 0x5f43
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_queue.c
// Function: rss_queueRelease
void rss_queueRelease(RSS_Queue queue)
{
  if(!queue)
    return;

  if(queue->queue)
    free(queue->queue);

  free(queue);
}

// Assembly:
testq %rdi, %rdi
je 0x5f69
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x5f60
callq 0x2060
movq %rbx, %rdi
popq %rbx
jmp 0x2060
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_queue.c
// Function: rss_queueGet
void *rss_queueGet(RSS_Queue queue)
{
  void *element;

  if(!queue)
    return 0;

  if(queue->size <= 0)
    return 0;

  element = queue->queue[queue->firstIndex];
  queue->firstIndex++;
  if(queue->firstIndex >= queue->maxSize)
    queue->firstIndex -= queue->maxSize;

  queue->size--;

  return element;
}

// Assembly:
testq %rdi, %rdi
je 0x5fa3
movl 0x4(%rdi), %ecx
testl %ecx, %ecx
jle 0x5fa3
movq 0x10(%rdi), %rax
movslq 0x8(%rdi), %rdx
movq (%rax,%rdx,8), %rax
incl %edx
movl %edx, 0x8(%rdi)
subl (%rdi), %edx
jl 0x5f9d
movl %edx, 0x8(%rdi)
decl %ecx
movl %ecx, 0x4(%rdi)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/GregorR[P]lstg/source/rss_queue.c
// Function: rss_queuePut
int rss_queuePut(RSS_Queue queue, void *element)
{
  if(!queue)
    return 0;

  if(queue->size >= queue->maxSize)
  {
    if(!rss_queueResize(queue, queue->maxSize + (queue->maxSize / 2) + 1))
      return 0;
  }

  queue->queue[queue->lastIndex] = element;
  queue->lastIndex++;
  if(queue->lastIndex >= queue->maxSize)
    queue->lastIndex -= queue->maxSize;

  queue->size++;

  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x5ffd
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
cmpl %eax, 0x4(%rdi)
jl 0x5fda
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leal (%rax,%rcx), %esi
incl %esi
movq %rbx, %rdi
callq 0x5eca
testl %eax, %eax
je 0x5ffd
movl (%rbx), %eax
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movq %r14, (%rcx,%rdx,8)
leal 0x1(%rdx), %ecx
xorl %edx, %edx
cmpl %eax, %ecx
cmovgel %eax, %edx
subl %edx, %ecx
movl %ecx, 0xc(%rbx)
incl 0x4(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deepika9294[P]Threading-Library/one-one/test/matrix.c
// Function: init
void init(matrix *t, int c) {
    t->mat = (int **)malloc(sizeof(int *) * t->r);
    for(int i = 0; i < t->r; i++ ) {
        t->mat[i] = (int *)malloc(sizeof(int) * t->c); 
    }
    // initialising the matrix with c
    for(int i = 0; i < t->r; i++) {
        for(int j = 0; j < t->c; j++) {
            t->mat[i][j] = c;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movslq 0x8(%rdi), %r12
leaq (,%r12,8), %rdi
callq 0x10e0
movq %rax, (%r14)
testq %r12, %r12
jle 0x18a4
movslq 0xc(%r14), %r15
shlq $0x2, %r15
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x10e0
movq (%r14), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x1857
testl %r12d, %r12d
jle 0x18a4
movl 0xc(%r14), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x1899
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdx
xorl %esi, %esi
movl %ebx, (%rdx,%rsi,4)
incq %rsi
movslq 0xc(%r14), %rcx
cmpq %rcx, %rsi
jl 0x1886
movl 0x8(%r14), %r12d
incq %rax
movslq %r12d, %rdx
cmpq %rdx, %rax
jl 0x1879
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/deepika9294[P]Threading-Library/one-one/test/matrix.c
// Function: print_matrix
void print_matrix(matrix *t) {
    printf("\n");
    // t->mat[5][5] = 34;
    for(int i = 0; i < t->r; i++) {
        for(int j = 0; j < t->c; j++) {
            // printf("%d ", t->mat[i][j]);
            if(t->mat[i][j] != 80){
                final_check = 0;
            }
        }
        // printf("\n");
    }
    if(final_check == 1) {
        printf(GREEN "**PASSED** : MATRIX TEST with rows=%d, columns=%d\n" NONE, t->r, t->c);
    }
    else {
        printf(RED "**FAILED** : MATRIX TEST with rows=%d, columns=%d\n" NONE, t->r, t->c);

    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xa, %edi
callq 0x1040
movslq 0x8(%rbx), %rsi
testq %rsi, %rsi
jle 0x197f
movl 0xc(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x1977
movq (%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
xorl %edi, %edi
cmpl $0x50, (%rdx,%rdi,4)
je 0x196f
movl $0x0, 0x2739(%rip)      # 0x40a8
incq %rdi
cmpq %rdi, %rax
jne 0x195f
incq %rcx
cmpq %rsi, %rcx
jne 0x1952
cmpl $0x1, 0x2722(%rip)      # 0x40a8
movl 0xc(%rbx), %edx
leaq 0x6b1(%rip), %rax       # 0x2041
leaq 0x6ea(%rip), %rdi       # 0x2081
cmoveq %rax, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/deepika9294[P]Threading-Library/one-one/test/matrix.c
// Function: partial_multiply
void* partial_multiply(void *arg) {
    int sum;
    rows *temp = (rows *)arg; 
    int start = temp->row_start;
    int end = temp->row_end + 1;
    // printf("D %d %d \n", start, end);
    for(int i = start; i < end; i++) {
        for(int j = 0; j < b.c; j++) {
            sum = 0;
            for( int k = 0; k < a.c; k++) {
                sum += a.mat[i][k] * b.mat[k][j];

            }
            res.mat[i][j] = sum;
        }
    }
}

// Assembly:
movslq (%rdi), %rax
movl 0x4(%rdi), %ecx
cmpl %ecx, %eax
jg 0x1a73
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x26f3(%rip), %rdx      # 0x40f0
incl %ecx
movl 0x26d6(%rip), %r10d     # 0x40dc
testl %r10d, %r10d
jle 0x1a66
movq 0x26ce(%rip), %rsi      # 0x40e0
movq 0x26b7(%rip), %rdi      # 0x40d0
movq (%rdx,%rax,8), %r8
xorl %r9d, %r9d
movslq 0x26c5(%rip), %r10      # 0x40ec
testq %r10, %r10
jle 0x1a50
movq (%rsi,%rax,8), %rbx
xorl %r14d, %r14d
xorl %r11d, %r11d
movq (%rdi,%r14,8), %r15
movl (%r15,%r9,4), %r15d
imull (%rbx,%r14,4), %r15d
addl %r15d, %r11d
incq %r14
cmpq %r14, %r10
jne 0x1a36
jmp 0x1a53
xorl %r11d, %r11d
movl %r11d, (%r8,%r9,4)
incq %r9
movslq 0x267b(%rip), %r10      # 0x40dc
cmpq %r10, %r9
jl 0x1a20
incq %rax
cmpl %eax, %ecx
jne 0x1a06
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: main.cold.2
static void
version(void)
{

	fprintf(stderr, "%s %s\n", __NAME_CLIENT__, __THIS_VERSION__);
	fprintf(stderr, "Copyright (c) 2016-2019 Tudor Ioan Roman\n");
	fprintf(stderr, "Released under the ISC License\n");

	exit(EXIT_SUCCESS);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x3e40(%rip), %r14      # 0x5ff0
movq (%r14), %rdi
leaq 0xea9(%rip), %rsi       # 0x3063
leaq 0xea9(%rip), %rdx       # 0x306a
leaq 0xe9a(%rip), %rcx       # 0x3062
xorl %eax, %eax
callq 0x2150
movq (%r14), %rcx
leaq 0xe95(%rip), %rdi       # 0x306e
pushq $0x29
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2140
movq (%r14), %rcx
leaq 0xea7(%rip), %rdi       # 0x3098
pushq $0x1f
popq %rsi
movq %rbx, %rdx
callq 0x2140
xorl %edi, %edi
callq 0x2060
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_offset
static bool
fn_offset(uint32_t *data, int argc, char **argv)
{
	int i = 0;
	do {
		errno = 0;
		int c = strtol(argv[i], NULL, 10);
		if (c >= 0)
			data[i] = IPC_MUL_PLUS;
		else
			data[i] = IPC_MUL_MINUS;
		data[i + 2] = abs(c);
		i++;
	} while (i < argc && errno == 0);

	if (errno != 0)
		return false;
	else
		return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x20f0
movq %rax, %r15
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
decl %r12d
xorl %r13d, %r13d
movl $0x0, (%r15)
movq (%rbx,%r13,8), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x20d0
movl %eax, %ecx
shrl $0x1f, %ecx
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
movl %ecx, (%r14,%r13,4)
movl %edx, 0x8(%r14,%r13,4)
movl (%r15), %eax
cmpq %r13, %r12
je 0x25db
incq %r13
testl %eax, %eax
je 0x25a0
testl %eax, %eax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_naturals
static bool
fn_naturals(uint32_t *data, int argc, char **argv)
{
	int i = 0;
	do {
		errno = 0;
		data[i] = strtol(argv[i], NULL, 10);
		i++;
	} while (i < argc && errno == 0);

	if (errno != 0)
		return false;
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x20f0
movq %rax, %r15
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
decl %r12d
xorl %r13d, %r13d
movl $0x0, (%r15)
movq (%rbx,%r13,8), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x20d0
movl %eax, (%r14,%r13,4)
movl (%r15), %eax
cmpq %r13, %r12
je 0x2647
incq %r13
testl %eax, %eax
je 0x261d
testl %eax, %eax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tudurom[P]windowchef/client.c
// Function: fn_hack
static bool
fn_hack(uint32_t *data, int argc, char **argv)
{
	int i = 0, j = 0;
	unsigned long d;
	do {
		errno = 0;
		d = strtoul(argv[i], NULL, 10);
		if (i % 2 == 0) {
			data[j] = d << 16U;
		} else {
			data[j] |= d;
			j++;
		}
		i++;
	} while (i < argc && errno == 0);

	if (i % 2 == 1 || errno != 0)
		return false;
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x20f0
movq %rax, %r14
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
decl %r12d
incq %r12
xorl %eax, %eax
xorl %ebp, %ebp
movq %rax, %r13
movl $0x0, (%r14)
movq (%rbx,%rax,8), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2160
movslq %ebp, %rcx
testb $0x1, %r13b
jne 0x26b9
shll $0x10, %eax
movl %eax, (%r15,%rcx,4)
jmp 0x26c1
orl %eax, (%r15,%rcx,4)
incl %ecx
movl %ecx, %ebp
leaq 0x1(%r13), %rax
cmpq %rax, %r12
je 0x26d0
cmpl $0x0, (%r14)
je 0x268d
testb $0x1, %r13b
jne 0x26da
xorl %eax, %eax
jmp 0x26e1
cmpl $0x0, (%r14)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq