LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: sha512_update
static void sha512_update(crypto_sha512_ctx *ctx,
                          const u8 *message, size_t message_size)
{
    FOR (i, 0, message_size) {
        sha512_set_input(ctx, message[i]);
        ctx->input_idx++;
        sha512_end_block(ctx);
    }
}

// Assembly:
testq %rdx, %rdx
je 0x8765
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2c0(%rdi), %r12
xorl %r13d, %r13d
movzbl (%r14,%r13), %eax
movq 0x350(%r15), %rdx
testq %rdx, %rdx
jne 0x872f
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r12)
movups %xmm0, 0x60(%r12)
movups %xmm0, 0x50(%r12)
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, (%r12)
movl %edx, %ecx
notl %ecx
shll $0x3, %ecx
shlq %cl, %rax
andq $-0x8, %rdx
orq %rax, 0x2c0(%r15,%rdx)
incq 0x350(%r15)
movq %r15, %rdi
callq 0x8766
incq %r13
cmpq %r13, %rbx
jne 0x86ec
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/sha512.c
// Function: sha512_end_block
static void sha512_end_block(crypto_sha512_ctx *ctx)
{
    if (ctx->input_idx == 128) {
        sha512_incr(ctx->input_size, 1024); // size is in bits
        sha512_compress(ctx);
        ctx->input_idx = 0;
    }
}

