LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: primitive_add
void primitive_add(vm_t *vm, env_t *env, const char *name, size_t len,
                   primitive_fn fn) {
    symbol_t *sym = symbol_intern(vm, name, len);

    primitive_t *prim = primitive_new(vm, fn);

    prim->name = sym;

    variable_add(vm, env, sym, PTR_VAL(prim));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x49da
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x484b
movq %r12, 0x10(%rax)
movabsq $-0x4000000000000, %rcx # imm = 0xFFFC000000000000
orq %rcx, %rax
orq %rcx, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4a42
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4a42
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: apply
value_t apply(vm_t *vm, env_t *env, value_t fn, value_t args) {
    if (!IS_NIL(args) && !IS_CONS(args)) {
        error_runtime(vm, "|apply: Cannot apply to a non-list!");
        return NIL_VAL;
    }
    if (IS_PRIMITIVE(fn)) {
        primitive_t *prim = AS_PRIMITIVE(fn);
        return prim->fn(vm, env, args);
    } else if (IS_FUNCTION(fn)) {
        function_t *func = AS_FUNCTION(fn);
        value_t eargs = eval_list(vm, env, args);
        if (IS_PTR(eargs)) {
            vm_push_temp(vm, AS_PTR(eargs));
        }
        value_t result = apply_func(vm, env, func, eargs);
        if (IS_PTR(eargs)) {
            vm_pop_temp(vm);  // eargs
        }
        return result;
    }

    error_runtime(vm, "|apply: Cannot apply something else than a procedure!");
    return NIL_VAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %r14
movabsq $-0x4000000000001, %rbp # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0x7ffc000000000001, %rbx # imm = 0x7FFC000000000001
cmpq %rbx, %rcx
jne 0x537c
cmpq %rbp, %r15
jbe 0x539c
movabsq $0x3ffffffffffff, %r12  # imm = 0x3FFFFFFFFFFFF
andq %r12, %r15
movl (%r15), %eax
cmpl $0x4, %eax
je 0x53bf
cmpl $0x3, %eax
jne 0x539c
movq 0x18(%r15), %rax
movq %r14, %rdi
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
cmpq %rbp, %rcx
jbe 0x5393
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rcx, %rax
cmpl $0x0, (%rax)
je 0x5343
leaq 0x1824(%rip), %rsi      # 0x6bbe
jmp 0x53a3
leaq 0x183f(%rip), %rsi      # 0x6be2
movq %r14, %rdi
xorl %eax, %eax
callq 0x4cc4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rcx, %rdx
callq 0x5457
movq %rax, %r13
cmpq %rbp, %rax
jbe 0x53e0
movq %r13, %rsi
andq %r12, %rsi
movq %r14, %rdi
callq 0x5104
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %r14, %rdi
movq %r13, (%rsp)
movq %r13, %rcx
callq 0x51c7
movq 0x28(%r15), %r15
cmpq %rbx, %r15
jne 0x5406
addq $0x4, %rbx
jmp 0x5427
movq %rax, %r13
andq %r12, %r15
movq 0x10(%r15), %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x5627
movq 0x18(%r15), %r15
cmpq %rbx, %r15
jne 0x5409
movq %rax, %rbx
cmpq %rbp, (%rsp)
jbe 0x53ad
movq 0x78(%r14), %rax
testq %rax, %rax
jne 0x544b
leaq 0x173a(%rip), %rsi      # 0x6b77
movq %r14, %rdi
xorl %eax, %eax
callq 0x4cc4
movq 0x78(%r14), %rax
decq %rax
movq %rax, 0x78(%r14)
jmp 0x53ad
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: eval_list
value_t eval_list(vm_t *vm, env_t *env, value_t list) {
    if (IS_NIL(list)) {
        return NIL_VAL;
    }
    cons_t *head = NULL;
    cons_t *tail = NULL;

    for (cons_t *cons = AS_CONS(list);; cons = AS_CONS(cons->cdr)) {
        value_t temp = eval(vm, env, cons->car);
        if (head == NULL) {
            head = tail = AS_CONS(cons_fn(vm, temp, NIL_VAL));
            vm_push_temp(vm, (ptrvalue_t *) (head));
        } else {
            tail->cdr = cons_fn(vm, temp, NIL_VAL);
            tail = AS_CONS(tail->cdr);
        }
        if (IS_NIL(cons->cdr)) {
            break;
        }
    }
    vm_pop_temp(vm);  // head
    return PTR_VAL(head);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movabsq $0x7ffc000000000001, %r14 # imm = 0x7FFC000000000001
cmpq %r14, %rdx
je 0x5526
movq %rdx, %r15
movq %rdi, %rbx
movabsq $0x3ffffffffffff, %rbp  # imm = 0x3FFFFFFFFFFFF
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
andq %rbp, %r15
movq 0x10(%r15), %rdx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x5627
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x4a42
movq %rax, %r13
cmpq $0x0, 0x8(%rsp)
je 0x54d0
movq %r13, 0x18(%r12)
andq %rbp, %r13
jmp 0x54e3
andq %rbp, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5104
movq %r13, 0x8(%rsp)
movq %r13, %r12
movq 0x18(%r15), %r15
cmpq %r14, %r15
jne 0x5499
movq 0x78(%rbx), %rax
testq %rax, %rax
jne 0x550d
leaq 0x1678(%rip), %rsi      # 0x6b77
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4cc4
movq 0x78(%rbx), %rax
decq %rax
movq %rax, 0x78(%rbx)
movabsq $-0x4000000000000, %rax # imm = 0xFFFC000000000000
movq 0x8(%rsp), %r14
orq %rax, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: find
value_t find(env_t *env, symbol_t *sym) {
    for (env_t *e = env; e != NULL; e = e->up) {
        if (IS_NIL(e->variables)) {
            // we're not going to find anything here, let's move on
            continue;
        }
        value_t pair, iter;
        SCM_FOREACH (pair, AS_CONS(e->variables), iter) {
            symbol_t *key = AS_SYMBOL(AS_CONS(pair)->car);
            if (key == sym) {
                return AS_CONS(pair)->cdr;
            }
        }
    }

    fprintf(stderr, "|find: Error: Symbol %s not bound\n", sym->name);
    // error_runtime(vm, "|find: Symbol %s is not bound in environment!",
    // sym->name);
    return UNDEFINED_VAL;
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movabsq $0x7ffc000000000001, %rbx # imm = 0x7FFC000000000001
testq %rdi, %rdi
je 0x5583
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
movq 0x10(%rdi), %rcx
cmpq %rbx, %rcx
je 0x557a
andq %rax, %rcx
movq 0x10(%rcx), %rsi
andq %rax, %rsi
movq 0x10(%rsi), %r8
andq %rax, %r8
cmpq %rdx, %r8
je 0x55a5
movq 0x18(%rcx), %rcx
jmp 0x5559
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x5555
movq 0x4a6e(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
addq $0x20, %rdx
leaq 0x1680(%rip), %rsi      # 0x6c18
xorl %eax, %eax
callq 0x1130
addq $0x3, %rbx
jmp 0x55a9
movq 0x18(%rsi), %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: find_replace
value_t find_replace(env_t *env, symbol_t *sym, value_t new_val) {
    for (env_t *e = env; e != NULL; e = e->up) {
        if (IS_NIL(e->variables)) {
            // we're not going to find anything here, let's move on
            continue;
        }
        value_t pair, iter;
        SCM_FOREACH (pair, AS_CONS(e->variables), iter) {
            symbol_t *key = AS_SYMBOL(AS_CONS(pair)->car);
            if (key == sym) {
                AS_CONS(pair)->cdr = new_val;
                return new_val;
            }
        }
    }

    fprintf(stderr, "|find-replace: Error: Symbol %s not bound\n", sym->name);
    // error_runtime(vm, "|find: Symbol %s is not bound in environment!",
    // sym->name);
    return UNDEFINED_VAL;
}

// Assembly:
pushq %rbx
movq %rdx, %rax
movq %rsi, %rdx
movabsq $0x7ffc000000000001, %rbx # imm = 0x7FFC000000000001
testq %rdi, %rdi
je 0x55fc
movabsq $0x3ffffffffffff, %rcx  # imm = 0x3FFFFFFFFFFFF
movq 0x10(%rdi), %rsi
cmpq %rbx, %rsi
je 0x55f3
andq %rcx, %rsi
movq 0x10(%rsi), %r8
andq %rcx, %r8
movq 0x10(%r8), %r9
andq %rcx, %r9
cmpq %rdx, %r9
je 0x5621
movq 0x18(%rsi), %rsi
jmp 0x55d2
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x55ce
movq 0x49f5(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
addq $0x20, %rdx
leaq 0x162a(%rip), %rsi      # 0x6c3b
xorl %eax, %eax
callq 0x1130
addq $0x3, %rbx
movq %rbx, %rax
jmp 0x5625
movq %rax, 0x18(%r8)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: eval
value_t eval(vm_t *vm, env_t *env, value_t val) {
    if (IS_VAL(val) || IS_STRING(val) || IS_PROCEDURE(val) || IS_VECTOR(val) ||
        IS_ENV(val)) {
        // These values are self evaluating
        return val;
    } else if (IS_SYMBOL(val)) {
        // This is a variable
        symbol_t *sym = AS_SYMBOL(val);
        value_t result = find(env, sym);
        if (IS_UNDEFINED(result)) {
            error_runtime(vm, "|eval: Can't eval %s - symbol not bound!",
                          sym->name);
        }
        return result;
    } else if (IS_CONS(val)) {
        // It's a function application
        value_t expanded = expand(vm, env, val);

        if (!IS_EQ(expanded, val)) {
            // macros encountered and expanded, now eval the expanded value
            return eval(vm, env, expanded);
        }

        cons_t *cons = AS_CONS(val);
        value_t fn = eval(vm, env, cons->car);
        value_t args = cons->cdr;

        if (!IS_PROCEDURE(fn)) {
            error_runtime(vm, "|eval: Car of eval'd cons is not a procedure!");
        }
        return apply(vm, env, fn, args);
    }

    // This should be an assert
    error_runtime(vm, "|eval: Cannot eval - unknown value type!");
    return NIL_VAL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movabsq $-0x4000000000001, %rbp # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
cmpq %rbp, %r12
jbe 0x56e5
movq %r12, %r15
andq %r13, %r15
movl (%r15), %eax
testl %eax, %eax
jne 0x56d6
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x5757
cmpq %r12, %rax
movq %rax, %r12
jne 0x564f
movq 0x10(%r15), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5627
movq %rax, %r12
movq 0x18(%r15), %r15
cmpq %rbp, %rax
jbe 0x56a6
movq %r12, %rax
andq %r13, %rax
movl (%rax), %eax
addl $-0x3, %eax
cmpl $0x2, %eax
jb 0x56b7
leaq 0x15e2(%rip), %rsi      # 0x6c8f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4cc4
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5319
cmpl $0x7, %eax
ja 0x5736
movl $0xda, %ecx
btl %eax, %ecx
jae 0x56f7
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %eax
jne 0x5736
movabsq $0x7ffc000000000004, %r13 # imm = 0x7FFC000000000004
movq %r14, %rdi
movq %r15, %rsi
callq 0x5538
movq %rax, %r12
cmpq %r13, %rax
jne 0x56e5
addq $0x20, %r15
leaq 0x1542(%rip), %rsi      # 0x6c66
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4cc4
movq %r13, %r12
jmp 0x56e5
leaq 0x1580(%rip), %rsi      # 0x6cbd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4cc4
movabsq $0x7ffc000000000004, %r12 # imm = 0x7FFC000000000004
addq $-0x3, %r12
jmp 0x56e5
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/vm.c
// Function: expand
value_t expand(vm_t *vm, env_t *env, value_t val) {
    symbol_t *sym;
    if (IS_SYMBOL(val)) {
        sym = AS_SYMBOL(val);
    } else if (IS_CONS(val) && IS_SYMBOL(AS_CONS(val)->car)) {
        sym = AS_SYMBOL(AS_CONS(val)->car);
    } else {
        return val;
    }

    value_t found = find(env, sym);
    if (IS_UNDEFINED(found) || !IS_MACRO(found)) {
        return val;
    }

    function_t *macro = AS_MACRO(found);
    value_t args = AS_CONS(val)->cdr;
    return apply_func(vm, env, macro, args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdx, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x582b
movq %rdi, %rbx
movabsq $-0x4000000000001, %rbp # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
movq %r14, %r15
andq %r13, %r15
movl (%r15), %ecx
movq %r15, %rax
cmpl $0x2, %ecx
je 0x57b8
testl %ecx, %ecx
jne 0x582b
movq 0x10(%r15), %rax
cmpq %rbp, %rax
jbe 0x582b
andq %r13, %rax
cmpl $0x2, (%rax)
jne 0x582b
movq %rsi, %rdi
movq %rax, %rsi
callq 0x5538
cmpq %rbp, %rax
jbe 0x582b
movq %rax, %r12
andq %r13, %r12
cmpl $0x5, (%r12)
jne 0x582b
movabsq $0x7ffc000000000001, %rbp # imm = 0x7FFC000000000001
movq 0x18(%r15), %rcx
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rbx, %rdi
callq 0x51c7
movq 0x28(%r12), %r12
cmpq %rbp, %r12
jne 0x5808
orq $0x4, %rbp
movq %rbp, %r14
jmp 0x582b
movq %rax, %r15
andq %r13, %r12
movq 0x10(%r12), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5627
movq %rax, %r14
movq 0x18(%r12), %r12
cmpq %rbp, %r12
jne 0x580b
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_O3/jiribenes[P]scheme/src/vm.c
// Function: begin
value_t begin(vm_t *vm, env_t *env, value_t val) {
    value_t result = VOID_VAL;
    if (IS_NIL(val)) {
        return result;
    }
    value_t arg, iter;
    SCM_FOREACH (arg, AS_CONS(val), iter) { result = eval(vm, env, arg); }
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movabsq $0x7ffc000000000001, %rbx # imm = 0x7FFC000000000001
cmpq %rbx, %rdx
jne 0x585b
orq $0x4, %rbx
jmp 0x588c
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
andq %r13, %r14
movq 0x10(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x5627
movq 0x18(%r14), %r14
cmpq %rbx, %r14
jne 0x586e
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/write.c
// Function: write_cons
static void write_cons(FILE *f, cons_t *cons) {
    // First check if the list is circular
    // (we don't want to recurse forever)
    int32_t len = cons_len(PTR_VAL(cons));
    if (len == -1) {
        fprintf(f, "#<circular list>");
        return;
    }

    value_t arg, iter;
    SCM_FOREACH (arg, cons, iter) {
        write(f, arg);

        if (IS_NIL(AS_CONS(iter)->cdr)) {
            return;
        } else if (IS_CONS(AS_CONS(iter)->cdr)) {
            fprintf(f, " ");
        } else {
            fprintf(f, " . ");
            write(f, AS_CONS(iter)->cdr);
            return;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movabsq $-0x4000000000001, %r15 # imm = 0xFFFBFFFFFFFFFFFF
leaq 0x1(%r15), %r14
orq %rsi, %r14
movq %r14, %rdi
callq 0x4a8d
cmpl $-0x1, %eax
je 0x5d33
movabsq $0x7ffc000000000001, %r12 # imm = 0x7FFC000000000001
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
andq %r13, %r14
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x59fc
movq 0x18(%r14), %rax
cmpq %r12, %rax
je 0x5d29
cmpq %r15, %rax
jbe 0x5d55
andq %r13, %rax
cmpl $0x0, (%rax)
jne 0x5d55
movl $0x20, %edi
movq %rbx, %rsi
callq 0x1100
movq 0x18(%r14), %r14
cmpq %r12, %r14
jne 0x5cee
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10cd(%rip), %rdi      # 0x6e07
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11c0
leaq 0x10bc(%rip), %rdi      # 0x6e18
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x59fc
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/write.c
// Function: write_string
static void write_string(FILE *f, string_t *str) {
    fprintf(f, "\"");

    for (uint32_t i = 0; i < str->len; i++) {
        char c = str->value[i];
        if (c == '\n') {
            fprintf(f, "\\n");
        } else if (c == '\\') {
            fprintf(f, "\\\\");
        } else if (c == '\"') {
            fprintf(f, "\\\"");
        } else {
            fprintf(f, "%c", c);
        }
    }

    fprintf(f, "\"");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x22, %edi
movq %rbx, %rsi
callq 0x1100
cmpl $0x0, 0x10(%r14)
je 0x5e20
xorl %ebp, %ebp
leaq 0x106e(%rip), %r15      # 0x6e1f
leaq 0x106a(%rip), %r12      # 0x6e22
leaq 0x105d(%rip), %r13      # 0x6e1c
movzbl 0x18(%r14,%rbp), %eax
cmpl $0x5c, %eax
je 0x5df2
cmpl $0x22, %eax
je 0x5de3
cmpl $0xa, %eax
jne 0x5e09
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
jmp 0x5dff
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
jmp 0x5dff
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x11c0
jmp 0x5e14
movsbl %al, %edi
movq %rbx, %rsi
callq 0x1100
incq %rbp
movl 0x10(%r14), %eax
cmpq %rax, %rbp
jb 0x5dbf
movl $0x22, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O3/jiribenes[P]scheme/src/write.c
// Function: write_vector
static void write_vector(FILE *f, vector_t *vec) {
    fprintf(f, "#(");
    for (uint32_t i = 0; i < vec->count; i++) {
        write(f, vec->data[i]);
        if (i + 1 != vec->count) {
            fprintf(f, " ");
        }
    }
    fprintf(f, ")");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xf8b(%rip), %rdi       # 0x6e25
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
cmpl $0x0, 0x14(%r14)
je 0x5ee8
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x59fc
incq %r15
movl 0x14(%r14), %eax
cmpq %rax, %r15
je 0x5ee3
movl $0x20, %edi
movq %rbx, %rsi
callq 0x1100
movl 0x14(%r14), %eax
cmpq %rax, %r15
jb 0x5eb6
movl $0x29, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1100
// File: /workspace/github_c_makefile_star2_O3/chipkin[P]Linux-HighSpeedSerialMonitor/linuxMSTPFunctions.c
// Function: mstp_RecvByte(unsigned char*)
bool mstp_RecvByte(uint8_t* buffer)
{
    if (serailFD == -1) {
        std::cerr << "Error: serial port has not been connected yet. " << std::endl;
        return false;
    }

    if (read(serailFD, buffer, 1) != 1) {
        return false;
    }

    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rsi
movl 0x29ce(%rip), %edi      # 0x619c
cmpl $-0x1, %edi
je 0x37e6
movl $0x1, %edx
callq 0x2220
cmpq $0x1, %rax
sete %al
jmp 0x382a
movq 0x2803(%rip), %rbx      # 0x5ff0
leaq 0xc26(%rip), %rsi       # 0x441a
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/chipkin[P]Linux-HighSpeedSerialMonitor/linuxMSTPFunctions.c
// Function: mstp_SendByte(unsigned char*, unsigned int)
bool mstp_SendByte(uint8_t* buffer, uint32_t length)
{
    if (serailFD == -1) {
        std::cerr << "Error: serial port has not been connected yet. " << std::endl;
        return false;
    }

    if (write(serailFD, buffer, length) != length) {
        return false;
    }
    return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rax
movl 0x2966(%rip), %edi      # 0x619c
cmpl $-0x1, %edi
je 0x3850
movl %esi, %ebx
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2090
cmpq %rbx, %rax
sete %al
jmp 0x3894
movq 0x2799(%rip), %rbx      # 0x5ff0
leaq 0xbbc(%rip), %rsi       # 0x441a
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/chipkin[P]Linux-HighSpeedSerialMonitor/linuxMSTPFunctions.c
// Function: mstp_Sleep(unsigned int)
void mstp_Sleep(uint32_t ms)
{
    // 1000 nano  seconds (nsec) == 1 micro seconds
    // 1000 micro seconds (us)  == 1 mili  seconds
    // 1000 mili  seconds (ms)  == 1 seconds
    //    1       second  (sec) == 1,000,000 micro seconds (us)

    uint32_t usec = ms * 1000;
    static struct timespec delay, rem;
    delay.tv_sec = usec / 1000000;

    delay.tv_nsec = (usec - (delay.tv_sec * 1000000)) * 1000;
    int ret = -1;
    while (ret != 0) {
        ret = nanosleep(&delay, &rem);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
imull $0x3e8, %edi, %eax      # imm = 0x3E8
imulq $0x431bde83, %rax, %rcx # imm = 0x431BDE83
shrq $0x32, %rcx
movq %rcx, 0x28fe(%rip)      # 0x61b0
imulq $-0xf4240, %rcx, %rcx   # imm = 0xFFF0BDC0
addq %rax, %rcx
imulq $0x3e8, %rcx, %rax      # imm = 0x3E8
movq %rax, 0x28ee(%rip)      # 0x61b8
leaq 0x28df(%rip), %rbx      # 0x61b0
leaq 0x28e8(%rip), %r14      # 0x61c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2060
testl %eax, %eax
jne 0x38d8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/chipkin[P]Linux-HighSpeedSerialMonitor/linuxMSTPFunctions.c
// Function: mstp_TimerDifference()
uint32_t mstp_TimerDifference()
{
    struct timeval end;
    gettimeofday(&end, NULL);

    static long seconds, useconds;
    seconds = end.tv_sec - highspeedTimer.tv_sec;
    useconds = end.tv_usec - highspeedTimer.tv_usec;
    // 1000000 microseconds in a second
    // Return the time in microsecond (us)
    return ((seconds)*1000000 + useconds);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2270
movl (%rbx), %eax
subl 0x2889(%rip), %eax      # 0x61a0
imull $0xf4240, %eax, %eax    # imm = 0xF4240
addl 0x8(%rbx), %eax
subl 0x2882(%rip), %eax      # 0x61a8
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/informations.c
// Function: warnNodeMatches
void warnNodeMatches(const SearchNode *node, StringView string)
{
  warnConfigLineNr(node->line_nr);
  fprintf(stderr, "%s ", typeOf(node));
  warnPath(node->name);
  fprintf(stderr, " matches \"");
  colorPrintf(stderr, TC_yellow, "" PRI_STR "", STR_FMT(string));
  fprintf(stderr, "\"\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x24ac
movq 0x10bd1(%rip), %r14     # 0x12ff8
movq (%r14), %rdi
cmpq $0x0, 0x20(%rbx)
leaq 0xc05b(%rip), %rax      # 0xe491
leaq 0xc04e(%rip), %rdx      # 0xe48b
cmoveq %rax, %rdx
leaq 0xbe58(%rip), %rsi      # 0xe2a0
xorl %eax, %eax
callq 0x2250
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x49d0
movq (%r14), %rcx
leaq 0xbe3f(%rip), %rdi      # 0xe2a4
pushq $0xa
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x23d0
movq (%r14), %rdi
movl 0x28(%rsp), %ecx
movq 0x20(%rsp), %r8
leaq 0xbe29(%rip), %rdx      # 0xe2af
pushq $0x6
popq %rsi
xorl %eax, %eax
callq 0x3bbc
movq (%r14), %rcx
leaq 0xbe1a(%rip), %rdi      # 0xe2b4
pushq $0x2
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23d0
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/informations.c
// Function: warnConfigLineNr
static void warnConfigLineNr(const size_t line_nr)
{
  colorPrintf(stderr, TC_yellow, "config");
  fprintf(stderr, ": ");
  colorPrintf(stderr, TC_blue, "line ");
  colorPrintf(stderr, TC_red, "%zu", line_nr);
  fprintf(stderr, ": ");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10b39(%rip), %r13     # 0x12ff8
movq (%r13), %rdi
leaq 0xbd18(%rip), %rdx      # 0xe1e2
pushq $0x6
popq %rsi
xorl %eax, %eax
callq 0x3bbc
movq (%r13), %rcx
leaq 0xbe70(%rip), %r14      # 0xe34f
pushq $0x2
popq %r15
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x23d0
movq (%r13), %rdi
leaq 0xbf81(%rip), %rdx      # 0xe481
pushq $0x8
popq %rsi
xorl %eax, %eax
callq 0x3bbc
movq (%r13), %rdi
leaq 0xbf72(%rip), %rdx      # 0xe487
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3bbc
movq (%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x23d0
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/allocator.c
// Function: allocate
void *allocate(Allocator *a, const size_t size)
{
  if(size == 0)
  {
    die("unable to allocate 0 bytes");
  }

  void *data = NULL;
  switch(a->type)
  {
    case ALT_always_failing: /* Leave data pointing to NULL. */ break;
    case ALT_malloc: data = malloc(size); break;
    case ALT_region: data = CR_RegionAlloc(a->pointers.r, size); break;
    case ALT_single_growable_buffer:
      a->pointers.growable_buffer =
        CR_EnsureCapacity(a->pointers.growable_buffer, size);
      data = a->pointers.growable_buffer;
      break;
  }

  if(data == NULL)
  {
    die("out of memory: failed to allocate %zu bytes", size);
  }
  return data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2812
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
cmpl $0x3, %eax
je 0x27e4
cmpl $0x2, %eax
je 0x27d6
cmpl $0x1, %eax
jne 0x2801
movq %rbx, %rdi
callq 0x22d0
jmp 0x27f4
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xd960
jmp 0x27f4
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0xd64e
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x2801
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xb817(%rip), %rdi      # 0xe01f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3ca8
leaq 0xb7eb(%rip), %rdi      # 0xe004
xorl %eax, %eax
callq 0x3ca8
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/allocator.c
// Function: allocatorWrapRegion
Allocator *allocatorWrapRegion(CR_Region *r)
{
  Allocator *a = CR_RegionAlloc(r, sizeof *a);
  a->type = ALT_region;
  a->pointers.r = r;
  return a;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %esi
callq 0xd960
movl $0x2, (%rax)
movq %rbx, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/allocator.c
// Function: allocatorWrapOneSingleGrowableBuffer
Allocator *allocatorWrapOneSingleGrowableBuffer(CR_Region *r)
{
  Allocator *a = CR_RegionAlloc(r, sizeof *a);
  a->type = ALT_single_growable_buffer;
  a->pointers.growable_buffer = CR_RegionAllocGrowable(r, 1);
  return a;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %esi
callq 0xd960
movq %rax, %r14
movl $0x3, (%rax)
movl $0x1, %esi
movq %rbx, %rdi
callq 0xd5b8
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: initiateBackup
void initiateBackup(Metadata *metadata, SearchNode *root_node)
{
  AllocatorPair allocator_pair = {
    .a = allocatorWrapRegion(metadata->r),
    .reusable_buffer = allocatorWrapOneSingleGrowableBuffer(metadata->r),
  };

  SearchIterator *context = searchNew(root_node);
  while(initiateMetadataRecursively(
          &allocator_pair, metadata, &metadata->paths, context,
          *root_node->ignore_expressions) != SRT_end_of_search)
    ;

  handleNotFoundSubnodes(metadata, root_node, root_node->policy,
                         metadata->paths, *root_node->ignore_expressions);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x2828
movq %rsp, %r15
movq %rax, (%r15)
movq (%r14), %rdi
callq 0x2842
movq %rax, 0x8(%r15)
movq %rbx, %rdi
callq 0xa4e4
movq %rax, %r12
leaq 0x48(%r14), %r13
movq 0x50(%rbx), %rax
movq (%rax), %r8
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x2be4
cmpl $0x20, %eax
jne 0x2ba0
movl 0x2c(%rbx), %edx
movq 0x48(%r14), %rcx
movq 0x50(%rbx), %rax
movq (%rax), %r8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x30da
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: handleNotFoundSubnodes
static void handleNotFoundSubnodes(Metadata *metadata,
                                   const SearchNode *node_match,
                                   const BackupPolicy node_policy,
                                   PathNode *subnode_list,
                                   const RegexList *ignore_list)
{
  for(PathNode *subnode = subnode_list; subnode != NULL;
      subnode = subnode->next)
  {
    if(subnode->hint != BH_none)
    {
      continue;
    }

    /* Find the node in the search tree matching the current subnode. */
    SearchNode *subnode_match =
      matchesSearchSubnodes(subnode->path, node_match);
    if(subnode_match != NULL)
    {
      handleRemovedPath(metadata, subnode, subnode_match->policy);
    }
    else if(node_policy == BPOL_none ||
            matchesIgnoreList(subnode->path, ignore_list))
    {
      prepareNodeForWipingRecursively(metadata, subnode);
    }
    else
    {
      handleRemovedPath(metadata, subnode, node_policy);
    }
  }
}

// Assembly:
testq %rcx, %rcx
je 0x3250
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
cmpl $0x0, 0x18(%r14)
jne 0x3232
movups (%r14), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x60(%rsp)
testq %r15, %r15
je 0x31bf
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rdi
callq 0xacd5
leaq 0x88(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x40(%rsp)
movups (%rcx), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x40(%r15), %r13
testq %r13, %r13
je 0x31bf
movq 0x20(%r13), %rdi
testq %rdi, %rdi
je 0x318a
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x9b87
jmp 0x31b5
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0xad56
testb %al, %al
jne 0x3223
movq 0x60(%r13), %r13
jmp 0x3162
testl %ebp, %ebp
je 0x3216
movq 0x10(%r14), %rax
movq %rax, 0x80(%rsp)
movups (%r14), %xmm0
movaps %xmm0, 0x70(%rsp)
testq %rbx, %rbx
je 0x320c
movq %rbx, %r13
movq (%r13), %rdi
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x70(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x9b87
testb %al, %al
jne 0x3216
movq 0x30(%r13), %r13
testq %r13, %r13
jne 0x31e0
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
jmp 0x322d
movq %r12, %rdi
movq %r14, %rsi
callq 0x38ac
jmp 0x3232
movl 0x2c(%r13), %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3b5f
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x3102
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: markAsRemovedRecursively
static void markAsRemovedRecursively(Metadata *metadata, PathNode *node,
                                     bool extend_tracked_histories)
{
  if(backupHintNoPol(node->hint) == BH_not_part_of_repository)
  {
    return;
  }
  if(node->history->state.type == PST_non_existing)
  {
    backupHintSet(node->hint, BH_unchanged);
  }
  else
  {
    backupHintSet(node->hint, BH_removed);
    extend_tracked_histories &= (node->policy == BPOL_track);

    if(extend_tracked_histories)
    {
      PathHistory *point = CR_RegionAlloc(metadata->r, sizeof *point);
      point->backup = &metadata->current_backup;
      point->backup->ref_count = sSizeAdd(point->backup->ref_count, 1);
      point->state.type = PST_non_existing;
      point->next = node->history;
      node->history = point;
    }
  }

  for(PathNode *subnode = node->subnodes; subnode != NULL;
      subnode = subnode->next)
  {
    markAsRemovedRecursively(metadata, subnode, extend_tracked_histories);
  }
}

// Assembly:
movl 0x18(%rsi), %eax
movl %eax, %ecx
andl $0x1ff, %ecx            # imm = 0x1FF
cmpl $0x4, %ecx
je 0x38ab
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rcx
cmpl $0x0, 0x8(%rcx)
je 0x3873
andl $0xfffffe00, %eax       # imm = 0xFFFFFE00
orl $0x3, %eax
movl %eax, 0x18(%r14)
cmpl $0x3, 0x1c(%r14)
setne %al
xorb $0x1, %dl
orb %al, %dl
jne 0x387d
movq (%rbx), %rdi
movl $0x50, %esi
callq 0xd960
movq %rax, %r15
leaq 0x8(%rbx), %rax
movq %rax, (%r15)
movq 0x18(%rbx), %rdi
movl $0x1, %esi
callq 0x8778
movq (%r15), %rcx
movq %rax, 0x10(%rcx)
movl $0x0, 0x8(%r15)
movq 0x20(%r14), %rax
movq %rax, 0x48(%r15)
movq %r15, 0x20(%r14)
movb $0x1, %dl
jmp 0x387f
movl $0x1, 0x18(%r14)
jmp 0x387f
xorl %edx, %edx
movq 0x28(%r14), %r14
testq %r14, %r14
je 0x38a1
movzbl %dl, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x37e9
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x388b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: prepareNodeForWiping
static void prepareNodeForWiping(Metadata *metadata, PathNode *node)
{
  if(backupHintNoPol(node->hint) == BH_not_part_of_repository)
  {
    return;
  }

  backupHintSet(node->hint, BH_not_part_of_repository);
  metadata->total_path_count--;

  decrementRefCounts(node->history);
}

// Assembly:
movl 0x18(%rsi), %eax
movl %eax, %ecx
andl $0x1ff, %ecx            # imm = 0x1FF
cmpl $0x4, %ecx
jne 0x38ee
retq
andl $0xfffffe00, %eax       # imm = 0xFFFFFE00
orl $0x4, %eax
movl %eax, 0x18(%rsi)
decq 0x38(%rdi)
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x38ed
movq (%rax), %rcx
decq 0x10(%rcx)
movq 0x48(%rax), %rax
jmp 0x3901
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: setPathHistoryState
static void setPathHistoryState(Allocator *a, PathState *state,
                                const SearchResult result)
{
  state->uid = result.stats.st_uid;
  state->gid = result.stats.st_gid;

  if(result.type == SRT_regular_file)
  {
    state->type = PST_regular_file;
    state->metadata.file_info.permission_bits = result.stats.st_mode;
    state->metadata.file_info.modification_time = result.stats.st_mtime;
    state->metadata.file_info.size = result.stats.st_size;
  }
  else if(result.type == SRT_symlink)
  {
    StringView target = sSymlinkReadTarget(result.path, a);
    if((off_t)target.length != result.stats.st_size)
    {
      die("symlink changed while reading: \"" PRI_STR "\"",
          STR_FMT(result.path));
    }

    state->type = PST_symlink;
    strSet(&state->metadata.symlink_target, target);
  }
  else if(result.type == SRT_directory)
  {
    state->type = PST_directory;
    state->metadata.directory_info.permission_bits = result.stats.st_mode;
    state->metadata.directory_info.modification_time =
      result.stats.st_mtime;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
leaq 0x50(%rsp), %r15
movq 0x4c(%r15), %rax
movq %rax, 0x4(%rsi)
movl (%r15), %eax
cmpl $0x4, %eax
je 0x39bb
cmpl $0x2, %eax
je 0x3968
cmpl $0x1, %eax
jne 0x39d3
movl $0x1, (%rbx)
movl 0x48(%r15), %eax
movl %eax, 0x10(%rbx)
movq 0x88(%r15), %rax
movq %rax, 0x18(%rbx)
movq 0x60(%r15), %rax
movq %rax, 0x20(%rbx)
jmp 0x39d3
movq %rdi, %rsi
movq 0x18(%r15), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%r15), %xmm0
movups %xmm0, (%rsp)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x9101
movq 0x8(%r14), %rax
cmpq 0x60(%r15), %rax
jne 0x39dd
movl $0x2, (%rbx)
addq $0x10, %rbx
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xac25
jmp 0x39d3
movl $0x3, (%rbx)
movl 0x48(%r15), %eax
movl %eax, 0x10(%rbx)
movq 0x88(%r15), %rax
movq %rax, 0x18(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl 0x10(%r15), %esi
movq 0x8(%r15), %rdx
leaq 0xa65f(%rip), %rdi      # 0xe04b
xorl %eax, %eax
callq 0x3ca8
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: handlePolicyChanges
static void handlePolicyChanges(Metadata *metadata, PathNode *node,
                                const BackupPolicy policy)
{
  if(node->policy == policy)
  {
    return;
  }

  backupHintSet(node->hint, BH_policy_changed);
  if(node->policy == BPOL_track)
  {
    if(node->history->state.type == PST_non_existing)
    {
      node->history->backup->ref_count--;
      node->history = node->history->next;
    }

    if(node->history->next != NULL)
    {
      decrementRefCounts(node->history->next);
      node->history->next = NULL;

      backupHintSet(node->hint, BH_loses_history);
    }

    if(node->history->state.type != PST_directory)
    {
      for(PathNode *subnode = node->subnodes; subnode != NULL;
          subnode = subnode->next)
      {
        prepareNodeForWipingRecursively(metadata, subnode);
      }
    }
  }

  node->policy = policy;
}

// Assembly:
movl 0x1c(%rsi), %ecx
cmpl %edx, %ecx
je 0x3a75
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl 0x18(%rsi), %eax
movl %eax, %edx
orl $0x200, %edx            # imm = 0x200
movl %edx, 0x18(%rsi)
cmpl $0x3, %ecx
jne 0x3a66
movq %rdi, %r15
movq 0x20(%r14), %rcx
cmpl $0x0, 0x8(%rcx)
jne 0x3a36
movq (%rcx), %rdx
decq 0x10(%rdx)
movq 0x48(%rcx), %rcx
movq %rcx, 0x20(%r14)
movq 0x48(%rcx), %rdx
testq %rdx, %rdx
je 0x3a60
movq (%rdx), %rsi
decq 0x10(%rsi)
movq 0x48(%rdx), %rdx
testq %rdx, %rdx
jne 0x3a3f
movq $0x0, 0x48(%rcx)
orl $0x600, %eax            # imm = 0x600
movl %eax, 0x18(%r14)
cmpl $0x3, 0x8(%rcx)
jne 0x3a76
movl %ebx, 0x1c(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x28(%r14), %r12
testq %r12, %r12
je 0x3a66
movq %r15, %rdi
movq %r12, %rsi
callq 0x38ac
movq 0x30(%r12), %r12
jmp 0x3a7a
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: handleNodeChanges
static void handleNodeChanges(AllocatorPair *allocator_pair,
                              PathNode *node, PathState *state,
                              const SearchResult result)
{
  handleFiletypeChanges(node, result);

  if(backupHintNoPol(node->hint) == BH_none)
  {
    applyNodeChanges(allocator_pair, node, state, result.stats);
  }
  else if(result.policy != BPOL_none)
  {
    setPathHistoryState(allocator_pair->a, state, result);
  }
}

// Assembly:
subq $0x98, %rsp
movq %rsi, %r8
movq %rdi, %rax
movl 0xa0(%rsp), %ecx
movq 0x20(%rsi), %rsi
movl 0x8(%rsi), %esi
cmpl $0x3, %esi
je 0x3add
cmpl $0x2, %esi
je 0x3acc
cmpl $0x1, %esi
jne 0x3b10
cmpl $0x2, %ecx
je 0x3afc
cmpl $0x4, %ecx
jne 0x3b10
movl $0x6, %ecx
jmp 0x3b01
cmpl $0x1, %ecx
je 0x3aee
cmpl $0x4, %ecx
jne 0x3b10
movl $0x8, %ecx
jmp 0x3b01
cmpl $0x1, %ecx
je 0x3af5
cmpl $0x2, %ecx
jne 0x3b10
movl $0xa, %ecx
jmp 0x3b01
movl $0x7, %ecx
jmp 0x3b01
movl $0x9, %ecx
jmp 0x3b01
movl $0x5, %ecx
movl $0xfffffe00, %esi       # imm = 0xFFFFFE00
andl 0x18(%r8), %esi
orl %ecx, %esi
movl %esi, 0x18(%r8)
leaq 0xa0(%rsp), %rsi
movzwl 0x18(%r8), %ecx
testl $0x1ff, %ecx            # imm = 0x1FF
je 0x3b3d
cmpl $0x0, 0x28(%rsi)
je 0x3b57
movq (%rax), %rdi
movq %rdx, %rsi
addq $0x98, %rsp
jmp 0x3913
addq $0x30, %rsi
movl $0x12, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r8, %rsi
callq 0x2880
addq $0x98, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/backup.c
// Function: handleRemovedPath
static void handleRemovedPath(Metadata *metadata, PathNode *node,
                              const BackupPolicy policy)
{
  handlePolicyChanges(metadata, node, policy);

  if(policy == BPOL_mirror)
  {
    prepareNodeForWipingRecursively(metadata, node);
  }
  else if(policy == BPOL_none &&
          (node->subnodes == NULL ||
           node->history->state.type != PST_directory))
  {
    prepareNodeForWiping(metadata, node);
  }
  else
  {
    markAsRemovedRecursively(metadata, node, true);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x39f3
testl %ebp, %ebp
je 0x3b88
cmpl $0x2, %ebp
jne 0x3b99
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x38ac
cmpq $0x0, 0x28(%rbx)
je 0x3bad
movq 0x20(%rbx), %rax
cmpl $0x3, 0x8(%rax)
jne 0x3bad
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x37e9
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x38dd
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/colors.c
// Function: colorPrintf
void colorPrintf(FILE *stream, TextColor color, const char *format, ...)
{
  va_list arguments;
  va_start(arguments, format);
  const bool colorize = sIsTTY(stream);

  if(colorize) fprintf(stream, "\033[%sm", color_codes[color]);
  vfprintf(stream, format, arguments);
  if(colorize) fprintf(stream, "\033[0m");

  va_end(arguments);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x3c1b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rsp)
callq 0x9818
testb %al, %al
je 0x3c8e
movl %ebp, %eax
leaq 0xa51f(%rip), %rcx      # 0xe16c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
leaq 0xa4c5(%rip), %rsi      # 0xe120
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2250
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2390
leaq 0xa4ac(%rip), %rdi      # 0xe126
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23d0
jmp 0x3c9c
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2390
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/error-handling.c
// Function: die
void die(const char *format, ...)
{
  va_list arguments;
  va_start(arguments, format);

  fprintf(stderr, "nb: error: ");
  vfprintf(stderr, format, arguments);
  fprintf(stderr, "\n");

  va_end(arguments);

  exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x3d0b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0xf2c6(%rip), %r15      # 0x12ff8
movq (%r15), %rcx
leaq 0xa468(%rip), %rdi      # 0xe1a4
movl $0xb, %esi
movl $0x1, %edx
callq 0x23d0
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2390
movq (%r15), %rsi
movl $0xa, %edi
callq 0x21f0
movl $0x1, %edi
callq 0x23c0
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/file-hash.c
// Function: fileHash
void fileHash(StringView filepath, struct stat stats, uint8_t *hash_out,
              HashProgressCallback progress_callback,
              void *callback_user_data)
{
  const size_t blocksize = stats.st_blksize;
  uint64_t bytes_left = stats.st_size;
  FileStream *stream = sFopenRead(filepath);

  static unsigned char *buffer = NULL;
  buffer = CR_EnsureCapacity(buffer, blocksize);

  blake2b_state state;
  blake2b_init(&state, FILE_HASH_SIZE);

  while(bytes_left > 0)
  {
    const size_t bytes_to_read =
      bytes_left > blocksize ? blocksize : bytes_left;

    sFread(buffer, bytes_to_read, stream);
    blake2b_update(&state, buffer, bytes_to_read);
    bytes_left -= bytes_to_read;

    if(progress_callback != NULL)
    {
      progress_callback(bytes_to_read, callback_user_data);
    }
  }

  const bool stream_not_at_end = sFbytesLeft(stream);
  sFclose(stream);

  if(stream_not_at_end)
  {
    die("file changed while calculating hash: \"" PRI_STR "\"",
        STR_FMT(filepath));
  }

  blake2b_final(&state, hash_out, FILE_HASH_SIZE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, 0x28(%rsp)
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
movq 0x1a8(%rsp), %r14
movq 0x1b0(%rsp), %rbx
movq 0x170(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x160(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8833
movq %rax, %r13
movq 0xf39a(%rip), %rdi      # 0x13240
movq %rbx, %rsi
callq 0xd64e
movq %rax, 0xf38b(%rip)      # 0x13240
leaq 0x30(%rsp), %rdi
movl $0x14, %esi
callq 0xb1e8
testq %r14, %r14
je 0x3f11
leaq 0x30(%rsp), %rbp
cmpq %rbx, %r14
movq %rbx, %r12
cmovbq %r14, %r12
movq 0xf361(%rip), %rdi      # 0x13240
movq %r12, %rsi
movq %r13, %rdx
callq 0x8a20
movq 0xf34f(%rip), %rsi      # 0x13240
movq %rbp, %rdi
movq %r12, %rdx
callq 0xb26e
testq %r15, %r15
je 0x3f0c
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq *%r15
subq %r12, %r14
jne 0x3ece
movq %r13, %rdi
callq 0x8e4a
movl %eax, %ebx
movq %r13, %rdi
callq 0x8bc9
testb %bl, %bl
jne 0x3f4d
leaq 0x30(%rsp), %rdi
movl $0x14, %edx
movq 0x20(%rsp), %rsi
callq 0xd3a4
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x160(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rax), %rdx
leaq 0xa254(%rip), %rdi      # 0xe1b6
xorl %eax, %eax
callq 0x3ca8
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/AlxHnr[P]nano-backup/src/garbage-collector.c
// Function: populateTableRecursively
static void populateTableRecursively(Allocator *a, StringTable *table,
                                     const PathNode *nodes)
{
  for(const PathNode *node = nodes; node != NULL; node = node->next)
  {
    if(backupHintNoPol(node->hint) == BH_not_part_of_repository)
    {
      continue;
    }

    for(const PathHistory *point = node->history; point != NULL;
        point = point->next)
    {
      if(point->state.type != PST_regular_file ||
         point->state.metadata.file_info.size <= FILE_HASH_SIZE)
      {
        continue;
      }

      static char *buffer = NULL;
      repoBuildRegularFilePath(&buffer, &point->state.metadata.file_info);
      StringView path = str(buffer);

      if(strTableGet(table, path) == NULL)
      {
        strTableMap(table, strCopy(path, a), (void *)0x1);
      }
    }

    populateTableRecursively(a, table, node->subnodes);
  }
}

// Assembly:
testq %rdx, %rdx
je 0x4299
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1ff, %ecx            # imm = 0x1FF
leaq 0xf093(%rip), %r12      # 0x13248
leaq 0x18(%rsp), %r13
movl 0x18(%rbx), %eax
andl %ecx, %eax
cmpl $0x4, %eax
je 0x427e
movq 0x20(%rbx), %rbp
testq %rbp, %rbp
je 0x426a
cmpl $0x1, 0x8(%rbp)
jne 0x4261
cmpq $0x15, 0x28(%rbp)
jb 0x4261
leaq 0x18(%rbp), %rsi
movq %r12, %rdi
callq 0x758d
movq 0xf04f(%rip), %rsi      # 0x13248
movq %r13, %rdi
callq 0xab5c
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0xb15e
testq %rax, %rax
jne 0x4261
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xac37
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x1, %esi
movq %r14, %rdi
callq 0xb043
movq 0x48(%rbp), %rbp
jmp 0x41cc
movq 0x28(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x4189
movl $0x1ff, %ecx            # imm = 0x1FF
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x41ba
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq