LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: compileError
static void compileError(void *context, const char *format, ...)
{
    va_list args;
    va_start(args, format);

    Compiler *comp = context;
    errorReportInit(&comp->error.report, &comp->storage, comp->lex.fileName, comp->debug.fnName, comp->lex.tok.line, comp->lex.tok.pos, 1, format, args);

    vmKill(&comp->vm);

    va_end(args);
    longjmp(comp->error.jumper, 1);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x3ae0
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rax
movq %rsi, 0x10(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
movq %rcx, (%rax)
addq $0x51f0, %rdi           # imm = 0x51F0
leaq 0xf0(%rbx), %rsi
movq 0x4ba8(%rbx), %rdx
movq 0x50e8(%rbx), %rcx
movl 0x4ce0(%rbx), %r8d
movl 0x4ce4(%rbx), %r9d
subq $0x8, %rsp
pushq %rax
pushq %r10
pushq $0x1
callq 0x4064
addq $0x20, %rsp
leaq 0x5058(%rbx), %rdi
callq 0x39289
addq $0x5120, %rbx           # imm = 0x5120
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3300
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: runtimeError
static void runtimeError(void *context, int code, const char *format, ...)
{
    va_list args;
    va_start(args, format);

    Compiler *comp = context;
    const DebugInfo *debug = &comp->vm.fiber->debugPerInstr[comp->vm.fiber->ip];
    errorReportInit(&comp->error.report, &comp->storage, debug->fileName, debug->fnName, debug->line, 1, code, format, args);

    vmKill(&comp->vm);

    va_end(args);
    longjmp(comp->error.jumper, 1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r10
movl %esi, %r11d
movq %rdi, %rbx
leaq 0x20(%rsp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x3bba
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rax
movq %rdx, 0x10(%rax)
leaq 0xf0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movabsq $0x3000000018, %rcx     # imm = 0x3000000018
movq %rcx, (%rax)
leaq 0x5058(%rdi), %r14
movq 0x5058(%rdi), %rcx
movq 0x60(%rcx), %r8
movslq 0x8(%rcx), %rcx
imulq $0x18, %rcx, %r9
addq $0x51f0, %rdi           # imm = 0x51F0
leaq 0xf0(%rbx), %rsi
movq (%r8,%r9), %rdx
movq 0x8(%r8,%r9), %rcx
movl 0x10(%r8,%r9), %r8d
subq $0x8, %rsp
pushq $0x1
popq %rbp
movl %ebp, %r9d
pushq %rax
pushq %r10
pushq %r11
callq 0x4064
addq $0x20, %rsp
movq %r14, %rdi
callq 0x39289
addq $0x5120, %rbx           # imm = 0x5120
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3300
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: compileWarning
static void compileWarning(void *context, const DebugInfo *debug, const char *format, ...)
{
    va_list args;
    va_start(args, format);

    Compiler *comp = context;

    ErrorReport report = {0};
    errorReportInit(&report, &comp->storage,
                    debug ? debug->fileName : comp->lex.fileName,
                    debug ? debug->fnName : comp->debug.fnName,
                    debug ? debug->line : comp->lex.tok.line,
                    debug ? 1 : comp->lex.tok.pos,
                    0,
                    format, args);

    if (comp->error.warningCallback)
        ((UmkaWarningCallback)comp->error.warningCallback)((UmkaError *)&report);

    va_end(args);
}

// Assembly:
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %r10
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x50(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x3ca7
movaps %xmm0, 0x80(%rsp)
movaps %xmm1, 0x90(%rsp)
movaps %xmm2, 0xa0(%rsp)
movaps %xmm3, 0xb0(%rsp)
movaps %xmm4, 0xc0(%rsp)
movaps %xmm5, 0xd0(%rsp)
movaps %xmm6, 0xe0(%rsp)
movaps %xmm7, 0xf0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0xf0(%rdi), %rsi
leaq 0x4ba8(%rdi), %rax
leaq 0x8(%rdx), %rcx
addq $0x50e8, %rdi           # imm = 0x50E8
leaq 0x10(%rdx), %r8
testq %rdx, %rdx
cmovneq %rdx, %rax
leaq 0x4ce0(%rbx), %r9
movq (%rax), %rdx
cmovneq %rcx, %rdi
movq (%rdi), %rcx
cmovneq %r8, %r9
movl (%r9), %r8d
je 0x3d1e
pushq $0x1
popq %r9
jmp 0x3d25
movl 0x4ce4(%rbx), %r9d
subq $0x8, %rsp
leaq 0x8(%rsp), %rax
leaq 0x28(%rsp), %rdi
pushq %rax
pushq %r10
pushq $0x0
callq 0x4064
addq $0x20, %rsp
movq 0x5110(%rbx), %rax
testq %rax, %rax
je 0x3d54
leaq 0x20(%rsp), %rdi
callq *%rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: umkaRun
UMKA_API int umkaRun(void *umka)
{
    Compiler *comp = umka;

    if (setjmp(comp->error.jumper) == 0)
    {
        comp->error.jumperNesting++;
        compilerRun(comp);
        comp->error.jumperNesting--;
        return 0;
    }

    return comp->error.report.code;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x5120, %rdi           # imm = 0x5120
callq 0x3200
testl %eax, %eax
je 0x3da5
movl 0x5208(%rbx), %eax
jmp 0x3dbb
incl 0x51e8(%rbx)
movq %rbx, %rdi
callq 0x5e7c
decl 0x51e8(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: umkaCall
UMKA_API int umkaCall(void *umka, UmkaFuncContext *fn)
{
    Compiler *comp = umka;

    // Nested calls to umkaCall() should not reset the error jumper
    jmp_buf dummyJumper;
    jmp_buf *jumper = comp->error.jumperNesting == 0 ? &comp->error.jumper : &dummyJumper;

    if (setjmp(*jumper) == 0)
    {
        comp->error.jumperNesting++;
        compilerCall(comp, (FuncContext *)fn);
        comp->error.jumperNesting--;
        return 0;
    }

    return comp->error.report.code;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5120(%rdi), %rax
cmpl $0x0, 0x51e8(%rdi)
movq %rsp, %rdi
cmoveq %rax, %rdi
callq 0x3200
testl %eax, %eax
je 0x3df3
movl 0x5208(%rbx), %eax
jmp 0x3e0c
incl 0x51e8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e8a
decl 0x51e8(%rbx)
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_api.c
// Function: umkaGetCallStack
UMKA_API bool umkaGetCallStack(void *umka, int depth, int nameSize, int *offset, char *fileName, char *fnName, int *line)
{
    Compiler *comp = umka;
    Slot *base = comp->vm.fiber->base;
    int ip = comp->vm.fiber->ip;

    while (depth-- > 0)
        if (!vmUnwindCallStack(&comp->vm, &base, &ip))
            return false;

    if (offset)
        *offset = ip;

    if (fileName)
        snprintf(fileName, nameSize, "%s", comp->vm.fiber->debugPerInstr[ip].fileName);

    if (fnName)
        snprintf(fnName, nameSize, "%s", comp->vm.fiber->debugPerInstr[ip].fnName);

    if (line)
        *line = comp->vm.fiber->debugPerInstr[ip].line;

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, %r13
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq 0x5058(%rdi), %rax
addq $0x5058, %r14           # imm = 0x5058
movq 0x20(%rax), %rcx
leaq 0x20(%rsp), %r15
movq %rcx, (%r15)
movl 0x8(%rax), %eax
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
incl %ebx
decl %ebx
testl %ebx, %ebx
jle 0x3eb8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x395b7
testb %al, %al
jne 0x3e9b
jmp 0x3f4a
testq %r13, %r13
je 0x3ec5
movl 0xc(%rsp), %eax
movl %eax, (%r13)
movslq %ebp, %r13
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3ef7
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
imulq $0x18, %rcx, %rcx
movq (%rax,%rcx), %rcx
leaq 0x67e0a(%rip), %rdx     # 0x6bcf7
movq %r13, %rsi
xorl %eax, %eax
callq 0x3170
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3f27
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
imulq $0x18, %rcx, %rcx
movq 0x8(%rax,%rcx), %rcx
leaq 0x67dda(%rip), %rdx     # 0x6bcf7
movq %r13, %rsi
xorl %eax, %eax
callq 0x3170
cmpq $0x0, 0x60(%rsp)
je 0x3f4a
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
imulq $0x18, %rcx, %rcx
movl 0x10(%rax,%rcx), %eax
movq 0x60(%rsp), %rcx
movl %eax, (%rcx)
testl %ebx, %ebx
setle %al
addq $0x28, %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_common.c
// Function: storageAdd
void *storageAdd(Storage *storage, int64_t size)
{
    StorageChunk *chunk = malloc(sizeof(StorageChunk) + size);
    if (!chunk)
        storage->error->handler(storage->error->context, "Out of memory");

    chunk->prev = NULL;
    chunk->next = storage->first;
    chunk->size = size;
    memset(chunk->data, 0, size);

    if (storage->first)
        storage->first->prev = chunk;
    storage->first = chunk;

    return chunk->data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %rdi
callq 0x3290
movq %rax, %r14
movq %rax, %r12
testq %rax, %rax
jne 0x417a
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x62139(%rip), %rsi     # 0x662af
xorl %eax, %eax
callq *(%rcx)
andq $0x0, (%r12)
movq (%rbx), %r13
movq %r13, 0x8(%r12)
movq %r15, 0x10(%r12)
addq $0x18, %r14
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3190
testq %r13, %r13
je 0x41a6
movq %r12, (%r13)
movq %r12, (%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: storageFree
void storageFree(Storage *storage)
{
    while (storage->first)
    {
        StorageChunk *next = storage->first->next;
        free(storage->first);
        storage->first = next;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x41df
movq 0x8(%rdi), %r14
callq 0x3040
movq %r14, (%rbx)
movq %r14, %rdi
jmp 0x41c9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: storageAddStr
char *storageAddStr(Storage *storage, int64_t len)
{
    StrDimensions dims = {.len = len, .capacity = len + 1};

    char *dimsAndData = storageAdd(storage, sizeof(StrDimensions) + dims.capacity);
    *(StrDimensions *)dimsAndData = dims;

    char *data = dimsAndData + sizeof(StrDimensions);
    data[len] = 0;

    return data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x1(%rsi), %r14
addq $0x11, %rsi
callq 0x4144
movq %rbx, (%rax)
movq %r14, 0x8(%rax)
movb $0x0, 0x10(%rax,%rbx)
addq $0x10, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: storageAddDynArray
DynArray *storageAddDynArray(Storage *storage, const struct tagType *type, int64_t len)
{
    DynArray *array = storageAdd(storage, sizeof(DynArray));

    array->type     = type;
    array->itemSize = array->type->base->size;

    DynArrayDimensions dims = {.len = len, .capacity = 2 * (len + 1)};

    char *dimsAndData = storageAdd(storage, sizeof(DynArrayDimensions) + dims.capacity * array->itemSize);
    *(DynArrayDimensions *)dimsAndData = dims;

    array->data = dimsAndData + sizeof(DynArrayDimensions);
    return array;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x18
popq %rsi
callq 0x4144
movq %rax, %r12
movq %r14, (%rax)
movq 0x8(%r14), %rax
movslq 0xc0(%rax), %rsi
movq %rsi, 0x8(%r12)
leaq 0x2(,%rbx,2), %r14
imulq %r14, %rsi
addq $0x10, %rsi
movq %r15, %rdi
callq 0x4144
movq %rbx, (%rax)
movq %r14, 0x8(%rax)
addq $0x10, %rax
movq %rax, 0x10(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: storageRemove
void storageRemove(Storage *storage, void *data)
{
    StorageChunk *chunk = (StorageChunk *)((char *)data - sizeof(StorageChunk));

    if (chunk == storage->first)
        storage->first = chunk->next;

    if (chunk->prev)
        chunk->prev->next = chunk->next;

    if (chunk->next)
        chunk->next->prev = chunk->prev;

    free(chunk);
}

// Assembly:
movq %rdi, %rax
leaq -0x18(%rsi), %rdi
cmpq (%rax), %rdi
jne 0x428c
movq -0x10(%rsi), %rcx
movq %rcx, (%rax)
movq -0x18(%rsi), %rcx
movq -0x10(%rsi), %rax
testq %rcx, %rcx
je 0x429d
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x3040
movq (%rdi), %rcx
movq %rcx, (%rax)
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: storageRealloc
void *storageRealloc(Storage *storage, void *data, int64_t size)
{
    const StorageChunk *chunk = (const StorageChunk *)((char *)data - sizeof(StorageChunk));

    void *newData = storageAdd(storage, size);
    memcpy(newData, data, chunk->size);
    storageRemove(storage, data);

    return newData;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x4144
movq %rax, %r15
movq -0x8(%rbx), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3260
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4279
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: moduleInit
void moduleInit(Modules *modules, Storage *storage, bool implLibsEnabled, Error *error)
{
    for (int i = 0; i < MAX_MODULES; i++)
    {
        modules->module[i] = NULL;
        modules->moduleSource[i] = NULL;
    }
    modules->numModules = 0;
    modules->numModuleSources = 0;
    modules->implLibsEnabled = implLibsEnabled;
    modules->storage = storage;
    modules->error = error;

    if (!moduleCurFolder(modules->curFolder, DEFAULT_STR_LEN + 1))
        modules->error->handler(modules->error->context, "Cannot get current folder");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $-0x2000, %rax          # imm = 0xE000
testq %rax, %rax
je 0x4312
andq $0x0, 0x2000(%rbx,%rax)
andq $0x0, 0x4000(%rbx,%rax)
addq $0x8, %rax
jmp 0x42f5
andq $0x0, 0x4000(%rbx)
movb %dl, 0x4108(%rbx)
movq %rsi, 0x4110(%rbx)
movq %rcx, 0x4118(%rbx)
leaq 0x4008(%rbx), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x4360
testq %rax, %rax
je 0x4346
popq %rbx
retq
movq 0x4118(%rbx), %rax
movq (%rax), %rcx
movq 0x20(%rax), %rdi
leaq 0x61f62(%rip), %rsi     # 0x662bd
xorl %eax, %eax
popq %rbx
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: moduleCurFolder
char *moduleCurFolder(char *buf, int size)
{
#ifdef _WIN32
    if (GetCurrentDirectory(size, buf) == 0)
        return NULL;
#else
    if (!getcwd(buf, size))
        return NULL;
#endif

    int len = strlen(buf);

    if (len > 0 && (buf[len - 1] == '/' || buf[len - 1] == '\\'))
        return buf;

    if (len > size - 2)
        return NULL;

    buf[len] = '/';
    buf[len + 1] = 0;
    return buf;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %rsi
callq 0x31a0
testq %rax, %rax
je 0x439d
movq %rbx, %rdi
callq 0x3130
testl %eax, %eax
jle 0x4396
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addl %eax, %ecx
movzbl (%rbx,%rcx), %ecx
cmpl $0x2f, %ecx
je 0x43c1
cmpl $0x5c, %ecx
je 0x43c1
addl $-0x2, %ebp
cmpl %eax, %ebp
jge 0x43a1
xorl %ebx, %ebx
jmp 0x43c1
movq %rax, %rcx
shlq $0x20, %rcx
cltq
movb $0x2f, (%rbx,%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %rcx, %rax
incq %rax
sarq $0x20, %rax
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: moduleNameFromPath
void moduleNameFromPath(const Modules *modules, const char *path, char *folder, char *name, int size)
{
    const char *slash = strrchr(path, '/');
    const char *backslash = strrchr(path, '\\');

    if (backslash && (!slash || backslash > slash))
        slash = backslash;

    const char *start = slash ? (slash + 1) : path;

    const char *dot = strrchr(path, '.');
    const char *stop = dot ? dot : (path + strlen(path));

    if (stop <= start)
        modules->error->handler(modules->error->context, "Illegal module path %s", path);

    strncpy(folder, path, (start - path < size - 1) ? (start - path) : (size - 1));
    strncpy(name, start,  (stop - start < size - 1) ? (stop - start) : (size - 1));

    folder[size - 1] = 0;
    name[size - 1] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2f
popq %rsi
movq %r15, %rdi
callq 0x3180
movq %rax, %r12
pushq $0x5c
popq %rsi
movq %r15, %rdi
callq 0x3180
cmpq %r12, %rax
movq %r12, %rcx
cmovaq %rax, %rcx
testq %r12, %r12
cmoveq %rax, %rcx
testq %rax, %rax
cmoveq %r12, %rcx
leaq 0x1(%rcx), %r12
testq %rcx, %rcx
cmoveq %r15, %r12
pushq $0x2e
popq %rsi
movq %r15, %rdi
callq 0x3180
movq %rax, %r13
testq %rax, %rax
jne 0x4444
movq %r15, %rdi
callq 0x3130
movq %rax, %r13
addq %r15, %r13
subq %r12, %r13
ja 0x4462
movq 0x4118(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x61e7c(%rip), %rsi     # 0x662d7
movq %r15, %rdx
xorl %eax, %eax
callq *(%rcx)
movq %r12, %rdx
subq %r15, %rdx
movslq %ebp, %rbx
leaq -0x1(%rbx), %rbp
cmpq %rbp, %rdx
cmovgeq %rbp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3080
cmpq %rbp, %r13
cmovlq %r13, %rbp
movq (%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x3080
xorl %eax, %eax
movb %al, -0x1(%r14,%rbx)
movb %al, -0x1(%r15,%rbx)
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_common.c
// Function: moduleFind
int moduleFind(const Modules *modules, const char *path)
{
    const unsigned int pathHash = hash(path);
    for (int i = 0; i < modules->numModules; i++)
        if (modules->module[i]->pathHash == pathHash && strcmp(modules->module[i]->path, path) == 0)
            return i;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4515
movl %eax, %r15d
movslq 0x4000(%r14), %r13
xorl %r12d, %r12d
pushq $-0x1
popq %rbp
cmpq %r13, %r12
jge 0x4504
movq (%r14,%r12,8), %rdi
cmpl %r15d, 0x300(%rdi)
jne 0x44fc
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x4501
incq %r12
jmp 0x44de
movl %r12d, %ebp
movl %ebp, %eax
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_common.c
// Function: moduleFindImported
int moduleFindImported(const Modules *modules, const Blocks *blocks, const char *alias)
{
    for (int i = 0; i < modules->numModules; i++)
    {
        const char *importAlias = modules->module[blocks->module]->importAlias[i];
        if (importAlias && strcmp(importAlias, alias) == 0)
            return i;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq 0x4000(%rdi), %r13
xorl %r12d, %r12d
pushq $-0x1
popq %rbp
cmpq %r13, %r12
jge 0x457e
movslq 0x968(%r14), %rax
movq (%r15,%rax,8), %rax
movq 0x310(%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x4576
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x457b
incq %r12
jmp 0x454d
movl %r12d, %ebp
movl %ebp, %eax
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_common.c
// Function: moduleFindSource
const ModuleSource *moduleFindSource(const Modules *modules, const char *path)
{
    const unsigned int pathHash = hash(path);
    for (int i = 0; i < modules->numModuleSources; i++)
        if (modules->moduleSource[i]->pathHash == pathHash && strcmp(modules->moduleSource[i]->path, path) == 0)
            return modules->moduleSource[i];
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4515
movl %eax, %ebp
movslq 0x4004(%r14), %r12
xorl %r13d, %r13d
cmpq %r12, %r13
jge 0x481a
movq 0x2000(%r14,%r13,8), %r15
cmpl %ebp, 0x300(%r15)
jne 0x4815
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x481d
incq %r13
jmp 0x47f0
xorl %r15d, %r15d
movq %r15, %rax
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_common.c
// Function: moduleAddSource
void moduleAddSource(Modules *modules, const char *path, const char *source, bool trusted)
{
    if (modules->numModuleSources >= MAX_MODULES)
        modules->error->handler(modules->error->context, "Too many module sources");

    char folder[DEFAULT_STR_LEN + 1] = "";
    char name  [DEFAULT_STR_LEN + 1] = "";

    moduleNameFromPath(modules, path, folder, name, DEFAULT_STR_LEN + 1);

    ModuleSource *moduleSource = storageAdd(modules->storage, sizeof(ModuleSource));

    strncpy(moduleSource->path, path, DEFAULT_STR_LEN);
    moduleSource->path[DEFAULT_STR_LEN] = 0;

    strncpy(moduleSource->folder, folder, DEFAULT_STR_LEN);
    moduleSource->folder[DEFAULT_STR_LEN] = 0;

    strncpy(moduleSource->name, name, DEFAULT_STR_LEN);
    moduleSource->name[DEFAULT_STR_LEN] = 0;

    int sourceLen = strlen(source);
    moduleSource->source = storageAdd(modules->storage, sourceLen + 1);
    strcpy(moduleSource->source, source);

    moduleSource->pathHash = hash(path);
    moduleSource->trusted = trusted;

    modules->moduleSource[modules->numModuleSources++] = moduleSource;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %ecx, 0x4(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x400, 0x4004(%rdi)    # imm = 0x400
jl 0x4871
movq 0x4118(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x61ae0(%rip), %rsi     # 0x6634d
xorl %eax, %eax
callq *(%rcx)
leaq 0x110(%rsp), %r13
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x3190
leaq 0x10(%rsp), %rbp
movl $0x100, %edx            # imm = 0x100
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3190
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movl $0x100, %r8d            # imm = 0x100
callq 0x43cc
movq 0x4110(%rbx), %rdi
movl $0x318, %esi            # imm = 0x318
callq 0x4144
movq %rax, %r12
movl $0xff, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x3080
xorl %r15d, %r15d
movb %r15b, 0xff(%r12)
leaq 0x100(%r12), %rdi
movl $0xff, %edx
movq %r13, %rsi
callq 0x3080
movb %r15b, 0x1ff(%r12)
xorl %r15d, %r15d
leaq 0x200(%r12), %rdi
movl $0xff, %edx
movq %rbp, %rsi
callq 0x3080
movb %r15b, 0x2ff(%r12)
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3130
movq 0x4110(%rbx), %rdi
incl %eax
movslq %eax, %rsi
callq 0x4144
movq %rax, 0x308(%r12)
movq %rax, %rdi
movq %r15, %rsi
callq 0x30a0
movq %r14, %rdi
callq 0x4515
movl %eax, 0x300(%r12)
movl 0x4(%rsp), %eax
movb %al, 0x310(%r12)
movslq 0x4004(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x4004(%rbx)
movq %r12, 0x2000(%rbx,%rax,8)
addq $0x218, %rsp            # imm = 0x218
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_common.c
// Function: blocksEnterFn
void blocksEnterFn(Blocks *blocks, const struct tagIdent *fn, bool hasUpvalues)
{
    if (blocks->top >= MAX_BLOCK_NESTING)
        blocks->error->handler(blocks->error->context, "Block nesting is too deep");

    blocks->top++;
    blocks->item[blocks->top].block = blocks->numBlocks++;
    blocks->item[blocks->top].fn = fn;
    blocks->item[blocks->top].localVarSize = 0;
    blocks->item[blocks->top].hasReturn = false;
    blocks->item[blocks->top].hasUpvalues = hasUpvalues;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0x964(%rdi), %eax
cmpl $0x64, %eax
jl 0x4b51
movq 0x970(%r14), %rcx
movq 0x20(%rcx), %rdi
leaq 0x6183b(%rip), %rsi     # 0x66381
xorl %eax, %eax
callq *(%rcx)
movl 0x964(%r14), %eax
incl %eax
movl %eax, 0x964(%r14)
movl 0x960(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x960(%r14)
cltq
imulq $0x18, %rax, %rax
movl %ecx, (%r14,%rax)
movq %r15, 0x8(%r14,%rax)
andl $0x0, 0x10(%r14,%rax)
movb $0x0, 0x14(%r14,%rax)
movb %bl, 0x15(%r14,%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: externalFind
External *externalFind(const Externals *externals, const char *name)
{
    const unsigned int nameHash = hash(name);

    for (External *external = externals->first; external; external = external->next)
        if (external->hash == nameHash && strcmp(external->name, name) == 0)
            return external;

    return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4515
movl %eax, %ebp
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x4c20
cmpl %ebp, 0x100(%rbx)
jne 0x4c17
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3210
testl %eax, %eax
je 0x4c20
addq $0x118, %rbx            # imm = 0x118
jmp 0x4bf8
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_common.c
// Function: externalAdd
External *externalAdd(Externals *externals, const char *name, void *entry, bool resolveInTrusted)
{
    External *external = storageAdd(externals->storage, sizeof(External));

    external->entry = entry;
    external->resolved = false;
    external->resolveInTrusted = resolveInTrusted;

    strncpy(external->name, name, DEFAULT_STR_LEN);
    external->name[DEFAULT_STR_LEN] = 0;

    external->hash = hash(name);

    external->next = externals->first;
    externals->first = external;

    return external;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movl $0x120, %esi            # imm = 0x120
callq 0x4144
movq %rax, %r12
movq %r14, 0x108(%rax)
xorl %r14d, %r14d
movb %r14b, 0x110(%rax)
movb %bpl, 0x111(%rax)
movl $0xff, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3080
movb %r14b, 0xff(%r12)
movq %r15, %rdi
callq 0x4515
movl %eax, 0x100(%r12)
movq (%rbx), %rax
movq %rax, 0x118(%r12)
movq %r12, (%rbx)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_compiler.c
// Function: compilerAsm
char *compilerAsm(Compiler *comp)
{
    const int chars = genAsm(&comp->gen, NULL, 0);
    if (chars < 0)
        return NULL;

    char *buf = storageAdd(&comp->storage, chars + 1);
    genAsm(&comp->gen, buf, chars);
    buf[chars] = 0;
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
leaq 0x4e70(%rdi), %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xff14
testl %eax, %eax
js 0x5eea
movl %eax, %r15d
addq $0xf0, %r12
leal 0x1(%r15), %esi
movq %r12, %rdi
callq 0x4144
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0xff14
movl %r15d, %eax
movb $0x0, (%r14,%rax)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_compiler.c
// Function: compilerAddModule
bool compilerAddModule(Compiler *comp, const char *fileName, const char *sourceString)
{
    char modulePath[DEFAULT_STR_LEN + 1] = "";
    moduleAssertRegularizePath(&comp->modules, fileName, comp->modules.curFolder, modulePath, DEFAULT_STR_LEN + 1);

    if (moduleFindSource(&comp->modules, modulePath))
        return false;

    moduleAddSource(&comp->modules, modulePath, sourceString, false);
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rsp, %r13
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x3190
leaq 0x100(%r12), %r14
addq $0x4108, %r12           # imm = 0x4108
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movl $0x100, %r8d            # imm = 0x100
callq 0x4ab1
movq %r14, %rdi
movq %r13, %rsi
callq 0x47cb
movq %rax, %r15
testq %rax, %rax
jne 0x5f6d
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x482f
testq %r15, %r15
sete %al
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_compiler.c
// Function: compilerGetFunc
bool compilerGetFunc(Compiler *comp, const char *moduleName, const char *funcName, FuncContext *fn)
{
    int module = 1;
    if (moduleName)
    {
        char modulePath[DEFAULT_STR_LEN + 1] = "";
        moduleAssertRegularizePath(&comp->modules, moduleName, comp->modules.curFolder, modulePath, DEFAULT_STR_LEN + 1);
        module = moduleFind(&comp->modules, modulePath);
    }

    const Ident *fnIdent = identFind(&comp->idents, &comp->modules, &comp->blocks, module, funcName, NULL, false);
    if (!fnIdent || fnIdent->kind != IDENT_CONST || fnIdent->type->kind != TYPE_FN)
        return false;

    identSetUsed(fnIdent);

    compilerMakeFuncContext(comp, fnIdent->type, fnIdent->offset, fn);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x6035
movq %rsi, %r12
leaq 0x10(%rsp), %r13
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x3190
leaq 0x100(%r14), %rbp
leaq 0x4108(%r14), %rdx
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x100, %r8d            # imm = 0x100
callq 0x4ab1
movq %rbp, %rdi
movq %r13, %rsi
callq 0x44b5
movl %eax, %ecx
jmp 0x6038
pushq $0x1
popq %rcx
leaq 0x4e38(%r14), %rdi
leaq 0x100(%r14), %rsi
leaq 0x4220(%r14), %rdx
andl $0x0, (%rsp)
xorl %r12d, %r12d
movq %r15, %r8
xorl %r9d, %r9d
callq 0x101df
testq %rax, %rax
je 0x6095
cmpl $0x0, (%rax)
jne 0x6092
movq 0x108(%rax), %rsi
cmpl $0x1a, (%rsi)
jne 0x6092
movb $0x1, 0x11a(%rax)
movl 0x120(%rax), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x60aa
movb $0x1, %r12b
jmp 0x6095
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x118, %rsp            # imm = 0x118
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_compiler.c
// Function: compilerMakeFuncContext
void compilerMakeFuncContext(Compiler *comp, const Type *fnType, int entryOffset, FuncContext *fn)
{
    fn->entryOffset = entryOffset;

    int paramSlots = typeParamSizeTotal(&comp->types, &fnType->sig) / sizeof(Slot);
    fn->params = (Slot *)storageAdd(&comp->storage, (paramSlots + 4) * sizeof(Slot)) + 4;          // + 4 slots for compatibility with umkaGetParam()

    const ParamLayout *paramLayout = typeMakeParamLayout(&comp->types, &fnType->sig);
    fn->params[-4].ptrVal = (ParamLayout *)paramLayout;

    fn->result = storageAdd(&comp->storage, sizeof(Slot));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movslq %edx, %rax
movq %rax, (%rcx)
leaq 0x4e18(%rdi), %r12
addq $0x28, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x15f26
sarl $0x3, %eax
addq $0xf0, %r14
cltq
leaq 0x20(,%rax,8), %rsi
movq %r14, %rdi
callq 0x4144
addq $0x20, %rax
movq %rax, 0x8(%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x15f55
movq 0x8(%rbx), %rcx
movq %rax, -0x20(%rcx)
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x4144
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_const.c
// Function: constArrayAlloc
void constArrayAlloc(ConstArray *array, Storage *storage, const Type *type)
{
    array->storage = storage;
    array->type = type;
    array->len = 0;
    array->capacity = 4;
    array->data = storageAdd(array->storage, array->capacity * sizeof(Const));
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x10(%rdi)
movabsq $0x400000000, %rcx      # imm = 0x400000000
movq %rcx, 0x18(%rdi)
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x4144
movq %rax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_const.c
// Function: constArrayAppend
void constArrayAppend(ConstArray *array, Const val)
{
    if (array->len == array->capacity)
    {
        array->capacity *= 2;
        array->data = storageRealloc(array->storage, array->data, array->capacity * sizeof(Const));
    }
    array->data[array->len++] = val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x18(%rdi), %ecx
cmpl 0x1c(%rdi), %ecx
jne 0x6d42
movslq %ecx, %rdx
addl %ecx, %ecx
movl %ecx, 0x1c(%r14)
movq (%r14), %rdi
movq 0x8(%r14), %rsi
shlq $0x4, %rdx
callq 0x42b1
movq %rax, 0x8(%r14)
movl 0x18(%r14), %ecx
jmp 0x6d46
movq 0x8(%r14), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x18(%r14)
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_const.c
// Function: constArrayFind
int constArrayFind(const Consts *consts, const ConstArray *array, Const val)
{
    for (int i = 0; i < array->len; i++)
    {
        Const result = array->data[i];
        constBinary(consts, &result, &val, TOK_EQEQ, array->type);
        if (result.intVal)
            return i;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %rdx, (%r15)
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
pushq $0x2e
popq %r13
movslq 0x18(%rbx), %rax
cmpq %rax, %rbp
jge 0x6dbb
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %r8
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x63f5
cmpq $0x0, 0x8(%rsp)
jne 0x6dc0
incq %rbp
jmp 0x6d83
pushq $-0x1
popq %rax
jmp 0x6dc2
movl %ebp, %eax
addq $0x18, %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_decl.c
// Function: parseStructType
static const Type *parseStructType(Compiler *comp)
{
    lexEat(&comp->lex, TOK_STRUCT);
    lexEat(&comp->lex, TOK_LBRACE);

    Type *type = typeAdd(&comp->types, &comp->blocks, TYPE_STRUCT);

    while (comp->lex.tok.kind == TOK_IDENT)
    {
        IdentName fieldNames[MAX_IDENTS_IN_LIST];
        bool fieldExported[MAX_IDENTS_IN_LIST];
        const Type *fieldType = NULL;
        int numFields = 0;
        parseTypedIdentList(comp, fieldNames, fieldExported, MAX_IDENTS_IN_LIST, &numFields, &fieldType, false);

        for (int i = 0; i < numFields; i++)
        {
            typeAddField(&comp->types, type, fieldType, fieldNames[i]);
            if (fieldExported[i])
                comp->error.handler(comp->error.context, "Field %s cannot be exported", fieldNames[i]);
        }

        lexEat(&comp->lex, TOK_SEMICOLON);
    }
    lexEat(&comp->lex, TOK_RBRACE);
    return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10138, %rsp          # imm = 0x10138
movq %rdi, %r14
leaq 0x4ba8(%rdi), %rbx
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x118d3
pushq $0x3c
popq %rsi
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x118d3
leaq 0x4e18(%r14), %r15
leaq 0x4220(%r14), %rsi
pushq $0x16
popq %rdx
movq %r15, %rdi
callq 0x14da9
movq %rax, %r12
movq %r14, 0x20(%rsp)
cmpl $0x45, 0x4bd0(%r14)
jne 0x77cf
andq $0x0, 0x28(%rsp)
andl $0x0, 0x14(%rsp)
andl $0x0, (%rsp)
movq %r14, %rdi
leaq 0x130(%rsp), %r13
movq %r13, %rsi
leaq 0x30(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
leaq 0x14(%rsp), %r8
leaq 0x28(%rsp), %r9
callq 0x8091
movslq 0x14(%rsp), %rbp
movq 0x28(%rsp), %rbx
xorl %r14d, %r14d
cmpq %rbp, %r14
jge 0x77b8
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x159f0
cmpb $0x1, 0x30(%rsp,%r14)
jne 0x77ac
movq 0x20(%rsp), %rcx
movq 0x5118(%rcx), %rdi
leaq 0x62a99(%rip), %rsi     # 0x6a23a
movq %r13, %rdx
xorl %eax, %eax
callq *0x50f8(%rcx)
incq %r14
addq $0x100, %r13            # imm = 0x100
jmp 0x7770
movq 0x18(%rsp), %rdi
pushq $0x40
popq %rsi
callq 0x118d3
movq 0x20(%rsp), %r14
jmp 0x771f
pushq $0x3d
popq %rsi
movq 0x18(%rsp), %rdi
callq 0x118d3
movq %r12, %rax
addq $0x10138, %rsp          # imm = 0x10138
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_decl.c
// Function: parseShortVarDecl
void parseShortVarDecl(Compiler *comp)
{
    IdentName varNames[MAX_IDENTS_IN_LIST];
    bool varExported[MAX_IDENTS_IN_LIST];
    int numVars = 0;
    parseIdentList(comp, varNames, varExported, MAX_IDENTS_IN_LIST, &numVars);

    lexEat(&comp->lex, TOK_COLONEQ);
    parseDeclAssignmentStmt(comp, varNames, varExported, numVars, comp->blocks.top == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10118, %rsp          # imm = 0x10118
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
leaq 0x110(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
movl $0x100, %ecx            # imm = 0x100
movq %r14, %r8
callq 0x7868
leaq 0x4ba8(%rbx), %rdi
pushq $0x37
popq %rsi
callq 0x118d3
movl (%r14), %ecx
xorl %r8d, %r8d
cmpl $0x0, 0x4b84(%rbx)
sete %r8b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x12b7b
addq $0x10118, %rsp          # imm = 0x10118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseIdentList
static void parseIdentList(Compiler *comp, IdentName *names, bool *exported, int capacity, int *num)
{
    *num = 0;
    while (1)
    {
        lexCheck(&comp->lex, TOK_IDENT);

        if (*num >= capacity)
            comp->error.handler(comp->error.context, "Too many identifiers");
        strcpy(names[*num], comp->lex.tok.name);

        lexNext(&comp->lex);
        exported[*num] = parseExportMark(comp);
        (*num)++;

        if (comp->lex.tok.kind != TOK_COMMA)
            break;
        lexNext(&comp->lex);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, 0x4(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
andl $0x0, (%r8)
leaq 0x4ba8(%rdi), %r13
leaq 0x4bd8(%rdi), %rbp
movq %r13, %rdi
pushq $0x45
popq %rsi
callq 0x1187f
movl (%rbx), %eax
cmpl 0x4(%rsp), %eax
jl 0x78c3
movq 0x5118(%r12), %rdi
leaq 0x62afc(%rip), %rsi     # 0x6a3b3
xorl %eax, %eax
callq *0x50f8(%r12)
movl (%rbx), %eax
movslq %eax, %rdi
shlq $0x8, %rdi
addq %r15, %rdi
movq %rbp, %rsi
callq 0x30a0
movq %r13, %rdi
callq 0x10f6e
movq %r12, %rdi
callq 0x848a
movslq (%rbx), %rcx
movb %al, (%r14,%rcx)
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
cmpl $0x3f, 0x4bd0(%r12)
jne 0x7906
movq %r13, %rdi
callq 0x10f6e
jmp 0x7895
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_decl.c
// Function: parseProgram
void parseProgram(Compiler *comp)
{
    // Entry point stub
    genNop(&comp->gen);

    lexNext(&comp->lex);
    int mainModule = parseModule(comp);

    // Entry point
    genEntryPoint(&comp->gen, 0);

    const Ident *mainFn = identFind(&comp->idents, &comp->modules, &comp->blocks, mainModule, "main", NULL, false);
    if (mainFn && identIsMain(mainFn))
    {
        genPushZero(&comp->gen, sizeof(Interface) / sizeof(Slot));  // Dummy upvalue
        genCall(&comp->gen, mainFn->offset);
    }

    doGarbageCollection(comp);
    genHalt(&comp->gen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x4e70(%rdi), %rbx
movq %rbx, %rdi
callq 0xe9cf
leaq 0x4ba8(%r14), %rdi
callq 0x10f6e
movq %r14, %rdi
callq 0x7e2f
movl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0xfd33
leaq 0x4e38(%r14), %rdi
leaq 0x100(%r14), %rsi
leaq 0x4220(%r14), %rdx
andl $0x0, (%rsp)
leaq 0x623b7(%rip), %r8      # 0x6a194
movl %ebp, %ecx
xorl %r9d, %r9d
callq 0x101df
testq %rax, %rax
je 0x7e15
movq %rax, %r15
movq %rax, %rdi
callq 0x10cad
testb %al, %al
je 0x7e15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xecc1
movl 0x120(%r15), %esi
movq %rbx, %rdi
callq 0xf6a8
movq %r14, %rdi
callq 0x12350
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf99c
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseModule
static int parseModule(Compiler *comp)
{
    comp->blocks.module = moduleAdd(&comp->modules, comp->lex.fileName);

    if (comp->lex.tok.kind == TOK_IMPORT)
    {
        parseImport(comp);
        lexEat(&comp->lex, TOK_SEMICOLON);
    }
    parseDecls(comp);
    doResolveExtern(comp);

    comp->modules.module[comp->blocks.module]->isCompiled = true;
    return comp->blocks.module;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x100, %rdi            # imm = 0x100
leaq 0x4ba8(%rbx), %r14
movq 0x4ba8(%rbx), %rsi
callq 0x458f
movl %eax, 0x4b88(%rbx)
cmpl $0xa, 0x4bd0(%rbx)
jne 0x7ec2
pushq $0xa
popq %rsi
movq %r14, %rdi
callq 0x118d3
cmpl $0x38, 0x4bd0(%rbx)
jne 0x7ea2
movq %r14, %rdi
callq 0x10f6e
pushq $0x40
popq %rbp
movl 0x4bd0(%rbx), %eax
cmpl $0x49, %eax
je 0x7e8e
cmpl $0x45, %eax
jne 0x7eac
movq %rbx, %rdi
callq 0x88cc
movq %r14, %rdi
movl %ebp, %esi
callq 0x118d3
jmp 0x7e7e
movq %rbx, %rdi
callq 0x88cc
jmp 0x7eb7
pushq $0x39
popq %rsi
movq %r14, %rdi
callq 0x118d3
pushq $0x40
popq %rsi
movq %r14, %rdi
callq 0x118d3
movq %rbx, %rdi
callq 0x7915
cmpl $0x4c, 0x4bd0(%rbx)
jne 0x7eb7
movq %rbx, %rdi
callq 0x12533
movslq 0x4b88(%rbx), %rax
movq 0x100(%rbx,%rax,8), %rcx
movb $0x1, 0x2310(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseTypeOrForwardType
static const Type *parseTypeOrForwardType(Compiler *comp)
{
    const Type *type = NULL;

    // Forward declaration?
    bool forward = false;
    if (comp->types.forwardTypesEnabled && comp->lex.tok.kind == TOK_IDENT)
    {
        const Ident *ident = NULL;

        Lexer lookaheadLex = comp->lex;
        lexNext(&lookaheadLex);
        if (lookaheadLex.tok.kind == TOK_COLONCOLON)
            ident = identFindModule(&comp->idents, &comp->modules, &comp->blocks, comp->blocks.module, comp->lex.tok.name, true);
        else
            ident = identFind(&comp->idents, &comp->modules, &comp->blocks, comp->blocks.module, comp->lex.tok.name, NULL, true);

        if (!ident)
        {
            Type *forwardType = typeAdd(&comp->types, &comp->blocks, TYPE_FORWARD);
            forwardType->typeIdent = identAddType(&comp->idents, &comp->modules, &comp->blocks, comp->lex.tok.name, forwardType, false);
            identSetUsed(forwardType->typeIdent);

            lexNext(&comp->lex);

            type = forwardType;
            forward = true;
        }
    }

    // Conventional declaration
    if (!forward)
        type = parseType(comp, NULL);

    return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rdi, %r14
cmpb $0x1, 0x4e20(%rdi)
jne 0x7fab
cmpl $0x45, 0x4bd0(%r14)
jne 0x7fab
leaq 0x4ba8(%r14), %rsi
leaq 0x18(%rsp), %rbx
movl $0x270, %edx            # imm = 0x270
movq %rbx, %rdi
movq %rsi, 0x10(%rsp)
callq 0x3260
movq %rbx, %rdi
callq 0x10f6e
leaq 0x4e38(%r14), %r15
leaq 0x100(%r14), %r12
leaq 0x4220(%r14), %r13
leaq 0x4bd8(%r14), %rbp
cmpl $0x42, 0x28(%rbx)
movl 0x4b88(%r14), %ecx
jne 0x7f8b
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
callq 0x1042c
jmp 0x7fa6
movl $0x1, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0x101df
testq %rax, %rax
je 0x7fcd
movq %r14, %rdi
xorl %esi, %esi
callq 0x6e28
movq %rax, %r14
movq %r14, %rax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x4e18, %r14           # imm = 0x4E18
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x14da9
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x1092e
movq %rax, 0x18(%r14)
movb $0x1, 0x11a(%rax)
movq 0x10(%rsp), %rdi
callq 0x10f6e
jmp 0x7fb8
// File: /workspace/github_c_makefile_star2_O2/vtereshkov[P]umka-lang/src/umka_types.h
// Function: typeConvOverflow
static inline bool typeConvOverflow(TypeKind destTypeKind, TypeKind srcTypeKind, Const val)
{
    const bool fromVeryBigUInt = val.intVal < 0 && srcTypeKind == TYPE_UINT;
    const bool fromNegativeInt = val.intVal < 0 && typeKindSigned(srcTypeKind);

    switch (destTypeKind)
    {
        case TYPE_VOID:     return true;
        case TYPE_INT8:     return val.intVal  < -128            || val.intVal  > 127        || fromVeryBigUInt;
        case TYPE_INT16:    return val.intVal  < -32768          || val.intVal  > 32767      || fromVeryBigUInt;
        case TYPE_INT32:    return val.intVal  < -2147483647 - 1 || val.intVal  > 2147483647 || fromVeryBigUInt;
        case TYPE_INT:      return fromVeryBigUInt;
        case TYPE_UINT8:    return val.intVal  < 0               || val.intVal  > 255;
        case TYPE_UINT16:   return val.intVal  < 0               || val.intVal  > 65535;
        case TYPE_UINT32:   return val.intVal  < 0               || val.intVal  > 4294967295;
        case TYPE_UINT:     return fromNegativeInt;
        case TYPE_BOOL:     return val.intVal  < 0               || val.intVal  > 1;
        case TYPE_CHAR:     return val.intVal  < 0               || val.intVal  > 255;
        case TYPE_REAL32:   return val.realVal < -FLT_MAX        || val.realVal > FLT_MAX;
        case TYPE_REAL:     return val.realVal < -DBL_MAX        || val.realVal > DBL_MAX;
        case TYPE_PTR:
        case TYPE_WEAKPTR:
        case TYPE_STR:
        case TYPE_ARRAY:
        case TYPE_DYNARRAY:
        case TYPE_MAP:
        case TYPE_STRUCT:
        case TYPE_INTERFACE:
        case TYPE_CLOSURE:
        case TYPE_FIBER:
        case TYPE_FN:       return false;
        default:            return true;
    }
}

// Assembly:
testq %rdx, %rdx
sets %cl
cmpl $0xb, %esi
sete %al
addl $-0x4, %edi
cmpl $0x16, %edi
ja 0x3d329
andb %cl, %al
leaq 0x2fcf9(%rip), %rcx     # 0x6cfa0
movslq (%rcx,%rdi,4), %rdi
addq %rcx, %rdi
jmpq *%rdi
xorl %eax, %eax
retq
cmpq $0x100, %rdx            # imm = 0x100
jmp 0x3d2fd
btrq $0x3f, %rdx
movq %rdx, %xmm0
ucomisd 0x2cd22(%rip), %xmm0    # 0x69ff0
jmp 0x3d313
cmpq $0x2, %rdx
jmp 0x3d2fd
movslq %edx, %rcx
jmp 0x3d2ed
shrq $0x20, %rdx
setne %al
retq
movsbq %dl, %rcx
jmp 0x3d2ed
movswq %dx, %rcx
cmpq %rdx, %rcx
setne %cl
orb %cl, %al
retq
cmpq $0x10000, %rdx          # imm = 0x10000
setae %al
retq
btrq $0x3f, %rdx
movq %rdx, %xmm0
ucomisd 0x2cce5(%rip), %xmm0    # 0x69ff8
seta %al
retq
testq %rdx, %rdx
sets %cl
andl $-0x4, %esi
cmpl $0x4, %esi
sete %al
andb %cl, %al
retq
movb $0x1, %al
retq