LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x821e
movq 0x4118(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x6a133(%rip), %rsi     # 0x7234d
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 0x7d04
movq 0x4110(%rbx), %rdi
movl $0x318, %esi            # imm = 0x318
callq 0x7a70
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 0x7a70
movq %rax, 0x308(%r12)
movq %rax, %rdi
movq %r15, %rsi
callq 0x30a0
movb (%r14), %cl
testb %cl, %cl
je 0x8324
incq %r14
movl $0x1505, %eax           # imm = 0x1505
movl %eax, %edx
shll $0x5, %edx
addl %eax, %edx
movsbl %cl, %eax
addl %edx, %eax
movb (%r14), %cl
incq %r14
testb %cl, %cl
jne 0x830c
jmp 0x8329
movl $0x1505, %eax           # imm = 0x1505
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_O3/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 0x8541
movq 0x970(%r14), %rcx
movq 0x20(%rcx), %rdi
leaq 0x69e4b(%rip), %rsi     # 0x72381
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
leaq (%rax,%rax,2), %rax
movl %ecx, (%r14,%rax,8)
movq %r15, 0x8(%r14,%rax,8)
movl $0x0, 0x10(%r14,%rax,8)
movb $0x0, 0x14(%r14,%rax,8)
movb %bl, 0x15(%r14,%rax,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movb (%rsi), %al
testb %al, %al
je 0x8607
leaq 0x1(%rbx), %rcx
movl $0x1505, %ebp           # imm = 0x1505
movl %ebp, %edx
shll $0x5, %edx
addl %ebp, %edx
movsbl %al, %ebp
addl %edx, %ebp
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x85f0
jmp 0x860c
movl $0x1505, %ebp           # imm = 0x1505
movq (%rdi), %r14
testq %r14, %r14
je 0x8635
cmpl %ebp, 0x100(%r14)
jne 0x862c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x8638
movq 0x118(%r14), %r14
jmp 0x860f
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movl $0x120, %esi            # imm = 0x120
callq 0x7a70
movq %rax, %r14
movq %r12, 0x108(%rax)
xorl %r12d, %r12d
movb %r12b, 0x110(%rax)
movb %bpl, 0x111(%rax)
movl $0xff, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3080
movb %r12b, 0xff(%r14)
movb (%r15), %cl
testb %cl, %cl
je 0x86ba
incq %r15
movl $0x1505, %eax           # imm = 0x1505
movl %eax, %edx
shll $0x5, %edx
addl %eax, %edx
movsbl %cl, %eax
addl %edx, %eax
movb (%r15), %cl
incq %r15
testb %cl, %cl
jne 0x86a2
jmp 0x86bf
movl $0x1505, %eax           # imm = 0x1505
movl %eax, 0x100(%r14)
movq (%rbx), %rax
movq %rax, 0x118(%r14)
movq %r14, (%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x147a0
testl %eax, %eax
js 0x9a08
movl %eax, %r15d
addq $0xf0, %r12
leal 0x1(%r15), %esi
movq %r12, %rdi
callq 0x7a70
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
callq 0x147a0
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_O3/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 0x849a
movq %r14, %rdi
movq %r13, %rsi
callq 0x8154
movq %rax, %r15
testq %rax, %rax
jne 0x9a8b
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x81dc
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_O3/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 0x9b53
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 0x849a
movq %rbp, %rdi
movq %r13, %rsi
callq 0x7df3
movl %eax, %ecx
jmp 0x9b58
movl $0x1, %ecx
leaq 0x4e38(%r14), %rdi
leaq 0x100(%r14), %rsi
leaq 0x4220(%r14), %rdx
movl $0x0, (%rsp)
xorl %r12d, %r12d
movq %r15, %r8
xorl %r9d, %r9d
callq 0x14a71
testq %rax, %rax
je 0x9bb8
cmpl $0x0, (%rax)
jne 0x9bb5
movq 0x108(%rax), %rsi
cmpl $0x1a, (%rsi)
jne 0x9bb5
movb $0x1, 0x11a(%rax)
movl 0x120(%rax), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x9bcd
movb $0x1, %r12b
jmp 0x9bb8
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_O3/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 0x1ac9d
sarl $0x3, %eax
addq $0xf0, %r14
cltq
leaq 0x20(,%rax,8), %rsi
movq %r14, %rdi
callq 0x7a70
addq $0x20, %rax
movq %rax, 0x8(%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1acd0
movq 0x8(%rbx), %rcx
movq %rax, -0x20(%rcx)
movl $0x8, %esi
movq %r14, %rdi
callq 0x7a70
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_const.c
// Function: constUnary
void constUnary(const Consts *consts, Const *arg, TokenKind op, const Type *type)
{
    if (typeReal(type))
    {
        switch (op)
        {
            case TOK_PLUS:  break;
            case TOK_MINUS: arg->realVal = -arg->realVal; break;

            default:        consts->error->handler(consts->error->context, "Illegal operator");
        }
    }
    else
    {
        switch (op)
        {
            case TOK_PLUS:  break;
            case TOK_MINUS: arg->intVal = -arg->intVal; break;
            case TOK_NOT:   arg->intVal = !arg->intVal; break;
            case TOK_XOR:   arg->intVal = ~arg->intVal; break;

            default:        consts->error->handler(consts->error->context, "Illegal operator");
        }
    }
}

// Assembly:
movl (%rcx), %eax
andl $-0x2, %eax
cmpl $0xe, %eax
jne 0x9edb
cmpl $0x16, %edx
je 0x9f1d
cmpl $0x17, %edx
jne 0x9f05
movsd (%rsi), %xmm0
xorps 0x6c0e9(%rip), %xmm0    # 0x75fc0
movlps %xmm0, (%rsi)
retq
cmpl $0x1c, %edx
jg 0x9eee
cmpl $0x16, %edx
je 0x9f1d
cmpl $0x17, %edx
jne 0x9f05
negq (%rsi)
retq
cmpl $0x1d, %edx
je 0x9f1a
cmpl $0x33, %edx
jne 0x9f05
xorl %eax, %eax
cmpq $0x0, (%rsi)
sete %al
movq %rax, (%rsi)
retq
movq (%rdi), %rax
movq (%rax), %rcx
movq 0x20(%rax), %rdi
leaq 0x6c124(%rip), %rsi     # 0x7603a
xorl %eax, %eax
jmpq *%rcx
notq (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/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)
movl $0x20, %esi
movq %rax, %rdi
callq 0x7a70
movq %rax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa85f
movslq %ecx, %rdx
addl %ecx, %ecx
movl %ecx, 0x1c(%r14)
movq (%r14), %rdi
movq 0x8(%r14), %rsi
shlq $0x4, %rdx
callq 0x7be8
movq %rax, 0x8(%r14)
movl 0x18(%r14), %ecx
jmp 0xa863
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_O3/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 %rdx, 0x10(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, 0x18(%rsi)
jle 0xa8e5
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x8(%r14), %rax
movq (%rax,%rbp,8), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%r14), %r8
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x2e, %ecx
callq 0x9f1e
cmpq $0x0, 0x8(%rsp)
jne 0xa8e3
incq %rbp
movslq 0x18(%r14), %rax
cmpq %rax, %rbp
jl 0xa8a9
jmp 0xa8e5
movl %ebp, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x10128, %rsp          # imm = 0x10128
movq %rdi, %r14
leaq 0x4ba8(%rdi), %rbx
movq %rbx, %rdi
movl $0x11, %esi
callq 0x1637d
movq %rbx, %rdi
movl $0x3c, %esi
callq 0x1637d
leaq 0x4e18(%r14), %rdi
leaq 0x4220(%r14), %rsi
movq %rdi, %r12
movl $0x16, %edx
callq 0x19a70
movq %rax, 0x10(%rsp)
cmpl $0x45, 0x4bd0(%r14)
jne 0xb3f1
movq %rbx, 0x18(%rsp)
movl $0x0, 0xc(%rsp)
movq %r14, %rdi
leaq 0x120(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movl $0x100, %ecx            # imm = 0x100
leaq 0xc(%rsp), %r8
callq 0xb491
movq %rbx, %rdi
movl $0x41, %esi
callq 0x1637d
movq %r14, %rdi
xorl %esi, %esi
callq 0xa954
movslq 0xc(%rsp), %rbp
testq %rbp, %rbp
jle 0xb3d1
movq %rax, %r13
leaq 0x120(%rsp), %rbx
xorl %r15d, %r15d
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x1a697
cmpb $0x1, 0x20(%rsp,%r15)
jne 0xb3c2
movq 0x5118(%r14), %rdi
leaq 0x6aee0(%rip), %rsi     # 0x76296
movq %rbx, %rdx
xorl %eax, %eax
callq *0x50f8(%r14)
incq %r15
addq $0x100, %rbx            # imm = 0x100
cmpq %r15, %rbp
jne 0xb38d
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movl $0x40, %esi
callq 0x1637d
cmpl $0x45, 0x4bd0(%r14)
je 0xb337
movq %rbx, %rdi
movl $0x3d, %esi
callq 0x1637d
movq 0x10(%rsp), %rax
addq $0x10128, %rsp          # imm = 0x10128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $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 0xb491
leaq 0x4ba8(%rbx), %rdi
movl $0x37, %esi
callq 0x1637d
movl (%r14), %ecx
xorl %r8d, %r8d
cmpl $0x0, 0x4b84(%rbx)
sete %r8b
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x17709
addq $0x10118, %rsp          # imm = 0x10118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, 0xc(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %r12
movl $0x0, (%r8)
leaq 0x4ba8(%rdi), %r13
leaq 0x4bd8(%rdi), %rbp
movq %r13, %rdi
movl $0x45, %esi
callq 0x16329
movl (%rbx), %eax
cmpl 0xc(%rsp), %eax
jl 0xb4f6
movq 0x5118(%r12), %rdi
leaq 0x6af25(%rip), %rsi     # 0x7640f
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 0x15914
movl 0x4bd0(%r12), %r14d
cmpl $0x18, %r14d
jne 0xb526
movq %r13, %rdi
callq 0x162fb
cmpl $0x18, %r14d
movslq (%rbx), %rax
movq 0x10(%rsp), %rcx
sete (%rcx,%rax)
incl %eax
movl %eax, (%rbx)
cmpl $0x3f, 0x4bd0(%r12)
jne 0xb552
movq %r13, %rdi
callq 0x15914
jmp 0xb4c6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x12e1b
leaq 0x4ba8(%r14), %rdi
callq 0x15914
movq %r14, %rdi
callq 0xbad0
movl %eax, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x14570
leaq 0x4e38(%r14), %rdi
leaq 0x100(%r14), %rsi
leaq 0x4220(%r14), %rdx
movl $0x0, (%rsp)
leaq 0x6a774(%rip), %r8      # 0x761f0
movl %ebp, %ecx
xorl %r9d, %r9d
callq 0x14a71
testq %rax, %rax
je 0xbab6
movq %rax, %r15
movq %rax, %rdi
callq 0x1563b
testb %al, %al
je 0xbab6
movq %rbx, %rdi
movl $0x2, %esi
callq 0x13154
movl 0x120(%r15), %esi
movq %rbx, %rdi
callq 0x13c0c
movq %r14, %rdi
callq 0x16e84
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13f28
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x100, %rdi            # imm = 0x100
leaq 0x4ba8(%rbx), %r14
movq 0x4ba8(%rbx), %rsi
callq 0x7edd
movl %eax, 0x4b88(%rbx)
cmpl $0xa, 0x4bd0(%rbx)
jne 0xbb69
movq %r14, %rdi
movl $0xa, %esi
callq 0x1637d
cmpl $0x38, 0x4bd0(%rbx)
jne 0xbb45
movq %r14, %rdi
callq 0x15914
movl 0x4bd0(%rbx), %eax
cmpl $0x49, %eax
je 0xbb2e
cmpl $0x45, %eax
jne 0xbb4f
movq %rbx, %rdi
callq 0xc612
movq %r14, %rdi
movl $0x40, %esi
callq 0x1637d
jmp 0xbb1e
movq %rbx, %rdi
callq 0xc612
jmp 0xbb5c
movq %r14, %rdi
movl $0x39, %esi
callq 0x1637d
movq %r14, %rdi
movl $0x40, %esi
callq 0x1637d
movq %rbx, %rdi
callq 0xb561
cmpl $0x4c, 0x4bd0(%rbx)
jne 0xbb5c
movq %rbx, %rdi
callq 0x1707e
movslq 0x4b88(%rbx), %rax
movq 0x100(%rbx,%rax,8), %rcx
movb $0x1, 0x2310(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xbc57
cmpl $0x45, 0x4bd0(%r14)
jne 0xbc57
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 0x15914
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 0xbc37
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
movl $0x1, %r9d
callq 0x14cb6
jmp 0xbc52
movl $0x1, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0x14a71
testq %rax, %rax
je 0xbc79
movq %r14, %rdi
xorl %esi, %esi
callq 0xa954
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
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x19a70
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x151f3
movq %rax, 0x18(%r14)
movb $0x1, 0x11a(%rax)
movq 0x10(%rsp), %rdi
callq 0x15914
jmp 0xbc64
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseTypedIdentList
static void parseTypedIdentList(Compiler *comp, IdentName *names, bool *exported, int capacity, int *num, const Type **type, bool allowVariadicParamList)
{
    parseIdentList(comp, names, exported, capacity, num);
    lexEat(&comp->lex, TOK_COLON);

    if (allowVariadicParamList && comp->lex.tok.kind == TOK_ELLIPSIS)
    {
        if (*num != 1)
            comp->error.handler(comp->error.context, "Only one variadic parameter list is allowed");

        lexNext(&comp->lex);
        const Type *itemType = parseType(comp, NULL);
        if (itemType->kind == TYPE_VOID)
            comp->error.handler(comp->error.context, "Variadic parameters cannot be void");

        Type *variadicListType = typeAdd(&comp->types, &comp->blocks, TYPE_DYNARRAY);
        variadicListType->base = itemType;
        variadicListType->isVariadicParamList = true;
        *type = variadicListType;
    }
    else
        *type = parseType(comp, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r12
movq %rdi, %r14
movb 0x30(%rsp), %bpl
callq 0xb491
leaq 0x4ba8(%r14), %r15
movq %r15, %rdi
movl $0x41, %esi
callq 0x1637d
testb %bpl, %bpl
je 0xbd73
cmpl $0x44, 0x4bd0(%r14)
jne 0xbd73
cmpl $0x1, (%r12)
je 0xbd1d
movq 0x5118(%r14), %rdi
leaq 0x6a59e(%rip), %rsi     # 0x762b2
xorl %eax, %eax
callq *0x50f8(%r14)
movq %r15, %rdi
callq 0x15914
movq %r14, %rdi
xorl %esi, %esi
callq 0xa954
movq %rax, %r15
cmpl $0x2, (%rax)
jne 0xbd4e
movq 0x5118(%r14), %rdi
leaq 0x6a599(%rip), %rsi     # 0x762de
xorl %eax, %eax
callq *0x50f8(%r14)
leaq 0x4e18(%r14), %rdi
addq $0x4220, %r14           # imm = 0x4220
movq %r14, %rsi
movl $0x13, %edx
callq 0x19a70
movq %r15, 0x8(%rax)
movb $0x1, 0x15(%rax)
jmp 0xbd7d
movq %r14, %rdi
xorl %esi, %esi
callq 0xa954
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_decl.c
// Function: parseTypeDeclItem
static void parseTypeDeclItem(Compiler *comp)
{
    lexCheck(&comp->lex, TOK_IDENT);
    IdentName name;
    strcpy(name, comp->lex.tok.name);

    lexNext(&comp->lex);
    bool exported = parseExportMark(comp);

    lexEat(&comp->lex, TOK_EQ);

    const Type *type = parseType(comp, NULL);
    Type *newType = typeAdd(&comp->types, &comp->blocks, type->kind);
    typeDeepCopy(&comp->storage, newType, type);
    newType->typeIdent = identAddType(&comp->idents, &comp->modules, &comp->blocks, name, newType, exported);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x4ba8(%rdi), %r14
movq %r14, %rdi
movl $0x45, %esi
callq 0x16329
leaq 0x4bd8(%rbx), %rsi
movq %rsp, %rdi
callq 0x30a0
movq %r14, %rdi
callq 0x15914
movl 0x4bd0(%rbx), %r15d
cmpl $0x18, %r15d
jne 0xc115
movq %r14, %rdi
callq 0x162fb
xorl %ebp, %ebp
cmpl $0x18, %r15d
sete %bpl
movq %r14, %rdi
movl $0x31, %esi
callq 0x1637d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa954
movq %rax, %r14
leaq 0x4e18(%rbx), %rdi
leaq 0x4220(%rbx), %r15
movl (%rax), %edx
movq %r15, %rsi
callq 0x19a70
movq %rax, %r12
leaq 0xf0(%rbx), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x19c98
leaq 0x4e38(%rbx), %rdi
addq $0x100, %rbx            # imm = 0x100
movq %rsp, %rcx
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %r8
movl %ebp, %r9d
callq 0x151f3
movq %rax, 0x18(%r12)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doPushConst
void doPushConst(Compiler *comp, const Type *type, const Const *constant)
{
    if (type->kind == TYPE_UINT)
        genPushUIntConst(&comp->gen, constant->uintVal);
    else if (typeOrdinal(type) || type->kind == TYPE_FN)
        genPushIntConst(&comp->gen, constant->intVal);
    else if (typeReal(type))
        genPushRealConst(&comp->gen, constant->realVal);
    else if (type->kind == TYPE_PTR || type->kind == TYPE_STR || type->kind == TYPE_FIBER || typeStructured(type))
        genPushGlobalPtr(&comp->gen, constant->ptrVal);
    else if (type->kind == TYPE_WEAKPTR)
        genPushUIntConst(&comp->gen, constant->weakPtrVal);
    else
        comp->error.handler(comp->error.context, "Illegal type");
}

// Assembly:
movl (%rsi), %eax
cmpl $0xb, %eax
jne 0xc962
addq $0x4e70, %rdi           # imm = 0x4E70
movq (%rdx), %rsi
jmp 0x12f1b
leal -0x4(%rax), %ecx
cmpl $0xa, %ecx
setae %cl
cmpl $0x1a, %eax
setne %sil
testb %cl, %sil
jne 0xc986
addq $0x4e70, %rdi           # imm = 0x4E70
movq (%rdx), %rsi
jmp 0x12ef1
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0xe, %ecx
jne 0xc9a0
addq $0x4e70, %rdi           # imm = 0x4E70
movsd (%rdx), %xmm0
jmp 0x12f45
leal -0x12(%rax), %ecx
cmpl $0x8, %ecx
jae 0xc9b7
addq $0x4e70, %rdi           # imm = 0x4E70
movq (%rdx), %rsi
jmp 0x12f6d
cmpl $0x11, %eax
je 0xc953
cmpl $0x10, %eax
je 0xc9a8
movq 0x50f8(%rdi), %rcx
movq 0x5118(%rdi), %rdi
leaq 0x6963a(%rip), %rsi     # 0x76010
xorl %eax, %eax
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doTryRemoveCopyResultToTempVar
bool doTryRemoveCopyResultToTempVar(Compiler *comp)
{
    if (!comp->idents.lastTempVarForResult)
        return false;

    const int resultCopyOffset = genTryRemoveCopyResultToTempVar(&comp->gen);
    if (resultCopyOffset == 0)
        return false;

    if (resultCopyOffset != comp->idents.lastTempVarForResult->offset)
        comp->error.handler(comp->error.context, "Result copy optimization failed");

    comp->idents.lastTempVarForResult->used = false;
    return true;
}

// Assembly:
cmpq $0x0, 0x4e40(%rdi)
je 0xcaad
pushq %rbx
movq %rdi, %rbx
addq $0x4e70, %rdi           # imm = 0x4E70
callq 0x146e9
testl %eax, %eax
je 0xcab0
movslq %eax, %rcx
movq 0x4e40(%rbx), %rax
cmpq %rcx, 0x120(%rax)
je 0xcaa2
movq 0x5118(%rbx), %rdi
leaq 0x69cd1(%rip), %rsi     # 0x76764
xorl %eax, %eax
callq *0x50f8(%rbx)
movq 0x4e40(%rbx), %rax
movb $0x0, 0x11a(%rax)
movb $0x1, %al
jmp 0xcab2
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doOrdinalToOrdinalOrRealToRealConv
static void doOrdinalToOrdinalOrRealToRealConv(Compiler *comp, const Type *dest, const Type **src, Const *constant)
{
    if (constant)
    {
        if (typeConvOverflow(dest->kind, (*src)->kind, *constant))
            comp->error.handler(comp->error.context, "Overflow of %s", typeKindSpelling(dest->kind));
    }
    else
        genAssertRange(&comp->gen, dest->kind, *src);

    *src = dest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
testq %rcx, %rcx
je 0xd74c
movl (%r14), %eax
movq (%rbx), %rdx
movl (%rdx), %esi
movq (%rcx), %rcx
testq %rcx, %rcx
sets %r8b
cmpl $0xb, %esi
sete %dl
leal -0x4(%rax), %r9d
cmpl $0x16, %r9d
ja 0xd7fb
andb %r8b, %dl
leaq 0x68e54(%rip), %r8      # 0x76584
movslq (%r8,%r9,4), %r9
addq %r8, %r9
jmpq *%r9
cmpq $0xff, %rcx
ja 0xd7fb
jmp 0xd822
addq $0x4e70, %rdi           # imm = 0x4E70
movl (%r14), %esi
movq (%rbx), %rdx
callq 0x13abf
jmp 0xd822
movslq %ecx, %rsi
jmp 0xd7f1
cmpq $0xffff, %rcx           # imm = 0xFFFF
ja 0xd7fb
jmp 0xd822
cmpq $0x1, %rcx
ja 0xd7fb
jmp 0xd822
btrq $0x3f, %rcx
movq %rcx, %xmm0
ucomisd 0x6885e(%rip), %xmm0    # 0x75ff8
ja 0xd7fb
jmp 0xd822
shrq $0x20, %rcx
jne 0xd7fb
jmp 0xd822
movsbq %cl, %rsi
cmpq %rcx, %rsi
sete %cl
xorb $0x1, %dl
testb %dl, %cl
je 0xd7fb
jmp 0xd822
btrq $0x3f, %rcx
movq %rcx, %xmm0
ucomisd 0x68822(%rip), %xmm0    # 0x75ff0
ja 0xd7fb
jmp 0xd822
testb %dl, %dl
jne 0xd7fb
jmp 0xd822
testq %rcx, %rcx
sets %cl
andl $-0x4, %esi
cmpl $0x4, %esi
sete %dl
testb %dl, %cl
jne 0xd7fb
jmp 0xd822
movswq %cx, %rsi
cmpq %rcx, %rsi
setne %cl
orb %dl, %cl
je 0xd822
movq 0x50f8(%rdi), %r12
movq 0x5118(%rdi), %r15
movl %eax, %edi
callq 0x1adb4
leaq 0x68a21(%rip), %rsi     # 0x76238
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq *%r12
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doDynArrayToStrConv
static void doDynArrayToStrConv(Compiler *comp, const Type *dest, const Type **src, Const *constant, bool lhs)
{
    if (constant)
        comp->error.handler(comp->error.context, "Conversion to string is not allowed in constant expressions");

    if (lhs)
        genSwap(&comp->gen);

    genCallTypedBuiltin(&comp->gen, *src, BUILTIN_MAKETOSTR);
    doCopyResultToTempVar(comp, dest);

    if (lhs)
        genSwap(&comp->gen);

    *src = dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0xd861
movq 0x5118(%r15), %rdi
leaq 0x69264(%rip), %rsi     # 0x76abc
xorl %eax, %eax
callq *0x50f8(%r15)
testb %bpl, %bpl
je 0xd872
leaq 0x4e70(%r15), %rdi
callq 0x1327f
leaq 0x4e70(%r15), %r12
movq (%rbx), %rsi
movq %r12, %rdi
movl $0x1a, %edx
callq 0x13e7c
leaq 0x4e38(%r15), %rdi
leaq 0x4e18(%r15), %rsi
leaq 0x100(%r15), %rdx
addq $0x4220, %r15           # imm = 0x4220
movq %r15, %rcx
movq %r14, %r8
movl $0x1, %r9d
callq 0x153ba
movl 0x120(%rax), %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x14698
testb %bpl, %bpl
je 0xd8d4
movq %r12, %rdi
callq 0x1327f
movq %r14, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doStrToDynArrayConv
static void doStrToDynArrayConv(Compiler *comp, const Type *dest, const Type **src, Const *constant)
{
    if (constant)
    {
        int len = getStrDims((char *)constant->ptrVal)->len;
        DynArray *array = storageAddDynArray(&comp->storage, dest, len);
        memcpy(array->data, constant->ptrVal, len);
        constant->ptrVal = array;
    }
    else
    {
        int resultOffset = identAllocStack(&comp->idents, &comp->types, &comp->blocks, dest);
        genPushLocalPtr(&comp->gen, resultOffset);                          // Pointer to result (hidden parameter)
        genCallTypedBuiltin(&comp->gen, dest, BUILTIN_MAKEFROMSTR);
        doCopyResultToTempVar(comp, dest);
    }

    *src = dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0xd934
movq %rcx, %r12
movq (%rcx), %rax
movslq -0x10(%rax), %r13
addq $0xf0, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x7b48
movq %rax, %r15
movq 0x10(%rax), %rdi
movq (%r12), %rsi
movq %r13, %rdx
callq 0x3260
movq %r15, (%r12)
jmp 0xd9b5
leaq 0x4e38(%r15), %r12
leaq 0x4e18(%r15), %r13
leaq 0x4220(%r15), %rbp
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x15267
movq %rbx, (%rsp)
leaq 0x4e70(%r15), %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x12f97
movq %rbx, %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x13e7c
addq $0x100, %r15            # imm = 0x100
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbp, %rcx
movq %r14, %r8
movl $0x1, %r9d
callq 0x153ba
movl 0x120(%rax), %edx
movq %rbx, %rdi
movq (%rsp), %rbx
movq %r14, %rsi
callq 0x14698
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: parseQualIdent
const Ident *parseQualIdent(Compiler *comp)
{
    lexCheck(&comp->lex, TOK_IDENT);

    int moduleToSeekIn = comp->blocks.module;

    Lexer lookaheadLex = comp->lex;
    lexNext(&lookaheadLex);
    if (lookaheadLex.tok.kind == TOK_COLONCOLON)
    {
        const Ident *moduleIdent = identAssertFindModule(&comp->idents, &comp->modules, &comp->blocks, comp->blocks.module, comp->lex.tok.name);

        lexNext(&comp->lex);
        lexNext(&comp->lex);
        lexCheck(&comp->lex, TOK_IDENT);

        moduleToSeekIn = moduleIdent->moduleVal;
    }

    const Ident *ident = identAssertFind(&comp->idents, &comp->modules, &comp->blocks, moduleToSeekIn, comp->lex.tok.name, NULL);

    if (identIsOuterLocalVar(&comp->blocks, ident))
        comp->error.handler(comp->error.context, "%s is not specified as a captured variable", ident->name);

    return ident;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
movq %rdi, %rbx
leaq 0x4ba8(%rdi), %r15
movq %r15, %rdi
movl $0x45, %esi
callq 0x16329
leaq 0x4220(%rbx), %r14
movl 0x4b88(%rbx), %ebp
movq %rsp, %r12
movl $0x270, %edx            # imm = 0x270
movq %r12, %rdi
movq %r15, %rsi
callq 0x3260
movq %r12, %rdi
callq 0x15914
cmpl $0x42, 0x28(%r12)
jne 0xdc55
leaq 0x4e38(%rbx), %rdi
leaq 0x100(%rbx), %rsi
movl 0x4b88(%rbx), %ecx
leaq 0x4bd8(%rbx), %r8
movq %r14, %rdx
callq 0x14ccb
movq %rax, %r12
movq %r15, %rdi
callq 0x15914
movq %r15, %rdi
callq 0x15914
movq %r15, %rdi
movl $0x45, %esi
callq 0x16329
movl 0x120(%r12), %ebp
leaq 0x4e38(%rbx), %rdi
leaq 0x100(%rbx), %rsi
leaq 0x4bd8(%rbx), %r8
movq %r14, %rdx
movl %ebp, %ecx
xorl %r9d, %r9d
callq 0x14c77
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x14d10
testb %al, %al
je 0xdca6
movq 0x5118(%rbx), %rdi
movq %r15, %rdx
addq $0x4, %rdx
leaq 0x68ae6(%rip), %rsi     # 0x76784
xorl %eax, %eax
callq *0x50f8(%rbx)
movq %r15, %rax
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: parseDesignatorList
void parseDesignatorList(Compiler *comp, const Type **type, Const *constant, bool *isVar, bool *isCall, bool *isCompLit)
{
    parseDesignator(comp, type, constant, isVar, isCall, isCompLit);

    if (comp->lex.tok.kind == TOK_COMMA && (*isVar) && !(*isCall) && !(*isCompLit))
    {
        // Designator list (types formally encoded as structure field types - not a real structure)
        if (constant)
            comp->error.handler(comp->error.context, "Designator lists are not allowed for constants");

        const Type *fieldType = *type;

        Type *designatorListType = typeAdd(&comp->types, &comp->blocks, TYPE_STRUCT);
        designatorListType->isExprList = true;

        while (1)
        {
            typeAddField(&comp->types, designatorListType, fieldType, NULL);

            if (comp->lex.tok.kind != TOK_COMMA)
                break;

            lexNext(&comp->lex);

            bool fieldIsVar, fieldIsCall, fieldIsCompLit;
            parseDesignator(comp, &fieldType, NULL, &fieldIsVar, &fieldIsCall, &fieldIsCompLit);

            if (!fieldIsVar || fieldIsCall || fieldIsCompLit)
                comp->error.handler(comp->error.context, "Inconsistent designator list");
        }

        *type = designatorListType;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0xddf6
cmpl $0x3f, 0x4bd0(%r14)
jne 0xdde7
cmpb $0x1, (%rbp)
jne 0xdde7
cmpb $0x0, (%r13)
jne 0xdde7
cmpb $0x0, (%r12)
jne 0xdde7
testq %r15, %r15
je 0xdd28
movq 0x5118(%r14), %rdi
leaq 0x68a90(%rip), %rsi     # 0x767af
xorl %eax, %eax
callq *0x50f8(%r14)
movq (%rbx), %r13
movq %r13, 0x10(%rsp)
leaq 0x4e18(%r14), %r15
leaq 0x4220(%r14), %rsi
movq %r15, %rdi
movl $0x16, %edx
callq 0x19a70
movq %rax, %r12
movb $0x1, 0x14(%rax)
movq %r15, %rdi
movq %rax, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x1a697
cmpl $0x3f, 0x4bd0(%r14)
jne 0xdde4
leaq 0x4ba8(%r14), %r13
leaq 0xd(%rsp), %rbp
movq %r13, %rdi
callq 0x15914
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
leaq 0xf(%rsp), %rcx
leaq 0xe(%rsp), %r8
movq %rbp, %r9
callq 0xddf6
cmpb $0x1, 0xf(%rsp)
jne 0xddb1
cmpb $0x0, 0xe(%rsp)
jne 0xddb1
cmpb $0x1, 0xd(%rsp)
jne 0xddc8
movq 0x5118(%r14), %rdi
leaq 0x68a1f(%rip), %rsi     # 0x767de
xorl %eax, %eax
callq *0x50f8(%r14)
movq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x1a697
cmpl $0x3f, 0x4bd0(%r14)
je 0xdd78
movq %r12, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doFnToClosureConv
static void doFnToClosureConv(Compiler *comp, const Type *dest, const Type **src, Const *constant)
{
    if (constant)
        comp->error.handler(comp->error.context, "Conversion to closure is not allowed in constant expressions");

    int destOffset = identAllocStack(&comp->idents, &comp->types, &comp->blocks, dest);

    genPushLocalPtr(&comp->gen, destOffset);
    genZero(&comp->gen, typeSize(&comp->types, dest));

    genPushLocalPtr(&comp->gen, destOffset + dest->field[0]->offset);   // Push dest.#fn pointer
    genSwapAssign(&comp->gen, TYPE_FN, 0);                              // Assign to dest.#fn

    genPushLocalPtr(&comp->gen, destOffset);
    *src = dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
je 0x11f01
movq 0x5118(%r15), %rdi
leaq 0x64b01(%rip), %rsi     # 0x769f9
xorl %eax, %eax
callq *0x50f8(%r15)
leaq 0x4e38(%r15), %rdi
leaq 0x4e18(%r15), %r12
leaq 0x4220(%r15), %rdx
movq %r12, %rsi
movq %r14, %rcx
callq 0x15267
movl %eax, %ebp
addq $0x4e70, %r15           # imm = 0x4E70
movq %r15, %rdi
movl %eax, %esi
callq 0x12f97
movq %r12, %rdi
movq %r14, %rsi
callq 0x19e29
movq %r15, %rdi
movl %eax, %esi
callq 0x1328b
movq 0x28(%r14), %rax
movq (%rax), %rax
movl 0x110(%rax), %esi
addl %ebp, %esi
movq %r15, %rdi
callq 0x12f97
movq %r15, %rdi
movl $0x1a, %esi
xorl %edx, %edx
callq 0x133bf
movq %r15, %rdi
movl %ebp, %esi
callq 0x12f97
movq %r14, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doEscapeToHeap
static void doEscapeToHeap(Compiler *comp, const Type *ptrType)
{
    // Allocate heap
    genPushIntConst(&comp->gen, typeSize(&comp->types, ptrType->base));
    genCallTypedBuiltin(&comp->gen, ptrType->base, BUILTIN_NEW);

    // Copy to heap and use heap pointer
    genDup(&comp->gen);
    genPopReg(&comp->gen, REG_HEAP_COPY);
    genSwapChangeRefCntAssign(&comp->gen, ptrType->base);
    genPushReg(&comp->gen, REG_HEAP_COPY);

    doCopyResultToTempVar(comp, ptrType);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x4e70(%rdi), %r14
leaq 0x4e18(%rdi), %r12
movq 0x8(%rsi), %rsi
movq %r12, %rdi
callq 0x19e29
movslq %eax, %rsi
movq %r14, %rdi
callq 0x12ef1
movq 0x8(%rbx), %rsi
movq %r14, %rdi
movl $0x15, %edx
callq 0x13e7c
movq %r14, %rdi
callq 0x13273
movq %r14, %rdi
movl $0x2, %esi
callq 0x13206
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x1362e
movq %r14, %rdi
movl $0x2, %esi
callq 0x130d2
leaq 0x4e38(%r15), %rdi
leaq 0x100(%r15), %rdx
addq $0x4220, %r15           # imm = 0x4220
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0x153ba
movl 0x120(%rax), %edx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x14698
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doTryImplicitDeref
static void doTryImplicitDeref(Compiler *comp, const Type **type)
{
    if ((*type)->kind == TYPE_PTR && (*type)->base->kind == TYPE_PTR)
    {
        genDeref(&comp->gen, TYPE_PTR);
        *type = (*type)->base;
    }
    else if ((*type)->kind == TYPE_PTR && (*type)->base->kind == TYPE_WEAKPTR)
    {
        genDeref(&comp->gen, TYPE_WEAKPTR);
        genStrengthenPtr(&comp->gen);
        *type = typeAddPtrTo(&comp->types, &comp->blocks, (*type)->base->base);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rax
cmpl $0x10, (%rax)
jne 0x125c1
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rax), %rax
movl (%rax), %eax
cmpl $0x11, %eax
je 0x12581
cmpl $0x10, %eax
jne 0x125c1
addq $0x4e70, %r14           # imm = 0x4E70
movq %r14, %rdi
movl $0x10, %esi
callq 0x132bc
movq (%rbx), %rax
movq 0x8(%rax), %rax
jmp 0x125be
leaq 0x4e70(%r14), %r15
movq %r15, %rdi
movl $0x11, %esi
callq 0x132bc
movq %r15, %rdi
callq 0x13afe
leaq 0x4e18(%r14), %rdi
addq $0x4220, %r14           # imm = 0x4220
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
movq %r14, %rsi
callq 0x19e01
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq