LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_bootfs
int zfs_get_bootfs(char *rpool, char **bootfs) {
	int status;
	char **cmdline;
	char *tok;
	char *line = NULL;

	if (rpool == NULL) {
		cmdline = (char*[]) { ZPOOL_CMD, "list", "-Ho", "bootfs", NULL };
	} else {
		cmdline = (char*[]) { ZPOOL_CMD, "list", "-Ho", "bootfs", rpool, NULL };
	}

	*bootfs = NULL;

	status = executeZpool(1, &line, cmdline);

	if (status != 0) {
		fprintf(stderr, "zpool get returned %d\n", status);
		return status;
	}
	status = 1;

	tok = strtok(line, "\n");
	while (tok != NULL) {
		if (strcmp(tok, "-") != 0) {
			*bootfs = malloc((strlen(tok) + 1) * sizeof(char));
			strcpy(*bootfs, tok);
			status = 0;
			break;
		}
		tok = strtok(NULL, "\n");
	}
	free(line);
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4026c1
leaq -0x60(%rbp), %rdi
leaq 0xd02eb(%rip), %rsi     # 0x4d2998
movl $0x28, %edx
callq 0x401040
leaq -0x60(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x40270e
leaq 0xa1b4f(%rip), %rax     # 0x4a4217
movq %rax, -0x90(%rbp)
leaq 0xa46c3(%rip), %rax     # 0x4a6d99
movq %rax, -0x88(%rbp)
leaq 0xa1ba9(%rip), %rax     # 0x4a428d
movq %rax, -0x80(%rbp)
leaq 0xa1ba2(%rip), %rax     # 0x4a4291
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rdx
movl $0x1, %edi
leaq -0x38(%rbp), %rsi
callq 0x402370
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x40275a
movq $0x4d4708, %rax         # imm = 0x4D4708
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
leaq 0xa1b50(%rip), %rsi     # 0x4a4298
movb $0x0, %al
callq 0x40cd50
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4027f2
movl $0x1, -0x1c(%rbp)
movq -0x38(%rbp), %rdi
leaq 0xa213e(%rip), %rsi     # 0x4a48aa
callq 0x424430
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x4027e3
movq -0x30(%rbp), %rdi
leaq 0xa7543(%rip), %rsi     # 0x4a9cca
callq 0x4010b8
cmpl $0x0, %eax
je 0x4027cd
movq -0x30(%rbp), %rdi
callq 0x4010e0
movq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x421210
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x401020
movl $0x0, -0x1c(%rbp)
jmp 0x4027e3
xorl %eax, %eax
movl %eax, %edi
leaq 0xa20d2(%rip), %rsi     # 0x4a48aa
callq 0x424430
movq %rax, -0x30(%rbp)
jmp 0x402775
movq -0x38(%rbp), %rdi
callq 0x421550
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_list_datasets_with_mp
int zfs_list_datasets_with_mp(char *dataset, char **datasets) {
	int status;
	char *cmdline[] = { ZFS_CMD, "list", "-r", dataset, "-t", "filesystem", "-Ho", "name,mountpoint", NULL };

	*datasets = NULL;

	status = executeZfs(1, datasets, cmdline);

	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xa19f3(%rip), %rax     # 0x4a420a
movq %rax, -0x60(%rbp)
leaq 0xa4577(%rip), %rax     # 0x4a6d99
movq %rax, -0x58(%rbp)
leaq 0xa1a82(%rip), %rax     # 0x4a42af
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xa1a72(%rip), %rax     # 0x4a42b2
movq %rax, -0x40(%rbp)
leaq 0xa19e3(%rip), %rax     # 0x4a422e
movq %rax, -0x38(%rbp)
leaq 0xa1a37(%rip), %rax     # 0x4a428d
movq %rax, -0x30(%rbp)
leaq 0xa1a54(%rip), %rax     # 0x4a42b5
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movl $0x1, %edi
callq 0x402330
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x4028ae
movq $0x4d4708, %rax         # imm = 0x4D4708
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0xa1a1e(%rip), %rsi     # 0x4a42c5
movb $0x0, %al
callq 0x40cd50
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_mount
int zfs_mount(char *what, char *where, char *options) {
	char **cmdline;

	if (options == NULL) {
		cmdline = (char*[]) { MOUNT_CMD, "-t", "zfs", what, where, NULL };
	} else {
		cmdline = (char*[]) { MOUNT_CMD, "-t", "zfs", "-o", options, what, where, NULL };
	}

	return executeMount(0, NULL, cmdline);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x402bb1
leaq 0xa16b1(%rip), %rax     # 0x4a4226
movq %rax, -0x50(%rbp)
leaq 0xa1732(%rip), %rax     # 0x4a42b2
movq %rax, -0x48(%rbp)
leaq 0xa167f(%rip), %rax     # 0x4a420a
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x402c0e
leaq 0xa166e(%rip), %rax     # 0x4a4226
movq %rax, -0x90(%rbp)
leaq 0xa16ec(%rip), %rax     # 0x4a42b2
movq %rax, -0x88(%rbp)
leaq 0xa1636(%rip), %rax     # 0x4a420a
movq %rax, -0x80(%rbp)
leaq 0xa146a(%rip), %rax     # 0x4a4049
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x4023b0
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_mountpoint
int zfs_get_mountpoint(char *dataset, char **mountpoint) {
	int status;
	char *cmdline[] = { ZFS_CMD, "get", "-Ho", "value", "mountpoint", dataset, NULL };

	status = executeZfs(1, mountpoint, cmdline);
	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}
	if (*mountpoint != NULL) {
		(*mountpoint)[strlen(*mountpoint) - 1] = '\0';
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xa15c3(%rip), %rax     # 0x4a420a
movq %rax, -0x50(%rbp)
leaq 0xa1634(%rip), %rax     # 0x4a4286
movq %rax, -0x48(%rbp)
leaq 0xa1630(%rip), %rax     # 0x4a428d
movq %rax, -0x40(%rbp)
leaq 0xa1679(%rip), %rax     # 0x4a42e1
movq %rax, -0x38(%rbp)
leaq 0xa1647(%rip), %rax     # 0x4a42ba
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl $0x1, %edi
callq 0x402330
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x402cbd
movq $0x4d4708, %rax         # imm = 0x4D4708
movq (%rax), %rdi
movl -0x14(%rbp), %edx
leaq 0xa160f(%rip), %rsi     # 0x4a42c5
movb $0x0, %al
callq 0x40cd50
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x402ced
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4010e0
movq %rax, %rcx
movq -0x58(%rbp), %rax
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_clone_snap
int zfs_clone_snap(char *snapshot, char *datasetTarget, char *mountpoint) {
	int status;
	char **cmdline;
	char *mountpointParam;

	mountpointParam = malloc((strlen("org.zol:mountpoint=") + strlen(mountpoint) + 1) * sizeof(char));
	strcpy(mountpointParam, "org.zol:mountpoint=");
	strcat(mountpointParam, mountpoint);

	cmdline = (char*[]) { ZFS_CMD, "clone",
		"-o", "canmount=noauto",
		"-o", "mountpoint=none",
		"-o", mountpointParam, snapshot, datasetTarget, NULL };

	status = executeZfs(0, NULL, cmdline);
	free(mountpointParam);
	if (status != 0) {
		fprintf(stderr, "zfs returned %d\n", status);
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4010e0
movq %rax, %rdi
addq $0x13, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x421210
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0xa15a4(%rip), %rsi     # 0x4a42e7
callq 0x401020
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x401058
leaq 0xa14ae(%rip), %rax     # 0x4a420a
movq %rax, -0x88(%rbp)
leaq 0xa1591(%rip), %rax     # 0x4a42fb
movq %rax, -0x80(%rbp)
leaq 0xa12d4(%rip), %rax     # 0x4a4049
movq %rax, -0x78(%rbp)
leaq 0xa1581(%rip), %rax     # 0x4a4301
movq %rax, -0x70(%rbp)
leaq 0xa12be(%rip), %rax     # 0x4a4049
movq %rax, -0x68(%rbp)
leaq 0xa157b(%rip), %rax     # 0x4a4311
movq %rax, -0x60(%rbp)
leaq 0xa12a8(%rip), %rax     # 0x4a4049
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x402330
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x421550
cmpl $0x0, -0x1c(%rbp)
je 0x402e0c
movq $0x4d4708, %rax         # imm = 0x4D4708
movq (%rax), %rdi
movl -0x1c(%rbp), %edx
leaq 0xa14c0(%rip), %rsi     # 0x4a42c5
movb $0x0, %al
callq 0x40cd50
movl -0x1c(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dasJ[P]sd-zfs/src/zfs-util.c
// Function: zfs_get_alt_mp
int zfs_get_alt_mp(char *dataset, char **mountpoint) {
	int status;
	char *cmdline[] = { ZFS_CMD, "get", "-Ho", "value", "org.zol:mountpoint", dataset, NULL };

	status = executeZfs(1, mountpoint, cmdline);
	if (*mountpoint != NULL) {
		(*mountpoint)[strlen(*mountpoint) - 1] = '\0';
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xa13d3(%rip), %rax     # 0x4a420a
movq %rax, -0x50(%rbp)
leaq 0xa1444(%rip), %rax     # 0x4a4286
movq %rax, -0x48(%rbp)
leaq 0xa1440(%rip), %rax     # 0x4a428d
movq %rax, -0x40(%rbp)
leaq 0xa1489(%rip), %rax     # 0x4a42e1
movq %rax, -0x38(%rbp)
leaq 0xa14be(%rip), %rax     # 0x4a4321
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl $0x1, %edi
callq 0x402330
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x402ebc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4010e0
movq %rax, %rcx
movq -0x58(%rbp), %rax
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/evanwire[P]GitClone/server.c
// Function: readFile
char* readFile(char* fileName){
  //Finding file's size
  struct stat st;
  stat(fileName, &st);
  int size = st.st_size;

  char* file_contents = malloc(size * sizeof(char));
  if(!file_contents){
    printf("\nError: was unable to use malloc(). Please try again.\n");
    exit(1);
  }
  memset(file_contents, 0, size);

  int file_fd = open(fileName, O_RDONLY);

  int bytes_read = read(file_fd, file_contents, size);
  file_contents[bytes_read] = '\0';
  close(file_fd);
  return file_contents;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x1150
movq -0x68(%rbp), %rax
movl %eax, -0x9c(%rbp)
movslq -0x9c(%rbp), %rdi
shlq $0x0, %rdi
callq 0x11e0
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x4d12
leaq 0x7da(%rip), %rdi       # 0x54db
movb $0x0, %al
callq 0x1040
movl $0x1, %edi
callq 0x11b0
movq -0xa8(%rbp), %rdi
movslq -0x9c(%rbp), %rdx
xorl %esi, %esi
callq 0x10e0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x1100
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %edi
movq -0xa8(%rbp), %rsi
movslq -0x9c(%rbp), %rdx
callq 0x1200
movl %eax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
movslq -0xb0(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0xac(%rbp), %edi
callq 0x12b0
movq -0xa8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/evanwire[P]GitClone/server.c
// Function: hashIt
char* hashIt(char* input){
  unsigned char digest[MD5_DIGEST_LENGTH];
  MD5(input, strlen(input), digest);
  int i;
  char * result=(char*)malloc(33*sizeof(char));
  memset(result,'\0',33);
  for(i = 0; i < MD5_DIGEST_LENGTH; i++){
     sprintf(result+2*i, "%02x", digest[i]);
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10c0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
leaq -0x20(%rbp), %rdx
callq 0x1240
movl $0x21, %edi
callq 0x11e0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x21, %edx
callq 0x10e0
movl $0x0, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jge 0x4e18
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
movslq -0x24(%rbp), %rax
movzbl -0x20(%rbp,%rax), %edx
leaq 0x6d0(%rip), %rsi       # 0x54d6
movb $0x0, %al
callq 0x1070
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4de2
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/bin2tap/bin2tap.c
// Function: str2int
int str2int (char *str, int *num) {
	int i=0;

	*num = 0;
	while (str[i] != 0) {
		if (str[i] <= '9' && str[i] >= '0') {
			*num *= 10;
			*num += str[i++] - '0';
		}
		else 
			return 1;
	}
	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x18(%rsp), %rax
movl $0x0, (%rax)
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1293
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jg 0x1287
movq -0x10(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x1287
movq -0x18(%rsp), %rax
imull $0xa, (%rax), %ecx
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movl -0x1c(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rsp)
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
subl $0x30, %ecx
movq -0x18(%rsp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x1291
movl $0x1, -0x4(%rsp)
jmp 0x129b
jmp 0x121d
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/bin2tap/bin2tap.c
// Function: l_copy
void l_copy (char* tap, char* loader, int* tap_index, int* checksum, int len) {
	int i;
	for (i = 0; i < len; i++) {
/*		*(checksum) ^= *(tap+(*tap_index)) = *(loader++);
		*tap_index = *tap_index + 1; */
		*(checksum) ^= tap[(*tap_index)++] = *(loader++);
	}
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movl %r8d, -0x24(%rsp)
movl $0x0, -0x28(%rsp)
movl -0x28(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x1350
movq -0x10(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rsp)
movb (%rax), %al
movq -0x8(%rsp), %rcx
movq -0x18(%rsp), %rsi
movl (%rsi), %edx
movl %edx, %edi
addl $0x1, %edi
movl %edi, (%rsi)
movslq %edx, %rdx
movb %al, (%rcx,%rdx)
movsbl %al, %ecx
movq -0x20(%rsp), %rax
xorl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rsp)
jmp 0x1301
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: next_pow2
static size_t CONSTEXPR next_pow2(size_t n)
{
    // I don't see why we would even try. Maybe a stacktrace will help.
    assertume(n != 0);

    // In binary, top is equal to 10000...0:  A 1 right-padded by as many zeros
    // as needed to fill up a size_t.
    size_t top = (~(size_t)0 >> 1) + 1;

    // If when we round up we will overflow our size_t, avoid rounding up and
    // exit early.
    if(unlikely(n >= top))
        return n;

    // Since we don't have to worry about overflow anymore, we can just use
    // the algorithm documented at:
    //   http://bits.stephan-brumme.com/roundUpToNextPowerOfTwo.html
    // It's my favorite due to being branch-free (the loop will be unrolled),
    // and portable. However, on x86, it will be faster to use the BSR (bit-scan
    // reverse) instruction. Since this isn't straight C, it has been omitted,
    // but may be best for your platform.
    //
    // clang 3.0 is smart enough to turn this code into a bsr. gcc 4.6 isn't. I
    // haven't tested higher versions.
    n--;

    for(size_t shift = 1; shift < (sizeof n)*8; shift <<= 1)
        n |= n >> shift;

    n++;

    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1565
jmp 0x1584
leaq 0x3bd5(%rip), %rdi      # 0x5141
leaq 0x3aec(%rip), %rsi      # 0x505f
movl $0x1be, %edx            # imm = 0x1BE
leaq 0x3bc9(%rip), %rcx      # 0x5148
callq 0x1080
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x15b4
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1603
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq $0x1, -0x20(%rbp)
cmpq $0x40, -0x20(%rbp)
jae 0x15ef
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
shrq %cl, %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
shlq %rax
movq %rax, -0x20(%rbp)
jmp 0x15c8
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_producer_new
pipe_producer_t* pipe_producer_new(pipe_t* p)
{
    mutex_lock(&p->begin_lock);
        p->producer_refcount++;
    mutex_unlock(&p->begin_lock);

    return (pipe_producer_t*)p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x1160
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x10e0
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_consumer_new
pipe_consumer_t* pipe_consumer_new(pipe_t* p)
{
    mutex_lock(&p->end_lock);
        p->consumer_refcount++;
    mutex_unlock(&p->end_lock);

    return (pipe_consumer_t*)p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x1160
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x10e0
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_free
void pipe_free(pipe_t* p)
{
    size_t new_producer_refcount,
           new_consumer_refcount;

    mutex_lock(&p->begin_lock);
        assertume(p->producer_refcount > 0);
        new_producer_refcount = --p->producer_refcount;
    mutex_unlock(&p->begin_lock);

    mutex_lock(&p->end_lock);
        assertume(p->consumer_refcount > 0);
        new_consumer_refcount = --p->consumer_refcount;
    mutex_unlock(&p->end_lock);

    if(unlikely(new_consumer_refcount == 0))
    {
        p->buffer = (free(p->buffer), NULL);

        if(likely(new_producer_refcount > 0))
            cond_broadcast(&p->just_popped);
        else
            deallocate(p);
    }
    else if(unlikely(new_producer_refcount == 0))
        cond_broadcast(&p->just_pushed);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x1160
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jbe 0x19d6
jmp 0x19f5
leaq 0x36aa(%rip), %rdi      # 0x5087
leaq 0x367b(%rip), %rsi      # 0x505f
movl $0x27c, %edx            # imm = 0x27C
leaq 0x36b0(%rip), %rcx      # 0x50a0
callq 0x1080
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rcx)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x10e0
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x1160
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jbe 0x1a30
jmp 0x1a4f
leaq 0x3682(%rip), %rdi      # 0x50b9
leaq 0x3621(%rip), %rsi      # 0x505f
movl $0x281, %edx            # imm = 0x281
leaq 0x3656(%rip), %rcx      # 0x50a0
callq 0x1080
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x40(%rcx)
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x10e0
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1ad4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpq $0x0, -0x10(%rbp)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1ac9
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x1040
jmp 0x1ad2
movq -0x8(%rbp), %rdi
callq 0x1b10
jmp 0x1afb
cmpq $0x0, -0x10(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1af9
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
callq 0x1040
jmp 0x1afb
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: deallocate
static void deallocate(pipe_t* p)
{
    assertume(p->producer_refcount == 0);
    assertume(p->consumer_refcount == 0);

    mutex_destroy(&p->begin_lock);
    mutex_destroy(&p->end_lock);

    cond_destroy(&p->just_pushed);
    cond_destroy(&p->just_popped);

    free(p->buffer);
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x1b29
jmp 0x1b48
leaq 0x37e4(%rip), %rdi      # 0x5314
leaq 0x3528(%rip), %rsi      # 0x505f
movl $0x269, %edx            # imm = 0x269
leaq 0x37eb(%rip), %rcx      # 0x532e
callq 0x1080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x1b55
jmp 0x1b74
leaq 0x3605(%rip), %rdi      # 0x5161
leaq 0x34fc(%rip), %rsi      # 0x505f
movl $0x26a, %edx            # imm = 0x26A
leaq 0x37bf(%rip), %rcx      # 0x532e
callq 0x1080
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x1070
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
callq 0x1070
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
callq 0x1110
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x1110
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x8(%rbp), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_producer_free
void pipe_producer_free(pipe_producer_t* handle)
{
    pipe_t* p = PIPIFY(handle);
    size_t new_producer_refcount;

    mutex_lock(&p->begin_lock);
        assertume(p->producer_refcount > 0);
        new_producer_refcount = --p->producer_refcount;
    mutex_unlock(&p->begin_lock);

    if(unlikely(new_producer_refcount == 0))
    {
        size_t consumer_refcount;

        mutex_lock(&p->end_lock);
            consumer_refcount = p->consumer_refcount;
        mutex_unlock(&p->end_lock);

        // If there are still consumers, wake them up if they're waiting on
        // input from a producer. Otherwise, since we're the last handle
        // altogether, we can free the pipe.
        if(likely(consumer_refcount > 0))
            cond_broadcast(&p->just_pushed);
        else
            deallocate(p);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x1160
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jbe 0x1bfe
jmp 0x1c1d
leaq 0x3482(%rip), %rdi      # 0x5087
leaq 0x3453(%rip), %rsi      # 0x505f
movl $0x298, %edx            # imm = 0x298
leaq 0x34ba(%rip), %rcx      # 0x50d2
callq 0x1080
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x38(%rcx)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x10e0
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1caf
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x1160
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x10e0
cmpq $0x0, -0x20(%rbp)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1ca4
movq -0x10(%rbp), %rdi
addq $0x98, %rdi
callq 0x1040
jmp 0x1cad
movq -0x10(%rbp), %rdi
callq 0x1b10
jmp 0x1caf
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_consumer_free
void pipe_consumer_free(pipe_consumer_t* handle)
{
    pipe_t* p = PIPIFY(handle);
    size_t new_consumer_refcount;

    mutex_lock(&p->end_lock);
        new_consumer_refcount = --p->consumer_refcount;
    mutex_unlock(&p->end_lock);

    if(unlikely(new_consumer_refcount == 0))
    {
        size_t producer_refcount;

        mutex_lock(&p->begin_lock);
            producer_refcount = p->producer_refcount;
        mutex_unlock(&p->begin_lock);

        // If there are still producers, wake them up if they're waiting on
        // room to free up from a consumer. Otherwise, since we're the last
        // handle altogether, we can free the pipe.
        if(likely(producer_refcount > 0))
            cond_broadcast(&p->just_popped);
        else
            deallocate(p);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x1160
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x40(%rcx)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
callq 0x10e0
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1d73
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x1160
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0x10e0
cmpq $0x0, -0x20(%rbp)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1d68
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
callq 0x1040
jmp 0x1d71
movq -0x10(%rbp), %rdi
callq 0x1b10
jmp 0x1d73
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: wait_for_room
static inline snapshot_t wait_for_room(pipe_t* p, size_t* max_cap)
{
    snapshot_t s = make_snapshot(p);

    size_t bytes_used = bytes_in_use(s);

    size_t consumer_refcount = p->consumer_refcount;

    size_t elem_size = __pipe_elem_size(p);

    *max_cap = p->max_cap;

    for(; unlikely(bytes_used + elem_size >= *max_cap) && likely(consumer_refcount > 0);
          s                 = make_snapshot(p),
          bytes_used        = bytes_in_use(s),
          consumer_refcount = p->consumer_refcount,
          *max_cap          = p->max_cap)
        cond_wait(&p->just_popped, &p->end_lock);

    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rsi
callq 0x29a0
movq -0x58(%rbp), %rdi
movq 0x20(%rdi), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x61(%rbp)
je 0x20c7
cmpq $0x0, -0x20(%rbp)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
setne %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x20d0
jmp 0x214d
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
movq -0x8(%rbp), %rsi
addq $0x70, %rsi
callq 0x1050
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x29a0
movq -0x58(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x28, %edx
callq 0x10c0
movq -0x58(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2085
movq -0x60(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: validate_size
static inline snapshot_t validate_size(pipe_t* p,
                                       snapshot_t s,
                                       size_t new_bytes)
{
    size_t elem_size    = __pipe_elem_size(p),
           cap          = capacity(s),
           bytes_needed = bytes_in_use(s) + new_bytes;

    if(unlikely(bytes_needed > cap))
    {
        // upgrade our lock, then re-check. By taking both locks (end and begin)
        // in order, we have an equivalent operation to lock_pipe().
        { mutex_lock(&p->begin_lock);

            s            = make_snapshot(p);
            bytes_needed = bytes_in_use(s) + new_bytes;
            size_t elems_needed = bytes_needed / elem_size;

            if(likely(bytes_needed > cap))
                s = resize_buffer(p, next_pow2(elems_needed)*elem_size);
        }

        // Unlock the pipe if requested.
        mutex_unlock(&p->begin_lock);
    }

    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, -0x90(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movq -0x88(%rbp), %rcx
movq %rax, -0x18(%rbp)
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2490
movq -0x88(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x22e1
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x1160
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x29a0
movq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x28, %edx
callq 0x10c0
movq -0x88(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
addq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x18(%rbp)
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x22d4
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1550
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
imulq -0x18(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x2a10
movq -0x88(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x28, %edx
callq 0x10c0
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
callq 0x10e0
movq -0x88(%rbp), %rsi
movq -0x98(%rbp), %rdi
movl $0x28, %edx
callq 0x10c0
movq -0x90(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: bytes_in_use
static inline size_t bytes_in_use(snapshot_t s)
{
    return (wraps_around(s)
    //         v   right half   v   v     left half    v
            ? ((s.end - s.buffer) + (s.bufend - s.begin))
            : (s.end - s.begin))
        // exclude the sentinel element.
        - s.elem_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rcx
movq %rcx, -0x8(%rbp)
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2c30
testb $0x1, %al
jne 0x24e4
jmp 0x2506
movq -0x8(%rbp), %rdx
movq 0x18(%rdx), %rax
movq (%rdx), %rcx
subq %rcx, %rax
movq 0x8(%rdx), %rcx
movq 0x10(%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x2519
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
subq 0x20(%rcx), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_pop
size_t pipe_pop(pipe_consumer_t* p, void* target, size_t count)
{
    size_t elem_size = __pipe_elem_size(PIPIFY(p));

    size_t bytes_left  = count*elem_size;
    size_t bytes_popped = 0;
    size_t ret = -1;

    do {
        ret = __pipe_pop(PIPIFY(p), target, bytes_left);
        target = (void*)((char*)target + ret);
        bytes_popped += ret;
        bytes_left   -= ret;
    } while(ret != 0 && bytes_left);

    return bytes_popped / elem_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
imulq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $-0x1, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2630
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x39(%rbp)
je 0x2611
cmpq $0x0, -0x28(%rbp)
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x25be
movq -0x30(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: pipe_reserve
void pipe_reserve(pipe_generic_t* gen, size_t count)
{
    pipe_t* p = PIPIFY(gen);

    count *= __pipe_elem_size(p); // now `count' is in "bytes" instead of "elements".

    if(count == 0)
        count = DEFAULT_MINCAP;

    size_t max_cap = p->max_cap;

    WHILE_LOCKED(
        if(unlikely(count <= bytes_in_use(make_snapshot(p))))
            break;

        p->min_cap = min(count, max_cap);
        resize_buffer(p, count);
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1290
imulq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x28ac
movq $0x20, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2960
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x29a0
movq -0x28(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x48(%rbp), %xmm0
movups -0x38(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
setbe %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2911
jmp 0x294a
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x2925
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x292d
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x2a10
movq -0x18(%rbp), %rdi
callq 0x2bf0
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: make_snapshot
static inline snapshot_t make_snapshot(pipe_t* p)
{
    return (snapshot_t) {
        .buffer = p->buffer,
        .bufend = p->bufend,
        .begin  = p->begin,
        .end    = p->end,
        .elem_size = __pipe_elem_size(p),
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, %rax
movq %rax, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rdi)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rdi)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rdi)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rdi)
movq -0x8(%rbp), %rdi
callq 0x1290
movq -0x18(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rdi)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: resize_buffer
static snapshot_t resize_buffer(pipe_t* p, size_t new_size)
{
    check_invariants(p);

    const size_t max_cap   = p->max_cap,
                 min_cap   = p->min_cap,
                 elem_size = __pipe_elem_size(p);

    assertume(new_size >= bytes_in_use(make_snapshot(p)));
    assertume(new_size + elem_size > new_size); // overflow
    new_size += elem_size; // include sentinel

    if(unlikely(new_size >= max_cap))
        new_size = max_cap;

    if(new_size <= min_cap)
        return make_snapshot(p);

    char* new_buf = malloc(new_size);
    p->end = copy_pipe_into_new_buf(make_snapshot(p), new_buf);

    p->begin  =
    p->buffer = (free(p->buffer), new_buf);

    p->bufend = new_buf + new_size;

    check_invariants(p);

    return make_snapshot(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, -0x90(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1610
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1290
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x29a0
movq -0x30(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x50(%rbp), %xmm0
movups -0x40(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jb 0x2aa7
jmp 0x2ac6
leaq 0x2997(%rip), %rdi      # 0x5445
leaq 0x25aa(%rip), %rsi      # 0x505f
movl $0x2e9, %edx            # imm = 0x2E9
leaq 0x29af(%rip), %rcx      # 0x5470
callq 0x1080
movq -0x10(%rbp), %rax
addq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x2ad6
jmp 0x2af5
leaq 0x29be(%rip), %rdi      # 0x549b
leaq 0x257b(%rip), %rsi      # 0x505f
movl $0x2ea, %edx            # imm = 0x2EA
leaq 0x2980(%rip), %rcx      # 0x5470
callq 0x1080
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2b21
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x2b40
movq -0x98(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x29a0
jmp 0x2bd2
movq -0x10(%rbp), %rdi
callq 0x10f0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x29a0
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x80(%rbp), %xmm0
movups -0x70(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x3180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1030
movq -0x58(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x58(%rbp), %rcx
addq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x1610
movq -0x98(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x29a0
movq -0x90(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: wrap_ptr_if_necessary
static inline char* wrap_ptr_if_necessary(char* buffer,
                                          char* p,
                                          char* bufend)
{
    if(p >= bufend) {
        size_t diff = p - bufend;
        return buffer + diff;
    } else {
        return p;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x2cd7
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2cdf
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: wait_for_elements
static inline snapshot_t wait_for_elements(pipe_t* p)
{
    snapshot_t s = make_snapshot(p);

    size_t bytes_used = bytes_in_use(s);

    for(; unlikely(bytes_used == 0) && likely(p->producer_refcount > 0);
          s = make_snapshot(p),
          bytes_used = bytes_in_use(s))
        cond_wait(&p->just_pushed, &p->begin_lock);

    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
callq 0x29a0
movq -0x40(%rbp), %rdi
movq 0x20(%rdi), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x49(%rbp)
je 0x2d75
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x2d7e
jmp 0x2de0
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x8(%rbp), %rsi
addq $0x48, %rsi
callq 0x1050
movq -0x8(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x29a0
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x28, %edx
callq 0x10c0
movq -0x40(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x10(%rbp)
jmp 0x2d39
movq -0x48(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: rev_wrap_ptr_if_necessary
static inline char* rev_wrap_ptr_if_necessary(char* buffer,
                                              char* p,
                                              char* bufend)
{
    if(p < buffer) {
        size_t diff = buffer - p;
        return bufend - diff;
    } else {
        return p;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x316c
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x3174
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: copy_pipe_into_new_buf
static inline char* copy_pipe_into_new_buf(snapshot_t s,
                                           char* restrict buf)
{
    if(wraps_around(s))
    {
        buf = offset_memcpy(buf, s.begin, s.bufend - s.begin);
        buf = offset_memcpy(buf, s.buffer, s.end - s.buffer);
    }
    else
    {
        buf = offset_memcpy(buf, s.begin, s.end - s.begin);
    }

    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq %rdi, -0x8(%rbp)
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2c30
testb $0x1, %al
jne 0x31b8
jmp 0x31fb
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq 0x10(%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rax
subq %rax, %rdx
callq 0x2c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq (%rax), %rsi
movq 0x18(%rax), %rdx
movq (%rax), %rax
subq %rax, %rdx
callq 0x2c60
movq %rax, -0x8(%rbp)
jmp 0x321b
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq 0x10(%rax), %rax
subq %rax, %rdx
callq 0x2c60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: pipe_run_test_suite
void pipe_run_test_suite(void)
{
    RUN_TEST(basic_storage);
    RUN_TEST(pipeline_multiplier);
    RUN_TEST(parallel_multiplier);
    RUN_TEST(issue_4);
    RUN_TEST(issue_5);
    RUN_TEST(issue_6_a);
    RUN_TEST(issue_6_b);
    RUN_TEST(issue_6_c);
/*
#ifdef PIPE_DEBUG
    RUN_TEST(clobbering);
#endif
*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
jmp 0x3236
leaq 0x227e(%rip), %rdi      # 0x54bb
leaq 0x227d(%rip), %rsi      # 0x54c1
movb $0x0, %al
callq 0x1060
callq 0x3390
leaq 0x2278(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x3260
leaq 0x2254(%rip), %rdi      # 0x54bb
leaq 0x226c(%rip), %rsi      # 0x54da
movb $0x0, %al
callq 0x1060
callq 0x3590
leaq 0x224e(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x328a
leaq 0x222a(%rip), %rdi      # 0x54bb
leaq 0x2256(%rip), %rsi      # 0x54ee
movb $0x0, %al
callq 0x1060
callq 0x38b0
leaq 0x2224(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x32b4
leaq 0x2200(%rip), %rdi      # 0x54bb
leaq 0x2240(%rip), %rsi      # 0x5502
movb $0x0, %al
callq 0x1060
callq 0x3960
leaq 0x21fa(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x32de
leaq 0x21d6(%rip), %rdi      # 0x54bb
leaq 0x221e(%rip), %rsi      # 0x550a
movb $0x0, %al
callq 0x1060
callq 0x3a50
leaq 0x21d0(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x3308
leaq 0x21ac(%rip), %rdi      # 0x54bb
leaq 0x21fc(%rip), %rsi      # 0x5512
movb $0x0, %al
callq 0x1060
callq 0x3ba0
leaq 0x21a6(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x3332
leaq 0x2182(%rip), %rdi      # 0x54bb
leaq 0x21dc(%rip), %rsi      # 0x551c
movb $0x0, %al
callq 0x1060
callq 0x3cf0
leaq 0x217c(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
jmp 0x335c
leaq 0x2158(%rip), %rdi      # 0x54bb
leaq 0x21bc(%rip), %rsi      # 0x5526
movb $0x0, %al
callq 0x1060
callq 0x3e40
leaq 0x2152(%rip), %rdi      # 0x54cf
movb $0x0, %al
callq 0x1060
popq %rbp
retq
nopw %cs:(%rax,%rax)