// Assembly:
cmpq $0x80, 0x350(%rdi)
jne 0x87af
pushq %rbx
movq %rdi, %rbx
movq 0x348(%rdi), %rax
leaq 0x400(%rax), %rcx
movq %rcx, 0x348(%rdi)
cmpq $-0x400, %rax           # imm = 0xFC00
jb 0x879b
incq 0x340(%rbx)
movq %rbx, %rdi
callq 0x88b8
movq $0x0, 0x350(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/getopt.c
// Function: getopt_next
int getopt_next(getopt_ctx *ctx)
{
    if (ctx->char_idx == 0) {
        int    idx  = ctx->argv_idx;
        char **argv = ctx->argv;
        // Search argv for the next option
        while (idx < ctx->argc &&
               (argv[idx][0] != '-' || is_dash(ctx, idx))) {
            idx++;
        }
        // No more arguments
        if (idx == ctx->argc) {
            return -1;
        }
        // End of options marker found.  No more options, Get rid of it.
        if (is_double_dash(ctx, idx)) {
            forget_argument(ctx, idx);
            return -1;
        }
        // Remember where the argument is stored
        ctx->argv_idx = idx;
    }
    // Point to the current option
    ctx->char_idx++;

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

// Assembly:
pushq %rbx
movslq 0x10(%rdi), %rax
testq %rax, %rax
je 0x8bc5
movq 0x8(%rdi), %rcx
movslq 0x14(%rdi), %rsi
movq (%rcx,%rsi,8), %rcx
leaq 0x1(%rax), %rdx
movl %edx, 0x10(%rdi)
movsbl 0x1(%rcx,%rax), %ebx
cmpb $0x0, 0x2(%rcx,%rax)
jne 0x8c03
callq 0x8c24
jmp 0x8c03
movl 0x14(%rdi), %esi
movq 0x8(%rdi), %rcx
movl (%rdi), %edx
cmpl %edx, %esi
jge 0x8bfa
movslq %esi, %r8
leaq (%rcx,%r8,8), %r8
movq (%r8), %r9
cmpb $0x2d, (%r9)
jne 0x8be9
cmpb $0x0, 0x1(%r9)
jne 0x8bfa
incl %esi
addq $0x8, %r8
cmpl %esi, %edx
jne 0x8bd9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x8c03
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl %edx, %esi
jne 0x8c07
movl %ebx, %eax
popq %rbx
retq
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x8c1f
cmpb $0x2d, 0x1(%rcx)
jne 0x8c1f
cmpb $0x0, 0x2(%rcx)
je 0x8bbe
movl %esi, 0x14(%rdi)
jmp 0x8bab
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/getopt.c
// Function: forget_argument
static void forget_argument(getopt_ctx *ctx, int idx)
{
    char *tmp = ctx->argv[idx];
    while (idx > 0) {
        ctx->argv[idx] = ctx->argv[idx-1];
        idx--;
    }
    ctx->argv[0]  = tmp;
    ctx->char_idx = 0;  // point to the begining of the next argument
    ctx->argv++;
    ctx->argc--;
}

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

// Assembly:
pushq %rbx
movslq 0x14(%rdi), %rsi
cmpl (%rdi), %esi
jge 0x8c9f
movq 0x8(%rdi), %rax
movq (%rax,%rsi,8), %rbx
cmpb $0x2d, (%rbx)
jne 0x8c87
cmpb $0x2d, 0x1(%rbx)
jne 0x8c87
cmpb $0x0, 0x2(%rbx)
je 0x8c9f
movl 0x10(%rdi), %eax
leal 0x1(%rax), %ecx
testl %eax, %eax
cmovel %eax, %ecx
movslq %ecx, %rax
addq %rax, %rbx
callq 0x8c24
jmp 0x8ca1
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: alloc
void* alloc(size_t size)
{
    if (size == 0) { return 0; } // for portability
    void *buf = malloc(size);
    if (buf == NULL) {
        fprintf(stderr, "Failed to allocate 0x%zx bytes\n", size);
        panic("Out of memory.");
    }
    return buf;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x8cc3
movq %rdi, %rbx
callq 0x10c0
testq %rax, %rax
jne 0x8cc5
movq %rbx, %rdi
callq 0x1100
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: random_bytes
void random_bytes(uint8_t *buffer, size_t buffer_size)
{
    if (buffer_size > 256 ) {
        panic("Requested too many random bytes (<= 256)");
    }
    if (syscall(SYS_getrandom, buffer, buffer_size, 0) != (int)buffer_size) {
        fprintf(stderr, "Failed to provide %zu random bytes", buffer_size);
        panic("");
    }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpq $0x101, %rsi            # imm = 0x101
jae 0x8cff
movq %rdi, %rsi
movl $0x13e, %edi            # imm = 0x13E
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x10a0
cmpq %rbx, %rax
jne 0x8d04
popq %rbx
retq
callq 0x1160
movq %rbx, %rdi
callq 0x1130
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: int_of_string
int int_of_string(const char *s)
{
    int i = 0;
    if ( s == 0   ) return -1; // NULL  string
    if (*s == '\0') return -2; // empty string
    while (*s != 0) {
        if (!is_between(*s, '0', '9')            ) return -2; // not a number
        if (i > (INT_MAX - int_of_digit(*s)) / 10) return -3; // too big for int
        i = (10 * i) + int_of_digit(*s);
        s++;
    }
    return i;
}

// Assembly:
testq %rdi, %rdi
je 0x8d97
movb (%rdi), %dl
testb %dl, %dl
je 0x8d9d
incq %rdi
xorl %eax, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
leal -0x3a(%rdx), %esi
cmpb $-0xa, %sil
jb 0x8d9d
movzbl %dl, %edx
movl $0x8000002f, %esi       # imm = 0x8000002F
subl %edx, %esi
imulq %rcx, %rsi
shrq $0x23, %rsi
cmpl %esi, %eax
jg 0x8da3
leal (%rax,%rax,4), %eax
leal (%rdx,%rax,2), %eax
addl $-0x30, %eax
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x8d65
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
retq
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: read_buffer
int read_buffer(uint8_t *out, size_t max_size, const char *hex)
{
    size_t hex_size = string_length(hex);
    size_t buf_size = hex_size / 2;
    if (hex ==  0          ) return -1;
    if (hex_size > max_size) return -2;
    if (hex_size % 2 !=   0) return -3;
    for (size_t i = 0; i < hex_size; i += 2) {
        int msb = int_of_hex(hex[i  ]);
        int lsb = int_of_hex(hex[i+1]);
        if (msb == -1 || lsb == -1) return -4;
        out[i/2] = lsb + (msb << 4);
    }
    return buf_size;
}

// Assembly:
testq %rdx, %rdx
je 0x8ed1
cmpb $0x0, (%rdx)
je 0x8ed7
xorl %ecx, %ecx
cmpb $0x0, 0x1(%rdx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x8dfd
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpq %rsi, %rcx
ja 0x8edb
leaq -0x1(%rcx), %rsi
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
testb $0x1, %sil
je 0x8edb
movq %rcx, %rsi
shrq %rsi
testq %rcx, %rcx
je 0x8ed9
xorl %r8d, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movzbl (%rdx,%r8), %r10d
leal -0x3a(%r10), %eax
cmpb $-0xa, %al
jae 0x8e66
leal -0x67(%r10), %eax
cmpb $-0x6, %al
jae 0x8e6c
leal -0x47(%r10), %eax
addl $-0x41, %r10d
cmpb $-0x6, %al
cmovbl %r9d, %r10d
jmp 0x8e70
addl $-0x30, %r10d
jmp 0x8e70
addl $-0x61, %r10d
movzbl 0x1(%rdx,%r8), %r11d
leal -0x3a(%r11), %eax
cmpb $-0xa, %al
jae 0x8e96
leal -0x67(%r11), %eax
cmpb $-0x6, %al
jae 0x8e9c
leal -0x47(%r11), %eax
addl $-0x41, %r11d
cmpb $-0x6, %al
cmovbl %r9d, %r11d
jmp 0x8ea0
addl $-0x30, %r11d
jmp 0x8ea0
addl $-0x61, %r11d
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
cmpl $-0x1, %r10d
je 0x8edb
cmpl $-0x1, %r11d
je 0x8edb
shll $0x4, %r10d
addl %r10d, %r11d
movq %r8, %rax
shrq %rax
movb %r11b, (%rdi,%rax)
addq $0x2, %r8
cmpq %rcx, %r8
jb 0x8e41
jmp 0x8ed9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %esi, %esi
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: read_vector
int read_vector(vector *v, const char *hex)
{
    v->size   = string_length(hex) / 2;
    v->buffer = alloc(v->size);
    int error = read_buffer(v->buffer, INT_MAX, hex);
    if (error < 1) {
        free_vector(v);
        return error;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x8f0c
cmpb $0x0, (%r14)
je 0x8f13
xorl %edi, %edi
cmpb $0x0, 0x1(%r14,%rdi)
leaq 0x1(%rdi), %rdi
jne 0x8efb
shrq %rdi
jmp 0x8f15
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
jmp 0x8f15
xorl %edi, %edi
movq %rdi, 0x8(%rbx)
callq 0x8ca8
movq %rax, %r15
movq %rax, (%rbx)
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rax, %rdi
movq %r14, %rdx
callq 0x8de9
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
jg 0x8f5a
testq %r15, %r15
je 0x8f50
movq %r15, %rdi
callq 0x1030
movq $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/LoupVaillant[P]Monocypher-Utils/src/utils.c
// Function: free_vector
void free_vector(vector *v)
{
    if (v->buffer != 0) {
        free(v->buffer);
        v->buffer = 0;
    }
    v->size = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8f7d
callq 0x1030
movq $0x0, (%rbx)
movq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/st.c
// Function: base64dec
char *
base64dec(const char *src)
{
	size_t in_len = strlen(src);
	char *result, *dst;

	if (in_len % 4)
		in_len += 4 - (in_len % 4);
	result = dst = xmalloc(in_len / 4 * 3 + 1);
	while (*src) {
		int a = base64_digits[(unsigned char) base64dec_getc(&src)];
		int b = base64_digits[(unsigned char) base64dec_getc(&src)];
		int c = base64_digits[(unsigned char) base64dec_getc(&src)];
		int d = base64_digits[(unsigned char) base64dec_getc(&src)];

		/* invalid input. 'a' can be -1, e.g. if src is "\n" (c-str) */
		if (a == -1 || b == -1)
			break;

		*dst++ = (a << 2) | ((b & 0x30) >> 4);
		if (c == -1)
			break;
		*dst++ = ((b & 0x0f) << 4) | ((c & 0x3c) >> 2);
		if (d == -1)
			break;
		*dst++ = ((c & 0x03) << 6) | d;
	}
	*dst = '\0';
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rdi, 0x10(%rsp)
callq 0x5370
addq $0x3, %rax
shrq $0x2, %rax
leaq (%rax,%rax,2), %rdi
incq %rdi
callq 0x5e4c
cmpb $0x0, (%r14)
movq %rax, %r15
je 0x96b6
movq %rax, 0x8(%rsp)
movq %rax, %r15
addq $0x2, %r15
leaq 0x10(%rsp), %r14
leaq 0x4e9a(%rip), %r12      # 0xe4b0
movq %r14, %rdi
callq 0x96c9
movzbl %al, %eax
movb (%rax,%r12), %bl
movq %r14, %rdi
callq 0x96c9
movzbl %al, %eax
movb (%rax,%r12), %bpl
movq %r14, %rdi
callq 0x96c9
movzbl %al, %eax
movb (%rax,%r12), %r13b
movq %r14, %rdi
callq 0x96c9
cmpb $-0x1, %bl
je 0x96a8
cmpb $-0x1, %bpl
je 0x96a8
movzbl %al, %eax
movb (%rax,%r12), %al
shlb $0x2, %bl
movl %ebp, %ecx
shrb $0x4, %cl
andb $0x3, %cl
orb %bl, %cl
movb %cl, -0x2(%r15)
cmpb $-0x1, %r13b
je 0x96ae
shlb $0x4, %bpl
movl %r13d, %ecx
shrb $0x2, %cl
andb $0xf, %cl
orb %bpl, %cl
movb %cl, -0x1(%r15)
cmpb $-0x1, %al
je 0x96b1
shlb $0x6, %r13b
orb %r13b, %al
movb %al, (%r15)
movq 0x10(%rsp), %rax
addq $0x3, %r15
cmpb $0x0, (%rax)
jne 0x9616
addq $-0x2, %r15
jmp 0x96b1
decq %r15
movq 0x8(%rsp), %rax
movb $0x0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/x.c
// Function: xseticontitle
void
xseticontitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

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

// Assembly:
testq %rdi, %rdi
jne 0xa73b
movq 0xd695(%rip), %rdi      # 0x17dd0
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0xd549(%rip), %rdi      # 0x17c98
leaq 0x10(%rsp), %rbx
movl $0x1, %edx
movl $0x4, %ecx
movq %rbx, %r8
callq 0x5420
movq 0xd52b(%rip), %rdi      # 0x17c98
movq 0xd534(%rip), %rsi      # 0x17ca8
movq %rbx, %rdx
callq 0x5320
movq 0xd515(%rip), %rdi      # 0x17c98
movq 0xd51e(%rip), %rsi      # 0x17ca8
movq 0xd547(%rip), %rcx      # 0x17cd8
movq %rbx, %rdx
callq 0x5440
movq (%rbx), %rdi
callq 0x5090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/x.c
// Function: xsettitle
void
xsettitle(char *p)
{
	XTextProperty prop;
	DEFAULT(p, opt_title);

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

// Assembly:
testq %rdi, %rdi
jne 0xa7b3
movq 0xd61d(%rip), %rdi      # 0x17dd0
pushq %rbx
subq $0x30, %rsp
leaq 0x8(%rsp), %rsi
movq %rdi, (%rsi)
movq 0xd4d1(%rip), %rdi      # 0x17c98
leaq 0x10(%rsp), %rbx
movl $0x1, %edx
movl $0x4, %ecx
movq %rbx, %r8
callq 0x5420
movq 0xd4b3(%rip), %rdi      # 0x17c98
movq 0xd4bc(%rip), %rsi      # 0x17ca8
movq %rbx, %rdx
callq 0x53e0
movq 0xd49d(%rip), %rdi      # 0x17c98
movq 0xd4a6(%rip), %rsi      # 0x17ca8
movq 0xd4c7(%rip), %rcx      # 0x17cd0
movq %rbx, %rdx
callq 0x5440
movq (%rbx), %rdi
callq 0x5090
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/x.c
// Function: cresize
void
cresize(int width, int height)
{
	int col, row;

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

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

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

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

// Assembly:
testl %edi, %edi
je 0xcafd
movl %edi, 0xb2b3(%rip)      # 0x17db0
testl %esi, %esi
je 0xcb09
movl %esi, 0xb2ad(%rip)      # 0x17db4
jmp 0xcb0f
movl 0xb2a5(%rip), %esi      # 0x17db4
pushq %rbp
pushq %rbx
pushq %rax
movl 0xb298(%rip), %ecx      # 0x17db0
leal -0x4(%rcx), %eax
movl 0xb2a3(%rip), %edi      # 0x17dc4
cltd
idivl %edi
movl %eax, %ebx
leal -0x4(%rsi), %eax
movl 0xb290(%rip), %r8d      # 0x17dc0
cltd
idivl %r8d
cmpl $0x2, %ebx
movl $0x1, %ebp
cmovll %ebp, %ebx
cmpl $0x2, %eax
cmovgel %eax, %ebp
imull %ebx, %edi
subl %edi, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl %eax, 0xb25f(%rip)      # 0x17db8
imull %ebp, %r8d
subl %r8d, %esi
movl %esi, %eax
shrl $0x1f, %eax
addl %esi, %eax
sarl %eax
movl %eax, 0xb24d(%rip)      # 0x17dbc
movl %ebx, %edi
movl %ebp, %esi
callq 0x70dd
movl 0xb246(%rip), %eax      # 0x17dc4
imull %ebx, %eax
imull 0xb238(%rip), %ebp      # 0x17dc0
movl %eax, 0xb21a(%rip)      # 0x17da8
movl %ebp, 0xb218(%rip)      # 0x17dac
movq 0xb0fd(%rip), %rdi      # 0x17c98
movq 0xb10e(%rip), %rsi      # 0x17cb0
callq 0x57c0
movq 0xb0ea(%rip), %rdi      # 0x17c98
movq 0xb0f3(%rip), %rsi      # 0x17ca8
movl 0xb1f5(%rip), %edx      # 0x17db0
movl 0xb1f3(%rip), %ecx      # 0x17db4
movl 0xb1c8(%rip), %r8d      # 0x17d90
callq 0x5840
movq %rax, 0xb0dc(%rip)      # 0x17cb0
movq 0xb12d(%rip), %rdi      # 0x17d08
movq %rax, %rsi
callq 0x56b0
movl 0xb1c6(%rip), %r8d      # 0x17db0
movl 0xb1c3(%rip), %r9d      # 0x17db4
movq 0xb110(%rip), %rdi      # 0x17d08
testb $0x20, 0xb1c9(%rip)     # 0x17dc8
leaq 0x88da(%rip), %rax      # 0x154e0
leaq 0x88d7(%rip), %rcx      # 0x154e4
cmovneq %rax, %rcx
movl (%rcx), %esi
shlq $0x4, %rsi
addq 0xaf82(%rip), %rsi      # 0x17ba0
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x53d0
movq 0xb08a(%rip), %rdi      # 0x17cb8
shlq $0x4, %rbx
movq %rbx, %rsi
callq 0x5f10
movq %rax, 0xb077(%rip)      # 0x17cb8
movl 0xb161(%rip), %edi      # 0x17da8
movl 0xb15f(%rip), %esi      # 0x17dac
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6f64
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/x.c
// Function: bpress
void
bpress(XEvent *e)
{
	struct timespec now;
	int snap;

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

	if (mouseaction(e, 0))
		return;

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

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

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movzwl 0xaf95(%rip), %eax      # 0x17dc8
testl $0xc018, %eax           # imm = 0xC018
setne %al
movl 0x50(%rdi), %edi
testb $0x1, %dil
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xce5b
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0xd690
movl 0x54(%rbx), %esi
xorl %edx, %edx
callq 0xd840
testl %eax, %eax
jne 0xcf82
cmpl $0x1, 0x54(%rbx)
jne 0xcf82
leaq 0x8(%rsp), %r14
movl $0x1, %edi
movq %r14, %rsi
callq 0x5130
movq (%r14), %rdx
movq 0x8(%r14), %rax
movq %rdx, %rcx
subq 0xafa6(%rip), %rcx      # 0x17e40
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
cvtsi2sd %rcx, %xmm0
movq %rax, %rcx
subq 0xaf98(%rip), %rcx      # 0x17e48
cvtsi2sd %rcx, %xmm1
divsd 0x1c6b(%rip), %xmm1     # 0xeb28
addsd %xmm0, %xmm1
movl $0x2, %ecx
movsd 0x1c9a(%rip), %xmm0     # 0xeb68
ucomisd %xmm1, %xmm0
jae 0xcf16
subq 0xaf55(%rip), %rdx      # 0x17e30
imulq $0x3e8, %rdx, %rcx      # imm = 0x3E8
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
subq 0xaf47(%rip), %rax      # 0x17e38
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd 0x1c27(%rip), %xmm1     # 0xeb28
addsd %xmm0, %xmm1
movsd 0x1c63(%rip), %xmm0     # 0xeb70
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
setae %cl
movups 0xaf13(%rip), %xmm0     # 0x17e30
movups %xmm0, 0xaf1c(%rip)     # 0x17e40
movups 0x8(%rsp), %xmm0
movups %xmm0, 0xaf00(%rip)     # 0x17e30
movl 0x40(%rbx), %edx
xorl %esi, %esi
subl 0xae7d(%rip), %edx      # 0x17db8
movl $0x0, %eax
js 0xcf4f
movl 0xae60(%rip), %eax      # 0x17da8
decl %eax
cmpl %eax, %edx
cmovll %edx, %eax
cltd
idivl 0xae6e(%rip)            # 0x17dc4
movl %eax, %edi
movl 0x44(%rbx), %eax
subl 0xae5b(%rip), %eax      # 0x17dbc
js 0xcf70
movl 0xae43(%rip), %esi      # 0x17dac
decl %esi
cmpl %esi, %eax
cmovll %eax, %esi
movl %esi, %eax
cltd
idivl 0xae47(%rip)            # 0x17dc0
movl %eax, %esi
movl %ecx, %edx
callq 0x5ff8
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/impact-eintr[P]st/x.c
// Function: brelease
void
brelease(XEvent *e)
{
	if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
		mousereport(e);
		return;
	}

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0xae33(%rip), %eax      # 0x17dc8
testl $0xc018, %eax           # imm = 0xC018
setne %al
movl 0x50(%rdi), %edi
testb $0x1, %dil
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xcfb7
movq %rbx, %rdi
popq %rbx
jmp 0xd690
movl 0x54(%rbx), %esi
movl $0x1, %edx
callq 0xd840
testl %eax, %eax
jne 0xcfdc
cmpl $0x1, 0x54(%rbx)
jne 0xcfdc
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0xd8e7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jani-nykanen[P]mushrooms/./tools/src/stb_image.h
// Function: stbi_is_hdr_from_callbacks
STBIDEF int      stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)
{
   #ifndef STBI_NO_HDR
   stbi__context s;
   stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
   return stbi__hdr_test(&s);
   #else
   STBI_NOTUSED(clbk);
   STBI_NOTUSED(user);
   return 0;
   #endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xd8, %rsp
movq 0x10(%rdi), %rax
leaq -0xa8(%rbp), %rbx
movq %rax, -0x18(%rbx)
movups (%rdi), %xmm0
movups %xmm0, -0x28(%rbx)
movq %rsi, -0x10(%rbx)
movabsq $0x8000000001, %rax     # imm = 0x8000000001
movq %rax, -0x8(%rbx)
movq %rbx, 0x90(%rbx)
movq %rsi, %rdi
movq %rbx, %rsi
movl $0x80, %edx
callq *-0x28(%rbx)
testl %eax, %eax
je 0x2240
cltq
addq %rbx, %rax
jmp 0x2252
leaq -0xa7(%rbp), %rax
movl $0x0, -0x9(%rax)
movb $0x0, -0x1(%rax)
leaq -0xe0(%rbp), %rdi
movq %rbx, 0xb8(%rdi)
movq %rax, 0xc0(%rdi)
movq %rax, 0xd0(%rdi)
callq 0x210a
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jani-nykanen[P]mushrooms/./tools/src/png2spr.c
// Function: write_array
static void write_array(FILE* f, u8* arr, u32 len) {
    
    u32 i;
    u32 count = 3;
    u8 bout = 0;

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

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

        if (count -- == 0) {

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

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

// Assembly:
pushq %rax
callq 0x7905
movq %rax, %rdi
callq 0x30c0
leaq 0x6b280(%rip), %rdi     # 0x72131
callq 0x30c0
leaq 0x6b295(%rip), %rdi     # 0x72152
callq 0x30c0
leaq 0x6b2c4(%rip), %rdi     # 0x7218d
callq 0x30c0
leaq 0x6b2c4(%rip), %rdi     # 0x72199
callq 0x30c0
leaq 0x6b2e5(%rip), %rdi     # 0x721c6
callq 0x30c0
leaq 0x6b30e(%rip), %rdi     # 0x721fb
callq 0x30c0
leaq 0x6b32d(%rip), %rdi     # 0x72226
callq 0x30c0
leaq 0x6b34f(%rip), %rdi     # 0x72254
popq %rax
jmp 0x30c0
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka.c
// Function: writeAsmFile
bool writeAsmFile(void *umka, const char *mainPath)
{
    bool ok = false;

    char *asmFileName = malloc(strlen(mainPath) + 4 + 1);
    if (!asmFileName)
        fprintf(stderr, "Error: Out of memory\n");
    else
    {
        sprintf(asmFileName, "%s.asm", mainPath);
        const char *asmBuf = umkaAsm(umka);
        if (!asmBuf)
            fprintf(stderr, "Error: Cannot output assembly listing\n");
        else
        {
            FILE *asmFile = fopen(asmFileName, "w");
            if (!asmFile)
                fprintf(stderr, "Error: Cannot open file %s\n", asmFileName);
            else
            {
                if (fwrite(asmBuf, strlen(asmBuf), 1, asmFile) != 1)
                    fprintf(stderr, "Error: Cannot write file %s\n", asmFileName);
                else
                    ok = true;
                fclose(asmFile);
            }
        }
        free(asmFileName);
    }

    return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3130
leaq 0x5(%rax), %rdi
callq 0x3290
testq %rax, %rax
je 0x6fb2
movq %rax, %rbx
leaq 0x6b0de(%rip), %rsi     # 0x7201a
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3380
movq %r14, %rdi
callq 0x7766
testq %rax, %rax
je 0x6fbb
movq %rax, %r15
leaq 0x6b535(%rip), %rsi     # 0x72495
movq %rbx, %rdi
callq 0x3320
testq %rax, %rax
je 0x6fc4
movq %rax, %r14
movq %r15, %rdi
callq 0x3130
movl $0x1, %edx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rcx
callq 0x3390
cmpq $0x1, %rax
sete %bpl
jne 0x6fe3
movq %r14, %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x3463
xorl %ebp, %ebp
jmp 0x6fa5
callq 0x3447
xorl %ebp, %ebp
jmp 0x6f9d
movq 0x8002d(%rip), %rax     # 0x86ff8
movq (%rax), %rdi
leaq 0x6b073(%rip), %rsi     # 0x72048
xorl %ebp, %ebp
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3220
jmp 0x6f9d
movq 0x8000e(%rip), %rax     # 0x86ff8
movq (%rax), %rdi
leaq 0x6b070(%rip), %rsi     # 0x72064
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3220
jmp 0x6f95
// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka.c
// Function: printRuntimeError
void printRuntimeError(void *umka)
{
    const UmkaError *error = umkaGetError(umka);

    if (error->msg[0])
    {
        fprintf(stderr, "\nRuntime error %s (%d): %s\n", error->fileName, error->line, error->msg);
        fprintf(stderr, "Stack trace:\n");

        for (int depth = 0; depth < MAX_CALL_STACK_DEPTH; depth++)
        {
            char fileName[MAX_STR_LENGTH + 1], fnName[MAX_STR_LENGTH + 1];
            int line;

            if (!umkaGetCallStack(umka, depth, MAX_STR_LENGTH + 1, NULL, fileName, fnName, &line))
                break;

            fprintf(stderr, "    %s: %s (%d)\n", fnName, fileName, line);
        }
    }
}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x58(%rsp), %r13
movl $0x52d8, %edx           # imm = 0x52D8
xorl %esi, %esi
callq 0x3190
leaq 0x8d(%rip), %rax        # 0x73a4
movq %rax, 0x50f8(%r12)
leaq 0x158(%rip), %rax       # 0x747e
movq %rax, 0x5100(%r12)
leaq 0x232(%rip), %rax       # 0x7567
movq %rax, 0x5108(%r12)
movq %r13, 0x5110(%r12)
movq %r12, 0x5118(%r12)
leaq 0x5120(%r12), %rdi
callq 0x3200
movl %eax, %r13d
testl %eax, %eax
jne 0x738f
movb 0x48(%rsp), %al
movq 0x40(%rsp), %r9
movzbl 0x50(%rsp), %ecx
movzbl %al, %eax
movl %ecx, %r10d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
pushq %r10
pushq %rax
callq 0x86e0
addq $0x10, %rsp
testl %r13d, %r13d
sete %al
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_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 0x76ce
movl 0x5208(%rbx), %eax
jmp 0x76e4
incl 0x51e8(%rbx)
movq %rbx, %rdi
callq 0x999a
decl 0x51e8(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x771c
movl 0x5208(%rbx), %eax
jmp 0x7735
incl 0x51e8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x99a8
decl 0x51e8(%rbx)
xorl %eax, %eax
addq $0xc8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x77e1
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x41bb9
testb %al, %al
jne 0x77c4
jmp 0x7873
testq %r13, %r13
je 0x77ee
movl 0xc(%rsp), %eax
movl %eax, (%r13)
movslq %ebp, %r13
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7820
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x70501(%rip), %rdx     # 0x77d17
movq %r13, %rsi
xorl %eax, %eax
callq 0x3170
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7850
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %rcx
leaq 0x704d1(%rip), %rdx     # 0x77d17
movq %r13, %rsi
xorl %eax, %eax
callq 0x3170
cmpq $0x0, 0x60(%rsp)
je 0x7873
movq (%r14), %rax
movq 0x60(%rax), %rax
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movl 0x10(%rax,%rcx,8), %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_O3/vtereshkov[P]umka-lang/src/umka_api.c
// Function: umkaGetResult
UMKA_API UmkaStackSlot *umkaGetResult(UmkaStackSlot *params, UmkaStackSlot *result)
{
    const ParamLayout *paramLayout = (ParamLayout *)params[-4].ptrVal;      // For -4, see the stack layout diagram in umka_vm.c
    if (paramLayout->numResultParams == 1)
        result->ptrVal = params[paramLayout->firstSlotIndex[paramLayout->numParams - 1]].ptrVal;
    return result;
}

// Assembly:
movq %rsi, %rax
movq -0x20(%rdi), %rcx
cmpq $0x1, 0x8(%rcx)
jne 0x797c
movq (%rcx), %rdx
movq 0x10(%rcx,%rdx,8), %rcx
movq (%rdi,%rcx,8), %rcx
movq %rcx, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7aa6
movq 0x8(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x6a80d(%rip), %rsi     # 0x722af
xorl %eax, %eax
callq *(%rcx)
movq $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 0x7ad5
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_O3/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 0x7b14
movq 0x8(%rdi), %r14
callq 0x3040
movq %r14, (%rbx)
movq %r14, %rdi
testq %r14, %r14
jne 0x7b00
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7a70
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_O3/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
movl $0x18, %esi
callq 0x7a70
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 0x7a70
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_O3/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 0x7bc3
movq -0x10(%rsi), %rcx
movq %rcx, (%rax)
movq -0x18(%rsi), %rcx
movq -0x10(%rsi), %rax
testq %rcx, %rcx
je 0x7bd4
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x3040
movq (%rdi), %rcx
movq %rcx, (%rax)
jmp 0x3040
// File: /workspace/github_c_makefile_star2_O3/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 0x7a70
movq %rax, %r15
movq -0x8(%rbx), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3260
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7bb0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x4008, %edx           # imm = 0x4008
xorl %esi, %esi
callq 0x3190
movb %bpl, 0x4108(%rbx)
movq %r15, 0x4110(%rbx)
movq %r14, 0x4118(%rbx)
leaq 0x4008(%rbx), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x7c98
testq %rax, %rax
je 0x7c75
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4118(%rbx), %rax
movq (%rax), %rcx
movq 0x20(%rax), %rdi
leaq 0x6a633(%rip), %rsi     # 0x722bd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O3/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 0x7cd5
movq %rbx, %rdi
callq 0x3130
testl %eax, %eax
jle 0x7cce
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addl %eax, %ecx
movzbl (%rbx,%rcx), %ecx
cmpl $0x2f, %ecx
je 0x7cf9
cmpl $0x5c, %ecx
je 0x7cf9
addl $-0x2, %ebp
cmpl %eax, %ebp
jge 0x7cd9
xorl %ebx, %ebx
jmp 0x7cf9
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_O3/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
movq %rsi, %rdi
movl $0x2f, %esi
callq 0x3180
movq %rax, %r12
movq %r15, %rdi
movl $0x5c, %esi
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
movq %r15, %rdi
movl $0x2e, %esi
callq 0x3180
movq %rax, %r13
testq %rax, %rax
jne 0x7d82
movq %r15, %rdi
callq 0x3130
movq %rax, %r13
addq %r15, %r13
subq %r12, %r13
ja 0x7da0
movq 0x4118(%rbx), %rcx
movq 0x20(%rcx), %rdi
leaq 0x6a53e(%rip), %rsi     # 0x722d7
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_O3/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
movb (%rsi), %al
testb %al, %al
je 0x7e2f
leaq 0x1(%rbx), %rcx
movl $0x1505, %r15d          # imm = 0x1505
movl %r15d, %edx
shll $0x5, %edx
addl %r15d, %edx
movsbl %al, %r15d
addl %edx, %r15d
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x7e14
jmp 0x7e35
movl $0x1505, %r15d          # imm = 0x1505
movslq 0x4000(%r14), %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r12, %r12
jle 0x7e6f
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
cmpl %r15d, 0x300(%rdi)
jne 0x7e62
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x7e6c
incq %r13
cmpq %r13, %r12
jne 0x7e49
jmp 0x7e6f
movl %r13d, %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_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x4000(%rdi), %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %r15, %r15
jle 0x7ed1
movq %rdx, %r14
movslq 0x968(%rsi), %rax
movq (%rdi,%rax,8), %r13
xorl %r12d, %r12d
movq 0x310(%r13,%r12,8), %rdi
testq %rdi, %rdi
je 0x7ec4
movq %r14, %rsi
callq 0x3210
testl %eax, %eax
je 0x7ece
incq %r12
cmpq %r12, %r15
jne 0x7eab
jmp 0x7ed1
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movb (%rsi), %al
testb %al, %al
je 0x818b
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 0x8174
jmp 0x8190
movl $0x1505, %ebp           # imm = 0x1505
movslq 0x4004(%r14), %r12
testq %r12, %r12
jle 0x81c7
xorl %r13d, %r13d
movq 0x2000(%r14,%r13,8), %r15
cmpl %ebp, 0x300(%r15)
jne 0x81bf
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3210
testl %eax, %eax
je 0x81ca
incq %r13
cmpq %r13, %r12
jne 0x819f
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq