LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/ast_node_variable_definition.c
// Function: init_ast_node_variable_definition
ast_node_variable_definition* init_ast_node_variable_definition(token* tok, int data_type, ast_node* value) {
    ast_node_variable_definition* ast;
    ast = calloc(1, sizeof(ast_node_variable_definition));
    ast->tok = tok;
    ast->data_type = data_type;
    ast->value = value;
    ast->base.type = AST_TYPE_VARIABLE_DEFINITION;

    return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10b0
movq %r15, 0x18(%rax)
movl %r14d, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0xb, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/ast_node_vector.c
// Function: init_ast_node_vector
ast_node_vector* init_ast_node_vector(token* tok, int data_type, ss_vector* vector) {
    ast_node_vector* ast;
    ast = calloc(1, sizeof(ast_node_vector));
    ast->tok = tok;
    ast->data_type = data_type;
    ast->vector = vector;
    ast->base.type = AST_TYPE_VECTOR;

    return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10b0
movq %r15, 0x18(%rax)
movl %r14d, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0x15, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/ast_node_while.c
// Function: init_ast_node_while
ast_node_while* init_ast_node_while(token* tok, ast_node* expr, ast_node_compound* body) {
    ast_node_while* ast;
    ast = calloc(1, sizeof(ast_node_while));
    ast->tok = tok;
    ast->expr = expr;
    ast->body = body;
    ast->base.type = AST_TYPE_WHILE;

    return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10b0
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
movq %rbx, 0x28(%rax)
movl $0x11, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/data_type_utils.c
// Function: name_to_data_type
int name_to_data_type(char* name) {
    if (strcmp(name, "int") == 0) {
        return _DATA_TYPE_INTEGER;
    } else if (strcmp(name, "float") == 0) {
        return _DATA_TYPE_FLOAT;
    } else if (strcmp(name, "void") == 0) {
        return _DATA_TYPE_VOID;
    } else if (strcmp(name, "char") == 0) {
        return _DATA_TYPE_CHAR;
    } else if (strcmp(name, "string") == 0) {
        return _DATA_TYPE_STRING;
    } else if (strcmp(name, "vector") == 0) {
        return _DATA_TYPE_VECTOR;
    } else {
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x38a0(%rip), %rsi      # 0x5048
callq 0x10c0
testl %eax, %eax
je 0x1819
leaq 0x384c(%rip), %rsi      # 0x5004
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x181d
leaq 0x383f(%rip), %rsi      # 0x500a
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1821
leaq 0x3831(%rip), %rsi      # 0x500f
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1825
leaq 0x3823(%rip), %rsi      # 0x5014
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x1829
leaq 0x3817(%rip), %rsi      # 0x501b
movq %rbx, %rdi
callq 0x10c0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x2e, %eax
jmp 0x182c
pushq $0x29
jmp 0x182b
pushq $0x2a
jmp 0x182b
pushq $0x2b
jmp 0x182b
pushq $0x28
jmp 0x182b
pushq $0x2d
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: print
ast_node* _print(ss_vector* args) {
    for (int i = 0; i < args->size; i++) {
        ast_node* node = (ast_node*)args->items[i];

        if (node->type == AST_TYPE_INTEGER) {
            ast_node_integer* node_integer = (ast_node_integer*) node;
            printf("%d\n", node_integer->value);
        } else if (node->type == AST_TYPE_FLOAT) {
            ast_node_float* node_float = (ast_node_float*) node;
            printf("%f\n", node_float->value);
        } else if (node->type == AST_TYPE_CHAR) {
            ast_node_char* node_char = (ast_node_char*) node;
            printf("%c\n", node_char->value);
        } else if (node->type == AST_TYPE_STRING) {
            ast_node_string* node_string = (ast_node_string*) node;
            printf("%s\n", node_string->value);
        } else {
            printf("<%d>\n", (int)node->type);
        }
    }

    return (ast_node*) init_ast_node_empty((void*)0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x37d8(%rip), %r14      # 0x5024
leaq 0x37e5(%rip), %r12      # 0x5038
leaq 0x37e2(%rip), %r13      # 0x503c
xorl %r15d, %r15d
cmpq %r15, (%rbx)
jbe 0x18c1
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %esi
leal -0x3(%rsi), %ecx
cmpl $0x3, %ecx
ja 0x18ae
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movl 0x20(%rax), %esi
leaq 0x37ad(%rip), %rdi      # 0x5034
jmp 0x18b5
movq 0x20(%rax), %rdi
callq 0x1050
jmp 0x18bc
movsbl 0x20(%rax), %esi
movq %r13, %rdi
jmp 0x18b5
cvtss2sd 0x20(%rax), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x10a0
jmp 0x18bc
leaq 0x378b(%rip), %rdi      # 0x5040
xorl %eax, %eax
callq 0x10a0
incq %r15
jmp 0x185d
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1444
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: strlen
ast_node* _strlen(ss_vector* args) {
    ast_node* _node = (ast_node*)args->items[0];

    if (_node->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0); 

    ast_node_string* node_string = (ast_node_string*) _node;

    int length = strlen(node_string->value);

    return (ast_node*) init_ast_node_integer(
        init_token(_INTEGER, ""),
        length
    );
}

// Assembly:
movq 0x8(%rdi), %rax
movq (%rax), %rax
cmpl $0x5, (%rax)
jne 0x1913
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rax), %rdi
callq 0x1090
movq %rax, %rbx
leaq 0x3a1a(%rip), %rsi      # 0x5315
pushq $0x2
popq %rdi
callq 0x42a0
movq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1590
xorl %edi, %edi
jmp 0x1444
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: strsplit
ast_node* _strsplit(ss_vector* args) {
    ast_node* _node0 = (ast_node*)args->items[0];
    ast_node* _node1 = (ast_node*)args->items[1];

    if (_node0->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0);

    if (_node1->type != AST_TYPE_STRING)
        return (ast_node*) init_ast_node_empty((void*)0);


    ast_node_string* node_string0 = (ast_node_string*) _node0;
    ast_node_string* node_string1 = (ast_node_string*) _node1;

    ss_vector* items = ss_init_vector(sizeof(ast_node));

    char* token;
    token = strtok(node_string0->value, node_string1->value);

    ast_node_string* item_str = init_ast_node_string(
        (void*)0,
        token
    );
    ss_vector_append(items, (ast_node*) item_str);

    while (token != NULL) {
        token = strtok(NULL, node_string1->value);

        if (!token)
            continue;

        ast_node_string* item_str = init_ast_node_string(
            (void*)0,
            token
        );
        ss_vector_append(items, (ast_node*) item_str);
    }

    return (ast_node*) init_ast_node_vector(
        (void*)0,
        _DATA_TYPE_VECTOR,
        items        
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %r14
cmpl $0x5, (%r14)
jne 0x19ae
movq 0x8(%rax), %r15
cmpl $0x5, (%r15)
jne 0x19ae
pushq $0x18
popq %rdi
callq 0x4198
movq %rax, %rbx
movq 0x20(%r14), %rdi
movq 0x20(%r15), %rsi
callq 0x1120
movq %rax, %r14
xorl %edi, %edi
movq %rax, %rsi
callq 0x1624
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41c7
testq %r14, %r14
jne 0x1987
jmp 0x1997
xorl %edi, %edi
movq %rax, %rsi
callq 0x1624
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41c7
movq 0x20(%r15), %rsi
xorl %edi, %edi
callq 0x1120
testq %rax, %rax
jne 0x1972
pushq $0x2e
popq %rsi
xorl %edi, %edi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1720
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1444
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/default_scope_initialize.c
// Function: default_scope_initialize
void default_scope_initialize(scope* sc) {

    ss_vector* args = ss_init_vector(sizeof(ast_node));

    ast_node_function_definition* print_definition = init_ast_node_function_definition(
        init_token(_ID, "print"),
        _DATA_TYPE_VOID,
        args,
        (void*)0
    );

    print_definition->call = _print;
    save_function_definition(sc, print_definition);

    ast_node_function_definition* strlen_definition = init_ast_node_function_definition(
        init_token(_ID, "strlen"),
        _DATA_TYPE_INTEGER,
        args,
        (void*)0
    );

    strlen_definition->call = _strlen;
    save_function_definition(sc, strlen_definition);

    ast_node_function_definition* strsplit_definition = init_ast_node_function_definition(
        init_token(_ID, "strsplit"),
        _DATA_TYPE_VECTOR,
        args,
        (void*)0
    );

    strsplit_definition->call = _strsplit;
    save_function_definition(sc, strsplit_definition);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x4198
movq %rax, %r14
leaq 0x3668(%rip), %rsi      # 0x5046
pushq $0x1
popq %r15
movl %r15d, %edi
callq 0x42a0
pushq $0x2b
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1508
leaq -0x1cd(%rip), %rcx      # 0x1834
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4069
leaq 0x3635(%rip), %rsi      # 0x504c
movl %r15d, %edi
callq 0x42a0
pushq $0x29
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1508
leaq -0x160(%rip), %rcx      # 0x18d6
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4069
leaq 0x3607(%rip), %rsi      # 0x5053
movl %r15d, %edi
callq 0x42a0
pushq $0x2e
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1508
leaq -0x151(%rip), %rcx      # 0x191a
movq %rcx, 0x38(%rax)
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4069
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/eval.c
// Function: eval_file_contents
int eval_file_contents(char* filename, scope** sc) {
    (*sc) = init_scope();

    default_scope_initialize(*sc);

    char* file_contents = read_file(filename);
    lex_state* lex_state = lex_init(file_contents);
    parse_state* parse_state = parse_init(lex_state);

    ast_node* tree = (ast_node*) parse_parse(parse_state, (void*)0);
    interpret_visit(tree);

    free(tree);
    free(lex_state);
    free(parse_state);
    free(file_contents);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0x3fb0
movq %rax, (%rbx)
movq %rax, %rdi
callq 0x19bf
movq %r14, %rdi
callq 0x2a50
movq %rax, %rbx
movq %rax, %rdi
xorl %eax, %eax
callq 0x2ad4
movq %rax, %r14
movq %rax, %rdi
xorl %eax, %eax
callq 0x3130
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x3de3
movq %rax, %r12
movq %rax, %rdi
callq 0x1b80
movq %r12, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_compound
ast_node* interpret_visit_compound(ast_node_compound* node) {
    for (int i = 0; i < node->nodes->size; i++) {
        ast_node* child_node = (ast_node*)node->nodes->items[i];

        if (child_node->type == AST_TYPE_RETURN) {
           return interpret_visit(child_node);
        } else { 
            interpret_visit(child_node);
        }
    }

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
cmpq %r14, (%rax)
jbe 0x1cce
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rdi
movl (%rdi), %r15d
callq 0x1b80
cmpl $0x13, %r15d
je 0x1ccb
incq %r14
jmp 0x1ca7
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_if
ast_node* interpret_visit_if(ast_node_if* node) {
    int expr_int = 0;
    ast_node* expr = interpret_visit(node->expr);
    if (expr->type == AST_TYPE_INTEGER) {
        ast_node_integer* tmp_ast = (ast_node_integer*) expr;
        expr_int = tmp_ast->value;
        free(tmp_ast);
    }

    if (expr_int) {
        return interpret_visit((ast_node*)node->body);
    } else {
        return interpret_visit((ast_node*)node->elsenode);
    }

    return (ast_node*) init_ast_node_empty(node->tok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1b80
cmpl $0x3, (%rax)
jne 0x2405
movl 0x20(%rax), %r14d
movq %rax, %rdi
callq 0x1030
testl %r14d, %r14d
je 0x2405
pushq $0x28
jmp 0x2407
pushq $0x30
popq %rax
movq (%rbx,%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1b80
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_else
ast_node* interpret_visit_else(ast_node_else* node) {
    if (node->ifnode) {
        return interpret_visit((ast_node*)node->ifnode);
    } else {
        return interpret_visit((ast_node*)node->body);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x242b
movq %rax, %rdi
popq %rbp
jmp 0x1b80
movq 0x20(%rdi), %rdi
popq %rbp
jmp 0x1b80
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_while
ast_node* interpret_visit_while(ast_node_while* node) {
    int expr_int = 0;
    ast_node_integer* tmp_ast = (void*)0;

    ast_node* expr = interpret_visit((ast_node*) node->expr);
    if (expr->type == AST_TYPE_INTEGER) {
        tmp_ast = (ast_node_integer*) expr;
        expr_int = tmp_ast->value;
    }

    while(expr_int) {
        interpret_visit((ast_node*)node->body);

        expr = interpret_visit((ast_node* )node->expr);
        if (expr->type == AST_TYPE_INTEGER) {
            tmp_ast = (ast_node_integer*) expr;
            expr_int = tmp_ast->value;
        }
    }

    // causes undefined behaviour
    //free(tmp_ast);

    return (ast_node*) init_ast_node_empty(node->tok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1b80
xorl %r14d, %r14d
cmpl $0x3, (%rax)
je 0x2469
testl %r14d, %r14d
je 0x246f
movq 0x28(%rbx), %rdi
callq 0x1b80
movq 0x20(%rbx), %rdi
callq 0x1b80
jmp 0x244b
movl 0x20(%rax), %r14d
jmp 0x2450
movq 0x18(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1444
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_vecptr
ast_node* interpret_visit_vecptr(ast_node_vecptr* node) {
    ast_node* target = interpret_visit(node->target);
    ast_node* index = interpret_visit(node->index);

    if (target->type == AST_TYPE_STRING) {
        ast_node_string* target_string = (ast_node_string*) target;
        if (index->type == AST_TYPE_INTEGER) {
            ast_node_integer* index_integer = (ast_node_integer*) index;
            char value = target_string->value[index_integer->value];
            char* strval = char_to_string(value);
            return (ast_node*) init_ast_node_char(init_token(_CHAR, strval), value);
        }
    } else if (target->type == AST_TYPE_VECTOR) {
        ast_node_vector* target_vector = (ast_node_vector*) target;
        if (index->type == AST_TYPE_INTEGER) {
            ast_node_integer* index_integer = (ast_node_integer*) index;
            return (ast_node*) target_vector->vector->items[index_integer->value];
        }
    }

    return (ast_node*) interpret_visit(node->target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x1b80
movq %rax, %r14
movq 0x28(%rbx), %rdi
callq 0x1b80
movl (%r14), %ecx
cmpl $0x15, %ecx
je 0x27da
cmpl $0x5, %ecx
jne 0x27f4
cmpl $0x3, (%rax)
jne 0x27f4
movq 0x20(%r14), %rcx
movslq 0x20(%rax), %rax
movsbl (%rcx,%rax), %ebx
movl %ebx, %edi
callq 0x4238
pushq $0x26
popq %rdi
movq %rax, %rsi
callq 0x42a0
movq %rax, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x136c
cmpl $0x3, (%rax)
jne 0x27f4
movq 0x28(%r14), %rcx
movq 0x8(%rcx), %rcx
movslq 0x20(%rax), %rax
movq (%rcx,%rax,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1b80
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_variable
ast_node* interpret_visit_variable(ast_node_variable* node) {

    ast_node_variable_definition* definition = get_variable_definition(
        (scope*) ast_node_get_scope((ast_node*)node),
        node->tok->value
    );

    if (!definition) {
        // definition not found in the nodes scope, so let's look for it
        // in the global scope.
        definition = get_variable_definition(
            global_scope,
            node->tok->value
        );
    }

    if (definition) {
        ast_node* value = interpret_visit(definition->value);

        return value;
    } else {
        char msg[32];
        sprintf(msg, "could not find definition for: %s", node->tok->value);
        error_in_interpreter(msg);
    }

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x12b9
movq 0x18(%rbx), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x4085
testq %rax, %rax
jne 0x284e
leaq 0x589f(%rip), %rax      # 0x80d8
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x4085
testq %rax, %rax
je 0x285f
movq 0x28(%rax), %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1b80
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x29b4(%rip), %rsi      # 0x5222
leaq -0x30(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x1150
movq %r14, %rdi
callq 0x1ad9
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_function_call
ast_node* interpret_visit_function_call(ast_node_function_call* node) {
    ast_node_function_definition* definition = get_function_definition(
        (scope*) ast_node_get_scope((ast_node*) node),
        node->tok->value 
    );

    if (!definition) {
        // definition not found in the nodes scope, so let's look for it
        // in the global scope.
        definition = get_function_definition(
            global_scope,
            node->tok->value
        );
    }

    if (definition) {
        ss_vector* visited_args = ss_init_vector(sizeof(ast_node));

        for (int i = 0; i < node->args->size; i++) {
            ss_vector_append(
                visited_args,
                interpret_visit((ast_node*)node->args->items[i])
            );
        }

        if (definition->call) {
            return interpret_visit(definition->call(visited_args));
        }
        return interpret_visit((ast_node*)definition->body);
    } else {
        printf("could not find definition for %s\n", node->tok->value);
        return (void*)0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x12b9
movq 0x18(%rbx), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x40da
testq %rax, %rax
jne 0x28d4
leaq 0x5819(%rip), %rax      # 0x80d8
movq (%rax), %rdi
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x40da
testq %rax, %rax
je 0x2931
movq %rax, %r14
pushq $0x18
popq %rdi
callq 0x4198
movq %rax, %r15
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
cmpq %r12, (%rax)
jbe 0x290b
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rdi
callq 0x1b80
movq %r15, %rdi
movq %rax, %rsi
callq 0x41c7
incq %r12
jmp 0x28e5
movq 0x38(%r14), %rcx
testq %rcx, %rcx
je 0x2920
movq %r15, %rdi
xorl %eax, %eax
callq *%rcx
movq %rax, %rdi
jmp 0x2924
movq 0x30(%r14), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1b80
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0x2914(%rip), %rdi      # 0x5254
xorl %eax, %eax
callq 0x10a0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_variable_definition
ast_node* interpret_visit_variable_definition(ast_node_variable_definition* node) {
    node->value = interpret_visit(node->value);

    node->value = interpret_visit(node->value);

    if (
        (node->data_type == _DATA_TYPE_INTEGER && node->value->type != AST_TYPE_INTEGER) ||
        (node->data_type == _DATA_TYPE_FLOAT && node->value->type != AST_TYPE_FLOAT) ||
        (node->data_type == _DATA_TYPE_VOID && node->value->type != AST_TYPE_EMPTY) ||
        (node->data_type == _DATA_TYPE_STRING && node->value->type != AST_TYPE_STRING)
    ) {
        error_in_interpreter("Wrong data_type");
    }

    save_variable_definition(
        (scope*)ast_node_get_scope((
            ast_node*)node
         ),
        node
    );

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x1b80
movq %rax, 0x28(%rbx)
movq %rax, %rdi
callq 0x1b80
movq %rax, 0x28(%rbx)
movl 0x20(%rbx), %ecx
addl $-0x29, %ecx
cmpl $0x4, %ecx
ja 0x29a7
leaq 0x27ba(%rip), %rdx      # 0x5140
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x3, (%rax)
jne 0x299b
jmp 0x29a7
cmpl $0x0, (%rax)
je 0x29a7
leaq 0x2862(%rip), %rdi      # 0x5204
callq 0x1ad9
movq %rbx, %rdi
callq 0x12b9
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3fee
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpl $0x4, (%rax)
jne 0x299b
jmp 0x29a7
cmpl $0x5, (%rax)
jne 0x299b
jmp 0x29a7
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_function_definition
ast_node* interpret_visit_function_definition(ast_node_function_definition* node) {
    save_function_definition(
        (scope*)ast_node_get_scope((
                ast_node*)node
         ),
        node
    );

    return (ast_node*) node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x12b9
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4069
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/interpret.c
// Function: interpret_visit_interpreter_instr
ast_node* interpret_visit_interpreter_instr(ast_node_interpreter_instr* node) {
    struct scope* sc = ast_node_get_scope((ast_node*) node);

    int eval_i = eval_file_contents(node->value, (scope**) &sc);
    char eval_s[2]; // string that will hold int
    sprintf(eval_s, "%d", eval_i); // int to string conversion

    return (ast_node*) init_ast_node_integer(
        init_token(_INTEGER, eval_s),
        eval_i
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x12b9
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq 0x28(%rbx), %rdi
callq 0x1af8
movl %eax, %ebx
leaq 0x2855(%rip), %rsi      # 0x5276
leaq -0x12(%rbp), %r14
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x1150
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x42a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x1590
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/io.c
// Function: read_file
char* read_file(char* filename) {
    char * buffer = 0;
    long length;
    FILE * f = fopen (filename, "rb");

    if (f) {
        fseek (f, 0, SEEK_END);
        length = ftell (f);
        fseek (f, 0, SEEK_SET);
        buffer = calloc (length, length);
        if (buffer)
            fread (buffer, 1, length, f);

        fclose (f);
    }

    return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2818(%rip), %rsi      # 0x5279
callq 0x1110
testq %rax, %rax
je 0x2ac0
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x10f0
movq %rbx, %rdi
callq 0x10d0
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10f0
movq %r15, %rdi
movq %r15, %rsi
callq 0x10b0
movq %rax, %r14
testq %rax, %rax
je 0x2ab6
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x1060
movq %rbx, %rdi
callq 0x1080
jmp 0x2ac3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_init
lex_state* lex_init(char* buffer) {
    lex_state* state;
    state = malloc(sizeof(struct LEX_STATE_STRUCT));
    state->buffer = buffer;
    state->pos = 0;
    state->current_char = state->buffer[state->pos];

    return state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x10e0
movq %rbx, (%rax)
andl $0x0, 0xc(%rax)
movb (%rbx), %cl
movb %cl, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_string
char* lex_parse_string(lex_state* state) {
    lex_advance(state);

    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (state->current_char != '\0') {
        if (state->current_char == '"')
            break;

        buff = realloc(buff, strlen(buff) + ((sizeof(char) * 2) + 1));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    lex_advance(state);

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2af8
pushq $0x2
popq %rdi
pushq $0x8
popq %rsi
callq 0x10b0
movq %rax, %r14
movsbl 0x8(%rbx), %edi
callq 0x4238
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x2af8
movq %r15, %rdi
callq 0x1030
movzbl 0x8(%rbx), %r15d
testl %r15d, %r15d
je 0x2e33
cmpl $0x22, %r15d
je 0x2e33
movq %r14, %rdi
callq 0x1090
leaq 0x3(%rax), %rsi
movq %r14, %rdi
callq 0x1100
movq %rax, %r14
movsbl %r15b, %edi
jmp 0x2de3
movq %rbx, %rdi
callq 0x2af8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_id
char* lex_parse_id(lex_state* state) {
    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (isalnum(state->current_char) || state->current_char == '_') {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rdi
pushq $0x8
popq %rsi
callq 0x10b0
movq %rax, %r14
movsbl 0x8(%rbx), %edi
callq 0x4238
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x2af8
movq %r15, %rdi
callq 0x1030
callq 0x1170
movq %rax, %r15
pushq $0xa
popq %r12
movsbq 0x8(%rbx), %r13
cmpq $0x5f, %r13
je 0x2eb3
movq (%r15), %rax
movzwl (%rax,%r13,2), %eax
andl $0x8, %eax
je 0x2eea
movq %r14, %rdi
movq %r12, %rsi
callq 0x1100
movq %rax, %r14
movsbl %r13b, %edi
callq 0x4238
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x2af8
movq %r13, %rdi
callq 0x1030
jmp 0x2e9b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_char
char* lex_parse_char(lex_state* state) {
    lex_advance(state);

    char* buff;
    char* charstr;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);
    int count = 0;

    while (state->current_char != '\0') {
        if (state->current_char == '\'')
            break;

        if (count >= 1)
            error_in_lexer("Characters can only have one character");

        buff = realloc(buff, strlen(buff) + ((sizeof(char) * 2) + 1));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
        count++;
    }

    lex_advance(state);

    return buff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2af8
pushq $0x2
popq %rdi
pushq $0x8
popq %rsi
callq 0x10b0
movq %rax, %r14
movsbl 0x8(%rbx), %edi
callq 0x4238
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x2af8
movq %r15, %rdi
callq 0x1030
xorl %r13d, %r13d
leaq 0x23c5(%rip), %r15      # 0x5316
movzbl 0x8(%rbx), %r12d
testl %r12d, %r12d
je 0x2fb3
cmpl $0x27, %r12d
je 0x2fb3
subl $0x1, %r13d
jb 0x2f73
movq %r15, %rdi
callq 0x1a9f
movb 0x8(%rbx), %r12b
movq %r14, %rdi
callq 0x1090
leaq 0x3(%rax), %rsi
movq %r14, %rdi
callq 0x1100
movq %rax, %r14
movsbl %r12b, %edi
callq 0x4238
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x1140
movq %rbx, %rdi
callq 0x2af8
movq %r12, %rdi
callq 0x1030
jmp 0x2f51
movq %rbx, %rdi
callq 0x2af8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_parse_number
token* lex_parse_number(lex_state* state) {
    char* buff;
    char* charstr;
    int type = _INTEGER;

    buff = calloc(2, sizeof(char*));
    charstr = char_to_string(state->current_char);
    strcat(buff, charstr);
    lex_advance(state);
    free(charstr);

    while (isdigit(state->current_char)) {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);
        free(charstr);
    }

    // float
    if (state->current_char == '.') {
        buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
        charstr = char_to_string(state->current_char);
        strcat(buff, charstr);
        lex_advance(state);

        while (isdigit(state->current_char)) {
            buff = realloc(buff, sizeof(buff) + (sizeof(char) * 2));
            charstr = char_to_string(state->current_char);
            strcat(buff, charstr);
            lex_advance(state);
        }

        free(charstr);

        type = _FLOAT;
    }

    return init_token(type, buff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x2
popq %rdi
pushq $0x8
popq %rsi
callq 0x10b0
movq %rax, %rbx
movsbl 0x8(%r14), %edi
callq 0x4238
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq %r14, %rdi
callq 0x2af8
movq %r15, %rdi
callq 0x1030
callq 0x1170
movq %rax, %r15
pushq $0xa
popq %r12
movq (%r15), %rax
movsbq 0x8(%r14), %r13
testb $0x8, 0x1(%rax,%r13,2)
je 0x3067
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1100
movq %rax, %rbx
movsbl %r13b, %edi
callq 0x4238
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq %r14, %rdi
callq 0x2af8
movq %r13, %rdi
callq 0x1030
jmp 0x3020
cmpb $0x2e, %r13b
jne 0x30b9
movb $0x2e, %r12b
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x1100
movq %rax, %rbx
movsbl %r12b, %edi
callq 0x4238
movq %rax, %r13
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1140
movq %r14, %rdi
callq 0x2af8
movq (%r15), %rax
movsbq 0x8(%r14), %r12
testb $0x8, 0x1(%rax,%r12,2)
jne 0x3070
movq %r13, %rdi
callq 0x1030
pushq $0x27
jmp 0x30bb
pushq $0x2
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x42a0
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/lex.c
// Function: lex_peek_next
char lex_peek_next(lex_state* state, int start) {
    int peek_pos = start;
    char c = '\0';

    while (peek_pos < (int)strlen(state->buffer)) {
        c = state->buffer[peek_pos];

        if (c == '\0' || c == ' ' || c == '\n') {
            peek_pos++;
            continue;
        } else {
            break;
        }
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x1090
movslq %r14d, %rcx
movslq %eax, %rdx
xorl %eax, %eax
movabsq $0x100000401, %rsi      # imm = 0x100000401
cmpq %rdx, %rcx
jge 0x3113
movzbl (%rbx,%rcx), %eax
cmpq $0x20, %rax
ja 0x3113
btq %rax, %rsi
jae 0x3113
incq %rcx
jmp 0x30f9
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_init
parse_state* parse_init(lex_state* lex) {
    parse_state* state;
    state = malloc(sizeof(struct PARSE_STATE_STRUCT));
    state->lex = lex;
    state->current_token = lex_get_next_token(state->lex);

    return state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x10e0
movq %rax, %r14
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x2b19
movq %rax, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_eat
void parse_eat(parse_state* state, int token_type) {
    if (state->current_token->type == token_type) {
        state->current_token = lex_get_next_token(state->lex);
    } else {
        printf("Unexpected token_type: `%d` (was expecting `%d`)\n", state->current_token->type, token_type);
        // TODO: error
    }
}

// Assembly:
movl %esi, %edx
movq 0x8(%rdi), %rax
movl (%rax), %esi
cmpl %edx, %esi
jne 0x3184
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2b19
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2215(%rip), %rdi      # 0x53a0
xorl %eax, %eax
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_integer
ast_node_integer* parse_integer(parse_state* state, scope* sc) {
    ast_node_integer* node = init_ast_node_integer(state->current_token, atoi(state->current_token->value));
    parse_eat(state, _INTEGER);
    ast_node_set_scope((ast_node*) node, (struct scope*) sc);
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x8(%r15), %rdi
callq 0x1130
movq %r15, %rdi
movl %eax, %esi
callq 0x1590
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_vecptr
ast_node_vecptr* parse_vecptr(parse_state* state, scope* sc) {
    ast_node* target = parse_expr(state, sc);
    parse_eat(state, _LBRACKET);
    ast_node* index = (ast_node*) parse_expr(state, sc);
    parse_eat(state, _RBRACKET);

    ast_node_vecptr* vecptr_node = init_ast_node_vecptr(
        (void*)0,
        target,
        index
    );

    ast_node_set_scope((ast_node*)vecptr_node, (struct scope*) sc);

    return vecptr_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3244
movq %rax, %r15
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq %rax, %r12
pushq $0x23
popq %rsi
movq %r14, %rdi
callq 0x315c
xorl %edi, %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x16e4
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_expr
ast_node* parse_expr(parse_state* state, scope* sc) {
    token* tok = (void*)0;

    // invalid pointer type
    ast_node* node = parse_term(state, sc);

    if (state->current_token->type == _LBRACKET) {
        tok = state->current_token;
        parse_eat(state, _LBRACKET);
        ast_node_vecptr* vecptrnode = init_ast_node_vecptr((void*)0, node, parse_expr(state, sc));
        parse_eat(state, _RBRACKET);
        return (ast_node*) vecptrnode;
    }

    while(
            state->current_token->type == _OP_PLUS ||
            state->current_token->type == _OP_SUBTRACT ||
            state->current_token->type == _NOT_EQUALS ||
            state->current_token->type == _LESS_THAN ||
            state->current_token->type == _LARGER_THAN ||
            state->current_token->type == _LESS_OR_EQUALS ||
            state->current_token->type == _LARGER_OR_EQUALS ||
            state->current_token->type == _EQUALS_EQUALS ||
            state->current_token->type == _DOT
         ) {
        tok = state->current_token;

        if (tok->type == _OP_PLUS) {
            parse_eat(state, _OP_PLUS);
        } else if (tok->type == _OP_SUBTRACT) {
            parse_eat(state, _OP_SUBTRACT);
        } else if (tok->type == _NOT_EQUALS) {
            parse_eat(state, _NOT_EQUALS);
        } else if (tok->type == _LESS_THAN) {
            parse_eat(state, _LESS_THAN);
        } else if (tok->type == _LARGER_THAN) {
            parse_eat(state, _LARGER_THAN);
        } else if (tok->type == _LESS_OR_EQUALS) {
            parse_eat(state, _LESS_OR_EQUALS);
        } else if (tok->type == _LARGER_OR_EQUALS) {
            parse_eat(state, _LARGER_OR_EQUALS);
        } else if (tok->type == _EQUALS_EQUALS) {
            parse_eat(state, _EQUALS_EQUALS);
        } else if (tok->type == _DOT) {
            parse_eat(state, _DOT);
        }

        // invalid pointer type
        node = (ast_node*) init_ast_node_binop(tok, node, parse_term(state, sc));
        ast_node_set_scope((ast_node*) node, (struct scope*) sc);
    };

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3a22
movq %rax, %r15
movq 0x8(%rbx), %r12
movl (%r12), %esi
cmpl $0x22, %esi
jne 0x32a3
pushq $0x22
popq %rsi
movq %rbx, %rdi
callq 0x315c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3244
xorl %edi, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x16e4
movq %rax, %r14
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x315c
movq %r14, %rax
jmp 0x32f6
movabsq $0x1007e00060, %r13     # imm = 0x1007E00060
cmpl $0x24, %esi
ja 0x32f3
movl %esi, %eax
btq %rax, %r13
jae 0x32f3
movq %rbx, %rdi
callq 0x315c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a22
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1318
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x12d2
movq 0x8(%rbx), %r12
movl (%r12), %esi
jmp 0x32ad
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_vector
ast_node_vector* parse_vector(parse_state* state, scope* sc) {
    parse_eat(state, _LBRACKET);
    ss_vector* items = ss_init_vector(sizeof(ast_node));
    
    ss_vector_append(items, (ast_node*) parse_expr(state, sc));
    
    while (state->current_token->type == _COMMA) {
        parse_eat(state, _COMMA);
        ss_vector_append(items, (ast_node*) parse_expr(state, sc));
    }

    parse_eat(state, _RBRACKET);

    ast_node_vector* node = init_ast_node_vector(
        state->current_token,
        0,
        items
    );

    ast_node_set_scope((ast_node*) node, (struct scope*) sc);

    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x22
popq %rsi
callq 0x315c
pushq $0x18
popq %rdi
callq 0x4198
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq %r15, %rdi
movq %rax, %rsi
callq 0x41c7
pushq $0x10
popq %r12
movq 0x8(%r14), %rax
cmpl $0x10, (%rax)
jne 0x336f
movq %r14, %rdi
movl %r12d, %esi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq %r15, %rdi
movq %rax, %rsi
callq 0x41c7
jmp 0x3343
pushq $0x23
popq %rsi
movq %r14, %rdi
callq 0x315c
movq 0x8(%r14), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1720
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_float
ast_node_float* parse_float(parse_state* state, scope* sc) {
    ast_node_float* node = init_ast_node_float(state->current_token, atof(state->current_token->value));
    parse_eat(state, _FLOAT);
    ast_node_set_scope((ast_node*) node, (struct scope*) sc);
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x8(%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movq %r15, %rdi
callq 0x1464
movq %rax, %r15
pushq $0x27
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_return
ast_node_return* parse_return(parse_state* state, scope* sc) {
    parse_eat(state, _RETURN);
    ast_node* expr = parse_expr(state, sc);

    ast_node_return* return_ast = init_ast_node_return(
        state->current_token,
        expr
    );

    ast_node_set_scope((ast_node*) return_ast, (struct scope*) sc);

    return return_ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x11
popq %rsi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq 0x8(%r14), %rdi
movq %rax, %rsi
callq 0x15f8
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_while
ast_node_while* parse_while(parse_state* state, scope* sc) {
    parse_eat(state, _WHILE);
    parse_eat(state, _LPAREN);
    ast_node* expr = parse_expr(state, sc);
    parse_eat(state, _RPAREN);
    parse_eat(state, _LBRACE);

    ast_node_compound* body = parse_compound(state, sc);
    ast_node_set_scope((ast_node*) body, (struct scope*) sc);

    parse_eat(state, _RBRACE);

    ast_node_while* while_ast = init_ast_node_while(
        state->current_token,
        expr,
        body
    );

    ast_node_set_scope((ast_node*) while_ast, (struct scope*) sc);

    return while_ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1d
popq %rsi
callq 0x315c
pushq $0xc
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq %rax, %r15
pushq $0xd
popq %rsi
movq %r14, %rdi
callq 0x315c
pushq $0xe
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34c9
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
pushq $0xf
popq %rsi
movq %r14, %rdi
callq 0x315c
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x175c
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_foreach
ast_node_foreach* parse_foreach(parse_state* state, scope* sc) {
    parse_eat(state, _FOREACH);
    parse_eat(state, _LPAREN);
    ast_node* iterable = parse_expr(state, sc);
    parse_eat(state, _AS);
    token* value_name_tok = state->current_token;
    parse_eat(state, _ID);
    parse_eat(state, _RPAREN);
    parse_eat(state, _LBRACE);
    ast_node_compound* body = parse_compound(state, sc);
    parse_eat(state, _RBRACE);

    ast_node_foreach* foreach_ast = init_ast_node_foreach(
        value_name_tok,
        iterable,
        value_name_tok,
        body        
    );

    ast_node_set_scope((ast_node*) foreach_ast, (struct scope*) sc);

    return foreach_ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1e
popq %rsi
callq 0x315c
pushq $0xc
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3244
movq %rax, %r15
pushq $0x1f
popq %rsi
movq %r14, %rdi
callq 0x315c
movq 0x8(%r14), %r12
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x315c
pushq $0xd
popq %rsi
movq %r14, %rdi
callq 0x315c
pushq $0xe
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34c9
movq %rax, %r13
pushq $0xf
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x1498
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sebbekarlsson[P]cola/src/parse.c
// Function: parse_else
ast_node_else* parse_else(parse_state* state, scope* sc) {
    parse_eat(state, _ELSE);
    ast_node_if* ifnode = (void*)0;
    ast_node_compound* body = (void*)0;

    if (state->current_token->type == _IF) {
        ifnode = parse_if(state, sc);
    } else {
        parse_eat(state, _LBRACE);
        body =  parse_compound(state, sc);
        parse_eat(state, _RBRACE);
    }

    ast_node_else* else_ast = init_ast_node_else(
        state->current_token,
        body,
        (struct ast_node_if*) ifnode
    );

    ast_node_set_scope((ast_node*) else_ast, (struct scope*) sc);

    return else_ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x13
popq %rsi
callq 0x315c
movq 0x8(%r14), %rax
cmpl $0x12, (%rax)
jne 0x35c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x360e
movq %rax, %rdx
xorl %r15d, %r15d
jmp 0x35e6
pushq $0xe
popq %rsi
movq %r14, %rdi
callq 0x315c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34c9
movq %rax, %r15
pushq $0xf
popq %rsi
movq %r14, %rdi
callq 0x315c
xorl %edx, %edx
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x1408
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12d2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq