LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64reader.c
// Function: readD64
SOEXPORT D64 *readD64(FILE *file)
{
    FileData *data = readHostFile(file);
    if (!data)
    {
        logmsg(L_WARNING, "readD64: error reading file.");
        return 0;
    }

    D64 *d64 = readD64FromFileData(data);
    FileData_destroy(data);
    return d64;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x52f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xbd8b
movl $0x2, %edi
leaq 0x8154(%rip), %rsi      # 0x13ed0
callq 0x5a60
movq $0x0, -0x8(%rbp)
jmp 0xbda9
movq -0x18(%rbp), %rdi
callq 0x5220
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5410
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45writer.c
// Function: writeTrack
static int writeTrack(uint8_t *zcfile, size_t zcfilelen, size_t *wpos,
        uint8_t trackno, const D64 *d64)
{
    uint8_t sectorflags[21] = {1,0};
    const Track *track = D64_rtrack(d64, trackno);
    uint8_t numsectors = Track_sectors(track);
    uint8_t sectno = 0;
    uint8_t interlv = interleave(trackno);

    do
    {
        if (writeSector(zcfile, zcfilelen, wpos, trackno, track, sectno) < 0)
        {
            return -1;
        }
    } while ((sectno = nextsectno(interlv, sectorflags,
                    numsectors, sectno)) != 0xff);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq %r8, -0x30(%rbp)
movq 0x7ffc(%rip), %rax      # 0x14060
movq %rax, -0x50(%rbp)
movq 0x7ff9(%rip), %rax      # 0x14068
movq %rax, -0x48(%rbp)
movl 0x7ff7(%rip), %eax      # 0x14070
movl %eax, -0x40(%rbp)
movb 0x7ff2(%rip), %al       # 0x14074
movb %al, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
movzbl -0x21(%rbp), %esi
callq 0x5050
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x57b0
movb %al, -0x59(%rbp)
movb $0x0, -0x5a(%rbp)
movzbl -0x21(%rbp), %edi
callq 0xc120
movb %al, -0x5b(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movb -0x21(%rbp), %al
movq -0x58(%rbp), %r8
movzbl %al, %ecx
movzbl -0x5a(%rbp), %r9d
callq 0xc160
cmpl $0x0, %eax
jge 0xc0e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc10f
jmp 0xc0e2
movb -0x5b(%rbp), %cl
leaq -0x50(%rbp), %rsi
movb -0x59(%rbp), %al
movzbl %cl, %edi
movzbl %al, %edx
movzbl -0x5a(%rbp), %ecx
callq 0xc2f0
movb %al, -0x5a(%rbp)
movzbl %al, %eax
cmpl $0xff, %eax
jne 0xc0b2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45writer.c
// Function: nextsectno
static uint8_t nextsectno(uint8_t interlv, uint8_t *sectorflags,
        uint8_t numsectors, uint8_t sectno)
{
    uint8_t pos = (sectno + interlv) % numsectors;
    uint8_t nextsect = pos;
    while (sectorflags[nextsect])
    {
        ++nextsect;
        if (nextsect == numsectors) nextsect = 0;
        if (nextsect == pos) return 0xff;
    }
    sectorflags[nextsect] = 1;
    return nextsect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movb %dl, %cl
movb %dil, %dl
movb %dl, -0x2(%rbp)
movq %rsi, -0x10(%rbp)
movb %cl, -0x11(%rbp)
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x2(%rbp), %ecx
addl %ecx, %eax
movzbl -0x11(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
movb %al, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x14(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0xc35e
movb -0x14(%rbp), %al
addb $0x1, %al
movb %al, -0x14(%rbp)
movzbl -0x14(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc34a
movb $0x0, -0x14(%rbp)
movzbl -0x14(%rbp), %eax
movzbl -0x13(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc35c
movb $-0x1, -0x1(%rbp)
jmp 0xc370
jmp 0xc324
movq -0x10(%rbp), %rax
movzbl -0x14(%rbp), %ecx
movb $0x1, (%rax,%rcx)
movb -0x14(%rbp), %al
movb %al, -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/zc45writer.c
// Function: getMethod
static enum method getMethod(const uint8_t *data,
        uint8_t *rlelen, uint8_t *repcode)
{
    uint8_t rlesave = 0;
    uint8_t last = *data;
    uint8_t repcnt = 0;
    uint8_t used[256] = { 0 };
    ++used[last];

    for (int i = 1; i < 256; ++i)
    {
        if (data[i] == last)
        {
            if (++repcnt > 2) ++rlesave;
        }
        else
        {
            repcnt = 0;
            last = data[i];
            ++used[last];
        }
    }
    if (repcnt == 255) return M_FILL;
    if (rlesave > 2)
    {
        if (rlelen)
        {
            *rlelen = 256 - rlesave;
        }
        if (repcode)
        {
            for (uint8_t rc = 0;;++rc)
            {
                if (!used[rc])
                {
                    *repcode = rc;
                    break;
                }
            }
        }
        return M_RLE;
    }
    return M_PLAIN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x22(%rbp)
movb $0x0, -0x23(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x5340
movzbl -0x22(%rbp), %eax
movb -0x130(%rbp,%rax), %cl
addb $0x1, %cl
movb %cl, -0x130(%rbp,%rax)
movl $0x1, -0x134(%rbp)
cmpl $0x100, -0x134(%rbp)    # imm = 0x100
jge 0xc454
movq -0x10(%rbp), %rax
movslq -0x134(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x22(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc417
movb -0x23(%rbp), %al
addb $0x1, %al
movb %al, -0x23(%rbp)
movzbl %al, %eax
cmpl $0x2, %eax
jle 0xc415
movb -0x21(%rbp), %al
addb $0x1, %al
movb %al, -0x21(%rbp)
jmp 0xc441
movb $0x0, -0x23(%rbp)
movq -0x10(%rbp), %rax
movslq -0x134(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
movb -0x130(%rbp,%rax), %cl
addb $0x1, %cl
movb %cl, -0x130(%rbp,%rax)
jmp 0xc443
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0xc3da
movzbl -0x23(%rbp), %eax
cmpl $0xff, %eax
jne 0xc468
movl $0x1, -0x4(%rbp)
jmp 0xc4dc
movzbl -0x21(%rbp), %eax
cmpl $0x2, %eax
jle 0xc4d5
cmpq $0x0, -0x18(%rbp)
je 0xc48b
movzbl -0x21(%rbp), %ecx
movl $0x100, %eax            # imm = 0x100
subl %ecx, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0xc4cc
movb $0x0, -0x135(%rbp)
movzbl -0x135(%rbp), %eax
cmpb $0x0, -0x130(%rbp,%rax)
jne 0xc4b8
movb -0x135(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
jmp 0xc4ca
jmp 0xc4ba
movb -0x135(%rbp), %al
addb $0x1, %al
movb %al, -0x135(%rbp)
jmp 0xc499
jmp 0xc4cc
movl $0x2, -0x4(%rbp)
jmp 0xc4dc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/event.c
// Function: Event_create
SOEXPORT Event *Event_create(int id, const void *sender)
{
    Event *self = xmalloc(sizeof *self);
    self->sender = sender;
    self->handlers = 0;
    self->size = 0;
    self->capa = 0;
    self->id = id;
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x28, %edi
callq 0x58d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/event.c
// Function: Event_register
SOEXPORT void Event_register(Event *self, void *receiver, EventHandler handler)
{
    if (self->size == self->capa)
    {
        self->capa += EVCHUNKSIZE;
        self->handlers = xrealloc(self->handlers,
                self->capa * sizeof *self->handlers);
    }
    self->handlers[self->size].receiver = receiver;
    self->handlers[self->size].handler = handler;
    ++self->size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jne 0xca1a
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
shlq $0x4, %rsi
callq 0x5910
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/event.c
// Function: Event_unregister
SOEXPORT void Event_unregister(
	Event *self, void *receiver, EventHandler handler)
{
    size_t pos;
    for (pos = 0; pos < self->size; ++pos)
    {
        if (self->handlers[pos].receiver == receiver
                && self->handlers[pos].handler == handler)
        {
            break;
        }
    }
    if (pos < self->size)
    {
        --self->size;
        if (pos < self->size)
        {
            memmove(self->handlers + pos, self->handlers + pos + 1,
                    (self->size - pos) * sizeof *self->handlers);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xcae5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xcad5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0xcad5
jmp 0xcae5
jmp 0xcad7
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xca8c
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xcb52
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xcb50
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
addq $0x10, %rsi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdx
subq -0x20(%rbp), %rdx
shlq $0x4, %rdx
callq 0x5670
jmp 0xcb52
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: CbmdosFs_create
SOEXPORT CbmdosFs *CbmdosFs_create(CbmdosFsOptions options)
{
    if (validateOptions(options) < 0) return 0;
    CbmdosFs *self = xmalloc(sizeof *self);
    memset(self, 0, sizeof *self);
    D64Type d64Type = D64_STANDARD;
    if (options.flags & CFF_42TRACK) d64Type = D64_42TRACK;
    else if (options.flags & CFF_40TRACK) d64Type = D64_40TRACK;
    self->d64 = D64_create(d64Type);
    self->dir.capa = DIRCHUNK;
    self->dir.entries = xmalloc(DIRCHUNK * sizeof *self->dir.entries);
    self->vfs = CbmdosVfs_create();
    if (options.flags & CFF_PROLOGICDOSBAM)
    {
	CbmdosVfs_setDosver(self->vfs, 0x50);
    }
    self->options = options;
    self->bam[17][0] = 1;
    updateDir(self);
    updateBam(self);
    Event_register(CbmdosVfs_changedEvent(self->vfs), self, vfsChanged);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcd50
cmpl $0x0, %eax
jge 0xcc47
movq $0x0, -0x8(%rbp)
jmp 0xcd44
movl $0x3a0, %edi            # imm = 0x3A0
callq 0x58d0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x3a0, %edx            # imm = 0x3A0
callq 0x5340
movl $0x0, -0x1c(%rbp)
movl -0x10(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xcc80
movl $0x2, -0x1c(%rbp)
jmp 0xcc94
movl -0x10(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xcc92
movl $0x1, -0x1c(%rbp)
jmp 0xcc94
movl -0x1c(%rbp), %edi
callq 0x5600
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x90, 0x1c(%rax)
movl $0x360, %edi            # imm = 0x360
callq 0x58d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
callq 0x5570
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xccf3
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x50, %esi
callq 0x5640
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x24(%rax)
movq -0x18(%rbp), %rax
movb $0x1, 0x191(%rax)
movq -0x18(%rbp), %rdi
callq 0xce10
movq -0x18(%rbp), %rdi
callq 0xd1e0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5200
movq %rax, %rdi
movq -0x18(%rbp), %rsi
leaq 0x6f9(%rip), %rdx       # 0xd430
callq 0x5590
movq -0x18(%rbp), %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/cbmdosfs.c
// Function: validateOptions
static int validateOptions(CbmdosFsOptions options)
{
    if ((options.flags & (CFF_SPEEDDOSBAM | CFF_DOLPHINDOSBAM))
	    && (options.flags & CFF_PROLOGICDOSBAM))
    {
	logmsg(L_ERROR, "Cannot combine Prologic DOS extended BAM with any "
		"other extended BAM formats.");
	return -1;
    }
    if ((options.flags & CFF_TALLOC_TRACKLOAD)
	    && (options.flags & CFF_TALLOC_SIMPLE))
    {
	logmsg(L_ERROR, "Cannot combine `trackload' track allocation strategy "
		"with `simple' track allocation strategy.");
	return -1;
    }
    if (options.dirInterleave < 1 || options.dirInterleave > 20
            || options.fileInterleave < 1 || options.fileInterleave > 20)
    {
        logmsg(L_ERROR, "Cannot set interleave values outside the range from "
                "1 to 20.");
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x30, %eax
cmpl $0x0, %eax
je 0xcd8c
movl -0xc(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xcd8c
movl $0x1, %edi
leaq 0x7583(%rip), %rsi      # 0x14301
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce05
movl -0xc(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xcdc0
movl -0xc(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xcdc0
movl $0x1, %edi
leaq 0x759d(%rip), %rsi      # 0x1434f
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce05
movzbl -0x8(%rbp), %eax
cmpl $0x1, %eax
jl 0xcde4
movzbl -0x8(%rbp), %eax
cmpl $0x14, %eax
jg 0xcde4
movzbl -0x7(%rbp), %eax
cmpl $0x1, %eax
jl 0xcde4
movzbl -0x7(%rbp), %eax
cmpl $0x14, %eax
jle 0xcdfe
movl $0x1, %edi
leaq 0x75bd(%rip), %rsi      # 0x143ad
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce05
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: CbmdosFs_destroy
SOEXPORT void CbmdosFs_destroy(CbmdosFs *self)
{
    if (!self) return;
    free(self->dir.entries);
    CbmdosVfs_destroy(self->vfs);
    D64_destroy(self->d64);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xdb75
jmp 0xdba4
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x54e0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x55f0
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/cbmdosfs.c
// Function: CbmdosFs_fromVfs
SOEXPORT CbmdosFs *CbmdosFs_fromVfs(CbmdosVfs *vfs, CbmdosFsOptions options)
{
    if (validateOptions(options) < 0) return 0;
    CbmdosFs *self = xmalloc(sizeof *self);
    memset(self, 0, sizeof *self);
    self->dir.capa = DIRCHUNK;
    self->dir.size = CbmdosVfs_fileCount(vfs);
    while (self->dir.capa < self->dir.size)
    {
	self->dir.capa += DIRCHUNK;
    }
    self->dir.entries = xmalloc(self->dir.capa * sizeof *self->dir.entries);
    if ((options.flags & CFF_PROLOGICDOSBAM)
	    && CbmdosVfs_dosver(vfs) == 0x41)
    {
	CbmdosVfs_setDosver(vfs, 0x50);
    }
    self->vfs = vfs;
    self->options = options;
    if (CbmdosFs_rewrite(self) < 0)
    {
	self->vfs = 0;
	CbmdosFs_destroy(self);
	return 0;
    }
    Event_register(CbmdosVfs_changedEvent(self->vfs), self, vfsChanged);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcd50
cmpl $0x0, %eax
jge 0xdbdb
movq $0x0, -0x8(%rbp)
jmp 0xdcea
movl $0x3a0, %edi            # imm = 0x3A0
callq 0x58d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x3a0, %edx            # imm = 0x3A0
callq 0x5340
movq -0x20(%rbp), %rax
movl $0x90, 0x1c(%rax)
movq -0x18(%rbp), %rdi
callq 0x5260
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xdc38
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x90, %ecx
movl %ecx, 0x1c(%rax)
jmp 0xdc16
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %eax
imulq $0x6, %rax, %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x10(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xdc7d
movq -0x18(%rbp), %rdi
callq 0x55a0
movzbl %al, %eax
cmpl $0x41, %eax
jne 0xdc7d
movq -0x18(%rbp), %rdi
movl $0x50, %esi
callq 0x5640
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x24(%rax)
movq -0x20(%rbp), %rdi
callq 0x57e0
cmpl $0x0, %eax
jge 0xdcc2
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0x54b0
movq $0x0, -0x8(%rbp)
jmp 0xdcea
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5200
movq %rax, %rdi
movq -0x20(%rbp), %rsi
leaq -0x8ad(%rip), %rdx      # 0xd430
callq 0x5590
movq -0x20(%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/cbmdosfs.c
// Function: CbmdosFs_rewrite
SOEXPORT int CbmdosFs_rewrite(CbmdosFs *self)
{
    D64_destroy(self->d64);
    D64Type d64Type = D64_STANDARD;
    if (self->options.flags & CFF_42TRACK) d64Type = D64_42TRACK;
    else if (self->options.flags & CFF_40TRACK) d64Type = D64_40TRACK;
    self->d64 = D64_create(d64Type);
    self->status = CFS_OK;
    memset(self->dir.entries, 0, self->dir.size * sizeof *self->dir.entries);
    memset(self->bam, 0, sizeof self->bam);
    self->bam[17][0] = 1;
    if (updateDir(self) < 0)
    {
	self->status |= CFS_DIRFULL;
	return -1;
    }
    for (unsigned pos = 0; pos < self->dir.size; ++pos)
    {
	if (updateFile(self, pos) < 0)
	{
	    self->status |= CFS_DISKFULL;
	    return -1;
	}
    }
    updateDir(self);
    updateBam(self);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x55f0
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xdd37
movl $0x2, -0x14(%rbp)
jmp 0xdd4f
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xdd4d
movl $0x1, -0x14(%rbp)
jmp 0xdd4f
movl -0x14(%rbp), %edi
callq 0x5600
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
imulq $0x6, %rax, %rdx
xorl %esi, %esi
callq 0x5340
movq -0x10(%rbp), %rdi
addq $0x2c, %rdi
xorl %esi, %esi
movl $0x372, %edx            # imm = 0x372
callq 0x5340
movq -0x10(%rbp), %rax
movb $0x1, 0x191(%rax)
movq -0x10(%rbp), %rdi
callq 0xce10
cmpl $0x0, %eax
jge 0xddc9
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x20(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xde29
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xde10
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xe030
cmpl $0x0, %eax
jge 0xde03
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x20(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xde29
jmp 0xde05
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xddd0
movq -0x10(%rbp), %rdi
callq 0xce10
movq -0x10(%rbp), %rdi
callq 0xd1e0
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/cbmdosfs.c
// Function: CbmdosFs_setOptions
SOEXPORT int CbmdosFs_setOptions(CbmdosFs *self, CbmdosFsOptions options)
{
    int needRewrite = CbmdosFs_optionsWillRewrite(self, options);
    if (needRewrite < 0) return -1;
    CbmdosFsFlags changedFlags = self->options.flags ^ options.flags;
    self->options = options;
    if (needRewrite)
    {
        CbmdosFs_rewrite(self);
        return 1;
    }
    else if (changedFlags & (CFF_SPEEDDOSBAM|CFF_DOLPHINDOSBAM
                |CFF_PROLOGICDOSBAM|CFF_ZEROFREE))
    {
        updateBam(self);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0xc(%rbp), %rsi
callq 0x5760
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0xdf0f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdf68
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
xorl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0xc(%rbp), %rcx
movq %rcx, 0x24(%rax)
cmpl $0x0, -0x1c(%rbp)
je 0xdf40
movq -0x18(%rbp), %rdi
callq 0x57e0
movl $0x1, -0x4(%rbp)
jmp 0xdf68
movl -0x20(%rbp), %eax
andl $0xf0, %eax
cmpl $0x0, %eax
je 0xdf5f
movq -0x18(%rbp), %rdi
callq 0xd1e0
movl $0x1, -0x4(%rbp)
jmp 0xdf68
jmp 0xdf61
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/cbmdosfs.c
// Function: CbmdosFs_optionsWillRewrite
SOEXPORT int CbmdosFs_optionsWillRewrite(
	const CbmdosFs *self, CbmdosFsOptions options)
{
    if (validateOptions(options) < 0) return -1;
    CbmdosFsFlags changedFlags = self->options.flags ^ options.flags;
    if (changedFlags & (
		CFF_FILESONDIRTRACK|CFF_ALLOWLONGDIR|CFF_42TRACK|
		CFF_SIMPLEINTERLEAVE|CFF_TALLOC_TRACKLOAD|CFF_TALLOC_SIMPLE|
		CFF_TALLOC_PREFDIRTRACK|CFF_TALLOC_CHAININTERLV))
    {
	return 1;
    }
    if (!(self->options.flags & CFF_42TRACK) && (changedFlags & CFF_40TRACK))
    {
        return 1;
    }
    if (options.dirInterleave != self->options.dirInterleave) return 1;
    if (options.fileInterleave != self->options.fileInterleave) return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0xc(%rbp), %rdi
callq 0xcd50
cmpl $0x0, %eax
jge 0xdfa7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe026
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
xorl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x3e0b, %eax           # imm = 0x3E0B
cmpl $0x0, %eax
je 0xdfca
movl $0x1, -0x4(%rbp)
jmp 0xe026
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xdfed
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xdfed
movl $0x1, -0x4(%rbp)
jmp 0xe026
movzbl -0x8(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x28(%rcx), %ecx
cmpl %ecx, %eax
je 0xe006
movl $0x1, -0x4(%rbp)
jmp 0xe026
movzbl -0x7(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x29(%rcx), %ecx
cmpl %ecx, %eax
je 0xe01f
movl $0x1, -0x4(%rbp)
jmp 0xe026
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/cbmdosfs.c
// Function: CbmdosFs_getFreeBlocksLine
SOEXPORT void CbmdosFs_getFreeBlocksLine(const CbmdosFs *self, uint8_t *line)
{
    uint16_t rawFree = CbmdosFs_freeBlocks(self);
    int free = (rawFree == 0xffff) ? -1 : rawFree;
    if (free > 0 && (self->options.flags & CFF_ZEROFREE)) free = 0;
    char freestr[4];
    snprintf(freestr, sizeof freestr, "%d", free);
    memset(line, 0xa0, 16);
    const char *blocksfree = " BLOCKS FREE.";
    uint8_t *w = line;
    const char *r = freestr;
    while (*r) *w++ = *r++;
    r = blocksfree;
    while (*r) *w++ = *r++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5400
movw %ax, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0xe9c2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x3c(%rbp)
jmp 0xe9c9
movzwl -0x12(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0xe9ed
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xe9ed
movl $0x0, -0x18(%rbp)
leaq -0x1c(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x4, %esi
leaq 0x58f0(%rip), %rdx      # 0x142f0
movb $0x0, %al
callq 0x52b0
movq -0x10(%rbp), %rdi
movl $0xa0, %esi
movl $0x10, %edx
callq 0x5340
leaq 0x58d2(%rip), %rax      # 0x142f3
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0xea62
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0xea35
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0xea97
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0xea6a
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: deleteChain
static void deleteChain(CbmdosFs *self, uint8_t nexttrack, uint8_t nextsect)
{
    if (self->bam[nexttrack-1][nextsect] != 1) return;
    do
    {
        if (nexttrack == 18 && nextsect == 0)
        {
            logmsg(L_WARNING, "CbmdosFs: refusing to delete BAM at [18:0]");
            return;
        }
        uint8_t *dir = Sector_content(
                D64_sector(self->d64, nexttrack, nextsect));
        self->bam[nexttrack-1][nextsect] = 0;
        nexttrack = dir[0];
        nextsect = dir[1];
    } while (nexttrack && self->bam[nexttrack-1][nextsect] == 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x9(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0xa(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
je 0xeae2
jmp 0xeba5
jmp 0xeae4
movzbl -0x9(%rbp), %eax
cmpl $0x12, %eax
jne 0xeb0c
movzbl -0xa(%rbp), %eax
cmpl $0x0, %eax
jne 0xeb0c
movl $0x2, %edi
leaq 0x5913(%rip), %rsi      # 0x14415
callq 0x5a60
jmp 0xeba5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movb -0x9(%rbp), %al
movzbl %al, %esi
movzbl -0xa(%rbp), %edx
callq 0x5030
movq %rax, %rdi
callq 0x56f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x9(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0xa(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0xa(%rbp)
movzbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0xeb9a
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x9(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0xa(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xeae4
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: freeSectorOnTrack
static uint8_t freeSectorOnTrack(CbmdosFs *self, uint8_t trackno,
        uint8_t sectno, uint8_t interlv, int simpleInterlv)
{
    uint8_t sectors = Track_sectors(D64_track(self->d64, trackno));
    uint8_t nextsect = 0;
    if (interlv)
    {
	if (simpleInterlv)
	{
	    nextsect = (sectno + interlv) % sectors;
	}
	else
	{
	    nextsect = sectno + interlv;
	    if (nextsect >= sectors)
	    {
		nextsect -= sectors;
		if (nextsect) --nextsect;
	    }
	}
    }
    uint8_t tmp = nextsect;
    while (self->bam[trackno-1][nextsect])
    {
        ++nextsect;
        if (nextsect == sectors) nextsect = 0;
        if (nextsect == tmp) break;
    }
    return self->bam[trackno-1][nextsect] ? 0xff : nextsect;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, -0x8(%rbp)
movb %dl, -0x9(%rbp)
movb %cl, -0xa(%rbp)
movb %al, -0xb(%rbp)
movl %r8d, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzbl -0x9(%rbp), %esi
callq 0x52a0
movq %rax, %rdi
callq 0x57b0
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
cmpb $0x0, -0xb(%rbp)
je 0xec4d
cmpl $0x0, -0x10(%rbp)
je 0xec13
movzbl -0xa(%rbp), %eax
movzbl -0xb(%rbp), %ecx
addl %ecx, %eax
movzbl -0x11(%rbp), %ecx
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x12(%rbp)
jmp 0xec4b
movzbl -0xa(%rbp), %eax
movzbl -0xb(%rbp), %ecx
addl %ecx, %eax
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jl 0xec49
movzbl -0x11(%rbp), %ecx
movzbl -0x12(%rbp), %eax
subl %ecx, %eax
movb %al, -0x12(%rbp)
cmpb $0x0, -0x12(%rbp)
je 0xec47
movb -0x12(%rbp), %al
addb $-0x1, %al
movb %al, -0x12(%rbp)
jmp 0xec49
jmp 0xec4b
jmp 0xec4d
movb -0x12(%rbp), %al
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x9(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0x12(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0xec9e
movb -0x12(%rbp), %al
addb $0x1, %al
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0xec8e
movb $0x0, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x13(%rbp), %ecx
cmpl %ecx, %eax
jne 0xec9c
jmp 0xec9e
jmp 0xec53
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x9(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0x12(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xecce
movl $0xff, %eax
movl %eax, -0x18(%rbp)
jmp 0xecd5
movzbl -0x12(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: createTrackBam
static void createTrackBam(CbmdosFs *self, uint8_t *tbam, uint8_t trackno)
{
    uint8_t sectors = Track_sectors(D64_track(self->d64, trackno));
    tbam[0] = sectors;
    tbam[1] = 0xff;
    tbam[2] = 0xff;
    tbam[3] = 0xff >> (24 - sectors);
    for (uint8_t sectno = 0; sectno < sectors; ++sectno)
    {
        if (self->bam[trackno-1][sectno])
        {
            --tbam[0];
            tbam[1+sectno/8] ^= (1U << (sectno%8));
        }
    }
    if (self->options.flags & CFF_ZEROFREE)
    {
	tbam[0] = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movzbl -0x11(%rbp), %esi
callq 0x52a0
movq %rax, %rdi
callq 0x57b0
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x1(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x2(%rax)
movzbl -0x12(%rbp), %eax
movl $0x18, %ecx
subl %eax, %ecx
movl $0xff, %eax
sarl %cl, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movb $0x0, -0x13(%rbp)
movzbl -0x13(%rbp), %eax
movzbl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0xf07f
movq -0x8(%rbp), %rax
addq $0x2c, %rax
movzbl -0x11(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0x13(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
je 0xf070
movq -0x10(%rbp), %rax
movb (%rax), %cl
addb $-0x1, %cl
movb %cl, (%rax)
movzbl -0x13(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movzbl -0x13(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0xf072
movb -0x13(%rbp), %al
addb $0x1, %al
movb %al, -0x13(%rbp)
jmp 0xeff8
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xf097
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: scratchFile
static void scratchFile(CbmdosFs *self, unsigned pos)
{
    if (self->dir.entries[pos].sidetrack)
    {
        deleteChain(self, self->dir.entries[pos].sidetrack,
                self->dir.entries[pos].sidesector);
    }
    if (self->dir.entries[pos].starttrack)
    {
        deleteChain(self, self->dir.entries[pos].starttrack,
                self->dir.entries[pos].startsector);
    }
    memset(self->dir.entries + pos, 0, sizeof *self->dir.entries);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x4(%rax)
je 0xf0fe
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x4(%rax), %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %edx
imulq $0x6, %rdx, %rdx
addq %rdx, %rax
movzbl %cl, %esi
movzbl 0x5(%rax), %edx
callq 0xeaa0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x2(%rax)
je 0xf14d
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movb 0x2(%rax), %cl
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %edx
imulq $0x6, %rdx, %rdx
addq %rdx, %rax
movzbl %cl, %esi
movzbl 0x3(%rax), %edx
callq 0xeaa0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %eax
imulq $0x6, %rax, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x5340
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: findStartSector
static int findStartSector(CbmdosFs *self,
        uint8_t *trackno, uint8_t *sectno, const CbmdosFsOptions *opts)
{
    uint8_t tn = startTrack(opts, 0);
    do
    {
	for (uint8_t sn = 0;
		sn < Track_sectors(D64_rtrack(self->d64, tn)); ++sn)
	{
	    if (!self->bam[tn-1][sn])
	    {
		*trackno = tn;
		*sectno = sn;
		return 0;
	    }
	}
    } while ((tn = startTrack(opts, tn)));
    return -1;
}

// 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 -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xf370
movb %al, -0x29(%rbp)
movb $0x0, -0x2a(%rbp)
movzbl -0x2a(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movzbl -0x29(%rbp), %esi
callq 0x5050
movq %rax, %rdi
callq 0x57b0
movb %al, %cl
movl -0x30(%rbp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
jge 0xf21f
movq -0x10(%rbp), %rax
addq $0x2c, %rax
movzbl -0x29(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x15, %rcx, %rcx
addq %rcx, %rax
movzbl -0x2a(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0xf213
movb -0x29(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x2a(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xf240
jmp 0xf215
movb -0x2a(%rbp), %al
addb $0x1, %al
movb %al, -0x2a(%rbp)
jmp 0xf1aa
jmp 0xf221
movq -0x28(%rbp), %rdi
movzbl -0x29(%rbp), %esi
callq 0xf370
movb %al, -0x29(%rbp)
cmpb $0x0, %al
jne 0xf1a6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: findNextSector
static int findNextSector(CbmdosFs *self,
        uint8_t *trackno, uint8_t *sectno, const CbmdosFsOptions *opts)
{
    uint8_t tn = *trackno;
    uint8_t sn = freeSectorOnTrack(self, tn, *sectno, opts->fileInterleave,
            (opts->flags & CFF_SIMPLEINTERLEAVE));
    do
    {
	if (sn != 0xff)
	{
	    *trackno = tn;
	    *sectno = sn;
	    return 0;
	}
	if ((tn = nextTrack(opts, tn)))
	{
	    if (opts->flags & CFF_TALLOC_CHAININTERLV)
	    {
		sn = freeSectorOnTrack(self, tn, sn, opts->fileInterleave,
                        (opts->flags & CFF_SIMPLEINTERLEAVE));
	    }
	    else
	    {
		sn = freeSectorOnTrack(self, tn, sn, 0, 0);
	    }
	}
    } while (tn);
    return findStartSector(self, trackno, sectno, opts);
}

// 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), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rdi
movb -0x29(%rbp), %dl
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb 0x5(%rax), %al
movq -0x28(%rbp), %rsi
movl (%rsi), %r8d
andl $0x200, %r8d            # imm = 0x200
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
callq 0xebb0
movb %al, -0x2a(%rbp)
movzbl -0x2a(%rbp), %eax
cmpl $0xff, %eax
je 0xf2cd
movb -0x29(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x2a(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xf365
movq -0x28(%rbp), %rdi
movzbl -0x29(%rbp), %esi
callq 0xece0
movb %al, -0x29(%rbp)
cmpb $0x0, %al
je 0xf341
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0xf323
movq -0x10(%rbp), %rdi
movb -0x29(%rbp), %dl
movb -0x2a(%rbp), %cl
movq -0x28(%rbp), %rax
movb 0x5(%rax), %al
movq -0x28(%rbp), %rsi
movl (%rsi), %r8d
andl $0x200, %r8d            # imm = 0x200
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
callq 0xebb0
movb %al, -0x2a(%rbp)
jmp 0xf33f
movq -0x10(%rbp), %rdi
movb -0x29(%rbp), %al
xorl %r8d, %r8d
movzbl %al, %esi
movzbl -0x2a(%rbp), %edx
movl %r8d, %ecx
callq 0xebb0
movb %al, -0x2a(%rbp)
jmp 0xf341
jmp 0xf343
cmpb $0x0, -0x29(%rbp)
jne 0xf2a4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xf180
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfs.c
// Function: startTrack
static uint8_t startTrack(const CbmdosFsOptions *opts, uint8_t trackno)
{
    if (!trackno)
    {
	if ((opts->flags & CFF_FILESONDIRTRACK)
		&& (opts->flags & CFF_TALLOC_PREFDIRTRACK))
	{
	    return 18;
	}
	if (opts->flags & CFF_TALLOC_TRACKLOAD)
	{
	    return 1;
	}
	if (opts->flags & CFF_TALLOC_SIMPLE)
	{
	    return 19;
	}
	return 17;
    }
    if (opts->flags & (CFF_TALLOC_TRACKLOAD | CFF_TALLOC_SIMPLE))
    {
	return nextTrack(opts, trackno);
    }
    if (trackno >= 40 && !(opts->flags & CFF_42TRACK))
    {
	return 0;
    }
    if (trackno >= 35)
    {
	if (!(opts->flags & (CFF_40TRACK | CFF_42TRACK)))
	{
	    return 0;
	}
	return trackno + 1;
    }
    int diff = 18 - trackno;
    if (!diff) return 17;
    if (diff > 0) return 18 + diff;
    return 18 + diff - 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)
jne 0xf3ea
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xf3af
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0xf3af
movb $0x12, -0x1(%rbp)
jmp 0xf489
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0xf3c8
movb $0x1, -0x1(%rbp)
jmp 0xf489
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xf3e1
movb $0x13, -0x1(%rbp)
jmp 0xf489
movb $0x11, -0x1(%rbp)
jmp 0xf489
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xc00, %eax            # imm = 0xC00
cmpl $0x0, %eax
je 0xf40c
movq -0x10(%rbp), %rdi
movzbl -0x11(%rbp), %esi
callq 0xece0
movb %al, -0x1(%rbp)
jmp 0xf489
movzbl -0x11(%rbp), %eax
cmpl $0x28, %eax
jl 0xf429
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xf429
movb $0x0, -0x1(%rbp)
jmp 0xf489
movzbl -0x11(%rbp), %eax
cmpl $0x23, %eax
jl 0xf452
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
jne 0xf446
movb $0x0, -0x1(%rbp)
jmp 0xf489
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movb %al, -0x1(%rbp)
jmp 0xf489
movzbl -0x11(%rbp), %ecx
movl $0x12, %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0xf46c
movb $0x11, -0x1(%rbp)
jmp 0xf489
cmpl $0x0, -0x18(%rbp)
jle 0xf47d
movl -0x18(%rbp), %eax
addl $0x12, %eax
movb %al, -0x1(%rbp)
jmp 0xf489
movl -0x18(%rbp), %eax
addl $0x12, %eax
subl $0x1, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfsoptions.c
// Function: CbmdosFsOptions_applyOverrides
void CbmdosFsOptions_applyOverrides(CbmdosFsOptions *self,
        const CbmdosFsOptOverrides *overrides)
{
    uint8_t interleave = CbmdosFsOptOverrides_interleave(overrides);
    if (interleave != 0xff) self->fileInterleave = interleave;

    CbmdosFsFlags mask = overrides->mask;
    mask &= ~CFF_OVERRIDE_INTERLEAVE;
    self->flags &= ~mask;
    self->flags |= (overrides->flags & mask);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5680
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0xff, %eax
je 0xf4d1
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0xfffffe00, %eax       # imm = 0xFFFFFE00
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
movq -0x8(%rbp), %rax
andl (%rax), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfsoptions.c
// Function: CbmdosFsOptOverrides_setInterleave
void CbmdosFsOptOverrides_setInterleave(
        CbmdosFsOptOverrides *self, uint8_t interleave)
{
    self->flags &= ~CFF_OVERRIDE_INTERLEAVE;
    if (interleave == 0xff)
    {
        self->mask &= ~CFF_OVERRIDE_INTERLEAVE;
    }
    else
    {
        self->mask |= CFF_OVERRIDE_INTERLEAVE;
        self->flags |= (interleave & CFF_OVERRIDE_INTERLEAVE);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
movl %ecx, (%rax)
movzbl -0x9(%rbp), %eax
cmpl $0xff, %eax
jne 0xf589
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0xfffffe00, %ecx       # imm = 0xFFFFFE00
movl %ecx, 0x4(%rax)
jmp 0xf5ab
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1ff, %ecx            # imm = 0x1FF
movl %ecx, 0x4(%rax)
movzbl -0x9(%rbp), %ecx
andl $0x1ff, %ecx            # imm = 0x1FF
movq -0x8(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_create
SOLOCAL CbmdosInode *CbmdosInode_create(void)
{
    CbmdosInode *self = xmalloc(sizeof *self);
    self->data = FileData_create();
    self->changedEvent = Event_create(0, self);
    self->overrides = CFOO_NONE;
    self->refcount = 0;
    Event_register(FileData_changedEvent(self->data), self, fileDataHandler);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x20, %edi
callq 0x58d0
movq %rax, -0x8(%rbp)
callq 0x5540
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5460
movq %rax, %rdi
movq -0x8(%rbp), %rsi
leaq 0x16(%rip), %rdx        # 0xf640
callq 0x5590
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_clone
SOLOCAL CbmdosInode *CbmdosInode_clone(const CbmdosInode *other)
{
    CbmdosInode *self = xmalloc(sizeof *self);
    self->data = FileData_clone(other->data);
    self->changedEvent = Event_create(0, self);
    self->overrides = other->overrides;
    self->refcount = 0;
    Event_register(FileData_changedEvent(self->data), self, fileDataHandler);
    return self;
}

// 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), %rdi
callq 0x5160
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5460
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq -0xcb(%rip), %rdx       # 0xf640
callq 0x5590
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosinode.c
// Function: CbmdosInode_setData
SOEXPORT void CbmdosInode_setData(CbmdosInode *self, FileData *data)
{
    Event_unregister(FileData_changedEvent(self->data), self, fileDataHandler);
    FileData_destroy(self->data);
    self->data = data;
    Event_register(FileData_changedEvent(self->data), self, fileDataHandler);
    CbmdosInodeEventArgs ea = { CIE_DATACHANGED };
    Event_raise(self->changedEvent, &ea);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5460
movq %rax, %rdi
movq -0x8(%rbp), %rsi
leaq -0x14a(%rip), %rdx      # 0xf640
callq 0x5350
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5410
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5460
movq %rax, %rdi
movq -0x8(%rbp), %rsi
leaq -0x180(%rip), %rdx      # 0xf640
callq 0x5590
leaq -0x14(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x5340
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x14(%rbp), %rsi
callq 0x5620
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)