LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3190
cmpq $0x30, %rax
jae 0xe27c
movq -0x18(%rbp), %rdi
leaq 0xf4ef(%rip), %rsi      # 0x1d764
callq 0x3500
jmp 0xe25b
jmp 0xe27e
movq -0x20(%rbp), %rdi
callq 0x3190
cmpq $0x28, %rax
jae 0xe29f
movq -0x20(%rbp), %rdi
leaq 0xf4cc(%rip), %rsi      # 0x1d764
callq 0x3500
jmp 0xe27e
jmp 0xe2a1
movq -0x28(%rbp), %rdi
callq 0x3190
cmpq $0x10, %rax
jae 0xe2c2
movq -0x28(%rbp), %rdi
leaq 0xf4a9(%rip), %rsi      # 0x1d764
callq 0x3500
jmp 0xe2a1
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq 0xe4d7(%rip), %rsi      # 0x1c7b3
movb $0x0, %al
callq 0x3300
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/utils.c
// Function: search_tagged_array
void *search_tagged_array(void *base, int element_size, int search_val) {
	uint8_t *ptr = base;
	int cur_tag;

	cur_tag = *(int *) ptr;
	while (cur_tag != search_val && cur_tag != 0) {
		ptr += element_size;
		cur_tag = *(int *) ptr;
	}
	if (cur_tag)
		return ptr;
	else
		return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0x18(%rbp), %ecx
movb %al, -0x25(%rbp)
je 0xe336
cmpl $0x0, -0x24(%rbp)
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0xe33f
jmp 0xe35b
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0xe31f
cmpl $0x0, -0x24(%rbp)
je 0xe36b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe373
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x10, %edi
callq 0x33a0
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x4(%rbp), %eax
shrl $0x5, %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x33a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
callq 0xe3e0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xe46d
jmp 0xe48c
leaq 0xe351(%rip), %rdi      # 0x1c7c5
leaq 0xe35e(%rip), %rsi      # 0x1c7d9
movl $0x40, %edx
leaq 0xe35e(%rip), %rcx      # 0x1c7e5
callq 0x3200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x5, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
andl $0x1f, %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x5, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xe4ed
jmp 0xe50c
leaq 0xe2d1(%rip), %rdi      # 0x1c7c5
leaq 0xe2de(%rip), %rsi      # 0x1c7d9
movl $0x47, %edx
leaq 0xe30e(%rip), %rcx      # 0x1c815
callq 0x3200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x5, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
andl $0x1f, %ecx
movl $0x1, %eax
shll %cl, %eax
xorl $-0x1, %eax
andl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x5, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesort.c
// Function: name_compare
static int name_compare(const void *n1, const void *n2) {
	sort_name_entry_t *name1 = (sort_name_entry_t *) n1;
	sort_name_entry_t *name2 = (sort_name_entry_t *) n2;
	if (name1->group < name2->group)
		return -1;
	else if (name1->group > name2->group)
		return 1;
	else
		return strcasecmp(name1->name, name2->name);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xebd9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xec08
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0xebf2
movl $0x1, -0x4(%rbp)
jmp 0xec08
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x3050
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_name
char *filesystem_name(filesystem_type_t type) {
	switch (type) {
	case fsNONE:
		return NULL ;
	case fsXXDP:
		return "XXDP";
	case fsRT11:
		return "RT11";
	default:
		return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0xec47
jmp 0xec33
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0xec51
jmp 0xec3d
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0xec5e
jmp 0xec6b
movq $0x0, -0x8(%rbp)
jmp 0xec73
leaq 0xd12e(%rip), %rax      # 0x1bd86
movq %rax, -0x8(%rbp)
jmp 0xec73
leaq 0xd126(%rip), %rax      # 0x1bd8b
movq %rax, -0x8(%rbp)
jmp 0xec73
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movq %r9, -0x28(%rbp)
movl $0x20, %edi
callq 0x33a0
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movl -0x4(%rbp), %eax
movl %eax, -0x34(%rbp)
subl $0x1, %eax
je 0xeced
jmp 0xece3
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0xed24
jmp 0xed5b
movl -0x8(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0xf780
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0xa8, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0xed73
movl -0x8(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x136e0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x8c, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0xed73
leaq 0x167ce(%rip), %rax     # 0x25530
movq (%rax), %rdi
leaq 0xdb6e(%rip), %rsi      # 0x1c8da
movb $0x0, %al
callq 0x3300
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0xeda6
jmp 0xed9c
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0xedb5
jmp 0xedc4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xfe30
jmp 0xeddc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x13a70
jmp 0xeddc
leaq 0x16765(%rip), %rax     # 0x25530
movq (%rax), %rdi
leaq 0xdb27(%rip), %rsi      # 0x1c8fc
movb $0x0, %al
callq 0x3300
movq -0x8(%rbp), %rdi
callq 0x3040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc(%rbp)
subl $0x1, %eax
je 0xee16
jmp 0xee0c
movl -0xc(%rbp), %eax
subl $0x2, %eax
je 0xee25
jmp 0xee34
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xfb60
jmp 0xee4c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x138b0
jmp 0xee4c
leaq 0x166f5(%rip), %rax     # 0x25530
movq (%rax), %rdi
leaq 0xdadf(%rip), %rsi      # 0x1c924
movb $0x0, %al
callq 0x3300
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xee86
jmp 0xee7c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xee98
jmp 0xeeaa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xfeb0
movl %eax, -0x4(%rbp)
jmp 0xeec0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x13b20
movl %eax, -0x4(%rbp)
jmp 0xeec0
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
leaq 0xda8e(%rip), %rsi      # 0x1c944
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x1, %eax
je 0xef0c
jmp 0xeeff
movl -0x4c(%rbp), %eax
subl $0x2, %eax
je 0xef31
jmp 0xefb9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %r8d
callq 0x11c10
movl %eax, -0x4(%rbp)
jmp 0xefcf
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xdc90
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xef8d
movq -0x48(%rbp), %rdi
leaq 0xda03(%rip), %rsi      # 0x1c95d
callq 0x3050
cmpl $0x0, %eax
je 0xef79
movq -0x48(%rbp), %rdi
leaq 0xd9f5(%rip), %rsi      # 0x1c964
callq 0x3050
cmpl $0x0, %eax
jne 0xef8b
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xdc90
movq %rax, -0x40(%rbp)
jmp 0xef8d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %r9
movl -0x34(%rbp), %eax
movl %eax, (%rsp)
callq 0x150e0
movl %eax, -0x4(%rbp)
jmp 0xefcf
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
leaq 0xd97f(%rip), %rsi      # 0x1c944
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf336
jmp 0xf32c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf348
jmp 0xf35a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10b50
movl %eax, -0x4(%rbp)
jmp 0xf370
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x148c0
movl %eax, -0x4(%rbp)
jmp 0xf370
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
leaq 0xd5de(%rip), %rsi      # 0x1c944
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_patch
int filesystem_patch(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return ERROR_OK; // nothing to do
	case fsRT11:
		return rt11_filesystem_patch(_this->rt11);
	default:
		return error_set(ERROR_FILESYSTEM_INVALID, "Filesystem not supported");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf3a6
jmp 0xf39c
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf3af
jmp 0xf3c1
movl $0x0, -0x4(%rbp)
jmp 0xf3d7
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x146f0
movl %eax, -0x4(%rbp)
jmp 0xf3d7
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
leaq 0xd577(%rip), %rsi      # 0x1c944
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_unpatch
int filesystem_unpatch(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return ERROR_OK; // nothing to do
	case fsRT11:
		return rt11_filesystem_unpatch(_this->rt11);
	default:
		return error_set(ERROR_FILESYSTEM_INVALID, "Filesystem not supported");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf406
jmp 0xf3fc
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf40f
jmp 0xf421
movl $0x0, -0x4(%rbp)
jmp 0xf437
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x14500
movl %eax, -0x4(%rbp)
jmp 0xf437
movl $0xfffffffc, %edi       # imm = 0xFFFFFFFC
leaq 0xd517(%rip), %rsi      # 0x1c944
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_print_dir
void filesystem_print_dir(filesystem_t *_this, FILE *stream) {
	switch (_this->type) {
	case fsXXDP:
		xxdp_filesystem_print_dir(_this->xxdp, stream);
		break;
	case fsRT11:
		rt11_filesystem_print_dir(_this->rt11, stream);
		break;
	default:
		;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf46a
jmp 0xf460
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf47d
jmp 0xf490
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12b20
jmp 0xf492
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x163c0
jmp 0xf492
jmp 0xf492
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_print_diag
void filesystem_print_diag(filesystem_t *_this, FILE *stream) {
	switch (_this->type) {
	case fsXXDP:
		xxdp_filesystem_print_diag(_this->xxdp, stream);
		break;
	case fsRT11:
		rt11_filesystem_print_diag(_this->rt11, stream);
		break;
	default:
		;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf4ca
jmp 0xf4c0
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf4dd
jmp 0xf4f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12e00
jmp 0xf4f2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x165c0
jmp 0xf4f2
jmp 0xf4f2
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_filename_to_host
char *filesystem_filename_to_host(filesystem_t *_this, char *filnam, char *ext,
		char *streamname) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_filename_to_host(filnam, ext);
	case fsRT11:
		return rt11_filename_to_host(filnam, ext, streamname);
		break;
	default:
		return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x1, %eax
je 0xf532
jmp 0xf528
movl -0x2c(%rbp), %eax
subl $0x2, %eax
je 0xf545
jmp 0xf55c
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13290
movq %rax, -0x8(%rbp)
jmp 0xf564
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x165f0
movq %rax, -0x8(%rbp)
jmp 0xf564
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_filename_from_host
char *filesystem_filename_from_host(filesystem_t *_this, char *hostfname, char *filnam,
		char *ext) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_filename_from_host(hostfname, filnam, ext);
	case fsRT11:
		return rt11_filename_from_host(hostfname, filnam, ext);
		break;
	default:
		return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x1, %eax
je 0xf5a2
jmp 0xf598
movl -0x2c(%rbp), %eax
subl $0x2, %eax
je 0xf5b9
jmp 0xf5d0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x12110
movq %rax, -0x8(%rbp)
jmp 0xf5d8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x15960
movq %rax, -0x8(%rbp)
jmp 0xf5d8
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/j-hoppe[P]tu58fs/filesystem.c
// Function: filesystem_fileorder
char **filesystem_fileorder(filesystem_t *_this) {
	switch (_this->type) {
	case fsXXDP:
		return xxdp_fileorder;
	case fsRT11:
		return rt11_fileorder;
	default:
		return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x1, %eax
je 0xf612
jmp 0xf608
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0xf61f
jmp 0xf62c
leaq 0x142b7(%rip), %rax     # 0x238d0
movq %rax, -0x8(%rbp)
jmp 0xf634
leaq 0x144ea(%rip), %rax     # 0x23b10
movq %rax, -0x8(%rbp)
jmp 0xf634
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %edx
leaq 0x140fb(%rip), %rdi     # 0x23750
movl $0x20, %esi
callq 0xe300
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xf674
movq $0x0, -0x8(%rbp)
jmp 0xf680
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x140ad(%rip), %rax     # 0x23750
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf6e1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3050
cmpl $0x0, %eax
jne 0xf6d1
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xf6e8
jmp 0xf6d3
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0xf6a7
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/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, 0x17071(%rip)     # 0x26780
leaq 0x1403a(%rip), %rax     # 0x23750
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf76a
leaq 0x17056(%rip), %rdi     # 0x26780
callq 0x3190
cmpq $0x0, %rax
je 0xf748
leaq 0x17044(%rip), %rdi     # 0x26780
leaq 0xd167(%rip), %rsi      # 0x1c8aa
callq 0x3500
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x17029(%rip), %rdi     # 0x26780
callq 0x3500
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x8(%rbp)
jmp 0xf71a
leaq 0x1700f(%rip), %rax     # 0x26780
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfb60
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rdi
callq 0x3040
movq -0x8(%rbp), %rdi
callq 0x3040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_parse
int xxdp_filesystem_parse(xxdp_filesystem_t *_this) {
	int i ;
	xxdp_filesystem_init(_this);

	// read bootblock 0. may consists of 00's
	parse_stream(_this, _this->bootblock, _this->bootblock->blocknr, 1);
	// read monitor: from defined start until end of preallocated area, about 32
	parse_stream(_this, _this->monitor, _this->monitor->blocknr,
			_this->preallocated_blockcount - _this->monitor->blocknr);

	parse_mfd(_this);
	parse_bitmap(_this);
	parse_ufd(_this);

	// read data for all user files
	for (i = 0; i < _this->file_count; i++)
		parse_file_data(_this, _this->file[i]);

	xxdp_filesystem_mark_files_as_changed(_this);

	return ERROR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfb60
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movl $0x1, %ecx
movzwl (%rax), %edx
callq 0xffa0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movw (%rax), %cx
movq -0x8(%rbp), %rax
movzwl 0x50(%rax), %eax
movq -0x8(%rbp), %rdx
movq 0x88(%rdx), %rdx
movzwl (%rdx), %edx
subl %edx, %eax
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0xffa0
movq -0x8(%rbp), %rdi
callq 0x10030
movq -0x8(%rbp), %rdi
callq 0x10450
movq -0x8(%rbp), %rdi
callq 0x10630
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jge 0xff81
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0xb0(%rax,%rcx,8), %rsi
callq 0x10930
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xff4e
movq -0x8(%rbp), %rdi
callq 0x10a70
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: parse_stream
static void parse_stream(xxdp_filesystem_t *_this, xxdp_multiblock_t *multiblock,
		xxdp_blocknr_t start, xxdp_blocknr_t blockcount) {
	multiblock->blockcount = blockcount;
	multiblock->blocknr = start;
	multiblock->data_size = XXDP_BLOCKSIZE * blockcount;
	multiblock->data = malloc(multiblock->data_size);
	memcpy(multiblock->data, IMAGE_BLOCKNR2PTR(_this, start), multiblock->data_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %cx, %ax
movw %dx, %cx
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movw -0x14(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movw -0x12(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movzwl -0x14(%rbp), %ecx
shll $0x9, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edi
callq 0x33a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movzwl -0x12(%rbp), %eax
shll $0x9, %eax
cltq
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
callq 0x3330
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: parse_file_data
static void parse_file_data(xxdp_filesystem_t *_this, xxdp_file_t *f) {
	unsigned i;
	unsigned block_datasize = XXDP_BLOCKSIZE - 2; // data amount in block, after link word
	uint8_t *src, *dst;
	if (f->data)
		free(f->data);
	f->data_size = f->blocklist.count * block_datasize;
	f->data = malloc(f->data_size);
	dst = f->data;
	for (i = 0; i < f->blocklist.count; i++) {
		// cat data from all blocks
		int blknr = f->blocklist.blocknr[i];
		src = IMAGE_BLOCKNR2PTR(_this, blknr) + 2; // skip link
		memcpy(dst, src, block_datasize);
		dst += block_datasize;
		assert(dst <= f->data + f->data_size);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1fe, -0x18(%rbp)     # imm = 0x1FE
movq -0x10(%rbp), %rax
cmpq $0x0, 0x888(%rax)
je 0x10965
movq -0x10(%rbp), %rax
movq 0x888(%rax), %rdi
callq 0x3040
movq -0x10(%rbp), %rax
movl (%rax), %ecx
imull -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x884(%rax)
movq -0x10(%rbp), %rax
movl 0x884(%rax), %eax
movl %eax, %edi
callq 0x33a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x888(%rax)
movq -0x10(%rbp), %rax
movq 0x888(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x10a5b
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movzwl 0x4(%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll $0x9, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
callq 0x3330
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x888(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x884(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x10a2c
jmp 0x10a4b
leaq 0xc6fb(%rip), %rdi      # 0x1d12e
leaq 0xbfe1(%rip), %rsi      # 0x1ca1b
movl $0x243, %edx            # imm = 0x243
leaq 0xc706(%rip), %rcx      # 0x1d14c
callq 0x3200
jmp 0x10a4d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x109ae
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_mark_files_as_changed
static void xxdp_filesystem_mark_files_as_changed(xxdp_filesystem_t *_this) {
	int file_idx;
	unsigned j;
	for (file_idx = 0; file_idx < _this->file_count; file_idx++) {
		xxdp_file_t *f = _this->file[file_idx];
		f->changed = 0;
		if (_this->image_changed_blocks)
			for (j = 0; !f->changed && j < f->blocklist.count; j++) {
				unsigned blknr = f->blocklist.blocknr[j];
				f->changed |= boolarray_bit_get(_this->image_changed_blocks, blknr);
			}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jge 0x10b42
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0xb0(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, 0x8c8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x10b32
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, 0x8c8(%rcx)
movb %al, -0x1d(%rbp)
jne 0x10ae8
movl -0x10(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
setb %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x10af1
jmp 0x10b30
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %ecx
movzwl 0x4(%rax,%rcx,2), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0xe560
movl %eax, %edx
movq -0x18(%rbp), %rax
movzbl 0x8c8(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x8c8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x10ac7
jmp 0x10b32
jmp 0x10b34
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x10a83
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_render
int xxdp_filesystem_render(xxdp_filesystem_t *_this) {
	int file_idx;
	unsigned needed_size = (int) _this->blockcount * XXDP_BLOCKSIZE;

	// calc blocklists and sizes
	if (xxdp_filesystem_layout(_this))
		return error_code; // overflow

	if (needed_size > _this->image_size)
		// more bytes needed than image provides. Expand?
		return error_set(ERROR_FILESYSTEM_OVERFLOW,
				"Image only %d bytes large, filesystem needs %d *%d = %d.", _this->image_size,
				_this->blockcount, XXDP_BLOCKSIZE, needed_size);

	// format media, all 0's
	memset(_this->image_data, 0, _this->image_size);

	render_multiblock(_this, _this->bootblock);
	render_multiblock(_this, _this->monitor);

	render_bitmap(_this);
	render_mfd(_this);
	render_ufd(_this);

	// read data for all user files
	for (file_idx = 0; file_idx < _this->file_count; file_idx++)
		render_file_data(_this, _this->file[file_idx]);
	return ERROR_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
shll $0x9, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10c70
cmpl $0x0, %eax
je 0x10b88
leaq 0x149ba(%rip), %rax     # 0x25538
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x10c62
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x10bc7
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %ecx
movl -0x18(%rbp), %r9d
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
leaq 0xbef1(%rip), %rsi      # 0x1caa3
movl $0x200, %r8d            # imm = 0x200
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
jmp 0x10c62
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x3220
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rsi
callq 0x111e0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rsi
callq 0x111e0
movq -0x10(%rbp), %rdi
callq 0x11230
movq -0x10(%rbp), %rdi
callq 0x113b0
movq -0x10(%rbp), %rdi
callq 0x117a0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jge 0x10c5b
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0xb0(%rax,%rcx,8), %rsi
callq 0x11ab0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10c28
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: render_file_data
static void render_file_data(xxdp_filesystem_t *_this, xxdp_file_t *f) {
	int bytestocopy = f->data_size;
	unsigned i;
	uint8_t *src, *dst;
	src = f->data;
	for (i = 0; i < f->blocklist.count; i++) {
		int blknr = f->blocklist.blocknr[i];
		int block_datasize; // data amount in this block
		assert(bytestocopy);
		dst = IMAGE_BLOCKNR2PTR(_this, blknr) + 2; // write behind link word

		// data amount =n block without link word
		block_datasize = XXDP_BLOCKSIZE - 2;
		// default: transfer full block
		if (bytestocopy < block_datasize) // EOF?
			block_datasize = bytestocopy;
		memcpy(dst, src, block_datasize);
		src += block_datasize;
		bytestocopy -= block_datasize;
		assert(src <= f->data + f->data_size);
	}
	assert(bytestocopy == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x884(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x888(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x11bd7
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movzwl 0x4(%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x11b09
jmp 0x11b28
leaq 0xb7cb(%rip), %rdi      # 0x1d2db
leaq 0xaf04(%rip), %rsi      # 0x1ca1b
movl $0x38a, %edx            # imm = 0x38A
leaq 0xb7c4(%rip), %rcx      # 0x1d2e7
callq 0x3200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
shll $0x9, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl $0x1fe, -0x30(%rbp)     # imm = 0x1FE
movl -0x14(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x11b58
movl -0x14(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x30(%rbp), %rdx
callq 0x3330
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x888(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x884(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x11ba8
jmp 0x11bc7
leaq 0xb772(%rip), %rdi      # 0x1d321
leaq 0xae65(%rip), %rsi      # 0x1ca1b
movl $0x395, %edx            # imm = 0x395
leaq 0xb725(%rip), %rcx      # 0x1d2e7
callq 0x3200
jmp 0x11bc9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x11ae3
cmpl $0x0, -0x14(%rbp)
jne 0x11bdf
jmp 0x11bfe
leaq 0xb759(%rip), %rdi      # 0x1d33f
leaq 0xae2e(%rip), %rsi      # 0x1ca1b
movl $0x397, %edx            # imm = 0x397
leaq 0xb6ee(%rip), %rcx      # 0x1d2e7
callq 0x3200
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_layout_test
static int xxdp_filesystem_layout_test(xxdp_filesystem_t *_this, int data_size) {
	int ufd_blocks_needed;
	int data_blocks_needed;
	int available_blocks;
	int i;

	// 1 UFD = 28 files, blocks are 510
	ufd_blocks_needed = NEEDED_BLOCKS(XXDP_UFD_ENTRIES_PER_BLOCK, _this->file_count + 1);
	// sum up existing files
	data_blocks_needed = 0;
	for (i = 0; i < _this->file_count; i++) {
		xxdp_file_t *f = _this->file[i];
		int n = NEEDED_BLOCKS(XXDP_BLOCKSIZE-2, f->data_size);
// fprintf(stderr,"layout_test(): file %d %s.%s start from %d, needs %d blocks\n", i, f->filnam, f->ext,
//				_this->preallocated_blockcount+ data_blocks_needed, n);
		data_blocks_needed += n;
	}
	// space for the new file
	data_blocks_needed += NEEDED_BLOCKS(XXDP_BLOCKSIZE-2, data_size);

	// we have the space after the preallocated area.
	// It holds all file data and excess UFD blocks
	// the first "ufd_blocks_num (from RADI) fit in preallocated space
	available_blocks = _this->blockcount - _this->preallocated_blockcount;
	if (ufd_blocks_needed > _this->radi.ufd_blocks_num)
		data_blocks_needed += ufd_blocks_needed - _this->radi.ufd_blocks_num;
	if (data_blocks_needed > available_blocks)
		return error_set(ERROR_FILESYSTEM_OVERFLOW, "xxdp_filesystem_layout_test");
	return ERROR_OK; // fit
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %eax
addl $0x1, %eax
addl $0x1c, %eax
subl $0x1, %eax
movl $0x1c, %ecx
cltd
idivl %ecx
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jge 0x12090
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq 0xb0(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x884(%rax), %eax
addl $0x1fe, %eax            # imm = 0x1FE
subl $0x1, %eax
movl $0x1fe, %ecx            # imm = 0x1FE
xorl %edx, %edx
divl %ecx
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1203b
movl -0x14(%rbp), %eax
addl $0x1fe, %eax            # imm = 0x1FE
subl $0x1, %eax
movl $0x1fe, %ecx            # imm = 0x1FE
cltd
idivl %ecx
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4c(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x50(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x2e(%rcx), %ecx
cmpl %ecx, %eax
jle 0x120df
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x2e(%rcx), %ecx
subl %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x120ff
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
leaq 0xb25d(%rip), %rsi      # 0x1d350
movb $0x0, %al
callq 0xcd70
movl %eax, -0x4(%rbp)
jmp 0x12106
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filesystem_print_dir
void xxdp_filesystem_print_dir(xxdp_filesystem_t *_this, FILE *stream) {
	int file_idx;
	// header
	fprintf(stream, "%s\n", xxdp_dir_line(_this, -1));
	fprintf(stream, "\n");
	for (file_idx = 0; file_idx < _this->file_count; file_idx++)
		fprintf(stream, "%s\n", xxdp_dir_line(_this, file_idx));

	fprintf(stream, "\n");
	fprintf(stream, "FREE BLOCKS: %d\n", _this->blockcount - xxdp_bitmap_count(_this));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x12c10
movq -0x20(%rbp), %rdi
movq %rax, %rdx
leaq 0xa140(%rip), %rsi      # 0x1cc94
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rdi
leaq 0x9b5d(%rip), %rsi      # 0x1c6c3
movb $0x0, %al
callq 0x3300
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xa8(%rcx), %eax
jge 0x12bb7
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x12c10
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0xa0ef(%rip), %rsi      # 0x1cc94
movb $0x0, %al
callq 0x3300
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x12b74
movq -0x10(%rbp), %rdi
leaq 0x9b01(%rip), %rsi      # 0x1c6c3
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12cf0
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %rdi
subl %eax, %edx
leaq 0x9fbc(%rip), %rsi      # 0x1cbb0
movb $0x0, %al
callq 0x3300
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_dir_line
static char *xxdp_dir_line(xxdp_filesystem_t *_this, int fileidx) {
	static char buff[80];
	xxdp_file_t *f;
	if (fileidx < 0)
		return "ENTRY# FILNAM.EXT        DATE          LENGTH  START   VERSION";
	f = _this->file[fileidx];
	sprintf(buff, "%5d  %6s.%-3s%15s%11d    %06o", fileidx + 1, f->filnam, f->ext,
			xxdp_date_text(f->date), f->blocklist.count, f->blocklist.blocknr[0]);
	return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x12c35
leaq 0xa925(%rip), %rax      # 0x1d551
movq %rax, -0x8(%rbp)
jmp 0x12ce4
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0xb0(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
addq $0x808, %rax            # imm = 0x808
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x858, %rax            # imm = 0x858
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rcx
addq $0x890, %rcx            # imm = 0x890
movq 0x30(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x30(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x135e0
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %r8
movq %rax, %r9
movq -0x20(%rbp), %rax
movl (%rax), %r10d
movq -0x20(%rbp), %rax
movzwl 0x4(%rax), %eax
leaq 0x2a24d(%rip), %rdi     # 0x3cf10
leaq 0xa8c6(%rip), %rsi      # 0x1d590
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3520
leaq 0x2a230(%rip), %rax     # 0x3cf10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_bitmap_count
static int xxdp_bitmap_count(xxdp_filesystem_t *_this) {
	int result = 0;
	unsigned i, j, k;
	for (i = 0; i < _this->bitmap->blocklist.count; i++) {
		xxdp_blocknr_t map_blknr = _this->bitmap->blocklist.blocknr[i];
		unsigned map_wordcount;
		map_wordcount = xxdp_image_get_word(_this, map_blknr, 2);
		for (j = 0; j < map_wordcount; j++) {
			uint16_t map_flags = xxdp_image_get_word(_this, map_blknr, j + 4);
			// 16 flags per word. count "1" bits
			if (map_flags == 0xffff)
				result += 16; // most of time
			else
				for (k = 0; k < 16; k++)
					if (map_flags & (1 << k))
						result++;
		}
	}
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rcx
cmpl (%rcx), %eax
jae 0x12ded
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movl -0x10(%rbp), %ecx
movw 0x4(%rax,%rcx,2), %ax
movw %ax, -0x1a(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %edx
movzwl -0x1a(%rbp), %esi
callq 0x13420
movzwl %ax, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x12ddd
movq -0x8(%rbp), %rdi
movw -0x1a(%rbp), %cx
movl -0x14(%rbp), %eax
addl $0x4, %eax
movzwl %cx, %esi
movzbl %al, %edx
callq 0x13420
movw %ax, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x12d91
movl -0xc(%rbp), %eax
addl $0x10, %eax
movl %eax, -0xc(%rbp)
jmp 0x12dcd
movl $0x0, -0x18(%rbp)
cmpl $0x10, -0x18(%rbp)
jae 0x12dcb
movzwl -0x22(%rbp), %eax
movl -0x18(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x12dbe
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x12dc0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x12d98
jmp 0x12dcd
jmp 0x12dcf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x12d56
jmp 0x12ddf
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x12d0a
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/xxdp.c
// Function: xxdp_filename_to_host
char *xxdp_filename_to_host(char *filnam, char *ext) {
	static char result[80];
	char _filnam[80], _ext[80];
	// remove surrounding spaces.
	// all XXDP filename chars are valid host chars (" ", "$", "%")
	// return concat "filnam.ext"
	strcpy(_filnam, strtrim(filnam));
	strcpy(_ext, strtrim(ext));
	if (!strlen(_filnam))
		strcpy(_filnam, "_");
	strcpy(result, _filnam);
	if (strlen(_ext)) {
		strcat(result, ".");
		strcat(result, _ext);
	}
	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd610
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x30c0
leaq -0xb0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd610
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x30c0
leaq -0x60(%rbp), %rdi
callq 0x3190
cmpq $0x0, %rax
jne 0x1330b
leaq -0x60(%rbp), %rdi
leaq 0x90bf(%rip), %rsi      # 0x1c3c5
callq 0x30c0
leaq -0x60(%rbp), %rsi
leaq 0x152da(%rip), %rdi     # 0x285f0
callq 0x30c0
leaq -0xb0(%rbp), %rdi
callq 0x3190
cmpq $0x0, %rax
je 0x13353
leaq 0x152bc(%rip), %rdi     # 0x285f0
leaq 0x7ca7(%rip), %rsi      # 0x1afe2
callq 0x3500
leaq -0xb0(%rbp), %rsi
leaq 0x152a2(%rip), %rdi     # 0x285f0
callq 0x3500
leaq 0x15296(%rip), %rax     # 0x285f0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)