LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jacereda[P]fsatrace/src/emit.c
// Function: emitOp
void
emitOp(int oc, const char *op1, const char *p2)
{
	char *	    dst = shm.buf + 4 + 256;
	char *	    opts = shm.buf + 4;
	uint32_t *  psofar = (uint32_t *)shm.buf;
	uint32_t    sofar;
	uint32_t    sz;
	uint32_t    s1;
	uint32_t    s2;
	char *	    p;
	const char *p1;
	int	    c;
	if (!shm.buf || !opts[tolower(oc)])
		return;
	p1 = op1 ? op1 : "<unknown>";
	c = op1 ? oc : toupper(oc);
	s1 = strlen(p1);
	sz = s1 + 3;
	if (p2) {
		s2 = strlen(p2);
		sz += s2 + 1;
	}
	sofar = __sync_fetch_and_add(psofar, sz);
	p = dst + sofar;
	*p++ = c;
	*p++ = '|';
	memcpy(p, p1, s1);
	p += s1;
	if (p2) {
		*p++ = '|';
		memcpy(p, p2, s2);
		p += s2;
	}
	*p++ = '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x2d76(%rip), %rax      # 0x61e0
addq $0x4, %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x20(%rbp)
movq 0x2d61(%rip), %rax      # 0x61e0
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq 0x2d52(%rip), %rax      # 0x61e0
movq %rax, -0x30(%rbp)
cmpq $0x0, 0x2d46(%rip)      # 0x61e0
je 0x34bb
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x4(%rbp), %edi
callq 0x21a0
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x34c0
jmp 0x35ed
cmpq $0x0, -0x10(%rbp)
je 0x34d1
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x34de
leaq 0xc5a(%rip), %rax       # 0x4132
movq %rax, -0x68(%rbp)
jmp 0x34de
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x34f5
movl -0x4(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x3500
movl -0x4(%rbp), %edi
callq 0x2090
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x50(%rbp), %rdi
callq 0x20d0
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x353a
movq -0x18(%rbp), %rdi
callq 0x20d0
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movl -0x38(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x54(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x7c, (%rax)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x3c(%rbp), %eax
movl %eax, %edx
callq 0x2190
movl -0x3c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x35db
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x7c, (%rax)
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x40(%rbp), %eax
movl %eax, %edx
callq 0x2190
movl -0x40(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0xa, (%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/antonblanchard[P]will-it-scale/tests/write1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);
	unsigned long size = 0;

	memset(buf, 0, sizeof(buf));
	assert(fd >= 0);
	unlink(tmpfile);

	while (1) {
		int ret = write(fd, buf, BUFLEN);
		assert(ret >= 0);
		size += ret;
		if (size >= FILESIZE) {
			size = 0;
			lseek(fd, 0, SEEK_SET);
		}

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1050, %rsp           # imm = 0x1050
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x1306(%rip), %rax      # 0x42d0
movq %rax, -0x1030(%rbp)
movq 0x1300(%rip), %rax      # 0x42d8
movq %rax, -0x1028(%rbp)
movq 0x12fa(%rip), %rax      # 0x42e0
movq %rax, -0x1020(%rbp)
leaq -0x1030(%rbp), %rdi
callq 0x21c0
movl %eax, -0x1034(%rbp)
movq $0x0, -0x1040(%rbp)
leaq -0x1010(%rbp), %rdi
xorl %esi, %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2130
cmpl $0x0, -0x1034(%rbp)
jl 0x3028
jmp 0x3047
leaq 0x124d(%rip), %rdi      # 0x427c
leaq 0x124e(%rip), %rsi      # 0x4284
movl $0x14, %edx
leaq 0x1251(%rip), %rcx      # 0x4293
callq 0x2120
leaq -0x1030(%rbp), %rdi
callq 0x2080
movl -0x1034(%rbp), %edi
leaq -0x1010(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x20c0
movl %eax, -0x1044(%rbp)
cmpl $0x0, -0x1044(%rbp)
jl 0x307b
jmp 0x309a
leaq 0x1244(%rip), %rdi      # 0x42c6
leaq 0x11fb(%rip), %rsi      # 0x4284
movl $0x19, %edx
leaq 0x11fe(%rip), %rcx      # 0x4293
callq 0x2120
movslq -0x1044(%rbp), %rax
addq -0x1040(%rbp), %rax
movq %rax, -0x1040(%rbp)
cmpq $0x100000, -0x1040(%rbp) # imm = 0x100000
jb 0x30d8
movq $0x0, -0x1040(%rbp)
movl -0x1034(%rbp), %edi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2110
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x3053
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: get_size
int get_size (MPI_Datatype t) {
   if (t == MPI_BYTE) return sizeof(char);
   if (t == MPI_DOUBLE) return sizeof(double);
   if (t == MPI_FLOAT) return sizeof(float);
   if (t == MPI_INT) return sizeof(int);
   printf ("Error: Unrecognized argument to 'get_size'\n");
   fflush (stdout);
   MPI_Abort (MPI_COMM_WORLD, TYPE_ERROR);
	return -1;  // WMJ 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq 0x406d(%rip), %rax      # 0x5ff0
cmpq %rax, -0x10(%rbp)
jne 0x1f92
movl $0x1, -0x4(%rbp)
jmp 0x2009
movq 0x4037(%rip), %rax      # 0x5fd0
cmpq %rax, -0x10(%rbp)
jne 0x1fa8
movl $0x8, -0x4(%rbp)
jmp 0x2009
movq 0x4031(%rip), %rax      # 0x5fe0
cmpq %rax, -0x10(%rbp)
jne 0x1fbe
movl $0x4, -0x4(%rbp)
jmp 0x2009
movq 0x3fe3(%rip), %rax      # 0x5fa8
cmpq %rax, -0x10(%rbp)
jne 0x1fd4
movl $0x4, -0x4(%rbp)
jmp 0x2009
leaq 0x2167(%rip), %rdi      # 0x4142
movb $0x0, %al
callq 0x1050
movq 0x400f(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1230
movq 0x3fe0(%rip), %rdi      # 0x5fd8
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x1110
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: my_malloc
void *my_malloc (
   int id,     /* IN - Process rank */
   int bytes)  /* IN - Bytes to allocate */
{
   void *buffer;
   if ((buffer = malloc ((size_t) bytes)) == NULL) {
      printf ("Error: Malloc failed for process %d\n", id);
      fflush (stdout);
      MPI_Abort (MPI_COMM_WORLD, MALLOC_ERROR);
   }
   return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x8(%rbp), %rdi
callq 0x10a0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x2072
movl -0x4(%rbp), %esi
leaq 0x2123(%rip), %rdi      # 0x416e
movb $0x0, %al
callq 0x1050
movq 0x3f9f(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1230
movq 0x3f70(%rip), %rdi      # 0x5fd8
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1110
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: terminate
void terminate (
   int   id,            /* IN - Process rank */
   char *error_message) /* IN - Message to print */
{
   if (!id) {
      printf ("Error: %s\n", error_message);
      fflush (stdout);
   }
   MPI_Finalize();
   exit (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x20b6
movq -0x10(%rbp), %rsi
leaq 0x20f3(%rip), %rdi      # 0x4193
movb $0x0, %al
callq 0x1050
movq 0x3f4a(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1230
callq 0x1180
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1060
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: create_mixed_xfer_arrays
void create_mixed_xfer_arrays (
   int id,       /* IN - Process rank */
   int p,        /* IN - Number of processes */
   int n,        /* IN - Total number of elements */
   int **count,  /* OUT - Array of counts */
   int **disp)   /* OUT - Array of displacements */
{

   int i;

   *count = my_malloc (id, p * sizeof(int));
   *disp = my_malloc (id, p * sizeof(int));
   (*count)[0] = BLOCK_SIZE(0,p,n);
   (*disp)[0] = 0;
   for (i = 1; i < p; i++) {
      (*disp)[i] = (*disp)[i-1] + (*count)[i-1];
      (*count)[i] = BLOCK_SIZE(i,p,n);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
shlq $0x2, %rax
movl %eax, %esi
callq 0x2020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
shlq $0x2, %rax
movl %eax, %esi
callq 0x2020
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %eax
shll $0x0, %eax
cltd
idivl -0x8(%rbp)
movl %eax, %ecx
subl $0x1, %ecx
imull $0x0, -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
subl %eax, %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x21d6
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
movl -0x28(%rbp), %edx
subl %eax, %edx
addl $0x1, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x215a
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: create_uniform_xfer_arrays
void create_uniform_xfer_arrays (
   int id,        /* IN - Process rank */
   int p,         /* IN - Number of processes */
   int n,         /* IN - Number of elements */
   int **count,   /* OUT - Array of counts */
   int **disp)    /* OUT - Array of displacements */
{

   int i;

   *count = my_malloc (id, p * sizeof(int));
   *disp = my_malloc (id, p * sizeof(int));
   (*count)[0] = BLOCK_SIZE(id,p,n);
   (*disp)[0] = 0;
   for (i = 1; i < p; i++) {
      (*disp)[i] = (*disp)[i-1] + (*count)[i-1];
      (*count)[i] = BLOCK_SIZE(id,p,n);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
shlq $0x2, %rax
movl %eax, %esi
callq 0x2020
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x4(%rbp), %edi
movslq -0x8(%rbp), %rax
shlq $0x2, %rax
movl %eax, %esi
callq 0x2020
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
movl %eax, %ecx
subl $0x1, %ecx
movl -0x4(%rbp), %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
subl %eax, %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl $0x0, (%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x22ed
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x4(%rbp), %eax
imull -0xc(%rbp), %eax
cltd
idivl -0x8(%rbp)
movl -0x28(%rbp), %edx
subl %eax, %edx
addl $0x1, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2271
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: replicate_block_vector
void replicate_block_vector (
   void        *ablock,  /* IN - Block-distributed vector */
   int          n,       /* IN - Elements in vector */
   void        *arep,    /* OUT - Replicated vector */
   MPI_Datatype dtype,   /* IN - Element type */
   MPI_Comm     comm)    /* IN - Communicator */
{
   int *cnt;  /* Elements contributed by each process */
   int *disp; /* Displacement in concatenated array */
   int id;    /* Process id */
   int p;     /* Processes in communicator */

   MPI_Comm_size (comm, &p);
   MPI_Comm_rank (comm, &id);
   create_mixed_xfer_arrays (id, p, n, &cnt, &disp);
   MPI_Allgatherv (ablock, cnt[id], dtype, arep, cnt,
                   disp, dtype, comm);
   free (cnt);
   free (disp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x10f0
movq -0x28(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x1160
movl -0x3c(%rbp), %edi
movl -0x40(%rbp), %esi
movl -0xc(%rbp), %edx
leaq -0x30(%rbp), %rcx
leaq -0x38(%rbp), %r8
callq 0x20d0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x20(%rbp), %r10
movq -0x28(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1200
movq -0x30(%rbp), %rdi
callq 0x10e0
movq -0x38(%rbp), %rdi
callq 0x10e0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: read_replicated_vector
void read_replicated_vector (
   char        *s,      /* IN - File name */
   void       **v,      /* OUT - Vector */
   MPI_Datatype dtype,  /* IN - Vector type */
   int         *n,      /* OUT - Vector length */
   MPI_Comm     comm)   /* IN - Communicator */
{
   int        datum_size; /* Bytes per vector element */
   // WMJ int        i;
   int        id;         /* Process rank */
   FILE      *infileptr;  /* Input file pointer */
   int        p;          /* Number of processes */

   MPI_Comm_rank (comm, &id);
   MPI_Comm_size (comm, &p);
   datum_size = get_size (dtype);
   if (id == (p-1)) {
      infileptr = fopen (s, "r");
      if (infileptr == NULL) *n = 0;
      else fread (n, sizeof(int), 1, infileptr);
   }
   MPI_Bcast (n, 1, MPI_INT, p-1, MPI_COMM_WORLD);
   if (! *n) terminate (id, "Cannot open vector file");

   *v = my_malloc (id, *n * datum_size);

   if (id == (p-1)) {
      fread (*v, datum_size, *n, infileptr);
      fclose (infileptr);
   }
   MPI_Bcast (*v, *n, dtype, p-1, MPI_COMM_WORLD);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1160
movq -0x28(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x10f0
movq -0x18(%rbp), %rdi
callq 0x1f70
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x311f
movq -0x8(%rbp), %rdi
leaq 0x10b4(%rip), %rsi      # 0x419e
callq 0x10b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x3106
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0x311d
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x1150
jmp 0x311f
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %esi
movq 0x2e73(%rip), %rdx      # 0x5fa8
movq 0x2e9c(%rip), %r8       # 0x5fd8
callq 0x1170
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x3159
movl -0x30(%rbp), %edi
leaq 0x106e(%rip), %rsi      # 0x41c2
callq 0x2080
movl -0x30(%rbp), %edi
movq -0x20(%rbp), %rax
movl (%rax), %esi
imull -0x2c(%rbp), %esi
callq 0x2020
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x31a6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x2c(%rbp), %rsi
movq -0x20(%rbp), %rax
movslq (%rax), %rdx
movq -0x38(%rbp), %rcx
callq 0x1150
movq -0x38(%rbp), %rdi
callq 0x11b0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rdx
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movq 0x2e14(%rip), %r8       # 0x5fd8
callq 0x1170
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: print_submatrix
void print_submatrix (
   void       **a,       /* OUT - Doubly-subscripted array */
   MPI_Datatype dtype,   /* OUT - Type of array elements */
   int          rows,    /* OUT - Matrix rows */
   int          cols)    /* OUT - Matrix cols */
{
   int i, j;

   for (i = 0; i < rows; i++) {
      for (j = 0; j < cols; j++) {
         if (dtype == MPI_DOUBLE)
            printf ("%6.3f ", ((double **)a)[i][j]);
         else {
            if (dtype == MPI_FLOAT)
               printf ("%6.3f ", ((float **)a)[i][j]);
            else if (dtype == MPI_INT)
               printf ("%6d ", ((int **)a)[i][j]);
         }
      }
      putchar ('\n');
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x32ce
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x32b6
movq 0x2dbd(%rip), %rax      # 0x5fd0
cmpq %rax, -0x10(%rbp)
jne 0x323e
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0xfa5(%rip), %rdi       # 0x41da
movb $0x1, %al
callq 0x1050
jmp 0x32a6
movq 0x2d9b(%rip), %rax      # 0x5fe0
cmpq %rax, -0x10(%rbp)
jne 0x3274
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xf6f(%rip), %rdi       # 0x41da
movb $0x1, %al
callq 0x1050
jmp 0x32a4
movq 0x2d2d(%rip), %rax      # 0x5fa8
cmpq %rax, -0x10(%rbp)
jne 0x32a2
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0xf46(%rip), %rdi       # 0x41e1
movb $0x0, %al
callq 0x1050
jmp 0x32a4
jmp 0x32a6
jmp 0x32a8
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3200
movl $0xa, %edi
callq 0x1080
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x31ed
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: print_subvector
void print_subvector (
   void        *a,       /* IN - Array pointer */
   MPI_Datatype dtype,   /* IN - Array type */
   int          n)       /* IN - Array size */
{
   int i;

   for (i = 0; i < n; i++) {
      if (dtype == MPI_DOUBLE)
         printf ("%6.3f ", ((double *)a)[i]);
      else {
         if (dtype == MPI_FLOAT)
            printf ("%6.3f ", ((float *)a)[i]);
         else if (dtype == MPI_INT)
            printf ("%6d \n", ((int *)a)[i]); // WMJ added /n
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3398
movq 0x2cc3(%rip), %rax      # 0x5fd0
cmpq %rax, -0x10(%rbp)
jne 0x3330
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0xeb3(%rip), %rdi       # 0x41da
movb $0x1, %al
callq 0x1050
jmp 0x3388
movq 0x2ca9(%rip), %rax      # 0x5fe0
cmpq %rax, -0x10(%rbp)
jne 0x335e
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xe85(%rip), %rdi       # 0x41da
movb $0x1, %al
callq 0x1050
jmp 0x3386
movq 0x2c43(%rip), %rax      # 0x5fa8
cmpq %rax, -0x10(%rbp)
jne 0x3384
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0xe69(%rip), %rdi       # 0x41e6
movb $0x0, %al
callq 0x1050
jmp 0x3386
jmp 0x3388
jmp 0x338a
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x32fa
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: print_col_striped_matrix
void print_col_striped_matrix (
   void       **a,       /* IN - 2D array */
   MPI_Datatype dtype,   /* IN - Type of matrix elements */
   int          m,       /* IN - Matrix rows */
   int          n,       /* IN - Matrix cols */
   MPI_Comm     comm)    /* IN - Communicator */
{
   // WMJ MPI_Status status;     /* Result of receive */
   int        datum_size; /* Bytes per matrix element */
   void      *buffer;     /* Enough room to hold 1 row */
   int        i; //  WMJ , j;
   int        id;         /* Process rank */
   int        p;          /* Number of processes */
   int*       rec_count;  /* Elements received per proc */
   int*       rec_disp;   /* Offset of each proc's block */

   MPI_Comm_rank (comm, &id);
   MPI_Comm_size (comm, &p);
   datum_size = get_size (dtype);
   create_mixed_xfer_arrays (id, p, n, &rec_count,&rec_disp);

   if (!id)
      buffer = my_malloc (id, n*datum_size);

   for (i = 0; i < m; i++) {
      MPI_Gatherv (a[i], BLOCK_SIZE(id,p,n), dtype, buffer,
         rec_count, rec_disp, dtype, 0, MPI_COMM_WORLD);
      if (!id) {
         print_subvector (buffer, dtype, n);
         putchar ('\n');
      }
   }
   free (rec_count);
   free (rec_disp);
   if (!id) {
      free (buffer);
      putchar ('\n');
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1160
movq -0x20(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x10f0
movq -0x10(%rbp), %rdi
callq 0x1f70
movl %eax, -0x24(%rbp)
movl -0x38(%rbp), %edi
movl -0x3c(%rbp), %esi
movl -0x18(%rbp), %edx
leaq -0x48(%rbp), %rcx
leaq -0x50(%rbp), %r8
callq 0x20d0
cmpl $0x0, -0x38(%rbp)
jne 0x368f
movl -0x38(%rbp), %edi
movl -0x18(%rbp), %esi
imull -0x24(%rbp), %esi
callq 0x2020
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3734
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x38(%rbp), %eax
addl $0x1, %eax
imull -0x18(%rbp), %eax
cltd
idivl -0x3c(%rbp)
movl %eax, %esi
subl $0x1, %esi
movl -0x38(%rbp), %eax
imull -0x18(%rbp), %eax
cltd
idivl -0x3c(%rbp)
subl %eax, %esi
addl $0x1, %esi
movq -0x10(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x50(%rbp), %r9
movq -0x10(%rbp), %r10
xorl %eax, %eax
movq 0x28ea(%rip), %rax      # 0x5fd8
movq %r10, (%rsp)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x11f0
cmpl $0x0, -0x38(%rbp)
jne 0x3724
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
callq 0x32e0
movl $0xa, %edi
callq 0x1080
jmp 0x3726
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3696
movq -0x48(%rbp), %rdi
callq 0x10e0
movq -0x50(%rbp), %rdi
callq 0x10e0
cmpl $0x0, -0x38(%rbp)
jne 0x375f
movq -0x30(%rbp), %rdi
callq 0x10e0
movl $0xa, %edi
callq 0x1080
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/baileywjohnson[P]mpi-matrix-mult/MyMPI.c
// Function: print_replicated_vector
void print_replicated_vector (
   void        *v,      /* IN - Address of vector */
   MPI_Datatype dtype,  /* IN - Vector element type */
   int          n,      /* IN - Elements in vector */
   MPI_Comm     comm)   /* IN - Communicator */
{
   int id;              /* Process rank */

   MPI_Comm_rank (comm, &id);
   
   if (!id) {
      print_subvector (v, dtype, n);
      printf ("\n\n");
   }
}

// 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)
movq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x1160
cmpl $0x0, -0x24(%rbp)
jne 0x3c38
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x32e0
leaq 0x5bb(%rip), %rdi       # 0x41ec
movb $0x0, %al
callq 0x1050
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/8-Synchronization/pthread_race_condition.c
// Function: do_your_job
void *do_your_job(void *input)
{
	int number = *((int *) input);
	int i = 0;

	printf("Thread %d: starts execution.\n", number);

	while(1)
	{

		if(shared < max)		// the shared counter
		{
			shared++;		// writing shared variables
			i++;
			printf("Thread %d: shared = %d.\n", number, shared);
		}
		else
		{
			break;
		}

		sleep(rand() % 2);	// forced context switching
	}

	printf("Thread %d: termination: I'm responsible for %d updates.\n", number, i);

	pthread_exit(0);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %esi
leaq 0xdde(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
movl 0x2e8d(%rip), %eax      # 0x40c0
cmpl 0x2e8b(%rip), %eax      # 0x40c4
jge 0x126c
movl 0x2e7f(%rip), %eax      # 0x40c0
addl $0x1, %eax
movl %eax, 0x2e76(%rip)      # 0x40c0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %esi
movl 0x2e64(%rip), %edx      # 0x40c0
leaq 0xdbf(%rip), %rdi       # 0x2022
movb $0x0, %al
callq 0x1030
jmp 0x126e
jmp 0x1284
callq 0x10f0
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, %edi
callq 0x10e0
jmp 0x122d
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq 0xdaa(%rip), %rdi       # 0x203b
movb $0x0, %al
callq 0x1030
xorl %eax, %eax
movl %eax, %edi
callq 0x1070
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: main
int main(int argc, char **argv){
	if (argc > 2){
		if (argc == 4 && strcmp("make", argv[1]) == 0)
			return create_file(argv[2], argv[3]);

		if (argc == 4 && strcmp("find", argv[1]) == 0)
			return find_in_file(argv[2], argv[3]);

		if (argc == 3 && strcmp("dump", argv[1]) == 0)
			return dump_file(argv[2], NULL);

		if (argc == 4 && strcmp("dump", argv[1]) == 0)
			return dump_file(argv[2], argv[3]);
	}

	printf("Usage:\n");
	printf("\t%s make [txt file] [db file] - create a database\n", argv[0]);
	printf("\t%s find [db file] [key] - find in the database\n", argv[0]);
	printf("\t%s dump [db file] - dump the database\n", argv[0]);

	return 1;
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
movl %edi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0x2, 0x10(%rsp)
jle 0x139e
cmpl $0x4, 0x10(%rsp)
jne 0x12e1
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x2d4d(%rip), %rdi      # 0x4004
callq 0x10a0
cmpl $0x0, %eax
jne 0x12e1
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1400
movl %eax, 0x14(%rsp)
jmp 0x13f6
cmpl $0x4, 0x10(%rsp)
jne 0x1322
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x2d11(%rip), %rdi      # 0x4009
callq 0x10a0
cmpl $0x0, %eax
jne 0x1322
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1490
movl %eax, 0x14(%rsp)
jmp 0x13f6
cmpl $0x3, 0x10(%rsp)
jne 0x135e
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x2cd5(%rip), %rdi      # 0x400e
callq 0x10a0
cmpl $0x0, %eax
jne 0x135e
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1510
movl %eax, 0x14(%rsp)
jmp 0x13f6
cmpl $0x4, 0x10(%rsp)
jne 0x139c
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x2c99(%rip), %rdi      # 0x400e
callq 0x10a0
cmpl $0x0, %eax
jne 0x139c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1510
movl %eax, 0x14(%rsp)
jmp 0x13f6
jmp 0x139e
leaq 0x2c6e(%rip), %rdi      # 0x4013
movb $0x0, %al
callq 0x1060
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x2c60(%rip), %rdi      # 0x401b
movb $0x0, %al
callq 0x1060
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x2c7d(%rip), %rdi      # 0x404e
movb $0x0, %al
callq 0x1060
movq 0x8(%rsp), %rax
movq (%rax), %rsi
leaq 0x2c98(%rip), %rdi      # 0x407f
movb $0x0, %al
callq 0x1060
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: create_file
static int create_file(const char *filename_to_load, const char *filename_to_write){
	hm_memtable_t *list = hm_memtable_createa();


	printf("Load start..\n");

	_load_file(list, filename_to_load);

	printf("Load done..\n");
	getchar();

	printf("Save start..\n");

	hm_disktable_createfrommemtable(list, filename_to_write);

	printf("Save done..\n");

	getchar();

	hm_memtable_destroy(list);
	free(list);

	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movb $0x0, %al
callq 0x2ef0
movq %rax, (%rsp)
leaq 0x2c87(%rip), %rdi      # 0x40a7
movb $0x0, %al
callq 0x1060
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1600
leaq 0x2c79(%rip), %rdi      # 0x40b5
movb $0x0, %al
callq 0x1060
callq 0x10b0
leaq 0x2c73(%rip), %rdi      # 0x40c2
movb $0x0, %al
callq 0x1060
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2210
leaq 0x2c65(%rip), %rdi      # 0x40d0
movb $0x0, %al
callq 0x1060
callq 0x10b0
movq (%rsp), %rdi
callq 0x2f20
movq (%rsp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: find_in_file
static int find_in_file(const char *filename, const char *keytofind){
	hm_disktable_t *mmf = hm_disktable_opena(filename);

	if (mmf == NULL){
		printf("Can not mmap file\n");
		exit(1);
	}


	const hm_pair_t *pair = hm_disktable_get(mmf, keytofind);

	_print_pair(pair);

	hm_disktable_close(mmf);
	free(mmf);

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1f10
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x14cd
leaq 0x2c4b(%rip), %rdi      # 0x4107
movb $0x0, %al
callq 0x1060
movl $0x1, %edi
callq 0x1140
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1fc0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1820
movq 0x10(%rsp), %rdi
callq 0x1f80
movq 0x10(%rsp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: dump_file
static int dump_file(const char *filename, const char *keytofind){
	hm_disktable_t *mmf = hm_disktable_opena(filename);

	if (mmf == NULL){
		printf("Can not open file\n");
		exit(1);
	}

	hm_disktable_it_t *it = hm_disktable_it_open(mmf);
	if (it == NULL){
		printf("No memory\n");
		exit(1);
	}

	const hm_pair_t *pair;
	uint64_t i = 0;
	for(pair = hm_disktable_it_first(it); pair; pair = hm_disktable_it_next(it)){
		_print_pair(pair);

		++i;

		if (i >= 10)
			break;
	}

	hm_disktable_it_close(it);

	hm_disktable_close(mmf);
	free(mmf);

	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1f10
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x154d
leaq 0x2c2c(%rip), %rdi      # 0x4168
movb $0x0, %al
callq 0x1060
movl $0x1, %edi
callq 0x1140
movq 0x20(%rsp), %rdi
callq 0x2150
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x157c
leaq 0x2c10(%rip), %rdi      # 0x417b
movb $0x0, %al
callq 0x1060
movl $0x1, %edi
callq 0x1140
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x21c0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x15d1
movq 0x10(%rsp), %rdi
callq 0x1820
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
cmpq $0xa, 0x8(%rsp)
jb 0x15be
jmp 0x15d1
jmp 0x15c0
movq 0x18(%rsp), %rdi
callq 0x21e0
movq %rax, 0x10(%rsp)
jmp 0x1594
movq 0x18(%rsp), %rdi
callq 0x21b0
movq 0x20(%rsp), %rdi
callq 0x1f80
movq 0x20(%rsp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: load_file
static void _load_file(hm_memtable_t *list, const char *filename){
	char buffer[BUFFER_SIZE];

	FILE *f = fopen(filename, "r");

	unsigned int i = 0;
	char *key;
	while( (key = fgets(buffer, BUFFER_SIZE, f)) ){
		trim(key);

		hm_memtable_put(list, hm_pair_create(key, filename));

		++i;

		if (i % ( PROCESS_STEP ) == 0){
			printf("Processed %10u records, %10zu bytes...\n", i, hm_memtable_sizeof(list) );

		}
	}

	fclose(f);
}

// Assembly:
subq $0x448, %rsp            # imm = 0x448
movq %rdi, 0x440(%rsp)
movq %rsi, 0x438(%rsp)
movq 0x438(%rsp), %rdi
leaq 0x2ab7(%rip), %rsi      # 0x40dd
callq 0x10d0
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x1090
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x16dd
movq 0x18(%rsp), %rdi
callq 0x16f0
movq 0x440(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x438(%rsp), %rsi
callq 0x1790
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x2f40
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl $0x2710, %ecx           # imm = 0x2710
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jne 0x16d8
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x440(%rsp), %rdi
callq 0x2fe0
movl 0xc(%rsp), %esi
movq %rax, %rdx
leaq 0x2a0e(%rip), %rdi      # 0x40df
movb $0x0, %al
callq 0x1060
jmp 0x1638
movq 0x28(%rsp), %rdi
callq 0x1040
addq $0x448, %rsp            # imm = 0x448
retq
nop
// File: /workspace/github_c_makefile_star2_O0/nmmmnu[P]HM2/test_hm_disktable.c
// Function: print_pair
static void _print_pair(const hm_pair_t *pair){
	if (pair){
		printf("Pair is %s\n", hm_pair_valid(pair, NULL) ? "valid" : "invalid" );
		printf("Pair checksum is %s\n", hm_pair_checksumvalid(pair) ? "valid" : "invalid" );
		printf("---begin---\n");
		hm_pair_printf(pair);
		printf("----end----\n");
	}else{
		printf("Not Found\n");
	}
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
cmpq $0x0, (%rsp)
je 0x18b7
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1c30
movl %eax, %ecx
leaq 0x28e0(%rip), %rsi      # 0x4126
leaq 0x28db(%rip), %rax      # 0x4128
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x28bf(%rip), %rdi      # 0x411a
movb $0x0, %al
callq 0x1060
movq (%rsp), %rdi
callq 0x1c80
movl %eax, %ecx
leaq 0x28b2(%rip), %rsi      # 0x4126
leaq 0x28ad(%rip), %rax      # 0x4128
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x28a5(%rip), %rdi      # 0x412e
movb $0x0, %al
callq 0x1060
leaq 0x28ac(%rip), %rdi      # 0x4143
movb $0x0, %al
callq 0x1060
movq (%rsp), %rdi
callq 0x1d00
leaq 0x28a2(%rip), %rdi      # 0x4150
movb $0x0, %al
callq 0x1060
jmp 0x18c5
leaq 0x289f(%rip), %rdi      # 0x415d
movb $0x0, %al
callq 0x1060
popq %rax
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_09/setjmp_simple.c
// Function: main
int main(int argc, char *argv[])
{
	jmp_buf env;
	int ret;

	ret = setjmp(env);
	printf("setjmp() returned %d\n", ret);
	if (ret)
		return 0;

	longjmp(env, 1);

	printf("never printed!\n");

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x1040
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %esi
leaq 0xe6c(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
cmpl $0x0, -0xe4(%rbp)
je 0x11b3
xorl %eax, %eax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0xe0(%rbp), %rdi
movl $0x1, %esi
callq 0x1050
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/unbwt.c
// Function: get_char_from_first_column64
static int32_t get_char_from_first_column64(uint64_t index, uint64_t *first_col)
{
  // binary search
  int32_t med,lo=0,hi=_BW_ALPHA_SIZE-1;
  // invariant: first_col[lo]<= index < first_col[hi+1]
  assert(first_col[lo]<=index && index<first_col[hi+1]);
  while(lo<hi) {
    med = (lo+hi+1)/2;
    if(index < first_col[med])
      hi = med-1;
    else
      lo = med;
  }
  assert(lo==hi);  
  return lo;
  #if 0  
  int32_t i;
  // sequential search
  for(i=0;i<_BW_ALPHA_SIZE;i++)
    if(first_col[i]<=index && index < first_col[i+1]) {
      assert(lo==i);
      return i;
    }
  _bwtext_fatal_error(__func__);
  return 0; 
  #endif 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0xff, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x8(%rbp), %rax
ja 0x1b49
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x1b49
jmp 0x1b68
leaq 0x797(%rip), %rdi       # 0x22e7
leaq 0x588(%rip), %rsi       # 0x20df
movl $0xb1, %edx
leaq 0x7b2(%rip), %rcx       # 0x2315
callq 0x1070
jmp 0x1b6a
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1bab
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq -0x14(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x1ba3
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ba9
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1b6a
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x1bb5
jmp 0x1bd4
leaq 0x794(%rip), %rdi       # 0x2350
leaq 0x51c(%rip), %rsi       # 0x20df
movl $0xb9, %edx
leaq 0x746(%rip), %rcx       # 0x2315
callq 0x1070
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/unbwt.c
// Function: main
int main(int argc, char *argv[])
{
  char *bnam=NULL, *tnam=NULL; 

  /* ------------- read options from command line ----------- */
  if(argc==3) {
    bnam=argv[1]; tnam = argv[2];
  }
  else {
    fprintf(stderr,"Usage:  %s infile outfile\n\n", argv[0]);
    fprintf(stderr,"Takes as input a multi-bwt that uses 0x0 as the EOS symbol and recovers\n");
    fprintf(stderr,"the original sequences writing them to <outfile> separated by a newline\n\n");
    exit(1);
  }
  
  // do the inversion
  invert_bwt(bnam,tnam);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpl $0x3, -0x8(%rbp)
jne 0x1c26
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1c7f
movq 0x23cb(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x5fa(%rip), %rsi       # 0x2238
movb $0x0, %al
callq 0x1080
movq 0x23ac(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x5fe(%rip), %rsi       # 0x2254
movb $0x0, %al
callq 0x1080
movq 0x2394(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x62f(%rip), %rsi       # 0x229d
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10f0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1270
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Zarh[P]regps3iso/main.c
// Function: GetExtension
char *GetExtension(char *path)
{
    int n = strlen(path);
    int m = n;

    while(m > 1 && path[m] != '.' && path[m] != '/') m--;
    
	
    if(strcmp(&path[m], ".0")==0 || strcmp(&path[m], ".66600")==0) { // splitted
       m--;
       while(m > 1 && path[m] != '.' && path[m] != '/') m--; 
    }
	
	if(strcasecmp(&path[m], ".bin")==0) {
		if(strcasecmp(&path[m-7], ".header.bin")==0) {
			m-=7;	
		}
	}
  
    if(path[m] == '.') return &path[m];

    return &path[n];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4010f0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x18(%rbp)
movb %al, -0x19(%rbp)
jle 0x401b44
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, -0x19(%rbp)
je 0x401b44
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x401b4d
jmp 0x401b58
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x401b0e
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
leaq 0xdeaad(%rip), %rsi     # 0x4e0617
callq 0x4010c0
cmpl $0x0, %eax
je 0x401b90
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
leaq 0xc24a8(%rip), %rsi     # 0x4c402e
callq 0x4010c0
cmpl $0x0, %eax
jne 0x401be5
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x1, -0x18(%rbp)
movb %al, -0x1a(%rbp)
jle 0x401bcf
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, -0x1a(%rbp)
je 0x401bcf
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0x401bd8
jmp 0x401be3
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x401b99
jmp 0x401be5
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rax
addq %rax, %rdi
leaq 0xc2445(%rip), %rsi     # 0x4c403c
callq 0x401090
cmpl $0x0, %eax
jne 0x401c2c
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %eax
subl $0x7, %eax
cltq
addq %rax, %rdi
leaq 0xc241e(%rip), %rsi     # 0x4c4035
callq 0x401090
cmpl $0x0, %eax
jne 0x401c2a
movl -0x18(%rbp), %eax
subl $0x7, %eax
movl %eax, -0x18(%rbp)
jmp 0x401c2c
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
jne 0x401c4e
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x401c5d
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Zarh[P]regps3iso/main.c
// Function: do_it
void do_it(char *path, u8 task)
{
	switch(task)
	{
		case do_read_region_info:
		{
			read_region_info(path);
		}
		break;
		case do_get_plain_files:
		{
			get_plain_files(path);
		}
		break;
		case do_get_enc_files:
		{
			get_enc_files(path);
		}
		break;
		case do_fixps3iso_region:
		{
			fixps3iso_region(path);
		}
		break;
		default:
		{
			print_help();
		}
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x4042f0
movq -0x18(%rbp), %rax
leaq 0xbfd49(%rip), %rcx     # 0x4c4004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x402ec0
jmp 0x4042f5
movq -0x8(%rbp), %rdi
callq 0x401c70
jmp 0x4042f5
movq -0x8(%rbp), %rdi
callq 0x402430
jmp 0x4042f5
movq -0x8(%rbp), %rdi
callq 0x403860
jmp 0x4042f5
callq 0x401ad0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Zarh[P]regps3iso/main.c
// Function: do_task
void do_task(char *path_in, u8 task)
{
	DIR *d;
	struct dirent *dir;
	
	char path[512];
	strcpy(path, path_in);
	int l = strlen(path);
	int i;
	
	for(i=0;i<l;i++){
		if(path[i]=='\\') path[i]='/';
	}
	
	if( is_dir(path) ) {
		d = opendir(path);
		if(d==NULL) return;
		
		while ((dir = readdir(d))) {
			if(!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, "..")) continue;		
			
			char temp[512];
			sprintf(temp, "%s/%s", path, dir->d_name);
			
			if(is_dir(temp)) do_task(temp, task);
			else {
				
				char *ext = GetExtension(temp);
				if( strcasecmp(ext, ".header.bin") == 0 || strcasecmp(ext, ".iso") == 0) {
					do_it(temp, task);
				}
			}
		}
		closedir(d);
	} else {
		do_it(path, task);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
leaq -0x220(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x401020
leaq -0x220(%rbp), %rdi
callq 0x4010f0
movl %eax, -0x224(%rbp)
movl $0x0, -0x228(%rbp)
movl -0x228(%rbp), %eax
cmpl -0x224(%rbp), %eax
jge 0x404385
movslq -0x228(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x5c, %eax
jne 0x404372
movslq -0x228(%rbp), %rax
movb $0x2f, -0x220(%rbp,%rax)
jmp 0x404374
movl -0x228(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x228(%rbp)
jmp 0x404341
leaq -0x220(%rbp), %rdi
callq 0x404250
cmpb $0x0, %al
je 0x4044ad
leaq -0x220(%rbp), %rdi
callq 0x466200
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4043b5
jmp 0x4044bd
jmp 0x4043b7
movq -0x18(%rbp), %rdi
callq 0x466460
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x4044a2
movq -0x20(%rbp), %rdi
addq $0x13, %rdi
leaq 0xbfe35(%rip), %rsi     # 0x4c4212
callq 0x4010c0
cmpl $0x0, %eax
je 0x404400
movq -0x20(%rbp), %rdi
addq $0x13, %rdi
leaq 0xbfe1b(%rip), %rsi     # 0x4c4211
callq 0x4010c0
cmpl $0x0, %eax
jne 0x404402
jmp 0x4043b7
leaq -0x430(%rbp), %rdi
leaq -0x220(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x13, %rcx
leaq 0xbfdf5(%rip), %rsi     # 0x4c4214
movb $0x0, %al
callq 0x410050
leaq -0x430(%rbp), %rdi
callq 0x404250
cmpb $0x0, %al
je 0x404448
leaq -0x430(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x404300
jmp 0x40449d
leaq -0x430(%rbp), %rdi
callq 0x401af0
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rdi
leaq 0xbfbcc(%rip), %rsi     # 0x4c4035
callq 0x401090
cmpl $0x0, %eax
je 0x40448b
movq -0x438(%rbp), %rdi
leaq 0xbfd8b(%rip), %rsi     # 0x4c420c
callq 0x401090
cmpl $0x0, %eax
jne 0x40449b
leaq -0x430(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x404290
jmp 0x40449d
jmp 0x4043b7
movq -0x18(%rbp), %rdi
callq 0x466430
jmp 0x4044bd
leaq -0x220(%rbp), %rdi
movzbl -0x9(%rbp), %esi
callq 0x404290
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw %cs:(%rax,%rax)