LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: crypto_unlock_aead
int crypto_unlock_aead(u8       *plain_text,
                       const u8  key[32],
                       const u8  nonce[24],
                       const u8  mac[16],
                       const u8 *ad         , size_t ad_size,
                       const u8 *cipher_text, size_t text_size)
{
    crypto_unlock_ctx ctx;
    crypto_unlock_init        (&ctx, key, nonce);
    crypto_unlock_auth_ad     (&ctx, ad, ad_size);
    crypto_unlock_auth_message(&ctx, cipher_text, text_size);
    crypto_chacha_ctx chacha_ctx = ctx.chacha; // avoid the wiping...
    if (crypto_unlock_final(&ctx, mac)) {      // ...that occurs here
        WIPE_CTX(&chacha_ctx);
        return -1; // reject forgeries before wasting our time decrypting
    }
    crypto_chacha20_encrypt(&chacha_ctx, plain_text, cipher_text, text_size);
    WIPE_CTX(&chacha_ctx);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r9, %r13
movq %r8, %rbp
movq %rcx, %r12
movq %rdi, 0x8(%rsp)
movq 0x1c8(%rsp), %r14
movq 0x1c0(%rsp), %r15
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
callq 0x6660
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x66c1
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x66e6
leaq 0x10(%rsp), %rdi
movl $0x88, %edx
movq %rbx, %rsi
callq 0x10a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6824
testl %eax, %eax
je 0x6955
pushq $-0x1
popq %rbx
jmp 0x696c
leaq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1a8a
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
movl $0x88, %esi
callq 0x1734
movl %ebx, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: gidx_refresh
static void gidx_refresh(gidx_ctx *ctx)
{
    // seed the begining of the block...
    ctx->b.a[0] = ctx->pass_number;
    ctx->b.a[1] = 0;  // lane number (we have only one)
    ctx->b.a[2] = ctx->slice_number;
    ctx->b.a[3] = ctx->nb_blocks;
    ctx->b.a[4] = ctx->nb_iterations;
    ctx->b.a[5] = 1;  // type: Argon2i
    ctx->b.a[6] = ctx->ctr;
    FOR (i, 7, 128) { ctx->b.a[i] = 0; } // ...then zero the rest out

    // Shuffle the block thus: ctx->b = G((G(ctx->b, zero)), zero)
    // (G "square" function), to get cheap pseudo-random numbers.
    unary_g(&ctx->b);
    unary_g(&ctx->b);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x400(%rdi), %eax
movl 0x40c(%rdi), %ecx
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movsd 0x404(%rdi), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movups %xmm0, 0x10(%rdi)
movq %rcx, 0x20(%rdi)
movq $0x1, 0x28(%rdi)
movl 0x410(%rdi), %eax
movq %rax, 0x30(%rdi)
pushq $0x7
popq %rax
cmpq $0x80, %rax
je 0x6a16
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x6a04
movq %rbx, %rdi
callq 0x6a24
movq %rbx, %rdi
popq %rbx
jmp 0x6a24
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: unary_g
static void unary_g(block *work_block)
{
    // work_block == R
    block tmp;
    copy_block(&tmp, work_block); // tmp        = R
    g_rounds(work_block);         // work_block = Z
    xor_block(work_block, &tmp);  // work_block = Z ^ R
    wipe_block(&tmp);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3f68
movq %rbx, %rdi
callq 0x6a67
movq %rbx, %rdi
movq %r14, %rsi
callq 0x73e8
movq %r14, %rdi
callq 0x3f80
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_mul_small
static void fe_mul_small(fe h, const fe f, i32 g)
{
    i64 t0 = f[0] * (i64) g;  i64 t1 = f[1] * (i64) g;
    i64 t2 = f[2] * (i64) g;  i64 t3 = f[3] * (i64) g;
    i64 t4 = f[4] * (i64) g;  i64 t5 = f[5] * (i64) g;
    i64 t6 = f[6] * (i64) g;  i64 t7 = f[7] * (i64) g;
    i64 t8 = f[8] * (i64) g;  i64 t9 = f[9] * (i64) g;
    FE_CARRY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq (%rsi), %r13
movl %edx, %ecx
imulq %rcx, %r13
movslq 0x4(%rsi), %r11
imulq %rcx, %r11
movslq 0x8(%rsi), %r9
imulq %rcx, %r9
movslq 0xc(%rsi), %r10
imulq %rcx, %r10
movslq 0x10(%rsi), %rbx
imulq %rcx, %rbx
movslq 0x14(%rsi), %r8
imulq %rcx, %r8
movslq 0x18(%rsi), %r14
imulq %rcx, %r14
movslq 0x1c(%rsi), %rdx
imulq %rcx, %rdx
movslq 0x20(%rsi), %r15
imulq %rcx, %r15
movslq 0x24(%rsi), %rax
imulq %rcx, %rax
movl $0x1000000, %r12d       # imm = 0x1000000
leaq (%rax,%r12), %rsi
movq %rsi, %rcx
sarq $0x19, %rcx
imulq $0x13, %rcx, %rcx
addq %r13, %rcx
movl $0xfe000000, %ebp       # imm = 0xFE000000
andl %ebp, %esi
subl %esi, %eax
leaq (%r11,%r12), %r13
movq %r13, %rsi
sarq $0x19, %rsi
addq %r9, %rsi
andl %ebp, %r13d
subl %r13d, %r11d
leaq (%r10,%r12), %r13
movq %r13, %r9
sarq $0x19, %r9
addq %rbx, %r9
andl %ebp, %r13d
subl %r13d, %r10d
leaq (%r8,%r12), %r13
movq %r13, %rbx
sarq $0x19, %rbx
addq %r14, %rbx
andl %ebp, %r13d
subl %r13d, %r8d
addq %rdx, %r12
movq %r12, %r14
sarq $0x19, %r14
addq %r15, %r14
andl %ebp, %r12d
subl %r12d, %edx
movl $0x2000000, %r12d       # imm = 0x2000000
leaq (%rcx,%r12), %r13
movq %r13, %r15
shrq $0x1a, %r15
addl %r11d, %r15d
movl $0xfc000000, %r11d      # imm = 0xFC000000
andl %r11d, %r13d
subl %r13d, %ecx
leaq (%rsi,%r12), %rbp
movq %rbp, %r13
shrq $0x1a, %r13
addl %r10d, %r13d
andl %r11d, %ebp
subl %ebp, %esi
leaq (%r9,%r12), %rbp
movq %rbp, %r10
shrq $0x1a, %r10
addl %r8d, %r10d
andl %r11d, %ebp
subl %ebp, %r9d
leaq (%rbx,%r12), %rbp
movq %rbp, %r8
shrq $0x1a, %r8
addl %edx, %r8d
andl %r11d, %ebp
subl %ebp, %ebx
addq %r14, %r12
movq %r12, %rdx
shrq $0x1a, %rdx
addl %eax, %edx
andl %r11d, %r12d
subl %r12d, %r14d
movl %ecx, (%rdi)
movl %r15d, 0x4(%rdi)
movl %esi, 0x8(%rdi)
movl %r13d, 0xc(%rdi)
movl %r9d, 0x10(%rdi)
movl %r10d, 0x14(%rdi)
movl %ebx, 0x18(%rdi)
movl %r8d, 0x1c(%rdi)
movl %r14d, 0x20(%rdi)
movl %edx, 0x24(%rdi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_zero
static void ge_zero(ge *p)
{
    fe_0(p->X);
    fe_1(p->Y);
    fe_1(p->Z);
    fe_0(p->T);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x448e
leaq 0x28(%rbx), %rdi
callq 0x4475
leaq 0x50(%rbx), %rdi
callq 0x4475
addq $0x78, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x448e
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_double
static void ge_double(ge *s, const ge *p, ge *q)
{
    fe_sq (q->X, p->X);
    fe_sq (q->Y, p->Y);
    fe_sq2(q->Z, p->Z);
    fe_add(q->T, p->X, p->Y);
    fe_sq (s->T, q->T);
    fe_add(q->T, q->Y, q->X);
    fe_sub(q->Y, q->Y, q->X);
    fe_sub(q->X, s->T, q->T);
    fe_sub(q->Z, q->Z, q->Y);

    fe_mul(s->X, q->X , q->Z);
    fe_mul(s->Y, q->T , q->Y);
    fe_mul(s->Z, q->Y , q->Z);
    fe_mul(s->T, q->X , q->T);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r14
movq %rdx, %rdi
callq 0x4cf6
leaq 0x28(%rbx), %r15
leaq 0x28(%rbp), %rsi
movq %rsi, (%rsp)
movq %r15, %rdi
callq 0x4cf6
leaq 0x50(%rbx), %r12
leaq 0x50(%rbp), %rsi
movq %r12, %rdi
callq 0x4cf6
pushq $0x2
popq %rdx
movq %r12, %rdi
movq %r12, %rsi
callq 0x7400
leaq 0x78(%rbx), %r13
movq %r13, %rdi
movq %rbp, %rsi
movq (%rsp), %rdx
callq 0x44f2
leaq 0x78(%r14), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4cf6
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x44f2
movq %r15, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x44db
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x44db
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x44db
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x4509
leaq 0x28(%r14), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4509
addq $0x50, %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4509
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4509
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_isnegative
static int fe_isnegative(const fe f)
{
    u8 s[32];
    fe_tobytes(s, f);
    u8 isneg = s[0] & 1;
    WIPE_BUFFER(s);
    return isneg;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x5453
movzbl (%rbx), %ebp
andl $0x1, %ebp
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x1734
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: modL
static void modL(u8 *r, i64 x[64])
{
    for (unsigned i = 63; i >= 32; i--) {
        i64 carry = 0;
        FOR (j, i-32, i-12) {
            x[j] += carry - 16 * x[i] * L[j - (i - 32)];
            carry = (x[j] + 128) >> 8;
            x[j] -= carry * (1 << 8);
        }
        x[i-12] += carry;
        x[i] = 0;
    }
    i64 carry = 0;
    FOR (i, 0, 32) {
        x[i] += carry - (x[31] >> 4) * L[i];
        carry = x[i] >> 8;
        x[i] &= 255;
    }
    FOR (i, 0, 32) {
        x[i] -= carry * L[i];
    }
    FOR (i, 0, 32) {
        x[i+1] += x[i] >> 8;
        r[i  ]  = x[i] & 255;
    }
}

// Assembly:
pushq %rbx
movabsq $0x3f, %rax
leaq 0x2766(%rip), %rcx      # 0x9e60
cmpq $0x1f, %rax
jbe 0x7760
leal -0x20(%rax), %edx
leaq -0xc(%rax), %r8
movq %rcx, %r9
xorl %r10d, %r10d
cmpq %r8, %rdx
jae 0x7751
movq (%rsi,%rax,8), %r11
imulq (%r9), %r11
shlq $0x4, %r11
subq %r11, %r10
movq (%rsi,%rdx,8), %r11
leaq (%r10,%r11), %rbx
addq %r10, %r11
addq $0x80, %r11
movq %r11, %r10
sarq $0x8, %r10
andq $-0x100, %r11
subq %r11, %rbx
movq %rbx, (%rsi,%rdx,8)
incq %rdx
addq $0x8, %r9
jmp 0x770d
addq %r10, -0x60(%rsi,%rax,8)
andq $0x0, (%rsi,%rax,8)
decq %rax
jmp 0x76fa
xorl %edx, %edx
leaq 0x26f7(%rip), %rax      # 0x9e60
xorl %ecx, %ecx
cmpq $0x100, %rdx            # imm = 0x100
je 0x779d
movq 0xf8(%rsi), %r8
sarq $0x4, %r8
imulq (%rdx,%rax), %r8
subq %r8, %rcx
addq (%rsi,%rdx), %rcx
movzbl %cl, %r8d
sarq $0x8, %rcx
movq %r8, (%rsi,%rdx)
addq $0x8, %rdx
jmp 0x776b
xorl %edx, %edx
cmpq $0x100, %rdx            # imm = 0x100
je 0x77ba
movq (%rdx,%rax), %r8
imulq %rcx, %r8
subq %r8, (%rsi,%rdx)
addq $0x8, %rdx
jmp 0x779f
xorl %eax, %eax
cmpq $0x20, %rax
je 0x77da
movq (%rsi,%rax,8), %rcx
movq %rcx, %rdx
sarq $0x8, %rdx
addq %rdx, 0x8(%rsi,%rax,8)
movb %cl, (%rdi,%rax)
incq %rax
jmp 0x77bc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: fe_isnonzero
static int fe_isnonzero(const fe f)
{
    u8 s[32];
    fe_tobytes(s, f);
    u8 isnonzero = zerocmp32(s);
    WIPE_BUFFER(s);
    return isnonzero;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x5453
movq %rbx, %rdi
callq 0x56d5
movl %eax, %ebp
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x1734
movzbl %bpl, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_precompute
static void ge_precompute(ge_cached lut[8], const ge *P1)
{
    ge P2, tmp;
    ge_double(&P2, P1, &tmp);
    ge_cache(&lut[0], P1);
    FOR (i, 0, 7) {
        ge_add(&tmp, &P2, &lut[i]);
        ge_cache(&lut[i+1], &tmp);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xa8(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x758d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7abc
pushq $0x7
popq %r12
subq $0x1, %r12
jb 0x7873
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x791d
addq $0xa0, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7abc
jmp 0x784b
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: slide
static void slide(i8 adds[258], const u8 scalar[32])
{
    FOR (i,   0, 256) { adds[i] = scalar_bit(scalar, i); }
    FOR (i, 256, 258) { adds[i] = 0;                     }
    FOR (i, 0, 254) {
        if (adds[i] != 0) {
            // base value of the 5-bit window
            FOR (j, 1, 5) {
                adds[i  ] |= adds[i+j] << j;
                adds[i+j]  = 0;
            }
            if (adds[i] > 16) {
                // go back to [-15, 15], propagate carry.
                adds[i] -= 32;
                int j = i + 5;
                while (adds[j] != 0) {
                    adds[j] = 0;
                    j++;
                }
                adds[j] = 1;
            }
        }
    }
}

// Assembly:
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x78a8
movq %rax, %rcx
shrq $0x3, %rcx
movzbl (%rsi,%rcx), %ecx
movl %eax, %edx
andl $0x7, %edx
btl %edx, %ecx
setb (%rdi,%rax)
incq %rax
jmp 0x7884
andw $0x0, 0x100(%rdi)
leaq 0x5(%rdi), %rax
xorl %edx, %edx
pushq $0x1
popq %rsi
movq %rdi, %r8
cmpq $0xfe, %rdx
je 0x791c
movb (%rdi,%rdx), %r9b
testb %r9b, %r9b
je 0x7911
movq %rsi, %rcx
cmpq $0x5, %rcx
je 0x78ec
movzbl (%r8,%rcx), %r10d
shll %cl, %r10d
orb %r10b, %r9b
movb $0x0, (%r8,%rcx)
incq %rcx
jmp 0x78d1
movb %r9b, (%rdi,%rdx)
cmpb $0x10, %r9b
jle 0x7911
addb $-0x20, %r9b
movb %r9b, (%rdi,%rdx)
movq %rax, %rcx
cmpb $0x0, (%rcx)
je 0x790e
movb $0x0, (%rcx)
incq %rcx
jmp 0x7901
movb $0x1, (%rcx)
incq %rdx
incq %r8
incq %rax
jmp 0x78bc
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_add
static void ge_add(ge *s, const ge *p, const ge_cached *q)
{
    fe a, b; // not used to process secrets, no need to wipe
    fe_add(a   , p->Y, p->X );
    fe_sub(b   , p->Y, p->X );
    fe_mul(a   , a   , q->Yp);
    fe_mul(b   , b   , q->Ym);
    fe_add(s->Y, a   , b    );
    fe_sub(s->X, a   , b    );

    fe_add(s->Z, p->Z, p->Z );
    fe_mul(s->Z, s->Z, q->Z );
    fe_mul(s->T, p->T, q->T2);
    fe_add(a   , s->Z, s->T );
    fe_sub(b   , s->Z, s->T );

    fe_mul(s->T, s->X, s->Y);
    fe_mul(s->X, s->X, b   );
    fe_mul(s->Y, s->Y, a   );
    fe_mul(s->Z, a   , b   );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
leaq 0x28(%rsi), %rbx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x44f2
movq %rsp, %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x44db
movq %r14, %rbx
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4509
leaq 0x28(%r12), %rdx
movq %r13, %r14
movq %r13, %rdi
movq %r13, %rsi
callq 0x4509
leaq 0x28(%r15), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44f2
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44db
leaq 0x50(%r15), %rbx
leaq 0x50(%rbp), %rdx
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x44f2
leaq 0x50(%r12), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x4509
leaq 0x78(%r15), %r14
addq $0x78, %rbp
addq $0x78, %r12
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x4509
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44f2
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x44db
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x4509
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x4509
movq %r13, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4509
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x4509
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_sub
static void ge_sub(ge *s, const ge *p, const ge_cached *q)
{
    ge_cached neg;
    fe_copy(neg.Ym, q->Yp);
    fe_copy(neg.Yp, q->Ym);
    fe_copy(neg.Z , q->Z );
    fe_neg (neg.T2, q->T2);
    ge_add(s, p, &neg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x44a0
leaq 0x28(%r14), %rsi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x44a0
leaq 0x58(%rsp), %rdi
leaq 0x50(%r14), %rsi
callq 0x44a0
leaq 0x80(%rsp), %rdi
addq $0x78, %r14
movq %r14, %rsi
callq 0x76a4
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x791d
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/monocypher.c
// Function: ge_cache
static void ge_cache(ge_cached *c, const ge *p)
{
    static const fe D2 = { // - 2 * 121665 / 121666
        -21827239, -5839606, -30745221, 13898782, 229458,
        15978800, -12551817, -6495438, 29715968, 9444199
    };
    fe_add (c->Yp, p->Y, p->X);
    fe_sub (c->Ym, p->Y, p->X);
    fe_copy(c->Z , p->Z      );
    fe_mul (c->T2, p->T, D2  );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsi), %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x44f2
leaq 0x28(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x44db
leaq 0x50(%r14), %rdi
leaq 0x50(%rbx), %rsi
callq 0x44a0
addq $0x78, %r14
addq $0x78, %rbx
leaq 0x251f(%rip), %rdx      # 0xa020
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4509
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: crypto_sha512_update
void crypto_sha512_update(crypto_sha512_ctx *ctx,
                          const u8 *message, size_t message_size)
{
    // Align ourselves with block boundaries
    size_t align = MIN(ALIGN(ctx->input_idx, 128), message_size);
    sha512_update(ctx, message, align);
    message      += align;
    message_size -= align;

    // Process the message block by block
    FOR (i, 0, message_size / 128) { // number of blocks
        FOR (j, 0, 16) {
            ctx->input[j] = load64_be(message + j*8);
        }
        message        += 128;
        ctx->input_idx += 128;
        sha512_end_block(ctx);
    }
    message_size &= 127;

    // remaining bytes
    sha512_update(ctx, message, message_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
subl 0x350(%rdi), %r12d
andl $0x7f, %r12d
cmpq %rdx, %r12
cmovaeq %rdx, %r12
movq %r12, %rdx
callq 0x7c3f
addq %r12, %r14
subq %r12, %rbx
movq %rbx, %r12
shrq $0x7, %r12
cmpq %r12, %r13
je 0x7c28
xorl %eax, %eax
cmpq $0x10, %rax
je 0x7c0f
movq (%r14,%rax,8), %rcx
bswapq %rcx
movq %rcx, 0x2c0(%r15,%rax,8)
incq %rax
jmp 0x7bf5
subq $-0x80, %r14
subq $-0x80, 0x350(%r15)
movq %r15, %rdi
callq 0x7c85
incq %r13
jmp 0x7bee
andl $0x7f, %ebx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7c3f
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: sha512_update
static void sha512_update(crypto_sha512_ctx *ctx,
                          const u8 *message, size_t message_size)
{
    FOR (i, 0, message_size) {
        sha512_set_input(ctx, message[i]);
        ctx->input_idx++;
        sha512_end_block(ctx);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x7c79
movzbl (%r14,%r12), %esi
movq %r15, %rdi
callq 0x7d73
incq 0x350(%r15)
movq %r15, %rdi
callq 0x7c85
incq %r12
jmp 0x7c53
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: sha512_end_block
static void sha512_end_block(crypto_sha512_ctx *ctx)
{
    if (ctx->input_idx == 128) {
        sha512_incr(ctx->input_size, 1024); // size is in bits
        sha512_compress(ctx);
        ctx->input_idx = 0;
    }
}

// Assembly:
cmpq $0x80, 0x350(%rdi)
jne 0x7ccb
pushq %rbx
movq %rdi, %rbx
movq 0x348(%rdi), %rax
leaq 0x400(%rax), %rcx
movq %rcx, 0x348(%rdi)
cmpq $-0x400, %rax           # imm = 0xFC00
jb 0x7cba
incq 0x340(%rbx)
movq %rbx, %rdi
callq 0x7db7
andq $0x0, 0x350(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: crypto_sha512_final
void crypto_sha512_final(crypto_sha512_ctx *ctx, u8 hash[64])
{
    sha512_incr(ctx->input_size, ctx->input_idx * 8); // size is in bits
    sha512_set_input(ctx, 128);                       // padding

    // compress penultimate block (if any)
    if (ctx->input_idx > 111) {
        sha512_compress(ctx);
        FOR(i, 0, 14) {
            ctx->input[i] = 0;
        }
    }
    // compress last block
    ctx->input[14] = ctx->input_size[0];
    ctx->input[15] = ctx->input_size[1];
    sha512_compress(ctx);

    // copy hash to output (big endian)
    FOR (i, 0, 8) {
        store64_be(hash + i*8, ctx->hash[i]);
    }

    WIPE_CTX(ctx);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x350(%rdi), %rax
shlq $0x3, %rax
addq %rax, 0x348(%rdi)
jae 0x7cf1
incq 0x340(%rbx)
movq %rbx, %rdi
movl $0x80, %esi
callq 0x7d73
cmpq $0x70, 0x350(%rbx)
jb 0x7d26
movq %rbx, %rdi
callq 0x7db7
xorl %eax, %eax
cmpq $0xe, %rax
je 0x7d26
andq $0x0, 0x2c0(%rbx,%rax,8)
incq %rax
jmp 0x7d12
movups 0x340(%rbx), %xmm0
movups %xmm0, 0x330(%rbx)
movq %rbx, %rdi
callq 0x7db7
xorl %eax, %eax
cmpq $0x8, %rax
je 0x7d58
movq 0x280(%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
jmp 0x7d3e
xorl %eax, %eax
cmpq $0x358, %rax            # imm = 0x358
je 0x7d6b
movb $0x0, (%rbx,%rax)
incq %rax
jmp 0x7d5a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: sha512_set_input
static void sha512_set_input(crypto_sha512_ctx *ctx, u8 input)
{
    if (ctx->input_idx == 0) {
        FOR (i, 0, 16) {
            ctx->input[i] = 0;
        }
    }
    size_t word = ctx->input_idx / 8;
    size_t byte = ctx->input_idx % 8;
    ctx->input[word] |= (u64)input << (8 * (7 - byte));
}

// Assembly:
movq 0x350(%rdi), %rax
testq %rax, %rax
jne 0x7d9c
xorl %eax, %eax
cmpq $0x10, %rax
je 0x7d95
andq $0x0, 0x2c0(%rdi,%rax,8)
incq %rax
jmp 0x7d81
movq 0x350(%rdi), %rax
movzbl %sil, %edx
movl %eax, %ecx
notl %ecx
shll $0x3, %ecx
shlq %cl, %rdx
andq $-0x8, %rax
orq %rdx, 0x2c0(%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/getopt.c
// Function: getopt_next
int getopt_next(getopt_ctx *ctx)
{
    if (ctx->char_idx == 0) {
        int    idx  = ctx->argv_idx;
        char **argv = ctx->argv;
        // Search argv for the next option
        while (idx < ctx->argc &&
               (argv[idx][0] != '-' || is_dash(ctx, idx))) {
            idx++;
        }
        // No more arguments
        if (idx == ctx->argc) {
            return -1;
        }
        // End of options marker found.  No more options, Get rid of it.
        if (is_double_dash(ctx, idx)) {
            forget_argument(ctx, idx);
            return -1;
        }
        // Remember where the argument is stored
        ctx->argv_idx = idx;
    }
    // Point to the current option
    ctx->char_idx++;

    // Option has been found
    char* option_string  = ctx->argv[ctx->argv_idx] + ctx->char_idx;
    char  current_option = option_string[0];
    int   is_last        = option_string[1] == 0;
    if (is_last) {
        forget_argument(ctx, ctx->argv_idx);
    }
    return current_option;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x10(%rdi), %r15
testq %r15, %r15
je 0x80b3
movq 0x8(%rbx), %r12
movl 0x14(%rbx), %ebp
leaq 0x1(%r15), %rax
movl %eax, 0x10(%rbx)
movslq %ebp, %rax
movq (%r12,%rax,8), %rax
movsbl 0x1(%rax,%r15), %r14d
cmpb $0x0, 0x2(%rax,%r15)
jne 0x8100
jmp 0x80f6
movslq 0x14(%rbx), %rcx
movq 0x8(%rbx), %r12
movslq (%rbx), %rax
cmpl %eax, %ecx
movl %eax, %ebp
cmovgl %ecx, %ebp
cmpq %rax, %rcx
jge 0x80e0
movq (%r12,%rcx,8), %rdx
cmpb $0x2d, (%rdx)
jne 0x80d9
cmpb $0x0, 0x1(%rdx)
jne 0x80de
incq %rcx
jmp 0x80c5
movl %ecx, %ebp
pushq $-0x1
popq %r14
cmpl %eax, %ebp
je 0x8100
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8111
testl %eax, %eax
je 0x810c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8133
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, 0x14(%rbx)
jmp 0x8095
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/getopt.c
// Function: forget_argument
static void forget_argument(getopt_ctx *ctx, int idx)
{
    char *tmp = ctx->argv[idx];
    while (idx > 0) {
        ctx->argv[idx] = ctx->argv[idx-1];
        idx--;
    }
    ctx->argv[0]  = tmp;
    ctx->char_idx = 0;  // point to the begining of the next argument
    ctx->argv++;
    ctx->argc--;
}

// Assembly:
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movq (%rax,%rcx,8), %rax
movl %ecx, %ecx
movq 0x8(%rdi), %rdx
testl %ecx, %ecx
jle 0x8156
movq -0x8(%rdx,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
decq %rcx
jmp 0x8140
movq %rax, (%rdx)
andl $0x0, 0x10(%rdi)
addq $0x8, 0x8(%rdi)
decl (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/getopt.c
// Function: getopt_parameter
char* getopt_parameter(getopt_ctx *ctx)
{
    int idx = ctx->argv_idx;
    if (idx >= ctx->argc || is_double_dash(ctx, idx)) {
        return 0; // missing option parameter
    }
    int   char_idx = ctx->char_idx == 0 ? 0 : ctx->char_idx + 1;
    char *argument = ctx->argv[idx] + char_idx;
    forget_argument(ctx, idx);
    return argument;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq 0x14(%rdi), %rbx
cmpl (%rdi), %ebx
jge 0x8180
movq %rdi, %r14
movl %ebx, %esi
callq 0x8111
testl %eax, %eax
je 0x818c
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movl 0x10(%r14), %eax
leal 0x1(%rax), %ecx
testl %eax, %eax
cmovel %eax, %ecx
movslq %ecx, %r15
movq 0x8(%r14), %rax
addq (%rax,%rbx,8), %r15
movq %r14, %rdi
movl %ebx, %esi
callq 0x8133
jmp 0x8183
nop
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: alloc
void* alloc(size_t size)
{
    if (size == 0) { return 0; } // for portability
    void *buf = malloc(size);
    if (buf == NULL) {
        fprintf(stderr, "Failed to allocate 0x%zx bytes\n", size);
        panic("Out of memory.");
    }
    return buf;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x81ea
movq %rdi, %rbx
callq 0x10b0
testq %rax, %rax
jne 0x81ec
movq 0x5e2e(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x20fc(%rip), %rsi      # 0xa2d0
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1080
leaq 0x210b(%rip), %rdi      # 0xa2f0
callq 0x81ee
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: random_bytes
void random_bytes(uint8_t *buffer, size_t buffer_size)
{
    if (buffer_size > 256 ) {
        panic("Requested too many random bytes (<= 256)");
    }
    if (syscall(SYS_getrandom, buffer, buffer_size, 0) != (int)buffer_size) {
        fprintf(stderr, "Failed to provide %zu random bytes", buffer_size);
        panic("");
    }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpq $0x101, %rsi            # imm = 0x101
jae 0x8224
movq %rdi, %rsi
movl $0x13e, %edi            # imm = 0x13E
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1090
cmpq %rbx, %rax
jne 0x8230
popq %rbx
retq
leaq 0x20d4(%rip), %rdi      # 0xa2ff
callq 0x81ee
movq 0x5dc1(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x20e7(%rip), %rsi      # 0xa328
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1080
leaq 0x2102(%rip), %rdi      # 0xa354
callq 0x81ee
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: int_of_string
int int_of_string(const char *s)
{
    int i = 0;
    if ( s == 0   ) return -1; // NULL  string
    if (*s == '\0') return -2; // empty string
    while (*s != 0) {
        if (!is_between(*s, '0', '9')            ) return -2; // not a number
        if (i > (INT_MAX - int_of_digit(*s)) / 10) return -3; // too big for int
        i = (10 * i) + int_of_digit(*s);
        s++;
    }
    return i;
}

// Assembly:
testq %rdi, %rdi
je 0x82d7
movb (%rdi), %al
pushq $-0x2
popq %rcx
testb %al, %al
je 0x82e3
incq %rdi
xorl %esi, %esi
pushq $0xa
popq %r9
pushq $-0x3
popq %r8
testb %al, %al
je 0x82dc
leal -0x3a(%rax), %edx
cmpb $-0xa, %dl
jb 0x82e3
movzbl %al, %r10d
movl $0x8000002f, %eax       # imm = 0x8000002F
subl %r10d, %eax
xorl %edx, %edx
divl %r9d
cmpl %eax, %esi
jg 0x82e0
imull $0xa, %esi, %eax
leal (%r10,%rax), %esi
addl $-0x30, %esi
movb (%rdi), %al
incq %rdi
jmp 0x82a5
pushq $-0x1
popq %rcx
jmp 0x82e3
movl %esi, %ecx
jmp 0x82e3
movl %r8d, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: read_buffer
int read_buffer(uint8_t *out, size_t max_size, const char *hex)
{
    size_t hex_size = string_length(hex);
    size_t buf_size = hex_size / 2;
    if (hex ==  0          ) return -1;
    if (hex_size > max_size) return -2;
    if (hex_size % 2 !=   0) return -3;
    for (size_t i = 0; i < hex_size; i += 2) {
        int msb = int_of_hex(hex[i  ]);
        int lsb = int_of_hex(hex[i+1]);
        if (msb == -1 || lsb == -1) return -4;
        out[i/2] = lsb + (msb << 4);
    }
    return buf_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rdx, %rdi
callq 0x83bc
testq %rbx, %rbx
je 0x8350
movq %rax, %r15
cmpq %r12, %rax
jbe 0x8354
pushq $-0x2
jmp 0x83ac
pushq $-0x1
jmp 0x83ac
testb $0x1, %r15b
jne 0x83aa
movq %r15, %r12
shrq %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jae 0x839e
movsbl (%rbx,%r13), %edi
callq 0x83d4
movl %eax, %ebp
movsbl 0x1(%rbx,%r13), %edi
callq 0x83d4
cmpl $-0x1, %ebp
je 0x839e
cmpl $-0x1, %eax
je 0x839e
shll $0x4, %ebp
addl %ebp, %eax
movq %r13, %rcx
shrq %rcx
movb %al, (%r14,%rcx)
addq $0x2, %r13
jmp 0x8363
cmpq %r15, %r13
pushq $-0x4
popq %rax
cmovael %r12d, %eax
jmp 0x83ad
pushq $-0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: int_of_hex
static int int_of_hex(char c)
{
    return is_between(c, '0', '9') ? c - '0'
        :  is_between(c, 'a', 'f') ? c - 'a'
        :  is_between(c, 'A', 'F') ? c - 'A'
        :  -1;
}

// Assembly:
leal -0x3a(%rdi), %eax
cmpb $-0xa, %al
jae 0x83f8
leal -0x67(%rdi), %eax
cmpb $-0x6, %al
jae 0x8400
movzbl %dil, %ecx
addb $-0x47, %dil
addl $-0x41, %ecx
cmpb $-0x6, %dil
pushq $-0x1
popq %rax
cmovael %ecx, %eax
retq
movzbl %dil, %eax
addl $-0x30, %eax
retq
movzbl %dil, %eax
addl $-0x61, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: read_vector
int read_vector(vector *v, const char *hex)
{
    v->size   = string_length(hex) / 2;
    v->buffer = alloc(v->size);
    int error = read_buffer(v->buffer, INT_MAX, hex);
    if (error < 1) {
        free_vector(v);
        return error;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x83bc
shrq %rax
movq %rax, 0x8(%rbx)
movq %rax, %rdi
callq 0x81b0
movq %rax, (%rbx)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rax, %rdi
movq %r14, %rdx
callq 0x8323
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
jg 0x8453
movq %rbx, %rdi
callq 0x8458
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: free_vector
void free_vector(vector *v)
{
    if (v->buffer != 0) {
        free(v->buffer);
        v->buffer = 0;
    }
    v->size = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x846d
callq 0x1030
andq $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/impact-eintr[P]st/x.c
// Function: xseticontitle
void
xseticontitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

	Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
			&prop);
	XSetWMIconName(xw.dpy, xw.win, &prop);
	XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmiconname);
	XFree(prop.value);
}

// Assembly:
testq %rdi, %rdi
jne 0x9da3
movq 0xd02d(%rip), %rdi      # 0x16dd0
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0xcee1(%rip), %rdi      # 0x16c98
pushq $0x1
popq %rdx
pushq $0x4
popq %rcx
leaq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x5420
movq 0xcec7(%rip), %rdi      # 0x16c98
movq 0xced0(%rip), %rsi      # 0x16ca8
movq %rbx, %rdx
callq 0x5320
movq 0xceb1(%rip), %rdi      # 0x16c98
movq 0xceba(%rip), %rsi      # 0x16ca8
movq 0xcee3(%rip), %rcx      # 0x16cd8
movq %rbx, %rdx
callq 0x5440
movq (%rbx), %rdi
callq 0x5090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/impact-eintr[P]st/x.c
// Function: xsettitle
void
xsettitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

	Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
			&prop);
	XSetWMName(xw.dpy, xw.win, &prop);
	XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
	XFree(prop.value);
}

// Assembly:
testq %rdi, %rdi
jne 0x9e17
movq 0xcfb9(%rip), %rdi      # 0x16dd0
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0xce6d(%rip), %rdi      # 0x16c98
pushq $0x1
popq %rdx
pushq $0x4
popq %rcx
leaq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x5420
movq 0xce53(%rip), %rdi      # 0x16c98
movq 0xce5c(%rip), %rsi      # 0x16ca8
movq %rbx, %rdx
callq 0x53e0
movq 0xce3d(%rip), %rdi      # 0x16c98
movq 0xce46(%rip), %rsi      # 0x16ca8
movq 0xce67(%rip), %rcx      # 0x16cd0
movq %rbx, %rdx
callq 0x5440
movq (%rbx), %rdi
callq 0x5090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/impact-eintr[P]st/x.c
// Function: cresize
void
cresize(int width, int height)
{
	int col, row;

	if (width != 0)
		win.w = width;
	if (height != 0)
		win.h = height;

	col = (win.w - 2 * borderpx) / win.cw;
	row = (win.h - 2 * borderpx) / win.ch;
	col = MAX(1, col);
	row = MAX(1, row);

	win.hborderpx = (win.w - col * win.cw) / 2;
	win.vborderpx = (win.h - row * win.ch) / 2;

	tresize(col, row);
	xresize(col, row);
	ttyresize(win.tw, win.th);
}

// Assembly:
testl %edi, %edi
je 0xc01f
movl %edi, 0xad91(%rip)      # 0x16db0
testl %esi, %esi
je 0xc02b
movl %esi, 0xad8b(%rip)      # 0x16db4
jmp 0xc031
movl 0xad83(%rip), %esi      # 0x16db4
pushq %rbp
pushq %rbx
pushq %rax
movl 0xad76(%rip), %ecx      # 0x16db0
leal -0x4(%rcx), %eax
movl 0xad81(%rip), %edi      # 0x16dc4
cltd
idivl %edi
movl %eax, %ebx
leal -0x4(%rsi), %eax
movl 0xad6e(%rip), %r8d      # 0x16dc0
cltd
idivl %r8d
pushq $0x2
popq %r9
cmpl %r9d, %ebx
pushq $0x1
popq %rbp
cmovll %ebp, %ebx
cmpl %r9d, %eax
cmovgel %eax, %ebp
imull %ebx, %edi
subl %edi, %ecx
movl %ecx, %eax
cltd
idivl %r9d
movl %eax, 0xad3e(%rip)      # 0x16db8
imull %ebp, %r8d
subl %r8d, %esi
movl %esi, %eax
cltd
idivl %r9d
movl %eax, 0xad2f(%rip)      # 0x16dbc
movl %ebx, %edi
movl %ebp, %esi
callq 0x6b2e
movl 0xad28(%rip), %eax      # 0x16dc4
imull %ebx, %eax
imull 0xad1a(%rip), %ebp      # 0x16dc0
movl %eax, 0xacfc(%rip)      # 0x16da8
movl %ebp, 0xacfa(%rip)      # 0x16dac
movq 0xabdf(%rip), %rdi      # 0x16c98
movq 0xabf0(%rip), %rsi      # 0x16cb0
callq 0x57c0
movq 0xabcc(%rip), %rdi      # 0x16c98
movq 0xabd5(%rip), %rsi      # 0x16ca8
movl 0xacd7(%rip), %edx      # 0x16db0
movl 0xacd5(%rip), %ecx      # 0x16db4
movl 0xacaa(%rip), %r8d      # 0x16d90
callq 0x5840
movq %rax, 0xabbe(%rip)      # 0x16cb0
movq 0xac0f(%rip), %rdi      # 0x16d08
movq %rax, %rsi
callq 0x56b0
movl 0xaca9(%rip), %edx      # 0x16db0
movl 0xaca7(%rip), %ecx      # 0x16db4
xorl %edi, %edi
xorl %esi, %esi
callq 0xb88a
movq 0xab9b(%rip), %rdi      # 0x16cb8
shlq $0x4, %rbx
movq %rbx, %rsi
callq 0x5ade
movq %rax, 0xab88(%rip)      # 0x16cb8
movl 0xac72(%rip), %edi      # 0x16da8
movl 0xac70(%rip), %esi      # 0x16dac
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x697f
// File: /workspace/github_c_makefile_star2_O2/impact-eintr[P]st/x.c
// Function: bpress
void
bpress(XEvent *e)
{
	struct timespec now;
	int snap;

	if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
		mousereport(e);
		return;
	}

	if (mouseaction(e, 0))
		return;

	if (e->xbutton.button == Button1) {
		/*
		 * If the user clicks below predefined timeouts specific
		 * snapping behaviour is exposed.
		 */
		clock_gettime(CLOCK_MONOTONIC, &now);
		if (TIMEDIFF(now, xsel.tclick2) <= tripleclicktimeout) {
			snap = SNAP_LINE;
		} else if (TIMEDIFF(now, xsel.tclick1) <= doubleclicktimeout) {
			snap = SNAP_WORD;
		} else {
			snap = 0;
		}
		xsel.tclick2 = xsel.tclick1;
		xsel.tclick1 = now;

		selstart(evcol(e), evrow(e), snap);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzwl 0xaaa3(%rip), %eax      # 0x16dc8
testw $0xc018, %ax            # imm = 0xC018
je 0xc341
testb $0x1, 0x50(%rbx)
jne 0xc341
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xcb22
movq %rbx, %rdi
xorl %esi, %esi
callq 0xcca7
testl %eax, %eax
jne 0xc42b
cmpl $0x1, 0x54(%rbx)
jne 0xc42b
pushq $0x1
popq %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x5130
movq (%r14), %rax
movq %rax, %rcx
subq 0xaac8(%rip), %rcx      # 0x16e40
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
cvtsi2sd %rcx, %xmm0
movq 0x8(%r14), %rcx
movq %rcx, %rdx
subq 0xaab6(%rip), %rdx      # 0x16e48
cvtsi2sd %rdx, %xmm1
divsd 0x1759(%rip), %xmm1     # 0xdaf8
addsd %xmm0, %xmm1
movsd 0x178d(%rip), %xmm0     # 0xdb38
ucomisd %xmm1, %xmm0
jae 0xc3f0
subq 0xaa78(%rip), %rax      # 0x16e30
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
cvtsi2sd %rax, %xmm0
subq 0xaa6d(%rip), %rcx      # 0x16e38
cvtsi2sd %rcx, %xmm1
divsd 0x1720(%rip), %xmm1     # 0xdaf8
addsd %xmm0, %xmm1
movsd 0x175c(%rip), %xmm0     # 0xdb40
xorl %ebp, %ebp
ucomisd %xmm1, %xmm0
setae %bpl
jmp 0xc3f3
pushq $0x2
popq %rbp
movups 0xaa36(%rip), %xmm0     # 0x16e30
movups %xmm0, 0xaa3f(%rip)     # 0x16e40
movups (%rsp), %xmm0
movups %xmm0, 0xaa24(%rip)     # 0x16e30
movq %rbx, %rdi
callq 0xcd34
movl %eax, %r14d
movq %rbx, %rdi
callq 0xcd58
movl %r14d, %edi
movl %eax, %esi
movl %ebp, %edx
callq 0x5c06
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/impact-eintr[P]st/x.c
// Function: brelease
void
brelease(XEvent *e)
{
	if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
		mousereport(e);
		return;
	}

	if (mouseaction(e, 1))
		return;
	if (e->xbutton.button == Button1)
		mousesel(e, 1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0xa989(%rip), %eax      # 0x16dc8
testw $0xc018, %ax            # imm = 0xC018
je 0xc454
testb $0x1, 0x50(%rbx)
jne 0xc454
movq %rbx, %rdi
popq %rbx
jmp 0xcb22
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xcca7
testl %eax, %eax
jne 0xc475
cmpl $0x1, 0x54(%rbx)
jne 0xc475
pushq $0x1
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0xcd97
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jani-nykanen[P]mushrooms/./tools/src/png2spr.c
// Function: write_array
static void write_array(FILE* f, u8* arr, u32 len) {
    
    u32 i;
    u32 count = 3;
    u8 bout = 0;

    for (i = 0; i < len; ++ i) {

        bout = bout | (arr[i] << (count*2));

        if (count -- == 0) {

            fwrite(&bout, 1, 1, f);
            bout = 0;
            count = 3;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
pushq $0x3
popq %r12
xorl %r13d, %r13d
xorl %eax, %eax
movl %r12d, %edx
cmpq %r13, %r15
je 0xc804
movzbl (%rbx,%r13), %esi
leal (%rdx,%rdx), %ecx
shll %cl, %esi
orb %sil, %al
subl $0x1, %edx
jae 0xc7ff
movsbl %al, %edi
movq %r14, %rsi
callq 0x10a0
xorl %eax, %eax
movl %r12d, %edx
incq %r13
jmp 0xc7d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka.c
// Function: help
void help(void)
{
    printf("%s\n", umkaGetVersion());
    printf("(C) Vasiliy Tereshkov, 2020-2025\n");
    printf("Usage: umka [<parameters>] <file.um> [<script-parameters>]\n");
    printf("Parameters:\n");
    printf("    -stack <stack-size>     - Set stack size\n");
    printf("    -asm                    - Write assembly listing\n");
    printf("    -check                  - Compile only\n");
    printf("    -warn                   - Enable warnings\n");
    printf("    -sandbox                - Run in sandbox mode\n");
}

// Assembly:
pushq %rax
callq 0x3fdc
movq %rax, %rdi
callq 0x30c0
leaq 0x62c40(%rip), %rdi     # 0x66131
callq 0x30c0
leaq 0x62c55(%rip), %rdi     # 0x66152
callq 0x30c0
leaq 0x62c84(%rip), %rdi     # 0x6618d
callq 0x30c0
leaq 0x62c84(%rip), %rdi     # 0x66199
callq 0x30c0
leaq 0x62ca5(%rip), %rdi     # 0x661c6
callq 0x30c0
leaq 0x62cce(%rip), %rdi     # 0x661fb
callq 0x30c0
leaq 0x62ced(%rip), %rdi     # 0x66226
callq 0x30c0
leaq 0x62d0f(%rip), %rdi     # 0x66254
popq %rax
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka.c
// Function: writeAsmFile
bool writeAsmFile(void *umka, const char *mainPath)
{
    bool ok = false;

    char *asmFileName = malloc(strlen(mainPath) + 4 + 1);
    if (!asmFileName)
        fprintf(stderr, "Error: Out of memory\n");
    else
    {
        sprintf(asmFileName, "%s.asm", mainPath);
        const char *asmBuf = umkaAsm(umka);
        if (!asmBuf)
            fprintf(stderr, "Error: Cannot output assembly listing\n");
        else
        {
            FILE *asmFile = fopen(asmFileName, "w");
            if (!asmFile)
                fprintf(stderr, "Error: Cannot open file %s\n", asmFileName);
            else
            {
                if (fwrite(asmBuf, strlen(asmBuf), 1, asmFile) != 1)
                    fprintf(stderr, "Error: Cannot write file %s\n", asmFileName);
                else
                    ok = true;
                fclose(asmFile);
            }
        }
        free(asmFileName);
    }

    return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3130
leaq 0x5(%rax), %rdi
callq 0x3290
testq %rax, %rax
je 0x35f4
movq %rax, %rbx
leaq 0x62a9e(%rip), %rsi     # 0x6601a
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3380
movq %r14, %rdi
callq 0x3e3d
testq %rax, %rax
je 0x3614
movq %rax, %r15
leaq 0x62ef5(%rip), %rsi     # 0x66495
movq %rbx, %rdi
callq 0x3320
testq %rax, %rax
je 0x3634
movq %rax, %r14
movq %r15, %rdi
callq 0x3130
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rcx
callq 0x3390
cmpq $0x1, %rax
sete %bpl
jne 0x3653
movq %r14, %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x779fd(%rip), %rax     # 0x7aff8
movq (%rax), %rcx
leaq 0x629ff(%rip), %rdi     # 0x66004
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x3390
xorl %ebp, %ebp
jmp 0x35e7
movq 0x779dd(%rip), %rax     # 0x7aff8
movq (%rax), %rcx
leaq 0x629fc(%rip), %rdi     # 0x66021
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x3390
xorl %ebp, %ebp
jmp 0x35df
movq 0x779bd(%rip), %rax     # 0x7aff8
movq (%rax), %rdi
leaq 0x62a03(%rip), %rsi     # 0x66048
xorl %ebp, %ebp
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3220
jmp 0x35df
movq 0x7799e(%rip), %rax     # 0x7aff8
movq (%rax), %rdi
leaq 0x62a00(%rip), %rsi     # 0x66064
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3220
jmp 0x35d7
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka.c
// Function: printRuntimeError
void printRuntimeError(void *umka)
{
    const UmkaError *error = umkaGetError(umka);

    if (error->msg[0])
    {
        fprintf(stderr, "\nRuntime error %s (%d): %s\n", error->fileName, error->line, error->msg);
        fprintf(stderr, "Stack trace:\n");

        for (int depth = 0; depth < MAX_CALL_STACK_DEPTH; depth++)
        {
            char fileName[MAX_STR_LENGTH + 1], fnName[MAX_STR_LENGTH + 1];
            int line;

            if (!umkaGetCallStack(umka, depth, MAX_STR_LENGTH + 1, NULL, fileName, fnName, &line))
                break;

            fprintf(stderr, "    %s: %s (%d)\n", fnName, fileName, line);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
callq 0x3e29
movq 0x20(%rax), %r8
cmpb $0x0, (%r8)
jne 0x36ff
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x778f2(%rip), %r13     # 0x7aff8
movq (%r13), %rdi
movq (%rax), %rdx
movl 0x10(%rax), %ecx
leaq 0x6299a(%rip), %rsi     # 0x660b1
xorl %eax, %eax
callq 0x3220
movq (%r13), %rcx
leaq 0x629a4(%rip), %rdi     # 0x660cd
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
callq 0x3390
leaq 0xc(%rsp), %r12
leaq 0x120(%rsp), %r14
leaq 0x10(%rsp), %r15
xorl %ebp, %ebp
cmpl $0xa, %ebp
je 0x36ed
movq %r12, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl $0x101, %edx            # imm = 0x101
xorl %ecx, %ecx
movq %r14, %r8
movq %r15, %r9
callq 0x3e51
testb %al, %al
je 0x36ed
movq (%r13), %rdi
movl 0xc(%rsp), %r8d
leaq 0x6295f(%rip), %rsi     # 0x660db
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3220
incl %ebp
jmp 0x3748
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: umkaInit
UMKA_API bool umkaInit(void *umka, const char *fileName, const char *sourceString, int stackSize, void *reserved, int argc, char **argv, bool fileSystemEnabled, bool implLibsEnabled, UmkaWarningCallback warningCallback)
{
    Compiler *comp = umka;
    memset(comp, 0, sizeof(Compiler));

    // First set error handlers
    comp->error.handler = compileError;
    comp->error.runtimeHandler = runtimeError;
    comp->error.warningHandler = compileWarning;
    comp->error.warningCallback = (WarningCallback)warningCallback;
    comp->error.context = comp;

    if (setjmp(comp->error.jumper) == 0)
    {
        compilerInit(comp, fileName, sourceString, stackSize, argc, argv, fileSystemEnabled, implLibsEnabled);
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x58(%rsp), %r13
movl $0x52d8, %edx           # imm = 0x52D8
xorl %esi, %esi
callq 0x3190
leaq 0x8b(%rip), %rax        # 0x3a82
movq %rax, 0x50f8(%r12)
leaq 0x154(%rip), %rax       # 0x3b5a
movq %rax, 0x5100(%r12)
leaq 0x22c(%rip), %rax       # 0x3c41
movq %rax, 0x5108(%r12)
movq %r13, 0x5110(%r12)
movq %r12, 0x5118(%r12)
leaq 0x5120(%r12), %rdi
callq 0x3200
movl %eax, %r13d
testl %eax, %eax
jne 0x3a6d
movb 0x48(%rsp), %al
movq 0x40(%rsp), %r9
movzbl 0x50(%rsp), %ecx
movzbl %al, %eax
movl %ecx, %r10d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
pushq %r10
pushq %rax
callq 0x4ca8
popq %rax
popq %rcx
testl %r13d, %r13d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq