LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/hostdir.c
// Function: hostdir_save
int hostdir_save(hostdir_t *_this) {
	if (hostdir_prepare(_this, /*wipe*/1, 0, NULL))
		return error_set(error_code, "Unit %d: Saving host dir", _this->unit);
	filesystem_init(_this->pdp_fs);
	filesystem_parse(_this->pdp_fs); // image => filesystem
	hostdir_from_pdp_fs(_this); // filesystem => dir
	if (opt_debug)
		filesystem_print_dir(_this->pdp_fs, ferr);
	if (opt_debug)
		filesystem_print_diag(_this->pdp_fs, ferr);
	return ERROR_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x8c78
testl %eax, %eax
je 0x94b1
leaq 0x14d9e(%rip), %rax     # 0x1e238
movl (%rax), %edi
movl (%rbx), %edx
leaq 0xc0f9(%rip), %rsi      # 0x1559e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x9f73
movq 0x1008(%rbx), %rdi
callq 0xb773
movq 0x1008(%rbx), %rdi
callq 0xb7b1
movq %rbx, %rdi
callq 0x8f9b
leaq 0x1359c(%rip), %r14     # 0x1ca74
cmpl $0x0, (%r14)
je 0x9509
movq 0x1008(%rbx), %rdi
leaq 0x14d44(%rip), %r15     # 0x1e230
movq (%r15), %rsi
callq 0xbbcd
cmpl $0x0, (%r14)
je 0x9509
movq 0x1008(%rbx), %rdi
movq (%r15), %rsi
callq 0xbbec
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/hostdir.c
// Function: snapshot_print
static void snapshot_print(hostdir_snapshot_t *_this, FILE *stream, int all) {
	int i;
	UNUSED(stream) ;
	for (i = 0; i < _this->file_count; i++) {
		hostdir_file_t *f;
		f = &_this->file[i];
		if (all || f->state[side_pdp] != fs_unchanged || f->state[side_host] != fs_unchanged) {
			info("Unit %d, file %3d: %10s %s, %s.", _this->hostdir->unit,
				i, f->pdp_filnam_ext_stream,
					state_text(side_pdp, f->state[side_pdp]),
					state_text(side_host, f->state[side_host]));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0x4(%rsp)
movq %rdi, 0x8(%rsp)
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x9e25
movq 0x8(%rsp), %rcx
leaq 0x13c(%rcx), %rbp
xorl %r13d, %r13d
movq 0x8(%rsp), %r15
movl -0x4(%rbp), %ecx
movl %ecx, %edx
orl 0x4(%rsp), %edx
jne 0x9d88
xorl %ecx, %ecx
cmpl $0x0, (%rbp)
je 0x9e0f
leaq -0x12c(%rbp), %rax
movq %rax, 0x10(%rsp)
movq (%r15), %rax
movl (%rax), %r12d
movl %ecx, %eax
leaq 0x1201d(%rip), %rbx     # 0x1bdc0
movq (%rbx,%rax,8), %rdx
leaq 0x143e2(%rip), %rdi     # 0x1e190
leaq 0xb651(%rip), %r14      # 0x15406
movq %r14, %rsi
leaq 0xb63e(%rip), %rcx      # 0x153fd
xorl %eax, %eax
callq 0x3530
movl (%rbp), %eax
movq (%rbx,%rax,8), %rdx
leaq 0x1440c(%rip), %rbx     # 0x1e1e0
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xb620(%rip), %rcx      # 0x15401
xorl %eax, %eax
callq 0x3530
leaq 0xb939(%rip), %rdi      # 0x15728
movl %r12d, %esi
movl %r13d, %edx
movq 0x10(%rsp), %rcx
leaq 0x1438f(%rip), %r8      # 0x1e190
movq %rbx, %r9
xorl %eax, %eax
callq 0xa10f
movl 0x8(%r15), %eax
incq %r13
movslq %eax, %rcx
addq $0x150, %rbp            # imm = 0x150
cmpq %rcx, %r13
jl 0x9d71
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/hostdir.c
// Function: hostdir_file_copy_from_pdp
static void hostdir_file_copy_from_pdp(hostdir_t *_this, hostdir_file_t *f) {
	char pathbuff[4096];
	file_t *fpdp;
	file_stream_t *stream;
	sprintf(pathbuff, "%s/%s", _this->path, f->pdp_filnam_ext_stream);

	fpdp = filesystem_file_get(_this->pdp_fs, f->pdp_fileidx); // also boot and monitor
	stream = &fpdp->stream[f->pdp_streamidx];
	if (!dbg_simulate)
		file_write(pathbuff, stream->data, stream->data_size);
	if (opt_verbose)
		info("Unit %d: Copied file \"%s\" from PDP to shared dir.", _this->unit, pathbuff);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rdi), %rdx
leaq 0xb668(%rip), %rsi      # 0x154b7
movq %rsp, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3530
movq 0x1008(%rbx), %rdi
movl 0x140(%r14), %esi
callq 0xb8d3
cmpl $0x0, 0x1430a(%rip)     # 0x1e180
jne 0x9e97
movslq 0x144(%r14), %rcx
imulq $0x68, %rcx, %rcx
movq 0x80(%rax,%rcx), %rsi
movl 0x7c(%rax,%rcx), %edx
movq %rsp, %rdi
callq 0xa592
leaq 0x12bc6(%rip), %rax     # 0x1ca64
cmpl $0x0, (%rax)
je 0x9eb6
movl (%rbx), %esi
leaq 0xb89c(%rip), %rdi      # 0x15748
movq %rsp, %rdx
xorl %eax, %eax
callq 0xa10f
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/hostdir.c
// Function: hostdir_file_delete
static void hostdir_file_delete(hostdir_t *_this, hostdir_file_t *f) {
	char pathbuff[4096];
	sprintf(pathbuff, "%s/%s", _this->path, f->hostfilename);
	if (!dbg_simulate)
		remove(pathbuff);
	if (opt_verbose)
		info("Unit %d: Deleted file \"%s\" on shared dir.", _this->unit, pathbuff);
}

// Assembly:
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
leaq 0x4(%rdi), %rdx
leaq 0x28(%rsi), %rcx
leaq 0xb5dc(%rip), %rsi      # 0x154b7
movq %rsp, %rdi
xorl %eax, %eax
callq 0x3530
cmpl $0x0, 0x14294(%rip)     # 0x1e180
jne 0x9ef6
movq %rsp, %rdi
callq 0x30b0
leaq 0x12b67(%rip), %rax     # 0x1ca64
cmpl $0x0, (%rax)
je 0x9f15
movl (%rbx), %esi
leaq 0xb86f(%rip), %rdi      # 0x1577a
movq %rsp, %rdx
xorl %eax, %eax
callq 0xa10f
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/hostdir.c
// Function: snapshot_init
static void snapshot_init(hostdir_t *_this) {
	_this->snapshot.file_count = 0;
	snapshot_scan_hostdir(_this);
	snapshot_scan_pdpimage(_this);
	snapshot_clear_states(_this);
	// now both sides "unchanged"
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0x1018(%rdi)
callq 0x97f2
movq %rbx, %rdi
callq 0x9afd
movslq 0x1018(%rbx), %rax
testq %rax, %rax
jle 0x9f66
imulq $0x150, %rax, %rax      # imm = 0x150
xorl %ecx, %ecx
movq $0x0, 0x1148(%rbx,%rcx)
addq $0x150, %rcx            # imm = 0x150
cmpq %rcx, %rax
jne 0x9f4e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/error.c
// Function: error_set
int error_set(int code, char *fmt, ...) {
	char buffer[1024];
	va_list args;
//	assert(error_trace_level < ERROR_MAX_TRACE_LEVEL) ;
	error_code = code;
	if (code == ERROR_OK)
		error_clear();
	else if (fmt && strlen(fmt)) {
		va_start(args, fmt);
		vsprintf(buffer, fmt, args);
		va_end(args);
		// strcpy(error_message[error_trace_level++], buffer);
		error(buffer);
	}
	return error_code;
}

// Assembly:
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x9fca
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl %edi, 0x14268(%rip)     # 0x1e238
testl %edi, %edi
je 0xa027
movl %edi, %eax
testq %rsi, %rsi
je 0xa033
cmpb $0x0, (%rsi)
je 0xa033
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
callq 0x3470
movq %rbx, %rdi
xorl %eax, %eax
callq 0xa03c
movl 0x14213(%rip), %eax     # 0x1e238
jmp 0xa033
movl $0x0, 0x14207(%rip)     # 0x1e238
xorl %eax, %eax
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/error.c
// Function: error
void error(char *fmt, ...) {
	va_list args;
	va_start(args, fmt);
	fprintf(ferr, "[%s ERROR]  ", cur_time_text());
	vfprintf(ferr, fmt, args);
	fprintf(ferr, "\n");
	va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa09f
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x1416a(%rip), %r15     # 0x1e230
callq 0xa4c7
leaq 0xb6ed(%rip), %rsi      # 0x157bf
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3310
movq 0x1414a(%rip), %rdi     # 0x1e230
movq %rbx, %rsi
movq %r14, %rdx
callq 0x34f0
movq 0x14138(%rip), %rsi     # 0x1e230
movl $0xa, %edi
callq 0x3290
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/error.c
// Function: info
void info(char *fmt, ...) {
	va_list args;
	if (!opt_background) {
		va_start(args, fmt);
		fprintf(ferr, "[%s info]  ", cur_time_text());
		vfprintf(ferr, fmt, args);
		fprintf(ferr, "\n");
		va_end(args);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xa16f
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x12906(%rip), %rax     # 0x1ca7c
cmpl $0x0, (%rax)
jne 0xa1e6
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %r14
movq %rax, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x14086(%rip), %r15     # 0x1e230
callq 0xa4c7
leaq 0xb5ee(%rip), %rsi      # 0x157a4
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3310
movq 0x14066(%rip), %rdi     # 0x1e230
movq %rbx, %rsi
movq %r14, %rdx
callq 0x34f0
movq 0x14054(%rip), %rsi     # 0x1e230
movl $0xa, %edi
callq 0x3290
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/error.c
// Function: warning
void warning(char *fmt, ...) {
	va_list args;
	if (!opt_background) {
		va_start(args, fmt);
		fprintf(ferr, "[%s Warning]  ", cur_time_text());
		vfprintf(ferr, fmt, args);
		fprintf(ferr, "\n");
		va_end(args);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xa253
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
leaq 0x12822(%rip), %rax     # 0x1ca7c
cmpl $0x0, (%rax)
jne 0xa2ca
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %r14
movq %rax, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x13fa2(%rip), %r15     # 0x1e230
callq 0xa4c7
leaq 0xb516(%rip), %rsi      # 0x157b0
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3310
movq 0x13f82(%rip), %rdi     # 0x1e230
movq %rbx, %rsi
movq %r14, %rdx
callq 0x34f0
movq 0x13f70(%rip), %rsi     # 0x1e230
movl $0xa, %edi
callq 0x3290
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/error.c
// Function: fatal
void fatal(char *fmt, ...) {
	va_list args;
	va_start(args, fmt);
	fprintf(ferr, "[%s FATAL]  ", cur_time_text());
	vfprintf(ferr, fmt, args);
	fprintf(ferr, "\n");
	va_end(args);
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa33a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0x13ecf(%rip), %r15     # 0x1e230
callq 0xa4c7
leaq 0xb45f(%rip), %rsi      # 0x157cc
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3310
movq 0x13eaf(%rip), %rdi     # 0x1e230
movq %rbx, %rsi
movq %r14, %rdx
callq 0x34f0
movq 0x13e9d(%rip), %rsi     # 0x1e230
movl $0xa, %edi
callq 0x3290
movl $0x1, %edi
callq 0x3540
nop
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: delay_us
void delay_us(int32_t us) {
	struct timespec rqtp;
	int32_t sts;

	// check if any delay required
	if (us <= 0)
		return;

	// nanosleep() preferred over usleep(),
	// compute integer seconds and fraction (in nanoseconds)
	rqtp.tv_sec = us / 1000000L;
	rqtp.tv_nsec = (us % 1000000L) * 1000L;

	// if nanosleep() fails then just plain sleep()
	if ((sts = nanosleep(&rqtp, NULL)) == -1)
		sleep(rqtp.tv_sec);
}

// Assembly:
testl %edi, %edi
jle 0xa3f3
subq $0x18, %rsp
movl %edi, %eax
imulq $0x431bde83, %rax, %rcx # imm = 0x431BDE83
shrq $0x32, %rcx
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
imull $0xf4240, %ecx, %ecx    # imm = 0xF4240
subl %ecx, %edi
imull $0x3e8, %edi, %ecx      # imm = 0x3E8
movq %rcx, 0x8(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x31e0
cmpl $-0x1, %eax
jne 0xa3ef
movl 0x8(%rsp), %edi
callq 0x3590
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: cur_time_text
char *cur_time_text() {
	static char result[40] ;
	time_t timer;
	struct tm* tm_info;
	time(&timer);
	tm_info = localtime(&timer);
	strftime(result, 26, "%H:%M:%S", tm_info);
	return result;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3360
movq %rbx, %rdi
callq 0x3070
leaq 0x13d68(%rip), %rbx     # 0x1e250
leaq 0xb2ea(%rip), %rdx      # 0x157d9
movl $0x1a, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x3450
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: is_memset
int is_memset(void *ptr, uint8_t val, uint32_t size) {
	for (; size; ptr++, size--)
		if (*(uint8_t *) ptr != val)
			return 0;
	return 1;
}

// Assembly:
movl $0x1, %eax
testl %edx, %edx
je 0xa522
movl %edx, %ecx
xorl %edx, %edx
cmpb %sil, (%rdi,%rdx)
jne 0xa523
incq %rdx
cmpl %edx, %ecx
jne 0xa515
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: is_fileset
int is_fileset(char *fpath, uint8_t val, uint32_t offset) {
	int result;
	FILE *f;
	uint8_t b;
	f = fopen(fpath, "r");
	fseek(f, offset, SEEK_SET);
	result = 1;
	// inefficient byte loop
	while (result && fread(&b, sizeof(b), 1, f) == 1)
		if (b != val)
			result = 0;

	fclose(f);
	return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movl %esi, %ebp
leaq 0xcb34(%rip), %rsi      # 0x1706e
callq 0x34b0
movq %rax, %rbx
movl %r14d, %esi
movq %rax, %rdi
xorl %edx, %edx
callq 0x3400
leaq 0xf(%rsp), %r14
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x3100
cmpq $0x1, %rax
jne 0xa57a
cmpb %bpl, 0xf(%rsp)
je 0xa554
xorl %ebp, %ebp
jmp 0xa57f
movl $0x1, %ebp
movq %rbx, %rdi
callq 0x3150
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: file_write
int file_write(char *fpath, uint8_t *data, unsigned size) {
	int fd;
	// O_TRUNC: set to length 0
	fd = open(fpath, O_CREAT | O_TRUNC | O_RDWR, 0666);
	// or f = fopen(fpath, "w") ;
	if (fd < 0)
		return error_set(ERROR_HOSTFILE, "File write: can not open \"%s\"", fpath);
	write(fd, data, size);
	close(fd);
	return ERROR_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x242, %esi            # imm = 0x242
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x34a0
testl %eax, %eax
js 0xa5da
movl %eax, %r15d
movl %ebp, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0x3140
movl %r15d, %edi
callq 0x3260
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb201(%rip), %rsi      # 0x157e2
movl $0xfffffffa, %edi       # imm = 0xFFFFFFFA
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9f73
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: inputline
int inputline(char **tokenlist, int tokenlist_size) {
	static char buffer[1024];
	int n;
	char *t;

	n = 0;
	if (fgets(buffer, sizeof(buffer), stdin)) {
		t = strtok(buffer, " \t\n");
		while (t && n < tokenlist_size - 1) {
			tokenlist[n++] = t;
			t = strtok(NULL, " \t\n");
		}
	}
	tokenlist[n] = NULL; // terminate list
	return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x119c9(%rip), %rax     # 0x1bfd8
movq (%rax), %rdx
leaq 0x13c67(%rip), %rdi     # 0x1e280
movl $0x400, %esi            # imm = 0x400
callq 0x32c0
xorl %r15d, %r15d
testq %rax, %rax
je 0xa677
leaq 0x13c4e(%rip), %rdi     # 0x1e280
leaq 0xb1c7(%rip), %rsi      # 0x15800
callq 0x34d0
testq %rax, %rax
sete %cl
cmpl $0x2, %r14d
setl %dl
orb %cl, %dl
jne 0xa677
decl %r14d
xorl %r15d, %r15d
leaq 0xb1a4(%rip), %r12      # 0x15800
movq %rax, (%rbx,%r15,8)
incq %r15
xorl %edi, %edi
movq %r12, %rsi
callq 0x34d0
testq %rax, %rax
je 0xa677
cmpq %r14, %r15
jb 0xa65c
movl %r15d, %eax
movq $0x0, (%rbx,%rax,8)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: strtrim
char *strtrim(char *txt) {
	static char buff[1024];
	char *s = txt; // start

	assert(strlen(txt) < sizeof(buff));

	// skip leading space
	while (*s && isspace(*s))
		s++;
	strcpy(buff, s); // buff now without leading space
	// s = last last non-white char
	s = buff + strlen(buff) - 1;
	while (s > buff && isspace(*s))
		s--;
	*(s + 1) = 0; // clip off
	return buff;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3190
cmpq $0x3ff, %rax            # imm = 0x3FF
ja 0xa71b
movb (%rbx), %bpl
testb %bpl, %bpl
je 0xa6cc
callq 0x35d0
movq (%rax), %rax
movsbq %bpl, %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0xa6cc
movb 0x1(%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0xa6b5
leaq 0x13fad(%rip), %r14     # 0x1e680
movq %r14, %rdi
movq %rbx, %rsi
callq 0x30c0
movq %r14, %rdi
callq 0x3190
addq %r14, %rax
decq %rax
movq %rax, %rbx
cmpq %r14, %rax
jbe 0xa70b
callq 0x35d0
movq (%rax), %rcx
movsbq (%rbx), %rdx
leaq -0x1(%rbx), %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0xa6ec
movb $0x0, 0x1(%rbx)
leaq 0x13f6a(%rip), %rax     # 0x1e680
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb0e2(%rip), %rdi      # 0x15804
leaq 0xb0f6(%rip), %rsi      # 0x1581f
leaq 0xb0f7(%rip), %rcx      # 0x15827
movl $0xbe, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: strrpad
char *strrpad(char *txt, int len, char c) {
	static char buff[1024];
	memset(buff, c, len); // init buffer with base pattern
	strncpy(buff, txt, strlen(txt));
	buff[len] = 0;
	return buff;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq %esi, %r14
leaq 0x14334(%rip), %r15     # 0x1ea80
movq %r15, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x3220
movq %rbx, %rdi
callq 0x3190
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x30a0
movb $0x0, (%r14,%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: strprintable
char *strprintable(char *s, int size) {
	static char buffer[1024] ;
	char buf[10] ;
	int i ;
	char c ;
	char *wp = buffer ;
	*wp = 0 ;
	for (i= 0 ;  i < size ; i++) {
		c = s[i] ;
		// must be room for one more char expr
		assert(wp-buffer < (int)sizeof(buffer)-5) ;
		if (c == 0) {
			strcat(wp, "<NUL>") ;
			wp += 5 ;
		} else if (c == 0x07) {
			strcat(wp, "<BEL>") ;
			wp += 5 ;
		} else if (c == 0x0a) {
			strcat(wp, "<LF>") ;
			wp += 4 ;
		} else if (c == 0x0d) {
			strcat(wp, "<CR>") ;
			wp += 4 ;
		} else if (c == 0x20) {
				strcat(wp, "<SPC>") ;
				wp += 5 ;
		} else if (c <= 0x1f || c >= 0x7f) {
			sprintf(buf, "\\x%.2x", (int)c) ;
			strcat(wp, buf) ;
			wp += strlen(buf) ;
		} else
			*wp++ = c ;
		*wp=0 ;
	}
	return buffer ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x0, 0x146ee(%rip)     # 0x1ee80
testl %esi, %esi
jle 0xa8a9
movq %rdi, %rbx
leaq 0x146dc(%rip), %r13     # 0x1ee80
movl %esi, %ebp
leaq 0xe(%rsp), %r15
xorl %r14d, %r14d
movq %r13, %r12
movq %r12, %rax
subq %r13, %rax
cmpq $0x3fb, %rax            # imm = 0x3FB
jge 0xa8bf
movb (%rbx,%r14), %al
movzbl %al, %ecx
cmpl $0x9, %ecx
jle 0xa7f4
cmpl $0xa, %ecx
je 0xa80f
cmpl $0xd, %ecx
je 0xa821
cmpl $0x20, %ecx
jne 0xa86c
movq %r12, %rdi
callq 0x3190
movl $0x4350533c, (%r12,%rax) # imm = 0x4350533C
jmp 0xa84d
testl %ecx, %ecx
je 0xa83d
cmpl $0x7, %ecx
jne 0xa86c
movq %r12, %rdi
callq 0x3190
movl $0x4c45423c, (%r12,%rax) # imm = 0x4C45423C
jmp 0xa84d
movq %r12, %rdi
callq 0x3190
movl $0x3e464c3c, (%r12,%rax) # imm = 0x3E464C3C
jmp 0xa831
movq %r12, %rdi
callq 0x3190
movl $0x3e52433c, (%r12,%rax) # imm = 0x3E52433C
movb $0x0, 0x4(%r12,%rax)
addq $0x4, %r12
jmp 0xa859
movq %r12, %rdi
callq 0x3190
movl $0x4c554e3c, (%r12,%rax) # imm = 0x4C554E3C
movw $0x3e, 0x4(%r12,%rax)
addq $0x5, %r12
movb $0x0, (%r12)
incq %r14
cmpq %r14, %rbp
jne 0xa7b1
jmp 0xa8a9
leal -0x7f(%rax), %ecx
cmpb $-0x60, %cl
ja 0xa8a0
movsbl %al, %edx
movq %r15, %rdi
leaq 0xb01a(%rip), %rsi      # 0x1589b
xorl %eax, %eax
callq 0x3530
movq %r12, %rdi
movq %r15, %rsi
callq 0x3510
movq %r15, %rdi
callq 0x3190
addq %rax, %r12
jmp 0xa859
movb %al, (%r12)
incq %r12
jmp 0xa859
leaq 0x145d0(%rip), %rax     # 0x1ee80
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaf77(%rip), %rdi      # 0x1583d
leaq 0xaf52(%rip), %rsi      # 0x1581f
leaq 0xaf8b(%rip), %rcx      # 0x1585f
movl $0xe0, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: rad50_decode
char *rad50_decode(uint16_t w) {
	static char result[4];
	result[2] = rad50_val2chr(w % 050);
	w /= 050;
	result[1] = rad50_val2chr(w % 050);
	w /= 050;
	result[0] = rad50_val2chr(w);
	result[3] = 0;
	return result;
}

// Assembly:
imull $0xcccd, %edi, %edx     # imm = 0xCCCD
shrl $0x15, %edx
leal (,%rdx,8), %eax
leal (%rax,%rax,4), %ecx
movl %edi, %esi
movw $0x20, %ax
movw $0x20, %r8w
subw %cx, %si
je 0xa92d
cmpw $0x1a, %si
ja 0xa90c
orl $0x40, %esi
jmp 0xa92a
leal -0x1b(%rsi), %ecx
cmpw $0x3, %cx
jae 0xa927
shll $0x4, %ecx
movabsq $0x25002e0024, %r8      # imm = 0x25002E0024
shrq %cl, %r8
jmp 0xa92d
addl $0x12, %esi
movl %esi, %r8d
movb %r8b, 0x1494e(%rip)     # 0x1f282
movzwl %dx, %edx
imull $0x667, %edx, %ecx      # imm = 0x667
shrl $0xd, %ecx
andl $-0x8, %ecx
leal (%rcx,%rcx,4), %ecx
subw %cx, %dx
je 0xa976
cmpw $0x1a, %dx
ja 0xa956
orl $0x40, %edx
jmp 0xa974
leal -0x1b(%rdx), %ecx
cmpw $0x3, %cx
jae 0xa971
shll $0x4, %ecx
movabsq $0x25002e0024, %rax     # imm = 0x25002E0024
shrq %cl, %rax
jmp 0xa976
addl $0x12, %edx
movl %edx, %eax
movb %al, 0x14905(%rip)      # 0x1f281
movzwl %di, %ecx
movw $0x20, %ax
cmpl $0x640, %ecx            # imm = 0x640
jb 0xa9d7
movl %ecx, %eax
shrl $0x6, %eax
imull $0xa3e, %eax, %eax      # imm = 0xA3E
shrl $0x10, %eax
cmpl $0xa8bf, %ecx           # imm = 0xA8BF
ja 0xa9a6
orl $0x40, %eax
jmp 0xa9d7
leal -0x1b(%rax), %ecx
cmpw $0x3, %cx
jae 0xa9c4
movswl %cx, %ecx
shll $0x4, %ecx
movabsq $0x25002e0024, %rax     # imm = 0x25002E0024
shrq %cl, %rax
jmp 0xa9d7
leal -0x1e(%rax), %ecx
addl $0x12, %eax
cmpl $0xa, %ecx
movl $0x25, %ecx
cmovbl %eax, %ecx
movl %ecx, %eax
movb %al, 0x148a3(%rip)      # 0x1f280
leaq 0x1489c(%rip), %rax     # 0x1f280
movb $0x0, 0x14898(%rip)     # 0x1f283
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: rad50_encode
uint16_t rad50_encode(char *s) {
	uint16_t result = 0;
	int n;
	if (!s)
		return 0; // 3 spaces

	n = strlen(s);
	if (n > 0)
		result += rad50_chr2val(toupper(s[0]));
	result *= 050;
	if (n > 1)
		result += rad50_chr2val(toupper(s[1]));
	result *= 050;
	if (n > 2)
		result += rad50_chr2val(toupper(s[2]));
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xaa5c
movq %rdi, %rbx
callq 0x3190
movq %rax, %r14
testl %r14d, %r14d
jle 0xaa60
callq 0x3030
movq (%rax), %r15
movsbq (%rbx), %rax
movl (%r15,%rax,4), %edi
callq 0xaa76
shll $0x3, %eax
leal (%rax,%rax,4), %r12d
cmpl $0x1, %r14d
je 0xaa63
movsbq 0x1(%rbx), %rax
movl (%r15,%rax,4), %edi
callq 0xaa76
addl %eax, %r12d
shll $0x3, %r12d
leal (%r12,%r12,4), %ebp
cmpl $0x3, %r14d
jb 0xaa6b
movsbq 0x2(%rbx), %rax
movl (%r15,%rax,4), %edi
callq 0xaa76
addl %eax, %ebp
jmp 0xaa6b
xorl %ebp, %ebp
jmp 0xaa6b
xorl %r12d, %r12d
shll $0x3, %r12d
leal (%r12,%r12,4), %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: rad50_chr2val
static int rad50_chr2val(int c) {
	if (c == ' ')
		return 000;
	else if (c >= 'A' && c <= 'Z')
		/// => 000001..011010
		return 1 + c - 'A';
	else if (c == '$')
		return 033;
	else if (c == '.')
		return 034;
	else if (c == '%')
		return 035;
	else if (c >= '0' && c <= '9')
		return 036 + c - '0';
	else
		return 035; // RT-11 for "invalid"
}

// Assembly:
xorl %eax, %eax
cmpl $0x20, %edi
jne 0xaa7e
retq
leal -0x41(%rdi), %eax
cmpl $0x19, %eax
ja 0xaa8c
addl $-0x40, %edi
movl %edi, %eax
retq
cmpl $0x24, %edi
je 0xaaa7
cmpl $0x25, %edi
je 0xaaa1
cmpl $0x2e, %edi
jne 0xaaad
movl $0x1c, %eax
retq
movl $0x1d, %eax
retq
movl $0x1b, %eax
retq
leal -0x30(%rdi), %eax
addl $-0x12, %edi
cmpl $0xa, %eax
movl $0x1d, %eax
cmovbl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: file_exists
int file_exists(char *path, char *filename) {
	char buffer[4096];
	struct stat st;
	if (path && strlen(path))
		sprintf(buffer, "%s/%s", path, filename);
	else
		strcpy(buffer, filename);
	return !stat(buffer, &st);

}

// Assembly:
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %rcx
testq %rdi, %rdi
je 0xaaee
movq %rdi, %rdx
cmpb $0x0, (%rdi)
je 0xaaee
leaq 0xa9da(%rip), %rsi      # 0x154b7
leaq 0x90(%rsp), %rdi
xorl %eax, %eax
callq 0x3530
jmp 0xaafe
leaq 0x90(%rsp), %rdi
movq %rcx, %rsi
callq 0x30c0
leaq 0x90(%rsp), %rdi
movq %rsp, %rsi
callq 0x3320
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x1098, %rsp           # imm = 0x1098
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: extract_extension
char *extract_extension(char *filename, int truncate) {
	char *dotpos;
	char *s;

	// find the last "."
	dotpos = NULL;
	for (s = filename; *s; s++)
		if (*s == '.')
			dotpos = s;

	if (dotpos) {
		if (truncate)
			*dotpos = 0; // clip off "." and extension
		return dotpos + 1;
	} else
		return NULL;
}

// Assembly:
xorl %eax, %eax
movzbl (%rdi), %ecx
cmpl $0x2e, %ecx
je 0xab2f
testl %ecx, %ecx
jne 0xab32
jmp 0xab37
movq %rdi, %rax
incq %rdi
jmp 0xab21
testq %rax, %rax
je 0xab47
testl %esi, %esi
je 0xab43
movb $0x0, (%rax)
incq %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: dos11date_decode
struct tm dos11date_decode(uint16_t w) {
	int *monthlen;
	struct tm result;
	int y = (w / 1000) + 1970;
	int m;
	int d = w % 1000; // starts as day of year

	memset(&result, 0, sizeof(result)); //clear

	// use correct table
	monthlen = leapyear(y) ? monthlen_leap : monthlen_noleap;

	m = 0;
	while (d > monthlen[m]) {
		d -= monthlen[m];
		m++;
	}
	result.tm_year = y - 1900;
	result.tm_mon = m; // 0..11
	result.tm_mday = d; // 1..31

	assert(w == dos11date_encode(result)); // cross check
	return result;
}

// Assembly:
pushq %rax
movl %esi, %eax
shrl $0x3, %eax
imull $0x20c5, %eax, %eax     # imm = 0x20C5
shrl $0x14, %eax
leal 0x7b2(%rax), %edx
imull $0x3e8, %eax, %ecx      # imm = 0x3E8
movl %esi, %r8d
subl %ecx, %r8d
movzwl %r8w, %ecx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x30(%rdi)
testb $0x3, %dl
jne 0xabfc
imull $0x51f, %edx, %r8d      # imm = 0x51F
shrl $0x11, %r8d
imull $0x64, %r8d, %r8d
negl %r8d
addl %eax, %r8d
addl $0x7b2, %r8d            # imm = 0x7B2
testw %r8w, %r8w
je 0xabfc
leaq 0x11876(%rip), %r9      # 0x1c470
jmp 0xac29
movzwl %dx, %r8d
imull $0x5c29, %r8d, %r8d     # imm = 0x5C29
rorw $0x4, %r8w
movzwl %r8w, %r8d
cmpl $0xa4, %r8d
leaq 0x11852(%rip), %r8      # 0x1c470
leaq 0x1181b(%rip), %r9      # 0x1c440
cmovbq %r8, %r9
movl (%r9), %r10d
cmpl %ecx, %r10d
jge 0xac49
xorl %r8d, %r8d
subl %r10d, %ecx
movl 0x4(%r9,%r8,4), %r10d
incq %r8
cmpl %r10d, %ecx
jg 0xac34
movl %r8d, %r9d
jmp 0xac4f
xorl %r9d, %r9d
xorl %r8d, %r8d
addl $0x46, %eax
movl %eax, 0x14(%rdi)
movl %r9d, 0x10(%rdi)
movl %ecx, 0xc(%rdi)
testb $0x3, %al
jne 0xac83
movl %edx, %r10d
imulq $0x28f5c29, %r10, %r10  # imm = 0x28F5C29
shrq $0x20, %r10
imull $0x64, %r10d, %r10d
movl %edx, %r11d
subl %r10d, %r11d
je 0xac83
leaq 0x117ef(%rip), %rdx     # 0x1c470
jmp 0xaca4
imull $0xc28f5c29, %edx, %edx # imm = 0xC28F5C29
rorl $0x4, %edx
cmpl $0xa3d70b, %edx         # imm = 0xA3D70B
leaq 0x117d7(%rip), %r10     # 0x1c470
leaq 0x117a0(%rip), %rdx     # 0x1c440
cmovbq %r10, %rdx
testl %r9d, %r9d
je 0xacbd
xorl %r10d, %r10d
xorl %r9d, %r9d
addl (%rdx,%r10,4), %r9d
incq %r10
cmpq %r10, %r8
jne 0xacaf
jmp 0xacc0
xorl %r9d, %r9d
imull $0x3e8, %eax, %eax      # imm = 0x3E8
addl %ecx, %eax
addl %r9d, %eax
addl $0xffffee90, %eax       # imm = 0xFFFFEE90
cmpw %si, %ax
jne 0xacda
movq %rdi, %rax
popq %rcx
retq
leaq 0xabc1(%rip), %rdi      # 0x158a2
leaq 0xab37(%rip), %rsi      # 0x1581f
leaq 0xabd1(%rip), %rcx      # 0x158c0
movl $0x181, %edx            # imm = 0x181
callq 0x3200
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: dos11date_encode
uint16_t dos11date_encode(struct tm t) {
	int *monthlen;
	uint16_t result = 0;
	int doy;
	int y = 1900 + t.tm_year; // year is easy
	int m;

	monthlen = leapyear(y) ? monthlen_leap : monthlen_noleap;

	for (doy = m = 0; m < t.tm_mon; m++)
		doy += monthlen[m];

	result = doy + t.tm_mday;
	result += 1000 * (y - 1970);
	return result;
}

// Assembly:
leaq 0x8(%rsp), %rax
movl 0x14(%rax), %ecx
leal 0x76c(%rcx), %edx
testb $0x3, %cl
jne 0xad3d
movslq %edx, %rsi
imulq $0x51eb851f, %rsi, %rsi # imm = 0x51EB851F
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x25, %rsi
addl %edi, %esi
imull $0x64, %esi, %esi
negl %esi
addl %ecx, %esi
addl $0x76c, %esi            # imm = 0x76C
testl %esi, %esi
je 0xad3d
leaq 0x11735(%rip), %rdx     # 0x1c470
jmp 0xad64
imull $0xc28f5c29, %edx, %edx # imm = 0xC28F5C29
addl $0x51eb850, %edx        # imm = 0x51EB850
rorl $0x4, %edx
cmpl $0xa3d70b, %edx         # imm = 0xA3D70B
leaq 0x11717(%rip), %rsi     # 0x1c470
leaq 0x116e0(%rip), %rdx     # 0x1c440
cmovbq %rsi, %rdx
movslq 0x10(%rax), %rdi
testq %rdi, %rdi
jle 0xad80
xorl %r8d, %r8d
xorl %esi, %esi
addl (%rdx,%r8,4), %esi
incq %r8
cmpq %r8, %rdi
jne 0xad72
jmp 0xad82
xorl %esi, %esi
movl 0xc(%rax), %eax
imull $0x3e8, %ecx, %ecx      # imm = 0x3E8
addl %esi, %ecx
addl %ecx, %eax
addl $0xffffee90, %eax       # imm = 0xFFFFEE90
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/utils.c
// Function: hexdump_put
static void hexdump_put(FILE *stream, unsigned start, char *line_hexb, char* line_hexw,
		char *line_ascii) {
	// expand half filled lines
	while (strlen(line_hexb) < HEXDUMP_BYTESPERLINE * 3)
		strcat(line_hexb, " ");
	while (strlen(line_hexw) < (HEXDUMP_BYTESPERLINE / 2) * 5)
		strcat(line_hexw, " ");
	while (strlen(line_ascii) < HEXDUMP_BYTESPERLINE)
		strcat(line_ascii, " ");
	fprintf(stream, "%3x: %s   %s  %s\n", start, line_hexb, line_hexw, line_ascii);
	line_hexb[0] = 0; // clear output
	line_hexw[0] = 0;
	line_ascii[0] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
movq %rdx, %rdi
callq 0x3190
cmpq $0x2f, %rax
ja 0xb03e
movq %r15, %rdi
callq 0x3190
movw $0x20, (%r15,%rax)
movq %r15, %rdi
callq 0x3190
cmpq $0x30, %rax
jb 0xb021
movq %r14, %rdi
callq 0x3190
cmpq $0x27, %rax
ja 0xb069
movq %r14, %rdi
callq 0x3190
movw $0x20, (%r14,%rax)
movq %r14, %rdi
callq 0x3190
cmpq $0x28, %rax
jb 0xb04c
movq %rbx, %rdi
callq 0x3190
cmpq $0xf, %rax
ja 0xb093
movq %rbx, %rdi
callq 0x3190
movw $0x20, (%rbx,%rax)
movq %rbx, %rdi
callq 0x3190
cmpq $0x10, %rax
jb 0xb077
leaq 0xa855(%rip), %rsi      # 0x158ef
xorl %r13d, %r13d
movq %r12, %rdi
movl %ebp, %edx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x3310
movb %r13b, (%r15)
movb %r13b, (%r14)
movb %r13b, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/boolarray.c
// Function: boolarray_create
boolarray_t *boolarray_create(uint32_t bitcount) {
	boolarray_t *result = malloc(sizeof(boolarray_t));
	result->bitcount = bitcount;
	result->flags = malloc((bitcount / 32) + 1);
	boolarray_clear(result);
	return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x10, %edi
callq 0x33b0
movq %rax, %r14
movl %ebx, 0x8(%rax)
shrl $0x5, %ebx
incl %ebx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x32d0
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/boolarray.c
// Function: boolarray_bit_set
void boolarray_bit_set(boolarray_t *_this, uint32_t i) {
	assert(i < _this->bitcount);
	uint32_t w = _this->flags[i / 32];
	w |= (1 << (i % 32));
	_this->flags[i / 32] = w;
}

// Assembly:
cmpl %esi, 0x8(%rdi)
jbe 0xb17b
movq (%rdi), %rax
movl %esi, %edx
movl $0x1, %edi
movl %esi, %ecx
shll %cl, %edi
shrl $0x5, %edx
orl %edi, (%rax,%rdx,4)
retq
pushq %rax
leaq 0xa77e(%rip), %rdi      # 0x15901
leaq 0xa78b(%rip), %rsi      # 0x15915
leaq 0xa790(%rip), %rcx      # 0x15921
movl $0x40, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/boolarray.c
// Function: boolarray_bit_clear
void boolarray_bit_clear(boolarray_t *_this, uint32_t i) {
	assert(i < _this->bitcount);
	uint32_t w = _this->flags[i / 32];
	w &= ~(1 << (i % 32));
	_this->flags[i / 32] = w;
}

// Assembly:
cmpl %esi, 0x8(%rdi)
jbe 0xb1b5
movq (%rdi), %rax
movl %esi, %edx
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movl %esi, %ecx
roll %cl, %edi
shrl $0x5, %edx
andl %edi, (%rax,%rdx,4)
retq
pushq %rax
leaq 0xa744(%rip), %rdi      # 0x15901
leaq 0xa751(%rip), %rsi      # 0x15915
leaq 0xa786(%rip), %rcx      # 0x15951
movl $0x47, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/boolarray.c
// Function: boolarray_print_diag
void boolarray_print_diag(boolarray_t *_this, FILE *stream, uint32_t bitcount, char *info) {
	int any = 0;
	unsigned start, end;
	if (bitcount <= 0 || bitcount > _this->bitcount)
		bitcount = _this->bitcount ;
		fprintf(stream, "%s - Dump of boolarray@%p, bits 0..%d: ", info, _this, bitcount-1);
	start = 0;
	while (start < bitcount) {
		// find next set bit
		while (start < bitcount && !boolarray_bit_get(_this, start))
			start++;
		// find next clr bit
		end = start;
		while (end < bitcount && boolarray_bit_get(_this, end))
			end++;
		if (start < bitcount) {
			if (!any)
				fprintf(stream, "bits set =\n");
			else
				fprintf(stream, ",");
			if (end - start > 1)
				fprintf(stream, "%d-%d", start, end - 1);
			else
				fprintf(stream, "%d", start);
			any = 1;
		}
		start = end;
	}
	if (!any)
		fprintf(stream, "no bits set.\n");
	else
		fprintf(stream, ".\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movq %rsi, %rax
movq %rdi, %r14
movl 0x8(%rdi), %ebx
leal -0x1(%r12), %r8d
cmpl %ebx, %r8d
movq %rsi, (%rsp)
jae 0xb24c
leaq 0xa778(%rip), %rsi      # 0x159b2
movq %rax, %rdi
movq %rcx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3310
jmp 0xb273
leal -0x1(%rbx), %r8d
leaq 0xa75b(%rip), %rsi      # 0x159b2
movq %rax, %rdi
movq %rcx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3310
movl %ebx, %r12d
cmpl $0x1, %ebx
jb 0xb34a
xorl %r15d, %r15d
xorl %ebx, %ebx
movl %r15d, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0xb1d5
movl %eax, %ebp
testl %eax, %eax
jne 0xb294
incl %r13d
cmpl %r12d, %r13d
jb 0xb27b
movl %r13d, %r15d
cmpl %r12d, %r13d
jae 0xb2b9
movl %r13d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0xb1d5
testl %eax, %eax
je 0xb2b9
incl %r15d
cmpl %r15d, %r12d
jne 0xb29f
movl %r12d, %r15d
testl %ebp, %ebp
je 0xb32f
testl %ebx, %ebx
je 0xb2d4
movl $0x2c, %edi
movq (%rsp), %rbx
movq %rbx, %rsi
callq 0x3290
jmp 0xb2f1
movl $0xb, %esi
movl $0x1, %edx
leaq 0xa6f5(%rip), %rdi      # 0x159da
movq (%rsp), %rbx
movq %rbx, %rcx
callq 0x3550
movl %r15d, %eax
subl %r13d, %eax
cmpl $0x2, %eax
jb 0xb316
leal -0x1(%r15), %ecx
movq %rbx, %rdi
leaq 0xa6dc(%rip), %rsi      # 0x159e6
movl %r13d, %edx
xorl %eax, %eax
callq 0x3310
jmp 0xb32a
movq %rbx, %rdi
leaq 0xad57(%rip), %rsi      # 0x16077
movl %r13d, %edx
xorl %eax, %eax
callq 0x3310
movl $0x1, %ebx
cmpl %r12d, %r15d
jb 0xb278
testl %ebx, %ebx
je 0xb34a
leaq 0x70a5(%rip), %rdi      # 0x123e8
movl $0x2, %esi
jmp 0xb356
leaq 0xa69b(%rip), %rdi      # 0x159ec
movl $0xd, %esi
movl $0x1, %edx
movq (%rsp), %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3550
nop
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_create
filesystem_t *filesystem_create(filesystem_type_t type, device_type_t device_type, int readonly,
		uint8_t *image_data, uint32_t image_data_size, boolarray_t *changedblocks) {
	filesystem_t *_this;
	_this = malloc(sizeof(filesystem_t));
	_this->type = type;
	_this->readonly = readonly;
	_this->xxdp = NULL;
	_this->rt11 = NULL;

	switch (type) {
	case fsXXDP:
		_this->xxdp = xxdp_filesystem_create(device_type, image_data, image_data_size,
				changedblocks);
		_this->file_count = &(_this->xxdp->file_count);
		break;
	case fsRT11:
		_this->rt11 = rt11_filesystem_create(device_type, image_data, image_data_size,
				changedblocks);
		_this->file_count = &(_this->rt11->file_count);
		break;
	default:
		fprintf(ferr, "filesystem_create(): unknown type");
	}
	return _this;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movq %rcx, %r15
movl %edx, %r14d
movl %esi, %r12d
movl %edi, %r13d
movl $0x20, %edi
callq 0x33b0
movq %rax, %rbx
movl %r13d, (%rax)
movl %r14d, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
cmpl $0x2, %r13d
je 0xb6d1
cmpl $0x1, %r13d
jne 0xb6f2
movl %r12d, %edi
movq %r15, %rsi
movl %ebp, %edx
movq (%rsp), %rcx
callq 0xbd54
movq %rax, 0x8(%rbx)
addq $0xa8, %rax
jmp 0xb6ec
movl %r12d, %edi
movq %r15, %rsi
movl %ebp, %edx
movq (%rsp), %rcx
callq 0xe5ec
movq %rax, 0x10(%rbx)
addq $0x8c, %rax
movq %rax, 0x18(%rbx)
jmp 0xb712
leaq 0x12b37(%rip), %rax     # 0x1e230
movq (%rax), %rcx
leaq 0xa311(%rip), %rdi      # 0x15a14
movl $0x21, %esi
movl $0x1, %edx
callq 0x3550
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_destroy
void filesystem_destroy(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		xxdp_filesystem_destroy(_this->xxdp);
		break;
	case fsRT11:
		rt11_filesystem_destroy(_this->rt11);
		break;
	default:
		fprintf(ferr, "xxdp_filesystem_destroy(): unknown type");
	}
	free(_this);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xb73f
cmpl $0x1, %eax
jne 0xb74a
movq 0x8(%rbx), %rdi
callq 0xc0d1
jmp 0xb76a
movq 0x10(%rbx), %rdi
callq 0xe85d
jmp 0xb76a
leaq 0x12adf(%rip), %rax     # 0x1e230
movq (%rax), %rcx
leaq 0xa2db(%rip), %rdi      # 0x15a36
movl $0x27, %esi
movl $0x1, %edx
callq 0x3550
movq %rbx, %rdi
popq %rbx
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_init
void filesystem_init(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_filesystem_init(_this->xxdp);
	case fsRT11:
		return rt11_filesystem_init(_this->rt11);
	default:
		fprintf(ferr, "filesystem_init(): unknown type");
	}
}

// Assembly:
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xb788
cmpl $0x1, %eax
jne 0xb791
movq 0x8(%rdi), %rdi
jmp 0xbf78
movq 0x10(%rdi), %rdi
jmp 0xe701
leaq 0x12a98(%rip), %rax     # 0x1e230
movq (%rax), %rcx
leaq 0xa2bc(%rip), %rdi      # 0x15a5e
movl $0x1f, %esi
movl $0x1, %edx
jmp 0x3550
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_parse
int filesystem_parse(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_filesystem_parse(_this->xxdp);
	case fsRT11:
		return rt11_filesystem_parse(_this->rt11);
	default:
		return error_set(ERROR_FILESYSTEM_INVALID, "Filesystem not supported");
	}
}

// Assembly:
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xb7c6
cmpl $0x1, %eax
jne 0xb7cf
movq 0x8(%rdi), %rdi
jmp 0xc11f
movq 0x10(%rdi), %rdi
jmp 0xe884
leaq 0xa2a8(%rip), %rsi      # 0x15a7e
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
jmp 0x9f73
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_file_add
int filesystem_file_add(filesystem_t *_this, char *hostfname, time_t hostfdate, mode_t hostmode,
		uint8_t *data, uint32_t data_size) {
	switch (_this->type) {
	case fsXXDP: {
		return xxdp_filesystem_file_add(_this->xxdp, hostfname, hostfdate, data, data_size);
	}
	case fsRT11: {
		char *streamname = NULL;
		char *ext = extract_extension(hostfname, 0); // only test, do not clip
		// is last extension a known streamname?
		if (ext)
			if (!strcasecmp(ext, RT11_STREAMNAME_DIREXT)
					|| !strcasecmp(ext, RT11_STREAMNAME_PREFIX))
				streamname = extract_extension(hostfname, 1); // now clip
		return rt11_filesystem_file_stream_add(_this->rt11, hostfname, streamname, hostfdate,
				hostmode, data, data_size);
	}
	default:
		return error_set(ERROR_FILESYSTEM_INVALID, "Filesystem not supported");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xb82b
cmpl $0x1, %eax
jne 0xb874
movq 0x8(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r8, %rcx
movl %ebp, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd39a
movl %ecx, 0xc(%rsp)
movq %r8, 0x10(%rsp)
xorl %r12d, %r12d
movq %r15, %rdi
xorl %esi, %esi
callq 0xab1f
testq %rax, %rax
je 0xb8a5
movq %rax, %rbx
leaq 0xa247(%rip), %rsi      # 0x15a97
movq %rax, %rdi
callq 0x3060
testl %eax, %eax
je 0xb895
leaq 0xa23b(%rip), %rsi      # 0x15a9e
movq %rbx, %rdi
callq 0x3060
testl %eax, %eax
je 0xb895
xorl %r12d, %r12d
jmp 0xb8a5
leaq 0xa203(%rip), %rsi      # 0x15a7e
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9f73
movq %r15, %rdi
movl $0x1, %esi
callq 0xab1f
movq %rax, %r12
movq 0x10(%r13), %rdi
movl %ebp, (%rsp)
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movl 0xc(%rsp), %r8d
movq 0x10(%rsp), %r9
callq 0xf788
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_render
int filesystem_render(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_filesystem_render(_this->xxdp);
	case fsRT11:
		return rt11_filesystem_render(_this->rt11);
	default:
		return error_set(ERROR_FILESYSTEM_INVALID, "Filesystem not supported");
	}
}

// Assembly:
movl (%rdi), %eax
cmpl $0x2, %eax
je 0xbb5b
cmpl $0x1, %eax
jne 0xbb64
movq 0x8(%rdi), %rdi
jmp 0xc8d6
movq 0x10(%rdi), %rdi
jmp 0xf1d3
leaq 0x9f13(%rip), %rsi      # 0x15a7e
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
xorl %eax, %eax
jmp 0x9f73
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/device_info.c
// Function: device_type_to_name
char *device_type_to_name(device_type_t device_type) {
	device_info_t *di  = (device_info_t*) search_tagged_array(device_info_table, sizeof(device_info_t),
			device_type);
	if (! di)
		return NULL ;
	else
		return di->device_name ;
}

// Assembly:
pushq %rax
movl %edi, %edx
leaq 0x10826(%rip), %rdi     # 0x1c4b0
movl $0x20, %esi
callq 0xb0ca
testq %rax, %rax
je 0xbc9f
movq 0x8(%rax), %rax
jmp 0xbca1
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/device_info.c
// Function: device_type_from_name
device_type_t device_type_from_name(char * name) {
	// search for name
	device_info_t *di ;
	for (di = device_info_table ; di->device_type ; di++)
		if (!strcasecmp(name, di->device_name))
			return di->device_type;
	return devNONE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x10803(%rip), %ebp     # 0x1c4b0
testl %ebp, %ebp
je 0xbce8
movq %rdi, %rbx
movq 0x107fd(%rip), %rsi     # 0x1c4b8
callq 0x3060
testl %eax, %eax
je 0xbcea
leaq 0x1080d(%rip), %r14     # 0x1c4d8
movl -0x8(%r14), %ebp
testl %ebp, %ebp
je 0xbce8
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3060
addq $0x20, %r14
testl %eax, %eax
jne 0xbccb
jmp 0xbcea
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/device_info.c
// Function: device_type_namelist
char *device_type_namelist() {
	static char buffer[1024];
	device_info_t *di ;
	buffer[0] = 0;
	for (di = device_info_table ; di->device_type ; di++) {
		if (strlen(buffer))
			strcat(buffer, ",");
		strcat(buffer, di->device_name);
	}
	return buffer;
}

// Assembly:
movb $0x0, 0x13788(%rip)     # 0x1f480
cmpl $0x0, 0x107b1(%rip)     # 0x1c4b0
je 0xbd4c
pushq %r14
pushq %rbx
pushq %rax
leaq 0x107c4(%rip), %r14     # 0x1c4d0
xorl %eax, %eax
leaq 0x1376b(%rip), %rbx     # 0x1f480
testb %al, %al
je 0xbd27
movq %rbx, %rdi
callq 0x3190
movw $0x2c, (%rax,%rbx)
movq -0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x3510
cmpl $0x0, (%r14)
je 0xbd45
movb 0x13741(%rip), %al      # 0x1f480
addq $0x20, %r14
jmp 0xbd15
addq $0x8, %rsp
popq %rbx
popq %r14
leaq 0x1372d(%rip), %rax     # 0x1f480
retq
// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_destroy
void xxdp_filesystem_destroy(xxdp_filesystem_t *_this) {
	xxdp_filesystem_init(_this); // free files
	free(_this->bootblock);
	free(_this->monitor);
	free(_this->bitmap);
	free(_this->mfd_blocklist);
	free(_this->ufd_blocklist);
	free(_this);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xbf78
movq 0x80(%rbx), %rdi
callq 0x3050
movq 0x88(%rbx), %rdi
callq 0x3050
movq 0x90(%rbx), %rdi
callq 0x3050
movq 0x98(%rbx), %rdi
callq 0x3050
movq 0xa0(%rbx), %rdi
callq 0x3050
movq %rbx, %rdi
popq %rbx
jmp 0x3050