LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/log.c
// Function: logfmt
SOLOCAL void logfmt(LogLevel level, const char *format, ...)
{
    if (logsilent && level > L_ERROR) return;
    if (level > maxlevel) return;
    char buf[8192];
    va_list ap;
    va_start(ap, format);
    vsnprintf(buf, 8192, format, ap);
    va_end(ap);
    logmsg(level, buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20e0, %rsp           # imm = 0x20E0
testb %al, %al
je 0x5af7
movaps %xmm0, -0x20b0(%rbp)
movaps %xmm1, -0x20a0(%rbp)
movaps %xmm2, -0x2090(%rbp)
movaps %xmm3, -0x2080(%rbp)
movaps %xmm4, -0x2070(%rbp)
movaps %xmm5, -0x2060(%rbp)
movaps %xmm6, -0x2050(%rbp)
movaps %xmm7, -0x2040(%rbp)
movq %r9, -0x20b8(%rbp)
movq %r8, -0x20c0(%rbp)
movq %rcx, -0x20c8(%rbp)
movq %rdx, -0x20d0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, 0x13e37(%rip)     # 0x19958
je 0x5b2b
cmpl $0x1, -0x4(%rbp)
jbe 0x5b2b
jmp 0x5b91
movl -0x4(%rbp), %eax
cmpl 0x138dc(%rip), %eax     # 0x19410
jbe 0x5b38
jmp 0x5b91
leaq -0x2030(%rbp), %rax
leaq -0x20e0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x2010(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x2030(%rbp), %rcx
movl $0x2000, %esi           # imm = 0x2000
callq 0x5170
leaq -0x2030(%rbp), %rax
movl -0x4(%rbp), %edi
leaq -0x2010(%rbp), %rsi
callq 0x5a60
addq $0x20e0, %rsp           # imm = 0x20E0
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/log.c
// Function: writeFile
static void writeFile(LogLevel level, const char *message, void *data)
{
    FILE *target = data;
    fputs(levels[level], target);
    fputs(message, target);
    fputc('\n', target);
    fflush(target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x13809(%rip), %rax     # 0x19420
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
callq 0x5300
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5300
movq -0x20(%rbp), %rsi
movl $0xa, %edi
callq 0x53e0
movq -0x20(%rbp), %rdi
callq 0x5520
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/sector.c
// Function: Sector_createAt
SOEXPORT Sector *Sector_createAt(uint8_t tracknum, uint8_t sectornum)
{
    Sector *self = Sector_create();
    Sector_setTrackNum(self, tracknum);
    Sector_setSectorNum(self, sectornum);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
callq 0x5430
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movzbl -0x1(%rbp), %esi
callq 0x5080
movq -0x10(%rbp), %rdi
movzbl -0x2(%rbp), %esi
callq 0x5710
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/track.c
// Function: Track_create
SOEXPORT Track *Track_create(uint8_t tracknum)
{
    uint8_t sectors = getsectors(tracknum);
    if (!sectors)
    {
        logfmt(L_ERROR, "Track: invalid track number %hhu.", tracknum);
        return 0;
    }
    Track *self = xmalloc(sizeof *self + sectors * sizeof *self->sector);
    for (uint8_t sectornum = 0; sectornum < sectors; ++sectornum)
    {
	self->sector[sectornum] = Sector_createAt(tracknum, sectornum);
    }
    self->tracknum = tracknum;
    self->sectors = sectors;
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %edi
callq 0x5ed0
movb %al, -0xa(%rbp)
cmpb $0x0, -0xa(%rbp)
jne 0x5e51
movzbl -0x9(%rbp), %edx
movl $0x1, %edi
leaq 0xd1f2(%rip), %rsi      # 0x13032
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x5ebc
movzbl -0xa(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
addq $0x8, %rdi
callq 0x58d0
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movzbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x5ea1
movb -0x9(%rbp), %al
movzbl %al, %edi
movzbl -0x19(%rbp), %esi
callq 0x5770
movq %rax, %rdx
movq -0x18(%rbp), %rax
movzbl -0x19(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x5e6c
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0xa(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/track.c
// Function: getsectors
static uint8_t getsectors(uint8_t tracknum)
{
    if (!tracknum || tracknum > 42) return 0;
    if (tracknum < 18) return 21;
    if (tracknum < 25) return 19;
    if (tracknum < 31) return 18;
    return 17;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x2(%rbp)
cmpb $0x0, -0x2(%rbp)
je 0x5ee9
movzbl -0x2(%rbp), %eax
cmpl $0x2a, %eax
jle 0x5eef
movb $0x0, -0x1(%rbp)
jmp 0x5f20
movzbl -0x2(%rbp), %eax
cmpl $0x12, %eax
jge 0x5efe
movb $0x15, -0x1(%rbp)
jmp 0x5f20
movzbl -0x2(%rbp), %eax
cmpl $0x19, %eax
jge 0x5f0d
movb $0x13, -0x1(%rbp)
jmp 0x5f20
movzbl -0x2(%rbp), %eax
cmpl $0x1f, %eax
jge 0x5f1c
movb $0x12, -0x1(%rbp)
jmp 0x5f20
movb $0x11, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/track.c
// Function: Track_rsector
SOEXPORT const Sector *Track_rsector(const Track *self, uint8_t sectornum)
{
    if (sectornum >= self->sectors)
    {
        logfmt(L_WARNING, "Track_rsector: invalid sector number %hhu "
		"requested.", sectornum);
        return 0;
    }
    return self->sector[sectornum];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jl 0x5f73
movzbl -0x11(%rbp), %edx
movl $0x2, %edi
leaq 0xd0f2(%rip), %rsi      # 0x13054
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x5f84
movq -0x10(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/track.c
// Function: Track_sector
SOEXPORT Sector *Track_sector(Track *self, uint8_t sectornum)
{
    if (sectornum >= self->sectors)
    {
        logfmt(L_WARNING, "Track_sector: invalid sector number %hhu requested.",
                sectornum);
        return 0;
    }
    return self->sector[sectornum];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jl 0x5fd3
movzbl -0x11(%rbp), %edx
movl $0x2, %edi
leaq 0xd0c7(%rip), %rsi      # 0x13089
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x5fe4
movq -0x10(%rbp), %rax
movzbl -0x11(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/track.c
// Function: Track_destroy
SOEXPORT void Track_destroy(Track *self)
{
    if (!self) return;
    for (uint8_t sectornum = 0; sectornum < self->sectors; ++sectornum)
    {
	Sector_destroy(self->sector[sectornum]);
    }
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6035
jmp 0x606e
movb $0x0, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jge 0x6065
movq -0x8(%rbp), %rax
movzbl -0x9(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x51b0
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x6039
movq -0x8(%rbp), %rdi
callq 0x5070
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64.c
// Function: D64_create
SOEXPORT D64 *D64_create(D64Type type)
{
    if (type < 0 || type > 2)
    {
        logmsg(L_ERROR, "D64: invalid type argument.");
        return 0;
    }
    D64 *self = xmalloc(sizeof *self + tracks[type] * sizeof *self->track);
    for (uint8_t tracknum = 0; tracknum < tracks[type]; ++tracknum)
    {
	self->track[tracknum] = Track_create(tracknum+1);
    }
    self->type = type;
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jb 0x6097
cmpl $0x2, -0xc(%rbp)
jbe 0x60b2
movl $0x1, %edi
leaq 0xd01a(%rip), %rsi      # 0x130bd
callq 0x5a60
movq $0x0, -0x8(%rbp)
jmp 0x612b
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0xd07c(%rip), %rax      # 0x1313a
movzbl (%rax,%rcx), %eax
movl %eax, %edi
shlq $0x3, %rdi
addq $0x8, %rdi
callq 0x58d0
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0xd051(%rip), %rcx      # 0x1313a
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x611a
movzbl -0x19(%rbp), %eax
addl $0x1, %eax
movzbl %al, %edi
callq 0x51d0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movzbl -0x19(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x60d9
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64.c
// Function: D64_rtrack
SOEXPORT const Track *D64_rtrack(const D64 *self, uint8_t tracknum)
{
    if (!tracknum || tracknum > tracks[D64_type(self)])
    {
        logfmt(L_WARNING, "D64_rtrack: invalid track number %hhu requested.",
                tracknum);
        return 0;
    }
    return self->track[tracknum-1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpb $0x0, -0x11(%rbp)
je 0x61c0
movzbl -0x11(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5480
movl %eax, %ecx
movl -0x18(%rbp), %eax
movl %ecx, %ecx
movl %ecx, %edx
leaq 0xcf82(%rip), %rcx      # 0x1313a
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x61e1
movzbl -0x11(%rbp), %edx
movl $0x2, %edi
leaq 0xcf09(%rip), %rsi      # 0x130d9
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x61f8
movq -0x10(%rbp), %rax
movzbl -0x11(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64.c
// Function: D64_track
SOEXPORT Track *D64_track(D64 *self, uint8_t tracknum)
{
    if (!tracknum || tracknum > tracks[D64_type(self)])
    {
        logfmt(L_WARNING, "D64_track: invalid track number %hhu requested.",
                tracknum);
        return 0;
    }
    return self->track[tracknum-1];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpb $0x0, -0x11(%rbp)
je 0x6250
movzbl -0x11(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5480
movl %eax, %ecx
movl -0x18(%rbp), %eax
movl %ecx, %ecx
movl %ecx, %edx
leaq 0xcef2(%rip), %rcx      # 0x1313a
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x6271
movzbl -0x11(%rbp), %edx
movl $0x2, %edi
leaq 0xceaa(%rip), %rsi      # 0x1310a
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x6288
movq -0x10(%rbp), %rax
movzbl -0x11(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64.c
// Function: D64_destroy
SOEXPORT void D64_destroy(D64 *self)
{
    if (!self) return;
    for (uint8_t tracknum = 0; tracknum < tracks[D64_type(self)]; ++tracknum)
    {
	Track_destroy(self->track[tracknum]);
    }
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6375
jmp 0x63c6
movb $0x0, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5480
movl %eax, %ecx
movl -0x10(%rbp), %eax
movl %ecx, %ecx
movl %ecx, %edx
leaq 0xcda1(%rip), %rcx      # 0x1313a
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x63bd
movq -0x8(%rbp), %rax
movzbl -0x9(%rbp), %ecx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x5610
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x6379
movq -0x8(%rbp), %rdi
callq 0x5070
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45reader.c
// Function: zc45_read
SOEXPORT int zc45_read(
        D64 *d64, int sectors, const uint8_t *zcfile, size_t zcfilelen)
{
    if (zcfilelen < 5)
    {
        logfmt(L_ERROR, "zc45_read: input file too short.");
        return -1;
    }
    uint16_t loadaddr = zcfile[0] | (zcfile[1]<<8);
    size_t pos;
    switch (loadaddr)
    {
	case 0x400:
	    pos = 2;
	    break;
	case 0x3fe:
	    pos = 4;
	    break;
	default:
            logfmt(L_ERROR, "zc45_read: not a valid zipcode file.");
	    return -1;
    }
    int rsects = 0;
    while (pos < zcfilelen)
    {
        if (sectors >= 0 && rsects == sectors)
        {
            logfmt(L_INFO, "zc45_read: ignoring extra data after reading "
                    "%d sectors.", sectors);
            break;
        }
	int rc;
	if ((rc = decodesector(d64, zcfile, &pos, zcfilelen)) < 0)
	{
	    if (rc == -2) break;
	    return -1;
	}
	++rsects;
    }
    return rsects;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x5, -0x28(%rbp)
jae 0x640d
movl $0x1, %edi
leaq 0xcd43(%rip), %rsi      # 0x1313d
movb $0x0, %al
callq 0x5ab0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x64e3
movq -0x20(%rbp), %rcx
movzbl (%rcx), %eax
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0x2a(%rbp)
movzwl -0x2a(%rbp), %eax
movl %eax, -0x44(%rbp)
subl $0x3fe, %eax            # imm = 0x3FE
je 0x6447
jmp 0x6431
movl -0x44(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
jne 0x6451
jmp 0x643d
movq $0x2, -0x38(%rbp)
jmp 0x646d
movq $0x4, -0x38(%rbp)
jmp 0x646d
movl $0x1, %edi
leaq 0xcd01(%rip), %rsi      # 0x1315e
movb $0x0, %al
callq 0x5ab0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x64e3
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x64dd
cmpl $0x0, -0x14(%rbp)
jl 0x64a4
movl -0x3c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x64a4
movl -0x14(%rbp), %edx
movl $0x3, %edi
leaq 0xcce8(%rip), %rsi      # 0x13183
movb $0x0, %al
callq 0x5ab0
jmp 0x64dd
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x38(%rbp), %rdx
callq 0x64f0
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
jge 0x64d2
cmpl $-0x2, -0x40(%rbp)
jne 0x64c9
jmp 0x64dd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x64e3
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6474
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45reader.c
// Function: decodeplain
static int decodeplain(uint8_t *data, const uint8_t *zcfile,
	size_t *pos, size_t zcfilelen)
{
    for (int i = 0; i < SECTOR_SIZE; ++i)
    {
	int byte = nextbyte(zcfile, pos, zcfilelen);
	if (byte < 0)
        {
            logmsg(L_ERROR, "zc45_read: unexpected end of file in verbatim "
                    "sector.");
            return -1;
        }
	data[i] = byte;
    }
    return 0;
}

// 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)
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp)     # imm = 0x100
jge 0x67a7
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x66e0
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jge 0x678c
movl $0x1, %edi
leaq 0xcbae(%rip), %rsi      # 0x1332c
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67ae
movl -0x30(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x674f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45reader.c
// Function: decodefill
static int decodefill(uint8_t *data, const uint8_t *zcfile,
	size_t *pos, size_t zcfilelen)
{
    int fill = nextbyte(zcfile, pos, zcfilelen);
    if (fill < 0)
    {
        logmsg(L_ERROR, "zc45_read: unexpected end of file in fill sector.");
        return -1;
    }
    for (int i = 0; i < SECTOR_SIZE; ++i)
    {
	data[i] = fill;
    }
    return 0;
}

// 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 -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x66e0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x680c
movl $0x1, %edi
leaq 0xcb64(%rip), %rsi      # 0x13362
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x683e
movl $0x0, -0x30(%rbp)
cmpl $0x100, -0x30(%rbp)     # imm = 0x100
jge 0x6837
movl -0x2c(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x6813
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_create
SOEXPORT FileData *FileData_create(void)
{
    FileData *self = xmalloc(sizeof *self);
    self->content = xmalloc(FD_CHUNKSIZE);
    self->size = 0;
    self->capacity = FD_CHUNKSIZE;
    self->changedEvent = Event_create(0, self);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x58d0
movq %rax, -0x8(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x400, 0x8(%rax)       # imm = 0x400
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_clone
SOEXPORT FileData *FileData_clone(const FileData *self)
{
    FileData *cloned = xmalloc(sizeof *cloned);
    cloned->size = self->size;
    cloned->capacity = self->capacity;
    cloned->content = xmalloc(self->capacity);
    cloned->changedEvent = Event_create(0, cloned);
    memcpy(cloned->content, self->content, self->size);
    return cloned;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x20, %edi
callq 0x58d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
callq 0x54c0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_append
SOEXPORT int FileData_append(FileData *self, const uint8_t *data, size_t size)
{
    if (self->size + size < size || self->size + size > FILEDATA_MAXSIZE)
    {
        logmsg(L_ERROR, "FileData_append: maximum size exceeded.");
        return -1;
    }
    while (self->size + size > self->capacity)
    {
        self->capacity += FD_CHUNKSIZE;
        self->content = xrealloc(self->content, self->capacity);
    }
    memcpy(self->content + self->size, data, size);
    self->size += size;
    Event_raise(self->changedEvent, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x6ba8
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
cmpq $0x100000, %rax         # imm = 0x100000
jbe 0x6bc5
movl $0x1, %edi
leaq 0xc9a1(%rip), %rsi      # 0x13555
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6c53
jmp 0x6bc7
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x6c11
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x400, %rcx            # imm = 0x400
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5910
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6bc7
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
addq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x54c0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_appendByte
SOEXPORT int FileData_appendByte(FileData *self, uint8_t byte)
{
    if (self->size == FILEDATA_MAXSIZE)
    {
        logmsg(L_ERROR, "FileData_appendByte: maximum size exceeded.");
        return -1;
    }
    if (self->size == self->capacity)
    {
        self->capacity += FD_CHUNKSIZE;
        self->content = xrealloc(self->content, self->capacity);
    }
    self->content[self->size++] = byte;
    Event_raise(self->changedEvent, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x100000, (%rax)       # imm = 0x100000
jne 0x6c99
movl $0x1, %edi
leaq 0xc8f2(%rip), %rsi      # 0x1357d
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d14
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x6cdd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x400, %rcx            # imm = 0x400
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5910
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rsi
movq (%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, (%rsi)
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_appendBytes
SOEXPORT int FileData_appendBytes(FileData *self, uint8_t byte, size_t count)
{
    if (self->size + count < count || self->size + count > FILEDATA_MAXSIZE)
    {
        logmsg(L_ERROR, "FileData_appendBytes: maximum size exceeded.");
        return -1;
    }
    while (self->size + count > self->capacity)
    {
        self->capacity += FD_CHUNKSIZE;
        self->content = xrealloc(self->content, self->capacity);
    }
    memset(self->content + self->size, byte, count);
    self->size += count;
    Event_raise(self->changedEvent, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x6d5a
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
cmpq $0x100000, %rax         # imm = 0x100000
jbe 0x6d77
movl $0x1, %edi
leaq 0xc843(%rip), %rsi      # 0x135a9
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6e08
jmp 0x6d79
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x6dc3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x400, %rcx            # imm = 0x400
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5910
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6d79
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
addq (%rax), %rdi
movzbl -0x11(%rbp), %eax
movq -0x20(%rbp), %rdx
movzbl %al, %esi
callq 0x5340
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5620
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/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_setByte
SOEXPORT int FileData_setByte(FileData *self, uint8_t byte, size_t pos)
{
    if (pos >= self->size)
    {
	logmsg(L_ERROR, "FileData_setByte: invalid position.");
	return -1;
    }
    self->content[pos] = byte;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jb 0x6e5d
movl $0x1, %edi
leaq 0xc787(%rip), %rsi      # 0x135d6
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6e76
movb -0x11(%rbp), %dl
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filedata.c
// Function: FileData_destroy
SOEXPORT void FileData_destroy(FileData *self)
{
    if (!self) return;
    Event_destroy(self->changedEvent);
    free(self->content);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6eb5
jmp 0x6ed8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5180
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rdi
callq 0x5070
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/hostfilereader.c
// Function: readHostFile
SOEXPORT FileData *readHostFile(FILE *file)
{
    uint8_t buf[RBUFSIZE];
    size_t nread;

    FileData *filedata = FileData_create();

    while ((nread = fread(buf, 1, RBUFSIZE, file)))
    {
	if (FileData_append(filedata, buf, nread) < 0)
	{
	    FileData_destroy(filedata);
	    return 0;
	}
    }

    return filedata;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movq %rdi, -0x10(%rbp)
callq 0x5540
movq %rax, -0x420(%rbp)
leaq -0x410(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x5150
movq %rax, -0x418(%rbp)
cmpq $0x0, %rax
je 0x6f59
movq -0x420(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movq -0x418(%rbp), %rdx
callq 0x5790
cmpl $0x0, %eax
jge 0x6f57
movq -0x420(%rbp), %rdi
callq 0x5410
movq $0x0, -0x8(%rbp)
jmp 0x6f64
jmp 0x6efb
movq -0x420(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64writer.c
// Function: writeD64
SOEXPORT int writeD64(FILE *file, const D64 *d64)
{
    for (uint8_t tracknum = 1; tracknum <= D64_tracks(d64); ++tracknum)
    {
	const Track *track = D64_rtrack(d64, tracknum);
	for (uint8_t sectnum = 0; sectnum < Track_sectors(track); ++sectnum)
	{
	    const Sector *sector = Track_rsector(track, sectnum);
	    const uint8_t *content = Sector_rcontent(sector);
	    if (!fwrite(content, SECTOR_SIZE, 1, file))
            {
                logmsg(L_ERROR, "writeD64: unknown write error.");
                return -1;
            }
	}
    }
    logmsg(L_DEBUG, "writeD64: success.");
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x1, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5630
movb %al, %cl
movl -0x44(%rbp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
jg 0x70b5
movq -0x18(%rbp), %rdi
movzbl -0x19(%rbp), %esi
callq 0x5050
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x57b0
movb %al, %cl
movl -0x48(%rbp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
jge 0x70a6
movq -0x28(%rbp), %rdi
movzbl -0x29(%rbp), %esi
callq 0x54d0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x56d0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
movl $0x1, %edx
callq 0x5750
cmpq $0x0, %rax
jne 0x709a
movl $0x1, %edi
leaq 0xc56e(%rip), %rsi      # 0x135fa
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x70cd
jmp 0x709c
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x7029
jmp 0x70a8
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x6ff4
movl $0x4, %edi
leaq 0xc558(%rip), %rsi      # 0x13619
callq 0x5a60
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filename.c
// Function: Filename_clone
SOLOCAL Filename *Filename_clone(const Filename *self)
{
    Filename *clone = Filename_create();
    if (self->full) clone->full = copystr(self->full);
    if (self->dir) clone->dir = copystr(self->dir);
    if (self->base) clone->base = copystr(self->base);
    if (self->ext) clone->ext = copystr(self->ext);
    return clone;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x70e0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7145
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7168
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x718b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x71ae
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filename.c
// Function: Filename_updateFull
static void Filename_updateFull(Filename *self)
{
    free(self->full);
    if (!self->base)
    {
	self->full = 0;
	return;
    }
    size_t fulllen = strlen(self->base);
    if (self->dir) fulllen += strlen(self->dir) + 1;
    if (self->ext) fulllen += strlen(self->ext) + 1;
    self->full = xmalloc(fulllen+1);
    char *wrptr = self->full;
    if (self->dir)
    {
	strcpy(wrptr, self->dir);
	wrptr += strlen(self->dir);
	*wrptr++ = PATHSEP;
    }
    strcpy(wrptr, self->base);
    wrptr += strlen(self->base);
    if (self->ext)
    {
	*wrptr++ = '.';
	strcpy(wrptr, self->ext);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x7483
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0x7595
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5270
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x74b8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5270
addq $0x1, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x74dc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5270
addq $0x1, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7541
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5100
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5270
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x2f, (%rax)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x5100
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5270
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x7595
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x2e, (%rax)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x5100
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/filename.c
// Function: Filename_destroy
SOLOCAL void Filename_destroy(Filename *self)
{
    if (!self) return;
    free(self->full);
    free(self->dir);
    free(self->base);
    free(self->ext);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7635
jmp 0x7671
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rdi
callq 0x5070
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: ZcFileSet_create
SOEXPORT ZcFileSet *ZcFileSet_create(ZcType type, const char *name)
{
    int count;
    switch (type)
    {
        case ZT_4PACK:
            count = 4;
            break;
        case ZT_5PACK:
            count = 5;
            break;
        case ZT_6PACK:
            count = 6;
            break;
        default:
            logmsg(L_ERROR, "ZcFileSet: invalid type.");
            return 0;
    }

    ZcFileSet *self = xmalloc(sizeof *self + count * sizeof *self->files);
    self->type = type;
    self->count = count;
    self->name = copystr(name);
    for (int i = 0; i < count; ++i) self->files[i] = FileData_create();
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x76af
jmp 0x769b
movl -0x30(%rbp), %eax
subl $0x1, %eax
je 0x76b8
jmp 0x76a5
movl -0x30(%rbp), %eax
subl $0x2, %eax
je 0x76c1
jmp 0x76ca
movl $0x4, -0x1c(%rbp)
jmp 0x76e5
movl $0x5, -0x1c(%rbp)
jmp 0x76e5
movl $0x6, -0x1c(%rbp)
jmp 0x76e5
movl $0x1, %edi
leaq 0xbf56(%rip), %rsi      # 0x1362c
callq 0x5a60
movq $0x0, -0x8(%rbp)
jmp 0x7758
movslq -0x1c(%rbp), %rdi
shlq $0x3, %rdi
addq $0x10, %rdi
callq 0x58d0
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x7750
callq 0x5540
movq %rax, %rdx
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x7728
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: fromFileDataInternal
static ZcFileSet *fromFileDataInternal(const FileData *file, int logerrors)
{
    D64 *d64 = readD64FromFileData(file);
    if (!d64) return 0;
    CbmdosVfs *vfs = CbmdosVfs_create();
    int rc = readCbmdosVfs(vfs, d64, 0);
    D64_destroy(d64);
    if (rc < 0)
    {
        CbmdosVfs_destroy(vfs);
        return 0;
    }
    ZcFileSet *self = fromVfsInternal(vfs, logerrors);
    CbmdosVfs_destroy(vfs);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5220
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x79ed
movq $0x0, -0x8(%rbp)
jmp 0x7a4d
callq 0x5570
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x52e0
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x55f0
cmpl $0x0, -0x2c(%rbp)
jge 0x7a2c
movq -0x28(%rbp), %rdi
callq 0x54e0
movq $0x0, -0x8(%rbp)
jmp 0x7a4d
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7790
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x54e0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: fromFileData
static ZcFileSet *fromFileData(
        const char *name, FileData **files, int logerrors)
{
    ZcFileSet *self = 0;

    if (files[0] && files[1] && files[2] && files[3])
    {
        if (files[4])
        {
            logmsg(L_INFO, "ZcFileSet: 5-file disk-packed zipcode "
                    "read successfully.");
            self = xmalloc(sizeof *self + 5 * sizeof *self->files);
            self->type = ZT_5PACK;
            self->count = 5;
            memcpy(self->files, files, 5 * sizeof *self->files);
        }
        else
        {
            logmsg(L_INFO, "ZcFileSet: 4-file disk-packed zipcode "
                    "read successfully.");
            self = xmalloc(sizeof *self + 4 * sizeof *self->files);
            self->type = ZT_4PACK;
            self->count = 4;
            memcpy(self->files, files, 4 * sizeof *self->files);
        }
        self->name = copystr(name);
    }
    else
    {
        if (logerrors)
        {
            logmsg(L_ERROR, "ZcFileSet: reading failed (missing or "
                    "unreadable files).");
        }
        for (int i = 0; i < 5; ++i) FileData_destroy(files[i]);
    }

    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7dbe
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x7dbe
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x7dbe
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x7dbe
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x7d4d
movl $0x3, %edi
leaq 0xbac6(%rip), %rsi      # 0x137d3
callq 0x5a60
movl $0x38, %edi
callq 0x58d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x20(%rbp), %rax
movl $0x5, 0x4(%rax)
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
movl $0x28, %edx
callq 0x54c0
jmp 0x7da8
movl $0x3, %edi
leaq 0xbab3(%rip), %rsi      # 0x1380c
callq 0x5a60
movl $0x30, %edi
callq 0x58d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x4, 0x4(%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rdi
callq 0x5960
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x7e00
cmpl $0x0, -0x14(%rbp)
je 0x7dd5
movl $0x1, %edi
leaq 0xba75(%rip), %rsi      # 0x13845
callq 0x5a60
movl $0x0, -0x24(%rbp)
cmpl $0x5, -0x24(%rbp)
jge 0x7dfe
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5410
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7ddc
jmp 0x7e00
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: fromD64
static ZcFileSet *fromD64(const char *filename)
{
    FILE *d64file = fopen_internal(filename, "rb");
    if (!d64file)
    {
        logfmt(L_ERROR,
		"ZcFileSet: error opening `%s' for reading.", filename);
        return 0;
    }
    FileData *data = readHostFile(d64file);
    if (!data)
    {
	fclose(d64file);
	logfmt(L_ERROR, "ZcFileSet: error reading from `%s'.", filename);
	return 0;
    }
    fclose(d64file);
    ZcFileSet *self = ZcFileSet_fromFileData(data);
    FileData_destroy(data);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xb894(%rip), %rsi      # 0x136bb
callq 0x56b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7e58
movq -0x10(%rbp), %rdx
movl $0x1, %edi
leaq 0xba37(%rip), %rsi      # 0x1387e
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x7ebd
movq -0x18(%rbp), %rdi
callq 0x52f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7e96
movq -0x18(%rbp), %rdi
callq 0x5240
movq -0x10(%rbp), %rdx
movl $0x1, %edi
leaq 0xba24(%rip), %rsi      # 0x138a9
movb $0x0, %al
callq 0x5ab0
movq $0x0, -0x8(%rbp)
jmp 0x7ebd
movq -0x18(%rbp), %rdi
callq 0x5240
movq -0x20(%rbp), %rdi
callq 0x5660
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5410
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: checkIndex
static int checkIndex(const ZcFileSet *self, int index)
{
    if (index < 0 || index >= self->count)
    {
        logfmt(L_ERROR, "ZcFileSet: non-existing member file %d requested.",
                index);
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x7f91
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x7fb0
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0xb92d(%rip), %rsi      # 0x138cd
movb $0x0, %al
callq 0x5ab0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7fb7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: ZcFileSet_saveVfs
SOEXPORT int ZcFileSet_saveVfs(const ZcFileSet *self, CbmdosVfs *vfs)
{
    char name[16];
    uint8_t baselen = strlen(self->name) > 14 ? 14 : strlen(self->name);
    memcpy(name+2, self->name, baselen);
    name[1] = '!';
    for (name[0] = '1'; name[0] < (self->type == ZT_5PACK ? '6' : '5');
	    ++name [0])
    {
	CbmdosFile *file = CbmdosFile_create();
	CbmdosFile_setName(file, name, baselen+2);
	FileData *cfd = CbmdosFile_data(file);
	const FileData *fd = self->files[name[0]-'1'];
	if (FileData_append(cfd, FileData_rcontent(fd), FileData_size(fd)) < 0)
	{
	    return -1;
	}
	if (CbmdosVfs_append(vfs, file))
	{
	    return -1;
	}
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5270
cmpq $0xe, %rax
jbe 0x828e
movl $0xe, %eax
movq %rax, -0x58(%rbp)
jmp 0x829f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5270
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movb %al, -0x31(%rbp)
leaq -0x30(%rbp), %rdi
addq $0x2, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movzbl -0x31(%rbp), %eax
movl %eax, %edx
callq 0x54c0
movb $0x21, -0x2f(%rbp)
movb $0x31, -0x30(%rbp)
movsbl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %esi
movl $0x35, %ecx
movl $0x36, %edx
cmpl $0x1, %esi
cmovel %edx, %ecx
cmpl %ecx, %eax
jge 0x8395
callq 0x53c0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movzbl -0x31(%rbp), %eax
addl $0x2, %eax
movzbl %al, %edx
callq 0x5310
movq -0x40(%rbp), %rdi
callq 0x5650
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movsbl -0x30(%rbp), %ecx
subl $0x31, %ecx
movslq %ecx, %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rdi
callq 0x56a0
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5550
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x5790
cmpl $0x0, %eax
jge 0x836b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x839c
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x5500
cmpl $0x0, %eax
je 0x8386
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x839c
jmp 0x8388
movb -0x30(%rbp), %al
addb $0x1, %al
movb %al, -0x30(%rbp)
jmp 0x82c9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zcfileset.c
// Function: ZcFileSet_destroy
SOEXPORT void ZcFileSet_destroy(ZcFileSet *self)
{
    if (!self) return;
    free(self->name);
    for (int i = 0; i < self->count; ++i) FileData_destroy(self->files[i]);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x83c5
jmp 0x840b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x8402
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rdi
callq 0x5410
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x83d9
movq -0x8(%rbp), %rdi
callq 0x5070
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)