LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/xpack.c
// Function: stat_file
static int
stat_file(struct file_stream *in, struct stat *stbuf, bool allow_hard_links)
{
	if (fstat(in->fd, stbuf) != 0) {
		msg("%"TS": unable to stat file", in->name);
		return -1;
	}

	if (!S_ISREG(stbuf->st_mode) && !in->is_standard_stream) {
		msg("%"TS" is %s -- skipping",
		    in->name, S_ISDIR(stbuf->st_mode) ? "a directory" :
							"not a regular file");
		return -2;
	}

	if (stbuf->st_nlink > 1 && !allow_hard_links) {
		msg("%"TS" has multiple hard links -- skipping "
		    "(use -f to process anyway)", in->name);
		return -2;
	}

	return 0;
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %edi
movq 0x10(%rsp), %rsi
callq 0x11c0
cmpl $0x0, %eax
je 0x1f90
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xe655(%rip), %rdi      # 0x105d1
movb $0x0, %al
callq 0x2660
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x2032
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x1ff6
movq 0x18(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x1ff6
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %ecx
andl $0xf000, %ecx           # imm = 0xF000
leaq 0xe63d(%rip), %rdx      # 0x1060a
leaq 0xe62a(%rip), %rax      # 0x105fe
cmpl $0x4000, %ecx           # imm = 0x4000
cmoveq %rax, %rdx
leaq 0xe604(%rip), %rdi      # 0x105e9
movb $0x0, %al
callq 0x2660
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0x2032
movq 0x10(%rsp), %rax
cmpq $0x1, 0x10(%rax)
jbe 0x202a
testb $0x1, 0xf(%rsp)
jne 0x202a
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xe604(%rip), %rdi      # 0x1061d
movb $0x0, %al
callq 0x2660
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0x2032
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/xpack.c
// Function: restore_timestamps
static void
restore_timestamps(struct file_stream *out, const tchar *newpath,
		   const struct stat *stbuf)
{
	int ret;
#if defined(HAVE_FUTIMENS)
	struct timespec times[2] = {
		stbuf->st_atim, stbuf->st_mtim,
	};
	ret = futimens(out->fd, times);
#elif defined(HAVE_FUTIMES)
	struct timeval times[2] = {
		{ stbuf->st_atim.tv_sec, stbuf->st_atim.tv_nsec / 1000, },
		{ stbuf->st_mtim.tv_sec, stbuf->st_mtim.tv_nsec / 1000, },
	};
	ret = futimes(out->fd, times);
#else /* HAVE_FUTIMES */
	struct tutimbuf times = {
		stbuf->st_atime, stbuf->st_mtime,
	};
	ret = tutime(newpath, &times);
#endif /* !HAVE_FUTIMES */
	if (ret != 0)
		msg_errno("%"TS": unable to preserve timestamps", out->name);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1030
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
je 0x2430
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xe2b6(%rip), %rdi      # 0x106df
movb $0x0, %al
callq 0x27e0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/xpack.c
// Function: write_file_header
static int
write_file_header(struct file_stream *out, u32 chunk_size, int compression_level)
{
	struct xpack_file_header hdr;

	memcpy(hdr.magic, XPACK_MAGIC, sizeof(hdr.magic));
	hdr.chunk_size = chunk_size;
	hdr.header_size = sizeof(hdr);
	hdr.version = 1;
	hdr.compression_level = compression_level;

	bswap_file_header(&hdr);
	return full_write(out, &hdr, sizeof(hdr));
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movq 0xdc88(%rip), %rax      # 0x10110
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
movw $0x10, 0x14(%rsp)
movb $0x1, 0x16(%rsp)
movl 0x18(%rsp), %eax
movb %al, 0x17(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2040
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
callq 0x2ef0
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/xpack.c
// Function: do_compress
static int
do_compress(struct xpack_compressor *compressor, struct file_stream *in,
	    struct file_stream *out, u32 chunk_size)
{
	void *original_buf = xmalloc(chunk_size);
	void *compressed_buf = xmalloc(chunk_size - 1);
	ssize_t ret = -1;

	if (original_buf == NULL || compressed_buf == NULL)
		goto out;

	while ((ret = xread(in, original_buf, chunk_size)) > 0) {
		u32 original_size = ret;
		u32 compressed_size;
		void *stored_buf;
		u32 stored_size;

		compressed_size = xpack_compress(compressor,
						 original_buf,
						 original_size,
						 compressed_buf,
						 original_size - 1);
		if (compressed_size == 0) {
			/* Store the chunk uncompressed */
			stored_buf = original_buf;
			stored_size = original_size;
		} else {
			/* Store the chunk compressed */
			stored_buf = compressed_buf;
			stored_size = compressed_size;
		}

		ret = write_chunk_header(out, stored_size, original_size);
		if (ret != 0)
			goto out;

		ret = full_write(out, stored_buf, stored_size);
		if (ret != 0)
			goto out;
	}
out:
	free(compressed_buf);
	free(original_buf);
	return ret;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, %edi
callq 0x2890
movq %rax, 0x30(%rsp)
movl 0x3c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x2890
movq %rax, 0x28(%rsp)
movq $-0x1, 0x20(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x2525
cmpq $0x0, 0x28(%rsp)
jne 0x252a
jmp 0x2600
jmp 0x252c
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x3c(%rsp), %eax
movl %eax, %edx
callq 0x2cb0
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
jle 0x25fe
movq 0x20(%rsp), %rax
movl %eax, 0x1c(%rsp)
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x1c(%rsp), %eax
movl %eax, %edx
movq 0x28(%rsp), %rcx
movl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %r8d
callq 0x7520
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x259e
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x25b0
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x1c(%rsp), %edx
callq 0x2620
cltq
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x25d3
jmp 0x2600
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %eax
movl %eax, %edx
callq 0x2ef0
cltq
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x25f9
jmp 0x2600
jmp 0x252c
jmp 0x2600
movq 0x28(%rsp), %rdi
callq 0x1040
movq 0x30(%rsp), %rdi
callq 0x1040
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/xpack.c
// Function: write_chunk_header
static int
write_chunk_header(struct file_stream *out, u32 stored_size, u32 original_size)
{
	struct xpack_chunk_header hdr;

	hdr.stored_size = stored_size;
	hdr.original_size = original_size;

	bswap_chunk_header(&hdr);
	return full_write(out, &hdr, sizeof(hdr));
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl 0xc(%rsp), %eax
movl %eax, (%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x4(%rsp)
movq %rsp, %rdi
callq 0x2300
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
movl $0x8, %edx
callq 0x2ef0
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: do_msg
static void
do_msg(const char *format, bool with_errno, va_list va)
{
	int saved_errno = errno;

	fprintf(stderr, "%"TS": ", program_invocation_name);
	vfprintf(stderr, format, va);
	if (with_errno)
		fprintf(stderr, ": %s\n", strerror(saved_errno));
	else
		fprintf(stderr, "\n");

	errno = saved_errno;
}

// Assembly:
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x30(%rsp)
andb $0x1, %al
movb %al, 0x2f(%rsp)
movq %rdx, 0x20(%rsp)
callq 0x1050
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x108bf(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
movq 0x109cd(%rip), %rdx     # 0x13110
leaq 0xe245(%rip), %rsi      # 0x1098f
movb $0x0, %al
callq 0x1130
movq 0x108a0(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x11a0
testb $0x1, 0x2f(%rsp)
je 0x27a1
movq 0x10880(%rip), %rax     # 0x12ff8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %edi
callq 0x11d0
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0xe1fc(%rip), %rsi      # 0x10994
movb $0x0, %al
callq 0x1130
jmp 0x27b9
movq 0x10850(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
leaq 0xdc0b(%rip), %rsi      # 0x103bd
movb $0x0, %al
callq 0x1130
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x1050
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: xmalloc
void *
xmalloc(size_t size)
{
	void *p = malloc(size);
	if (p == NULL && size == 0)
		p = malloc(1);
	if (p == NULL)
		msg("Out of memory");
	return p;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1150
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x28c7
cmpq $0x0, 0x10(%rsp)
jne 0x28c7
movl $0x1, %edi
callq 0x1150
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x28dd
leaq 0xdea7(%rip), %rdi      # 0x1077d
movb $0x0, %al
callq 0x2660
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: get_filename
const tchar *
get_filename(const tchar *path)
{
	const tchar *slash = tstrrchr(path, '/');
#ifdef _WIN32
	const tchar *backslash = tstrrchr(path, '\\');
	if (backslash != NULL && (slash == NULL || backslash > slash))
		slash = backslash;
#endif
	if (slash != NULL)
		return slash + 1;
	return path;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x2f, %esi
callq 0x10c0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x2952
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x295c
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: xopen_for_read
int
xopen_for_read(const tchar *path, struct file_stream *strm)
{
	if (path == NULL) {
		strm->is_standard_stream = true;
		strm->name = T("standard input");
		strm->fd = STDIN_FILENO;
	#ifdef _WIN32
		_setmode(strm->fd, O_BINARY);
	#endif
		return 0;
	}

	strm->is_standard_stream = false;

	strm->name = quote_path(path);
	if (strm->name == NULL)
		return -1;

	strm->fd = topen(path, O_RDONLY | O_BINARY | O_NOFOLLOW);
	if (strm->fd < 0) {
		msg_errno("Can't open %"TS" for reading", strm->name);
		free(strm->name);
		return -1;
	}

	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x29b3
movq (%rsp), %rax
movb $0x1, 0x10(%rax)
movq (%rsp), %rax
leaq 0xddf3(%rip), %rcx      # 0x1078b
movq %rcx, 0x8(%rax)
movq (%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x14(%rsp)
jmp 0x2a3c
movq (%rsp), %rax
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
callq 0x2a50
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq (%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x29e5
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x2a3c
movq 0x8(%rsp), %rdi
movl $0x20000, %esi          # imm = 0x20000
movb $0x0, %al
callq 0x1170
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
movq (%rsp), %rax
cmpl $0x0, (%rax)
jge 0x2a34
movq (%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xdd84(%rip), %rdi      # 0x1079a
movb $0x0, %al
callq 0x27e0
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1040
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x2a3c
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: quote_path
static tchar *
quote_path(const tchar *path)
{
	size_t len = tstrlen(path);
	tchar *result;

	result = xmalloc((1 + len + 1 + 1) * sizeof(tchar));
	if (result == NULL)
		return NULL;
	result[0] = '"';
	tmemcpy(&result[1], path, len);
	result[1 + len] = '"';
	result[1 + len + 1] = '\0';
	return result;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1090
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq $0x1, %rdi
addq $0x1, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x2890
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x2a9a
movq $0x0, 0x20(%rsp)
jmp 0x2ae9
movq 0x8(%rsp), %rax
movb $0x22, (%rax)
movq 0x8(%rsp), %rdi
addq $0x1, %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1140
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movb $0x22, (%rax,%rcx)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movb $0x0, 0x1(%rax,%rcx)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: xopen_for_write
int
xopen_for_write(const tchar *path, bool overwrite, struct file_stream *strm)
{
	if (path == NULL) {
		strm->is_standard_stream = true;
		strm->name = T("standard output");
		strm->fd = STDOUT_FILENO;
	#ifdef _WIN32
		_setmode(strm->fd, O_BINARY);
	#endif
		return 0;
	}

	strm->is_standard_stream = false;

	strm->name = quote_path(path);
	if (strm->name == NULL)
		goto err;
retry:
	strm->fd = topen(path, O_WRONLY | O_BINARY | O_NOFOLLOW |
				O_CREAT | O_EXCL, 0644);
	if (strm->fd < 0) {
		if (errno != EEXIST) {
			msg_errno("Can't open %"TS" for writing", strm->name);
			goto err;
		}
		if (!overwrite) {
			if (!isatty(STDERR_FILENO) || !isatty(STDIN_FILENO)) {
				msg("%"TS" already exists; use -f to overwrite",
				    strm->name);
				goto err;
			}
			fprintf(stderr, "%"TS": %"TS" already exists; "
				"overwrite? (y/n) ",
				program_invocation_name, strm->name);
			if (getchar() != 'y') {
				msg("Not overwriting.");
				goto err;
			}
		}
		if (tunlink(path) != 0) {
			msg_errno("Unable to delete %"TS, strm->name);
			goto err;
		}
		goto retry;
	}

	return 0;

err:
	free(strm->name);
	return -1;
}

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq %rdx, 0x8(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x2b50
movq 0x8(%rsp), %rax
movb $0x1, 0x10(%rax)
movq 0x8(%rsp), %rax
leaq 0xdc80(%rip), %rcx      # 0x107b4
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movl $0x1, (%rax)
movl $0x0, 0x24(%rsp)
jmp 0x2ca1
movq 0x8(%rsp), %rax
movb $0x0, 0x10(%rax)
movq 0x18(%rsp), %rdi
callq 0x2a50
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2b80
jmp 0x2c8b
jmp 0x2b82
movq 0x18(%rsp), %rdi
movl $0x200c1, %esi          # imm = 0x200C1
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x1170
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jge 0x2c81
callq 0x1050
cmpl $0x11, (%rax)
je 0x2bd5
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xdbfb(%rip), %rdi      # 0x107c4
movb $0x0, %al
callq 0x27e0
jmp 0x2c8b
testb $0x1, 0x17(%rsp)
jne 0x2c54
movl $0x2, %edi
callq 0x1070
cmpl $0x0, %eax
je 0x2bf7
xorl %edi, %edi
callq 0x1070
cmpl $0x0, %eax
jne 0x2c10
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xdbd7(%rip), %rdi      # 0x107de
movb $0x0, %al
callq 0x2660
jmp 0x2c8b
movq 0x103e1(%rip), %rax     # 0x12ff8
movq (%rax), %rdi
movq 0x104ef(%rip), %rdx     # 0x13110
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0xdbd4(%rip), %rsi      # 0x10805
movb $0x0, %al
callq 0x1130
callq 0x1120
cmpl $0x79, %eax
je 0x2c52
leaq 0xdbe5(%rip), %rdi      # 0x1082e
movb $0x0, %al
callq 0x2660
jmp 0x2c8b
jmp 0x2c54
movq 0x18(%rsp), %rdi
callq 0x1060
cmpl $0x0, %eax
je 0x2c7c
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xdbcc(%rip), %rdi      # 0x1083f
movb $0x0, %al
callq 0x27e0
jmp 0x2c8b
jmp 0x2b82
movl $0x0, 0x24(%rsp)
jmp 0x2ca1
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1040
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: xread
ssize_t
xread(struct file_stream *strm, void *buf, size_t count)
{
	char *p = buf;
	size_t orig_count = count;

	while (count != 0) {
		ssize_t res = read(strm->fd, p, MIN(count, INT_MAX));
		if (res == 0)
			break;
		if (res < 0) {
			msg_errno("Error reading from %"TS, strm->name);
			return -1;
		}
		p += res;
		count -= res;
	}
	return orig_count - count;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x2d8d
movq 0x48(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x7fffffff, 0x38(%rsp) # imm = 0x7FFFFFFF
ja 0x2d0f
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x2d1b
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x8(%rsp)
jmp 0x2d1b
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rdx
callq 0x1100
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x2d3d
jmp 0x2d8d
cmpq $0x0, 0x20(%rsp)
jge 0x2d67
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xdafe(%rip), %rdi      # 0x10853
movb $0x0, %al
callq 0x27e0
movq $-0x1, 0x50(%rsp)
jmp 0x2d9c
movq 0x20(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rcx
movq 0x38(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0x2cd7
movq 0x28(%rsp), %rax
subq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: skip_bytes
int
skip_bytes(struct file_stream *strm, size_t count)
{
	size_t bufsize;
	char *buffer;
	ssize_t ret;

	if (count == 0)
		return 0;

	bufsize = MIN(count, 4096);
	buffer = xmalloc(bufsize);
	if (buffer == NULL)
		return -1;
	do {
		size_t n = MIN(count, bufsize);
		ret = xread(strm, buffer, n);
		if (ret < 0)
			goto out;
		if (ret != n) {
			msg("%"TS": unexpected end-of-file", strm->name);
			ret = -1;
			goto out;
		}
		count -= ret;
	} while (count != 0);
	ret = 0;
out:
	free(buffer);
	return ret;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x2dd3
movl $0x0, 0x44(%rsp)
jmp 0x2eda
cmpq $0x1000, 0x30(%rsp)     # imm = 0x1000
ja 0x2dea
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x2df6
movl $0x1000, %eax           # imm = 0x1000
movq %rax, 0x8(%rsp)
jmp 0x2df6
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2890
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x2e24
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x2eda
jmp 0x2e26
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
ja 0x2e3d
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
jmp 0x2e46
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2cb0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jge 0x2e72
jmp 0x2ec7
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x2ea0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xd7e2(%rip), %rdi      # 0x10670
movb $0x0, %al
callq 0x2660
movq $-0x1, 0x18(%rsp)
jmp 0x2ec7
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x2e26
movq $0x0, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1040
movq 0x18(%rsp), %rax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: full_write
int
full_write(struct file_stream *strm, const void *buf, size_t count)
{
	const char *p = buf;

	while (count != 0) {
		ssize_t res = write(strm->fd, p, MIN(count, INT_MAX));
		if (res <= 0) {
			msg_errno("Error writing to %"TS, strm->name);
			return -1;
		}
		p += res;
		count -= res;
	}
	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x2fb5
movq 0x38(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x7fffffff, 0x28(%rsp) # imm = 0x7FFFFFFF
ja 0x2f44
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
jmp 0x2f4f
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, (%rsp)
jmp 0x2f4f
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edi
movq (%rsp), %rdx
callq 0x1080
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jg 0x2f8f
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xd8eb(%rip), %rdi      # 0x10869
movb $0x0, %al
callq 0x27e0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x2fbd
movq 0x18(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0x2f0d
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: xclose
int
xclose(struct file_stream *strm)
{
	int ret = 0;
	if (strm->fd >= 0 && !strm->is_standard_stream) {
		if (close(strm->fd) != 0) {
			msg_errno("Error closing %"TS, strm->name);
			ret = -1;
		}
		free(strm->name);
	}
	strm->fd = -1;
	strm->name = NULL;
	return ret;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jl 0x3034
movq 0x10(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x3034
movq 0x10(%rsp), %rax
movl (%rax), %edi
callq 0x10f0
cmpl $0x0, %eax
je 0x3026
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0xd866(%rip), %rdi      # 0x1087d
movb $0x0, %al
callq 0x27e0
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1040
movq 0x10(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: parse_chunk_size
u32
parse_chunk_size(const tchar *arg)
{
	tchar *tmp;
	unsigned long chunk_size = tstrtoul(arg, &tmp, 10);

	if (chunk_size < 1024 || chunk_size > 67108864 || *tmp != '\0') {
		msg("Invalid chunk size : \"%"TS"\".  "
		    "Must be an integer in the range [1024, 67108864]", arg);
		return 0;
	}

	return chunk_size;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x11b0
movq %rax, 0x8(%rsp)
cmpq $0x400, 0x8(%rsp)       # imm = 0x400
jb 0x30a5
cmpq $0x4000000, 0x8(%rsp)   # imm = 0x4000000
ja 0x30a5
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x30c2
movq 0x18(%rsp), %rsi
leaq 0xd7dd(%rip), %rdi      # 0x1088e
movb $0x0, %al
callq 0x2660
movl $0x0, 0x24(%rsp)
jmp 0x30cb
movq 0x8(%rsp), %rax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: parse_compression_level
int
parse_compression_level(const tchar *arg)
{
	tchar *tmp;
	unsigned long level = tstrtoul(arg, &tmp, 10);

	if (level < 1 || level > 9 || *tmp != '\0') {
		msg("Invalid compression level: \"%"TS"\".  "
		    "Must be an integer in the range [1, 9].", arg);
		return 0;
	}

	return level;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x11b0
movq %rax, 0x8(%rsp)
cmpq $0x1, 0x8(%rsp)
jb 0x311f
cmpq $0x9, 0x8(%rsp)
ja 0x311f
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x313c
movq 0x18(%rsp), %rsi
leaq 0xd7b0(%rip), %rdi      # 0x108db
movb $0x0, %al
callq 0x2660
movl $0x0, 0x24(%rsp)
jmp 0x3145
movq 0x8(%rsp), %rax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: alloc_compressor
struct xpack_compressor *
alloc_compressor(u32 chunk_size, int level)
{
	struct xpack_compressor *c;

	c = xpack_alloc_compressor(chunk_size, level);
	if (c == NULL) {
		msg_errno("Unable to allocate compressor with "
			  "chunk size %"PRIu32" and compression level %d",
			  chunk_size, level);
	}
	return c;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl 0x14(%rsp), %eax
movl %eax, %edi
movl 0x10(%rsp), %esi
callq 0x34f0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x318e
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
leaq 0xd79e(%rip), %rdi      # 0x10925
movb $0x0, %al
callq 0x27e0
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]xpack/programs/prog_util.c
// Function: alloc_decompressor
struct xpack_decompressor *
alloc_decompressor(void)
{
	struct xpack_decompressor *d;

	d = xpack_alloc_decompressor();
	if (d == NULL)
		msg_errno("Unable to allocate decompressor");

	return d;
}

// Assembly:
pushq %rax
callq 0xf880
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x31bf
leaq 0xd7b7(%rip), %rdi      # 0x1096f
movb $0x0, %al
callq 0x27e0
movq (%rsp), %rax
popq %rcx
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/getoptn.c
// Function: getoptn
int getoptn(int argc,char *argv[],char *optstring)
{
char *ptr;

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl 0xde07(%rip), %eax      # 0x10110
cmpl -0x8(%rbp), %eax
je 0x233f
movq -0x10(%rbp), %rax
movslq 0xddf7(%rip), %rcx      # 0x10110
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x233f
movq -0x10(%rbp), %rax
movslq 0xdde0(%rip), %rcx      # 0x10110
movq (%rax,%rcx,8), %rdi
callq 0x2090
cmpq $0x1, %rax
ja 0x234b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2455
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0xddb6(%rip), %rcx      # 0x10110
movq (%rax,%rcx,8), %rax
movl 0xddb0(%rip), %ecx      # 0x10114
movsbl (%rax,%rcx), %esi
callq 0x2070
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x2383
movl $0x3f, -0x4(%rbp)
jmp 0x2455
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, 0xed98(%rip)      # 0x11128
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3a, %eax
jne 0x23f8
movl 0xdd6d(%rip), %eax      # 0x10110
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x23b9
movl $0x3a, -0x4(%rbp)
jmp 0x2455
movq -0x10(%rbp), %rax
movl 0xdd4d(%rip), %ecx      # 0x10110
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0xed5c(%rip)      # 0x11130
movl $0x1, 0xdd36(%rip)      # 0x10114
movl 0xdd2c(%rip), %eax      # 0x10110
addl $0x2, %eax
movl %eax, 0xdd23(%rip)      # 0x10110
movl 0xed35(%rip), %eax      # 0x11128
movl %eax, -0x4(%rbp)
jmp 0x2455
jmp 0x23fa
movl 0xdd14(%rip), %eax      # 0x10114
addl $0x1, %eax
movl %eax, 0xdd0b(%rip)      # 0x10114
movl 0xdd05(%rip), %eax      # 0x10114
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq 0xdcf2(%rip), %rcx      # 0x10110
movq (%rax,%rcx,8), %rdi
callq 0x2090
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jb 0x244c
movl $0x1, 0xdcd7(%rip)      # 0x10114
movl 0xdccd(%rip), %eax      # 0x10110
addl $0x1, %eax
movl %eax, 0xdcc4(%rip)      # 0x10110
movl 0xecd6(%rip), %eax      # 0x11128
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfopen
FILE *mfopen(char *filename,char *mode)
{
	UNUSED (filename);
	UNUSED (mode);
	if ((mhead = malloc(MALLOC_SIZE)) == NULL) {
		msize = 0;
		return (NULL);
	}
	msize = MALLOC_SIZE;
	mend = mptr = mhead;
	return (JUNK_FPTR);				/* not used */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x2710, %edi           # imm = 0x2710
callq 0x2170
movq %rax, 0xecb7(%rip)      # 0x11138
cmpq $0x0, %rax
jne 0x249b
movl $0x0, 0xecaf(%rip)      # 0x11140
movq $0x0, -0x8(%rbp)
jmp 0x24c8
movl $0x2710, 0xec9b(%rip)   # imm = 0x2710
movq 0xec8c(%rip), %rax      # 0x11138
movq %rax, 0xec95(%rip)      # 0x11148
movq %rax, 0xec96(%rip)      # 0x11150
movq 0xdb17(%rip), %rax      # 0xffd8
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfclose
int mfclose(FILE *f)
{
	UNUSED (f);
	if (mhead) {
		free(mhead);
		return (0);
	}
	else
		return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, 0xec44(%rip)      # 0x11138
je 0x250b
movq 0xec3b(%rip), %rdi      # 0x11138
callq 0x2140
movl $0x0, -0x4(%rbp)
jmp 0x2512
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfputc
int mfputc(unsigned int c,FILE *f)
{
	unsigned char *p;
	UNUSED (f);
	while (mptr >= mhead + msize) {
		if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1) {
			fputs("mio: out of memory\n",stderr);
			return (-1);
		}
		else {
			msize += MALLOC_SIZE;
			mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
			mhead = p;
		}
	}
	*mptr = c & 255;
	mend = ++mptr;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xec12(%rip), %rax      # 0x11148
movq 0xebfb(%rip), %rcx      # 0x11138
movl 0xebfd(%rip), %edx      # 0x11140
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x25db
movq 0xebe2(%rip), %rdi      # 0x11138
movl 0xebe4(%rip), %eax      # 0x11140
addl $0x2710, %eax           # imm = 0x2710
movl %eax, %eax
movl %eax, %esi
callq 0x21c0
movq %rax, -0x18(%rbp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x2599
movq 0xda5f(%rip), %rax      # 0xffe0
movq (%rax), %rsi
leaq 0x7a79(%rip), %rdi      # 0xa004
callq 0x2110
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x260d
movl 0xeba1(%rip), %eax      # 0x11140
addl $0x2710, %eax           # imm = 0x2710
movl %eax, 0xeb96(%rip)      # 0x11140
movq -0x18(%rbp), %rax
movq 0xeb93(%rip), %rcx      # 0x11148
movq 0xeb7c(%rip), %rdx      # 0x11138
subq %rdx, %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0xeb7d(%rip)      # 0x11148
movq -0x18(%rbp), %rax
movq %rax, 0xeb62(%rip)      # 0x11138
jmp 0x252f
movl -0x8(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq 0xeb5c(%rip), %rax      # 0x11148
movb %cl, (%rax)
movq 0xeb53(%rip), %rax      # 0x11148
addq $0x1, %rax
movq %rax, 0xeb48(%rip)      # 0x11148
movq %rax, 0xeb49(%rip)      # 0x11150
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfseek
int mfseek(FILE *f,long loc,int origin)
{
	UNUSED (f);
	if (origin != 0) {
		fputs("mseek() only implemented with 0 origin",stderr);
		return (-1);
	}
	mptr = mhead + loc;
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x26a8
movq 0xd950(%rip), %rax      # 0xffe0
movq (%rax), %rsi
leaq 0x797e(%rip), %rdi      # 0xa018
callq 0x2110
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x26c1
movq 0xea89(%rip), %rax      # 0x11138
addq -0x18(%rbp), %rax
movq %rax, 0xea8e(%rip)      # 0x11148
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfread
int mfread(char *ptr, unsigned int size, unsigned int nitems, FILE *f)
{
	unsigned int i = 0;
	UNUSED (f);
	while (i < nitems) {
		if ((mptr + size) > mend)
			break;
		memcpy(ptr,mptr,size);
		ptr += size;
		mptr += size;
		i++;
	}
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jae 0x2753
movq 0xea4c(%rip), %rax      # 0x11148
movl -0xc(%rbp), %ecx
addq %rcx, %rax
cmpq 0xea47(%rip), %rax      # 0x11150
jbe 0x270d
jmp 0x2753
movq -0x8(%rbp), %rdi
movq 0xea30(%rip), %rsi      # 0x11148
movl -0xc(%rbp), %eax
movl %eax, %edx
callq 0x20a0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %ecx
movq 0xea0c(%rip), %rax      # 0x11148
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0xea00(%rip)      # 0x11148
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x26ed
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/zmac/mio.c
// Function: mfwrite
int mfwrite(char *ptr, int size, int nitems, FILE *f)
{
	int i = 0;
	unsigned char *p;
	UNUSED (f);
	while (i < nitems) {
		while (mptr + size >= mhead + msize) {
			if ((p = realloc(mhead,msize+MALLOC_SIZE)) == (unsigned char *)-1){
				fputs("mio: out of memory\n",stderr);
				return (-1);
			}
			else {
				msize += MALLOC_SIZE;
				mptr = (unsigned char *) (p + (unsigned int)(mptr - mhead));
				mhead = p;
			}
		}
		if ((mptr + size) > mhead + msize)
			break;
		memcpy(mend,ptr,size);
		ptr += size;
		mend += size;
		mptr = mend;
	}
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x28b5
jmp 0x278b
movq 0xe9b6(%rip), %rax      # 0x11148
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq 0xe998(%rip), %rcx      # 0x11138
movl 0xe99a(%rip), %edx      # 0x11140
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x2841
movq 0xe97f(%rip), %rdi      # 0x11138
movl 0xe981(%rip), %eax      # 0x11140
addl $0x2710, %eax           # imm = 0x2710
movl %eax, %eax
movl %eax, %esi
callq 0x21c0
movq %rax, -0x30(%rbp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x27ff
movq 0xd7fc(%rip), %rax      # 0xffe0
movq (%rax), %rsi
leaq 0x7816(%rip), %rdi      # 0xa004
callq 0x2110
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x28bb
movl 0xe93b(%rip), %eax      # 0x11140
addl $0x2710, %eax           # imm = 0x2710
movl %eax, 0xe930(%rip)      # 0x11140
movq -0x30(%rbp), %rax
movq 0xe92d(%rip), %rcx      # 0x11148
movq 0xe916(%rip), %rdx      # 0x11138
subq %rdx, %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0xe917(%rip)      # 0x11148
movq -0x30(%rbp), %rax
movq %rax, 0xe8fc(%rip)      # 0x11138
jmp 0x278b
movq 0xe900(%rip), %rax      # 0x11148
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq 0xe8e2(%rip), %rcx      # 0x11138
movl 0xe8e4(%rip), %edx      # 0x11140
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x2866
jmp 0x28b5
movq 0xe8e3(%rip), %rdi      # 0x11150
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x20a0
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %ecx
movq 0xe8bb(%rip), %rax      # 0x11150
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0xe8ae(%rip)      # 0x11150
movq 0xe8a7(%rip), %rax      # 0x11150
movq %rax, 0xe898(%rip)      # 0x11148
jmp 0x277d
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/vusec[P]fpvi-scsb/leak_rate_win_size/leak_rate.c
// Function: unblock_signal
static void unblock_signal(int signum __attribute__((__unused__))) {              
  sigset_t sigs;                                                                  
  sigemptyset(&sigs);                                                             
  sigaddset(&sigs, signum);                                                       
  sigprocmask(SIG_UNBLOCK, &sigs, NULL);                                          
}

// Assembly:
subq $0x88, %rsp
movl %edi, 0x84(%rsp)
movq %rsp, %rdi
callq 0x401110
movl 0x84(%rsp), %esi
movq %rsp, %rdi
callq 0x4011a0
movl $0x1, %edi
movq %rsp, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x401030
addq $0x88, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/vusec[P]fpvi-scsb/common/helper.c
// Function: set_cpu
void set_cpu(int core_idx)
{
    cpu_set_t main_thread_mask;
    CPU_ZERO(&main_thread_mask);
    CPU_SET(core_idx, &main_thread_mask);
    if(sched_setaffinity(getpid(), sizeof(cpu_set_t), &main_thread_mask) == -1){
        fprintf(stderr, "Error setaffinity main thread\n");
        fflush(stdout);
        exit(EXIT_FAILURE);
    }

    assert(sched_getcpu() == core_idx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4010a0
movslq -0x4(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
shrq $0x3, %rax
cmpq $0x80, %rax
jae 0x40b0e6
movq -0x90(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0x90(%rbp), %rcx
shrq $0x6, %rcx
orq -0x88(%rbp,%rcx,8), %rax
movq %rax, -0x88(%rbp,%rcx,8)
movq %rax, -0xa0(%rbp)
jmp 0x40b0f1
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x40b0f1
movq -0xa0(%rbp), %rax
movq %rax, -0x98(%rbp)
callq 0x401060
movl %eax, %edi
movl $0x80, %esi
leaq -0x88(%rbp), %rdx
callq 0x4010b0
cmpl $-0x1, %eax
jne 0x40b14d
movq 0x2ed5(%rip), %rax      # 0x40dff8
movq (%rax), %rdi
leaq 0x1015(%rip), %rsi      # 0x40c142
movb $0x0, %al
callq 0x401100
movq 0x2ead(%rip), %rax      # 0x40dfe8
movq (%rax), %rdi
callq 0x401120
movl $0x1, %edi
callq 0x401180
callq 0x401170
cmpl -0x4(%rbp), %eax
jne 0x40b159
jmp 0x40b178
leaq 0x1001(%rip), %rdi      # 0x40c161
leaq 0x1015(%rip), %rsi      # 0x40c17c
movl $0x1e, %edx
leaq 0x1012(%rip), %rcx      # 0x40c185
callq 0x401090
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/vusec[P]fpvi-scsb/common/helper.c
// Function: create_thread
pthread_t create_thread(int core_idx, void *(*target_loop) (void *), void *arg)
{
    pthread_attr_t target_thread_attrs;
    pthread_attr_init(&target_thread_attrs);
    cpu_set_t target_thread_mask;

    CPU_ZERO(&target_thread_mask);
    CPU_SET(core_idx, &target_thread_mask);

    if(pthread_attr_setaffinity_np(&target_thread_attrs, sizeof(cpu_set_t), &target_thread_mask))
    {
        printf("Error setaffinity CPUID thread\n");
        fflush(stdout);
        exit(EXIT_FAILURE);
    }

    pthread_t target_thread;
    pthread_create(&target_thread, &target_thread_attrs, target_loop, arg);

    return target_thread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4010d0
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4010a0
movslq -0x4(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
shrq $0x3, %rax
cmpq $0x80, %rax
jae 0x40b217
movq -0xd8(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0xd8(%rbp), %rcx
shrq $0x6, %rcx
orq -0xd0(%rbp,%rcx,8), %rax
movq %rax, -0xd0(%rbp,%rcx,8)
movq %rax, -0xf0(%rbp)
jmp 0x40b222
xorl %eax, %eax
movq %rax, -0xf0(%rbp)
jmp 0x40b222
movq -0xf0(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x80, %esi
leaq -0xd0(%rbp), %rdx
callq 0x401040
cmpl $0x0, %eax
je 0x40b271
leaq 0xf46(%rip), %rdi       # 0x40c197
movb $0x0, %al
callq 0x401080
movq 0x2d89(%rip), %rax      # 0x40dfe8
movq (%rax), %rdi
callq 0x401120
movl $0x1, %edi
callq 0x401180
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0xe8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x401130
movq -0xe8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/vusec[P]fpvi-scsb/common/helper.c
// Function: check_tsx
int  check_tsx()
{
    if (__get_cpuid_max(0, NULL) >= 7)
    {
        unsigned a, b, c, d;
        __cpuid_count(7, 0, a, b, c, d);
        return (b & (1 << 11)) ? 1 : 0;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x40b350
cmpl $0x7, %eax
jb 0x40b336
movl $0x7, %eax
xorl %ecx, %ecx
xchgq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %esi, -0x18(%rbp)
movl %eax, %esi
movl -0x18(%rbp), %eax
movl %esi, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0xc(%rbp), %edx
andl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x40b33d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: getNow
uint64_t getNow(void)
{
  struct timeval tv;

  if (*fixedTimestamp != '\0')
  {
    return UINT64_C(1672527600000); // 2023-01-01 00:00
  }

  if (gettimeofday(&tv, (void *) 0) == 0)
  {
    uint64_t t    = tv.tv_sec;
    uint64_t msec = tv.tv_usec / 1000L;

    return t * 1000L + msec;
  }
  return 0L;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsbl 0x4a61(%rip), %eax      # 0x71c0
cmpl $0x0, %eax
je 0x2774
movabsq $0x1856a69d980, %rax    # imm = 0x1856A69D980
movq %rax, -0x8(%rbp)
jmp 0x27ba
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2120
cmpl $0x0, %eax
jne 0x27b2
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, -0x28(%rbp)
imulq $0x3e8, -0x20(%rbp), %rax # imm = 0x3E8
addq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x27ba
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: fmtTimestamp
const char *fmtTimestamp(char str[DATE_LENGTH], uint64_t when)
{
  if (fixedTimestamp[0] != '\0')
  {
    return (const char *) fixedTimestamp;
  }
  else
  {
    time_t    t;
    struct tm tm;
    int       msec;
    size_t    len;

    if (when == UINT64_C(0))
    {
      when = getNow();
    }

    t    = when / 1000L;
    msec = when % 1000L;
    gmtime_r(&t, &tm);
    strftime(str, DATE_LENGTH - 5, "%Y-%m-%dT%H:%M:%S", &tm);
    len = strlen(str);
    snprintf(str + len, DATE_LENGTH - len, ".%3.3dZ", msec);
    return str;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movsbl 0x49d9(%rip), %eax      # 0x71c0
cmpl $0x0, %eax
je 0x27fc
leaq 0x49cd(%rip), %rax      # 0x71c0
movq %rax, -0x8(%rbp)
jmp 0x288e
cmpq $0x0, -0x18(%rbp)
jne 0x280c
callq 0x2750
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x5c(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2110
movq -0x10(%rbp), %rdi
movl $0x37, %esi
leaq 0x2c0e(%rip), %rdx      # 0x545c
leaq -0x58(%rbp), %rcx
callq 0x21e0
movq -0x10(%rbp), %rdi
callq 0x20a0
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
addq -0x68(%rbp), %rdi
movl $0x3c, %esi
subq -0x68(%rbp), %rsi
movl -0x5c(%rbp), %ecx
leaq 0x2bef(%rip), %rdx      # 0x546e
movb $0x0, %al
callq 0x20e0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: logBase
static int logBase(LogLevel level, const char *format, va_list ap)
{
  char strTmp[DATE_LENGTH];

  if (level > logLevel)
  {
    return 0;
  }

  fprintf(stderr, "%s %s [%s] ", logLevels[level], fmtNow(strTmp), progName);

  return vfprintf(stderr, format, ap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x47f4(%rip), %eax      # 0x7180
jbe 0x2997
movl $0x0, -0x4(%rbp)
jmp 0x29fc
movq 0x465a(%rip), %rax      # 0x6ff8
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x47df(%rip), %rax      # 0x7190
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x28a0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
movq %rax, %rcx
movq 0x482c(%rip), %r8       # 0x7200
leaq 0x2c45(%rip), %rsi      # 0x5620
movb $0x0, %al
callq 0x2160
movq 0x460f(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2220
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: logAbort
void logAbort(const char *format, ...)
{
  va_list ap;
  va_start(ap, format);

  logBase(LOGLEVEL_FATAL, format, ap);
  va_end(ap);
  fflush(stderr);
  fflush(stdout);
  exit(2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x2ba5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
xorl %edi, %edi
callq 0x2970
leaq -0x20(%rbp), %rax
movq 0x43ee(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
callq 0x21b0
movq 0x43bf(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x21b0
movl $0x2, %edi
callq 0x2230
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: die
void die(const char *t)
{
  int   e = errno;
  char *s = 0;

  if (e)
  {
    s = strerror(e);
  }

  if (s)
  {
    logAbort("%s: %s\n", t, s);
  }
  else
  {
    logAbort("%s\n", t);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x2050
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x2c60
movl -0xc(%rbp), %edi
callq 0x2260
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2c7f
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x293b(%rip), %rdi      # 0x55b1
movb $0x0, %al
callq 0x2b70
jmp 0x2c91
movq -0x8(%rbp), %rsi
leaq 0x2a27(%rip), %rdi      # 0x56b1
movb $0x0, %al
callq 0x2b70
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/nmea0183/../common/common.c
// Function: setProgName
void setProgName(char *name)
{
  progName = strrchr(name, '/');
  if (!progName)
  {
    progName = strrchr(name, '\\');
  }
  if (!progName)
  {
    progName = name;
  }
  else
  {
    progName++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x2100
movq %rax, 0x449f(%rip)      # 0x7200
cmpq $0x0, 0x4497(%rip)      # 0x7200
jne 0x2d80
movq -0x8(%rbp), %rdi
movl $0x5c, %esi
callq 0x2100
movq %rax, 0x4480(%rip)      # 0x7200
cmpq $0x0, 0x4478(%rip)      # 0x7200
jne 0x2d97
movq -0x8(%rbp), %rax
movq %rax, 0x446b(%rip)      # 0x7200
jmp 0x2da9
movq 0x4462(%rip), %rax      # 0x7200
addq $0x1, %rax
movq %rax, 0x4457(%rip)      # 0x7200
addq $0x10, %rsp
popq %rbp
retq
nop