LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/zc45extractor.c
// Function: extractZc45
SOEXPORT D64 *extractZc45(const ZcFileSet *fileset)
{
    if (!fileset) return 0;
    ZcType type = ZcFileSet_type(fileset);
    if (type != ZT_4PACK && type != ZT_5PACK)
    {
        logmsg(L_ERROR, "extractZc45: trying to extract something that isn't "
                "a 4 or 5 file disk Zippack.");
        return 0;
    }

    D64 *extracted = D64_create(type == ZT_4PACK ? D64_STANDARD : D64_40TRACK);
    for (int i = 0; i < (type == ZT_4PACK ? 4 : 5); ++i)
    {
	const FileData *fd = ZcFileSet_rfileData(fileset, i);
	if (zc45_read(extracted, sectorcount[i],
                    FileData_rcontent(fd), FileData_size(fd))
		!= sectorcount[i])
	{
            logfmt(L_ERROR, "extractZc45: extraction failed in part %d.", i+1);
	    D64_destroy(extracted);
	    return 0;
	}
    }

    logfmt(L_DEBUG, "extractZc45: %d-file zipcode successfully extracted.",
            type == ZT_4PACK ? 4 : 5);
    return extracted;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x8440
movq $0x0, -0x8(%rbp)
jmp 0x8580
movq -0x10(%rbp), %rdi
callq 0x5530
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x8476
cmpl $0x1, -0x14(%rbp)
je 0x8476
movl $0x1, %edi
leaq 0xb49b(%rip), %rsi      # 0x138ff
callq 0x5a60
movq $0x0, -0x8(%rbp)
jmp 0x8580
movl -0x14(%rbp), %ecx
movl $0x1, %edi
xorl %eax, %eax
cmpl $0x0, %ecx
cmovel %eax, %edi
callq 0x5600
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x14(%rbp), %esi
movl $0x5, %ecx
movl $0x4, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
cmpl %ecx, %eax
jge 0x8552
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x5370
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0xb4d9(%rip), %rax      # 0x139b0
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x56a0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5550
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq %rax, %rcx
callq 0x5060
movslq -0x24(%rbp), %rdx
leaq 0xb49f(%rip), %rcx      # 0x139b0
cmpl (%rcx,%rdx,4), %eax
je 0x8542
movl -0x24(%rbp), %edx
addl $0x1, %edx
movl $0x1, %edi
leaq 0xb427(%rip), %rsi      # 0x1394f
movb $0x0, %al
callq 0x5ab0
movq -0x20(%rbp), %rdi
callq 0x55f0
movq $0x0, -0x8(%rbp)
jmp 0x8580
jmp 0x8544
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8496
movl -0x14(%rbp), %ecx
movl $0x5, %edx
movl $0x4, %eax
cmpl $0x0, %ecx
cmovel %eax, %edx
movl $0x4, %edi
leaq 0xb409(%rip), %rsi      # 0x1397a
movb $0x0, %al
callq 0x5ab0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: CbmdosFile_baseCreate
static CbmdosFile *CbmdosFile_baseCreate(CbmdosInode *inode)
{
    CbmdosFile *self = xmalloc(sizeof *self);
    memset(self, 0, sizeof *self);
    self->inode = inode;
    self->changedEvent = Event_create(0, self);
    self->type = CFT_PRG;
    self->invalidType = -1;
    self->closed = 1;
    self->forcedBlocks = 0xffff;
    self->recordLength = 254;
    CbmdosInode_attach(self->inode);
    Event_register(CbmdosInode_changedEvent(self->inode), self, inodeHandler);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x30, %edi
callq 0x58d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x5340
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl $0x1, 0x24(%rax)
movq -0x10(%rbp), %rax
movw $0xffff, 0x2e(%rax)     # imm = 0xFFFF
movq -0x10(%rbp), %rax
movb $-0x2, 0x2d(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf910
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5730
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq 0x27a(%rip), %rdx       # 0x8910
callq 0x5590
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/cbmdosfile.c
// Function: CbmdosFile_clone
SOEXPORT CbmdosFile *CbmdosFile_clone(const CbmdosFile *other)
{
    CbmdosFile *self = xmalloc(sizeof *self);
    self->type = other->type;
    self->invalidType = other->invalidType;
    self->locked = other->locked;
    self->closed = other->closed;
    self->autoMapToLc = 0;
    self->name = 0;
    self->inode = CbmdosInode_clone(other->inode);
    self->changedEvent = Event_create(0, self);
    self->nameLength = 0;
    self->recordLength = other->recordLength;
    self->forcedBlocks = other->forcedBlocks;
    uint8_t len;
    const char *name = CbmdosFile_name(other, &len);
    CbmdosFile_setName(self, name, len);
    self->autoMapToLc = other->autoMapToLc;
    CbmdosInode_attach(self->inode);
    Event_register(CbmdosInode_changedEvent(self->inode), self, inodeHandler);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x30, %edi
callq 0x58d0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf690
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movb 0x2d(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2d(%rax)
movq -0x8(%rbp), %rax
movw 0x2e(%rax), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2e(%rax)
movq -0x8(%rbp), %rdi
leaq -0x11(%rbp), %rsi
callq 0x5380
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movzbl -0x11(%rbp), %edx
callq 0x5310
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf910
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5730
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq 0x14c(%rip), %rdx       # 0x8910
callq 0x5590
movq -0x10(%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/cbmdosfile.c
// Function: CbmdosFile_setName
SOEXPORT void CbmdosFile_setName(
	CbmdosFile *self, const char *name, uint8_t length)
{
    if (length > 16)
    {
        logmsg(L_WARNING, "CbmdosFile_setName: truncating long name.");
        length = 16;
    }
    free(self->name);
    if (name)
    {
        self->name = xmalloc(length+1);
        memcpy(self->name, name, length);
        self->name[length] = 0;
    }
    else
    {
        self->name = 0;
        if (length)
        {
            logmsg(L_WARNING, "CbmdosFile_setName: length > 0 given for empty "
                    "name.");
            length = 0;
        }
    }
    self->nameLength = length;
    if (self->autoMapToLc)
    {
	petscii_mapUpperGfxToLower(self->name, self->nameLength);
    }
    CbmdosFileEventArgs args = { CFE_NAMECHANGED };
    Event_raise(self->changedEvent, &args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x10, %eax
jle 0x8843
movl $0x2, %edi
leaq 0xb1ac(%rip), %rsi      # 0x139e6
callq 0x5a60
movb $0x10, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
cmpq $0x0, -0x10(%rbp)
je 0x889a
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movzbl -0x11(%rbp), %eax
movl %eax, %edx
callq 0x54c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl -0x11(%rbp), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x88c3
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpb $0x0, -0x11(%rbp)
je 0x88c1
movl $0x2, %edi
leaq 0xb158(%rip), %rsi      # 0x13a10
callq 0x5a60
movb $0x0, -0x11(%rbp)
jmp 0x88c3
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x28(%rax)
je 0x88ee
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0x2c(%rax), %eax
movl %eax, %esi
callq 0x57d0
movl 0xb1e4(%rip), %eax      # 0x13ad8
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x5620
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: inodeHandler
static void inodeHandler(void *receiver, int id, const void *sender,
        const void *args)
{
    (void)id;
    (void)sender;

    const CbmdosInodeEventArgs *iea = args;
    CbmdosFile *self = receiver;

    if (iea->what == CIE_DATACHANGED)
    {
	CbmdosFileEventArgs ea = { CFE_DATACHANGED };
	Event_raise(self->changedEvent, &ea);
    }
    else if (iea->what == CIE_OPTOVERRIDESCHANGED)
    {
	CbmdosFileEventArgs ea = { CFE_OPTOVERRIDESCHANGED };
	Event_raise(self->changedEvent, &ea);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x895b
movl 0xb1a6(%rip), %eax      # 0x13aec
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
leaq -0x34(%rbp), %rsi
callq 0x5620
jmp 0x897f
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x897d
movl 0xb186(%rip), %eax      # 0x13af0
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5620
jmp 0x897f
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: CbmdosFile_setType
SOEXPORT int CbmdosFile_setType(CbmdosFile *self, CbmdosFileType type)
{
    int rc = 0;
    int invalidType = -1;
    type &= 0xf;
    if (type < CFT_DEL || type > CFT_REL)
    {
        logmsg(L_WARNING, "CbmdosFile_setType: invalid type.");
	invalidType = type;
        type = CFT_DEL;
	rc = -1;
    }
    if (type == self->type && invalidType == self->invalidType) return rc;
    if ((self->invalidType < 0 && self->type == CFT_DEL) ||
	    (invalidType < 0 && type == CFT_DEL))
    {
	CbmdosFile_setData(self, FileData_create());
    }
    self->type = type;
    self->invalidType = invalidType;
    CbmdosFileEventArgs args = { CFE_TYPECHANGED };
    Event_raise(self->changedEvent, &args);
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jb 0x8a22
cmpl $0x4, -0x14(%rbp)
jbe 0x8a47
movl $0x2, %edi
leaq 0xaf96(%rip), %rsi      # 0x139c4
callq 0x5a60
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jne 0x8a67
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x8a67
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x8ada
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jge 0x8a7b
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x8a87
cmpl $0x0, -0x1c(%rbp)
jge 0x8aa0
cmpl $0x0, -0x14(%rbp)
jne 0x8aa0
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x5540
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x51c0
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x5340
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x5620
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: CbmdosFile_exportPC64
SOEXPORT int CbmdosFile_exportPC64(const CbmdosFile *self, FILE *file)
{
    uint8_t header[26] = "C64File";
    memcpy(header+8, self->name, self->nameLength);
    if (self->type == CFT_REL) header[25] = self->recordLength;
    if (fwrite(header, sizeof header, 1, file) != 1) return -1;
    return writeHostFile(CbmdosInode_rdata(self->inode), file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0xaf09(%rip), %rax      # 0x13b00
movq %rax, -0x40(%rbp)
movq 0xaf06(%rip), %rax      # 0x13b08
movq %rax, -0x38(%rbp)
movq 0xaf03(%rip), %rax      # 0x13b10
movq %rax, -0x30(%rbp)
movw 0xaf00(%rip), %ax       # 0x13b18
movw %ax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movzbl 0x2c(%rax), %eax
movl %eax, %edx
callq 0x54c0
movq -0x10(%rbp), %rax
cmpl $0x4, 0x18(%rax)
jne 0x8c4f
movq -0x10(%rbp), %rax
movb 0x2d(%rax), %al
movb %al, -0x27(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x1a, %esi
movl $0x1, %edx
callq 0x5750
cmpq $0x1, %rax
je 0x8c75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8c91
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5250
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x55e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: CbmdosFile_import
SOEXPORT int CbmdosFile_import(CbmdosFile *self, FILE *file)
{
    FileData *data = readHostFile(file);
    if (!data) return -1;
    const uint8_t *content = FileData_rcontent(data);
    if (FileData_size(data) > 26 && !content[24]
	    && !memcmp(content, "C64File", sizeof "C64File"))
    {
	FileData *raw = FileData_create();
	if (!raw)
	{
	    FileData_destroy(data);
	    return -1;
	}
	if (FileData_append(raw, content+26, FileData_size(data)-26) < 0)
	{
	    FileData_destroy(raw);
	    FileData_destroy(data);
	    return -1;
	}
	CbmdosFile_setData(self, raw);
	CbmdosFile_setName(self, (const char *)content+8,
		strlen((const char *)content+8));
	CbmdosFile_setRecordLength(self, content[25] ? content[25] : 254);
	FileData_destroy(data);
    }
    else
    {
	CbmdosFile_setData(self, data);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x52f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x8cd0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e32
movq -0x20(%rbp), %rdi
callq 0x56a0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5550
cmpq $0x1a, %rax
jbe 0x8e1e
movq -0x28(%rbp), %rax
cmpb $0x0, 0x18(%rax)
jne 0x8e1e
movq -0x28(%rbp), %rax
movq (%rax), %rax
movabsq $0x656c6946343643, %rcx # imm = 0x656C6946343643
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x8e1e
callq 0x5540
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x8d46
movq -0x20(%rbp), %rdi
callq 0x5410
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e32
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq $0x1a, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5550
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
subq $0x1a, %rdx
callq 0x5790
cmpl $0x0, %eax
jge 0x8d9a
movq -0x30(%rbp), %rdi
callq 0x5410
movq -0x20(%rbp), %rdi
callq 0x5410
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e32
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x51c0
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x5270
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movzbl %al, %edx
callq 0x5310
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x19(%rax), %eax
cmpl $0x0, %eax
je 0x8dfa
movq -0x28(%rbp), %rax
movzbl 0x19(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x8e04
movl $0xfe, %eax
movl %eax, -0x5c(%rbp)
jmp 0x8e04
movq -0x48(%rbp), %rdi
movl -0x5c(%rbp), %eax
movzbl %al, %esi
callq 0x55c0
movq -0x20(%rbp), %rdi
callq 0x5410
jmp 0x8e2b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x51c0
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/cbmdosfile.c
// Function: CbmdosFile_setRecordLength
SOEXPORT int CbmdosFile_setRecordLength(CbmdosFile *self, uint8_t recordLength)
{
    if (recordLength > 254)
    {
        logmsg(L_WARNING, "CbmdosFile_setRecordLength: invalid length, "
                "max is 254.");
        return -1;
    }
    if (recordLength < 1)
    {
        logmsg(L_WARNING, "CbmdosFile_setRecordLength: invalid length, "
                "min is 1.");
        return -1;
    }
    self->recordLength = recordLength;
    CbmdosFileEventArgs ea = { CFE_RECORDLENGTHCHANGED };
    Event_raise(self->changedEvent, &ea);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0xfe, %eax
jle 0x8e77
movl $0x2, %edi
leaq 0xabe4(%rip), %rsi      # 0x13a4d
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ec4
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
jge 0x8e9a
movl $0x2, %edi
leaq 0xabf9(%rip), %rsi      # 0x13a85
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ec4
movb -0x11(%rbp), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2d(%rax)
movl 0xac32(%rip), %eax      # 0x13adc
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x18(%rbp), %rsi
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/cbmdosfile.c
// Function: CbmdosFile_getDirLine
SOEXPORT void CbmdosFile_getDirLine(const CbmdosFile *self, uint8_t *line)
{
    int blocklen = sprintf((char *)line, "%u", CbmdosFile_blocks(self));
    memset(line + blocklen, 0xa0, 28 - blocklen);
    memcpy(line + 6, self->name, self->nameLength);
    if (self->invalidType < 0)
    {
	memcpy(line + 24, CbmdosFileType_name(self->type), 3);
    }
    else
    {
	memcpy(line + 24, "?  ", 3);
    }
    line[5] = 0x22;
    uint8_t endidx = 6;
    int qclosed = 0;
    while (line[endidx] != 0xa0)
    {
	if (line[endidx] == 0x22) qclosed = 1;
	++endidx;
    }
    if (!qclosed) line[endidx] = 0x22;
    if (!self->closed) line[23] = 0x2a;
    if (self->locked) line[27] = 0x3c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5390
movq -0x28(%rbp), %rdi
movzwl %ax, %edx
leaq 0xa92c(%rip), %rsi      # 0x13abb
movb $0x0, %al
callq 0x5740
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movl $0x1c, %eax
subl -0x14(%rbp), %eax
movslq %eax, %rdx
movl $0xa0, %esi
callq 0x5340
movq -0x10(%rbp), %rdi
addq $0x6, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movzbl 0x2c(%rax), %eax
movl %eax, %edx
callq 0x54c0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jge 0x920c
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edi
callq 0x5700
movq %rax, %rcx
movq -0x30(%rbp), %rax
movw (%rcx), %dx
movw %dx, 0x18(%rax)
movb 0x2(%rcx), %cl
movb %cl, 0x1a(%rax)
jmp 0x9224
movq -0x10(%rbp), %rax
movw 0xa8a7(%rip), %cx       # 0x13abe
movw %cx, 0x18(%rax)
movb 0xa89f(%rip), %cl       # 0x13ac0
movb %cl, 0x1a(%rax)
movq -0x10(%rbp), %rax
movb $0x22, 0x5(%rax)
movb $0x6, -0x15(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xa0, %eax
je 0x926c
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x22, %eax
jne 0x9262
movl $0x1, -0x1c(%rbp)
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x9237
cmpl $0x0, -0x1c(%rbp)
jne 0x927e
movq -0x10(%rbp), %rax
movzbl -0x15(%rbp), %ecx
movb $0x22, (%rax,%rcx)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x9290
movq -0x10(%rbp), %rax
movb $0x2a, 0x17(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x92a2
movq -0x10(%rbp), %rax
movb $0x3c, 0x1b(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosfile.c
// Function: CbmdosFile_destroy
SOEXPORT void CbmdosFile_destroy(CbmdosFile *self)
{
    if (!self) return;
    free(self->name);
    Event_destroy(self->changedEvent);
    Event_unregister(CbmdosInode_changedEvent(self->inode), self, inodeHandler);
    CbmdosInode_detach(self->inode);
    CbmdosInode_tryDestroy(self->inode);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x92e5
jmp 0x9341
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5180
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5730
movq %rax, %rdi
movq -0x8(%rbp), %rsi
leaq -0xa09(%rip), %rdx      # 0x8910
callq 0x5350
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf930
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xf970
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/cbmdosvfs.c
// Function: CbmdosVfs_create
SOEXPORT CbmdosVfs *CbmdosVfs_create(void)
{
    CbmdosVfs *self = xmalloc(sizeof *self);
    memset(self, 0, sizeof *self);
    self->files = xmalloc(DIRCHUNKSIZE * sizeof *self->files);
    self->fileCapa = DIRCHUNKSIZE;
    self->dosver = 0x41;
    self->changedEvent = Event_create(0, self);
    return self;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x38, %edi
callq 0x58d0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5340
movl $0x480, %edi            # imm = 0x480
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x90, 0x2c(%rax)
movq -0x8(%rbp), %rax
movb $0x41, 0x32(%rax)
movq -0x8(%rbp), %rsi
xorl %edi, %edi
callq 0x5290
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_setName
SOEXPORT void CbmdosVfs_setName(
	CbmdosVfs *self, const char *name, uint8_t length)
{
    if (length > 16)
    {
        logmsg(L_WARNING, "CbmdosVfs_setName: truncating long name.");
        length = 16;
    }
    free(self->name);
    if (name)
    {
        self->name = xmalloc(length+1);
        memcpy(self->name, name, length);
        self->name[length] = 0;
    }
    else
    {
        self->name = 0;
        if (length)
        {
            logmsg(L_WARNING, "CbmdosVfs_setName: length > 0 given for empty "
                    "name.");
            length = 0;
        }
    }
    self->nameLength = length;
    if (self->autoMapToLc)
    {
	petscii_mapUpperGfxToLower(self->name, self->nameLength);
    }
    CbmdosVfsEventArgs args = { .what = CVE_NAMECHANGED };
    Event_raise(self->changedEvent, &args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x10, %eax
jle 0x9493
movl $0x2, %edi
leaq 0xa690(%rip), %rsi      # 0x13b1a
callq 0x5a60
movb $0x10, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5070
cmpq $0x0, -0x10(%rbp)
je 0x94e6
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movzbl -0x11(%rbp), %eax
movl %eax, %edx
callq 0x54c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movzbl -0x11(%rbp), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x950e
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
cmpb $0x0, -0x11(%rbp)
je 0x950c
movl $0x2, %edi
leaq 0xa640(%rip), %rsi      # 0x13b43
callq 0x5a60
movb $0x0, -0x11(%rbp)
jmp 0x950e
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x30(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x9538
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0x30(%rax), %eax
movl %eax, %esi
callq 0x57d0
movq 0xa719(%rip), %rax      # 0x13c58
movq %rax, -0x30(%rbp)
movq 0xa716(%rip), %rax      # 0x13c60
movq %rax, -0x28(%rbp)
movq 0xa713(%rip), %rax      # 0x13c68
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5620
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_setId
SOEXPORT void CbmdosVfs_setId(CbmdosVfs *self, const char *id, uint8_t length)
{
    if (length > 5)
    {
        logmsg(L_WARNING, "CbmdosVfs_setId: truncating long id.");
        length = 5;
    }
    free(self->id);
    if (id)
    {
        self->id = xmalloc(length+1);
        memcpy(self->id, id, length);
        self->id[length] = 0;
    }
    else
    {
        self->id = 0;
        if (length)
        {
            logmsg(L_WARNING, "CbmdosVfs_setId: length > 0 given for empty "
                    "id.");
            length = 0;
        }
    }
    self->idLength = length;
    if (self->autoMapToLc)
    {
	petscii_mapUpperGfxToLower(self->id, self->idLength);
    }
    CbmdosVfsEventArgs args = { .what = CVE_IDCHANGED };
    Event_raise(self->changedEvent, &args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x5, %eax
jle 0x95d3
movl $0x2, %edi
leaq 0xa5ad(%rip), %rsi      # 0x13b77
callq 0x5a60
movb $0x5, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
cmpq $0x0, -0x10(%rbp)
je 0x962a
movzbl -0x11(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x58d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movzbl -0x11(%rbp), %eax
movl %eax, %edx
callq 0x54c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl -0x11(%rbp), %ecx
movb $0x0, (%rax,%rcx)
jmp 0x9653
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpb $0x0, -0x11(%rbp)
je 0x9651
movl $0x2, %edi
leaq 0xa554(%rip), %rsi      # 0x13b9c
callq 0x5a60
movb $0x0, -0x11(%rbp)
jmp 0x9653
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x31(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x967e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0x31(%rax), %eax
movl %eax, %esi
callq 0x57d0
movq 0xa5eb(%rip), %rax      # 0x13c70
movq %rax, -0x30(%rbp)
movq 0xa5e8(%rip), %rax      # 0x13c78
movq %rax, -0x28(%rbp)
movq 0xa5e5(%rip), %rax      # 0x13c80
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5620
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_mapUpperGfxToLower
SOEXPORT void CbmdosVfs_mapUpperGfxToLower(CbmdosVfs *self, int mapFiles)
{
    if (mapFiles)
    {
	for (unsigned i = 0; i < self->fileCount; ++i)
	{
	    CbmdosFile_mapUpperGfxToLower(self->files[i]);
	}
    }
    petscii_mapUpperGfxToLower(self->name, self->nameLength);
    CbmdosVfsEventArgs args = { .what = CVE_NAMECHANGED };
    Event_raise(self->changedEvent, &args);
    petscii_mapUpperGfxToLower(self->id, self->idLength);
    args.what = CVE_IDCHANGED;
    Event_raise(self->changedEvent, &args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x9709
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x9707
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x10(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x5780
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x96dc
jmp 0x9709
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0x30(%rax), %eax
movl %eax, %esi
callq 0x57d0
movq 0xa562(%rip), %rax      # 0x13c88
movq %rax, -0x28(%rbp)
movq 0xa55f(%rip), %rax      # 0x13c90
movq %rax, -0x20(%rbp)
movq 0xa55c(%rip), %rax      # 0x13c98
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5620
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0x31(%rax), %eax
movl %eax, %esi
callq 0x57d0
movl $0x2, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5620
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_delete
SOEXPORT int CbmdosVfs_delete(CbmdosVfs *self, const CbmdosFile *file)
{
    unsigned pos;
    for (pos = 0; pos < self->fileCount; ++pos)
    {
        if (self->files[pos] == file) break;
    }
    if (pos == self->fileCount)
    {
        logmsg(L_WARNING, "CbmdosVfs_delete: file not found.");
        return -1;
    }
    return CbmdosVfs_deleteAt(self, pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x9877
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x986a
jmp 0x9877
jmp 0x986c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9847
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jne 0x989d
movl $0x2, %edi
leaq 0xa33d(%rip), %rsi      # 0x13bcc
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x98ac
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5130
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_deleteAt
SOEXPORT int CbmdosVfs_deleteAt(CbmdosVfs *self, unsigned pos)
{
    if (pos >= self->fileCount)
    {
        logmsg(L_WARNING, "CbmdosVfs_deleteAt: file not found.");
        return -1;
    }
    CbmdosFile_destroy(self->files[pos]);
    if (pos < --self->fileCount)
    {
        memmove(self->files + pos, self->files + pos + 1,
                (self->fileCount - pos) * sizeof *self->files);
    }
    CbmdosVfsEventArgs args = {
        .what = CVE_FILEDELETED,
        .filepos = pos
    };
    Event_raise(self->changedEvent, &args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jb 0x98f8
movl $0x2, %edi
leaq 0xa307(%rip), %rsi      # 0x13bee
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9993
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x50e0
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rdx
movl 0x28(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x28(%rdx)
cmpl %ecx, %eax
jae 0x995f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x14(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x14(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x5670
movl $0x4, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5620
movl $0x0, -0x4(%rbp)
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/cbmdosvfs.c
// Function: CbmdosVfs_append
SOEXPORT int CbmdosVfs_append(CbmdosVfs *self, CbmdosFile *file)
{
    if (ensureSpace(self) < 0) return -1;
    self->files[self->fileCount++] = file;
    Event_register(CbmdosFile_changedEvent(file), self, fileHandler);
    CbmdosVfsEventArgs args = {
        .what = CVE_FILEADDED,
        .filepos = self->fileCount - 1
    };
    Event_raise(self->changedEvent, &args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9a50
cmpl $0x0, %eax
jge 0x99c7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9a3f
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x28(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x28(%rsi)
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x56c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq 0x111(%rip), %rdx       # 0x9b10
callq 0x5590
movl $0x3, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: ensureSpace
static int ensureSpace(CbmdosVfs *self)
{
    if (self->fileCount == self->fileCapa)
    {
        unsigned newCapa = self->fileCapa + DIRCHUNKSIZE;
        if (newCapa <= self->fileCapa)
        {
            logmsg(L_ERROR, "CbmdosVfs: directory overflow.");
            return -1;
        }
        CbmdosFile **newFiles = realloc(self->files,
                newCapa * sizeof *newFiles);
        if (!newFiles)
        {
            logmsg(L_ERROR, "CbmdosVfs: memory allocation failed.");
            return -1;
        }
        self->files = newFiles;
        self->fileCapa = newCapa;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jne 0x9af6
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
addl $0x90, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
ja 0x9aa5
movl $0x1, %edi
leaq 0xa17b(%rip), %rsi      # 0x13c12
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9afd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x55d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9ae0
movl $0x1, %edi
leaq 0xa15f(%rip), %rsi      # 0x13c31
callq 0x5a60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9afd
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
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/cbmdosvfs.c
// Function: fileHandler
static void fileHandler(void *receiver, int id, const void *sender,
        const void *args)
{
    (void)id;

    CbmdosVfs *self = receiver;
    unsigned pos;
    for (pos = 0; pos < self->fileCount; ++pos)
    {
        if (self->files[pos] == sender) break;
    }
    CbmdosVfsEventArgs ea = {
        .what = CVE_FILECHANGED,
        .fileEventArgs = args,
        .filepos = pos
    };
    Event_raise(self->changedEvent, &ea);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x9b66
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x9b59
jmp 0x9b66
jmp 0x9b5b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9b36
movl $0x6, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5620
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_insert
SOEXPORT int CbmdosVfs_insert(CbmdosVfs *self, CbmdosFile *file, unsigned pos)
{
    if (pos >= self->fileCount) return CbmdosVfs_append(self, file);
    if (ensureSpace(self) < 0) return -1;
    memmove(self->files + pos + 1, self->files + pos,
            (self->fileCount++ - pos) * sizeof *self->files);
    self->files[pos] = file;
    Event_register(CbmdosFile_changedEvent(file), self, fileHandler);
    CbmdosVfsEventArgs args = {
        .what = CVE_FILEADDED,
        .filepos = pos
    };
    Event_raise(self->changedEvent, &args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jb 0x9bd4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5500
movl %eax, -0x4(%rbp)
jmp 0x9c98
movq -0x10(%rbp), %rdi
callq 0x9a50
cmpl $0x0, %eax
jge 0x9bee
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c98
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x1c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x1c(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rcx
movl 0x28(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x28(%rcx)
subl -0x1c(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x5670
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x1c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x56c0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
leaq -0x14f(%rip), %rdx      # 0x9b10
callq 0x5590
movl $0x3, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_move
SOEXPORT int CbmdosVfs_move(CbmdosVfs *self, unsigned to, unsigned from)
{
    if (from >= self->fileCount) return -1;
    if (to >= self->fileCount) to = self->fileCount - 1;
    if (to == from) return 0;
    CbmdosFile *tmp = self->files[from];
    if (to > from)
    {
	memmove(self->files + from, self->files + from + 1,
		(to - from) * sizeof *self->files);
    }
    else
    {
	memmove(self->files + to + 1, self->files + to,
		(from - to) * sizeof *self->files);
    }
    self->files[to] = tmp;
    CbmdosVfsEventArgs args = {
	.what = CVE_FILEMOVED,
	.filepos = from,
	.targetpos = to
    };
    Event_raise(self->changedEvent, &args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jb 0x9cda
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9de0
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jb 0x9cf3
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x9d07
movl $0x0, -0x4(%rbp)
jmp 0x9de0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jbe 0x9d5f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x18(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x18(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x5670
jmp 0x9d9a
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x14(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x14(%rbp), %eax
shlq $0x3, %rax
addq %rax, %rsi
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x5670
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl $0x5, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x5620
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_getDirHeader
SOEXPORT void CbmdosVfs_getDirHeader(const CbmdosVfs *self, uint8_t *line)
{
    memset(line, 0xa0, 24);
    line[0] = 0x22;
    line[17] = 0x22;
    line[22] = 0x32;
    line[23] = self->dosver;
    memcpy(line+1, self->name, self->nameLength);
    memcpy(line+19, self->id, self->idLength);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xa0, %esi
movl $0x18, %edx
callq 0x5340
movq -0x10(%rbp), %rax
movb $0x22, (%rax)
movq -0x10(%rbp), %rax
movb $0x22, 0x11(%rax)
movq -0x10(%rbp), %rax
movb $0x32, 0x16(%rax)
movq -0x8(%rbp), %rax
movb 0x32(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x17(%rax)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movzbl 0x30(%rax), %eax
movl %eax, %edx
callq 0x54c0
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movzbl 0x31(%rax), %eax
movl %eax, %edx
callq 0x54c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_setAutoMapToLc
SOEXPORT void CbmdosVfs_setAutoMapToLc(
	CbmdosVfs *self, int autoMapToLc, int applyToFiles)
{
    if (applyToFiles)
    {
	for (unsigned i = 0; i < self->fileCount; ++i)
	{
	    CbmdosFile_setAutoMapToLc(self->files[i], autoMapToLc);
	}
    }
    self->autoMapToLc = !!autoMapToLc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x9eef
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x9eed
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
callq 0x50d0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9ebf
jmp 0x9eef
cmpl $0x0, -0xc(%rbp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfs.c
// Function: CbmdosVfs_destroy
SOEXPORT void CbmdosVfs_destroy(CbmdosVfs *self)
{
    if (!self) return;
    for (unsigned pos = 0; pos < self->fileCount; ++pos)
    {
        CbmdosFile_destroy(self->files[pos]);
    }
    Event_destroy(self->changedEvent);
    free(self->files);
    free(self->name);
    free(self->id);
    free(self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x9f45
jmp 0x9fb3
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jae 0x9f77
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x50e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9f4c
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x5180
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5070
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5070
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/cbmdosvfsreader.c
// Function: parseTrackBam
static int parseTrackBam(uint8_t *bamdata, uint8_t sectors,
	const uint8_t *trackbam)
{
    uint8_t tmp[21] = {0};
    uint8_t sectfree = 0;
    for (uint8_t sectno = 0; sectno < sectors; ++sectno)
    {
	if (trackbam[1+sectno/8] & (1U << (sectno%8)))
	{
	    ++sectfree;
	}
	else
	{
	    tmp[sectno] = 1;
	}
    }
    if (bamdata) memcpy(bamdata, tmp, 21);
    if (sectfree != trackbam[0]) return -1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x15, %edx
callq 0x5340
movb $0x0, -0x41(%rbp)
movb $0x0, -0x42(%rbp)
movzbl -0x42(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jge 0xafb1
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movzbl -0x42(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
movzbl -0x42(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x48(%rbp), %eax
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xaf9c
movb -0x41(%rbp), %al
addb $0x1, %al
movb %al, -0x41(%rbp)
jmp 0xafa5
movzbl -0x42(%rbp), %eax
movb $0x1, -0x40(%rbp,%rax)
jmp 0xafa7
movb -0x42(%rbp), %al
addb $0x1, %al
movb %al, -0x42(%rbp)
jmp 0xaf3e
cmpq $0x0, -0x10(%rbp)
je 0xafd7
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x30(%rbp), %ecx
movl %ecx, 0x10(%rax)
movb -0x2c(%rbp), %cl
movb %cl, 0x14(%rax)
movzbl -0x41(%rbp), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0xafef
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xaff6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/cbmdosvfsreader.c
// Function: readCbmdosVfs
SOEXPORT int readCbmdosVfs(CbmdosVfs *vfs, const D64 *d64,
	const CbmdosFsOptions *options)
{
    CbmdosFsOptions probeopts = CFO_DEFAULT;
    if (!options)
    {
	if (probeCbmdosFsOptions(&probeopts, d64) < 0) return -1;
	options = &probeopts;
    }
    return readCbmdosVfsInternal(vfs, d64, options, 0, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq 0xdfcd(%rip), %rax      # 0x18fe8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xb04c
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x53a0
cmpl $0x0, %eax
jge 0xb044
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb068
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x9fc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)