LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_producer_free
void pipe_producer_free(pipe_producer_t* handle)
{
    pipe_t* p = PIPIFY(handle);
    size_t new_producer_refcount;

    mutex_lock(&p->begin_lock);
        assertume(p->producer_refcount > 0);
        new_producer_refcount = --p->producer_refcount;
    mutex_unlock(&p->begin_lock);

    if(unlikely(new_producer_refcount == 0))
    {
        size_t consumer_refcount;

        mutex_lock(&p->end_lock);
            consumer_refcount = p->consumer_refcount;
        mutex_unlock(&p->end_lock);

        // If there are still consumers, wake them up if they're waiting on
        // input from a producer. Otherwise, since we're the last handle
        // altogether, we can free the pipe.
        if(likely(consumer_refcount > 0))
            cond_broadcast(&p->just_pushed);
        else
            deallocate(p);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %r14, %rdi
callq 0x1180
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0x1875
leaq -0x1(%r15), %rax
movq %rax, 0x38(%rbx)
movq %r14, %rdi
callq 0x10f0
decq %r15
je 0x1844
popq %rbx
popq %r14
popq %r15
retq
leaq 0x70(%rbx), %r14
movq %r14, %rdi
callq 0x1180
movq 0x40(%rbx), %r15
movq %r14, %rdi
callq 0x10f0
testq %r15, %r15
je 0x1894
addq $0x98, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1040
leaq 0x280b(%rip), %rdi      # 0x4087
leaq 0x27dc(%rip), %rsi      # 0x405f
leaq 0x2848(%rip), %rcx      # 0x40d2
movl $0x298, %edx            # imm = 0x298
callq 0x1090
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1780
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_consumer_free
void pipe_consumer_free(pipe_consumer_t* handle)
{
    pipe_t* p = PIPIFY(handle);
    size_t new_consumer_refcount;

    mutex_lock(&p->end_lock);
        new_consumer_refcount = --p->consumer_refcount;
    mutex_unlock(&p->end_lock);

    if(unlikely(new_consumer_refcount == 0))
    {
        size_t producer_refcount;

        mutex_lock(&p->begin_lock);
            producer_refcount = p->producer_refcount;
        mutex_unlock(&p->begin_lock);

        // If there are still producers, wake them up if they're waiting on
        // room to free up from a consumer. Otherwise, since we're the last
        // handle altogether, we can free the pipe.
        if(likely(producer_refcount > 0))
            cond_broadcast(&p->just_popped);
        else
            deallocate(p);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
movq %r14, %rdi
callq 0x1180
decq 0x40(%rbx)
setne %bpl
movq %r14, %rdi
callq 0x10f0
testb %bpl, %bpl
je 0x18d7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rbx), %r14
movq %r14, %rdi
callq 0x1180
movq 0x38(%rbx), %r15
movq %r14, %rdi
callq 0x10f0
testq %r15, %r15
je 0x190d
addq $0xc8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1780
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_pop
size_t pipe_pop(pipe_consumer_t* p, void* target, size_t count)
{
    size_t elem_size = __pipe_elem_size(PIPIFY(p));

    size_t bytes_left  = count*elem_size;
    size_t bytes_popped = 0;
    size_t ret = -1;

    do {
        ret = __pipe_pop(PIPIFY(p), target, bytes_left);
        target = (void*)((char*)target + ret);
        bytes_popped += ret;
        bytes_left   -= ret;
    } while(ret != 0 && bytes_left);

    return bytes_popped / elem_size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r13
imulq %r13, %rbx
xorl %r12d, %r12d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1d54
addq %rax, %r12
testq %rax, %rax
je 0x1d42
addq %rax, %r14
subq %rax, %rbx
jne 0x1d24
movq %r12, %rax
xorl %edx, %edx
divq %r13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: pipe_reserve
void pipe_reserve(pipe_generic_t* gen, size_t count)
{
    pipe_t* p = PIPIFY(gen);

    count *= __pipe_elem_size(p); // now `count' is in "bytes" instead of "elements".

    if(count == 0)
        count = DEFAULT_MINCAP;

    size_t max_cap = p->max_cap;

    WHILE_LOCKED(
        if(unlikely(count <= bytes_in_use(make_snapshot(p))))
            break;

        p->min_cap = min(count, max_cap);
        resize_buffer(p, count);
    );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
imulq (%rdi), %rsi
testq %rsi, %rsi
pushq $0x20
popq %r15
cmovneq %rsi, %r15
movq 0x10(%rdi), %r13
leaq 0x70(%rdi), %r14
movq %r14, %rdi
callq 0x1180
leaq 0x48(%rbx), %r12
movq %r12, %rdi
callq 0x1180
movq %rbx, %rdi
callq 0x1409
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq 0x18(%rbx), %rsi
addq %rcx, %rsi
subq %rsi, %rax
movq %rcx, %rsi
negq %rsi
cmpq %rdx, %rcx
cmovaeq %rax, %rsi
addq %rdx, %rsi
subq (%rbx), %rsi
cmpq %rsi, %r15
jbe 0x20d6
cmpq %r13, %r15
cmovbq %r15, %r13
movq %r13, 0x8(%rbx)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2115
movq %rbx, %rdi
callq 0x1409
movq %r12, %rdi
callq 0x10f0
movq %r14, %rdi
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: resize_buffer
static snapshot_t resize_buffer(pipe_t* p, size_t new_size)
{
    check_invariants(p);

    const size_t max_cap   = p->max_cap,
                 min_cap   = p->min_cap,
                 elem_size = __pipe_elem_size(p);

    assertume(new_size >= bytes_in_use(make_snapshot(p)));
    assertume(new_size + elem_size > new_size); // overflow
    new_size += elem_size; // include sentinel

    if(unlikely(new_size >= max_cap))
        new_size = max_cap;

    if(new_size <= min_cap)
        return make_snapshot(p);

    char* new_buf = malloc(new_size);
    p->end = copy_pipe_into_new_buf(make_snapshot(p), new_buf);

    p->begin  =
    p->buffer = (free(p->buffer), new_buf);

    p->bufend = new_buf + new_size;

    check_invariants(p);

    return make_snapshot(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x1409
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rbx
movq 0x30(%r14), %r15
movq %rsi, %rcx
subq %rdx, %rcx
subq %rbx, %rcx
addq %r15, %rcx
movq %r15, %r13
subq %rbx, %r13
cmovaq %r13, %rcx
movq (%r14), %r12
subq %r12, %rcx
cmpq %rbp, %rcx
ja 0x2242
addq %rbp, %r12
cmpq %rbp, %r12
jbe 0x2261
movq 0x10(%r14), %rcx
movq 0x8(%r14), %rax
cmpq %rcx, %r12
jae 0x223a
cmpq %rax, %r12
jbe 0x2218
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq %r12, %rdi
callq 0x1100
movq %rax, %rbp
cmpq %r15, %rbx
jae 0x21c4
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x10d0
addq %rbp, %r13
movq %r13, %r15
movq (%rsp), %rbx
jmp 0x21f5
movq 0x8(%rsp), %r13
subq %rbx, %r13
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x10d0
addq %rbp, %r13
movq (%rsp), %rbx
subq %rbx, %r15
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10d0
addq %r13, %r15
movq %r15, 0x30(%r14)
movq %rbx, %rdi
callq 0x1030
movq %rbp, 0x18(%r14)
movq %rbp, 0x28(%r14)
addq %r12, %rbp
movq %rbp, 0x20(%r14)
movq %r14, %rdi
callq 0x1409
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20fb
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r12
jmp 0x2188
leaq 0x2144(%rip), %rdi      # 0x438d
leaq 0x1e0f(%rip), %rsi      # 0x405f
leaq 0x2161(%rip), %rcx      # 0x43b8
movl $0x2e9, %edx            # imm = 0x2E9
callq 0x1090
leaq 0x217b(%rip), %rdi      # 0x43e3
leaq 0x1df0(%rip), %rsi      # 0x405f
leaq 0x2142(%rip), %rcx      # 0x43b8
movl $0x2ea, %edx            # imm = 0x2EA
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_test.c
// Function: double_elems
static void double_elems(const void* elems, size_t count, pipe_producer_t* out, void* aux)
{
    UNUSED_PARAMETER(aux);

    if(count == 0)
        return;

    testdata_t outbuffer[count];

    memcpy(outbuffer, elems, count*sizeof(testdata_t));

    for(size_t i = 0; i < count; ++i)
        outbuffer[i].new *= 2;

    pipe_push(out, outbuffer, count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rsi, %rsi
je 0x2818
movq %rdx, %r14
movq %rdi, %rsi
movq %rsp, %r12
movq %rsp, %r15
leaq 0xf(,%rbx,8), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
leaq (,%rbx,8), %rdx
movq %r15, %rdi
callq 0x10d0
xorl %eax, %eax
cmpq %rax, %rbx
je 0x2807
shll 0x4(%r15,%rax,8)
incq %rax
jmp 0x27f8
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1cff
movq %r12, %rsp
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_test.c
// Function: test_issue_5
DEF_TEST(issue_5)
{
  static const int NUM = 32;
  pipe_t* pipe = pipe_new(sizeof(int), 0);
  pipe_producer_t* p = pipe_producer_new(pipe);
  pipe_consumer_t* c = pipe_consumer_new(pipe);
  pipe_free(pipe);

  int data[NUM];
  for(int i=0; i < NUM; ++i)
    data[i] = i;
  pipe_push(p, data, NUM);
  pipe_producer_free(p);

  int buf[NUM];
  size_t ret = pipe_pop(c, buf, NUM);
  assert(ret == NUM);
  for(int i=0; i < NUM; ++i)
    assert(buf[i] == data[i]);

  pipe_consumer_free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
xorl %r12d, %r12d
pushq $0x4
popq %rdi
xorl %esi, %esi
callq 0x1290
movq %rax, %r15
movq %rax, %rdi
callq 0x1639
movq %rax, %r14
movq %r15, %rdi
callq 0x1663
movq %rax, %rbx
movq %r15, %rdi
callq 0x168d
cmpq $0x20, %r12
je 0x291c
movl %r12d, -0xa0(%rbp,%r12,4)
incq %r12
jmp 0x2909
leaq -0xa0(%rbp), %rsi
pushq $0x20
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x1cff
movq %r14, %rdi
callq 0x180c
movq %rsp, %r14
addq $-0x80, %r14
movq %r14, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d08
cmpq $0x20, %rax
jne 0x29a8
xorl %eax, %eax
cmpq $0x20, %rax
je 0x2993
movl (%r14,%rax,4), %ecx
leaq 0x1(%rax), %rdx
cmpl -0xa0(%rbp,%rax,4), %ecx
movq %rdx, %rax
je 0x295a
leaq 0x1c39(%rip), %rdi      # 0x45b4
leaq 0x1b2c(%rip), %rsi      # 0x44ae
leaq 0x1c17(%rip), %rcx      # 0x45a0
movl $0xf7, %edx
callq 0x1090
movq %rbx, %rdi
callq 0x18a1
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1be6(%rip), %rdi      # 0x4595
leaq 0x1af8(%rip), %rsi      # 0x44ae
leaq 0x1be3(%rip), %rcx      # 0x45a0
movl $0xf5, %edx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_test.c
// Function: test_issue_6_b
DEF_TEST(issue_6_b)
{
  static const int NUM = 16;
  pipe_t* pipe = pipe_new(sizeof(int), NUM * 2);
  pipe_reserve(PIPE_GENERIC(pipe), NUM);
  pipe_producer_t* p = pipe_producer_new(pipe);
  pipe_consumer_t* c = pipe_consumer_new(pipe);
  pipe_free(pipe);

  int data[NUM];
  for(int i=0; i < NUM; ++i)
    data[i] = i;
  pipe_push(p, data, NUM);
  pipe_producer_free(p);

  int buf[NUM];
  size_t ret = pipe_pop(c, buf, NUM);
  assert(ret == NUM);
  for(int i=0; i < NUM; ++i)
    assert(buf[i] == data[i]);

  pipe_consumer_free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
pushq $0x4
popq %rdi
pushq $0x20
popq %rsi
callq 0x1290
movq %rax, %r15
pushq $0x10
popq %rsi
movq %rax, %rdi
callq 0x204a
movq %r15, %rdi
callq 0x1639
movq %rax, %r14
movq %r15, %rdi
callq 0x1663
movq %rax, %rbx
movq %r15, %rdi
callq 0x168d
xorl %eax, %eax
cmpq $0x10, %rax
je 0x2b15
movl %eax, -0x60(%rbp,%rax,4)
incq %rax
jmp 0x2b06
leaq -0x60(%rbp), %rsi
pushq $0x10
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x1cff
movq %r14, %rdi
callq 0x180c
movq %rsp, %r14
addq $-0x40, %r14
movq %r14, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d08
cmpq $0x10, %rax
jne 0x2b99
xorl %eax, %eax
cmpq $0x10, %rax
je 0x2b86
movl (%r14,%rax,4), %ecx
leaq 0x1(%rax), %rdx
cmpl -0x60(%rbp,%rax,4), %ecx
movq %rdx, %rax
je 0x2b50
leaq 0x1a46(%rip), %rdi      # 0x45b4
leaq 0x1939(%rip), %rsi      # 0x44ae
leaq 0x1a60(%rip), %rcx      # 0x45dc
movl $0x128, %edx            # imm = 0x128
callq 0x1090
movq %rbx, %rdi
callq 0x18a1
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19f5(%rip), %rdi      # 0x4595
leaq 0x1907(%rip), %rsi      # 0x44ae
leaq 0x1a2e(%rip), %rcx      # 0x45dc
movl $0x126, %edx            # imm = 0x126
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_test.c
// Function: process_pipe_issue_6_c
static void* process_pipe_issue_6_c(void* param)
{
  static const int NUM = 32;
  issue_6_t* v = (issue_6_t *)param;

  //printf("Consumer waiting for a bit ...\n");
  //printf("Consumer starts to read pipe ...\n");
  thread_sleep(1);
  assert(v->writing); // producer still writing, blocked from finishing
  int buf[NUM];
  size_t ret = pipe_pop(v->c, buf, NUM);
  assert(ret == NUM);
  for(int i=0; i < NUM; ++i)
    assert(buf[i] == i);

  v->read = NUM;
  pipe_consumer_free(v->c);
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdi
callq 0x1160
cmpl $0x0, 0x8(%rbx)
je 0x2c3d
movq %rsp, %r14
addq $-0x80, %r14
movq %r14, %rsp
movq (%rbx), %rdi
pushq $0x20
popq %rdx
movq %r14, %rsi
callq 0x1d08
cmpq $0x20, %rax
jne 0x2c5c
pushq $-0x1
popq %rax
cmpq $0x1f, %rax
je 0x2c23
movl 0x4(%r14,%rax,4), %ecx
incq %rax
cmpq %rcx, %rax
je 0x2bf1
leaq 0x1a41(%rip), %rdi      # 0x464c
leaq 0x189c(%rip), %rsi      # 0x44ae
leaq 0x1a0e(%rip), %rcx      # 0x4627
movl $0x15d, %edx            # imm = 0x15D
callq 0x1090
movl $0x20, 0xc(%rbx)
movq (%rbx), %rdi
callq 0x18a1
xorl %eax, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x19d8(%rip), %rdi      # 0x461c
leaq 0x1863(%rip), %rsi      # 0x44ae
leaq 0x19d5(%rip), %rcx      # 0x4627
movl $0x158, %edx            # imm = 0x158
callq 0x1090
leaq 0x1932(%rip), %rdi      # 0x4595
leaq 0x1844(%rip), %rsi      # 0x44ae
leaq 0x19b6(%rip), %rcx      # 0x4627
movl $0x15b, %edx            # imm = 0x15B
callq 0x1090
nop
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_util.c
// Function: pipe_connect
void pipe_connect(pipe_consumer_t* in,
                  pipe_processor_t proc, void* aux,
                  pipe_producer_t* out)
{
    assert(in);
    assert(out);
    assert(proc);

    connect_data_t* d = malloc(sizeof *d);

    *d = (connect_data_t) {
        .in = in,
        .proc = proc,
        .aux = aux,
        .out = out
    };

    thread_create(&process_pipe, d);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2cfb
movq %rcx, %rbx
testq %rcx, %rcx
je 0x2d14
movq %rsi, %r15
testq %rsi, %rsi
je 0x2d2d
movq %rdx, %r14
movq %rdi, %r12
pushq $0x20
popq %rdi
callq 0x1100
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x68(%rip), %rdx        # 0x2d4a
movq %rsp, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x1120
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x17ff(%rip), %rdi      # 0x4501
leaq 0x19bf(%rip), %rsi      # 0x46c8
leaq 0x19c4(%rip), %rcx      # 0x46d4
pushq $0x61
jmp 0x2d44
leaq 0x1812(%rip), %rdi      # 0x452d
leaq 0x19a6(%rip), %rsi      # 0x46c8
leaq 0x19ab(%rip), %rcx      # 0x46d4
pushq $0x62
jmp 0x2d44
leaq 0x19f2(%rip), %rdi      # 0x4726
leaq 0x198d(%rip), %rsi      # 0x46c8
leaq 0x1992(%rip), %rcx      # 0x46d4
pushq $0x63
popq %rdx
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_util.c
// Function: process_pipe
static void* process_pipe(void* param)
{
    connect_data_t p = *(connect_data_t*)param;
    free(param);

    char* buf = malloc(DEFAULT_BUFFER_SIZE * pipe_elem_size(PIPE_GENERIC(p.in)));

    size_t elems_read;

    while((elems_read = pipe_pop(p.in, buf, DEFAULT_BUFFER_SIZE)))
        p.proc(buf, elems_read, p.out, p.aux);

    p.proc(NULL, 0, NULL, p.aux);

    free(buf);

    pipe_consumer_free(p.in);
    pipe_producer_free(p.out);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r13
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rbx
callq 0x1030
movq %r14, %rdi
callq 0x128c
shlq $0x7, %rax
movq %rax, %rdi
callq 0x1100
movq %rax, %r12
movl $0x80, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1d08
testq %rax, %rax
je 0x2da4
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq *%r13
jmp 0x2d7e
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq *%r13
movq %r12, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x18a1
movq %rbx, %rdi
callq 0x180c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_util.c
// Function: pipe_parallel
pipeline_t pipe_parallel(size_t           instances,
                         size_t           in_size,
                         pipe_processor_t proc,
                         void*            aux,
                         size_t           out_size)
{
    pipe_t* in  = pipe_new(in_size,  0),
          * out = pipe_new(out_size, 0);

    while(instances--)
        pipe_connect(pipe_consumer_new(in),
                     proc, aux,
                     pipe_producer_new(out));

    pipeline_t ret = {
        .in  = pipe_producer_new(in),
        .out = pipe_consumer_new(out)
    };

    pipe_free(in);
    pipe_free(out);

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r13
movq %rsi, %rdi
xorl %esi, %esi
callq 0x1290
movq %rax, %rbx
movq %r12, %rdi
xorl %esi, %esi
callq 0x1290
movq %rax, %r12
movq %rbx, %rdi
subq $0x1, %r13
jb 0x2e31
callq 0x1663
movq %rax, %rbp
movq %r12, %rdi
callq 0x1639
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x2ca1
jmp 0x2e05
callq 0x1639
movq %rax, %r14
movq %r12, %rdi
callq 0x1663
movq %rax, %r15
movq %rbx, %rdi
callq 0x168d
movq %r12, %rdi
callq 0x168d
movq %r14, %rax
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_util.c
// Function: pipe_pipeline
pipeline_t pipe_pipeline(size_t first_size, ...)
{
    va_list va;
    va_start(va, first_size);

    pipe_t* p = pipe_new(first_size, 0);

    pipeline_t ret = va_pipe_pipeline(pipe_trivial_pipeline(p), va);

    pipe_free(p);

    va_end(va);

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
leaq 0x20(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x2ec9
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, %rbx
movq %r10, 0x10(%rbx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rbx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rbx)
xorl %esi, %esi
callq 0x1290
movq %rax, %r14
movq %rax, %rdi
callq 0x2c7c
movq %rax, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x2f2a
movq %rax, %rbx
movq %rdx, %r15
movq %r14, %rdi
callq 0x168d
movq %rbx, %rax
movq %r15, %rdx
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe_util.c
// Function: va_pipe_pipeline
static pipeline_t va_pipe_pipeline(pipeline_t result_so_far,
                                   va_list args)
{
    pipe_processor_t proc = va_arg(args, pipe_processor_t);

    if(proc == NULL)
        return result_so_far;

    void*  aux       = va_arg(args, void*);
    size_t pipe_size = va_arg(args, size_t);

    if(pipe_size == 0)
    {
        pipe_consumer_free(result_so_far.out);
        result_so_far.out = NULL;
        return result_so_far;
    }

    pipe_t* pipe = pipe_new(pipe_size, 0);

    pipe_connect(result_so_far.out , proc, aux, pipe_producer_new(pipe));
    result_so_far.out = pipe_consumer_new(pipe);

    pipe_free(pipe);

    return va_pipe_pipeline(result_so_far, args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdx), %eax
cmpq $0x28, %rax
ja 0x2f55
movq %rax, %rcx
addq 0x10(%r15), %rcx
addl $0x8, %eax
movl %eax, (%r15)
jmp 0x2f61
movq 0x8(%r15), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r15)
movq (%rcx), %r12
testq %r12, %r12
je 0x300f
cmpl $0x29, %eax
jae 0x2f95
movq 0x10(%r15), %rdx
movl %eax, %esi
leal 0x8(%rax), %ecx
movl %ecx, (%r15)
movq (%rdx,%rsi), %r13
cmpl $0x20, %eax
ja 0x2fa4
movl %ecx, %ecx
addq 0x10(%r15), %rcx
addl $0x10, %eax
movl %eax, (%r15)
jmp 0x2fb0
movq 0x8(%r15), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r15)
movq (%rax), %r13
movq 0x8(%r15), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x8(%r15)
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x3004
xorl %esi, %esi
callq 0x1290
movq %rax, %rbp
movq %rax, %rdi
callq 0x1639
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %rcx
callq 0x2ca1
movq %rbp, %rdi
callq 0x1663
movq %rax, %r14
movq %rbp, %rdi
callq 0x168d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2f2a
movq %rax, %rbx
movq %rdx, %r14
jmp 0x300f
movq %r14, %rdi
callq 0x18a1
xorl %r14d, %r14d
movq %rbx, %rax
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/thread_ring.c
// Function: main
int main(int argc, char** argv)
{
    if(argc != 2)
    {
        printf("Usage: %s [N]\nN = the number of times to pass around a token.\n", argv[0]);
        return 255;
    }

    int passes = atoi(argv[1]);

    pipe_t* last_pipe = pipe_new(sizeof(int), 0);

    pipe_producer_t* first = pipe_producer_new(last_pipe);

    for(int i = 0; i < THREADS - 1; ++i)
    {
        thread_context_t* ctx = contexts + i;

        ctx->threadnumber = i + 1;

        ctx->in = pipe_consumer_new(last_pipe);
        pipe_free(last_pipe);

        last_pipe = pipe_new(sizeof(int), 0);
        ctx->out = pipe_producer_new(last_pipe);

        spawn_thread(ctx);
    }

    contexts[THREADS-1] = (thread_context_t) {
        .threadnumber = THREADS,
        .in = pipe_consumer_new(last_pipe),
        .out = first
    };

    pipe_free(last_pipe);

    spawn_thread(contexts + THREADS - 1);

    pipe_push(first, &passes, 1);

    pthread_join(thread, NULL);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x2, %edi
jne 0x30bb
movq 0x8(%rsi), %rdi
callq 0x1140
movl %eax, 0xc(%rsp)
pushq $0x4
popq %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x1290
movq %rax, %r15
movq %rax, %rdi
callq 0x1639
movq %rax, %rbx
pushq $-0x7
popq %r13
leaq 0x4082(%rip), %r12      # 0x70f0
testq %r13, %r13
je 0x30d3
leal 0x8(%r13), %eax
movl %eax, (%r12)
movq %r15, %rdi
callq 0x1663
movq %rax, 0x8(%r12)
movq %r15, %rdi
callq 0x168d
movq %r14, %rdi
xorl %esi, %esi
callq 0x1290
movq %rax, %r15
movq %rax, %rdi
callq 0x1639
movq %rax, 0x10(%r12)
movq %r12, %rdi
callq 0x313a
incq %r13
addq $0x18, %r12
jmp 0x306e
movq (%rsi), %rsi
leaq 0x1666(%rip), %rdi      # 0x472b
xorl %eax, %eax
callq 0x1070
movl $0xff, %ebx
jmp 0x312a
movq %r15, %rdi
callq 0x1663
movl $0x8, 0x40b3(%rip)      # 0x7198
leaq 0x40ac(%rip), %r14      # 0x7198
movq %rax, 0x40ad(%rip)      # 0x71a0
movq %rbx, 0x40ae(%rip)      # 0x71a8
movq %r15, %rdi
callq 0x168d
movq %r14, %rdi
callq 0x313a
leaq 0xc(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x1cff
movq 0x408f(%rip), %rdi      # 0x71b0
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1150
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/thread_ring.c
// Function: thread_func
static void* thread_func(void* context)
{
    thread_context_t* ctx = context;

    int n = 0;

    while(pipe_pop(ctx->in, &n, 1))
    {
        if(n == 0)
        {
            printf("%i\n", ctx->threadnumber);
            break;
        }

        --n;

        pipe_push(ctx->out, &n, 1);
    }

    pipe_producer_free(ctx->out);
    pipe_consumer_free(ctx->in);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
pushq $0x1
popq %r15
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d08
testq %rax, %rax
je 0x31ae
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x319e
decl %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1cff
jmp 0x316b
movl (%rbx), %esi
leaq 0x15c3(%rip), %rdi      # 0x476a
xorl %eax, %eax
callq 0x1070
movq 0x10(%rbx), %rdi
callq 0x180c
movq 0x8(%rbx), %rdi
callq 0x18a1
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/abstract.c
// Function: janet_abstract_begin
void *janet_abstract_begin(const JanetAbstractType *atype, size_t size) {
    JanetAbstractHead *header = janet_gcalloc(JANET_MEMORY_NONE,
                                sizeof(JanetAbstractHead) + size);
    header->size = size;
    header->type = atype;
    return (void *) & (header->data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x20, %rsi
xorl %edi, %edi
callq 0x291a0
movq %rbx, 0x18(%rax)
movq %r14, 0x10(%rax)
addq $0x20, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/abstract.c
// Function: janet_abstract_begin_threaded
void *janet_abstract_begin_threaded(const JanetAbstractType *atype, size_t size) {
    JanetAbstractHead *header = janet_malloc(sizeof(JanetAbstractHead) + size);
    if (NULL == header) {
        JANET_OUT_OF_MEMORY;
    }
    janet_vm.next_collection += size + sizeof(JanetAbstractHead);
    header->gc.flags = JANET_MEMORY_THREADED_ABSTRACT;
    header->gc.data.next = NULL; /* Clear memory for address sanitizers */
    header->gc.data.refcount = 1;
    header->size = size;
    header->type = atype;
    void *abstract = (void *) & (header->data);
    janet_table_put(&janet_vm.threaded_abstracts, janet_wrap_abstract(abstract), janet_wrap_false());
    return abstract;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x20(%rsi), %r12
movq %r12, %rdi
callq 0x12760
testq %rax, %rax
je 0x12e40
movq %rax, %rbx
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
addq %r12, 0xa8(%rax)
movl $0xd, (%rbx)
andq $0x0, 0x8(%rbx)
movl $0x1, 0x8(%rbx)
movq %r15, 0x18(%rbx)
movq %r14, 0x10(%rbx)
addq $0x20, %rbx
leaq 0x268(%rax), %r14
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
movq %rbx, %rdi
callq 0x4b3ab
movq %rax, %r15
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
callq 0x4b313
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x43e19
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6d1a9(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x3a1b3(%rip), %rsi     # 0x4d004
leaq 0x3a1c9(%rip), %rdx     # 0x4d021
pushq $0x40
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/abstract.c
// Function: janet_os_mutex_init
void janet_os_mutex_init(JanetOSMutex *mutex) {
    pthread_mutexattr_t attr;
    pthread_mutexattr_init(&attr);
    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    pthread_mutex_init((pthread_mutex_t *) mutex, &attr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x14(%rbp), %r14
movq %r14, %rdi
callq 0x12ac0
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x123a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12ba0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_impl
static void janet_array_impl(JanetArray *array, int32_t capacity) {
    Janet *data = NULL;
    if (capacity > 0) {
        janet_vm.next_collection += capacity * sizeof(Janet);
        data = (Janet *) janet_malloc(sizeof(Janet) * (size_t) capacity);
        if (NULL == data) {
            JANET_OUT_OF_MEMORY;
        }
    }
    array->count = 0;
    array->capacity = capacity;
    array->data = data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
testl %esi, %esi
jle 0x12ffa
movl %r14d, %r15d
shlq $0x3, %r15
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
addq %r15, 0xa8(%rax)
movq %r15, %rdi
callq 0x12760
testq %rax, %rax
jne 0x12ffc
movq 0x6d019(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x3a023(%rip), %rsi     # 0x4d004
leaq 0x3a061(%rip), %rdx     # 0x4d049
pushq $0x27
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
xorl %eax, %eax
andl $0x0, 0x10(%rbx)
movl %r14d, 0x14(%rbx)
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_n
JanetArray *janet_array_n(const Janet *elements, int32_t n) {
    JanetArray *array = janet_gcalloc(JANET_MEMORY_ARRAY, sizeof(JanetArray));
    array->capacity = n;
    array->count = n;
    array->data = janet_malloc(sizeof(Janet) * (size_t) n);
    if (!array->data) {
        JANET_OUT_OF_MEMORY;
    }
    safe_memcpy(array->data, elements, sizeof(Janet) * n);
    return array;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
pushq $0x3
popq %rdi
pushq $0x20
popq %rsi
callq 0x291a0
movq %rax, %r14
movl %r15d, 0x14(%rax)
movl %r15d, 0x10(%rax)
movslq %r15d, %r15
shlq $0x3, %r15
movq %r15, %rdi
callq 0x12760
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x13096
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x44ae2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x6cf53(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x39f5d(%rip), %rsi     # 0x4d004
leaq 0x39f9b(%rip), %rdx     # 0x4d049
pushq $0x44
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_ensure
void janet_array_ensure(JanetArray *array, int32_t capacity, int32_t growth) {
    Janet *newData;
    Janet *old = array->data;
    if (capacity <= array->capacity) return;
    int64_t new_capacity = ((int64_t) capacity) * growth;
    if (new_capacity > INT32_MAX) new_capacity = INT32_MAX;
    capacity = (int32_t) new_capacity;
    newData = janet_realloc(old, capacity * sizeof(Janet));
    if (NULL == newData) {
        JANET_OUT_OF_MEMORY;
    }
    janet_vm.next_collection += (capacity - array->capacity) * sizeof(Janet);
    array->data = newData;
    array->capacity = capacity;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl %esi, 0x14(%rdi)
jge 0x13131
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movslq %esi, %rax
movslq %edx, %r15
imulq %rax, %r15
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %r15
cmovgeq %rax, %r15
movslq %r15d, %rsi
shlq $0x3, %rsi
callq 0x12840
testq %rax, %rax
je 0x1313a
movq %rax, %r14
movslq 0x14(%rbx), %rax
movslq %r15d, %r15
movq %r15, %r12
subq %rax, %r12
shlq $0x3, %r12
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
addq %r12, 0xa8(%rax)
movq %r14, 0x18(%rbx)
movl %r15d, 0x14(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x6ceaf(%rip), %rax     # 0x7fff0
movq (%rax), %rdi
leaq 0x39eb9(%rip), %rsi     # 0x4d004
leaq 0x39ef7(%rip), %rdx     # 0x4d049
pushq $0x54
popq %rcx
xorl %eax, %eax
callq 0x125e0
pushq $0x1
popq %rdi
callq 0x12a60
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_setcount
void janet_array_setcount(JanetArray *array, int32_t count) {
    if (count < 0)
        return;
    if (count > array->count) {
        int32_t i;
        janet_array_ensure(array, count, 1);
        for (i = array->count; i < count; i++) {
            array->data[i] = janet_wrap_nil();
        }
    }
    array->count = count;
}

// Assembly:
testl %esi, %esi
js 0x131d1
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl %esi, -0x2c(%rbp)
cmpl %esi, 0x10(%rdi)
jge 0x131bc
pushq $0x1
popq %rdx
movq %r14, %rdi
movl -0x2c(%rbp), %ebx
movl %ebx, %esi
callq 0x130c0
movslq 0x10(%r14), %r12
movl %ebx, %r13d
movabsq $-0x77fffffffffff, %r15 # imm = 0xFFF8800000000001
cmpq %r13, %r12
jge 0x131bc
movq 0x18(%r14), %rbx
movq %r15, %rdi
callq 0x4b313
movq %rax, (%rbx,%r12,8)
incq %r12
jmp 0x131a2
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_push
void janet_array_push(JanetArray *array, Janet x) {
    if (array->count == INT32_MAX) {
        janet_panic("array overflow");
    }
    int32_t newcount = array->count + 1;
    janet_array_ensure(array, newcount, 2);
    array->data[array->count] = x;
    array->count = newcount;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x10(%rdi), %r15d
cmpl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
je 0x13218
movq %rsi, %r14
movq %rdi, %rbx
incl %r15d
pushq $0x2
popq %rdx
movl %r15d, %esi
callq 0x130c0
movq 0x18(%rbx), %rax
movslq 0x10(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
movl %r15d, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39e3b(%rip), %rdi     # 0x4d05a
callq 0x177b1
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_pop
Janet janet_array_pop(JanetArray *array) {
    if (array->count) {
        return array->data[--array->count];
    } else {
        return janet_wrap_nil();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x10(%rdi), %rax
testq %rax, %rax
je 0x13243
movq 0x18(%rdi), %rcx
leaq -0x1(%rax), %rdx
movl %edx, 0x10(%rdi)
movq -0x8(%rcx,%rax,8), %rax
popq %rbp
retq
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
popq %rbp
jmp 0x4b313
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/array.c
// Function: janet_array_peek
Janet janet_array_peek(JanetArray *array) {
    if (array->count) {
        return array->data[array->count - 1];
    } else {
        return janet_wrap_nil();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1326b
movq 0x18(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rax
popq %rbp
retq
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
popq %rbp
jmp 0x4b313
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: tup2
static const Janet *tup2(Janet x, Janet y) {
    Janet *tup = janet_tuple_begin(2);
    tup[0] = x;
    tup[1] = y;
    return janet_tuple_end(tup);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x2
popq %rdi
callq 0x44648
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x44674
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: tup3
static const Janet *tup3(Janet x, Janet y, Janet z) {
    Janet *tup = janet_tuple_begin(3);
    tup[0] = x;
    tup[1] = y;
    tup[2] = z;
    return janet_tuple_end(tup);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x3
popq %rdi
callq 0x44648
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x44674
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: tup4
static const Janet *tup4(Janet w, Janet x, Janet y, Janet z) {
    Janet *tup = janet_tuple_begin(4);
    tup[0] = w;
    tup[1] = x;
    tup[2] = y;
    tup[3] = z;
    return janet_tuple_end(tup);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
pushq $0x4
popq %rdi
callq 0x44648
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x44674
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_disasm_bytecode
static Janet janet_disasm_bytecode(JanetFuncDef *def) {
    JanetArray *bcode = janet_array(def->bytecode_length);
    for (int32_t i = 0; i < def->bytecode_length; i++) {
        bcode->data[i] = janet_asm_decode_instruction(def->bytecode[i]);
    }
    bcode->count = def->bytecode_length;
    return janet_wrap_array(bcode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x70(%rdi), %edi
callq 0x12f68
movq %rax, %r14
xorl %r15d, %r15d
movslq 0x70(%rbx), %rax
cmpq %rax, %r15
jge 0x1538b
movq 0x18(%r14), %r12
movq 0x28(%rbx), %rax
movl (%rax,%r15,4), %edi
callq 0x14c8f
movq %rax, (%r12,%r15,8)
incq %r15
jmp 0x15368
movl %eax, 0x10(%r14)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4b3ab
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_disasm_constants
static Janet janet_disasm_constants(JanetFuncDef *def) {
    JanetArray *constants = janet_array(def->constants_length);
    for (int32_t i = 0; i < def->constants_length; i++) {
        constants->data[i] = def->constants[i];
    }
    constants->count = def->constants_length;
    return janet_wrap_array(constants);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x6c(%rdi), %edi
callq 0x12f68
xorl %ecx, %ecx
movslq 0x6c(%rbx), %rdx
cmpq %rdx, %rcx
jge 0x1547f
movq 0x18(%rax), %rdx
movq 0x18(%rbx), %rsi
movq (%rsi,%rcx,8), %rsi
movq %rsi, (%rdx,%rcx,8)
incq %rcx
jmp 0x15461
movl %edx, 0x10(%rax)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b3ab
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_disasm_sourcemap
static Janet janet_disasm_sourcemap(JanetFuncDef *def) {
    if (NULL == def->sourcemap) return janet_wrap_nil();
    JanetArray *sourcemap = janet_array(def->bytecode_length);
    for (int32_t i = 0; i < def->bytecode_length; i++) {
        Janet *t = janet_tuple_begin(2);
        JanetSourceMapping mapping = def->sourcemap[i];
        t[0] = janet_wrap_integer(mapping.line);
        t[1] = janet_wrap_integer(mapping.column);
        sourcemap->data[i] = janet_wrap_tuple(janet_tuple_end(t));
    }
    sourcemap->count = def->bytecode_length;
    return janet_wrap_array(sourcemap);
}

// Assembly:
cmpq $0x0, 0x38(%rdi)
je 0x15550
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x70(%rdi), %edi
callq 0x12f68
movq %rax, %r14
xorl %r15d, %r15d
movslq 0x70(%rbx), %rax
cmpq %rax, %r15
jge 0x1552c
pushq $0x2
popq %rdi
callq 0x44648
movq %rax, %r13
movq 0x38(%rbx), %rax
cvtsi2sdl (%rax,%r15,8), %xmm0
cvtsi2sdl 0x4(%rax,%r15,8), %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0x4b471
movq %rax, (%r13)
movsd -0x30(%rbp), %xmm0
callq 0x4b471
movq %rax, 0x8(%r13)
movq 0x18(%r14), %r12
movq %r13, %rdi
callq 0x44674
movq %rax, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
callq 0x4b366
movq %rax, (%r12,%r15,8)
incq %r15
jmp 0x154c4
movl %eax, 0x10(%r14)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4b3ab
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
jmp 0x4b313
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_disasm_environments
static Janet janet_disasm_environments(JanetFuncDef *def) {
    JanetArray *envs = janet_array(def->environments_length);
    for (int32_t i = 0; i < def->environments_length; i++) {
        envs->data[i] = janet_wrap_integer(def->environments[i]);
    }
    envs->count = def->environments_length;
    return janet_wrap_array(envs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x74(%rdi), %edi
callq 0x12f68
movq %rax, %r14
xorl %r15d, %r15d
movslq 0x74(%rbx), %rax
cmpq %rax, %r15
jge 0x155a0
movq 0x18(%r14), %r12
movq 0x10(%rbx), %rax
cvtsi2sdl (%rax,%r15,4), %xmm0
callq 0x4b471
movq %rax, (%r12,%r15,8)
incq %r15
jmp 0x1557b
movl %eax, 0x10(%r14)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4b3ab
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_disasm_defs
static Janet janet_disasm_defs(JanetFuncDef *def) {
    JanetArray *defs = janet_array(def->defs_length);
    for (int32_t i = 0; i < def->defs_length; i++) {
        defs->data[i] = janet_disasm(def->defs[i]);
    }
    defs->count = def->defs_length;
    return janet_wrap_array(defs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x78(%rdi), %edi
callq 0x12f68
movq %rax, %r14
xorl %r15d, %r15d
movslq 0x78(%rbx), %rax
cmpq %rax, %r15
jge 0x155fd
movq 0x18(%r14), %r12
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x14f01
movq %rax, (%r12,%r15,8)
incq %r15
jmp 0x155da
movl %eax, 0x10(%r14)
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4b3ab
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_asm_deinit
static void janet_asm_deinit(JanetAssembler *a) {
    janet_table_deinit(&a->slots);
    janet_table_deinit(&a->labels);
    janet_table_deinit(&a->envs);
    janet_table_deinit(&a->defs);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x128, %rdi            # imm = 0x128
callq 0x43b70
leaq 0xf8(%rbx), %rdi
callq 0x43b70
leaq 0x158(%rbx), %rdi
callq 0x43b70
addq $0x188, %rbx            # imm = 0x188
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43b70
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_asm_error
static void janet_asm_error(JanetAssembler *a, const char *message) {
    if (a->errindex < 0) {
        a->errmessage = janet_formatc("%s", message);
    } else {
        a->errmessage = janet_formatc("%s, instruction %d", message, a->errindex);
    }
    janet_asm_longjmp(a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xe0(%rdi), %edx
testl %edx, %edx
jns 0x159b3
leaq 0x4e688(%rip), %rdi     # 0x64032
xorl %eax, %eax
callq 0x3c0ed
jmp 0x159c1
leaq 0x38d47(%rip), %rdi     # 0x4e701
xorl %eax, %eax
callq 0x3c0ed
movq %rax, 0xd8(%rbx)
movq %rbx, %rdi
callq 0x15980
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: janet_get1
static Janet janet_get1(Janet ds, Janet key) {
    switch (janet_type(ds)) {
        default:
            return janet_wrap_nil();
        case JANET_TABLE:
            return janet_table_get(janet_unwrap_table(ds), key);
        case JANET_STRUCT:
            return janet_struct_get(janet_unwrap_struct(ds), key);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %xmm0
movq %rdi, %rcx
shrq $0x2f, %rcx
andl $0xf, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm0
movq %rsi, %rbx
cmovpl %ecx, %eax
cmpl $0x9, %eax
je 0x15a11
cmpl $0xa, %eax
jne 0x15a27
callq 0x4b1f1
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x430d3
callq 0x4b1f1
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x43c35
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4b313
// File: /workspace/github_c_makefile_star2_O2/janet-lang[P]janet/src/core/asm.c
// Function: doarg
static uint32_t doarg(
    JanetAssembler *a,
    enum JanetOpArgType argtype,
    int nth,
    int nbytes,
    int hassign,
    Janet x) {
    int32_t arg = doarg_1(a, argtype, x);
    /* Calculate the min and max values that can be stored given
     * nbytes, and whether or not the storage is signed */
    int32_t max = (1 << ((nbytes << 3) - hassign)) - 1;
    int32_t min = hassign ? -max - 1 : 0;
    if (arg < min)
        janet_asm_errorv(a, janet_formatc("instruction argument %v is too small, must be %d byte%s",
                                          x, nbytes, nbytes > 1 ? "s" : ""));
    if (arg > max)
        janet_asm_errorv(a, janet_formatc("instruction argument %v is too large, must be %d byte%s",
                                          x, nbytes, nbytes > 1 ? "s" : ""));
    return ((uint32_t) arg) << (nth << 3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %r13d
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
movq %r9, %rdx
callq 0x15af3
leal (,%r15,8), %ecx
subl %r13d, %ecx
pushq $-0x1
popq %rdx
shll %cl, %edx
testl %r13d, %r13d
cmovnel %edx, %r13d
cmpl %r13d, %eax
jl 0x15a9b
notl %edx
cmpl %edx, %eax
jg 0x15aba
shll $0x3, %r12d
movl %r12d, %ecx
shll %cl, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %r15d
leaq 0x4e58d(%rip), %rax     # 0x64033
leaq 0x52650(%rip), %rcx     # 0x680fd
cmovgeq %rax, %rcx
leaq 0x38f91(%rip), %rdi     # 0x4ea49
jmp 0x15ad7
cmpl $0x2, %r15d
leaq 0x4e56e(%rip), %rax     # 0x64033
leaq 0x52631(%rip), %rcx     # 0x680fd
cmovgeq %rax, %rcx
leaq 0x38faa(%rip), %rdi     # 0x4ea81
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3c0ed
movq %rax, 0xd8(%rbx)
movq %rbx, %rdi
callq 0x15980