LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/virtual-machine/virtual-machine.c
// Function: create_obj
struct OBJECT*create_obj(virtual_machine_type_t vm)
{
    size_t i;

    size_t properties_num = READ_BYTE();
    
    struct OBJECT*obj = garbage_collector_malloc_obj(vm->gc, properties_num);
    
    for (i = 0; i < properties_num; i++) {
        struct VALUE key = virtual_machine_stack_pop(vm);
        struct VALUE val = virtual_machine_stack_pop(vm);
        
        obj->properties[i].key = key.int_val;
        obj->properties[i].val = val;
    }
    
    obj->properties_len = properties_num;
    obj->properties_cap = properties_num * 2;

    return obj;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
movq %r14, %rsi
callq 0xc768
movq %rax, %rcx
addq $0x18, %rcx
movq %r14, %rdx
subq $0x1, %rdx
jb 0xbcc4
movq 0x18(%rbx), %rsi
leaq -0x18(%rsi), %rdi
movq %rdi, 0x18(%rbx)
movq -0x10(%rsi), %rdi
leaq -0x30(%rsi), %r8
movq %r8, 0x18(%rbx)
movq -0x20(%rsi), %r8
movq %r8, 0x10(%rsp)
movups -0x30(%rsi), %xmm0
movaps %xmm0, (%rsp)
movq %rdi, -0x8(%rcx)
movaps (%rsp), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsp), %rsi
movq %rsi, 0x10(%rcx)
addq $0x20, %rcx
jmp 0xbc7b
movq %r14, (%rax)
addq %r14, %r14
movq %r14, 0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/virtual-machine/virtual-machine.c
// Function: create_arr
struct ARRAY*create_arr(virtual_machine_type_t vm)
{
    size_t i;

    size_t arr_len = READ_BYTE();

    struct ARRAY*arr = garbage_collector_malloc_arr(vm->gc, arr_len);

    for (i = 0; i < arr_len; i++) {
        struct VALUE val = virtual_machine_stack_pop(vm);
        arr->values[i] = val;
    }
    arr->len = arr_len;

