LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/excess-c64[P]lib1541img/src/lib/1541img/d64reader.c
// Function: readD64FromFileData
SOEXPORT D64 *readD64FromFileData(const FileData *file)
{
    size_t size = FileData_size(file);
    D64Type type;

    switch (size)
    {
        case 174848UL:
        case 175531UL:
            type = D64_STANDARD;
            break;
        case 196608UL:
        case 197376UL:
            type = D64_40TRACK;
            break;
        case 205312UL:
        case 206114UL:
            type = D64_42TRACK;
            break;
        default:
            logmsg(L_WARNING, "readD64FromFileData: not a valid D64 file.");
            return 0;
    }

    D64 *d64 = D64_create(type);
    const uint8_t *bytes = FileData_rcontent(file);
    uint8_t tracks = D64_tracks(d64);
    for (uint8_t trackno = 1; trackno <= tracks; ++trackno)
    {
        Track *track = D64_track(d64, trackno);
        uint8_t sectors = Track_sectors(track);
        for (uint8_t sectno = 0; sectno < sectors; ++sectno)
        {
            uint8_t *sectbytes = Sector_content(Track_sector(track, sectno));
            memcpy(sectbytes, bytes, 256);
            bytes += 256;
        }
    }
    return d64;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5550
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
subq $0x2ab00, %rax          # imm = 0x2AB00
je 0xbc51
jmp 0xbc0b
movq -0x58(%rbp), %rax
subq $0x2adab, %rax          # imm = 0x2ADAB
je 0xbc51
jmp 0xbc19
movq -0x58(%rbp), %rax
subq $0x30000, %rax          # imm = 0x30000
je 0xbc5a
jmp 0xbc27
movq -0x58(%rbp), %rax
subq $0x30300, %rax          # imm = 0x30300
je 0xbc5a
jmp 0xbc35
movq -0x58(%rbp), %rax
subq $0x32200, %rax          # imm = 0x32200
je 0xbc63
jmp 0xbc43
movq -0x58(%rbp), %rax
subq $0x32522, %rax          # imm = 0x32522
je 0xbc63
jmp 0xbc6c
movl $0x0, -0x1c(%rbp)
jmp 0xbc8a
movl $0x1, -0x1c(%rbp)
jmp 0xbc8a
movl $0x2, -0x1c(%rbp)
jmp 0xbc8a
movl $0x2, %edi
leaq 0x822d(%rip), %rsi      # 0x13ea5
callq 0x5a60
movq $0x0, -0x8(%rbp)
jmp 0xbd46
movl -0x1c(%rbp), %edi
callq 0x5600
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x56a0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5630
movb %al, -0x31(%rbp)
movb $0x1, -0x32(%rbp)
movzbl -0x32(%rbp), %eax
movzbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jg 0xbd3e
movq -0x28(%rbp), %rdi
movzbl -0x32(%rbp), %esi
callq 0x52a0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x57b0
movb %al, -0x41(%rbp)
movb $0x0, -0x42(%rbp)
movzbl -0x42(%rbp), %eax
movzbl -0x41(%rbp), %ecx
cmpl %ecx, %eax
jge 0xbd2f
movq -0x40(%rbp), %rdi
movzbl -0x42(%rbp), %esi
callq 0x5090
movq %rax, %rdi
callq 0x56f0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x54c0
movq -0x30(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x30(%rbp)
movb -0x42(%rbp), %al
addb $0x1, %al
movb %al, -0x42(%rbp)
jmp 0xbce0
jmp 0xbd31
movb -0x32(%rbp), %al
addb $0x1, %al
movb %al, -0x32(%rbp)
jmp 0xbcb3
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq