LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/erik[P]gamut/./farbfeld.h
// Function: read_pixel
static inline void read_pixel(pixel_t* rgba)
{
    if (fread(rgba, sizeof(uint16_t), 4, stdin) != 4) {
        fprintf(stderr, "unexpected EOF\n");
        exit(1);
    }

    ntoh_pixel(rgba, rgba);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq 0x2b91(%rip), %rax      # 0x3fd8
movq (%rax), %rcx
movl $0x2, %esi
movl $0x4, %edx
callq 0x1030
cmpq $0x4, %rax
je 0x1481
movq 0x2b92(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xbd0(%rip), %rsi       # 0x2040
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x10a0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1510
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erik[P]gamut/./farbfeld.h
// Function: ntoh_pixel
static void ntoh_pixel(pixel_t* dst, pixel_t* src)
{
    dst->r = ntohs(src->r);
    dst->g = ntohs(src->g);
    dst->b = ntohs(src->b);
    dst->a = ntohs(src->a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %edi
callq 0x1090
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %edi
callq 0x1090
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %edi
callq 0x1090
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movzwl 0x6(%rax), %edi
callq 0x1090
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x6(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/aes128poetv1aes128/ref/poet.c
// Function: encrypt_block
void encrypt_block(struct poet_ctx *ctx, const uint8_t plaintext[16],
		   uint8_t ciphertext[16])
{
  block tmp;
  TOP_HASH;
  xor_block(ctx->x, plaintext,ctx->x);
  
  AES_encrypt(ctx->x, tmp, &(ctx->aes_enc)); // in, out, key

  BOTTOM_HASH;
  xor_block(ciphertext, tmp,ctx->y); // result, a, b

  memcpy(ctx->y, tmp, BLOCKLEN);
  ctx->mlen+=BLOCKLEN_BITS;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq 0x20(%rsp), %rsi
addq $0x420, %rsi            # imm = 0x420
movq 0x20(%rsp), %rdx
addq $0x1e8, %rdx            # imm = 0x1E8
callq 0x1060
movq 0x20(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq $0x420, %rdx            # imm = 0x420
callq 0x1100
movq 0x20(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
movq %rsp, %rsi
movq 0x20(%rsp), %rdx
callq 0x1060
movq 0x20(%rsp), %rdi
addq $0x430, %rdi            # imm = 0x430
movq 0x20(%rsp), %rsi
addq $0x430, %rsi            # imm = 0x430
movq 0x20(%rsp), %rdx
addq $0x2dc, %rdx            # imm = 0x2DC
callq 0x1060
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
movq 0x20(%rsp), %rdx
addq $0x430, %rdx            # imm = 0x430
callq 0x1100
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x430(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x438(%rax)
movq 0x20(%rsp), %rax
movq 0x450(%rax), %rcx
addq $0x80, %rcx
movq %rcx, 0x450(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/wtakuo[P]SVM/test1.c
// Function: vmtest
void vmtest (int n, vm_mode_t mode) {
    int codelen = sizeof(code)/sizeof(Bcode);
    Function f = new_function(1, 1, code + 10, codelen - 10);
    gv[0] = (Value)n;
    gv[1] = (Value)f;

    vm(code, codelen, vs_base, VS_SIZE, gv, GV_SIZE, mode);

    delete_function(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x27, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0xa, %eax
movslq %eax, %rcx
movl $0x1, %esi
leaq 0x2dc6(%rip), %rdx      # 0x5070
addq $0xa, %rdx
movq %rsi, %rdi
callq 0x1c20
movq %rax, -0x18(%rbp)
movslq -0x4(%rbp), %rax
movq %rax, 0x2deb(%rip)      # 0x50b0
movq -0x18(%rbp), %rax
movq %rax, 0x2de8(%rip)      # 0x50b8
movslq -0xc(%rbp), %rsi
movq 0x2dbd(%rip), %rdx      # 0x5098
movl -0x8(%rbp), %eax
leaq 0x2d8b(%rip), %rdi      # 0x5070
movl $0x100, %ecx            # imm = 0x100
leaq 0x2dbf(%rip), %r8       # 0x50b0
movl $0x8, %r9d
movl %eax, (%rsp)
callq 0x11b0
movq -0x18(%rbp), %rdi
callq 0x1ca0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/util.c
// Function: detseq32
uint32_t detseq32()
{
    uint32_t t;

    t = detseq_a + detseq_b;
    detseq_a = detseq_b;
    detseq_b = t;

    return t;
}

// Assembly:
movl 0x436e(%rip), %eax      # 0x6114
addl 0x435c(%rip), %eax      # 0x6108
movl %eax, -0x4(%rsp)
movl 0x4352(%rip), %eax      # 0x6108
movl %eax, 0x4358(%rip)      # 0x6114
movl -0x4(%rsp), %eax
movl %eax, 0x4342(%rip)      # 0x6108
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/util.c
// Function: hex_dump
void hex_dump(void *p, int len)
{
    int i, j;
    uint8_t t;

    for (i = 0; i < len; i += 16) {
        printf("[%08X] ", i);
        for (j = 0; j < 16; j++) {
            if (j == 8)
                putchar(' ');
            if (i + j < len)
                printf(" %02X", ((uint8_t *) p)[i + j]);
            else
                printf("   ");
        }
        printf("  |");

        for (j = 0; j < 16; j++) {
            if (i + j >= len)
                break;
            t = ((uint8_t *) p)[i + j];
            if (t >= 0x20 && t < 0x7F)
                putchar(t);
            else
                putchar('.');
        }
        printf("|\n");
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x1f5f
movl 0x8(%rsp), %esi
leaq 0x250a(%rip), %rdi      # 0x4358
movb $0x0, %al
callq 0x10a0
movl $0x0, 0x4(%rsp)
cmpl $0x10, 0x4(%rsp)
jge 0x1ec4
cmpl $0x8, 0x4(%rsp)
jne 0x1e75
movl $0x20, %edi
callq 0x1050
movl 0x8(%rsp), %eax
addl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x1ea7
movq 0x10(%rsp), %rax
movl 0x8(%rsp), %ecx
addl 0x4(%rsp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
leaq 0x24c2(%rip), %rdi      # 0x4360
movb $0x0, %al
callq 0x10a0
jmp 0x1eb5
leaq 0x24b8(%rip), %rdi      # 0x4366
movb $0x0, %al
callq 0x10a0
jmp 0x1eb7
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1e5d
leaq 0x249f(%rip), %rdi      # 0x436a
movb $0x0, %al
callq 0x10a0
movl $0x0, 0x4(%rsp)
cmpl $0x10, 0x4(%rsp)
jge 0x1f41
movl 0x8(%rsp), %eax
addl 0x4(%rsp), %eax
cmpl 0xc(%rsp), %eax
jl 0x1ef1
jmp 0x1f41
movq 0x10(%rsp), %rax
movl 0x8(%rsp), %ecx
addl 0x4(%rsp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, 0x3(%rsp)
movzbl 0x3(%rsp), %eax
cmpl $0x20, %eax
jl 0x1f28
movzbl 0x3(%rsp), %eax
cmpl $0x7f, %eax
jge 0x1f28
movzbl 0x3(%rsp), %edi
callq 0x1050
jmp 0x1f32
movl $0x2e, %edi
callq 0x1050
jmp 0x1f34
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1eda
leaq 0x2426(%rip), %rdi      # 0x436e
movb $0x0, %al
callq 0x10a0
movl 0x8(%rsp), %eax
addl $0x10, %eax
movl %eax, 0x8(%rsp)
jmp 0x1e35
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/util.c
// Function: test_harness
int test_harness(int (*test_func)(caesar_t *, int), caesar_t *aead, int val)
{
    pid_t p;
    int stat;

    p = fork();
    if (p == 0) {
        exit(test_func(aead, val));
    }
    waitpid(p, &stat, 0);
    fflush(stdout);

    // normal exit ?
    if (WIFEXITED(stat))
        return WEXITSTATUS(stat);

    // something weird happened
    if (WIFSIGNALED(stat))
        printf("\n[SIGNAL %d]\n", WTERMSIG(stat));
    else
        printf("\n[TERMINATED]\n");

    return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
callq 0x11e0
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x1fa9
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq *%rax
movl %eax, %edi
callq 0x11c0
movl 0x8(%rsp), %edi
leaq 0x4(%rsp), %rsi
xorl %edx, %edx
callq 0x1160
movq 0x4010(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
callq 0x1150
movl 0x4(%rsp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x1fe6
movl 0x4(%rsp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movl %eax, 0x24(%rsp)
jmp 0x2027
movl 0x4(%rsp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x2011
movl 0x4(%rsp), %esi
andl $0x7f, %esi
leaq 0x2369(%rip), %rdi      # 0x4371
movb $0x0, %al
callq 0x10a0
jmp 0x201f
leaq 0x2367(%rip), %rdi      # 0x437f
movb $0x0, %al
callq 0x10a0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/util.c
// Function: plg2chi2
double plg2chi2(double chi2)
{
    //  This table should be good enough for two significant digits.
    //      p(x)=x^(-1/2)*exp(-x/2)/gamma(0.5)*2^(1/2)
    //      bits(x)=log(1-intnum(x=1E-50,x,p(x))/2)/log(2)
    //      for(i=1,128,print1(bits(i). ", "))

    const float lg2p[128] = {
        0.00000, 1.65603, 2.66841, 3.58615, 4.45798, 5.30202, 6.12724, 6.93881,
        7.73997, 8.53293, 9.31925, 10.1000, 10.8762, 11.6485, 12.4173, 13.1832,
        13.9464, 14.7073, 15.4662, 16.2231, 16.9784, 17.7321, 18.4845, 19.2355,
        19.9854, 20.7341, 21.4819, 22.2287, 22.9747, 23.7198, 24.4642, 25.2078,
        25.9508, 26.6932, 27.4349, 28.1761, 28.9168, 29.6569, 30.3966, 31.1358,
        31.8746, 32.6130, 33.3510, 34.0886, 34.8258, 35.5627, 36.2993, 37.0355,
        37.7715, 38.5072, 39.2425, 39.9777, 40.7125, 41.4471, 42.1815, 42.9156,
        43.6495, 44.3832, 45.1167, 45.8500, 46.5831, 47.3160, 48.0487, 48.7813,
        49.5137, 50.2459, 50.9779, 51.7098, 52.4415, 53.1731, 53.9046, 54.6359,
        55.3671, 56.0981, 56.8290, 57.5598, 58.2905, 59.0210, 59.7514, 60.4818,
        61.2120, 61.9421, 62.6721, 63.4019, 64.1317, 64.8614, 65.5910, 66.3205,
        67.0499, 67.7792, 68.5085, 69.2376, 69.9666, 70.6955, 71.4243, 72.1528,
        72.8812, 73.6092, 74.3367, 75.0635, 75.7889, 76.5124, 77.2326, 77.9475,
        78.6538, 79.3464, 80.0176, 80.6560, 81.2467, 81.7727, 82.2181, 82.5735,
        82.8400, 83.0286, 83.1557, 83.2382, 83.2904, 83.3229, 83.3429, 83.3551,
        83.3625, 83.3670, 83.3697, 83.3714, 83.3724, 83.3730, 83.3733, 83.3736
    };

    if (chi2 < 0.0)
        return 0.0;
    if (chi2 >= 128.0)
        return -80.0;

    return -lg2p[(int) floor(chi2)];
}

// Assembly:
subq $0x218, %rsp            # imm = 0x218
vmovsd %xmm0, 0x208(%rsp)
movq %rsp, %rdi
leaq 0x2346(%rip), %rsi      # 0x4390
movl $0x200, %edx            # imm = 0x200
callq 0x1120
vpxor %xmm0, %xmm0, %xmm0
vucomisd 0x208(%rsp), %xmm0
jbe 0x2072
vpxor %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x210(%rsp)
jmp 0x20d0
vmovsd 0x208(%rsp), %xmm0
vmovsd 0x22c5(%rip), %xmm1     # 0x4348
vucomisd %xmm1, %xmm0
jb 0x209c
vmovsd 0x22bf(%rip), %xmm0     # 0x4350
vmovsd %xmm0, 0x210(%rsp)
jmp 0x20d0
vmovsd 0x208(%rsp), %xmm1
vroundsd $0x9, %xmm1, %xmm0, %xmm0
vcvttsd2si %xmm0, %eax
cltq
vmovss (%rsp,%rax,4), %xmm0
vmovd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
vmovd %eax, %xmm1
vcvtss2sd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, 0x210(%rsp)
vmovsd 0x210(%rsp), %xmm0
addq $0x218, %rsp            # imm = 0x218
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/speed.c
// Function: test_speed
int test_speed(caesar_t *aead, int limit)
{
    uint64_t len;

    if (brutus_verbose) {
        printf("[%s] Speed Test (limit=%d sec)  "
            "key=%d  nsec=%d  npub=%d  a=%d\n",
            aead->name, limit, aead->keybytes, aead->nsecbytes,
            aead->npubbytes, aead->abytes);
    }

    for (len = 0x10; len <= 0x10000; len <<= 2) {
        run_speed(aead, len, 0, limit);
        run_speed(aead, 0, len, limit);
        run_speed(aead, len, len, limit);
    }

    return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
leaq 0x3abc(%rip), %rax      # 0x6110
cmpl $0x0, (%rax)
je 0x2699
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x20(%rsp), %rax
movl 0x14(%rax), %r8d
movq 0x20(%rsp), %rax
movl 0x18(%rax), %r9d
movq 0x20(%rsp), %rax
movl 0x1c(%rax), %eax
leaq 0x1fc8(%rip), %rdi      # 0x4657
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10a0
movq $0x10, 0x10(%rsp)
cmpq $0x10000, 0x10(%rsp)    # imm = 0x10000
ja 0x2706
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movslq 0x1c(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x20f0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rdx
movslq 0x1c(%rsp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x20f0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x10(%rsp), %rdx
movslq 0x1c(%rsp), %rcx
callq 0x20f0
movq 0x10(%rsp), %rax
shlq $0x2, %rax
movq %rax, 0x10(%rsp)
jmp 0x26a2
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/speed.c
// Function: test_throughput
int test_throughput(caesar_t *aead, int limit)
{
    if (brutus_verbose) {
        printf("[%s] Throughput (limit=%d sec)  "
            "key=%d  nsec=%d  npub=%d a=%d\n",
            aead->name, limit, aead->keybytes, aead->nsecbytes,
            aead->npubbytes, aead->abytes);
    }

    run_speed(aead, 0x10000, 0, limit);

    return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
leaq 0x39ec(%rip), %rax      # 0x6110
cmpl $0x0, (%rax)
je 0x2769
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x10(%rsp), %rax
movl 0x14(%rax), %r8d
movq 0x10(%rsp), %rax
movl 0x18(%rax), %r9d
movq 0x10(%rsp), %rax
movl 0x1c(%rax), %eax
leaq 0x1f38(%rip), %rdi      # 0x4697
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10a0
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rcx
movl $0x10000, %esi          # imm = 0x10000
xorl %eax, %eax
movl %eax, %edx
callq 0x20f0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/kat.c
// Function: kat_vec
void kat_vec(void *p, int len, char *label)
{
    int i;
    printf("%4s[%5d]=", label, len);
    for (i = 0; i < len; i++)
        printf("%02X", ((uint8_t *) p)[i]);
    printf("\n");
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movl 0x1c(%rsp), %edx
leaq 0x17d8(%rip), %rdi      # 0x489a
movb $0x0, %al
callq 0x10a0
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x3104
movq 0x20(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %esi
leaq 0x1271(%rip), %rdi      # 0x4361
movb $0x0, %al
callq 0x10a0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x30d1
leaq 0x10f7(%rip), %rdi      # 0x4202
movb $0x0, %al
callq 0x10a0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/src/kat.c
// Function: test_kat
int test_kat(caesar_t *aead, int limit)
{
    int len, t;

    if (brutus_verbose) {
        printf("[%s] KAT (limit=%d bytes)  "
            "key=%d  nsec=%d  npub=%d  a=%d\n",
            aead->name, limit, aead->keybytes, aead->nsecbytes,
            aead->npubbytes, aead->abytes);
    }
    if (limit > KAT_LIMIT) {
        fprintf(stderr, "Limit too high. Increse KAT_LIMIT macro (%d).\n",
            KAT_LIMIT);
        return -1;
    }

    detseq_seed(-1);
    do_kat(aead, 0, 0);

    for (len = 1; len <= limit; len++) {
        detseq_seed(len);
        do_kat(aead, len, 0);
        do_kat(aead, 0, len);
        if (len > 1) {
            t = detseq32() % (len - 1) + 1;
            do_kat(aead, t, len - t);
        }
    }

    return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
leaq 0x2cec(%rip), %rax      # 0x6110
cmpl $0x0, (%rax)
je 0x3469
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x14(%rsp), %edx
movq 0x18(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x18(%rsp), %rax
movl 0x14(%rax), %r8d
movq 0x18(%rsp), %rax
movl 0x18(%rax), %r9d
movq 0x18(%rsp), %rax
movl 0x1c(%rax), %eax
leaq 0x148a(%rip), %rdi      # 0x48e9
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10a0
cmpl $0x10000, 0x14(%rsp)    # imm = 0x10000
jle 0x349d
movq 0x2b76(%rip), %rax      # 0x5ff0
movq (%rax), %rdi
leaq 0x14a0(%rip), %rsi      # 0x4924
movl $0x10000, %edx          # imm = 0x10000
movb $0x0, %al
callq 0x1100
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x353d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1d80
movq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x3120
movl $0x1, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jg 0x3535
movl 0x10(%rsp), %edi
callq 0x1d80
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
callq 0x3120
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %edx
xorl %esi, %esi
callq 0x3120
cmpl $0x1, 0x10(%rsp)
jle 0x3526
movb $0x0, %al
callq 0x1da0
movl 0x10(%rsp), %ecx
subl $0x1, %ecx
xorl %edx, %edx
divl %ecx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x10(%rsp), %edx
subl 0xc(%rsp), %edx
callq 0x3120
jmp 0x3528
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x34bd
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/12-VirtualMemory/grow_heap.c
// Function: main
int main(void) {
	int i;
	char *ptr[COUNT];

	printf("PID = %d\n", getpid());

	for(i = 0; i < COUNT; i++)
		ptr[i] = malloc(ONE_MEG);

	printf("malloc finished\n");

	for(i = 0; i < COUNT; i++) {
//		while(getchar() != '\n');
		memset(ptr[i], 0, ONE_MEG);
	}

	printf("return 0");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x6010, %rsp           # imm = 0x6010
movl $0x0, -0x4(%rbp)
callq 0x1030
movl %eax, %esi
leaq 0xe74(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
movl $0x0, -0x8(%rbp)
cmpl $0xc00, -0x8(%rbp)      # imm = 0xC00
jge 0x11cb
movl $0x100000, %edi         # imm = 0x100000
callq 0x1060
movq %rax, %rcx
movslq -0x8(%rbp), %rax
movq %rcx, -0x6010(%rbp,%rax,8)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x119e
leaq 0xe3c(%rip), %rdi       # 0x200e
movb $0x0, %al
callq 0x1040
movl $0x0, -0x8(%rbp)
cmpl $0xc00, -0x8(%rbp)      # imm = 0xC00
jge 0x120c
movslq -0x8(%rbp), %rax
movq -0x6010(%rbp,%rax,8), %rdi
xorl %esi, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0x1050
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x11e0
leaq 0xe0c(%rip), %rdi       # 0x201f
movb $0x0, %al
callq 0x1040
xorl %eax, %eax
addq $0x6010, %rsp           # imm = 0x6010
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/./simdprune.h
// Function: skinnyprune_epi8
static inline __m128i skinnyprune_epi8( __m128i x, int mask) {
      int mask1 = mask & 0xFF;
      int mask2 = (mask >> 8) & 0xFF;
      __m128i shufmask = _mm_castps_si128(_mm_loadh_pi(
        _mm_castsi128_ps(
          _mm_loadl_epi64((const __m128i *)(thintable_epi8 + mask1))
        ),
        (const __m64 *)(thintable_epi8 + mask2)
      ));
      shufmask = _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0));
      __m128i pruned = _mm_shuffle_epi8(x, shufmask);
      intptr_t popx2 = BitsSetTable256mul2[mask1];
      __m128i compactmask = _mm_loadu_si128((const __m128i*)(pshufb_combine_table + popx2*8));
      return _mm_shuffle_epi8(pruned, compactmask);
}

// Assembly:
subq $0xe8, %rsp
vmovdqa %xmm0, -0x30(%rsp)
movl %edi, -0x34(%rsp)
movzbl -0x34(%rsp), %eax
movl %eax, -0x38(%rsp)
movzbl -0x33(%rsp), %eax
movl %eax, -0x3c(%rsp)
movslq -0x38(%rsp), %rcx
leaq 0x102b81(%rip), %rax    # 0x104200
leaq (%rax,%rcx,8), %rcx
movq %rcx, 0x48(%rsp)
movq 0x48(%rsp), %rcx
vmovq (%rcx), %xmm0
vmovdqa %xmm0, 0x30(%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa %xmm0, 0xb0(%rsp)
vmovdqa 0xb0(%rsp), %xmm0
movslq -0x3c(%rsp), %rcx
leaq (%rax,%rcx,8), %rax
vmovdqa %xmm0, 0xa0(%rsp)
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
vmovsd (%rax), %xmm0
vmovsd %xmm0, 0x90(%rsp)
vmovddup 0x90(%rsp), %xmm0       # xmm0 = mem[0,0]
vmovapd %xmm0, 0x80(%rsp)
vmovapd 0xa0(%rsp), %xmm0
vmovapd 0x80(%rsp), %xmm1
vunpcklpd %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vmovapd %xmm0, 0x70(%rsp)
vmovaps 0x70(%rsp), %xmm0
vmovaps %xmm0, -0x50(%rsp)
vmovdqa -0x50(%rsp), %xmm1
movl $0x8080808, 0xe4(%rsp) # imm = 0x8080808
movl $0x8080808, 0xe0(%rsp) # imm = 0x8080808
movl $0x0, 0xdc(%rsp)
movl $0x0, 0xd8(%rsp)
movl 0xdc(%rsp), %edx
movl 0xe0(%rsp), %ecx
movl 0xe4(%rsp), %eax
vmovd 0xd8(%rsp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, 0xc0(%rsp)
vmovdqa 0xc0(%rsp), %xmm0
vmovdqa %xmm1, 0x60(%rsp)
vmovdqa %xmm0, 0x50(%rsp)
vmovdqa 0x60(%rsp), %xmm0
vmovdqa 0x50(%rsp), %xmm1
vpaddb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x50(%rsp)
vmovdqa -0x30(%rsp), %xmm1
vmovdqa -0x50(%rsp), %xmm0
vmovdqa %xmm1, 0x10(%rsp)
vmovdqa %xmm0, (%rsp)
vmovdqa 0x10(%rsp), %xmm0
vmovdqa (%rsp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x60(%rsp)
movslq -0x38(%rsp), %rcx
leaq 0x103219(%rip), %rax    # 0x104a00
movzbl (%rax,%rcx), %eax
movq %rax, -0x68(%rsp)
movq -0x68(%rsp), %rcx
shlq $0x3, %rcx
leaq 0x103300(%rip), %rax    # 0x104b00
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
vmovdqu (%rax), %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x60(%rsp), %xmm1
vmovdqa -0x80(%rsp), %xmm0
vmovdqa %xmm1, -0x10(%rsp)
vmovdqa %xmm0, -0x20(%rsp)
vmovdqa -0x10(%rsp), %xmm0
vmovdqa -0x20(%rsp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
addq $0xe8, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/./simdprune.h
// Function: pext_prune256_epi32
static inline __m256i pext_prune256_epi32(__m256i src, unsigned int mask) {
  uint64_t expanded_mask =
      _pdep_u64(mask, 0x0101010101010101); // unpack each bit to a byte
  expanded_mask *= 0xFF;
  const uint64_t identity_indices = 0x0706050403020100;
  uint64_t wanted_indices = _pext_u64(identity_indices, expanded_mask);
  __m128i bytevec = _mm_cvtsi64_si128(wanted_indices);
  __m256i shufmask = _mm256_cvtepu8_epi32(bytevec);
  return _mm256_permutevar8x32_epi32(src,shufmask);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x120, %rsp            # imm = 0x120
vmovdqa %ymm0, 0x60(%rsp)
movl %edi, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movq %rax, 0xe8(%rsp)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
movq %rax, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq 0xe0(%rsp), %rcx
pdepq %rcx, %rax, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, %rax
shlq $0x8, %rax
subq %rcx, %rax
movq %rax, 0x50(%rsp)
movabsq $0x706050403020100, %rcx # imm = 0x706050403020100
movq %rcx, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rcx, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0xf8(%rsp), %rax
movq 0xf0(%rsp), %rcx
pextq %rcx, %rax, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x98(%rsp)
vmovq 0x98(%rsp), %xmm0
vmovdqa %xmm0, 0x80(%rsp)
vmovdqa 0x80(%rsp), %xmm0
vmovdqa %xmm0, 0x30(%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa %xmm0, 0x100(%rsp)
vpmovzxbd 0x100(%rsp), %ymm0
vmovdqa %ymm0, (%rsp)
vmovdqa 0x60(%rsp), %ymm1
vmovdqa (%rsp), %ymm0
vmovdqa %ymm1, 0xc0(%rsp)
vmovdqa %ymm0, 0xa0(%rsp)
vmovdqa 0xc0(%rsp), %ymm1
vmovdqa 0xa0(%rsp), %ymm0
vpermd %ymm1, %ymm0, %ymm0
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/benchmark.c
// Function: print_epi8
void print_epi8(__m128i x) {
  uint8_t buffer[16];
  _mm_storeu_si128((__m128i*)buffer,x);
  for(size_t i = 0; i < 16; i++) {
    printf("%u ", buffer[i]);
  }
  printf("\n");
}

// Assembly:
subq $0x48, %rsp
vmovdqa %xmm0, 0x20(%rsp)
leaq 0x10(%rsp), %rax
vmovdqa 0x20(%rsp), %xmm0
movq %rax, 0x40(%rsp)
vmovdqa %xmm0, 0x30(%rsp)
vmovdqa 0x30(%rsp), %xmm0
movq 0x40(%rsp), %rax
vmovdqu %xmm0, (%rax)
movq $0x0, 0x8(%rsp)
cmpq $0x10, 0x8(%rsp)
jae 0x1cb8
movq 0x8(%rsp), %rax
movzbl 0x10(%rsp,%rax), %esi
leaq 0x236f(%rip), %rdi      # 0x4010
movb $0x0, %al
callq 0x1040
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1c88
leaq 0x2538(%rip), %rdi      # 0x41f7
movb $0x0, %al
callq 0x1040
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/benchmark.c
// Function: check_prune_epi8
void check_prune_epi8(__m128i input, __m128i output, int mask) {
  uint8_t buffer[16];
  _mm_storeu_si128((__m128i*)buffer,input);
  size_t pos = 0;
  uint8_t outbuffer[16];
  _mm_storeu_si128((__m128i*)outbuffer,output);

  for(size_t i = 0; i < 16; i++) {
    if((mask & (1<<i)) == 0) {
      assert(buffer[i] == outbuffer[pos]);
      pos ++;
    }
  }
}

// Assembly:
subq $0xa8, %rsp
vmovdqa %xmm0, 0x60(%rsp)
vmovdqa %xmm1, 0x50(%rsp)
movl %edi, 0x4c(%rsp)
leaq 0x30(%rsp), %rax
vmovdqa 0x60(%rsp), %xmm0
movq %rax, 0xa0(%rsp)
vmovdqa %xmm0, 0x90(%rsp)
vmovdqa 0x90(%rsp), %xmm0
movq 0xa0(%rsp), %rax
vmovdqu %xmm0, (%rax)
movq $0x0, 0x28(%rsp)
leaq 0x10(%rsp), %rax
vmovdqa 0x50(%rsp), %xmm0
movq %rax, 0x88(%rsp)
vmovdqa %xmm0, 0x70(%rsp)
vmovdqa 0x70(%rsp), %xmm0
movq 0x88(%rsp), %rax
vmovdqu %xmm0, (%rax)
movq $0x0, 0x8(%rsp)
cmpq $0x10, 0x8(%rsp)
jae 0x1dcf
movl 0x4c(%rsp), %eax
movq 0x8(%rsp), %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x1dbd
movq 0x8(%rsp), %rax
movzbl 0x30(%rsp,%rax), %eax
movq 0x28(%rsp), %rcx
movzbl 0x10(%rsp,%rcx), %ecx
cmpl %ecx, %eax
jne 0x1d90
jmp 0x1daf
leaq 0x227d(%rip), %rdi      # 0x4014
leaq 0x2292(%rip), %rsi      # 0x4030
movl $0xe8, %edx
leaq 0x2292(%rip), %rcx      # 0x403c
callq 0x1050
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1dbf
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1d55
addq $0xa8, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/benchmark.c
// Function: testepi8
void testepi8() {
  for(int mask = 0; mask < (1<<16); mask++) {
    __m128i source = _mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
    __m128i m1 = prune_epi8(source, mask);
    check_prune_epi8(source, m1, mask);
    __m128i m2 = thinprune_epi8(source, mask);
    check_prune_epi8(source, m2, mask);
    __m128i m3 = skinnyprune_epi8(source, mask);
    check_prune_epi8(source, m3, mask);
  }
}

// Assembly:
subq $0x78, %rsp
movl $0x0, 0x4c(%rsp)
cmpl $0x10000, 0x4c(%rsp)    # imm = 0x10000
jge 0x1f96
movb $0x0, 0x77(%rsp)
movb $0x1, 0x76(%rsp)
movb $0x2, 0x75(%rsp)
movb $0x3, 0x74(%rsp)
movb $0x4, 0x73(%rsp)
movb $0x5, 0x72(%rsp)
movb $0x6, 0x71(%rsp)
movb $0x7, 0x70(%rsp)
movb $0x8, 0x6f(%rsp)
movb $0x9, 0x6e(%rsp)
movb $0xa, 0x6d(%rsp)
movb $0xb, 0x6c(%rsp)
movb $0xc, 0x6b(%rsp)
movb $0xd, 0x6a(%rsp)
movb $0xe, 0x69(%rsp)
movb $0xf, 0x68(%rsp)
movzbl 0x68(%rsp), %eax
vmovd %eax, %xmm0
movzbl 0x69(%rsp), %eax
vpinsrb $0x1, %eax, %xmm0, %xmm0
movzbl 0x6a(%rsp), %eax
vpinsrb $0x2, %eax, %xmm0, %xmm0
movzbl 0x6b(%rsp), %eax
vpinsrb $0x3, %eax, %xmm0, %xmm0
movzbl 0x6c(%rsp), %eax
vpinsrb $0x4, %eax, %xmm0, %xmm0
movzbl 0x6d(%rsp), %eax
vpinsrb $0x5, %eax, %xmm0, %xmm0
movzbl 0x6e(%rsp), %eax
vpinsrb $0x6, %eax, %xmm0, %xmm0
movzbl 0x6f(%rsp), %eax
vpinsrb $0x7, %eax, %xmm0, %xmm0
movzbl 0x70(%rsp), %eax
vpinsrb $0x8, %eax, %xmm0, %xmm0
movzbl 0x71(%rsp), %eax
vpinsrb $0x9, %eax, %xmm0, %xmm0
movzbl 0x72(%rsp), %eax
vpinsrb $0xa, %eax, %xmm0, %xmm0
movzbl 0x73(%rsp), %eax
vpinsrb $0xb, %eax, %xmm0, %xmm0
movzbl 0x74(%rsp), %eax
vpinsrb $0xc, %eax, %xmm0, %xmm0
movzbl 0x75(%rsp), %eax
vpinsrb $0xd, %eax, %xmm0, %xmm0
movzbl 0x76(%rsp), %eax
vpinsrb $0xe, %eax, %xmm0, %xmm0
movzbl 0x77(%rsp), %eax
vpinsrb $0xf, %eax, %xmm0, %xmm0
vmovdqa %xmm0, 0x50(%rsp)
vmovdqa 0x50(%rsp), %xmm0
vmovdqa %xmm0, 0x30(%rsp)
vmovdqa 0x30(%rsp), %xmm0
movl 0x4c(%rsp), %edi
callq 0x1250
vmovdqa %xmm0, 0x20(%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa 0x20(%rsp), %xmm1
movl 0x4c(%rsp), %edi
callq 0x1cd0
vmovdqa 0x30(%rsp), %xmm0
movl 0x4c(%rsp), %edi
callq 0x1310
vmovdqa %xmm0, 0x10(%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa 0x10(%rsp), %xmm1
movl 0x4c(%rsp), %edi
callq 0x1cd0
vmovdqa 0x30(%rsp), %xmm0
movl 0x4c(%rsp), %edi
callq 0x1650
vmovdqa %xmm0, (%rsp)
vmovdqa 0x30(%rsp), %xmm0
vmovdqa (%rsp), %xmm1
movl 0x4c(%rsp), %edi
callq 0x1cd0
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x1dec
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lemire[P]simdprune/./simdprune.h
// Function: left_shift_bytes
static inline __m128i left_shift_bytes(__m128i x, int count) {
  // we'd like to shift by count bytes, but it can't be done directly without immediates
  __m128i p1 = _mm_sll_epi64(x, _mm_cvtsi64_si128(count * 8));
  __m128i p2 = _mm_srl_epi64(_mm_unpacklo_epi64(_mm_setzero_si128(),x), _mm_cvtsi64_si128(64 - count * 8));
  return _mm_or_si128(p1, p2);
}

// Assembly:
subq $0x98, %rsp
vmovdqa %xmm0, -0x50(%rsp)
movl %edi, -0x54(%rsp)
vmovdqa -0x50(%rsp), %xmm1
movl -0x54(%rsp), %eax
shll $0x3, %eax
cltq
movq %rax, 0x38(%rsp)
vmovq 0x38(%rsp), %xmm0
vmovdqa %xmm0, 0x20(%rsp)
vmovdqa 0x20(%rsp), %xmm0
vmovdqa %xmm1, -0x10(%rsp)
vmovdqa %xmm0, -0x20(%rsp)
vmovdqa -0x10(%rsp), %xmm0
vmovdqa -0x20(%rsp), %xmm1
vpsllq %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x70(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, 0x80(%rsp)
vmovdqa 0x80(%rsp), %xmm1
vmovdqa -0x50(%rsp), %xmm0
vmovdqa %xmm1, 0x70(%rsp)
vmovdqa %xmm0, 0x60(%rsp)
vmovdqa 0x70(%rsp), %xmm0
vmovdqa 0x60(%rsp), %xmm1
vpunpcklqdq %xmm1, %xmm0, %xmm1 # xmm1 = xmm0[0],xmm1[0]
movl -0x54(%rsp), %ecx
shll $0x3, %ecx
movl $0x40, %eax
subl %ecx, %eax
cltq
movq %rax, 0x18(%rsp)
vmovq 0x18(%rsp), %xmm0
vmovdqa %xmm0, (%rsp)
vmovdqa (%rsp), %xmm0
vmovdqa %xmm1, 0x50(%rsp)
vmovdqa %xmm0, 0x40(%rsp)
vmovdqa 0x50(%rsp), %xmm0
vmovdqa 0x40(%rsp), %xmm1
vpsrlq %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rsp)
vmovdqa -0x70(%rsp), %xmm1
vmovdqa -0x80(%rsp), %xmm0
vmovdqa %xmm1, -0x30(%rsp)
vmovdqa %xmm0, -0x40(%rsp)
vmovdqa -0x30(%rsp), %xmm0
vpor -0x40(%rsp), %xmm0, %xmm0
addq $0x98, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: readfile
int readfile(char* path, char* buf, int maxlen) {
	FILE *infile = fopen(path,"rb");
	if (!infile) {
		printf("Can't open file '%s'\n",path);
		return -1;		// failed to open file
	}
	fseek(infile, 0, SEEK_END);
	int iflen = ftell(infile);
	rewind(infile);
	if (iflen <= maxlen) {
		fread(buf, iflen, 1, infile);
	} else {
		printf("File '%s' is too long (max is 0x%X bytes)\n", path, maxlen);
		iflen = -2;
	}
	fclose(infile);
	return iflen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9d7d6(%rip), %rsi     # 0x49f004
callq 0x415510
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x401859
movq -0x10(%rbp), %rsi
leaq 0x9d7be(%rip), %rdi     # 0x49f007
movb $0x0, %al
callq 0x40eab0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4018cb
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4195c0
movq -0x28(%rbp), %rdi
callq 0x415710
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4197c0
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x4018a0
movq -0x18(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x415610
jmp 0x4018bc
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq 0x9d76f(%rip), %rdi     # 0x49f01d
movb $0x0, %al
callq 0x40eab0
movl $0xfffffffe, -0x2c(%rbp) # imm = 0xFFFFFFFE
movq -0x28(%rbp), %rdi
callq 0x4150d0
movl -0x2c(%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/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: savefile
int savefile(char* path, char* buf, int len) {
	FILE *file = fopen(path, "wb");
	if (!file) {
		printf("Can't open file '%s' for writing\n",path);
		return 0;
	}
	if (buf && (len > 0)) fwrite(buf, len, 1, file);
	fclose(file);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9d74a(%rip), %rsi     # 0x49f048
callq 0x415510
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x401929
movq -0x10(%rbp), %rsi
leaq 0x9d732(%rip), %rdi     # 0x49f04b
movb $0x0, %al
callq 0x40eab0
movl $0x0, -0x4(%rbp)
jmp 0x40195c
cmpq $0x0, -0x18(%rbp)
je 0x40194c
cmpl $0x0, -0x1c(%rbp)
jle 0x40194c
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
movq -0x28(%rbp), %rcx
movl $0x1, %edx
callq 0x415860
movq -0x28(%rbp), %rdi
callq 0x4150d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: testExt
int testExt(char* path, char* ext) {
	char* ptr = strrchr(path, '.');
	if (!ptr) return 0;
	char buf[255];
	strcpy(buf, ptr + 1);
	ptr = buf;
	while (*ptr) {
		*ptr = tolower(*ptr);
		ptr++;
	}
	if (strcmp(ext, buf)) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
callq 0x401050
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4019a5
movl $0x0, -0x4(%rbp)
jmp 0x401a14
leaq -0x120(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x401020
leaq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4019ef
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0x407280
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4019c4
movq -0x18(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x4010b0
cmpl $0x0, %eax
je 0x401a0d
movl $0x0, -0x4(%rbp)
jmp 0x401a14
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: getFileType
int getFileType(char* path) {
	FILE* file = fopen(path, "rb");
	char buf[9];
	int res = TYPE_UNKNOWN;
	if (testExt(path, "tap")) {
		res = TYPE_TAP;
	} else if (testExt(path, "scl") && file) {
		fread(buf, 9, 1, file);
		if ((strncmp(buf, "SINCLAIR", 8) == 0) && ((unsigned)buf[8] < 129))
			res = TYPE_SCL;
	} else if (testExt(path, "trd") && file) {
		fseek(file, 0, SEEK_END);
		size_t size = ftell(file);
		fseek(file, 0x8e7, SEEK_SET);
		int type = fgetc(file);
		if ((size > 0x8ff) && (size < 0xa0001) && (type == 0x10))
			res = TYPE_TRD;
	}
	if (file) fclose(file);
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x9d5cd(%rip), %rsi     # 0x49f004
callq 0x415510
movq %rax, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x9d61b(%rip), %rsi     # 0x49f06d
callq 0x401970
cmpl $0x0, %eax
je 0x401a68
movl $0x3, -0x20(%rbp)
jmp 0x401b47
movq -0x8(%rbp), %rdi
leaq 0x9d5fe(%rip), %rsi     # 0x49f071
callq 0x401970
cmpl $0x0, %eax
je 0x401ac9
cmpq $0x0, -0x10(%rbp)
je 0x401ac9
leaq -0x19(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x9, %esi
movl $0x1, %edx
callq 0x415610
leaq -0x19(%rbp), %rdi
leaq 0x9d5cf(%rip), %rsi     # 0x49f075
movl $0x8, %edx
callq 0x401080
cmpl $0x0, %eax
jne 0x401ac7
movsbl -0x11(%rbp), %eax
cmpl $0x81, %eax
jae 0x401ac7
movl $0x1, -0x20(%rbp)
jmp 0x401b45
movq -0x8(%rbp), %rdi
leaq 0x9d5aa(%rip), %rsi     # 0x49f07e
callq 0x401970
cmpl $0x0, %eax
je 0x401b43
cmpq $0x0, -0x10(%rbp)
je 0x401b43
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4195c0
movq -0x10(%rbp), %rdi
callq 0x415710
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8e7, %esi            # imm = 0x8E7
xorl %edx, %edx
callq 0x4195c0
movq -0x10(%rbp), %rdi
callq 0x4196a0
movl %eax, -0x2c(%rbp)
cmpq $0x8ff, -0x28(%rbp)     # imm = 0x8FF
jbe 0x401b41
cmpq $0xa0001, -0x28(%rbp)   # imm = 0xA0001
jae 0x401b41
cmpl $0x10, -0x2c(%rbp)
jne 0x401b41
movl $0x2, -0x20(%rbp)
jmp 0x401b43
jmp 0x401b45
jmp 0x401b47
cmpq $0x0, -0x10(%rbp)
je 0x401b57
movq -0x10(%rbp), %rdi
callq 0x4150d0
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: cutName
xName cutName(char* path) {
	char fnam[strlen(path) + 1];
	char* ptr = strrchr(path, SLASH);		// last slash
	if (ptr) {
		strcpy(fnam, ptr + 1);
	} else {
		strcpy(fnam, path);
	}
	ptr = strrchr(fnam, '.');
	xName nm;
	memset(nm.name, 0x20, 10);
	memset(nm.ext, 0x20, 3);
	if (ptr) {
		*ptr = 0x00;
		memcpy(nm.ext, ptr + 1, (strlen(ptr + 1) > 3) ? 3 : strlen(ptr + 1));
	}
	memcpy(nm.name, fnam, (strlen(fnam) > 10) ? 10 : strlen(fnam));
	return nm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4010d8
movq %rax, %rdx
movq %rdx, %rax
incq %rax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
addq $0x10, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x48(%rbp)
movq %rcx, %rsp
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2f, %esi
callq 0x401050
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x401bca
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x1, %rsi
callq 0x401020
jmp 0x401bd7
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x401020
movq -0x48(%rbp), %rdi
movl $0x2e, %esi
callq 0x401050
movq %rax, -0x30(%rbp)
leaq -0xd(%rbp), %rdi
movl $0x20, %esi
movl $0xa, %edx
callq 0x4010a0
leaq -0xd(%rbp), %rdi
addq $0xa, %rdi
movl $0x20, %esi
movl $0x3, %edx
callq 0x4010a0
cmpq $0x0, -0x30(%rbp)
je 0x401c79
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
leaq -0xd(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x4010d8
cmpq $0x3, %rax
jbe 0x401c57
movl $0x3, %eax
movq %rax, -0x60(%rbp)
jmp 0x401c68
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x4010d8
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rdx
callq 0x401040
movq -0x48(%rbp), %rdi
leaq -0xd(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0x4010d8
cmpq $0xa, %rax
jbe 0x401c9b
movl $0xa, %eax
movq %rax, -0x70(%rbp)
jmp 0x401ca8
movq -0x48(%rbp), %rdi
callq 0x4010d8
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rsi
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rdx
callq 0x401040
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq -0xd(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, -0x3b(%rbp)
movq %rax, -0x40(%rbp)
movl -0x38(%rbp), %eax
movl %eax, %edx
movl -0x34(%rbp), %eax
shlq $0x20, %rax
orq %rax, %rdx
movq -0x40(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: stdAccumulate
int stdAccumulate(unsigned char* ptr, int size, int res) {
	while (size > 0) {
		res += *ptr;
		ptr++;
		size--;
	}
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x401d28
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x401cfe
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: fgeti
int fgeti(FILE* file) {
	int res = fgetc(file) & 0xff;
	res |= (fgetc(file) << 8);
	res |= (fgetc(file) << 16);
	res |= (fgetc(file) << 24);
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4196a0
andl $0xff, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4196a0
shll $0x8, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4196a0
shll $0x10, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4196a0
shll $0x18, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: fputi
void fputi(FILE* file, int val) {
	fputc(val & 0xff, file);
	fputc((val >> 8) & 0xff, file);
	fputc((val >> 16) & 0xff, file);
	fputc((val >> 24) & 0xff, file);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edi
andl $0xff, %edi
movq -0x8(%rbp), %rsi
callq 0x419480
movl -0xc(%rbp), %edi
sarl $0x8, %edi
andl $0xff, %edi
movq -0x8(%rbp), %rsi
callq 0x419480
movl -0xc(%rbp), %edi
sarl $0x10, %edi
andl $0xff, %edi
movq -0x8(%rbp), %rsi
callq 0x419480
movl -0xc(%rbp), %edi
sarl $0x18, %edi
andl $0xff, %edi
movq -0x8(%rbp), %rsi
callq 0x419480
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: makeName
void makeName(char* name, char* buf) {
	if (name == NULL) return;
	memset(buf, 0x20, 9);
	char* ptr = strrchr(name, '.');
	if (ptr) {
		memcpy(buf, name, ((ptr - name) > 8) ? 8 : (ptr - name));
		ptr++;
		if (*ptr) buf[8] = *ptr;
	} else {
		memcpy(buf, name, (strlen(name) > 8) ? 8 : strlen(name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x401e1c
jmp 0x401f00
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x9, %edx
callq 0x4010a0
movq -0x8(%rbp), %rdi
movl $0x2e, %esi
callq 0x401050
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x401eb8
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jle 0x401e74
movl $0x8, %eax
movq %rax, -0x30(%rbp)
jmp 0x401e83
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
callq 0x401040
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x401eb6
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
jmp 0x401f00
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4010d8
cmpq $0x8, %rax
jbe 0x401ee2
movl $0x8, %eax
movq %rax, -0x48(%rbp)
jmp 0x401eef
movq -0x8(%rbp), %rdi
callq 0x4010d8
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
callq 0x401040
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: getSum
int getSum(char* data, int len) {
	unsigned int crc = 0;
	while (len--) {
		crc += (unsigned char)*data;
		data++;
	}
	return crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x401f4d
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x401f22
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: makeDSC
trdFile makeDSC(char* path, int len) {
	trdFile hd;
	xName nm = cutName(path);
	memcpy(hd.name, nm.name, 8);
	hd.lnl = len & 0xff;
	hd.lnh = (len >> 8) & 0xff;
	if (opt.isBasic) {
		hd.ext = 'B';
		hd.stl = hd.lnl;
		hd.sth = hd.lnh;
		len += 4;		// 80,AA,<AS.line>
	} else {
		hd.ext = nm.ext[0];
		hd.stl = nm.ext[1];
		hd.sth = nm.ext[2];
	}
	hd.slen = ((len >> 8) & 0xff) + ((len & 0xff) ? 1 : 0);
	return hd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x401b60
movl %edx, %ecx
movl %ecx, -0x38(%rbp)
shrq $0x20, %rdx
movb %dl, %cl
movb %cl, -0x34(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x29(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x21(%rbp)
movb -0x34(%rbp), %al
movb %al, -0x1d(%rbp)
movq -0x29(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
movl -0x1c(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x4(%rbp)
movb 0xd03eb(%rip), %al      # 0x4d23b0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x401fea
movb $0x42, -0x8(%rbp)
movb -0x5(%rbp), %al
movb %al, -0x7(%rbp)
movb -0x4(%rbp), %al
movb %al, -0x6(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x401ffc
movb -0x1f(%rbp), %al
movb %al, -0x8(%rbp)
movb -0x1e(%rbp), %al
movb %al, -0x7(%rbp)
movb -0x1d(%rbp), %al
movb %al, -0x6(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, %eax
shrl $0x8, %eax
testb %cl, %cl
setne %cl
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, -0x3(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: prepareFile
trdFile prepareFile(char* path, char* buf) {
	memset(buf, 0x00, 0x10000);
	trdFile hd;
	int ilen;
	memset(hd.name, 0x00, sizeof(trdFile));
	if (opt.asHobeta) {
		ilen = readfile(path, buf, 0xff11);	// +17 bytes header
		if (ilen > 0) {
			if (!buf[13])
				buf[13] = buf[14];
			memcpy((char*)&hd, buf, 15);
			memcpy(buf, buf+17, ilen-17);
		}
	} else {
		ilen = readfile(path, buf, 0xff00);
		if (ilen > 0) {
			if (opt.isBasic) {
				buf[ilen] = 0x80;
				buf[ilen+1] = 0xaa;
				buf[ilen+2] = opt.aStart & 0xff;
				buf[ilen+3] = (opt.aStart >> 8) & 0xff;
			}
			hd = makeDSC(path, ilen);
		}
	}
	return hd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x4010a0
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4010a0
movb 0xd035a(%rip), %al      # 0x4d23b0
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4020d4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xff11, %edx           # imm = 0xFF11
callq 0x401810
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x4020cf
movq -0x20(%rbp), %rax
cmpb $0x0, 0xd(%rax)
jne 0x402096
movq -0x20(%rbp), %rax
movb 0xe(%rax), %cl
movq -0x20(%rbp), %rax
movb %cl, 0xd(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movl 0x8(%rax), %ecx
movl %ecx, -0x8(%rbp)
movw 0xc(%rax), %cx
movw %cx, -0x4(%rbp)
movb 0xe(%rax), %al
movb %al, -0x2(%rbp)
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x11, %rsi
movl -0x24(%rbp), %eax
subl $0x11, %eax
movslq %eax, %rdx
callq 0x401040
jmp 0x402183
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xff00, %edx           # imm = 0xFF00
callq 0x401810
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x402181
movb 0xd02b7(%rip), %al      # 0x4d23b0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x40215d
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $-0x80, (%rax,%rcx)
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $-0x56, (%rax,%rcx)
movl 0xd028e(%rip), %eax     # 0x4d23b4
andl $0xff, %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl 0xd0271(%rip), %eax     # 0x4d23b4
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x401f60
movq %rax, -0x34(%rbp)
movq %rdx, -0x2c(%rbp)
movq -0x34(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x2c(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x402183
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)