    return arr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rdi
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
movq %r14, %rsi
callq 0xc9b6
movq %rax, %rcx
addq $0x10, %rcx
movq %r14, %rdx
subq $0x1, %rdx
jb 0xbd29
movq 0x18(%rbx), %rsi
leaq -0x18(%rsi), %rdi
movq %rdi, 0x18(%rbx)
movups -0x18(%rsi), %xmm0
movq -0x8(%rsi), %rsi
movq %rsi, 0x10(%rcx)
movups %xmm0, (%rcx)
addq $0x18, %rcx
jmp 0xbd02
movq %r14, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_conf
void garbage_collector_conf(garbage_collector_type_t gc, size_t sizemem_start, struct VALUE**stack, struct VALUE**stack_top, int trace)
{
    gc->stack = stack;
    gc->stack_top = stack_top;
    allocator_malloc_pool(&(gc->a), sizemem_start);
    allocator_malloc_pool(&(gc->b), sizemem_start);

    gc->trace = trace;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %r8d, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, (%rdi)
movq %rcx, 0x8(%rdi)
addq $0x10, %rdi
callq 0xce50
leaq 0x60(%r15), %rdi
movq %r14, %rsi
callq 0xce50
movl %ebx, 0xc8(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_malloc_obj
struct OBJECT*garbage_collector_malloc_obj(garbage_collector_type_t gc, size_t start_properties_num)
{
    size_t start_properties_cap = start_properties_num * 2;
    size_t sizemem = sizeof(char) + sizeof(struct OBJECT) + sizeof(struct PROPERTY) * start_properties_cap;
    
    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return malloc_obj_force(gc, start_properties_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, NULL, sizemem);

    return malloc_obj_force(gc, start_properties_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
shlq $0x6, %rax
leaq 0x11(%rax), %r15
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xc791
orq $0x33, %rax
cmpq %rax, 0x1(%rcx)
jae 0xc79e
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xc7d6
addq %rbx, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xc7b1
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: malloc_obj_force
static struct OBJECT*malloc_obj_force(garbage_collector_type_t gc, size_t start_properties_cap, size_t sizemem)
{
    struct OBJECT*obj;
    char*ptr = allocator_malloc_block(&(gc->a), sizemem);

    ptr[0] = VALUE_TYPE_OBJ;
    obj = (struct OBJECT*) (ptr + 1);
    obj->properties_len = 0;
    obj->properties_cap = start_properties_cap;
    
    return obj;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
addq $0x10, %rdi
movq %rdx, %rsi
callq 0xcf80
movb $0x2, (%rax)
andq $0x0, 0x1(%rax)
leaq 0x1(%rax), %rcx
movq %rbx, 0x9(%rax)
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: run_gc
static void run_gc(garbage_collector_type_t gc, void**ptr, size_t ptr_sizemem)
{
    struct ALLOCATOR tmp;

    int need_realloc;

    if (gc->trace) {
        printf("\t<info>GC</info>\n");
    }

    run_gc_inner(gc, ptr);

    /* check if realloc is needed. */
    need_realloc = ((gc->b.busy_list.sizemem + gc->b.busy_list.count * BLOCK_OVERHEAD) +
                    (ptr_sizemem + BLOCK_OVERHEAD)) >= gc->b.sizemem / 2;

    if (need_realloc) {
        size_t new_sizemem = (gc->b.sizemem + (ptr_sizemem + BLOCK_OVERHEAD)) * 2;

        tmp = gc->a;
        gc->a = gc->b;
        gc->b = tmp;
        
        allocator_free_pool(&(gc->b));
        allocator_malloc_pool(&(gc->b), new_sizemem);

        run_gc_inner(gc, ptr);

        allocator_free_pool(&(gc->a));
        allocator_malloc_pool(&(gc->a), new_sizemem);
    }

    tmp = gc->a;
    gc->a = gc->b;
    gc->b = tmp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0xc8(%rdi)
je 0xc801
leaq 0x3396(%rip), %rdi      # 0xfb92
callq 0x1050
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcae1
leaq 0x60(%rbx), %r14
imulq $0x22, 0xa0(%rbx), %rax
addq $0x22, %r13
movq 0xa8(%rbx), %rcx
addq %r13, %rcx
addq %rax, %rcx
movq 0x68(%rbx), %r12
movq %r12, %rax
shrq %rax
cmpq %rax, %rcx
jb 0xc89d
addq %r13, %r12
addq %r12, %r12
leaq 0x10(%rbx), %r13
pushq $0xa
popq %rax
movq %rsp, %rdx
movq %rax, %rcx
movq %rdx, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rcx
movq %r13, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rcx
movq %r14, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0xcf6e
movq %r14, %rdi
movq %r12, %rsi
callq 0xce50
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcae1
movq %r13, %rdi
callq 0xcf6e
movq %r13, %rdi
movq %r12, %rsi
callq 0xce50
addq $0x10, %rbx
pushq $0xa
popq %rax
movq %rsp, %rdx
movq %rax, %rcx
movq %rdx, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rcx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rcx
movq %r14, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_realloc_obj
struct OBJECT*garbage_collector_realloc_obj(garbage_collector_type_t gc, struct OBJECT*obj, size_t new_properties_num)
{
    size_t new_properties_cap = new_properties_num * 2;
    size_t sizemem = sizeof(char) + sizeof(struct OBJECT) + sizeof(struct PROPERTY) * new_properties_cap;

    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return realloc_obj_force(gc, obj, new_properties_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, (void**) &obj, sizemem);

    return realloc_obj_force(gc, obj, new_properties_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq %rsi, (%rsp)
leaq (%rdx,%rdx), %rbx
shlq $0x6, %rdx
leaq 0x11(%rdx), %r14
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xc907
orq $0x33, %rdx
cmpq %rdx, 0x1(%rax)
jae 0xc936
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc7d6
movq (%r12), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xc94c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xc94c
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: realloc_obj_force
static struct OBJECT*realloc_obj_force(garbage_collector_type_t gc,
                                       struct OBJECT*obj,
                                       size_t new_properties_cap, size_t sizemem)
{
    char*prev_ptr = ((char*) obj) - 1;
    char*new_ptr = allocator_realloc_block(&(gc->a), prev_ptr, sizemem);

    change_one_ptr(gc, prev_ptr, new_ptr);
    obj = (struct OBJECT*) (new_ptr + 1);
    obj->properties_cap = new_properties_cap;

    return obj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
decq %r14
addq $0x10, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0xd17e
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xcc74
movq %rbx, 0x9(%r12)
incq %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_malloc_arr
struct ARRAY*garbage_collector_malloc_arr(garbage_collector_type_t gc, size_t arr_len)
{
    size_t start_arr_cap = arr_len * 2;
    size_t sizemem = sizeof(char) + sizeof(struct ARRAY) + sizeof(struct VALUE) * start_arr_cap;
    
    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return malloc_arr_force(gc, start_arr_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, NULL, sizemem);

    return malloc_arr_force(gc, start_arr_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
imulq $0x30, %rsi, %rax
leaq 0x11(%rax), %r14
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xc9dc
addq $0x33, %rax
cmpq %rax, 0x1(%rcx)
jae 0xc9e9
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xc7d6
addq %rbx, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xc9fc
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: malloc_arr_force
static struct ARRAY*malloc_arr_force(garbage_collector_type_t gc, size_t start_cap, size_t sizemem)
{
    struct ARRAY*arr;
    char*ptr = allocator_malloc_block(&(gc->a), sizemem);
    ptr[0] = VALUE_TYPE_ARR;
    arr = (struct ARRAY*) (ptr + 1);
    arr->len = 0;
    arr->cap = start_cap;
    
    return arr;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
addq $0x10, %rdi
movq %rdx, %rsi
callq 0xcf80
movb $0x3, (%rax)
andq $0x0, 0x1(%rax)
leaq 0x1(%rax), %rcx
movq %rbx, 0x9(%rax)
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: garbage_collector_realloc_arr
struct ARRAY*garbage_collector_realloc_arr(garbage_collector_type_t gc, struct ARRAY*arr, size_t new_arr_len)
{
    size_t new_arr_cap = new_arr_len * 2;
    size_t sizemem = sizeof(struct ARRAY) + sizeof(struct VALUE) * new_arr_cap;

    if ((gc->a.free_list.last != NULL) && (BLOCK_L_DATA_LEN(gc->a.free_list.last) >= (sizemem + BLOCK_OVERHEAD))) {
        return realloc_arr_force(gc, arr, new_arr_cap, sizemem);
    }

    /* need garbage collection. */
    run_gc(gc, (void**) &arr, sizemem);

    return realloc_arr_force(gc, arr, new_arr_cap, sizemem);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
movq %rsi, (%rsp)
imulq $0x30, %rdx, %rax
addq %rdx, %rbx
leaq 0x10(%rax), %r14
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xca51
addq $0x32, %rax
cmpq %rax, 0x1(%rcx)
jae 0xca80
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc7d6
movq (%r12), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0xca96
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xca96
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: lookup_new_location
static void*lookup_new_location(garbage_collector_type_t gc, void*ptr)
{
    void*o = BLOCK_PTR_FROM_DATA((((char*) ptr) - 1));
    
    if (ptrs_map_get(&(gc->ptrs_map), o) == NULL) {
        ptrs_map_set(&(gc->ptrs_map), o, gc->b.free_list.first);

        allocator_malloc_block(&(gc->b), BLOCK_L_DATA_LEN(o));
        memcpy(BLOCK_DATA(gc->b.busy_list.last), BLOCK_DATA(o), BLOCK_L_DATA_LEN(o));
    }

    return (((char*) BLOCK_DATA(ptrs_map_get(&(gc->ptrs_map), o))) + 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq -0x1a(%rsi), %rbx
leaq 0xb0(%rdi), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcdec
testq %rax, %rax
jne 0xcc5b
leaq 0x60(%r12), %r13
movq 0x70(%r12), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcd62
movq -0x19(%r15), %rsi
movq %r13, %rdi
callq 0xcf80
movq 0x98(%r12), %rdi
addq $0x19, %rdi
movq -0x19(%r15), %rdx
decq %r15
movq %r15, %rsi
callq 0x1120
movq %r14, %rdi
movq %rbx, %rsi
callq 0xcdec
addq $0x1a, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/garbage-collector.c
// Function: change_one_ptr
static void change_one_ptr(garbage_collector_type_t gc, char*prev_ptr, char*new_ptr)
{
    struct VALUE*stack = (*(gc->stack));
    struct VALUE*stack_top = (*(gc->stack_top));

    struct VALUE*val;
    
    void*cur;

    for (val = stack; val != stack_top; val++) {
        change_vals_ptr(val, prev_ptr, new_ptr);
    }

    cur = gc->a.busy_list.first;

    while (cur != NULL) {
        size_t i;
        char*ptr = BLOCK_DATA(cur);
        if (ptr[0] == VALUE_TYPE_OBJ) {
            struct OBJECT*obj = (struct OBJECT*) (ptr + 1);
            for (i = 0; i < obj->properties_len; i++) {
                val = &(obj->properties[i].val);
                change_vals_ptr(val, prev_ptr, new_ptr);
            }
        } else if (ptr[0] == VALUE_TYPE_ARR) {
            size_t i;
            struct ARRAY*arr = (struct ARRAY*) (ptr + 1);
            for (i = 0; i < arr->len; i++) {
                val = &(arr->values[i]);
                change_vals_ptr(val, prev_ptr, new_ptr);
            }
        }
        cur = BLOCK_LIST_NEXT(cur);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq (%rax), %r12
movq (%rcx), %r13
cmpq %r13, %r12
je 0xccae
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcd22
addq $0x18, %r12
jmp 0xcc95
addq $0x40, %r15
movq (%r15), %r13
testq %r13, %r13
je 0xcd13
leaq 0x11(%r13), %r15
movzbl 0x19(%r13), %eax
cmpl $0x3, %eax
je 0xccf0
cmpl $0x2, %eax
jne 0xccb2
leaq 0x32(%r13), %r12
xorl %ebp, %ebp
cmpq 0x1a(%r13), %rbp
jae 0xccb2
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcd22
incq %rbp
addq $0x20, %r12
jmp 0xccd3
leaq 0x2a(%r13), %r12
xorl %ebp, %ebp
cmpq 0x1a(%r13), %rbp
jae 0xccb2
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcd22
incq %rbp
addq $0x18, %r12
jmp 0xccf6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/ptrs-map.c
// Function: ptrs_map_set
void ptrs_map_set(ptrs_map_type_t pm, void*key, void*val)
{
    size_t i;

    if (key == NULL) {
        fprintf(stderr, "insertion null-key in map is prohibited\n");
        exit(1);
    }

    for (i = 0; i < pm->len; i++) {
        if (pm->elems[i].key == key) {
            pm->elems[i].val = val;
            return;
        }
    }

    if (pm->len == pm->cap) {
        fprintf(stderr, "non enough memory in map to handle new value\n");
        exit(1);
    }

    pm->elems[pm->len].key = key;
    pm->elems[pm->len].val = val;
    pm->len++;
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0xcdb3
movq 0x8(%rdi), %rax
pushq $-0x1
popq %rcx
xorl %r8d, %r8d
incq %rcx
cmpq %rcx, %rax
je 0xcd91
leaq 0x10(%r8), %r9
movq (%rdi), %r10
cmpq %rsi, (%r10,%r8)
movq %r9, %r8
jne 0xcd72
movq %rdx, -0x8(%r10,%r9)
jmp 0xcdb1
cmpq 0x10(%rdi), %rax
je 0xcdc8
movq (%rdi), %rcx
movq %rax, %r8
shlq $0x4, %r8
movq %rsi, (%rcx,%r8)
movq %rdx, 0x8(%rcx,%r8)
incq %rax
movq %rax, 0x8(%rdi)
popq %rax
retq
movq 0x9236(%rip), %rax      # 0x15ff0
movq (%rax), %rcx
leaq 0x2ddf(%rip), %rdi      # 0xfba3
pushq $0x28
jmp 0xcddb
movq 0x9221(%rip), %rax      # 0x15ff0
movq (%rax), %rcx
leaq 0x2df3(%rip), %rdi      # 0xfbcc
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/ptrs-map.c
// Function: ptrs_map_get
void*ptrs_map_get(ptrs_map_type_t pm, void*key)
{
    size_t i;

    if (key == NULL) {
        fprintf(stderr, "selection by null-key from map is prohibited\n");
        exit(1);
    }

    for (i = 0; i < pm->len; i++) {
        if (pm->elems[i].key == key) {
            return pm->elems[i].val;
        }
    }

    return NULL;
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0xce19
movq 0x8(%rdi), %rcx
incq %rcx
xorl %eax, %eax
xorl %edx, %edx
decq %rcx
je 0xce17
leaq 0x10(%rdx), %r8
movq (%rdi), %r9
cmpq %rsi, (%r9,%rdx)
movq %r8, %rdx
jne 0xcdfd
movq -0x8(%r9,%r8), %rax
popq %rcx
retq
movq 0x91d0(%rip), %rax      # 0x15ff0
movq (%rax), %rcx
leaq 0x2dd0(%rip), %rdi      # 0xfbfa
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_malloc_pool
void allocator_malloc_pool(allocator_type_t a, size_t sizemem)
{
    if (sizemem < MIN_BLOCK_LEN) {
        fprintf(stderr, "not enough memory for allocator:\n");
        fprintf(stderr, "got:         %ld bytes\n", sizemem);
        fprintf(stderr, "minimum:     %ld bytes;\n", MIN_BLOCK_LEN);
        fprintf(stderr, "recommended: %ld bytes;\n", MIN_BLOCK_LEN * 1024 * 1024);
        
        exit(EXIT_FAILURE);
    }
    
    a->sizemem = sizemem;
    SAFE_MALLOC(a->mem, a->sizemem);

    allocator_clean_pool(a);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x22, %rsi
jbe 0xce83
movq %rdi, %r14
movq %rbx, 0x8(%rdi)
movq %rbx, %rdi
callq 0x1130
movq %rax, (%r14)
testq %rax, %rax
je 0xcedf
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcf0c
movq 0x9166(%rip), %r14      # 0x15ff0
movq (%r14), %rcx
leaq 0x2dac(%rip), %rdi      # 0xfc40
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
movq (%r14), %rdi
leaq 0x2db9(%rip), %rsi      # 0xfc62
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
movq (%r14), %rdi
leaq 0x2dbd(%rip), %rsi      # 0xfc7a
pushq $0x23
popq %rdx
xorl %eax, %eax
callq 0x1100
movq (%r14), %rdi
leaq 0x2dc2(%rip), %rsi      # 0xfc93
movl $0x2300000, %edx        # imm = 0x2300000
xorl %eax, %eax
callq 0x1100
jmp 0xcf04
movq 0x910a(%rip), %rax      # 0x15ff0
movq (%rax), %rdi
leaq 0x16ce(%rip), %rsi      # 0xe5be
leaq 0x2db5(%rip), %rdx      # 0xfcac
pushq $0x11
popq %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1100
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_clean_pool
void allocator_clean_pool(allocator_type_t a)
{
    size_t len = a->sizemem - BLOCK_OVERHEAD;

    BLOCK_L_FLAG(a->mem) = FREE_BLOCK;
    BLOCK_L_DATA_LEN(a->mem) = len;
    BLOCK_LIST_PREV(a->mem) = NULL;
    BLOCK_LIST_NEXT(a->mem) = NULL;
    BLOCK_R_DATA_LEN(a->mem) = len;
    BLOCK_R_FLAG(a->mem) = FREE_BLOCK;

    a->free_list.first = a->mem;
    a->free_list.last = a->mem;
    a->free_list.count = 1;
    a->free_list.sizemem = a->sizemem - BLOCK_OVERHEAD;

    a->busy_list.first = NULL;
    a->busy_list.last = NULL;
    a->busy_list.count = 0;
    a->busy_list.sizemem = 0;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
addq $-0x22, %rcx
xorl %edx, %edx
movb %dl, (%rax)
movq (%rdi), %rax
movq %rcx, 0x1(%rax)
andq $0x0, 0x9(%rax)
movq (%rdi), %rax
andq $0x0, 0x11(%rax)
movq (%rdi), %rax
movq 0x1(%rax), %rsi
movq %rcx, 0x19(%rax,%rsi)
movq 0x1(%rax), %rcx
movb %dl, 0x21(%rax,%rcx)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq $0x1, 0x20(%rdi)
addq $-0x22, %rcx
movq %rcx, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_malloc_block
void*allocator_malloc_block(allocator_type_t a, size_t sizemem)
{
    void*cur;

    if ((BLOCK_L_DATA_LEN(a->free_list.last) + BLOCK_OVERHEAD) < sizemem) {
        return NULL;
    }

    cur = allocator_list_search_by_sizemem(&(a->free_list), sizemem);

    /* remove block from list. */
    allocator_list_remove_elem(&(a->free_list), cur);
    
    if (BLOCK_L_DATA_LEN(cur) < (sizemem + MIN_BLOCK_LEN)) {
        /* don't need to divide block. */
        BLOCK_L_FLAG(cur) = BUSY_BLOCK;
        BLOCK_R_FLAG(cur) = BUSY_BLOCK;
        allocator_list_push_back(&(a->busy_list), cur);
        
        return BLOCK_DATA(cur);
    }

    size_t len = BLOCK_L_DATA_LEN(cur) - sizemem - BLOCK_OVERHEAD;
    void*tmp_block;
    /* have to divide block. */
    
    /* split block into two smaller blocks (one of them will contain data). */
    
    /* put busy block to busy list. */
    BLOCK_L_FLAG(cur) = BUSY_BLOCK;
    BLOCK_L_DATA_LEN(cur) = sizemem;
    BLOCK_LIST_PREV(cur) = NULL;
    BLOCK_LIST_NEXT(cur) = NULL;
    BLOCK_R_DATA_LEN(cur) = sizemem;
    BLOCK_R_FLAG(cur) = BUSY_BLOCK;
    allocator_list_push_back(&(a->busy_list), cur);
    
    /* put free block to free list. */
    tmp_block = BLOCK_ARR_NEXT(cur);
    BLOCK_L_FLAG(tmp_block) = FREE_BLOCK;
    BLOCK_L_DATA_LEN(tmp_block) = len;
    BLOCK_LIST_PREV(tmp_block) = NULL;
    BLOCK_LIST_NEXT(tmp_block) = NULL;
    BLOCK_R_DATA_LEN(tmp_block) = len;
    BLOCK_R_FLAG(tmp_block) = FREE_BLOCK;
    allocator_list_insert_elem(&(a->free_list), tmp_block);
    
    return BLOCK_DATA(cur);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rax
movq 0x1(%rax), %rax
addq $0x22, %rax
cmpq %rsi, %rax
jae 0xcfa4
xorl %r12d, %r12d
jmp 0xd06c
movq %rsi, %r13
movq %rdi, %r14
leaq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0xd07e
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
callq 0xd096
movq 0x1(%rbx), %rbp
leaq 0x23(%r13), %rax
cmpq %rax, %rbp
jae 0xcff1
movb $0x1, %al
movb %al, (%rbx)
movq %rbx, %r12
addq $0x19, %r12
movb %al, 0x21(%rbx,%rbp)
addq $0x30, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd0ce
jmp 0xd06c
subq %r13, %rbp
leaq -0x22(%rbp), %rax
movq %rax, (%rsp)
movb $0x1, %al
movb %al, (%rbx)
movq %r13, 0x1(%rbx)
leaq 0x19(%rbx), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rbx)
movq %r13, 0x19(%rbx,%r13)
movq 0x1(%rbx), %rcx
movb %al, 0x21(%rbx,%rcx)
addq $0x30, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd0ce
movq 0x1(%rbx), %rax
leaq (%rbx,%rax), %rcx
addq $0x19, %rcx
leaq (%rbx,%rax), %rsi
addq $0x22, %rsi
xorl %edx, %edx
movb %dl, 0x22(%rbx,%rax)
movq (%rsp), %rdi
movq %rdi, 0x23(%rbx,%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x2b(%rbx,%rax)
movq %rdi, (%rbp,%rcx)
movq 0x23(%rbx,%rax), %rax
movb %dl, 0x2a(%rax,%rcx)
movq %r15, %rdi
callq 0xd0fe
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/masyagin1998[P]GCI/src/garbage-collector/allocator.c
// Function: allocator_list_insert_elem
static void allocator_list_insert_elem(struct ALLOCATOR_LIST*list, void*elem)
{
    size_t len = BLOCK_L_DATA_LEN(elem);
    void*list_next = allocator_list_search_by_sizemem(list, len);

    if (list_next == NULL) {
        allocator_list_push_back(list, elem);
    } else {
        void*prev_elem;
        
        if (BLOCK_LIST_PREV(list_next) == NULL) {
            allocator_list_push_front(list, elem);
            return;
        }

        BLOCK_LIST_PREV(elem) = BLOCK_LIST_PREV(list_next);
        prev_elem = BLOCK_LIST_PREV(list_next);
        BLOCK_LIST_NEXT(prev_elem) = elem;
        BLOCK_LIST_NEXT(elem) = list_next;
        BLOCK_LIST_PREV(list_next) = elem;

        list->count++;
        list->sizemem += BLOCK_L_DATA_LEN(elem);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1(%rsi), %rsi
callq 0xd07e
testq %rax, %rax
je 0xd135
movq 0x9(%rax), %rcx
testq %rcx, %rcx
je 0xd144
movq %rcx, 0x9(%r14)
movq 0x9(%rax), %rcx
movq %r14, 0x11(%rcx)
movq %rax, 0x11(%r14)
movq %r14, 0x9(%rax)
jmp 0xd16a
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd0ce
movq (%rbx), %rax
movq %rax, 0x11(%r14)
andq $0x0, 0x9(%r14)
movq (%rbx), %rax
testq %rax, %rax
je 0xd15c
movq %r14, 0x9(%rax)
movq %r14, (%rbx)
cmpq $0x0, 0x8(%rbx)
jne 0xd16a
movq %r14, 0x8(%rbx)
incq 0x10(%rbx)
movq 0x1(%r14), %rax
addq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_18/dcl.c
// Function: main
int main(void)
{
  while (get_next_token() != EOF)
  {
    if (next_token == '\n')
    {
      continue;
    }

    strcpy(data_type, token);
    out[0] = '\0';

    dcl();

    if (next_token != '\n')
    {
      if (next_token == NAME)
      {
        printf("Syntax Error: '%s' unexpected.\n", token);
      }
      else
      {
        printf("Syntax Error: '%c' unexpected.\n", next_token);
      }

      do
      {
        get_next_token();
      } while (next_token != '\n' && next_token != EOF);
    }
    else
    {
      printf("%s:%s %s\n", name, out, data_type);
    }
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2ed2(%rip), %rbx      # 0x4090
leaq 0x2f3b(%rip), %r14      # 0x4100
leaq 0x3394(%rip), %r12      # 0x4560
leaq 0x2f9d(%rip), %r13      # 0x4170
leaq 0xe2a(%rip), %rbp       # 0x2004
leaq 0xe43(%rip), %r15       # 0x2024
callq 0x1277
cmpl $-0x1, %eax
je 0x1266
cmpl $0xa, 0x2e8e(%rip)      # 0x4080
je 0x11e1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030
movb $0x0, 0x2f6a(%rip)      # 0x4170
callq 0x134f
movl 0x2e6f(%rip), %esi      # 0x4080
cmpl $0xa, %esi
je 0x1229
testl %esi, %esi
jne 0x1242
movq %rbp, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
jmp 0x124c
leaq 0xe14(%rip), %rdi       # 0x2044
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1060
jmp 0x11e1
movq %r15, %rdi
xorl %eax, %eax
callq 0x1060
callq 0x1277
movl 0x2e29(%rip), %eax      # 0x4080
cmpl $-0x1, %eax
je 0x11e1
cmpl $0xa, %eax
jne 0x124c
jmp 0x11e1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_18/dcl.c
// Function: dir_dcl
void dir_dcl(void)
{
  if (next_token == PAREN_OPEN)
  {
    dcl();

    if (next_token != PAREN_CLOSE)
    {
      puts("Syntax Error: missing ')'.");
    }
  }
  else if (next_token == NAME)
  {
    strcpy(name, token);
  }
  else
  {
    puts("Syntax Error: expected name or (dcl).");
  }

  while ((next_token = get_next_token()) == PARENS || next_token == BRACKETS)
  {
    if (next_token == PARENS)
    {
      strcat(out, " function returning");
    }
    else if (next_token == BRACKETS)
    {
      strcat(out, " array[");
      strcat(out, token);
      strcat(out, "] of");
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x2bc6(%rip), %eax      # 0x4080
testl %eax, %eax
je 0x14da
cmpl $0x28, %eax
jne 0x14ef
callq 0x134f
cmpl $0x29, 0x2bb1(%rip)     # 0x4080
je 0x14fb
leaq 0xb85(%rip), %rdi       # 0x205d
jmp 0x14f6
leaq 0x307f(%rip), %rdi      # 0x4560
leaq 0x2c18(%rip), %rsi      # 0x4100
callq 0x1030
jmp 0x14fb
leaq 0xb82(%rip), %rdi       # 0x2078
callq 0x1040
leaq 0x2c6e(%rip), %rbx      # 0x4170
movabsq $0x5b796172726120, %r12 # imm = 0x5B796172726120
leaq 0x2bed(%rip), %r14      # 0x4100
callq 0x1277
movl %eax, %r15d
movl %eax, 0x2b5f(%rip)      # 0x4080
leal -0x1(%r15), %eax
cmpl $0x1, %eax
ja 0x1572
movq %rbx, %rdi
callq 0x1050
addq %rbx, %rax
cmpl $0x1, %r15d
jne 0x154e
movups 0xb5c(%rip), %xmm0      # 0x209e
movups %xmm0, (%rax)
movl $0x676e69, 0x10(%rax)   # imm = 0x676E69
jmp 0x1513
movq %r12, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1080
movq %rbx, %rdi
callq 0x1050
movl $0x666f205d, (%rax,%rbx) # imm = 0x666F205D
movb $0x0, 0x4(%rax,%rbx)
jmp 0x1513
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/decimal.c
// Function: factorial
struct tt_dec *factorial(int i, int j)
{
	struct tt_dec *dec;

	if (i == j) {
		dec = tt_dec_alloc(0);
		tt_dec_from_uint(dec, i);
		return dec;
	}

	int m = (i + j) / 2;
	struct tt_dec *dec1 = factorial(i, m);
	struct tt_dec *dec2 = factorial(m+1, j);

	dec = tt_dec_alloc(dec1->_prec + dec2->_prec);
	tt_dec_mul(dec, dec1, dec2);

	tt_dec_free(dec1);
	tt_dec_free(dec2);

	return dec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
cmpl %esi, %edi
jne 0x2311
xorl %edi, %edi
callq 0x3a14
movq %rax, %rbx
movslq %r14d, %rsi
movq %rax, %rdi
callq 0x3d10
jmp 0x2367
movl %esi, %ebx
leal (%rbx,%r14), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %ebp
movl %r14d, %edi
movl %eax, %esi
callq 0x22ec
movq %rax, %r14
incl %ebp
movl %ebp, %edi
movl %ebx, %esi
callq 0x22ec
movq %rax, %r15
movl 0x8(%rax), %edi
addl 0x8(%r14), %edi
callq 0x3a14
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4c1e
movq %r14, %rdi
callq 0x3aeb
movq %r15, %rdi
callq 0x3aeb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/decimal.c
// Function: get_num
static long double get_num(char *s, int lmin, int lmax)
{
	long double ld = 0;

	s[0] = ((rand() & 1)) ? '-' : '+';

	/* len: lmin+1 ~ lmax+1 */
	int len = lmin + rand() % (lmax - lmin + 1) + 1;
	for (int i = 1; i < len; i++) {
		s[i] = rand() % 10;
		ld *= 10;
		ld += s[i];
		s[i] += '0';
	}
	s[len] = '\0';

	if (s[0] == '-')
		ld = -ld;

	return ld;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x21e0
andb $0x1, %al
addb %al, %al
addb $0x2b, %al
movb %al, (%rbx)
callq 0x21e0
pushq $0x64
popq %rcx
cltd
idivl %ecx
movslq %edx, %r14
addq $0x2, %r14
fldz
pushq $0x1
popq %r15
pushq $0xa
popq %rbp
cmpq %r14, %r15
jge 0x38b3
fstpt 0xc(%rsp)
callq 0x21e0
cltd
idivl %ebp
fldt 0xc(%rsp)
fmuls 0x87c9(%rip)            # 0xc068
movl %edx, 0x8(%rsp)
fiaddl 0x8(%rsp)
addb $0x30, %dl
movb %dl, (%rbx,%r15)
incq %r15
jmp 0x3884
movb $0x0, (%rbx,%r14)
cmpb $0x2d, (%rbx)
fld %st(0)
fchs
fxch %st(1)
fcmove %st(1), %st
fstp %st(1)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/decimal.c
// Function: deq
static bool deq(double d1, double d2, double prec)
{
	if (isnan(d1))
		return isnan(d2);
	if (isinf(d1))
		return isinf(d2) && signbit(d1) == signbit(d2);
	if (d1 == 0)
		return d2 == 0;
	long double dd = (long double)d1 - (long double)d2;
	dd /= d1;
	return dd < prec;
}

// Assembly:
ucomisd %xmm0, %xmm0
jp 0x3952
movq %xmm0, %rax
movq %rax, %rdx
btrq $0x3f, %rdx
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rdx
jne 0x390e
movq %xmm1, %rdx
movq %rdx, %rsi
btrq $0x3f, %rsi
cmpq %rcx, %rsi
sete %cl
xorq %rdx, %rax
setns %al
andb %cl, %al
retq
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0x3928
jp 0x3928
cmpeqsd %xmm3, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
retq
movsd %xmm0, -0x8(%rsp)
fldl -0x8(%rsp)
movsd %xmm1, -0x10(%rsp)
fld %st(0)
fsubl -0x10(%rsp)
fdivp %st, %st(1)
movsd %xmm2, -0x18(%rsp)
fldl -0x18(%rsp)
fucompi %st(1), %st
fstp %st(0)
seta %al
retq
ucomisd %xmm1, %xmm1
setp %al
retq
// File: /workspace/github_c_makefile_star2_O2/cyb70289[P]tt/tests/decimal.c
// Function: gen_float
static double gen_float(int mexp)
{
	union {
		uint64_t i;
		double d;
	} v = {
		.i = 0,
	};

	/* Sign: 0,1 */
	if (rand() & 1)
		v.i |= 1ULL << 63;

	/* Exponent: -mexp ~ +mexp */
	double _exp = (double)(rand() % (mexp + 1));	/* 0 ~ mexp */
	if (rand() & 1)
		_exp = -_exp;
	int e = 1023;
	if (_exp > 0)
		e = (int)(_exp / log10(2) + 1023);
	else if (_exp < 0)
		e = (int)(_exp / log10(2) + 1024);
	v.i |= ((int64_t)e) << 52;

	/* Mantissa */
	int64_t i64 = rand();
	i64 *= rand();
	v.i |= (i64 & ((1ULL << 52) - 1));

	return v.d;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
callq 0x21e0
movl %eax, %ebx
callq 0x21e0
incl %ebp
cltd
idivl %ebp
cvtsi2sd %edx, %xmm0
movapd %xmm0, (%rsp)
callq 0x21e0
testb $0x1, %al
je 0x3996
movapd (%rsp), %xmm1
xorpd 0x869c(%rip), %xmm1     # 0xc030
jmp 0x399b
movapd (%rsp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x39b7
divsd 0x86a3(%rip), %xmm1     # 0xc050
addsd 0x86ab(%rip), %xmm1     # 0xc060
jmp 0x39d3
movl $0x3ff, %r14d           # imm = 0x3FF
ucomisd %xmm1, %xmm0
jbe 0x39d8
divsd 0x8685(%rip), %xmm1     # 0xc050
addsd 0x8685(%rip), %xmm1     # 0xc058
cvttsd2si %xmm1, %r14d
shlq $0x3f, %rbx
shlq $0x34, %r14
orq %rbx, %r14
callq 0x21e0
movslq %eax, %rbx
callq 0x21e0
cltq
imulq %rbx, %rax
movabsq $0xfffffffffffff, %rcx  # imm = 0xFFFFFFFFFFFFF
andq %rax, %rcx
orq %r14, %rcx
movq %rcx, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/test.c
// Function: test_digest_case
static int
test_digest_case(const struct libkeccak_spec *restrict spec, const char *restrict suffix,
                 const char *restrict msg, size_t bytes, size_t bits, const char *restrict expected_answer)
{
	struct libkeccak_state state;
	int ret;
	if (libkeccak_state_initialise(&state, spec)) {
		perror("libkeccak_state_initialise");
		return -1;
	}
	ret = test_digest_case_inited(&state, spec, suffix, msg, bytes, bits, expected_answer);
	libkeccak_state_fast_destroy(&state);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbp
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x7948
testl %eax, %eax
jne 0x4374
movq %r13, (%rsp)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x4385
movl %eax, %ebx
movq 0x118(%r13), %rdi
callq 0x1030
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e01(%rip), %rdi      # 0x917c
callq 0x1120
pushq $-0x1
popq %rbx
jmp 0x4360
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/test.c
// Function: test_digest_case_inited
static int
test_digest_case_inited(struct libkeccak_state *restrict state, const struct libkeccak_spec *restrict spec,
                        const char *restrict suffix, const char *restrict msg, size_t bytes, size_t bits,
                        const char *restrict expected_answer)
{
	unsigned char *restrict hashsum;
	char *restrict hexsum;
	int ok;

	hashsum = malloc((size_t)((spec->output + 7) / 8));
	if (!hashsum) {
		perror("malloc");
		return -1;
	}
	hexsum = malloc((size_t)((spec->output + 7) / 8 * 2 + 1));
	if (!hexsum) {
		perror("malloc");
		return -1;
	}

	if (libkeccak_digest(state, msg, bytes, bits, suffix, hashsum)) {
		perror("libkeccak_digest");
		return -1;
	}

	libkeccak_behex_lower(hexsum, hashsum, (size_t)((spec->output + 7) / 8));
	ok = !strcmp(hexsum, expected_answer);
	printf("%s%s\n", ok ? "OK" : "Fail: ", ok ? "" : hexsum);
	if (!ok)
		printf("  r, c, n = %li, %li, %li\n", spec->bitrate, spec->capacity, spec->output);

	free(hashsum);
	free(hexsum);

	return ok - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, 0x18(%rsp)
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
movq 0x10(%rsi), %r12
leaq 0x7(%r12), %rax
pushq $0x8
popq %rcx
cqto
idivq %rcx
movq %rax, %r13
movq %rax, %rdi
callq 0x10e0
testq %rax, %rax
je 0x44ae
movq %rax, %r15
movq %r12, 0x8(%rsp)
leaq 0x1(,%r13,2), %rdi
callq 0x10e0
testq %rax, %rax
je 0x44ae
movq %rax, %r12
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
movq %r15, %r9
callq 0x708e
testl %eax, %eax
jne 0x44b7
movq 0x60(%rsp), %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x7f18
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10c0
movl %eax, %r13d
testl %eax, %eax
leaq 0x62a9(%rip), %rax      # 0xa6e7
leaq 0xbab9(%rip), %rsi      # 0xfefe
cmovneq %rax, %rsi
leaq 0x56bc(%rip), %rdx      # 0x9b0c
cmovneq %r12, %rdx
leaq 0x6286(%rip), %rdi      # 0xa6e1
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1080
testl %r13d, %r13d
je 0x4488
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x6272(%rip), %rdi      # 0xa6ee
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x1080
movq %r15, %rdi
callq 0x1030
movq %r12, %rdi
callq 0x1030
negl %r13d
sbbl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4cfc(%rip), %rdi      # 0x91b1
jmp 0x44be
leaq 0x6212(%rip), %rdi      # 0xa6d0
callq 0x1120
pushq $-0x1
popq %rbp
jmp 0x449d
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/test.c
// Function: test_digest_case_cshake
static int
test_digest_case_cshake(const struct libkeccak_spec *restrict spec, const char *restrict suffix,
                        const void *n_text, size_t n_len, size_t n_bits, const char *n_suffix,
                        const void *s_text, size_t s_len, size_t s_bits, const char *s_suffix,
                        const char *restrict msg, size_t bytes, size_t bits, const char *restrict expected_answer)
{
	struct libkeccak_state state;
	int ret;
	if (libkeccak_state_initialise(&state, spec)) {
		perror("libkeccak_state_initialise");
		return -1;
	}
	libkeccak_cshake_initialise(&state, n_text, n_len, n_bits, n_suffix, s_text, s_len, s_bits, s_suffix);
	ret = test_digest_case_inited(&state, spec, suffix, msg, bytes, bits, expected_answer);
	libkeccak_state_fast_destroy(&state);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x7948
testl %eax, %eax
jne 0x4570
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %rbp, (%rsp)
leaq 0x55fd(%rip), %rsi      # 0x9b0c
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
callq 0x738c
movq 0x178(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
movq 0x170(%rsp), %r9
callq 0x4385
movl %eax, %ebx
movq 0x118(%rbp), %rdi
callq 0x1030
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c05(%rip), %rdi      # 0x917c
callq 0x1120
pushq $-0x1
popq %rbx
jmp 0x455c
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/test.c
// Function: test_update_case
static int
test_update_case(const struct libkeccak_spec *restrict spec, const char *restrict suffix,
                 const char *restrict msg, const char *restrict expected_answer)
{
	struct libkeccak_state state;
	unsigned char *restrict hashsum;
	char *restrict hexsum;
	int ok;

	if (libkeccak_state_initialise(&state, spec)) {
		perror("libkeccak_state_initialise");
		return -1;
	}
	hashsum = malloc((size_t)((spec->output + 7) / 8));
	if (!hashsum) {
		perror("malloc");
		return -1;
	}
	hexsum = malloc((size_t)((spec->output + 7) / 8 * 2 + 1));
	if (!hexsum) {
		perror("malloc");
		return -1;
	}

	if (libkeccak_update(&state, msg, strlen(msg))) {
		perror("libkeccak_update");
		return -1;
	}
	if (libkeccak_digest(&state, NULL, 0, 0, suffix, hashsum)) {
		perror("libkeccak_digest");
		return -1;
	}
	libkeccak_state_fast_destroy(&state);

	libkeccak_behex_lower(hexsum, hashsum, (size_t)((spec->output + 7) / 8));
	ok = !strcmp(hexsum, expected_answer);
	printf("%s%s\n", ok ? "OK" : "Fail: ", ok ? "" : hexsum);
	if (!ok)
		printf("  r, c, n = %li, %li, %li\n", spec->bitrate, spec->capacity, spec->output);

	free(hashsum);
	free(hexsum);

	return ok - 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x7948
testl %eax, %eax
jne 0x46de
movq 0x10(%rbx), %rax
addq $0x7, %rax
pushq $0x8
popq %rbp
cqto
idivq %rbp
movq %rax, %r15
movq %rax, %rdi
callq 0x10e0
testq %rax, %rax
je 0x46d5
movq %rax, %r14
leaq 0x1(,%r15,2), %rdi
callq 0x10e0
testq %rax, %rax
je 0x46d5
movq %rax, %r15
movq %r13, %rdi
callq 0x1070
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x5687
testl %eax, %eax
jne 0x46e7
leaq 0xb130(%rip), %r8       # 0xf747
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r9
callq 0x708e
testl %eax, %eax
jne 0x46f0
movq 0x120(%rsp), %rdi
callq 0x1030
andq $0x0, 0x120(%rsp)
movq 0x10(%rbx), %rax
addq $0x7, %rax
cqto
idivq %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x7f18
movq %r15, %rdi
movq %r12, %rsi
callq 0x10c0
movl %eax, %r12d
testl %eax, %eax
leaq 0x606d(%rip), %rax      # 0xa6e7
leaq 0xb87d(%rip), %rsi      # 0xfefe
cmovneq %rax, %rsi
leaq 0x5480(%rip), %rdx      # 0x9b0c
cmovneq %r15, %rdx
leaq 0x604a(%rip), %rdi      # 0xa6e1
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1080
testl %r12d, %r12d
je 0x46be
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
leaq 0x6037(%rip), %rdi      # 0xa6ee
xorl %eax, %eax
callq 0x1080
movq %r14, %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
negl %r12d
sbbl %ebp, %ebp
jmp 0x46ff
leaq 0x4ad5(%rip), %rdi      # 0x91b1
jmp 0x46f7
leaq 0x4a97(%rip), %rdi      # 0x917c
jmp 0x46f7
leaq 0xb45b(%rip), %rdi      # 0xfb49
jmp 0x46f7
leaq 0x5fd9(%rip), %rdi      # 0xa6d0
callq 0x1120
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/test.c
// Function: test_squeeze_case
static int
test_squeeze_case(struct libkeccak_state *restrict state, const struct libkeccak_spec *restrict spec,
                  long int fast_squeezes, long int squeezes, int fast_digest, void *restrict hashsum,
                  char *restrict hexsum, const char *restrict expected_answer)
{
#define message "withdrew hypothesis snakebird qmc2"
	long int i;
	int ok;

	libkeccak_state_reset(state);
	if (libkeccak_digest(state, message, strlen(message), 0, LIBKECCAK_SHA3_SUFFIX, fast_digest ? NULL : hashsum)) {
		perror("libkeccak_digest");
		return -1;
	}

	libkeccak_fast_squeeze(state, fast_squeezes);
	for (i = fast_squeezes; i < squeezes; i++)
		libkeccak_squeeze(state, hashsum);

	libkeccak_behex_lower(hexsum, hashsum, (size_t)((spec->output + 7) / 8));
	ok = !strcmp(hexsum, expected_answer);
	printf("%s%s\n", ok ? "OK" : "Fail: ", ok ? "" : hexsum);
	if (!ok)
		printf("  r, c, n = %li, %li, %li\n", spec->bitrate, spec->capacity, spec->output);

	return ok - 1;
#undef message
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movl %r8d, %ebx
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, 0x10(%rsp)
movq %rdi, %r12
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x108(%rdi)
xorl %r14d, %r14d
movl $0xc8, %edx
xorl %esi, %esi
callq 0x1090
testl %ebx, %ebx
cmoveq %r15, %r14
leaq 0x4e4f(%rip), %rsi      # 0x95bb
leaq 0xafd4(%rip), %r8       # 0xf747
pushq $0x22
popq %rdx
movq %r12, %rdi
xorl %ecx, %ecx
movq %r14, %r9
callq 0x708e
testl %eax, %eax
jne 0x4848
movq %r12, %rdi
movq %rbp, %rsi
callq 0x7325
movq 0x10(%rsp), %r14
cmpq %r13, %rbp
jge 0x47b0
movq %r12, %rdi
movq %r15, %rsi
callq 0x7344
incq %rbp
jmp 0x479b
movq 0x10(%r14), %r12
leaq 0x7(%r12), %rax
pushq $0x8
popq %rcx
cqto
idivq %rcx
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x7f18
movq %r13, %rdi
movq (%rsp), %rsi
callq 0x10c0
movl %eax, %ebx
testl %eax, %eax
leaq 0xb713(%rip), %rax      # 0xfefe
leaq 0x5ef5(%rip), %rsi      # 0xa6e7
cmoveq %rax, %rsi
leaq 0x530f(%rip), %rdx      # 0x9b0c
cmovneq %r13, %rdx
leaq 0x5ed9(%rip), %rdi      # 0xa6e1
xorl %eax, %eax
callq 0x1080
testl %ebx, %ebx
je 0x4839
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x5ecd(%rip), %rdi      # 0xa6ee
movq %r12, %rcx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5e81(%rip), %rdi      # 0xa6d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1120
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/libkeccak_cshake_initialise.c
// Function: encode_left
static size_t
encode_left(struct libkeccak_state *restrict state, uint8_t *restrict buf, size_t byterate, size_t value, size_t off)
{
	size_t x, n, j, i = off;

	for (x = value, n = 0; x; x >>= 8)
		n += 1;
	if (!n)
		n = 1;
	buf[i++] = (uint8_t)n;
	if (i == byterate) {
		libkeccak_zerocopy_update(state, buf, byterate);
		i = 0;
	}

	for (j = 0; j < n;) {
		buf[i++] = (uint8_t)(value >> ((n - ++j) << 3));
		if (i == byterate) {
			libkeccak_zerocopy_update(state, buf, byterate);
			i = 0;
		}
	}

	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
testq %rcx, %rcx
je 0x7793
incq %r13
shrq $0x8, %rcx
jmp 0x7785
cmpq $0x1, %r13
movq %r13, %rcx
adcq $0x0, %rcx
movb %cl, (%r15,%rax)
incq %rax
xorl %ebp, %ebp
cmpq %r14, %rax
jne 0x77bc
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4864
xorl %eax, %eax
cmpq $0x1, %r13
movq %r13, %rdx
adcq $0x0, %rdx
movq %rbp, %rcx
notq %rcx
addq %rdx, %rcx
shlq $0x3, %rcx
cmpq %rbp, %rdx
je 0x77f4
incq %rbp
movq %rbx, %rsi
shrq %cl, %rsi
movb %sil, (%r15,%rax)
incq %rax
addq $-0x8, %rcx
cmpq %rax, %r14
jne 0x77d4
jmp 0x77ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq