LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/tests/../modules/UsingHashTable/ADTMap.c
// Function: map_first
MapNode map_first(Map map) {
	//Ξεκινάμε την επανάληψή μας απο το 1ο στοιχείο, μέχρι να βρούμε κάτι όντως τοποθετημένο
	for (int i = 0; i < map->capacity; i++)
		if (map->array[i].state == OCCUPIED)
			return &map->array[i];

	return MAP_EOF;
}

// Assembly:
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x5389
movq (%rdi), %rax
cmpl $0x1, 0x10(%rax)
je 0x538b
addq $0x18, %rax
decq %rcx
jne 0x537a
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/tests/../modules/UsingHashTable/ADTMap.c
// Function: map_next
MapNode map_next(Map map, MapNode node) {
	// Το node είναι pointer στο i-οστό στοιχείο του array, οπότε node - array == i  (pointer arithmetic!)
	for (int i = node - map->array + 1; i < map->capacity; i++)
		if (map->array[i].state == OCCUPIED)
			return &map->array[i];

	return MAP_EOF;
}

// Assembly:
movq (%rdi), %rcx
subq %rcx, %rsi
shrq $0x3, %rsi
imull $0xaaaaaaab, %esi, %edx # imm = 0xAAAAAAAB
movl 0x8(%rdi), %esi
incl %edx
xorl %eax, %eax
cmpl %esi, %edx
jge 0x53bb
movslq %edx, %rdi
leaq (%rdi,%rdi,2), %rdi
incl %edx
cmpl $0x1, 0x10(%rcx,%rdi,8)
jne 0x53a3
leaq (%rcx,%rdi,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/chatziko-k08[P]lecture-code/tests/../modules/UsingHashTable/ADTMap.c
// Function: hash_string
uint hash_string(Pointer value) {
	// djb2 hash function, απλή, γρήγορη, και σε γενικές γραμμές αποδοτική
    uint hash = 5381;
    for (char* s = value; *s != '\0'; s++)
		hash = (hash << 5) + hash + *s;			// hash = (hash * 33) + *s. Το foo << 5 είναι γρηγορότερη εκδοχή του foo * 32.
    return hash;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x53f0
incq %rdi
movl $0x1505, %edx           # imm = 0x1505
movl %edx, %eax
movsbl %cl, %ecx
shll $0x5, %eax
addl %edx, %eax
addl %ecx, %eax
movb (%rdi), %cl
incq %rdi
movl %eax, %edx
testb %cl, %cl
jne 0x53da
retq
movl $0x1505, %eax           # imm = 0x1505
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: resolv
static void
resolv(void **p, const char *n)
{
	if (!*p) {
		SE;
		*p = dlsym(RTLD_NEXT, n);
		RE;
	}
	assert(*p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, (%rdi)
jne 0x2461
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2050
movq %rax, %r15
movl (%rax), %ebp
movq $-0x1, %rdi
movq %r14, %rsi
callq 0x21e0
movq %rax, (%rbx)
movl %ebp, (%r15)
testq %rax, %rax
je 0x246c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c36(%rip), %rdi      # 0x40a9
leaq 0x1c32(%rip), %rsi      # 0x40ac
leaq 0x1c41(%rip), %rcx      # 0x40c2
movl $0x9b, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: fopen64
FILE *
fopen64(const char *p, const char *m)
{
	FILE *r;
	static FILE *(*ofopen64)(const char *, const char *) = 0;
	DP;
	R(fopen64);
	r = ofopen64(p, m);
	if (r)
		emit(strchr(m, 'r') ? 'r' : 'w', p);
	DD;
	return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x3c93(%rip), %rdi      # 0x6130
leaq 0x1b62(%rip), %rsi      # 0x4006
callq 0x242a
movq %rbx, %rdi
movq %r15, %rsi
callq *0x3c7b(%rip)           # 0x6130
movq %rax, %r14
testq %rax, %rax
je 0x24e0
movq %r15, %rdi
movl $0x72, %esi
callq 0x20f0
xorl %ecx, %ecx
testq %rax, %rax
sete %cl
leal (%rcx,%rcx,4), %edi
addl $0x72, %edi
movq %rbx, %rsi
callq 0x2380
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: open
int
open(const char *p, int f, mode_t m)
{
	int r;
	static int (*oopen)(const char *, int, mode_t) = 0;
	DP;
	R(open);
	r = oopen(p, f, m);
	if (r >= 0)
		emit(f & wmode ? 'w' : 'r', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x3c3c(%rip), %rdi      # 0x6138
leaq 0x1afe(%rip), %rsi      # 0x4001
callq 0x242a
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *0x3c22(%rip)           # 0x6138
movl %eax, %r14d
testl %eax, %eax
js 0x2536
xorl %eax, %eax
testl $0x643, %ebp            # imm = 0x643
setne %al
leal (%rax,%rax,4), %edi
addl $0x72, %edi
movq %rbx, %rsi
callq 0x2380
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: open64
int
open64(const char *p, int f, mode_t m)
{
	int r;
	static int (*oopen64)(const char *, int, mode_t) = 0;
	DP;
	R(open64);
	r = oopen64(p, f, m);
	if (r >= 0)
		emit(f & wmode ? 'w' : 'r', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x3bef(%rip), %rdi      # 0x6140
leaq 0x1aaf(%rip), %rsi      # 0x4007
callq 0x242a
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *0x3bd5(%rip)           # 0x6140
movl %eax, %r14d
testl %eax, %eax
js 0x258b
xorl %eax, %eax
testl $0x643, %ebp            # imm = 0x643
setne %al
leal (%rax,%rax,4), %edi
addl $0x72, %edi
movq %rbx, %rsi
callq 0x2380
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: openat
int
openat(int fd, const char *p, int f, mode_t m)
{
	int r;
	DP;
	static int (*oopenat)(int, const char *, int, mode_t) = 0;
	R(openat);
	r = oopenat(fd, p, f, m);
	if (r >= 0)
		fdemit(f & wmode ? 'w' : 'r', r);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
leaq 0x3b9d(%rip), %rdi      # 0x6148
leaq 0x1a5c(%rip), %rsi      # 0x400e
callq 0x242a
movl %r15d, %edi
movq %r14, %rsi
movl %ebx, %edx
movl %ebp, %ecx
callq *0x3b81(%rip)           # 0x6148
movl %eax, %ebp
testl %eax, %eax
js 0x25e5
xorl %eax, %eax
testl $0x643, %ebx            # imm = 0x643
setne %al
leal (%rax,%rax,4), %edi
addl $0x72, %edi
movl %ebp, %esi
callq 0x25f2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: openat64
int
openat64(int fd, const char *p, int f, mode_t m)
{
	int r;
	DP;
	static int (*oopenat64)(int, const char *, int, mode_t) = 0;
	R(openat64);
	r = oopenat64(fd, p, f, m);
	if (r >= 0)
		fdemit(f & wmode ? 'w' : 'r', r);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
leaq 0x3af4(%rip), %rdi      # 0x6150
leaq 0x19b2(%rip), %rsi      # 0x4015
callq 0x242a
movl %r15d, %edi
movq %r14, %rsi
movl %ebx, %edx
movl %ebp, %ecx
callq *0x3ad8(%rip)           # 0x6150
movl %eax, %ebp
testl %eax, %eax
js 0x2696
xorl %eax, %eax
testl $0x643, %ebx            # imm = 0x643
setne %al
leal (%rax,%rax,4), %edi
addl $0x72, %edi
movl %ebp, %esi
callq 0x25f2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: rename
int
rename(const char *p1, const char *p2)
{
	int   r;
	char  b1[PATH_MAX];
	char *rp1 = realpath(p1, b1);
	static int (*orename)(const char *, const char *) = 0;
	D;
	R(rename);
	r = orename(p1, p2);
	if (!r) {
		char  b2[PATH_MAX];
		char *rp2 = realpath(p2, b2);
		emitOp(rp1 ? 'm' : 'M', rp2, rp1);
	}
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1000(%rsp), %rsi
callq 0x2180
movq %rax, %rbx
leaq 0x3a8b(%rip), %rdi      # 0x6158
leaq 0x194a(%rip), %rsi      # 0x401e
callq 0x242a
movq %r15, %rdi
movq %r14, %rsi
callq *0x3a73(%rip)           # 0x6158
movl %eax, %ebp
testl %eax, %eax
jne 0x2710
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2180
xorl %edi, %edi
testq %rbx, %rbx
setne %dil
shll $0x5, %edi
orl $0x4d, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2120
movl %ebp, %eax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: renamex_np
int
renamex_np(const char *p1, const char *p2, unsigned fl)
{
	int   r;
	char  b1[PATH_MAX];
	char *rp1 = realpath(p1, b1);
	static int (*orenamex_np)(const char *, const char *, unsigned) = 0;
	D;
	R(renamex_np);
	r = orenamex_np(p1, p2, fl);
	if (!r) {
		char  b2[PATH_MAX];
		char *rp2 = realpath(p2, b2);
		emitOp(rp1 ? 'm' : 'M', rp2, rp1);
	}
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1000(%rsp), %rsi
callq 0x2180
movq %rax, %rbx
leaq 0x3a14(%rip), %rdi      # 0x6160
leaq 0x18d2(%rip), %rsi      # 0x4025
callq 0x242a
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq *0x39fa(%rip)           # 0x6160
movl %eax, %ebp
testl %eax, %eax
jne 0x2791
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2180
xorl %edi, %edi
testq %rbx, %rbx
setne %dil
shll $0x5, %edi
orl $0x4d, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2120
movl %ebp, %eax
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: renameat2
int
renameat2(int fd1, const char *p1, int fd2, const char *p2, unsigned fl)
{
	int r;
	D;
	static int (*orenameat2)(
	    int, const char *, int, const char *, unsigned) = 0;
	char b[PATH_MAX];
	R(renameat2);
	realpathat(fd1, p1, b, sizeof(b));
	r = orenameat2(fd1, p1, fd2, p2, fl);
	if (!r)
		atemit('m', fd2, p2, b);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %r8d, %r14d
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
leaq 0x39a3(%rip), %rdi      # 0x6168
leaq 0x1864(%rip), %rsi      # 0x4030
callq 0x242a
movq %rsp, %rdx
movl %r12d, %edi
movq %r15, %rsi
callq 0x281f
movl %r12d, %edi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
movl %r14d, %r8d
callq *0x3975(%rip)           # 0x6168
movl %eax, %r14d
testl %eax, %eax
jne 0x280c
movq %rsp, %rcx
movl $0x6d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x28ad
movl %r14d, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: realpathat
static char *
realpathat(int ifd, const char *p, char *ap, size_t sz)
{
	int f;
	int ok;
	int fd;
	int cur = ifd == AT_FDCWD;
	static int (*oopenat)(int, const char *, int, mode_t) = 0;
	R(openat);
	if (cur)
		fd = oopenat(AT_FDCWD, ".", O_RDONLY, 0);
	else
		fd = ifd;
	f = oopenat(fd, p, O_RDONLY, 0);
	ok = fdpath(f, ap, sz);
	close(f);
	if (cur)
		close(fd);
	return ok ? ap : NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
leaq 0x39a2(%rip), %rdi      # 0x61d8
leaq 0x17d1(%rip), %rsi      # 0x400e
callq 0x242a
movl %ebp, %r14d
cmpl $-0x64, %ebp
jne 0x2863
leaq 0x18a5(%rip), %rsi      # 0x40f6
movl $0xffffff9c, %edi       # imm = 0xFFFFFF9C
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x3978(%rip)           # 0x61d8
movl %eax, %r14d
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x3965(%rip)           # 0x61d8
movl %eax, %r12d
movl %eax, %edi
movq %rbx, %rsi
callq 0x2d5f
movl %eax, %r15d
movl %r12d, %edi
callq 0x2150
cmpl $-0x64, %ebp
jne 0x2898
movl %r14d, %edi
callq 0x2150
xorl %eax, %eax
testl %r15d, %r15d
cmoveq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: renameat
int
renameat(int fd1, const char *p1, int fd2, const char *p2)
{
	int r;
	D;
	static int (*orenameat)(int, const char *, int, const char *) = 0;
	char b[PATH_MAX];
	R(renameat);
	realpathat(fd1, p1, b, sizeof(b));
	r = orenameat(fd1, p1, fd2, p2);
	if (!r)
		atemit('m', fd2, p2, b);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %r15d
leaq 0x384c(%rip), %rdi      # 0x6170
leaq 0x170f(%rip), %rsi      # 0x403a
callq 0x242a
movq %rsp, %rdx
movl %r15d, %edi
movq %r14, %rsi
callq 0x281f
movl %r15d, %edi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
callq *0x3821(%rip)           # 0x6170
movl %eax, %r14d
testl %eax, %eax
jne 0x2968
movq %rsp, %rcx
movl $0x6d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x28ad
movl %r14d, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: renameatx_np
int
renameatx_np(int fd1, const char *p1, int fd2, const char *p2, unsigned fl)
{
	int  r;
	char b[PATH_MAX];
	D;
	static int (*orenameatx_np)(
	    int, const char *, int, const char *, unsigned) = 0;
	R(renameatx_np);
	realpathat(fd1, p1, b, sizeof(b));
	r = orenameatx_np(fd1, p1, fd2, p2, fl);
	if (!r)
		atemit('m', fd2, p2, b);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %r8d, %r14d
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
leaq 0x37db(%rip), %rdi      # 0x6178
leaq 0x169f(%rip), %rsi      # 0x4043
callq 0x242a
movq %rsp, %rdx
movl %r12d, %edi
movq %r15, %rsi
callq 0x281f
movl %r12d, %edi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
movl %r14d, %r8d
callq *0x37ad(%rip)           # 0x6178
movl %eax, %r14d
testl %eax, %eax
jne 0x29e4
movq %rsp, %rcx
movl $0x6d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x28ad
movl %r14d, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: unlink
int
unlink(const char *p)
{
	int   r;
	char  b[PATH_MAX];
	char *rp;
	static int (*ounlink)(const char *) = 0;
	DP;
	R(unlink);
	rp = realpath(p, b);
	r = ounlink(p);
	if (!r)
		emitOp('d', rp, 0);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %r14
leaq 0x3774(%rip), %rdi      # 0x6180
leaq 0x163d(%rip), %rsi      # 0x4050
callq 0x242a
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2180
movq %rax, %rbx
movq %r14, %rdi
callq *0x3751(%rip)           # 0x6180
movl %eax, %ebp
testl %eax, %eax
jne 0x2a44
movl $0x64, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2120
movl %ebp, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: unlinkat
int
unlinkat(int fd, const char *p, int f)
{
	int r;
	DP;
	char  b[PATH_MAX];
	char *rp = realpathat(fd, p, b, sizeof(b));
	static int (*ounlinkat)(int, const char *, int);
	R(unlinkat);
	r = ounlinkat(fd, p, f);
	if (!r)
		emitOp(rp ? 'd' : 'D', rp ? rp : p, 0);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movl %edx, %ebp
movq %rsi, %rbx
movl %edi, %r15d
movq %rsp, %rdx
callq 0x281f
movq %rax, %r14
leaq 0x370f(%rip), %rdi      # 0x6188
leaq 0x15d7(%rip), %rsi      # 0x4057
callq 0x242a
movl %r15d, %edi
movq %rbx, %rsi
movl %ebp, %edx
callq *0x36f5(%rip)           # 0x6188
movl %eax, %ebp
testl %eax, %eax
jne 0x2ab6
xorl %edi, %edi
testq %r14, %r14
setne %dil
cmovneq %r14, %rbx
shll $0x5, %edi
orl $0x44, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2120
movl %ebp, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: futimes
int
futimes(int fd, const struct timeval t[2])
{
	int r;
	static int (*ofutimes)(int, const struct timeval[2]);
	D;
	R(futimes);
	r = ofutimes(fd, t);
	if (!r)
		fdemit('t', fd);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
leaq 0x36ba(%rip), %rdi      # 0x6190
leaq 0x1583(%rip), %rsi      # 0x4060
callq 0x242a
movl %ebx, %edi
movq %r14, %rsi
callq *0x36a3(%rip)           # 0x6190
movl %eax, %ebp
testl %eax, %eax
jne 0x2aff
movl $0x74, %edi
movl %ebx, %esi
callq 0x25f2
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: utimes
int
utimes(const char *p, const struct timeval t[2])
{
	int r;
	static int (*outimes)(const char *, const struct timeval[2]);
	DP;
	R(utimes);
	r = outimes(p, t);
	if (!r)
		emit('t', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3681(%rip), %rdi      # 0x6198
leaq 0x1543(%rip), %rsi      # 0x4061
callq 0x242a
movq %rbx, %rdi
movq %r14, %rsi
callq *0x3669(%rip)           # 0x6198
movl %eax, %ebp
testl %eax, %eax
jne 0x2b42
movl $0x74, %edi
movq %rbx, %rsi
callq 0x2380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: _fxstat
int
__fxstat(int v, int fd, struct stat *restrict buf)
{
	int r;
	static int (*o__fxstat)(int, int, struct stat *restrict) = 0;
	D;
	R(__fxstat);
	r = o__fxstat(v, fd, buf);
	if (!r)
		fdemit('q', fd);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movl %edi, %ebp
leaq 0x3645(%rip), %rdi      # 0x61a0
leaq 0x1506(%rip), %rsi      # 0x4068
callq 0x242a
movl %ebp, %edi
movl %ebx, %esi
movq %r14, %rdx
callq *0x362c(%rip)           # 0x61a0
movl %eax, %ebp
testl %eax, %eax
jne 0x2b86
movl $0x71, %edi
movl %ebx, %esi
callq 0x25f2
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: _xstat
int
__xstat(int v, const char *restrict p, struct stat *restrict buf)
{
	int r;
	static int (*o__xstat)(
	    int, const char *restrict, struct stat *restrict) = 0;
	DP;
	R(__xstat);
	r = o__xstat(v, p, buf);
	if (!r)
		emit('q', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3608(%rip), %rdi      # 0x61a8
leaq 0x14ca(%rip), %rsi      # 0x4071
callq 0x242a
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x35ee(%rip)           # 0x61a8
movl %eax, %ebp
testl %eax, %eax
jne 0x2bcd
movl $0x71, %edi
movq %rbx, %rsi
callq 0x2380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: _xlstat
int
__xlstat(int v, const char *restrict p, struct stat *restrict buf)
{
	int r;
	static int (*o__xlstat)(
	    int, const char *restrict, struct stat *restrict) = 0;
	DP;
	R(__xlstat);
	r = o__xlstat(v, p, buf);
	if (!r)
		emit('q', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x35c9(%rip), %rdi      # 0x61b0
leaq 0x148b(%rip), %rsi      # 0x4079
callq 0x242a
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x35af(%rip)           # 0x61b0
movl %eax, %ebp
testl %eax, %eax
jne 0x2c14
movl $0x71, %edi
movq %rbx, %rsi
callq 0x2380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: _lxstat
int
__lxstat(int v, const char *restrict p, struct stat *restrict buf)
{
	int r;
	static int (*o__lxstat)(
	    int, const char *restrict, struct stat *restrict) = 0;
	DP;
	R(__lxstat);
	r = o__lxstat(v, p, buf);
	if (!r)
		emit('q', p);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x358a(%rip), %rdi      # 0x61b8
leaq 0x144d(%rip), %rsi      # 0x4082
callq 0x242a
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x3570(%rip)           # 0x61b8
movl %eax, %ebp
testl %eax, %eax
jne 0x2c5b
movl $0x71, %edi
movq %rbx, %rsi
callq 0x2380
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: _fxstatat
int
__fxstatat(int v, int fd, const char *p, struct stat *buf, int flag)
{
	int r;
	DP;
	static int (*o__fxstatat)(
	    int, int, const char *, struct stat *restrict, int) = 0;
	R(__fxstatat);
	r = o__fxstatat(v, fd, p, buf, flag);
	if (!r)
		atemit('q', fd, p, NULL);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r12d
leaq 0x3541(%rip), %rdi      # 0x61c0
leaq 0x1405(%rip), %rsi      # 0x408b
callq 0x242a
movl %r12d, %edi
movl %ebp, %esi
movq %rbx, %rdx
movq %r15, %rcx
movl %r14d, %r8d
callq *0x3521(%rip)           # 0x61c0
movl %eax, %r14d
testl %eax, %eax
jne 0x2cb7
movl $0x71, %edi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x28ad
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: utimensat
int
utimensat(int fd, const char *p, const struct timespec ts[2], int flags)
{
	int r;
	static int (*outimensat)(
	    int, const char *, const struct timespec[2], int);
	DP;
	R(utimensat);
	r = outimensat(fd, p, ts, flags);
	if (!r)
		atemit('t', fd, p, NULL);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x34ec(%rip), %rdi      # 0x61c8
leaq 0x13b3(%rip), %rsi      # 0x4096
callq 0x242a
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
movl %r14d, %ecx
callq *0x34cf(%rip)           # 0x61c8
movl %eax, %r14d
testl %eax, %eax
jne 0x2d11
movl $0x74, %edi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x28ad
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/unix/fsatraceso.c
// Function: futimens
int
futimens(int fd, const struct timespec ts[2])
{
	int r;
	static int (*ofutimens)(int, const struct timespec[2]);
	D;
	R(futimens);
	r = ofutimens(fd, ts);
	if (!r)
		fdemit('t', fd);
	DD;
	return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
leaq 0x34a1(%rip), %rdi      # 0x61d0
leaq 0x136a(%rip), %rsi      # 0x40a0
callq 0x242a
movl %ebx, %edi
movq %r14, %rsi
callq *0x348a(%rip)           # 0x61d0
movl %eax, %ebp
testl %eax, %eax
jne 0x2d58
movl $0x74, %edi
movl %ebx, %esi
callq 0x25f2
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jacereda[P]fsatrace/src/emit.c
// Function: emitInit
static const char *
mygetenv(const char *v)
{
	const char *out = getenv(v);
	if (!out) {
		extern char **environ;
		size_t	      l = strlen(v);
		char **	      p = environ;
		while (*p) {
			char *s = *p;
			if (0 == strncmp(s, v, l)) {
				if (s[l] == '=') {
					out = s + l + 1;
					break;
				}
			}
			p++;
		}
	}
#ifdef _WIN32
	// Workaround, bash distributed with ghc 8.6.5 seems to discard most
	// environment variables, pass environment variables as the first few
	// PATH components.
	if (!out) {
		const char *path = getenv("PATH");
		if (strcmp(v, ENVOUT) == 0) {
			static char buf[PATH_MAX];
			unsigned    i = 0;
			unsigned    j = 0;
			while (path[i] != ';')
				buf[j++] = path[i++];
			buf[j] = 0;
			out = buf;
		}
	}
#endif
	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x132c(%rip), %rdi      # 0x40f8
callq 0x2030
movq %rax, %rbx
testq %rax, %rax
jne 0x2e3f
movq 0x3200(%rip), %rax      # 0x5fe0
movq (%rax), %r15
movq (%r15), %rbx
testq %rbx, %rbx
je 0x2e1c
addq $0x8, %r15
leaq 0x1302(%rip), %r14      # 0x40f8
movl $0x8, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2060
testl %eax, %eax
jne 0x2e10
cmpb $0x3d, 0x8(%rbx)
je 0x2e3b
movq (%r15), %rbx
addq $0x8, %r15
testq %rbx, %rbx
jne 0x2df6
leaq 0x12de(%rip), %rdi      # 0x4101
leaq 0x12db(%rip), %rsi      # 0x4105
leaq 0x12df(%rip), %rcx      # 0x4110
movl $0x3b, %edx
callq 0x2130
addq $0x9, %rbx
cmpq $0x0, 0x3399(%rip)      # 0x61e0
jne 0x2e64
leaq 0x3390(%rip), %rdi      # 0x61e0
movl $0x1000000, %edx        # imm = 0x1000000
movq %rbx, %rsi
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x2080
leaq 0x12b4(%rip), %rdi      # 0x411f
leaq 0x1293(%rip), %rsi      # 0x4105
leaq 0x1297(%rip), %rcx      # 0x4110
movl $0x3c, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x332d(%rip), %r13      # 0x61e0
testq %r13, %r13
je 0x2fb8
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
callq 0x21a0
cltq
cmpb $0x0, 0x4(%r13,%rax)
je 0x2fb8
leaq 0x124a(%rip), %r14      # 0x4128
testq %r15, %r15
cmovneq %r15, %r14
jne 0x2ef0
movl %ebp, %edi
callq 0x2090
movl %eax, %ebp
leaq 0x104(%r13), %r12
movq %r14, %rdi
callq 0x20d0
movq %rax, %r15
testq %rbx, %rbx
je 0x2f77
movq %rbx, %rdi
callq 0x20d0
leal (%r15,%rax), %ecx
addl $0x4, %ecx
lock
xaddl %ecx, (%r13)
movl %eax, %eax
movq %rax, (%rsp)
movb %bpl, 0x104(%r13,%rcx)
leaq (%r12,%rcx), %rdi
addq $0x2, %rdi
addq %rcx, %r12
movb $0x7c, %bpl
movb %bpl, 0x105(%r13,%rcx)
movl %r15d, %r15d
movq %r14, %rsi
movq %r15, %rdx
callq 0x2190
leaq (%r15,%r12), %r14
addq $0x2, %r14
leaq 0x3(%r15,%r12), %rdi
movb %bpl, -0x1(%rdi)
movq %rbx, %rsi
movq (%rsp), %rbx
movq %rbx, %rdx
callq 0x2190
leaq (%rbx,%r14), %rax
incq %rax
jmp 0x2fb5
movl %r15d, %eax
addl $0x3, %eax
lock
xaddl %eax, (%r13)
movb %bpl, 0x104(%r13,%rax)
leaq (%r12,%rax), %rdi
addq $0x2, %rdi
addq %rax, %r12
movb $0x7c, 0x105(%r13,%rax)
movl %r15d, %ebx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2190
leaq (%rbx,%r12), %rax
addq $0x2, %rax
movb $0xa, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movq %rdi, %rbx
movaps 0x675(%rip), %xmm0      # 0x3300
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x21d0
movl %eax, %ebp
leaq 0x20(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x2140
testl %ebp, %ebp
js 0x2d35
movq %rsp, %rdi
callq 0x2080
leaq 0x20(%rsp), %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
callq 0x20d0
testl %eax, %eax
js 0x2d16
xorl %r15d, %r15d
leaq 0x20(%rsp), %r14
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %r15, %rax
cmpq $0x100000, %rax         # imm = 0x100000
jb 0x2cfd
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2120
xorl %eax, %eax
movq %rax, %r15
incq (%rbx)
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rsi
callq 0x20d0
testl %eax, %eax
jns 0x2ce0
leaq 0x5d9(%rip), %rdi       # 0x32f6
leaq 0x590(%rip), %rsi       # 0x32b4
leaq 0x598(%rip), %rcx       # 0x32c3
movl $0x19, %edx
callq 0x2130
leaq 0x570(%rip), %rdi       # 0x32ac
leaq 0x571(%rip), %rsi       # 0x32b4
leaq 0x579(%rip), %rcx       # 0x32c3
movl $0x14, %edx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O3/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:
cmpq 0x4469(%rip), %rdi      # 0x5ff0
je 0x1be6
cmpq 0x4440(%rip), %rdi      # 0x5fd0
je 0x1bec
cmpq 0x4447(%rip), %rdi      # 0x5fe0
sete %al
cmpq 0x4405(%rip), %rdi      # 0x5fa8
sete %cl
orb %al, %cl
movl $0x4, %eax
jne 0x1be5
pushq %rax
leaq 0x2609(%rip), %rdi      # 0x41c0
callq 0x1060
movq 0x4435(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1240
movq 0x4406(%rip), %rdi      # 0x5fd8
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x1120
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
retq
movl $0x1, %eax
retq
movl $0x8, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movl %edi, %ebp
movslq %esi, %rdi
callq 0x10b0
movq %rax, %rbx
testq %rax, %rax
jne 0x1c37
leaq 0x2534(%rip), %rdi      # 0x4142
movl %ebp, %esi
xorl %eax, %eax
callq 0x1050
movq 0x43da(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1240
movq 0x43ab(%rip), %rdi      # 0x5fd8
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x1120
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
testl %edi, %edi
jne 0x1c63
leaq 0x251a(%rip), %rdi      # 0x4167
xorl %eax, %eax
callq 0x1050
movq 0x439d(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
callq 0x1240
callq 0x1190
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1070
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %ebp
leal (,%r14,4), %r13d
movl %r13d, %esi
callq 0x1bf2
movq %rax, (%r12)
movl %ebp, %edi
movl %r13d, %esi
callq 0x1bf2
movq %rax, %rcx
movq %rax, (%r15)
movl %ebx, %eax
cltd
idivl %r14d
movq (%r12), %r9
movl %eax, (%r9)
movl $0x0, (%rcx)
cmpl $0x2, %r14d
jl 0x1d08
movl %r14d, %r10d
movl (%r9), %edi
leal (%rbx,%rbx), %esi
movl $0x1, %r11d
movl %ebx, %r8d
addl -0x4(%rcx,%r11,4), %edi
movl %edi, (%rcx,%r11,4)
movl %esi, %eax
cltd
idivl %r10d
movl %eax, %edi
movl %r8d, %eax
cltd
idivl %r14d
subl %eax, %edi
movl %edi, (%r9,%r11,4)
leaq 0x1(%r11), %rax
addl %ebx, %r8d
addl %ebx, %esi
movq %rax, %r11
cmpq %rax, %r10
jne 0x1cd9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %r12d
leal (,%rbx,4), %r13d
movl %r13d, %esi
callq 0x1bf2
movq %rax, (%r14)
movl %r12d, %edi
movl %r13d, %esi
callq 0x1bf2
movq %rax, %rcx
movq %rax, (%r15)
leal 0x1(%r12), %eax
imull %ebp, %eax
cltd
idivl %ebx
movl %eax, %esi
imull %r12d, %ebp
movl %ebp, %eax
cltd
idivl %ebx
subl %eax, %esi
movq (%r14), %rax
movl %esi, (%rax)
movl $0x0, (%rcx)
cmpl $0x2, %ebx
jl 0x1d9c
movl %ebx, %edx
movl (%rax), %r8d
movl $0x1, %edi
addl -0x4(%rcx,%rdi,4), %r8d
movl %r8d, (%rcx,%rdi,4)
movl %esi, (%rax,%rdi,4)
incq %rdi
movl %esi, %r8d
cmpq %rdi, %rdx
jne 0x1d85
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, 0x8(%rsp)
movq %rdi, %r13
leaq 0x4(%rsp), %r15
movq %r8, %rdi
movq %r15, %rsi
callq 0x1170
movq %rsp, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1100
movq %rbp, 0x10(%rsp)
movq %rbp, %rdi
callq 0x1b80
movl %eax, %ebp
movl (%rbx), %eax
decl %eax
cmpl %eax, (%r15)
jne 0x2a4e
leaq 0x1755(%rip), %rsi      # 0x4172
movq %r13, %rdi
callq 0x10c0
testq %rax, %rax
je 0x2a44
movq %rax, %r12
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x1160
jmp 0x2a4e
movl $0x0, (%r14)
xorl %r12d, %r12d
movl (%rsp), %ecx
decl %ecx
movq 0x354e(%rip), %rdx      # 0x5fa8
movq 0x3577(%rip), %r8       # 0x5fd8
movq %r14, %rdi
movl $0x1, %esi
callq 0x1180
movl (%r14), %esi
movl 0x4(%rsp), %edi
testl %esi, %esi
je 0x2ad8
imull %ebp, %esi
callq 0x1bf2
movq %rax, %rdi
movq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movl (%rsp), %ecx
decl %ecx
cmpl %ecx, 0x4(%rsp)
jne 0x2ab5
movslq %ebp, %rsi
movslq (%r14), %rdx
movq %r12, %rcx
callq 0x1160
movq %r12, %rdi
callq 0x11c0
movq (%rbx), %rdi
movl (%rsp), %ecx
decl %ecx
movl (%r14), %esi
movq 0x3519(%rip), %r8       # 0x5fd8
movq 0x10(%rsp), %rdx
callq 0x1180
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16b7(%rip), %rsi      # 0x4196
callq 0x1c41
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0xc(%rsp)
testl %edx, %edx
jle 0x2b95
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %eax
movq %rax, 0x10(%rsp)
movl 0xc(%rsp), %ebx
movq 0x34ba(%rip), %rbp      # 0x5fd0
xorl %r12d, %r12d
cmpl $0x0, 0xc(%rsp)
jle 0x2b81
xorl %r13d, %r13d
cmpq %rbp, %r14
je 0x2b52
cmpq 0x34b1(%rip), %r14      # 0x5fe0
je 0x2b5e
cmpq 0x3470(%rip), %r14      # 0x5fa8
jne 0x2b79
movq (%r15,%r12,8), %rax
movl (%rax,%r13,4), %esi
leaq 0x166c(%rip), %rdi      # 0x41b5
xorl %eax, %eax
callq 0x1050
jmp 0x2b79
movq (%r15,%r12,8), %rax
movsd (%rax,%r13,8), %xmm0
jmp 0x2b6b
movq (%r15,%r12,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r13,4), %xmm0
leaq 0x163c(%rip), %rdi      # 0x41ae
movb $0x1, %al
callq 0x1050
incq %r13
cmpq %r13, %rbx
jne 0x2b23
movl $0xa, %edi
callq 0x1090
incq %r12
cmpq 0x10(%rsp), %r12
jne 0x2b19
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testl %edx, %edx
jle 0x2c2d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r13d
movq 0x3409(%rip), %rbp      # 0x5fd0
movq 0x3412(%rip), %r12      # 0x5fe0
xorl %r15d, %r15d
cmpq %rbp, %rbx
je 0x2bf8
cmpq %r12, %rbx
je 0x2c00
cmpq 0x33c6(%rip), %rbx      # 0x5fa8
jne 0x2c17
movl (%r14,%r15,4), %esi
leaq 0x15cb(%rip), %rdi      # 0x41ba
xorl %eax, %eax
callq 0x1050
jmp 0x2c17
movsd (%r14,%r15,8), %xmm0
jmp 0x2c09
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r15,4), %xmm0
leaq 0x159e(%rip), %rdi      # 0x41ae
movb $0x1, %al
callq 0x1050
incq %r15
cmpq %r15, %r13
jne 0x2bd1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movl %ecx, %ebx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq %rsp, %rsi
movq %r8, %rdi
callq 0x1170
leaq 0x4(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1100
movq %r14, %rdi
callq 0x1b80
movl %eax, %ebp
movq %rsp, %r12
movl (%r12), %edi
movl (%r13), %esi
leaq 0x20(%rsp), %rcx
leaq 0x18(%rsp), %r8
movl %ebx, %edx
callq 0x1c72
cmpl $0x0, (%r12)
jne 0x2f17
imull %ebx, %ebp
xorl %edi, %edi
movl %ebp, %esi
callq 0x1bf2
movq %rax, %r12
movq 0x20(%rsp), %rbp
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
testl %r15d, %r15d
jle 0x2fa3
movl %r15d, %r15d
xorl %r13d, %r13d
movq 0x10(%rsp), %rax
movq (%rax,%r13,8), %rdi
movl (%rsp), %ecx
leal 0x1(%rcx), %eax
imull %ebx, %eax
movl 0x4(%rsp), %r8d
cltd
idivl %r8d
movl %eax, %esi
imull %ebx, %ecx
movl %ecx, %eax
cltd
idivl %r8d
subl %eax, %esi
subq $0x8, %rsp
movq %r14, %rdx
movq %r12, %rcx
movq %rbp, %r8
movq 0x10(%rsp), %r9
pushq 0x3067(%rip)            # 0x5fd8
pushq $0x0
pushq %r14
callq 0x1200
addq $0x20, %rsp
cmpl $0x0, (%rsp)
jne 0x2f9b
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2ba4
movl $0xa, %edi
callq 0x1090
incq %r13
cmpq %r13, %r15
jne 0x2f31
movq %rbp, %rdi
callq 0x10f0
movq 0x8(%rsp), %rdi
callq 0x10f0
cmpl $0x0, (%rsp)
jne 0x2fcd
movq %r12, %rdi
callq 0x10f0
movl $0xa, %edi
callq 0x1090
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsp), %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x1170
cmpl $0x0, (%r12)
jne 0x343d
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x2ba4
leaq 0xd86(%rip), %rdi       # 0x41be
callq 0x1060
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/eric-lo[P]3150/8-Synchronization/pthread_race_condition.c
// Function: main
int main(int argc, char *argv[])
{
	pthread_t *tid;		/* the thread identifiers */
	int thread_num;		/* the total number of threads created */
	int *id, i;

	if(argc != 3)
	{
		fprintf(stderr, "usage: %s [max value] [num of threads]\n", argv[0]);
		exit(1);
	}

	if(atoi(argv[1]) < 0)
	{
		fprintf(stderr, "1st argument must be non-negative\n");
		exit(1);
	}

	if(atoi(argv[2]) < 0)
	{
		fprintf(stderr, "Second argument must be > 0\n");
		exit(1);
	}

/* variable initialization */

	srand(time(NULL));
	max = atoi(argv[1]);
	thread_num = atoi(argv[2]);

	printf("Number of threads created = %d\n", thread_num);
	if( (tid = (pthread_t *) malloc(sizeof(pthread_t) * thread_num)) == NULL)
	{
		perror("malloc()");
		exit(1);
	}

	if( (id = (int *) malloc(sizeof(int) * thread_num)) == NULL)
	{
		perror("malloc()");
		exit(1);
	}

/* create the threads */

	for(i = 0; i < thread_num; i++)
	{
		id[i] = i;
		if(pthread_create(&tid[i], NULL, do_your_job, &id[i]) != 0)
		{
			perror("pthread_create");
			exit(0);
		}
	}

/* now wait for the thread to exit */

	for(i = 0; i < thread_num; i++)
		pthread_join(tid[i], NULL);

/* free the memory */


	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x1454
movq 0x8(%rbx), %rdi
callq 0x10b0
testl %eax, %eax
js 0x145c
movq 0x10(%rbx), %rdi
callq 0x10b0
testl %eax, %eax
js 0x1461
xorl %edi, %edi
callq 0x1060
movl %eax, %edi
callq 0x1040
movq 0x8(%rbx), %rdi
callq 0x10b0
movl %eax, 0x2d36(%rip)      # 0x40cc
movq 0x10(%rbx), %rdi
callq 0x10b0
movl %eax, %ebp
leaq 0xd34(%rip), %rdi       # 0x20dc
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
movslq %ebp, %r13
leaq (,%r13,8), %rdi
callq 0x1080
testq %rax, %rax
je 0x1466
movq %rax, %rbx
leaq (,%r13,4), %rdi
callq 0x1080
testq %rax, %rax
je 0x146b
testl %ebp, %ebp
jle 0x143e
movq %rax, %r14
movl %ebp, 0x4(%rsp)
xorl %ebp, %ebp
leaq -0x13b(%rip), %r15      # 0x12bc
movq %rbx, %r12
movl %ebp, (%r14)
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1090
testl %eax, %eax
jne 0x144f
incq %rbp
addq $0x8, %r12
addq $0x4, %r14
cmpq %rbp, %r13
jne 0x13fa
cmpl $0x0, 0x4(%rsp)
jle 0x143e
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
xorl %esi, %esi
callq 0x10e0
incq %r14
cmpq %r14, %r13
jne 0x142b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1147
movq %rbx, %rdi
callq 0x1120
callq 0x11aa
callq 0x1185
callq 0x1170
callq 0x115b
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
callq 0x194b
testq %rax, %rax
je 0x15b1
movq %rax, %rbx
movq %rax, %rdi
callq 0x1a48
testq %rax, %rax
je 0x15ba
movq %rax, %r14
movq %rax, %rdi
callq 0x1a6d
testq %rax, %rax
je 0x1594
movl $0xa, %r15d
movq %rax, %rdi
callq 0x15d0
decq %r15
je 0x1594
movq %r14, %rdi
callq 0x1a91
testq %rax, %rax
jne 0x157a
movq %r14, %rdi
callq 0x1a68
movq %rbx, %rdi
callq 0x1989
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
leaq 0x1b8f(%rip), %rdi      # 0x3147
jmp 0x15c1
leaq 0x1b7c(%rip), %rdi      # 0x313d
callq 0x1040
movl $0x1, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x164d
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x1810
testl %eax, %eax
leaq 0x1ae8(%rip), %r15      # 0x30d5
leaq 0x1ae3(%rip), %r14      # 0x30d7
movq %r14, %rsi
cmoveq %r15, %rsi
leaq 0x1ac7(%rip), %rdi      # 0x30c9
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1816
testl %eax, %eax
cmoveq %r15, %r14
leaq 0x1abf(%rip), %rdi      # 0x30dd
movq %r14, %rsi
xorl %eax, %eax
callq 0x1070
leaq 0x1b34(%rip), %rdi      # 0x3163
callq 0x1040
movq %rbx, %rdi
callq 0x1873
leaq 0x1b2c(%rip), %rdi      # 0x316f
popq %rbx
popq %r14
popq %r15
jmp 0x1040
leaq 0x1b05(%rip), %rdi      # 0x3159
jmp 0x1040
nopl (%rax)